diff --git a/.clang-tidy b/.clang-tidy
index caf62ab7f8..a56f7b17c9 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,6 +1,6 @@
Checks: '-*,readability-braces-around-statements,readability-inconsistent-declaration-parameter-name'
WarningsAsErrors: ''
-HeaderFilterRegex: '(src|include)\/.*\.h$'
+HeaderFilterRegex: '(src|include)\/.*(\.h|\.inc\.c)$'
FormatStyle: 'file'
CheckOptions:
# Require argument names to match exactly (instead of allowing a name to be a prefix/suffix of another)
diff --git a/Dockerfile b/Dockerfile
index 4f0095ed7d..92a0729960 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,7 @@
-FROM ubuntu:22.04 as build
+FROM ubuntu:24.04 AS build
+
ENV TZ=UTC
+ENV LANG=C.UTF-8
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apt-get update && \
@@ -9,7 +11,9 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
pkg-config \
python3 \
python3-pip \
+ python3-venv \
git \
+ curl \
wget \
unzip \
clang-tidy \
@@ -18,15 +22,8 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
apt-get clean && \
rm -rf /var/lib/apt/lists/*
-RUN python3 -m pip install --user colorama ansiwrap attrs watchdog python-Levenshtein "mapfile-parser>=1.2.1,<2.0.0" "rabbitizer>=1.0.0,<2.0.0"
-RUN python3 -m pip install --upgrade attrs pycparser
-ENV LANG C.UTF-8
-
-RUN mkdir /oot
WORKDIR /oot
-
RUN git config --global --add safe.directory /oot
-CMD ["/bin/sh", "-c", \
- "echo 'usage:\n docker run --rm --mount type=bind,source=\"$(pwd)\",destination=/oot oot make -j$(nproc) setup\n docker run --rm --mount type=bind,source=\"$(pwd)\",destination=/oot oot make -j$(nproc)'"]
+CMD make -j $(nproc) setup && make -j $(nproc) && tail -f /dev/null
diff --git a/Jenkinsfile b/Jenkinsfile
index 8a8345e992..5deedda130 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -29,10 +29,10 @@ pipeline {
// The ROMs are built in an order that maximizes compiler flags coverage in a "fail fast" approach.
// Specifically we start with a retail ROM for BSS ordering, and make sure we cover all of
// N64/GC/NTSC/PAL/MQ/DEBUG as quickly as possible.
- stage('Build ntsc-1.2') {
+ stage('Build ntsc-1.0') {
steps {
script {
- build('ntsc-1.2', 'oot-ntsc-1.2-us.z64')
+ build('ntsc-1.0', 'oot-ntsc-1.0-us.z64')
}
}
}
@@ -57,6 +57,20 @@ pipeline {
}
}
}
+ stage('Build pal-1.0') {
+ steps {
+ script {
+ build('pal-1.0', 'oot-pal-1.0.z64')
+ }
+ }
+ }
+ stage('Build ntsc-1.2') {
+ steps {
+ script {
+ build('ntsc-1.2', 'oot-ntsc-1.2-us.z64')
+ }
+ }
+ }
stage('Build gc-us') {
steps {
script {
@@ -85,6 +99,20 @@ pipeline {
}
}
}
+ stage('Build pal-1.1') {
+ steps {
+ script {
+ build('pal-1.1', 'oot-pal-1.1.z64')
+ }
+ }
+ }
+ stage('Build ntsc-1.1') {
+ steps {
+ script {
+ build('ntsc-1.1', 'oot-ntsc-1.1-us.z64')
+ }
+ }
+ }
stage('Build gc-us-mq') {
steps {
script {
@@ -92,6 +120,13 @@ pipeline {
}
}
}
+ stage('Build ique-cn') {
+ steps {
+ script {
+ build('ique-cn', 'oot-ique-cn.z64')
+ }
+ }
+ }
stage('Generate patch') {
when {
not {
diff --git a/Makefile b/Makefile
index 7c45c4b626..56134bd7fc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,90 +1,178 @@
MAKEFLAGS += --no-builtin-rules
# Ensure the build fails if a piped command fails
-SHELL = /bin/bash
+SHELL = /usr/bin/env bash
.SHELLFLAGS = -o pipefail -c
-# Build options can either be changed by modifying the makefile, or by building with 'make SETTING=value'
-# It is also possible to override default settings in a file called .make_options.mk with 'SETTING=value'.
+#### Build options ####
+
+# Build options can be changed by modifying them below, or by appending 'SETTING=value' to all 'make' commands
+# (e.g. 'make setup VERSION=ntsc-1.0' and 'make VERSION=ntsc-1.0' to build the NTSC 1.0 version).
+# Alternatively, you can create a file called .make_options.mk (gitignored by default) and add 'SETTING=value'
+# there to avoid modifying the Makefile directly.
-include .make_options.mk
-# If COMPARE is 1, check the output md5sum after building
+# If COMPARE is 1, check the output md5sum after building. Set to 0 when modding.
COMPARE ?= 1
-# If NON_MATCHING is 1, define the NON_MATCHING C flag when building
+# If NON_MATCHING is 1, define the NON_MATCHING C flag when building. Set to 1 when modding.
NON_MATCHING ?= 0
-# If ORIG_COMPILER is 1, compile with QEMU_IRIX and the original compiler
+# If ORIG_COMPILER is 1, compile with QEMU_IRIX and the original compiler.
ORIG_COMPILER ?= 0
# If COMPILER is "gcc", compile with GCC instead of IDO.
COMPILER ?= ido
-# Target game version. Currently the following versions are supported:
+# Target game version. Ensure the corresponding input ROM is placed in baseroms/$(VERSION)/baserom.z64.
+# Currently the following versions are supported:
+# ntsc-1.0 N64 NTSC 1.0 (Japan/US depending on REGION)
+# ntsc-1.1 N64 NTSC 1.1 (Japan/US depending on REGION)
+# pal-1.0 N64 PAL 1.0 (Europe)
# ntsc-1.2 N64 NTSC 1.2 (Japan/US depending on REGION)
+# pal-1.1 N64 PAL 1.1 (Europe)
# gc-jp GameCube Japan
# gc-jp-mq GameCube Japan Master Quest
-# gc-jp-ce GameCube Japan (Collector's Edition disc)
# gc-us GameCube US
-# gc-us-mq GameCube US
+# gc-us-mq GameCube US Master Quest
+# gc-eu-mq-dbg GameCube Europe/PAL Master Quest Debug (default)
# gc-eu GameCube Europe/PAL
# gc-eu-mq GameCube Europe/PAL Master Quest
-# gc-eu-mq-dbg GameCube Europe/PAL Master Quest Debug (default)
-# The following versions are work-in-progress and not yet matching:
-# (none currently)
+# gc-jp-ce GameCube Japan (Collector's Edition disc)
+# ique-cn iQue Player (Simplified Chinese)
VERSION ?= gc-eu-mq-dbg
-# Number of threads to extract and compress with
+# Number of threads to extract and compress with.
N_THREADS ?= $(shell nproc)
-# Check code syntax with host compiler
-RUN_CC_CHECK ?= 1
+# If DEBUG_OBJECTS is 1, produce additional debugging files such as objdump output or raw binaries for assets
+DEBUG_OBJECTS ?= 0
# 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
+# In nearly all cases, not having 'mips-linux-gnu-*' binaries on the PATH indicates missing dependencies.
MIPS_BINUTILS_PREFIX ?= mips-linux-gnu-
-# Emulator w/ flags
+# Emulator w/ flags for 'make run'.
N64_EMULATOR ?=
-# Set to override game region in the ROM header. Options: JP, US, EU
+# 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
+# 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 ?=
-CPP_DEFINES ?=
-
-REGIONAL_CHECKSUM := 0
# Version-specific settings
-ifeq ($(VERSION),ntsc-1.2)
+REGIONAL_CHECKSUM := 0
+ifeq ($(VERSION),ntsc-1.0)
REGIONAL_CHECKSUM := 1
REGION ?= JP
PLATFORM := N64
- DEBUG := 0
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd44
+ BUILD_DATE := 98-10-21
+ BUILD_TIME := 04:56:31
+ REVISION := 0
+else ifeq ($(VERSION),ntsc-1.1)
+ REGIONAL_CHECKSUM := 1
+ REGION ?= JP
+ PLATFORM := N64
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd44
+ BUILD_DATE := 98-10-26
+ BUILD_TIME := 10:58:45
+ REVISION := 1
+else ifeq ($(VERSION),pal-1.0)
+ REGION ?= EU
+ PLATFORM := N64
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd44
+ BUILD_DATE := 98-11-10
+ BUILD_TIME := 14:34:22
+ REVISION := 0
+else ifeq ($(VERSION),ntsc-1.2)
+ REGIONAL_CHECKSUM := 1
+ REGION ?= JP
+ PLATFORM := N64
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd44
+ BUILD_DATE := 98-11-12
+ BUILD_TIME := 18:17:03
+ REVISION := 2
+else ifeq ($(VERSION),pal-1.1)
+ REGION ?= EU
+ PLATFORM := N64
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd44
+ BUILD_DATE := 98-11-18
+ BUILD_TIME := 17:36:49
+ REVISION := 1
else ifeq ($(VERSION),gc-jp)
REGION ?= JP
PLATFORM := GC
- DEBUG := 0
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd022j
+ BUILD_DATE := 02-10-29
+ BUILD_TIME := 23:49:53
+ REVISION := 15
else ifeq ($(VERSION),gc-jp-mq)
REGION ?= JP
PLATFORM := GC
- DEBUG := 0
-else ifeq ($(VERSION),gc-jp-ce)
- REGION ?= JP
- PLATFORM := GC
- DEBUG := 0
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd022j
+ BUILD_DATE := 02-10-30
+ BUILD_TIME := 00:15:15
+ REVISION := 15
else ifeq ($(VERSION),gc-us)
REGION ?= US
PLATFORM := GC
- DEBUG := 0
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd022j
+ BUILD_DATE := 02-12-19
+ BUILD_TIME := 13:28:09
+ REVISION := 15
else ifeq ($(VERSION),gc-us-mq)
REGION ?= US
PLATFORM := GC
- DEBUG := 0
-else ifeq ($(VERSION),gc-eu)
- REGION ?= EU
- PLATFORM := GC
- DEBUG := 0
-else ifeq ($(VERSION),gc-eu-mq)
- REGION ?= EU
- PLATFORM := GC
- DEBUG := 0
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd022j
+ BUILD_DATE := 02-12-19
+ BUILD_TIME := 14:05:42
+ REVISION := 15
else ifeq ($(VERSION),gc-eu-mq-dbg)
REGION ?= EU
PLATFORM := GC
- DEBUG := 1
+ DEBUG_FEATURES ?= 1
+ BUILD_CREATOR := zelda@srd022j
+ BUILD_DATE := 03-02-21
+ BUILD_TIME := 00:16:31
+ REVISION := 15
+else ifeq ($(VERSION),gc-eu)
+ REGION ?= EU
+ PLATFORM := GC
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd022j
+ BUILD_DATE := 03-02-21
+ BUILD_TIME := 20:12:23
+ REVISION := 15
+else ifeq ($(VERSION),gc-eu-mq)
+ REGION ?= EU
+ PLATFORM := GC
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd022j
+ BUILD_DATE := 03-02-21
+ BUILD_TIME := 20:37:19
+ REVISION := 15
+else ifeq ($(VERSION),gc-jp-ce)
+ REGION ?= JP
+ PLATFORM := GC
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := zelda@srd022j
+ BUILD_DATE := 03-10-08
+ BUILD_TIME := 21:53:00
+ REVISION := 15
+else ifeq ($(VERSION),ique-cn)
+ REGION ?= US
+ PLATFORM := IQUE
+ DEBUG_FEATURES ?= 0
+ BUILD_CREATOR := build@toad.routefree.com
+ BUILD_DATE := 03-10-22
+ BUILD_TIME := 16:23:19
+ REVISION := 0
else
$(error Unsupported version $(VERSION))
endif
@@ -114,28 +202,41 @@ EXTRACTED_DIR := extracted/$(VERSION)
VENV := .venv
MAKE = make
-CPPFLAGS += -P -xc -fno-dollars-in-identifiers
+
+ifeq ($(PLATFORM),N64)
+ CPP_DEFINES += -DPLATFORM_N64=1 -DPLATFORM_GC=0 -DPLATFORM_IQUE=0
+ LIBULTRA_VERSION := I
+ LIBULTRA_PATCH := 1
+else ifeq ($(PLATFORM),GC)
+ CPP_DEFINES += -DPLATFORM_N64=0 -DPLATFORM_GC=1 -DPLATFORM_IQUE=0
+ LIBULTRA_VERSION := L
+ LIBULTRA_PATCH := 0
+else ifeq ($(PLATFORM),IQUE)
+ CPP_DEFINES += -DPLATFORM_N64=0 -DPLATFORM_GC=0 -DPLATFORM_IQUE=1
+ LIBULTRA_VERSION := L
+ LIBULTRA_PATCH := 0
+else
+$(error Unsupported platform $(PLATFORM))
+endif
# Converts e.g. ntsc-1.0 to NTSC_1_0
VERSION_MACRO := $(shell echo $(VERSION) | tr a-z-. A-Z__)
-CPP_DEFINES += -DOOT_VERSION=$(VERSION_MACRO)
+CPP_DEFINES += -DOOT_VERSION=$(VERSION_MACRO) -DOOT_REVISION=$(REVISION)
CPP_DEFINES += -DOOT_REGION=REGION_$(REGION)
-
-ifeq ($(PLATFORM),N64)
- CPP_DEFINES += -DPLATFORM_N64=1 -DPLATFORM_GC=0
-else ifeq ($(PLATFORM),GC)
- CPP_DEFINES += -DPLATFORM_N64=0 -DPLATFORM_GC=1
-else
- $(error Unsupported platform $(PLATFORM))
+CPP_DEFINES += -DLIBULTRA_VERSION=LIBULTRA_VERSION_$(LIBULTRA_VERSION)
+CPP_DEFINES += -DLIBULTRA_PATCH=$(LIBULTRA_PATCH)
+ifeq ($(PLATFORM),IQUE)
+ CPP_DEFINES += -DBBPLAYER
endif
-ifeq ($(DEBUG),1)
- CPP_DEFINES += -DOOT_DEBUG=1
+ifeq ($(DEBUG_FEATURES),1)
+ CPP_DEFINES += -DDEBUG_FEATURES=1
OPTFLAGS := -O2
else
- CPP_DEFINES += -DOOT_DEBUG=0 -DNDEBUG
+ CPP_DEFINES += -DDEBUG_FEATURES=0 -DNDEBUG
OPTFLAGS := -O2 -g3
endif
+ASOPTFLAGS := -O1
ifeq ($(OS),Windows_NT)
DETECTED_OS=windows
@@ -158,9 +259,11 @@ endif
# Detect compiler and set variables appropriately.
ifeq ($(COMPILER),gcc)
CC := $(MIPS_BINUTILS_PREFIX)gcc
+ CCAS := $(CC) -x assembler-with-cpp
else ifeq ($(COMPILER),ido)
CC := tools/ido_recomp/$(DETECTED_OS)/7.1/cc
CC_OLD := tools/ido_recomp/$(DETECTED_OS)/5.3/cc
+ CCAS := $(CC_OLD)
else
$(error Unsupported compiler. Please use either ido or gcc as the COMPILER variable.)
endif
@@ -173,15 +276,35 @@ ifeq ($(ORIG_COMPILER),1)
$(error Please install qemu-irix package or set QEMU_IRIX env var to the full qemu-irix binary path)
endif
endif
- CC = $(QEMU_IRIX) -L tools/ido7.1_compiler tools/ido7.1_compiler/usr/bin/cc
- CC_OLD = $(QEMU_IRIX) -L tools/ido5.3_compiler tools/ido5.3_compiler/usr/bin/cc
+ CC := $(QEMU_IRIX) -L tools/ido7.1_compiler tools/ido7.1_compiler/usr/bin/cc
+ CC_OLD := $(QEMU_IRIX) -L tools/ido5.3_compiler tools/ido5.3_compiler/usr/bin/cc
+ CCAS := $(CC)
endif
+# EGCS Compiler
+EGCS_PREFIX := tools/egcs/$(DETECTED_OS)/
+EGCS_CC := $(EGCS_PREFIX)gcc -B $(EGCS_PREFIX)
+EGCS_CCAS := $(EGCS_CC) -x assembler-with-cpp
+
AS := $(MIPS_BINUTILS_PREFIX)as
LD := $(MIPS_BINUTILS_PREFIX)ld
OBJCOPY := $(MIPS_BINUTILS_PREFIX)objcopy
OBJDUMP := $(MIPS_BINUTILS_PREFIX)objdump
NM := $(MIPS_BINUTILS_PREFIX)nm
+STRIP := $(MIPS_BINUTILS_PREFIX)strip
+
+# Command prefix to preprocess a file before running the compiler
+PREPROCESS :=
+
+# Command to patch certain object files after they are built
+POSTPROCESS_OBJ := @:
+
+# The default iconv on macOS has some differences from GNU iconv, so we use the Homebrew version instead
+ifeq ($(UNAME_S),Darwin)
+ ICONV := $(shell brew --prefix)/opt/libiconv/bin/iconv
+else
+ ICONV := iconv
+endif
INC := -Iinclude -Iinclude/libc -Isrc -I$(BUILD_DIR) -I. -I$(EXTRACTED_DIR)
@@ -195,7 +318,8 @@ CPP := gcc -E
MKLDSCRIPT := tools/mkldscript
MKDMADATA := tools/mkdmadata
ELF2ROM := tools/elf2rom
-ZAPD := tools/ZAPD/ZAPD.out
+BIN2C := tools/bin2c
+N64TEXCONV := tools/assets/n64texconv/n64texconv
FADO := tools/fado/fado.elf
PYTHON ?= $(VENV)/bin/python3
@@ -204,53 +328,64 @@ PYTHON ?= $(VENV)/bin/python3
BUILD_DIR_REPLACE := sed -e 's|$$(BUILD_DIR)|$(BUILD_DIR)|g'
# Audio tools
-AUDIO_EXTRACT := $(PYTHON) tools/audio_extraction.py
SAMPLECONV := tools/audio/sampleconv/sampleconv
SBC := tools/audio/sbc
SFC := tools/audio/sfc
SFPATCH := tools/audio/sfpatch
ATBLGEN := tools/audio/atblgen
+AFILE_SIZES := tools/audio/afile_sizes
# We want linemarkers in sequence assembly files for better assembler error messages
SEQ_CPP := $(CPP) -x assembler-with-cpp -fno-dollars-in-identifiers
-SEQ_CPPFLAGS := -D_LANGUAGE_ASEQ -DMML_VERSION=MML_VERSION_OOT -I include -I include/audio -I include/tables/sfx -I $(BUILD_DIR)/assets/audio/soundfonts
+SEQ_CPPFLAGS := -D_LANGUAGE_ASEQ -DMML_VERSION=MML_VERSION_OOT $(CPP_DEFINES) -I include -I include/audio -I include/tables/sfx -I $(BUILD_DIR)/assets/audio/soundfonts
SBCFLAGS := --matching
SFCFLAGS := --matching
-CFLAGS += $(CPP_DEFINES)
-CPPFLAGS += $(CPP_DEFINES)
+# Extra debugging steps
+ifeq ($(DEBUG_OBJECTS),1)
+ OBJDUMP_CMD = @$(OBJDUMP) $(OBJDUMP_FLAGS) $@ > $(@:.o=.s)
+ OBJCOPY_CMD = @$(OBJCOPY) -O binary $@ $(@:.o=.bin)
+else
+ OBJDUMP_CMD = @:
+ OBJCOPY_CMD = @:
+endif
ifeq ($(COMPILER),gcc)
OPTFLAGS := -Os -ffast-math -fno-unsafe-math-optimizations
endif
GBI_DEFINES := -DF3DEX_GBI_2
-ifeq ($(PLATFORM),GC)
+ifneq ($(PLATFORM),N64)
GBI_DEFINES += -DF3DEX_GBI_PL -DGBI_DOWHILE
endif
-ifeq ($(DEBUG),1)
+ifeq ($(DEBUG_FEATURES),1)
GBI_DEFINES += -DGBI_DEBUG
endif
-CFLAGS += $(GBI_DEFINES)
-
-ASFLAGS := -march=vr4300 -32 -no-pad-sections -Iinclude -I$(EXTRACTED_DIR)
+CPPFLAGS += -P -xc -fno-dollars-in-identifiers $(CPP_DEFINES)
+ASFLAGS += -march=vr4300 -32 -no-pad-sections -Iinclude -I$(EXTRACTED_DIR)
ifeq ($(COMPILER),gcc)
- CFLAGS += -G 0 -nostdinc $(INC) -march=vr4300 -mfix4300 -mabi=32 -mno-abicalls -mdivide-breaks -fno-PIC -fno-common -ffreestanding -fbuiltin -fno-builtin-sinf -fno-builtin-cosf $(CHECK_WARNINGS) -funsigned-char
+ CFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -nostdinc -MD $(INC) -march=vr4300 -mfix4300 -mabi=32 -mno-abicalls -mdivide-breaks -fno-PIC -fno-common -ffreestanding -funsigned-char -fbuiltin -fno-builtin-sinf -fno-builtin-cosf $(CHECK_WARNINGS)
+ CCASFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -nostdinc -MD $(INC) -march=vr4300 -mfix4300 -mabi=32 -mno-abicalls -fno-PIC -fno-common -Wa,-no-pad-sections
MIPS_VERSION := -mips3
else
# Suppress warnings for wrong number of macro arguments (to fake variadic
# macros) and Microsoft extensions such as anonymous structs (which the
# compiler does support but warns for their usage).
- CFLAGS += -G 0 -non_shared -fullwarn -verbose -Xcpluscomm $(INC) -Wab,-r4300_mul -woff 516,609,649,838,712,807
+ CFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -non_shared -fullwarn -verbose -Xcpluscomm $(INC) -Wab,-r4300_mul -woff 516,609,649,838,712,807
+ CCASFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -non_shared -fullwarn -verbose -Xcpluscomm $(INC) -Wab,-r4300_mul -woff 516,609,649,838,712,807 -o32
MIPS_VERSION := -mips2
+
+ EGCS_CFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -DEGCS -G 0 -nostdinc $(INC) -mcpu=vr4300 -mabi=32 -mgp32 -mfp32 -fno-PIC
+ EGCS_CCASFLAGS := -Wall -nostdinc $(CPP_DEFINES) -DEGCS $(INC) -c -G 0 -Wa,-irix-symtab -D_ABIO32=1 -D_ABI64=3 -D_MIPS_SIM_ABI64=_ABI64 -D_MIPS_SIM_ABI32=_ABIO32 -DMIPSEB -D_LANGUAGE_ASSEMBLY -mabi=32 -fno-PIC -non_shared -mcpu=4300 -mfix4300
+ EGCS_ASOPTFLAGS :=
endif
ifeq ($(COMPILER),ido)
# Have CC_CHECK pretend to be a MIPS compiler
MIPS_BUILTIN_DEFS := -D_MIPS_ISA_MIPS2=2 -D_MIPS_ISA=_MIPS_ISA_MIPS2 -D_ABIO32=1 -D_MIPS_SIM=_ABIO32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32
- CC_CHECK = gcc -fno-builtin -fsyntax-only -funsigned-char -std=gnu90 -D_LANGUAGE_C $(CPP_DEFINES) $(MIPS_BUILTIN_DEFS) $(GBI_DEFINES) $(INC) $(CHECK_WARNINGS)
+ CC_CHECK = gcc -nostdinc -MD -fno-builtin -fsyntax-only -funsigned-char -std=gnu90 -D_LANGUAGE_C $(CPP_DEFINES) $(MIPS_BUILTIN_DEFS) $(GBI_DEFINES) $(INC) $(CHECK_WARNINGS)
ifeq ($(shell getconf LONG_BIT), 32)
# Work around memory allocation bug in QEMU
export QEMU_GUEST_BASE := 1
@@ -259,7 +394,7 @@ ifeq ($(COMPILER),ido)
CC_CHECK += -m32
endif
else
- RUN_CC_CHECK := 0
+ CC_CHECK = @:
endif
OBJDUMP_FLAGS := -d -r -z -Mreg-names=32
@@ -272,14 +407,13 @@ ROMC := $(ROM:.z64=-compressed.z64)
ELF := $(ROM:.z64=.elf)
MAP := $(ROM:.z64=.map)
LDSCRIPT := $(ROM:.z64=.ld)
-# description of ROM segments
-SPEC := spec
-ifeq ($(COMPILER),ido)
-SRC_DIRS := $(shell find src -type d -not -path src/gcc_fix)
-else
+# description of ROM segments
+SPEC := spec/spec
+SPEC_INCLUDES := $(wildcard spec/*.inc)
+
SRC_DIRS := $(shell find src -type d)
-endif
+UNDECOMPILED_DATA_DIRS := $(shell find data -type d)
ifneq ($(wildcard $(EXTRACTED_DIR)/assets/audio),)
SAMPLE_EXTRACT_DIRS := $(shell find $(EXTRACTED_DIR)/assets/audio/samples -type d)
@@ -332,7 +466,7 @@ SOUNDFONT_EXTRACT_XMLS := $(foreach dir,$(SOUNDFONT_EXTRACT_DIRS),$(wildcard $(d
SOUNDFONT_BUILD_XMLS := $(foreach f,$(SOUNDFONT_XMLS),$(BUILD_DIR)/$f) $(foreach f,$(SOUNDFONT_EXTRACT_XMLS),$(f:$(EXTRACTED_DIR)/%=$(BUILD_DIR)/%))
SOUNDFONT_O_FILES := $(foreach f,$(SOUNDFONT_BUILD_XMLS),$(f:.xml=.o))
SOUNDFONT_HEADERS := $(foreach f,$(SOUNDFONT_BUILD_XMLS),$(f:.xml=.h))
-SOUNDFONT_DEP_FILES := $(foreach f,$(SOUNDFONT_O_FILES),$(f:.o=.d))
+SOUNDFONT_DEP_FILES := $(foreach f,$(SOUNDFONT_O_FILES),$(f:.o=.c.d))
SEQUENCE_FILES := $(foreach dir,$(SEQUENCE_DIRS),$(wildcard $(dir)/*.seq))
SEQUENCE_EXTRACT_FILES := $(foreach dir,$(SEQUENCE_EXTRACT_DIRS),$(wildcard $(dir)/*.seq))
@@ -355,31 +489,18 @@ ASSET_BIN_DIRS := $(ASSET_BIN_DIRS_EXTRACTED) $(ASSET_BIN_DIRS_COMMITTED)
ASSET_FILES_BIN_EXTRACTED := $(foreach dir,$(ASSET_BIN_DIRS_EXTRACTED),$(wildcard $(dir)/*.bin))
ASSET_FILES_BIN_COMMITTED := $(foreach dir,$(ASSET_BIN_DIRS_COMMITTED),$(wildcard $(dir)/*.bin))
ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_BIN_EXTRACTED:.bin=.bin.inc.c),$(f:$(EXTRACTED_DIR)/%=$(BUILD_DIR)/%)) \
- $(foreach f,$(ASSET_FILES_BIN_COMMITTED:.bin=.bin.inc.c),$(BUILD_DIR)/$f) \
- $(foreach f,$(wildcard assets/text/*.c),$(BUILD_DIR)/$(f:.c=.o))
+ $(foreach f,$(ASSET_FILES_BIN_COMMITTED:.bin=.bin.inc.c),$(BUILD_DIR)/$f)
-UNDECOMPILED_DATA_DIRS := $(shell find data -type d)
+# Find all .o files included in the spec
+SPEC_O_FILES := $(shell $(CPP) $(CPPFLAGS) -I. $(SPEC) | $(BUILD_DIR_REPLACE) | sed -n -E 's/^[ \t]*include[ \t]*"([a-zA-Z0-9/_.-]+\.o)"/\1/p')
-BASEROM_BIN_FILES := $(wildcard $(EXTRACTED_DIR)/baserom/*)
-
-# source files
-ASSET_C_FILES_EXTRACTED := $(filter-out %.inc.c,$(foreach dir,$(ASSET_BIN_DIRS_EXTRACTED),$(wildcard $(dir)/*.c)))
-ASSET_C_FILES_COMMITTED := $(filter-out %.inc.c,$(foreach dir,$(ASSET_BIN_DIRS_COMMITTED),$(wildcard $(dir)/*.c)))
-SRC_C_FILES := $(filter-out %.inc.c,$(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)))
-S_FILES := $(foreach dir,$(SRC_DIRS) $(UNDECOMPILED_DATA_DIRS),$(wildcard $(dir)/*.s))
-O_FILES := $(foreach f,$(S_FILES:.s=.o),$(BUILD_DIR)/$f) \
- $(foreach f,$(SRC_C_FILES:.c=.o),$(BUILD_DIR)/$f) \
- $(foreach f,$(ASSET_C_FILES_EXTRACTED:.c=.o),$(f:$(EXTRACTED_DIR)/%=$(BUILD_DIR)/%)) \
- $(foreach f,$(ASSET_C_FILES_COMMITTED:.c=.o),$(BUILD_DIR)/$f) \
- $(foreach f,$(BASEROM_BIN_FILES),$(BUILD_DIR)/baserom/$(notdir $f).o) \
- $(BUILD_DIR)/src/code/z_message_z_game_over.o
-
-OVL_RELOC_FILES := $(shell $(CPP) $(CPPFLAGS) $(SPEC) | $(BUILD_DIR_REPLACE) | grep -o '[^"]*_reloc.o' )
+# Split out reloc files
+O_FILES := $(filter-out %_reloc.o,$(SPEC_O_FILES))
+OVL_RELOC_FILES := $(filter %_reloc.o,$(SPEC_O_FILES))
# Automatic dependency files
# (Only asm_processor dependencies and reloc dependencies are handled for now)
-DEP_FILES := $(O_FILES:.o=.asmproc.d) $(OVL_RELOC_FILES:.o=.d)
-
+DEP_FILES := $(O_FILES:.o=.d) $(O_FILES:.o=.asmproc.d) $(OVL_RELOC_FILES:.o=.d) $(BUILD_DIR)/spec.d
TEXTURE_FILES_PNG_EXTRACTED := $(foreach dir,$(ASSET_BIN_DIRS_EXTRACTED),$(wildcard $(dir)/*.png))
TEXTURE_FILES_PNG_COMMITTED := $(foreach dir,$(ASSET_BIN_DIRS_COMMITTED),$(wildcard $(dir)/*.png))
@@ -392,7 +513,8 @@ TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG_EXTRACTED:.png=.inc.c),$(f:
# create build directories
$(shell mkdir -p $(BUILD_DIR)/baserom \
- $(BUILD_DIR)/assets/text)
+ $(BUILD_DIR)/assets/text \
+ $(BUILD_DIR)/linker_scripts)
$(shell mkdir -p $(foreach dir, \
$(SRC_DIRS) \
$(UNDECOMPILED_DATA_DIRS) \
@@ -412,22 +534,24 @@ $(shell mkdir -p $(foreach dir, \
$(dir:$(EXTRACTED_DIR)/%=$(BUILD_DIR)/%)))
endif
+$(BUILD_DIR)/src/boot/build.o: CPP_DEFINES += -DBUILD_CREATOR="\"$(BUILD_CREATOR)\"" -DBUILD_DATE="\"$(BUILD_DATE)\"" -DBUILD_TIME="\"$(BUILD_TIME)\""
+
+$(BUILD_DIR)/src/audio/internal/seqplayer.o: CPP_DEFINES += -DMML_VERSION=MML_VERSION_OOT
+
ifeq ($(COMPILER),ido)
$(BUILD_DIR)/src/boot/driverominit.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/boot/logutils.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/boot/stackcheck.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/code/code_800FC620.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/code/gfxprint.o: OPTFLAGS := -O2
+ifeq ($(PLATFORM),IQUE)
+# iQue's driverominit.o seems to have been patched manually. For non-matching builds we edit the source code instead.
+ifneq ($(NON_MATCHING),1)
+$(BUILD_DIR)/src/boot/driverominit.o: POSTPROCESS_OBJ := $(PYTHON) tools/patch_ique_driverominit.py
+endif
+
+$(BUILD_DIR)/src/boot/viconfig.o: OPTFLAGS := -O2
+endif
+
$(BUILD_DIR)/src/code/jpegutils.o: OPTFLAGS := -O2
$(BUILD_DIR)/src/code/jpegdecoder.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/code/loadfragment2_n64.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/code/load_gc.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/code/loadfragment2_gc.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/code/mtxuty-cvt.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/code/padsetup.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/code/padutils.o: OPTFLAGS := -O2
-$(BUILD_DIR)/src/code/relocation_gc.o: OPTFLAGS := -O2
$(BUILD_DIR)/src/code/fault_n64.o: CFLAGS += -trapuv
$(BUILD_DIR)/src/code/fault_gc.o: CFLAGS += -trapuv
@@ -444,35 +568,109 @@ endif
$(BUILD_DIR)/src/code/jpegutils.o: CC := $(CC_OLD)
$(BUILD_DIR)/src/code/jpegdecoder.o: CC := $(CC_OLD)
-ifeq ($(DEBUG),1)
+ifeq ($(PLATFORM),IQUE)
+# Some files are compiled with EGCS on iQue
+EGCS_O_FILES += $(BUILD_DIR)/src/boot/boot_main.o
+EGCS_O_FILES += $(BUILD_DIR)/src/boot/idle.o
+EGCS_O_FILES += $(BUILD_DIR)/src/boot/inflate.o
+EGCS_O_FILES += $(BUILD_DIR)/src/boot/is_debug_ique.o
+EGCS_O_FILES += $(BUILD_DIR)/src/boot/z_locale.o
+EGCS_O_FILES += $(BUILD_DIR)/src/boot/z_std_dma.o
+EGCS_O_FILES += $(BUILD_DIR)/src/code/z_actor.o
+EGCS_O_FILES += $(BUILD_DIR)/src/code/z_common_data.o
+EGCS_O_FILES += $(BUILD_DIR)/src/code/z_construct.o
+EGCS_O_FILES += $(BUILD_DIR)/src/code/z_kanfont.o
+EGCS_O_FILES += $(BUILD_DIR)/src/code/z_message.o
+EGCS_O_FILES += $(BUILD_DIR)/src/code/z_parameter.o
+EGCS_O_FILES += $(BUILD_DIR)/src/code/z_sram.o
+EGCS_O_FILES += $(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/z_en_mag.o
+EGCS_O_FILES += $(BUILD_DIR)/src/overlays/actors/ovl_End_Title/z_end_title.o
+EGCS_O_FILES += $(BUILD_DIR)/src/overlays/actors/ovl_Fishing/z_fishing.o
+EGCS_O_FILES += $(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.o
+EGCS_O_FILES += $(BUILD_DIR)/src/overlays/gamestates/ovl_opening/z_opening.o
+EGCS_O_FILES += $(BUILD_DIR)/src/overlays/gamestates/ovl_title/z_title.o
+EGCS_O_FILES += $(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.o
+EGCS_O_FILES += $(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.o
+
+$(EGCS_O_FILES): CC := $(EGCS_CC)
+$(EGCS_O_FILES): CFLAGS := $(EGCS_CFLAGS) -mno-abicalls
+$(EGCS_O_FILES): MIPS_VERSION :=
+endif
+
+ifeq ($(PLATFORM),IQUE)
+$(BUILD_DIR)/src/libc/%.o: CC := $(EGCS_CC)
+$(BUILD_DIR)/src/libc/%.o: CCAS := $(EGCS_CCAS)
+$(BUILD_DIR)/src/libc/%.o: CFLAGS := $(EGCS_CFLAGS) -mno-abicalls
+$(BUILD_DIR)/src/libc/%.o: CCASFLAGS := $(EGCS_CCASFLAGS)
+$(BUILD_DIR)/src/libc/%.o: OPTFLAGS := -O1
+$(BUILD_DIR)/src/libc/%.o: MIPS_VERSION :=
+$(BUILD_DIR)/src/libc/memmove.o: MIPS_VERSION := -mips2
+else ifeq ($(DEBUG_FEATURES),1)
$(BUILD_DIR)/src/libc/%.o: OPTFLAGS := -g
+$(BUILD_DIR)/src/libc/%.o: ASOPTFLAGS := -g
else
$(BUILD_DIR)/src/libc/%.o: OPTFLAGS := -O2
+$(BUILD_DIR)/src/libc/%.o: ASOPTFLAGS := -O2
endif
$(BUILD_DIR)/src/libc64/%.o: OPTFLAGS := -O2
+$(BUILD_DIR)/src/libu64/%.o: OPTFLAGS := -O2
+
$(BUILD_DIR)/src/audio/%.o: OPTFLAGS := -O2
# Use signed chars instead of unsigned for this audio file (needed to match AudioDebug_ScrPrt)
-$(BUILD_DIR)/src/audio/general.o: CFLAGS += -signed
+$(BUILD_DIR)/src/audio/game/general.o: CFLAGS += -signed
ifeq ($(PLATFORM),N64)
-$(BUILD_DIR)/src/audio/general.o: CFLAGS += -DNO_SQRTF_INTRINSIC
+$(BUILD_DIR)/src/audio/game/general.o: CFLAGS += -DNO_SQRTF_INTRINSIC
endif
# Put string literals in .data for some audio files (needed to match these files with literals)
-$(BUILD_DIR)/src/audio/sfx.o: CFLAGS += -use_readwrite_const
-$(BUILD_DIR)/src/audio/sequence.o: CFLAGS += -use_readwrite_const
+$(BUILD_DIR)/src/audio/game/sfx.o: CFLAGS += -use_readwrite_const
+$(BUILD_DIR)/src/audio/game/sequence.o: CFLAGS += -use_readwrite_const
+ifeq ($(PLATFORM),IQUE)
+$(BUILD_DIR)/src/libultra/%.o: CC := $(EGCS_CC)
+$(BUILD_DIR)/src/libultra/%.o: CCAS := $(EGCS_CCAS)
+$(BUILD_DIR)/src/libultra/%.o: CFLAGS := $(EGCS_CFLAGS) -mno-abicalls
+$(BUILD_DIR)/src/libultra/%.o: CCASFLAGS := $(EGCS_CCASFLAGS)
+$(BUILD_DIR)/src/libultra/%.o: ASOPTFLAGS := $(EGCS_ASOPTFLAGS)
+
+$(BUILD_DIR)/src/libultra/reg/_%.o: OPTFLAGS := -O0
+$(BUILD_DIR)/src/libultra/reg/_%.o: MIPS_VERSION := -mgp64 -mfp64 -mips3
+
+$(BUILD_DIR)/src/libultra/audio/%.o: OPTFLAGS := -O2
+
+$(BUILD_DIR)/src/libultra/libc/ll.o: OPTFLAGS := -O0
+$(BUILD_DIR)/src/libultra/libc/llcvt.o: OPTFLAGS := -O0
+
+$(BUILD_DIR)/src/libultra/os/exceptasm.o: MIPS_VERSION := -mips3
+$(BUILD_DIR)/src/libultra/os/invaldcache.o: MIPS_VERSION := -mips3
+$(BUILD_DIR)/src/libultra/os/invalicache.o: MIPS_VERSION := -mips3
+$(BUILD_DIR)/src/libultra/os/writebackdcache.o: MIPS_VERSION := -mips3
+$(BUILD_DIR)/src/libultra/os/writebackdcacheall.o: MIPS_VERSION := -mips3
+else
$(BUILD_DIR)/src/libultra/%.o: CC := $(CC_OLD)
$(BUILD_DIR)/src/libultra/libc/ll.o: OPTFLAGS := -O1
$(BUILD_DIR)/src/libultra/libc/ll.o: MIPS_VERSION := -mips3 -32
+$(BUILD_DIR)/src/libultra/libc/ll.o: POSTPROCESS_OBJ := $(PYTHON) tools/set_o32abi_bit.py
+
$(BUILD_DIR)/src/libultra/libc/llcvt.o: OPTFLAGS := -O1
$(BUILD_DIR)/src/libultra/libc/llcvt.o: MIPS_VERSION := -mips3 -32
+$(BUILD_DIR)/src/libultra/libc/llcvt.o: POSTPROCESS_OBJ := $(PYTHON) tools/set_o32abi_bit.py
-ifeq ($(PLATFORM),N64)
+$(BUILD_DIR)/src/libultra/os/exceptasm.o: MIPS_VERSION := -mips3 -32
+$(BUILD_DIR)/src/libultra/os/exceptasm.o: POSTPROCESS_OBJ := $(PYTHON) tools/set_o32abi_bit.py
+endif
+
+$(BUILD_DIR)/src/code/%.o: ASOPTFLAGS := -O2
+$(BUILD_DIR)/src/libleo/%.o: ASOPTFLAGS := -O2
+$(BUILD_DIR)/src/libultra/libc/%.o: ASOPTFLAGS := -O2
+$(BUILD_DIR)/src/libultra/mgu/%.o: ASOPTFLAGS := -O2
+
+ifeq ($(LIBULTRA_VERSION),I)
$(BUILD_DIR)/src/libultra/gu/%.o: OPTFLAGS := -O3
$(BUILD_DIR)/src/libultra/io/%.o: OPTFLAGS := -O1
$(BUILD_DIR)/src/libultra/libc/%.o: OPTFLAGS := -O3
@@ -511,20 +709,32 @@ else
$(BUILD_DIR)/src/libultra/gu/%.o: OPTFLAGS := -O2
$(BUILD_DIR)/src/libultra/io/%.o: OPTFLAGS := -O2
$(BUILD_DIR)/src/libultra/libc/%.o: OPTFLAGS := -O2
+ifeq ($(PLATFORM),IQUE)
+$(BUILD_DIR)/src/libultra/os/%.o: OPTFLAGS := -O0
+else
$(BUILD_DIR)/src/libultra/os/%.o: OPTFLAGS := -O1
endif
+endif
$(BUILD_DIR)/src/libleo/%.o: CC := $(CC_OLD)
$(BUILD_DIR)/src/libleo/%.o: OPTFLAGS := -O2
+ifeq ($(PLATFORM),IQUE)
+$(BUILD_DIR)/src/libgcc/%.o: CC := $(EGCS_CC)
+$(BUILD_DIR)/src/libgcc/%.o: CFLAGS := $(EGCS_CFLAGS)
+endif
+
$(BUILD_DIR)/assets/misc/z_select_static/%.o: GBI_DEFINES := -DF3DEX_GBI
-# For using asm_processor on some files:
-#$(BUILD_DIR)/.../%.o: CC := $(PYTHON) tools/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
+ifeq ($(PLATFORM),IQUE)
+$(BUILD_DIR)/src/makerom/%.o: CCAS := $(EGCS_CCAS)
+$(BUILD_DIR)/src/makerom/%.o: CCASFLAGS := $(EGCS_CCASFLAGS)
+$(BUILD_DIR)/src/makerom/%.o: ASOPTFLAGS := $(EGCS_ASOPTFLAGS)
+endif
ifeq ($(PERMUTER),) # permuter + preprocess.py misbehaves, permuter doesn't care about rodata diffs or bss ordering so just don't use it in that case
# Handle encoding (UTF-8 -> EUC-JP) and custom pragmas
-$(BUILD_DIR)/src/%.o: CC := ./tools/preprocess.sh -v $(VERSION) -- $(CC)
+$(BUILD_DIR)/src/%.o: PREPROCESS := ./tools/preprocess.sh -v $(VERSION) -i $(ICONV) --
endif
else
@@ -577,18 +787,14 @@ venv:
$(PYTHON) -m pip install -U pip
$(PYTHON) -m pip install -U -r requirements.txt
-# TODO this is a temporary rule for testing audio, to be removed
-setup-audio:
- $(AUDIO_EXTRACT) -o $(EXTRACTED_DIR) -v $(VERSION) --read-xml
-
setup: venv
$(MAKE) -C tools
$(PYTHON) tools/decompress_baserom.py $(VERSION)
$(PYTHON) tools/extract_baserom.py $(BASEROM_DIR)/baserom-decompressed.z64 $(EXTRACTED_DIR)/baserom -v $(VERSION)
+ $(PYTHON) -m tools.assets.extract $(EXTRACTED_DIR)/baserom $(EXTRACTED_DIR) -v $(VERSION) -j$(N_THREADS)
$(PYTHON) tools/extract_incbins.py $(EXTRACTED_DIR)/baserom $(EXTRACTED_DIR)/incbin -v $(VERSION)
- $(PYTHON) tools/msgdis.py $(EXTRACTED_DIR)/baserom $(EXTRACTED_DIR)/text -v $(VERSION)
- $(PYTHON) extract_assets.py $(EXTRACTED_DIR)/baserom $(EXTRACTED_DIR)/assets -v $(VERSION) -j$(N_THREADS)
- $(AUDIO_EXTRACT) -o $(EXTRACTED_DIR) -v $(VERSION) --read-xml
+ $(PYTHON) tools/extract_text.py $(EXTRACTED_DIR)/baserom $(EXTRACTED_DIR)/text -v $(VERSION)
+ $(PYTHON) tools/extract_audio.py -b $(EXTRACTED_DIR)/baserom -o $(EXTRACTED_DIR) -v $(VERSION) --read-xml
disasm:
$(RM) -r $(EXPECTED_DIR)
@@ -606,17 +812,38 @@ endif
#### Various Recipes ####
+ifeq ($(PLATFORM),IQUE)
+ COMPRESS_ARGS := --format gzip --pad-to 0x4000
+ CIC = 6102
+else
+ COMPRESS_ARGS := --format yaz0 --pad-to 0x800000 --fill-padding-bytes
+ CIC = 6105
+endif
+
$(ROM): $(ELF)
- $(ELF2ROM) -cic 6105 $< $@
+ $(ELF2ROM) -cic $(CIC) $< $@
$(ROMC): $(ROM) $(ELF) $(BUILD_DIR)/compress_ranges.txt
- $(PYTHON) tools/compress.py --in $(ROM) --out $@ --dmadata-start `./tools/dmadata_start.sh $(NM) $(ELF)` --compress `cat $(BUILD_DIR)/compress_ranges.txt` --threads $(N_THREADS)
- $(PYTHON) -m ipl3checksum sum --cic 6105 --update $@
+ $(PYTHON) tools/compress.py --in $(ROM) --out $@ --dmadata-start `./tools/dmadata_start.sh $(NM) $(ELF)` --compress `cat $(BUILD_DIR)/compress_ranges.txt` --threads $(N_THREADS) $(COMPRESS_ARGS)
+ $(PYTHON) -m ipl3checksum sum --cic $(CIC) --update $@
-$(ELF): $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(O_FILES) $(OVL_RELOC_FILES) $(LDSCRIPT) $(BUILD_DIR)/undefined_syms.txt \
+COM_PLUGIN := tools/com-plugin/common-plugin.so
+
+LDFLAGS := -T $(LDSCRIPT) -T $(BUILD_DIR)/linker_scripts/makerom.ld -T $(BUILD_DIR)/undefined_syms.txt --no-check-sections --accept-unknown-input-arch --emit-relocs -Map $(MAP)
+ifeq ($(PLATFORM),IQUE)
+ ifeq ($(NON_MATCHING),0)
+ LDFLAGS += -plugin $(COM_PLUGIN) -plugin-opt order=$(BASEROM_DIR)/bss-order.txt
+ $(ELF): $(BASEROM_DIR)/bss-order.txt
+ endif
+endif
+
+$(ELF): $(TEXTURE_FILES_OUT) $(ASSET_FILES_OUT) $(O_FILES) $(OVL_RELOC_FILES) $(LDSCRIPT) $(BUILD_DIR)/linker_scripts/makerom.ld $(BUILD_DIR)/undefined_syms.txt \
$(SAMPLEBANK_O_FILES) $(SOUNDFONT_O_FILES) $(SEQUENCE_O_FILES) \
$(BUILD_DIR)/assets/audio/sequence_font_table.o $(BUILD_DIR)/assets/audio/audiobank_padding.o
- $(LD) -T $(LDSCRIPT) -T $(BUILD_DIR)/undefined_syms.txt --no-check-sections --accept-unknown-input-arch --emit-relocs -Map $(MAP) -o $@
+ $(LD) $(LDFLAGS) -o $@
+
+$(BUILD_DIR)/linker_scripts/makerom.ld: linker_scripts/makerom.ld
+ $(CPP) -I include $(CPPFLAGS) $< > $@
## Order-only prerequisites
# These ensure e.g. the O_FILES are built before the OVL_RELOC_FILES.
@@ -630,10 +857,10 @@ $(O_FILES): | asset_files
.PHONY: o_files asset_files
-$(BUILD_DIR)/$(SPEC): $(SPEC)
- $(CPP) $(CPPFLAGS) $< | $(BUILD_DIR_REPLACE) > $@
+$(BUILD_DIR)/spec: $(SPEC) $(SPEC_INCLUDES)
+ $(CPP) $(CPPFLAGS) -MD -MF $@.d -MT $@ -I. $< | $(BUILD_DIR_REPLACE) > $@
-$(LDSCRIPT): $(BUILD_DIR)/$(SPEC)
+$(LDSCRIPT): $(BUILD_DIR)/spec
$(MKLDSCRIPT) $< $@
$(BUILD_DIR)/undefined_syms.txt: undefined_syms.txt
@@ -643,27 +870,32 @@ $(BUILD_DIR)/baserom/%.o: $(EXTRACTED_DIR)/baserom/%
$(OBJCOPY) -I binary -O elf32-big $< $@
$(BUILD_DIR)/data/%.o: data/%.s
- $(CPP) $(CPPFLAGS) -Iinclude $< | $(AS) $(ASFLAGS) -o $@
+ $(CPP) $(CPPFLAGS) -MD -MF $(@:.o=.d) -MT $@ -Iinclude $< | $(AS) $(ASFLAGS) -o $@
-$(BUILD_DIR)/assets/text/%.enc.jpn.h: assets/text/%.h $(EXTRACTED_DIR)/text/%.h assets/text/charmap.txt
- $(CPP) $(CPPFLAGS) -I$(EXTRACTED_DIR) $< | $(PYTHON) tools/msgenc.py --encoding jpn --charmap assets/text/charmap.txt - $@
+ifeq ($(PLATFORM),IQUE)
+ NES_CHARMAP := assets/text/charmap.chn.txt
+else
+ NES_CHARMAP := assets/text/charmap.nes.txt
+endif
-$(BUILD_DIR)/assets/text/%.enc.nes.h: assets/text/%.h $(EXTRACTED_DIR)/text/%.h assets/text/charmap.txt
- $(CPP) $(CPPFLAGS) -I$(EXTRACTED_DIR) $< | $(PYTHON) tools/msgenc.py --encoding nes --charmap assets/text/charmap.txt - $@
+$(BUILD_DIR)/assets/text/%.enc.nes.h: assets/text/%.h $(EXTRACTED_DIR)/text/%.h $(NES_CHARMAP)
+ $(CPP) $(CPPFLAGS) -I$(EXTRACTED_DIR) -MD -MF $(@:.o=.d) -MT $@ $< | $(PYTHON) tools/msgenc.py --encoding utf-8 --charmap $(NES_CHARMAP) - $@
-# Dependencies for files including message data headers
-# TODO remove when full header dependencies are used.
+$(BUILD_DIR)/assets/text/%.enc.jpn.h: assets/text/%.h $(EXTRACTED_DIR)/text/%.h assets/text/charmap.jpn.txt
+ $(CPP) $(CPPFLAGS) -I$(EXTRACTED_DIR) -MD -MF $(@:.o=.d) -MT $@ $< | $(PYTHON) tools/msgenc.py --encoding SHIFT-JIS --wchar --charmap assets/text/charmap.jpn.txt - $@
+
+# Dependencies for encoded message headers. These dependencies are not automatic as these headers are generated
+# as part of the build. A clean build must know to generate them before the relevant .d files are created.
$(BUILD_DIR)/assets/text/jpn_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.jpn.h
$(BUILD_DIR)/assets/text/nes_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.nes.h
$(BUILD_DIR)/assets/text/ger_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.nes.h
$(BUILD_DIR)/assets/text/fra_message_data_static.o: $(BUILD_DIR)/assets/text/message_data.enc.nes.h
$(BUILD_DIR)/assets/text/staff_message_data_static.o: $(BUILD_DIR)/assets/text/message_data_staff.enc.nes.h
-$(BUILD_DIR)/src/code/z_message.o: assets/text/message_data.h assets/text/message_data_staff.h
$(BUILD_DIR)/assets/text/%.o: assets/text/%.c
ifneq ($(COMPILER),gcc)
# Preprocess text with modern cpp for varargs macros
- $(CPP) -undef -D_LANGUAGE_C -D__sgi $(CPPFLAGS) $(INC) $< -o $(@:.o=.c)
+ $(CPP) -undef -D_LANGUAGE_C -D__sgi $(CPPFLAGS) -MD -MT $@ $(INC) $< -o $(@:.o=.c)
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $(@:.o=.c)
else
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
@@ -671,83 +903,103 @@ endif
$(OBJCOPY) -O binary --only-section .rodata $@ $@.bin
$(BUILD_DIR)/assets/%.o: assets/%.c
+ $(CC_CHECK) $< -o $@
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
- $(OBJCOPY) -O binary $@ $@.bin
+ $(OBJCOPY_CMD)
$(BUILD_DIR)/assets/%.o: $(EXTRACTED_DIR)/assets/%.c
+ $(CC_CHECK) $< -o $@
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
- $(OBJCOPY) -O binary $@ $@.bin
+ $(OBJCOPY_CMD)
+
+# Assemble the ROM header with GNU AS always
+$(BUILD_DIR)/src/makerom/rom_header.o: src/makerom/rom_header.s
+ifeq ($(COMPILER),ido)
+ $(CPP) $(CPPFLAGS) $(MIPS_BUILTIN_DEFS) $(INC) -MD -MF $(@:.o=.d) -MT $@ $< | $(AS) $(ASFLAGS) -o $@
+else
+ $(CCAS) -c $(CCASFLAGS) $(MIPS_VERSION) $(ASOPTFLAGS) -o $@ $<
+endif
+ $(OBJDUMP_CMD)
+
+$(BUILD_DIR)/src/makerom/ipl3.o: $(EXTRACTED_DIR)/incbin/ipl3
+ $(OBJCOPY) -I binary -O elf32-big --rename-section .data=.text $< $@
$(BUILD_DIR)/src/%.o: src/%.s
- $(CPP) $(CPPFLAGS) -Iinclude $< | $(AS) $(ASFLAGS) -o $@
+ifeq ($(COMPILER),ido)
+# For header dependencies
+ $(CPP) $(MIPS_BUILTIN_DEFS) $(CPPFLAGS) -x assembler-with-cpp $(INC) -MD -MF $(@:.o=.d) -MT $@ $< -o /dev/null
+ $(CCAS) -c $(CCASFLAGS) $(MIPS_VERSION) $(ASOPTFLAGS) -o $(@:.o=.tmp.o) $<
+# IDO generates bad symbol tables, fix the symbol table with strip..
+ $(STRIP) $(@:.o=.tmp.o) -N dummy-symbol-name
+# but strip doesn't know about file-relative offsets in .mdebug and doesn't relocate them, ld will
+# segfault unless .mdebug is removed
+ $(OBJCOPY) --remove-section .mdebug $(@:.o=.tmp.o) $@
+ @$(RM) $(@:.o=.tmp.o)
+else
+ $(CCAS) -c $(CCASFLAGS) $(MIPS_VERSION) $(ASOPTFLAGS) -o $@ $<
+endif
+ $(POSTPROCESS_OBJ) $@
+ $(OBJDUMP_CMD)
# Incremental link to move z_message and z_game_over data into rodata
$(BUILD_DIR)/src/code/z_message_z_game_over.o: $(BUILD_DIR)/src/code/z_message.o $(BUILD_DIR)/src/code/z_game_over.o
- $(LD) -r -T linker_scripts/data_with_rodata.ld -o $@ $^
+ $(LD) -r -G 0 -T linker_scripts/data_with_rodata.ld -o $@ $^
+ $(PYTHON) tools/patch_data_with_rodata_mdebug.py $@
-$(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt: $(BUILD_DIR)/$(SPEC)
+DEP_FILES += $(BUILD_DIR)/src/code/z_message.d $(BUILD_DIR)/src/code/z_game_over.d
+
+$(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt: $(BUILD_DIR)/spec
$(MKDMADATA) $< $(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt
# Dependencies for files that may include the dmadata header automatically generated from the spec file
$(BUILD_DIR)/src/boot/z_std_dma.o: $(BUILD_DIR)/dmadata_table_spec.h
$(BUILD_DIR)/src/dmadata/dmadata.o: $(BUILD_DIR)/dmadata_table_spec.h
-# Dependencies for files including from include/tables/
-# TODO remove when full header dependencies are used.
-$(BUILD_DIR)/src/code/graph.o: include/tables/gamestate_table.h
-$(BUILD_DIR)/src/code/object_table.o: include/tables/object_table.h
-$(BUILD_DIR)/src/code/z_actor.o: include/tables/actor_table.h # so uses of ACTOR_ID_MAX update when the table length changes
-$(BUILD_DIR)/src/code/z_actor_dlftbls.o: include/tables/actor_table.h
-$(BUILD_DIR)/src/code/z_effect_soft_sprite_dlftbls.o: include/tables/effect_ss_table.h
-$(BUILD_DIR)/src/code/z_game_dlftbls.o: include/tables/gamestate_table.h
-$(BUILD_DIR)/src/code/z_scene_table.o: include/tables/scene_table.h include/tables/entrance_table.h
-$(BUILD_DIR)/src/audio/general.o: $(SEQUENCE_TABLE) include/tables/sfx/*.h
-$(BUILD_DIR)/src/audio/sfx_params.o: include/tables/sfx/*.h
-
$(BUILD_DIR)/src/%.o: src/%.c
-ifneq ($(RUN_CC_CHECK),0)
- $(CC_CHECK) $<
-endif
- $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
- @$(OBJDUMP) $(OBJDUMP_FLAGS) $@ > $(@:.o=.s)
+ $(CC_CHECK) $< -o $@
+ $(PREPROCESS) $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
+ $(POSTPROCESS_OBJ) $@
+ $(OBJDUMP_CMD)
-$(BUILD_DIR)/src/libultra/libc/ll.o: src/libultra/libc/ll.c
-ifneq ($(RUN_CC_CHECK),0)
- $(CC_CHECK) $<
-endif
- $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
- $(PYTHON) tools/set_o32abi_bit.py $@
- @$(OBJDUMP) $(OBJDUMP_FLAGS) $@ > $(@:.o=.s)
+$(BUILD_DIR)/src/audio/game/session_init.o: src/audio/game/session_init.c $(BUILD_DIR)/assets/audio/soundfont_sizes.h $(BUILD_DIR)/assets/audio/sequence_sizes.h
+ $(CC_CHECK) $< -o $@
+ $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $(@:.o=.tmp) $<
+ $(LD) -r -T linker_scripts/data_with_rodata.ld -o $@ $(@:.o=.tmp)
+ $(PYTHON) tools/patch_data_with_rodata_mdebug.py $@
+ $(OBJDUMP_CMD)
-$(BUILD_DIR)/src/libultra/libc/llcvt.o: src/libultra/libc/llcvt.c
-ifneq ($(RUN_CC_CHECK),0)
- $(CC_CHECK) $<
+ifeq ($(PLATFORM),IQUE)
+ifneq ($(NON_MATCHING),1)
+$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/ovl_kaleido_scope_reloc.o: POSTPROCESS_OBJ := $(PYTHON) tools/patch_ique_kaleido_reloc.py
+endif
endif
- $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
- $(PYTHON) tools/set_o32abi_bit.py $@
- @$(OBJDUMP) $(OBJDUMP_FLAGS) $@ > $(@:.o=.s)
-$(BUILD_DIR)/src/overlays/%_reloc.o: $(BUILD_DIR)/$(SPEC)
+$(BUILD_DIR)/src/overlays/%_reloc.o: $(BUILD_DIR)/spec
$(FADO) $$(tools/reloc_prereq $< $(notdir $*)) -n $(notdir $*) -o $(@:.o=.s) -M $(@:.o=.d)
+ $(POSTPROCESS_OBJ) $(@:.o=.s)
$(AS) $(ASFLAGS) $(@:.o=.s) -o $@
-$(BUILD_DIR)/assets/%.inc.c: assets/%.png
- $(ZAPD) btex -eh -tt $(subst .,,$(suffix $*)) -i $< -o $@
+# Assets from assets/
-$(BUILD_DIR)/assets/%.inc.c: $(EXTRACTED_DIR)/assets/%.png
- $(ZAPD) btex -eh -tt $(subst .,,$(suffix $*)) -i $< -o $@
+$(BUILD_DIR)/assets/%.inc.c: assets/%.png
+ tools/assets/build_from_png/build_from_png $< $(dir $@) assets/$(dir $*) $(wildcard $(EXTRACTED_DIR)/assets/$(dir $*))
$(BUILD_DIR)/assets/%.bin.inc.c: assets/%.bin
- $(ZAPD) bblb -eh -i $< -o $@
-
-$(BUILD_DIR)/assets/%.bin.inc.c: $(EXTRACTED_DIR)/assets/%.bin
- $(ZAPD) bblb -eh -i $< -o $@
+ $(BIN2C) -t 1 $< $@
$(BUILD_DIR)/assets/%.jpg.inc.c: assets/%.jpg
- $(ZAPD) bren -eh -i $< -o $@
+ $(N64TEXCONV) JFIF "" $< $@
+
+# Assets from extracted/
+
+$(BUILD_DIR)/assets/%.inc.c: $(EXTRACTED_DIR)/assets/%.png
+ tools/assets/build_from_png/build_from_png $< $(dir $@) $(wildcard assets/$(dir $*)) $(EXTRACTED_DIR)/assets/$(dir $*)
+
+$(BUILD_DIR)/assets/%.bin.inc.c: $(EXTRACTED_DIR)/assets/%.bin
+ $(BIN2C) -t 1 $< $@
$(BUILD_DIR)/assets/%.jpg.inc.c: $(EXTRACTED_DIR)/assets/%.jpg
- $(ZAPD) bren -eh -i $< -o $@
+ $(N64TEXCONV) JFIF "" $< $@
# Audio
@@ -815,11 +1067,12 @@ $(BUILD_DIR)/assets/audio/soundfonts/%.xml: $(EXTRACTED_DIR)/assets/audio/soundf
$(BUILD_DIR)/assets/audio/soundfonts/%.c $(BUILD_DIR)/assets/audio/soundfonts/%.h $(BUILD_DIR)/assets/audio/soundfonts/%.name: $(BUILD_DIR)/assets/audio/soundfonts/%.xml | $(SAMPLEBANK_BUILD_XMLS) $(AIFC_FILES)
# This rule can be triggered for either the .c or .h file, so $@ may refer to either the .c or .h file. A simple
# substitution $(@:.c=.h) will fail ~50% of the time with -j. Instead, don't assume anything about the suffix of $@.
- $(SFC) $(SFCFLAGS) --makedepend $(basename $@).d $< $(basename $@).c $(basename $@).h $(basename $@).name
+ $(SFC) $(SFCFLAGS) --makedepend $(basename $@).c.d $< $(basename $@).c $(basename $@).h $(basename $@).name
-include $(SOUNDFONT_DEP_FILES)
$(BUILD_DIR)/assets/audio/soundfonts/%.o: $(BUILD_DIR)/assets/audio/soundfonts/%.c $(BUILD_DIR)/assets/audio/soundfonts/%.name
+ $(CPP) $(MIPS_BUILTIN_DEFS) $(CPPFLAGS) -x assembler-with-cpp $(INC) -I include/audio -MD -MF $(@:.o=.d) -MT $@ $< -o /dev/null
# compile c to unlinked object
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -I include/audio -o $(@:.o=.tmp) $<
# partial link
@@ -827,7 +1080,8 @@ $(BUILD_DIR)/assets/audio/soundfonts/%.o: $(BUILD_DIR)/assets/audio/soundfonts/%
# patch defined symbols to be ABS symbols so that they remain file-relative offsets forever
$(SFPATCH) $(@:.o=.tmp2) $(@:.o=.tmp2)
# write start and size symbols afterwards, filename != symbolic name so source symbolic name from the .name file written by sfc
- $(OBJCOPY) --add-symbol $$(cat $(<:.c=.name))_Start=.rodata:0,global --redefine-sym __LEN__=$$(cat $(<:.c=.name))_Size $(@:.o=.tmp2) $@
+# also write a .note.name section containing the symbolic name of the soundfont
+ $(OBJCOPY) --add-symbol $$(cat $(<:.c=.name) | tr -d '\0')_Start=.rodata:0,global --redefine-sym __LEN__=$$(cat $(<:.c=.name) | tr -d '\0')_Size --add-section .note.name=$(<:.c=.name) $(@:.o=.tmp2) $@
# cleanup temp files
@$(RM) $(@:.o=.tmp) $(@:.o=.tmp2)
ifeq ($(AUDIO_BUILD_DEBUG),1)
@@ -839,11 +1093,11 @@ endif
# then assemble the sequences...
$(BUILD_DIR)/assets/audio/sequences/%.o: assets/audio/sequences/%.seq include/audio/aseq.h $(SEQUENCE_TABLE) | $(SOUNDFONT_HEADERS)
- $(SEQ_CPP) $(SEQ_CPPFLAGS) $< -o $(@:.o=.s) -MMD -MT $@
+ $(SEQ_CPP) $(SEQ_CPPFLAGS) -MD -MT $@ $< -o $(@:.o=.s)
$(AS) $(ASFLAGS) -I $(BUILD_DIR)/assets/audio/soundfonts -I include/audio -I $(dir $<) $(@:.o=.s) -o $@
$(BUILD_DIR)/assets/audio/sequences/%.o: $(EXTRACTED_DIR)/assets/audio/sequences/%.seq include/audio/aseq.h $(SEQUENCE_TABLE) | $(SOUNDFONT_HEADERS)
- $(SEQ_CPP) $(SEQ_CPPFLAGS) $< -o $(@:.o=.s) -MMD -MT $@
+ $(SEQ_CPP) $(SEQ_CPPFLAGS) -MD -MT $@ $< -o $(@:.o=.s)
$(AS) $(ASFLAGS) -I $(BUILD_DIR)/assets/audio/soundfonts -I include/audio -I $(dir $<) $(@:.o=.s) -o $@
ifeq ($(AUDIO_BUILD_DEBUG),1)
$(OBJCOPY) -O binary -j.data $@ $(@:.o=.aseq)
@@ -877,16 +1131,23 @@ $(BUILD_DIR)/src/audio/tables/sequence_table.o: src/audio/tables/sequence_table.
$(BUILD_DIR)/src/audio/tables/sequence_table.o: CFLAGS += -I include/tables
$(BUILD_DIR)/src/audio/tables/%.o: src/audio/tables/%.c
-ifneq ($(RUN_CC_CHECK),0)
- $(CC_CHECK) $<
-endif
+ $(CC_CHECK) $< -o $@
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $(@:.o=.tmp) $<
$(LD) -r -T linker_scripts/data_with_rodata.ld $(@:.o=.tmp) -o $@
+ $(PYTHON) tools/patch_data_with_rodata_mdebug.py $@
@$(RM) $(@:.o=.tmp)
$(BUILD_DIR)/assets/audio/sequence_font_table.o: $(BUILD_DIR)/assets/audio/sequence_font_table.s
$(AS) $(ASFLAGS) $< -o $@
+# make headers with file sizes and amounts
+
+$(BUILD_DIR)/assets/audio/soundfont_sizes.h: $(SOUNDFONT_O_FILES)
+ $(AFILE_SIZES) $@ NUM_SOUNDFONTS SOUNDFONT_SIZES .rodata $^
+
+$(BUILD_DIR)/assets/audio/sequence_sizes.h: $(SEQUENCE_O_FILES)
+ $(AFILE_SIZES) $@ NUM_SEQUENCES SEQUENCE_SIZES .data $^
+
# Extra audiobank padding that doesn't belong to any soundfont file
$(BUILD_DIR)/assets/audio/audiobank_padding.o:
echo ".section .rodata; .fill 0x20" | $(AS) $(ASFLAGS) -o $@
diff --git a/README.md b/README.md
index b7e191a0d8..4ba7d2c3d8 100644
--- a/README.md
+++ b/README.md
@@ -25,11 +25,26 @@ the codebase can drastically change at any time. Also note that some parts of th
This is a WIP **decompilation** of ***The Legend of Zelda: Ocarina of Time***. The purpose of the project is to recreate a source code base for the game from scratch, using information found inside the game along with static and/or dynamic analysis. **It is not producing a PC port.** For more information you can get in touch with the team on our [Discord server][discord].
-The only build currently supported is Master Quest (Debug), but other versions are planned to be supported.
+It builds the following versions:
-It builds the following ROM:
+| Name | Build timestamp | Description | MD5 hash of input ROM(s) |
+|--------------|-------------------|-------------------------------------------|--------------------------|
+| ntsc-1.0 | 98-10-21 04:56:31 | NTSC 1.0 (Japan/US) | `9f04c8e68534b870f707c247fa4b50fc`
`5bd1fe107bf8106b2ab6650abecd54d6` |
+| ntsc-1.1 | 98-10-26 10:58:45 | NTSC 1.1 (Japan/US) | `1bf5f42b98c3e97948f01155f12e2d88`
`721fdcc6f5f34be55c43a807f2a16af4` |
+| pal-1.0 | 98-11-10 14:34:22 | PAL 1.0 (Europe) | `e040de91a74b61e3201db0e2323f768a` |
+| ntsc-1.2 | 98-11-12 18:17:03 | NTSC 1.2 (Japan/US) | `2258052847bdd056c8406a9ef6427f13`
`57a9719ad547c516342e1a15d5c28c3d` |
+| pal-1.1 | 98-11-18 17:36:49 | PAL 1.1 (Europe) | `d714580dd74c2c033f5e1b6dc0aeac77` |
+| gc-jp | 02-10-29 23:49:53 | GameCube Japan | `33fb7852c180b18ea0b9620b630f413f` |
+| gc-jp-mq | 02-10-30 00:15:15 | GameCube Japan Master Quest | `69895c5c78442260f6eafb2506dc482a` |
+| gc-us | 02-12-19 13:28:09 | GameCube US | `cd09029edcfb7c097ac01986a0f83d3f` |
+| gc-us-mq | 02-12-19 14:05:42 | GameCube US Master Quest | `da35577fe54579f6a266931cc75f512d` |
+| gc-eu-mq-dbg | 03-02-21 00:16:31 | GameCube Europe/PAL Master Quest Debug | `75e344f41c26ec2ec5ad92caa9e25629`
`8ca71e87de4ce5e9f6ec916202a623e9`
`f751d1a097764e2337b1ac9ba1e27699`
`dde376d47187b931820d5b2957cded14` |
+| gc-eu | 03-02-21 20:12:23 | GameCube Europe/PAL | `2c27b4e000e85fd78dbca551f1b1c965` |
+| gc-eu-mq | 03-02-21 20:37:19 | GameCube Europe/PAL Master Quest | `1618403427e4344a57833043db5ce3c3` |
+| 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` |
-* oot-gc-eu-mq-dbg.z64 `md5: 75e344f41c26ec2ec5ad92caa9e25629`
+The default version is `gc-eu-mq-dbg`, i.e. the GameCube Europe/PAL Master Quest Debug ROM.
**Note: This repository does not include any of the assets necessary to build the ROM. A prior copy of the game is required to extract the needed assets.**
@@ -67,6 +82,7 @@ The build process has the following package requirements:
* git
* build-essential
* binutils-mips-linux-gnu
+* curl
* python3
* python3-pip
* python3-venv
@@ -77,7 +93,7 @@ Under Debian / Ubuntu (which we recommend using), you can install them with the
```bash
sudo apt-get update
-sudo apt-get install git build-essential binutils-mips-linux-gnu python3 python3-pip python3-venv libpng-dev libxml2-dev
+sudo apt-get install git build-essential binutils-mips-linux-gnu curl python3 python3-pip python3-venv libpng-dev libxml2-dev
```
If you are using GCC as the compiler for Ocarina of Time, you will also need:
@@ -151,6 +167,11 @@ This means that the built ROM isn't the same as the base one, so something went
Both of these have the disadvantage that the ordering of the terminal output is scrambled, so for debugging it is best to stick to one thread (i.e. not pass `-j` or `-jN`).
+## Changing build options
+
+The project Makefile is fairly configurable and can be used to build other versions of the game or prepare the repo for modding.
+See the options outlined at the top of the Makefile for more information.
+
## Contributing
All contributions are welcome. This is a group effort, and even small contributions can make a difference.
diff --git a/assets/audio/sequences/seq_0.prg.seq b/assets/audio/sequences/seq_0.prg.seq
index 370dc9b3c6..b5f8a2906d 100644
--- a/assets/audio/sequences/seq_0.prg.seq
+++ b/assets/audio/sequences/seq_0.prg.seq
@@ -1,6 +1,7 @@
#include "aseq.h"
#include "Soundfont_1.h"
#include "Soundfont_0.h"
+#include "versions.h"
#define IO_PORT_SFX_INDEX_LOBITS IO_PORT_4
#define IO_PORT_SFX_INDEX_HIBITS IO_PORT_5
@@ -1301,7 +1302,7 @@ CHAN_08EC:
/* 0x08EE [0xC7 0x02 0x09 0x04 ] */ stseq 2, LAYER_0903 + STSEQ_NOTEDV_DELAY_HI
/* 0x08F2 [0xC7 0x02 0x08 0xFD ] */ stseq 2, CHAN_08FC + STSEQ_LDI_IMM
/* 0x08F6 [0xB8 0x0C ] */ rand 12
-/* 0x08F8 [0xC7 0x5C 0x09 0x03 ] */ stseq (NOTEDV_OPCODE | PITCH_DF3), LAYER_0903 + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x08F8 [0xC7 0x5C 0x09 0x03 ] */ stseq (ASEQ_OP_LAYER_NOTEDV | PITCH_DF3), LAYER_0903 + STSEQ_NOTEDV_OPCODE_PITCH
CHAN_08FC:
/* 0x08FC [0xCC 0x01 ] */ ldi 1
/* 0x08FE [0xFC 0x00 0x48 ] */ call CHAN_0048
@@ -1384,13 +1385,13 @@ LAYER_0947:
.layer LAYER_0973
/* 0x0973 [0xC6 0x0F ] */ instr SF0_INST_15
/* 0x0975 [0xC7 0x81 0x2B 0xFF ] */ portamento 0x81, PITCH_E4, 255
-/* 0x0979 [0x5F 0x80 0xB4 0x69 ] */ notedv PITCH_E3, 180, 105
+/* 0x0979 [0x5F 0x80 0xB4 0x69 ] */ notedv PITCH_E3, FRAMERATE_CONST(180, 216), 105
/* 0x097D [0xFF ] */ end
.layer LAYER_097E
/* 0x097E [0xC6 0x50 ] */ instr SF0_INST_80
/* 0x0980 [0xC7 0x81 0x14 0xFF ] */ portamento 0x81, PITCH_F2, 255
-/* 0x0984 [0x4E 0x80 0xB4 0x58 ] */ notedv PITCH_B1, 180, 88
+/* 0x0984 [0x4E 0x80 0xB4 0x58 ] */ notedv PITCH_B1, FRAMERATE_CONST(180, 216), 88
/* 0x0988 [0xFF ] */ end
.channel CHAN_0989
@@ -1528,23 +1529,23 @@ LAYER_0992:
/* 0x0A4E [0xCF 0xDD ] */ releaserate 221
/* 0x0A50 [0xC4 ] */ legato
/* 0x0A51 [0xC7 0x85 0x00 0xFF ] */ portamento 0x85, PITCH_A0, 255
-/* 0x0A55 [0x58 0x80 0xFA 0x4A ] */ notedv PITCH_A2, 250, 74
-/* 0x0A59 [0x70 0x64 0x4A ] */ notedv PITCH_A4, 100, 74
+/* 0x0A55 [0x58 0x80 0xFA 0x4A ] */ notedv PITCH_A2, FRAMERATE_CONST(250, 300), 74
+/* 0x0A59 [0x70 0x64 0x4A ] */ notedv PITCH_A4, FRAMERATE_CONST(100, 120), 74
/* 0x0A5C [0xFF ] */ end
.layer LAYER_0A5D
/* 0x0A5D [0xC6 0x2F ] */ instr SF0_INST_47
/* 0x0A5F [0xCF 0xDD ] */ releaserate 221
-/* 0x0A61 [0x64 0x80 0x1E 0x64 ] */ noteldv PITCH_A3, 30, 100
+/* 0x0A61 [0x64 0x80 0x1E 0x64 ] */ noteldv PITCH_A3, FRAMERATE_CONST(30, 36), 100
/* 0x0A65 [0xC7 0x81 0x00 0xFF ] */ portamento 0x81, PITCH_A0, 255
-/* 0x0A69 [0x64 0x81 0x40 0x55 ] */ notedv PITCH_A3, 320, 85
+/* 0x0A69 [0x64 0x81 0x40 0x55 ] */ notedv PITCH_A3, FRAMERATE_CONST(320, 384), 85
/* 0x0A6D [0xFF ] */ end
.layer LAYER_0A6E
/* 0x0A6E [0xC6 0x45 ] */ instr SF0_INST_69
/* 0x0A70 [0xCF 0xDD ] */ releaserate 221
/* 0x0A72 [0xC7 0x81 0x00 0xFF ] */ portamento 0x81, PITCH_A0, 255
-/* 0x0A76 [0x70 0x81 0x5E 0x50 ] */ notedv PITCH_A4, 350, 80
+/* 0x0A76 [0x70 0x81 0x5E 0x50 ] */ notedv PITCH_A4, FRAMERATE_CONST(350, 420), 80
/* 0x0A7A [0xFF ] */ end
.channel CHAN_0A7B
@@ -1557,8 +1558,8 @@ LAYER_0992:
/* 0x0A85 [0xFC 0x0A 0x95 ] */ call LAYER_0A95
/* 0x0A88 [0xC4 ] */ legato
/* 0x0A89 [0xC7 0x85 0x3E 0xFF ] */ portamento 0x85, PITCH_B5, 255
-/* 0x0A8D [0x67 0x3C 0x55 ] */ notedv PITCH_C4, 60, 85
-/* 0x0A90 [0x78 0x81 0xF4 0x55 ] */ notedv PITCH_F5, 500, 85
+/* 0x0A8D [0x67 0x3C 0x55 ] */ notedv PITCH_C4, FRAMERATE_CONST(60, 66), 85
+/* 0x0A90 [0x78 0x81 0xF4 0x55 ] */ notedv PITCH_F5, FRAMERATE_CONST(500, 550), 85
/* 0x0A94 [0xFF ] */ end
.layer LAYER_0A95
@@ -1572,14 +1573,14 @@ LAYER_0992:
/* 0x0AA2 [0xC6 0x0D ] */ instr SF0_INST_13
/* 0x0AA4 [0xC2 0x18 ] */ transpose 24
/* 0x0AA6 [0xCB 0x66 0xF4 0xC8 ] */ env ENVELOPE_66F4, 200
-/* 0x0AAA [0x78 0x82 0x30 0x28 ] */ notedv PITCH_F5, 560, 40
+/* 0x0AAA [0x78 0x82 0x30 0x28 ] */ notedv PITCH_F5, FRAMERATE_CONST(560, 616), 40
/* 0x0AAE [0xFF ] */ end
.layer LAYER_0AAF
/* 0x0AAF [0xC6 0x44 ] */ instr SF0_INST_68
/* 0x0AB1 [0xC2 0x0C ] */ transpose 12
/* 0x0AB3 [0xCB 0x67 0xD8 0xC8 ] */ env ENVELOPE_67D8, 200
-/* 0x0AB7 [0x78 0x82 0x30 0x46 ] */ notedv PITCH_F5, 560, 70
+/* 0x0AB7 [0x78 0x82 0x30 0x46 ] */ notedv PITCH_F5, FRAMERATE_CONST(560, 616), 70
/* 0x0ABB [0xFF ] */ end
.channel CHAN_0ABC
@@ -1615,14 +1616,14 @@ CHAN_0ADA:
/* 0x0AF2 [0xC2 0x24 ] */ transpose 36
/* 0x0AF4 [0xC7 0x83 0x2C 0x7F ] */ portamento 0x83, PITCH_F4, 127
LAYER_0AF8:
-/* 0x0AF8 [0x70 0x60 0x40 ] */ notedv PITCH_A4, 96, 64
+/* 0x0AF8 [0x70 0x60 0x40 ] */ notedv PITCH_A4, FRAMERATE_CONST(96, 115), 64
/* 0x0AFB [0xF4 0xFB ] */ rjump LAYER_0AF8
.layer LAYER_0AFD
/* 0x0AFD [0xC2 0x0C ] */ transpose 12
/* 0x0AFF [0xC7 0x83 0x2C 0x7F ] */ portamento 0x83, PITCH_F4, 127
LAYER_0B03:
-/* 0x0B03 [0x70 0x60 0x40 ] */ notedv PITCH_A4, 96, 64
+/* 0x0B03 [0x70 0x60 0x40 ] */ notedv PITCH_A4, FRAMERATE_CONST(96, 115), 64
/* 0x0B06 [0xF4 0xFB ] */ rjump LAYER_0B03
.channel CHAN_0B08
@@ -2040,7 +2041,7 @@ LAYER_0B74:
.layer LAYER_0D74
/* 0x0D74 [0xC6 0x2E ] */ instr SF0_INST_46
/* 0x0D76 [0xC7 0x81 0x27 0x2D ] */ portamento 0x81, PITCH_C4, 45
-/* 0x0D7A [0x6B 0x81 0x18 0x3C ] */ notedv PITCH_E4, 280, 60
+/* 0x0D7A [0x6B 0x81 0x18 0x3C ] */ notedv PITCH_E4, FRAMERATE_CONST(280, 336), 60
/* 0x0D7E [0xFF ] */ end
.channel CHAN_0D7F
@@ -2084,7 +2085,7 @@ CHAN_0DAF:
/* 0x0DBE [0xCB 0x66 0x74 0xFB ] */ env ENVELOPE_6674, 251
/* 0x0DC2 [0xC4 ] */ legato
LAYER_0DC3:
-/* 0x0DC3 [0x67 0x81 0xF4 0x23 ] */ notedv PITCH_C4, 500, 35
+/* 0x0DC3 [0x67 0x81 0xF4 0x23 ] */ notedv PITCH_C4, FRAMERATE_CONST(500, 600), 35
/* 0x0DC7 [0xF4 0xFA ] */ rjump LAYER_0DC3
.channel CHAN_0DC9
@@ -2101,7 +2102,7 @@ LAYER_0DC3:
/* 0x0DD7 [0xC2 0x1E ] */ transpose 30
/* 0x0DD9 [0xC4 ] */ legato
/* 0x0DDA [0xC7 0x81 0x2B 0x40 ] */ portamento 0x81, PITCH_E4, 64
-/* 0x0DDE [0x69 0x80 0xAA 0x50 ] */ notedv PITCH_D4, 170, 80
+/* 0x0DDE [0x69 0x80 0xAA 0x50 ] */ notedv PITCH_D4, FRAMERATE_CONST(170, 204), 80
/* 0x0DE2 [0xFF ] */ end
.channel CHAN_0DE3
@@ -2407,8 +2408,12 @@ CHAN_0EDC:
.layer LAYER_1029
/* 0x1029 [0xC6 0x2F ] */ instr SF0_INST_47
+#if OOT_VERSION < PAL_1_0
+/* 0x102B [0xCB 0x66 0x4C 0xF0 ] */ env ENVELOPE_664C, 240
+#else
/* 0x102B [0xCB 0x66 0x4C 0xFF ] */ env ENVELOPE_664C, 255
-/* 0x102F [0x7E 0x0C 0x6C ] */ notedv PITCH_B5, 12, 108
+#endif
+/* 0x102F [0x7E 0x0C 0x6C ] */ notedv PITCH_B5, FRAMERATE_CONST(12, 15), 108
/* 0x1032 [0xFF ] */ end
.layer LAYER_1033
@@ -2760,7 +2765,7 @@ LAYER_1254:
.layer LAYER_1266
/* 0x1266 [0xC6 0x27 ] */ instr SF0_INST_39
/* 0x1268 [0xC7 0x81 0x33 0x2C ] */ portamento 0x81, PITCH_C5, 44
-/* 0x126C [0x60 0x80 0x8C 0x5A ] */ notedv PITCH_F3, 140, 90
+/* 0x126C [0x60 0x80 0x8C 0x5A ] */ notedv PITCH_F3, FRAMERATE_CONST(140, 168), 90
/* 0x1270 [0xFF ] */ end
.channel CHAN_1271
@@ -2931,9 +2936,9 @@ CHAN_135C:
/* 0x1381 [0xC6 0x51 ] */ instr SF0_INST_81
/* 0x1383 [0xCB 0x65 0xD8 0xFB ] */ env ENVELOPE_65D8, 251
/* 0x1387 [0xC7 0x81 0x14 0xFF ] */ portamento 0x81, PITCH_F2, 255
-/* 0x138B [0x57 0x08 0x55 ] */ notedv PITCH_AF2, 8, 85
+/* 0x138B [0x57 0x08 0x55 ] */ notedv PITCH_AF2, FRAMERATE_CONST(8, 10), 85
/* 0x138E [0xC7 0x81 0x1B 0xFF ] */ portamento 0x81, PITCH_C3, 255
-/* 0x1392 [0x4F 0x60 0x55 ] */ notedv PITCH_C2, 96, 85
+/* 0x1392 [0x4F 0x60 0x55 ] */ notedv PITCH_C2, FRAMERATE_CONST(96, 115), 85
/* 0x1395 [0xFF ] */ end
.channel CHAN_1396
@@ -2960,8 +2965,8 @@ LAYER_13B3:
/* 0x13B5 [0xCB 0x66 0x38 0xFB ] */ env ENVELOPE_6638, 251
/* 0x13B9 [0xC4 ] */ legato
/* 0x13BA [0xC7 0x85 0x2C 0xFF ] */ portamento 0x85, PITCH_F4, 255
-/* 0x13BE [0x78 0x10 0x44 ] */ notedv PITCH_F5, 16, 68
-/* 0x13C1 [0x45 0x2C 0x44 ] */ notedv PITCH_D1, 44, 68
+/* 0x13BE [0x78 0x10 0x44 ] */ notedv PITCH_F5, FRAMERATE_CONST(16, 19), 68
+/* 0x13C1 [0x45 0x2C 0x44 ] */ notedv PITCH_D1, FRAMERATE_CONST(44, 53), 68
/* 0x13C4 [0xFF ] */ end
.layer LAYER_13C5
@@ -3017,10 +3022,10 @@ LAYER_140B:
/* 0x1411 [0xCC 0x00 ] */ ldi 0
/* 0x1413 [0x76 ] */ stio IO_PORT_6
CHAN_1414:
-/* 0x1414 [0xCB 0x14 0x2D ] */ ldseq UNK_142D
+/* 0x1414 [0xCB 0x14 0x2D ] */ ldseq ARRAY_142D
/* 0x1417 [0xC7 0x00 0x14 0x5B ] */ stseq 0, LAYER_145A + STSEQ_TRANSPOSITION
/* 0x141B [0x66 ] */ ldio IO_PORT_6
-/* 0x141C [0xCB 0x14 0x31 ] */ ldseq UNK_1431
+/* 0x141C [0xCB 0x14 0x31 ] */ ldseq ARRAY_1431
/* 0x141F [0xC7 0x00 0x14 0x56 ] */ stseq 0, LAYER_1455 + STSEQ_NOTEDV_DELAY_HI
/* 0x1423 [0xCC 0x18 ] */ ldi 24
/* 0x1425 [0x71 ] */ stio IO_PORT_1
@@ -3028,11 +3033,15 @@ CHAN_1414:
/* 0x1429 [0x89 0x14 0x35 ] */ ldlayer 1, LAYER_1435
/* 0x142C [0xFF ] */ end
-UNK_142D:
- .byte 0x00, 0x04, 0x08, 0x00
+.array ARRAY_142D
+ .byte 0, 4, 8, 0
-UNK_1431:
- .byte 0x60, 0x30, 0x18, 0x60
+.array ARRAY_1431
+#if !OOT_PAL_N64
+ .byte 96, 48, 24, 96
+#else
+ .byte 115, 58, 29, 96
+#endif
.layer LAYER_1435
/* 0x1435 [0xFC 0x14 0x5A ] */ call LAYER_145A
@@ -3254,24 +3263,24 @@ CHAN_14CD:
.layer LAYER_158A
/* 0x158A [0xC6 0x2E ] */ instr SF0_INST_46
/* 0x158C [0xC7 0x81 0x30 0xE7 ] */ portamento 0x81, PITCH_A4, 231
-/* 0x1590 [0x58 0x18 0x4B ] */ notedv PITCH_A2, 24, 75
+/* 0x1590 [0x58 0x18 0x4B ] */ notedv PITCH_A2, FRAMERATE_CONST(24, 48), 75
/* 0x1593 [0xC6 0x4D ] */ instr SF0_INST_77
/* 0x1595 [0xCB 0x67 0x40 0xE7 ] */ env ENVELOPE_6740, 231
/* 0x1599 [0xC7 0x81 0x26 0xFF ] */ portamento 0x81, PITCH_B3, 255
-/* 0x159D [0x5A 0x80 0xE8 0x69 ] */ notedv PITCH_B2, 232, 105
+/* 0x159D [0x5A 0x80 0xE8 0x69 ] */ notedv PITCH_B2, FRAMERATE_CONST(232, 278), 105
/* 0x15A1 [0xFF ] */ end
.layer LAYER_15A2
/* 0x15A2 [0xC6 0x11 ] */ instr SF0_INST_17
/* 0x15A4 [0xCB 0x67 0xCC 0xE7 ] */ env ENVELOPE_67CC, 231
/* 0x15A8 [0xC7 0x81 0x0E 0xFF ] */ portamento 0x81, PITCH_B1, 255
-/* 0x15AC [0x5A 0x80 0xE8 0x5F ] */ notedv PITCH_B2, 232, 95
+/* 0x15AC [0x5A 0x80 0xE8 0x5F ] */ notedv PITCH_B2, FRAMERATE_CONST(232, 278), 95
/* 0x15B0 [0xFF ] */ end
.layer LAYER_15B1
/* 0x15B1 [0xC6 0x2F ] */ instr SF0_INST_47
/* 0x15B3 [0xCB 0x66 0x10 0xE7 ] */ env ENVELOPE_6610, 231
-/* 0x15B7 [0x64 0x48 0x69 ] */ notedv PITCH_A3, 72, 105
+/* 0x15B7 [0x64 0x48 0x69 ] */ notedv PITCH_A3, FRAMERATE_CONST(72, 86), 105
/* 0x15BA [0xFF ] */ end
.channel CHAN_15BB
@@ -3285,7 +3294,7 @@ CHAN_14CD:
.layer LAYER_15C7
/* 0x15C7 [0xC6 0x2F ] */ instr SF0_INST_47
/* 0x15C9 [0xCF 0xDD ] */ releaserate 221
-/* 0x15CB [0x72 0x80 0xC8 0x55 ] */ notedv PITCH_B4, 200, 85
+/* 0x15CB [0x72 0x80 0xC8 0x55 ] */ notedv PITCH_B4, FRAMERATE_CONST(200, 240), 85
/* 0x15CF [0xFF ] */ end
.channel CHAN_15D0
@@ -3920,8 +3929,8 @@ LAYER_1B5C:
/* 0x1B81 [0xC6 0x42 ] */ instr SF0_INST_66
/* 0x1B83 [0xCB 0x65 0xFC 0xFA ] */ env ENVELOPE_65FC, 250
/* 0x1B87 [0xC7 0x83 0x20 0xFF ] */ portamento 0x83, PITCH_F3, 255
-/* 0x1B8B [0x1D 0x18 0x64 0x7F ] */ notedvg PITCH_D3, 24, 100, 127
-/* 0x1B8F [0x67 0x48 0x64 ] */ notedv PITCH_C4, 72, 100
+/* 0x1B8B [0x1D 0x18 0x64 0x7F ] */ notedvg PITCH_D3, FRAMERATE_CONST(24, 28), 100, 127
+/* 0x1B8F [0x67 0x48 0x64 ] */ notedv PITCH_C4, FRAMERATE_CONST(72, 86), 100
/* 0x1B92 [0xFF ] */ end
.channel CHAN_1B93
@@ -3934,15 +3943,15 @@ LAYER_1B5C:
CHAN_1BA1:
/* 0x1BA1 [0x66 ] */ ldio IO_PORT_6
/* 0x1BA2 [0xC9 0x03 ] */ and 3
-/* 0x1BA4 [0xCB 0x1B 0xB6 ] */ ldseq UNK_1BB6
+/* 0x1BA4 [0xCB 0x1B 0xB6 ] */ ldseq ARRAY_1BB6
/* 0x1BA7 [0xC7 0x00 0x1B 0xE7 ] */ stseq 0, LAYER_1BE6 + STSEQ_LDELAY
/* 0x1BAB [0xC7 0x08 0x1B 0xB0 ] */ stseq 8, STSEQ_HERE + STSEQ_LDI_IMM
/* 0x1BAF [0xCC 0x30 ] */ ldi 48
/* 0x1BB1 [0xFC 0x00 0x48 ] */ call CHAN_0048
/* 0x1BB4 [0xF4 0xEB ] */ rjump CHAN_1BA1
-UNK_1BB6:
- .byte 0x20, 0x0E, 0x05, 0x20
+.array ARRAY_1BB6
+ .byte 32, 14, 5, 32
.layer LAYER_1BBA
/* 0x1BBA [0xC2 0x30 ] */ transpose 48
@@ -4022,16 +4031,16 @@ CHAN_1C3B:
/* 0x1C3B [0x63 ] */ ldio IO_PORT_3
/* 0x1C3C [0xC9 0xF0 ] */ and 240
/* 0x1C3E [0xF3 0x0E ] */ rbeqz CHAN_1C4E
-/* 0x1C40 [0xCE 0x00 0x00 ] */ ldptr SEQ_0000
+/* 0x1C40 [0xCE 0x00 0x00 ] */ ldptri 0
/* 0x1C43 [0xCF 0x1C 0x80 ] */ stptrtoseq ENVELOPE_1C7A + STSEQ_ENVELOPE_POINT(3)
-/* 0x1C46 [0xCE 0x7F 0xBC ] */ ldptr SEQ_0_END + 0x1538
+/* 0x1C46 [0xCE 0x7F 0xBC ] */ ldptri 32700
/* 0x1C49 [0xCF 0x1C 0x8C ] */ stptrtoseq ENVELOPE_1C86 + STSEQ_ENVELOPE_POINT(3)
/* 0x1C4C [0xF4 0x0C ] */ rjump CHAN_1C5A
CHAN_1C4E:
-/* 0x1C4E [0xCE 0x00 0x00 ] */ ldptr SEQ_0000
+/* 0x1C4E [0xCE 0x00 0x00 ] */ ldptri 0
/* 0x1C51 [0xCF 0x1C 0x8C ] */ stptrtoseq ENVELOPE_1C86 + STSEQ_ENVELOPE_POINT(3)
-/* 0x1C54 [0xCE 0x7F 0xBC ] */ ldptr SEQ_0_END + 0x1538
+/* 0x1C54 [0xCE 0x7F 0xBC ] */ ldptri 32700
/* 0x1C57 [0xCF 0x1C 0x80 ] */ stptrtoseq ENVELOPE_1C7A + STSEQ_ENVELOPE_POINT(3)
CHAN_1C5A:
/* 0x1C5A [0xCC 0x01 ] */ ldi 1
@@ -4091,20 +4100,20 @@ LAYER_1C73:
/* 0x1CBB [0xC4 ] */ legato
/* 0x1CBC [0xCF 0xFB ] */ releaserate 251
/* 0x1CBE [0xC7 0x85 0x35 0xFF ] */ portamento 0x85, PITCH_D5, 255
-/* 0x1CC2 [0x75 0x81 0x90 0x5A ] */ notedv PITCH_D5, 400, 90
-/* 0x1CC6 [0x77 0x81 0xF4 0x5A ] */ notedv PITCH_E5, 500, 90
+/* 0x1CC2 [0x75 0x81 0x90 0x5A ] */ notedv PITCH_D5, FRAMERATE_CONST(400, 480), 90
+/* 0x1CC6 [0x77 0x81 0xF4 0x5A ] */ notedv PITCH_E5, FRAMERATE_CONST(500, 600), 90
/* 0x1CCA [0xFF ] */ end
.layer LAYER_1CCB
/* 0x1CCB [0xCA 0x40 ] */ notepan 64
/* 0x1CCD [0xC2 0x0C ] */ transpose 12
/* 0x1CCF [0x69 0x18 0x4B ] */ notedv PITCH_D4, 24, 75
-/* 0x1CD2 [0x75 0x81 0x90 0x4B ] */ notedv PITCH_D5, 400, 75
+/* 0x1CD2 [0x75 0x81 0x90 0x4B ] */ notedv PITCH_D5, FRAMERATE_CONST(400, 480), 75
/* 0x1CD6 [0xC2 0x00 ] */ transpose 0
/* 0x1CD8 [0xC6 0x40 ] */ instr SF0_INST_64
/* 0x1CDA [0xCB 0x67 0x78 0xFB ] */ env ENVELOPE_6778, 251
/* 0x1CDE [0xC7 0x81 0x39 0xFF ] */ portamento 0x81, PITCH_GF5, 255
-/* 0x1CE2 [0x7D 0x81 0xF4 0x32 ] */ notedv PITCH_BF5, 500, 50
+/* 0x1CE2 [0x7D 0x81 0xF4 0x32 ] */ notedv PITCH_BF5, FRAMERATE_CONST(500, 600), 50
/* 0x1CE6 [0xFF ] */ end
.layer LAYER_1CE7
@@ -4114,8 +4123,8 @@ LAYER_1C73:
/* 0x1CEE [0xC4 ] */ legato
/* 0x1CEF [0xCF 0xFB ] */ releaserate 251
/* 0x1CF1 [0xC7 0x85 0x31 0xFF ] */ portamento 0x85, PITCH_BF4, 255
-/* 0x1CF5 [0x71 0x81 0x90 0x5A ] */ notedv PITCH_BF4, 400, 90
-/* 0x1CF9 [0x73 0x81 0xF4 0x5A ] */ notedv PITCH_C5, 500, 90
+/* 0x1CF5 [0x71 0x81 0x90 0x5A ] */ notedv PITCH_BF4, FRAMERATE_CONST(400, 480), 90
+/* 0x1CF9 [0x73 0x81 0xF4 0x5A ] */ notedv PITCH_C5, FRAMERATE_CONST(500, 600), 90
/* 0x1CFD [0xFF ] */ end
.channel CHAN_1CFE
@@ -4614,14 +4623,14 @@ LAYER_1FCB:
/* 0x203E [0xCB 0x66 0x94 0xE7 ] */ env ENVELOPE_6694, 231
/* 0x2042 [0xC4 ] */ legato
/* 0x2043 [0xC7 0x85 0x03 0xFF ] */ portamento 0x85, PITCH_C1, 255
-/* 0x2047 [0x54 0x60 0x64 ] */ notedv PITCH_F2, 96, 100
-/* 0x204A [0x67 0x80 0x96 0x64 ] */ notedv PITCH_C4, 150, 100
+/* 0x2047 [0x54 0x60 0x64 ] */ notedv PITCH_F2, FRAMERATE_CONST(96, 115), 100
+/* 0x204A [0x67 0x80 0x96 0x64 ] */ notedv PITCH_C4, FRAMERATE_CONST(150, 180), 100
/* 0x204E [0xC5 ] */ nolegato
/* 0x204F [0xC4 ] */ legato
/* 0x2050 [0xC8 ] */ noportamento
/* 0x2051 [0xCB 0x66 0xEC 0xE7 ] */ env ENVELOPE_66EC, 231
/* 0x2055 [0xC7 0x81 0x0F 0xFF ] */ portamento 0x81, PITCH_C2, 255
-/* 0x2059 [0x67 0x80 0xC8 0x64 ] */ notedv PITCH_C4, 200, 100
+/* 0x2059 [0x67 0x80 0xC8 0x64 ] */ notedv PITCH_C4, FRAMERATE_CONST(200, 240), 100
/* 0x205D [0xFF ] */ end
/* 0x205E [0xC2 0xE2 ] */ transpose -30
@@ -4635,9 +4644,9 @@ LAYER_2069:
/* 0x2069 [0xCB 0x66 0x88 0xFB ] */ env ENVELOPE_6688, 251
/* 0x206D [0xC4 ] */ legato
/* 0x206E [0xC7 0x85 0x0F 0xFF ] */ portamento 0x85, PITCH_C2, 255
-/* 0x2072 [0x60 0x60 0x4A ] */ notedv PITCH_F3, 96, 74
-/* 0x2075 [0x73 0x80 0xC8 0x4A ] */ notedv PITCH_C5, 200, 74
-/* 0x2079 [0x7C 0x80 0x96 0x4A ] */ notedv PITCH_A5, 150, 74
+/* 0x2072 [0x60 0x60 0x4A ] */ notedv PITCH_F3, FRAMERATE_CONST(96, 115), 74
+/* 0x2075 [0x73 0x80 0xC8 0x4A ] */ notedv PITCH_C5, FRAMERATE_CONST(200, 240), 74
+/* 0x2079 [0x7C 0x80 0x96 0x4A ] */ notedv PITCH_A5, FRAMERATE_CONST(150, 180), 74
/* 0x207D [0xFF ] */ end
.channel CHAN_207E
@@ -4853,13 +4862,13 @@ LAYER_2196:
.layer LAYER_21C7
/* 0x21C7 [0xC6 0x22 ] */ instr SF0_INST_34
-/* 0x21C9 [0x6B 0x18 0x50 ] */ notedv PITCH_E4, 24, 80
+/* 0x21C9 [0x6B 0x18 0x50 ] */ notedv PITCH_E4, FRAMERATE_CONST(24, 29), 80
/* 0x21CC [0xFF ] */ end
.layer LAYER_21CD
/* 0x21CD [0xC6 0x1D ] */ instr SF0_INST_29
/* 0x21CF [0xC7 0x81 0x1C 0xFF ] */ portamento 0x81, PITCH_DF3, 255
-/* 0x21D3 [0x5E 0x18 0x5F ] */ notedv PITCH_EF3, 24, 95
+/* 0x21D3 [0x5E 0x18 0x5F ] */ notedv PITCH_EF3, FRAMERATE_CONST(24, 29), 95
/* 0x21D6 [0xFF ] */ end
.channel CHAN_21D7
@@ -4969,7 +4978,7 @@ CHAN_2274:
/* 0x2284 [0x56 ] */ subio IO_PORT_6
/* 0x2285 [0xC9 0x07 ] */ and 7
CHAN_2287:
-/* 0x2287 [0xC7 0x60 0x22 0x98 ] */ stseq (NOTEDV_OPCODE | PITCH_F3), LAYER_2298 + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x2287 [0xC7 0x60 0x22 0x98 ] */ stseq (ASEQ_OP_LAYER_NOTEDV | PITCH_F3), LAYER_2298 + STSEQ_NOTEDV_OPCODE_PITCH
/* 0x228B [0x66 ] */ ldio IO_PORT_6
/* 0x228C [0xC8 0xFC ] */ sub 252
/* 0x228E [0xC9 0x04 ] */ and 4
@@ -5033,9 +5042,9 @@ LAYER_22E0:
.layer LAYER_22EA
/* 0x22EA [0xC6 0x2D ] */ instr SF0_INST_45
-/* 0x22EC [0x5B 0x13 0x69 ] */ notedv PITCH_C3, 19, 105
+/* 0x22EC [0x5B 0x13 0x69 ] */ notedv PITCH_C3, FRAMERATE_CONST(19, 23), 105
/* 0x22EF [0xC6 0x42 ] */ instr SF0_INST_66
-/* 0x22F1 [0x4E 0x49 0x67 ] */ notedv PITCH_B1, 73, 103
+/* 0x22F1 [0x4E 0x49 0x67 ] */ notedv PITCH_B1, FRAMERATE_CONST(73, 88), 103
/* 0x22F4 [0xFF ] */ end
.channel CHAN_22F5
@@ -5229,8 +5238,8 @@ LAYER_23CF:
.layer LAYER_240A
/* 0x240A [0xC4 ] */ legato
/* 0x240B [0xC7 0x85 0x18 0xFF ] */ portamento 0x85, PITCH_A2, 255
-/* 0x240F [0x54 0x18 0x64 ] */ notedv PITCH_F2, 24, 100
-/* 0x2412 [0x57 0x30 0x64 ] */ notedv PITCH_AF2, 48, 100
+/* 0x240F [0x54 0x18 0x64 ] */ notedv PITCH_F2, FRAMERATE_CONST(24, 28), 100
+/* 0x2412 [0x57 0x30 0x64 ] */ notedv PITCH_AF2, FRAMERATE_CONST(48, 56), 100
/* 0x2415 [0xFF ] */ end
.channel CHAN_2416
@@ -5242,7 +5251,7 @@ LAYER_23CF:
.layer LAYER_2422
/* 0x2422 [0xC4 ] */ legato
-/* 0x2423 [0xC0 0x28 ] */ ldelay 40
+/* 0x2423 [0xC0 0x28 ] */ ldelay FRAMERATE_CONST(40, 48)
/* 0x2425 [0xC7 0x85 0x3A 0xFF ] */ portamento 0x85, PITCH_G5, 255
/* 0x2429 [0x56 0x80 0x12 0x69 ] */ noteldv PITCH_G2, 18, 105
/* 0x242D [0x6E 0x80 0x1E 0x69 ] */ noteldv PITCH_G4, 30, 105
@@ -5250,7 +5259,7 @@ LAYER_23CF:
.layer LAYER_2432
/* 0x2432 [0xC7 0x81 0x14 0xFF ] */ portamento 0x81, PITCH_F2, 255
-/* 0x2436 [0x5A 0x60 0x64 ] */ notedv PITCH_B2, 96, 100
+/* 0x2436 [0x5A 0x60 0x64 ] */ notedv PITCH_B2, FRAMERATE_CONST(96, 115), 100
/* 0x2439 [0xFF ] */ end
.channel CHAN_243A
@@ -5321,7 +5330,7 @@ LAYER_245A:
/* 0x24A5 [0xC2 0x08 ] */ transpose 8
.layer LAYER_24A7
/* 0x24A7 [0xC6 0x42 ] */ instr SF0_INST_66
-/* 0x24A9 [0x4E 0x00 0x67 ] */ notedv PITCH_B1, 0, 103
+/* 0x24A9 [0x4E 0x00 0x67 ] */ notedv FRAMERATE_CONST(PITCH_B1, PITCH_A1), 0, 103
/* 0x24AC [0xFF ] */ end
.channel CHAN_24AD
@@ -5445,7 +5454,7 @@ LAYER_254E:
/* 0x255B [0xC2 0x18 ] */ transpose 24
/* 0x255D [0xC6 0x2A ] */ instr SF0_INST_42
/* 0x255F [0xCB 0x67 0xCC 0xF1 ] */ env ENVELOPE_67CC, 241
-/* 0x2563 [0x76 0x81 0x20 0x2A ] */ notedv PITCH_EF5, 288, 42
+/* 0x2563 [0x76 0x81 0x20 0x2A ] */ notedv PITCH_EF5, FRAMERATE_CONST(288, 346), 42
/* 0x2567 [0xFF ] */ end
.layer LAYER_2568
@@ -5525,7 +5534,7 @@ LAYER_2592:
/* 0x25E1 [0xC4 ] */ legato
/* 0x25E2 [0xC7 0x85 0x1A 0xFF ] */ portamento 0x85, PITCH_B2, 255
LAYER_25E6:
-/* 0x25E6 [0x61 0x83 0xE8 0x50 ] */ notedv PITCH_GF3, 1000, 80
+/* 0x25E6 [0x61 0x83 0xE8 0x50 ] */ notedv PITCH_GF3, FRAMERATE_CONST(1000, 1200), 80
/* 0x25EA [0xF4 0xFA ] */ rjump LAYER_25E6
.layer LAYER_25EC
@@ -5535,7 +5544,7 @@ LAYER_25E6:
/* 0x25F4 [0xC4 ] */ legato
/* 0x25F5 [0xC7 0x85 0x24 0xFF ] */ portamento 0x85, PITCH_A3, 255
LAYER_25F9:
-/* 0x25F9 [0x6C 0x83 0xE8 0x4B ] */ notedv PITCH_F4, 1000, 75
+/* 0x25F9 [0x6C 0x83 0xE8 0x4B ] */ notedv PITCH_F4, FRAMERATE_CONST(1000, 1200), 75
/* 0x25FD [0xF4 0xFA ] */ rjump LAYER_25F9
.channel CHAN_25FF
@@ -5551,7 +5560,7 @@ LAYER_25F9:
/* 0x260E [0xC4 ] */ legato
/* 0x260F [0xC7 0x81 0x1B 0xFF ] */ portamento 0x81, PITCH_C3, 255
LAYER_2613:
-/* 0x2613 [0x6E 0x81 0xF4 0x50 ] */ notedv PITCH_G4, 500, 80
+/* 0x2613 [0x6E 0x81 0xF4 0x50 ] */ notedv PITCH_G4, FRAMERATE_CONST(500, 600), 80
/* 0x2617 [0xF4 0xFA ] */ rjump LAYER_2613
.channel CHAN_2619
@@ -5573,15 +5582,15 @@ LAYER_2625:
.layer LAYER_2631
/* 0x2631 [0xC6 0x42 ] */ instr SF0_INST_66
-/* 0x2633 [0x5F 0x18 0x41 ] */ notedv PITCH_E3, 24, 65
+/* 0x2633 [0x5F 0x18 0x41 ] */ notedv PITCH_E3, FRAMERATE_CONST(24, 28), 65
/* 0x2636 [0xC2 0x12 ] */ transpose 18
.layer LAYER_2638
/* 0x2638 [0xC6 0x07 ] */ instr SF0_INST_7
/* 0x263A [0xCB 0x66 0x88 0xFB ] */ env ENVELOPE_6688, 251
-/* 0x263E [0x5A 0x0E 0x5F ] */ notedv PITCH_B2, 14, 95
-/* 0x2641 [0x67 0x14 0x64 ] */ notedv PITCH_C4, 20, 100
-/* 0x2644 [0x59 0x11 0x66 ] */ notedv PITCH_BF2, 17, 102
-/* 0x2647 [0x65 0x50 0x67 ] */ notedv PITCH_BF3, 80, 103
+/* 0x263E [0x5A 0x0E 0x5F ] */ notedv PITCH_B2, FRAMERATE_CONST(14, 16), 95
+/* 0x2641 [0x67 0x14 0x64 ] */ notedv PITCH_C4, FRAMERATE_CONST(20, 24), 100
+/* 0x2644 [0x59 0x11 0x66 ] */ notedv PITCH_BF2, FRAMERATE_CONST(17, 19), 102
+/* 0x2647 [0x65 0x50 0x67 ] */ notedv PITCH_BF3, FRAMERATE_CONST(80, 96), 103
/* 0x264A [0xFF ] */ end
.channel CHAN_264B
@@ -5590,7 +5599,7 @@ LAYER_2625:
/* 0x2650 [0xFF ] */ end
.layer LAYER_2651
-/* 0x2651 [0x67 0x27 0x6E ] */ notedv PITCH_C4, 39, 110
+/* 0x2651 [0x67 0x27 0x6E ] */ notedv PITCH_C4, FRAMERATE_CONST(39, 47), 110
/* 0x2654 [0xF4 0xFB ] */ rjump LAYER_2651
.channel CHAN_2656
@@ -5642,7 +5651,7 @@ LAYER_2661:
/* 0x269D [0xCB 0x66 0x94 0xEB ] */ env ENVELOPE_6694, 235
/* 0x26A1 [0xC7 0x83 0x27 0xFF ] */ portamento 0x83, PITCH_C4, 255
/* 0x26A5 [0xF8 0x07 ] */ loop 7
-/* 0x26A7 [0x6E 0x40 0x40 ] */ notedv PITCH_G4, 64, 64
+/* 0x26A7 [0x6E 0x40 0x40 ] */ notedv PITCH_G4, FRAMERATE_CONST(64, 77), 64
/* 0x26AA [0xF7 ] */ loopend
/* 0x26AB [0xC7 0x81 0x29 0xFF ] */ portamento 0x81, PITCH_D4, 255
/* 0x26AF [0x70 0x70 0x40 ] */ notedv PITCH_A4, 112, 64
@@ -5653,7 +5662,7 @@ LAYER_2661:
/* 0x26B5 [0xC6 0x44 ] */ instr SF0_INST_68
/* 0x26B7 [0xCB 0x66 0x94 0xEB ] */ env ENVELOPE_6694, 235
/* 0x26BB [0xF8 0x07 ] */ loop 7
-/* 0x26BD [0x79 0x40 0x32 ] */ notedv PITCH_GF5, 64, 50
+/* 0x26BD [0x79 0x40 0x32 ] */ notedv PITCH_GF5, FRAMERATE_CONST(64, 77), 50
/* 0x26C0 [0xF7 ] */ loopend
/* 0x26C1 [0xFF ] */ end
@@ -5672,7 +5681,7 @@ LAYER_2661:
.layer LAYER_26D8
/* 0x26D8 [0xC6 0x22 ] */ instr SF0_INST_34
-/* 0x26DA [0x6D 0x4C 0x32 ] */ notedv PITCH_GF4, 76, 50
+/* 0x26DA [0x6D 0x4C 0x32 ] */ notedv PITCH_GF4, FRAMERATE_CONST(76, 84), 50
/* 0x26DD [0xFF ] */ end
.layer LAYER_26DE
@@ -5740,7 +5749,7 @@ CHAN_2731:
/* 0x2743 [0xC2 0x18 ] */ transpose 24
.layer LAYER_2745
/* 0x2745 [0xC7 0x81 0x1F 0xFF ] */ portamento 0x81, PITCH_E3, 255
-/* 0x2749 [0x62 0x80 0xF0 0x50 ] */ notedv PITCH_G3, 240, 80
+/* 0x2749 [0x62 0x80 0xF0 0x50 ] */ notedv PITCH_G3, FRAMERATE_CONST(240, 264), 80
/* 0x274D [0xFF ] */ end
.channel CHAN_274E
@@ -5755,7 +5764,7 @@ CHAN_2731:
/* 0x2756 [0xC6 0x08 ] */ instr SF0_INST_8
/* 0x2758 [0xCB 0x67 0xCC 0xF5 ] */ env ENVELOPE_67CC, 245
/* 0x275C [0xC7 0x81 0x13 0x50 ] */ portamento 0x81, PITCH_E2, 80
-/* 0x2760 [0x63 0x6E 0x69 ] */ notedv PITCH_AF3, 110, 105
+/* 0x2760 [0x63 0x6E 0x69 ] */ notedv PITCH_AF3, FRAMERATE_CONST(110, 132), 105
/* 0x2763 [0xFF ] */ end
.channel CHAN_2764
@@ -5794,8 +5803,8 @@ LAYER_2786:
/* 0x2790 [0xC6 0x44 ] */ instr SF0_INST_68
/* 0x2792 [0xCB 0x66 0x38 0xFB ] */ env ENVELOPE_6638, 251
/* 0x2796 [0xC2 0x24 ] */ transpose 36
-/* 0x2798 [0x5D 0x0D 0x62 ] */ notedv PITCH_D3, 13, 98
-/* 0x279B [0x69 0x64 0x62 ] */ notedv PITCH_D4, 100, 98
+/* 0x2798 [0x5D 0x0D 0x62 ] */ notedv PITCH_D3, FRAMERATE_CONST(13, 15), 98
+/* 0x279B [0x69 0x64 0x62 ] */ notedv PITCH_D4, FRAMERATE_CONST(100, 120), 98
/* 0x279E [0xFF ] */ end
.channel CHAN_279F
@@ -5836,7 +5845,7 @@ CHAN_27B2:
LAYER_27D3:
/* 0x27D3 [0xC7 0x81 0x3A 0xFF ] */ portamento 0x81, PITCH_G5, 255
LAYER_27D7:
-/* 0x27D7 [0x7C 0x87 0xD0 0x4B ] */ notedv PITCH_A5, 2000, 75
+/* 0x27D7 [0x7C 0x87 0xD0 0x4B ] */ notedv PITCH_A5, FRAMERATE_CONST(2000, 2400), 75
/* 0x27DB [0xF4 0xFA ] */ rjump LAYER_27D7
.channel CHAN_27DD
@@ -5943,14 +5952,14 @@ LAYER_285C:
/* 0x286D [0xC6 0x4D ] */ instr SF0_INST_77
/* 0x286F [0xCB 0x66 0xFC 0xAA ] */ env ENVELOPE_66FC, 170
/* 0x2873 [0xC7 0x81 0x20 0x91 ] */ portamento 0x81, PITCH_F3, 145
-/* 0x2877 [0x5D 0x82 0x44 0x69 ] */ notedv PITCH_D3, 580, 105
+/* 0x2877 [0x5D 0x82 0x44 0x69 ] */ notedv PITCH_D3, FRAMERATE_CONST(580, 696), 105
/* 0x287B [0xFF ] */ end
.layer LAYER_287C
/* 0x287C [0xC6 0x50 ] */ instr SF0_INST_80
/* 0x287E [0xCB 0x66 0xFC 0xAA ] */ env ENVELOPE_66FC, 170
/* 0x2882 [0xC7 0x81 0x05 0x91 ] */ portamento 0x81, PITCH_D1, 145
-/* 0x2886 [0x42 0x82 0x44 0x6E ] */ notedv PITCH_B0, 580, 110
+/* 0x2886 [0x42 0x82 0x44 0x6E ] */ notedv PITCH_B0, FRAMERATE_CONST(580, 696), 110
/* 0x288A [0xFF ] */ end
.channel CHAN_288B
@@ -6018,7 +6027,7 @@ CHAN_28BE:
/* 0x28EC [0x89 0x29 0x00 ] */ ldlayer 1, LAYER_2900
/* 0x28EF [0x8A 0x29 0x22 ] */ ldlayer 2, LAYER_2922
/* 0x28F2 [0xD7 0x80 ] */ vibfreq 128
-/* 0x28F4 [0xE2 0x20 0x00 0x37 ] */ vibdepthgrad 32, 0, 55
+/* 0x28F4 [0xE2 0x20 0x00 0x37 ] */ vibdepthgrad 32, 0, FRAMERATE_CONST(55, 66)
/* 0x28F8 [0xCC 0x01 ] */ ldi 1
/* 0x28FA [0xFC 0x00 0x48 ] */ call CHAN_0048
/* 0x28FD [0xD8 0x00 ] */ vibdepth 0
@@ -6028,7 +6037,7 @@ CHAN_28BE:
/* 0x2900 [0xC6 0x40 ] */ instr SF0_INST_64
/* 0x2902 [0xCB 0x67 0xE4 0xC8 ] */ env ENVELOPE_67E4, 200
/* 0x2906 [0xC7 0x81 0x26 0xB4 ] */ portamento 0x81, PITCH_B3, 180
-/* 0x290A [0x67 0x83 0x84 0x20 ] */ notedv PITCH_C4, 900, 32
+/* 0x290A [0x67 0x83 0x84 0x20 ] */ notedv PITCH_C4, FRAMERATE_CONST(900, 1080), 32
/* 0x290E [0xFF ] */ end
.layer LAYER_290F
@@ -6040,15 +6049,15 @@ CHAN_28BE:
LAYER_2915:
/* 0x2915 [0xCB 0x67 0xE4 0xC8 ] */ env ENVELOPE_67E4, 200
/* 0x2919 [0xC7 0x81 0x32 0xB4 ] */ portamento 0x81, PITCH_B4, 180
-/* 0x291D [0x73 0x83 0x84 0x50 ] */ notedv PITCH_C5, 900, 80
+/* 0x291D [0x73 0x83 0x84 0x50 ] */ notedv PITCH_C5, FRAMERATE_CONST(900, 1080), 80
/* 0x2921 [0xFF ] */ end
.layer LAYER_2922
/* 0x2922 [0xCF 0xC8 ] */ releaserate 200
-/* 0x2924 [0x5B 0x82 0x58 0x40 ] */ notedv PITCH_C3, 600, 64
+/* 0x2924 [0x5B 0x82 0x58 0x40 ] */ notedv PITCH_C3, FRAMERATE_CONST(600, 720), 64
/* 0x2928 [0xC2 0x1B ] */ transpose 27
/* 0x292A [0xCB 0x66 0xF4 0xDD ] */ env ENVELOPE_66F4, 221
-/* 0x292E [0x73 0x81 0x2C 0x46 ] */ notedv PITCH_C5, 300, 70
+/* 0x292E [0x73 0x81 0x2C 0x46 ] */ notedv PITCH_C5, FRAMERATE_CONST(300, 360), 70
/* 0x2932 [0xFF ] */ end
.channel CHAN_2933
@@ -6061,10 +6070,10 @@ LAYER_2915:
/* 0x293D [0xC2 0x30 ] */ transpose 48
/* 0x293F [0xC4 ] */ legato
/* 0x2940 [0xC7 0x85 0x2E 0xFF ] */ portamento 0x85, PITCH_G4, 255
-/* 0x2944 [0x6D 0x50 0x50 ] */ notedv PITCH_GF4, 80, 80
-/* 0x2947 [0x67 0x80 0xD2 0x50 ] */ notedv PITCH_C4, 210, 80
+/* 0x2944 [0x6D 0x50 0x50 ] */ notedv PITCH_GF4, FRAMERATE_CONST(80, 96), 80
+/* 0x2947 [0x67 0x80 0xD2 0x50 ] */ notedv PITCH_C4, FRAMERATE_CONST(210, 252), 80
LAYER_294B:
-/* 0x294B [0x67 0x81 0x13 0x50 ] */ notedv PITCH_C4, 275, 80
+/* 0x294B [0x67 0x81 0x13 0x50 ] */ notedv PITCH_C4, FRAMERATE_CONST(275, 330), 80
/* 0x294F [0xF4 0xFA ] */ rjump LAYER_294B
.channel CHAN_2951
@@ -6090,12 +6099,12 @@ LAYER_294B:
/* 0x2974 [0xC2 0x30 ] */ transpose 48
/* 0x2976 [0xC4 ] */ legato
/* 0x2977 [0xC7 0x85 0x20 0xFF ] */ portamento 0x85, PITCH_F3, 255
-/* 0x297B [0x60 0x50 0x50 ] */ notedv PITCH_F3, 80, 80
-/* 0x297E [0x6E 0x50 0x50 ] */ notedv PITCH_G4, 80, 80
-/* 0x2981 [0x6E 0x82 0x08 0x50 ] */ notedv PITCH_G4, 520, 80
-/* 0x2985 [0x67 0x80 0xD2 0x50 ] */ notedv PITCH_C4, 210, 80
+/* 0x297B [0x60 0x50 0x50 ] */ notedv PITCH_F3, FRAMERATE_CONST(80, 96), 80
+/* 0x297E [0x6E 0x50 0x50 ] */ notedv PITCH_G4, FRAMERATE_CONST(80, 96), 80
+/* 0x2981 [0x6E 0x82 0x08 0x50 ] */ notedv PITCH_G4, FRAMERATE_CONST(520, 672), 80
+/* 0x2985 [0x67 0x80 0xD2 0x50 ] */ notedv PITCH_C4, FRAMERATE_CONST(210, 252), 80
LAYER_2989:
-/* 0x2989 [0x60 0x64 0x50 ] */ notedv PITCH_F3, 100, 80
+/* 0x2989 [0x60 0x64 0x50 ] */ notedv PITCH_F3, FRAMERATE_CONST(100, 120), 80
/* 0x298C [0xF4 0xFB ] */ rjump LAYER_2989
.channel CHAN_298E
@@ -6143,14 +6152,14 @@ LAYER_29B9:
/* 0x29D4 [0xC6 0x2E ] */ instr SF0_INST_46
/* 0x29D6 [0xCB 0x66 0xF4 0xF1 ] */ env ENVELOPE_66F4, 241
/* 0x29DA [0xC7 0x81 0x27 0xFF ] */ portamento 0x81, PITCH_C4, 255
-/* 0x29DE [0x5E 0x80 0xC6 0x5A ] */ notedv PITCH_EF3, 198, 90
+/* 0x29DE [0x5E 0x80 0xC6 0x5A ] */ notedv PITCH_EF3, FRAMERATE_CONST(198, 196), 90
/* 0x29E2 [0xFF ] */ end
.layer LAYER_29E3
-/* 0x29E3 [0xC0 0x80 0xBC ] */ ldelay 188
+/* 0x29E3 [0xC0 0x80 0xBC ] */ ldelay FRAMERATE_CONST(188, 202)
/* 0x29E6 [0xC6 0x08 ] */ instr SF0_INST_8
/* 0x29E8 [0xC7 0x81 0x03 0x20 ] */ portamento 0x81, PITCH_C1, 32
-/* 0x29EC [0x4F 0x40 0x69 ] */ notedv PITCH_C2, 64, 105
+/* 0x29EC [0x4F 0x40 0x69 ] */ notedv PITCH_C2, FRAMERATE_CONST(64, 77), 105
/* 0x29EF [0xFF ] */ end
.channel CHAN_29F0
@@ -6189,24 +6198,24 @@ LAYER_2A06:
/* 0x2A27 [0xC6 0x4A ] */ instr SF0_INST_74
/* 0x2A29 [0xCB 0x66 0xF4 0xDD ] */ env ENVELOPE_66F4, 221
/* 0x2A2D [0xC7 0x81 0x27 0xFF ] */ portamento 0x81, PITCH_C4, 255
-/* 0x2A31 [0x7E 0x82 0xE4 0x5F ] */ notedv PITCH_B5, 740, 95
+/* 0x2A31 [0x7E 0x82 0xE4 0x5F ] */ notedv PITCH_B5, FRAMERATE_CONST(740, 925), 95
/* 0x2A35 [0xFF ] */ end
.layer LAYER_2A36
/* 0x2A36 [0xC7 0x81 0x1B 0xFF ] */ portamento 0x81, PITCH_C3, 255
-/* 0x2A3A [0x72 0x82 0xE4 0x41 ] */ notedv PITCH_B4, 740, 65
+/* 0x2A3A [0x72 0x82 0xE4 0x41 ] */ notedv PITCH_B4, FRAMERATE_CONST(740, 925), 65
/* 0x2A3E [0xFF ] */ end
.layer LAYER_2A3F
/* 0x2A3F [0xC2 0x30 ] */ transpose 48
/* 0x2A41 [0xCF 0xB4 ] */ releaserate 180
/* 0x2A43 [0xC7 0x81 0x1B 0xFF ] */ portamento 0x81, PITCH_C3, 255
-/* 0x2A47 [0x72 0x82 0x1C 0x3E ] */ notedv PITCH_B4, 540, 62
+/* 0x2A47 [0x72 0x82 0x1C 0x3E ] */ notedv PITCH_B4, FRAMERATE_CONST(540, 675), 62
/* 0x2A4B [0xC2 0x00 ] */ transpose 0
/* 0x2A4D [0xC6 0x0D ] */ instr SF0_INST_13
/* 0x2A4F [0xCB 0x66 0xF4 0xDD ] */ env ENVELOPE_66F4, 221
/* 0x2A53 [0xC7 0x81 0x27 0xFF ] */ portamento 0x81, PITCH_C4, 255
-/* 0x2A57 [0x7E 0x80 0xC8 0x55 ] */ notedv PITCH_B5, 200, 85
+/* 0x2A57 [0x7E 0x80 0xC8 0x55 ] */ notedv PITCH_B5, FRAMERATE_CONST(200, 250), 85
/* 0x2A5B [0xFF ] */ end
.channel CHAN_2A5C
@@ -6306,14 +6315,14 @@ LAYER_2A91:
/* 0x2AF2 [0xC6 0x0C ] */ instr SF0_INST_12
/* 0x2AF4 [0xCB 0x66 0xFC 0xE1 ] */ env ENVELOPE_66FC, 225
/* 0x2AF8 [0xC7 0x81 0x3E 0xFF ] */ portamento 0x81, PITCH_B5, 255
-/* 0x2AFC [0x73 0x80 0xAA 0x60 ] */ notedv PITCH_C5, 170, 96
+/* 0x2AFC [0x73 0x80 0xAA 0x60 ] */ notedv PITCH_C5, FRAMERATE_CONST(170, 204), 96
/* 0x2B00 [0xFF ] */ end
.layer LAYER_2B01
/* 0x2B01 [0xC6 0x23 ] */ instr SF0_INST_35
/* 0x2B03 [0xCB 0x66 0xFC 0xE1 ] */ env ENVELOPE_66FC, 225
/* 0x2B07 [0xC7 0x81 0x33 0xFF ] */ portamento 0x81, PITCH_C5, 255
-/* 0x2B0B [0x58 0x80 0xAA 0x60 ] */ notedv PITCH_A2, 170, 96
+/* 0x2B0B [0x58 0x80 0xAA 0x60 ] */ notedv PITCH_A2, FRAMERATE_CONST(170, 204), 96
/* 0x2B0F [0xFF ] */ end
.channel CHAN_2B10
@@ -6328,10 +6337,10 @@ LAYER_2A91:
.layer LAYER_2B1D
/* 0x2B1D [0x61 0x09 0x6E ] */ notedv PITCH_GF3, 9, 110
-/* 0x2B20 [0xF8 0x20 ] */ loop 32
-/* 0x2B22 [0x63 0x08 0x73 ] */ notedv PITCH_AF3, 8, 115
+/* 0x2B20 [0xF8 0x20 ] */ loop FRAMERATE_CONST(32, 38)
+/* 0x2B22 [0x63 0x08 0x73 ] */ notedv PITCH_AF3, FRAMERATE_CONST(8, 9), 115
/* 0x2B25 [0xF7 ] */ loopend
-/* 0x2B26 [0x65 0x0B 0x73 ] */ notedv PITCH_BF3, 11, 115
+/* 0x2B26 [0x65 0x0B 0x73 ] */ notedv PITCH_BF3, FRAMERATE_CONST(11, 13), 115
/* 0x2B29 [0xFF ] */ end
.channel CHAN_2B2A
@@ -6350,7 +6359,7 @@ LAYER_2A91:
/* 0x2B3F [0xC2 0x30 ] */ transpose 48
LAYER_2B41:
/* 0x2B41 [0xC7 0x81 0x2C 0xFF ] */ portamento 0x81, PITCH_F4, 255
-/* 0x2B45 [0x77 0x64 0x55 ] */ notedv PITCH_E5, 100, 85
+/* 0x2B45 [0x77 0x64 0x55 ] */ notedv PITCH_E5, FRAMERATE_CONST(100, 120), 85
/* 0x2B48 [0xFF ] */ end
.channel CHAN_2B49
@@ -6363,7 +6372,7 @@ LAYER_2B41:
/* 0x2B5C [0xFF ] */ end
.layer LAYER_2B5D
-/* 0x2B5D [0xC0 0x81 0x72 ] */ ldelay 370
+/* 0x2B5D [0xC0 0x81 0x72 ] */ ldelay FRAMERATE_CONST(370, 444)
/* 0x2B60 [0xFF ] */ end
.channel CHAN_2B61
@@ -6421,7 +6430,7 @@ LAYER_2BAA:
/* 0x2BBC [0xC6 0x1A ] */ instr SF0_INST_26
/* 0x2BBE [0x53 0x0F 0x54 ] */ notedv PITCH_E2, 15, 84
/* 0x2BC1 [0xC6 0x22 ] */ instr SF0_INST_34
-/* 0x2BC3 [0x67 0x3D 0x42 ] */ notedv PITCH_C4, 61, 66
+/* 0x2BC3 [0x67 0x3D 0x42 ] */ notedv PITCH_C4, FRAMERATE_CONST(61, 73), 66
/* 0x2BC6 [0xFF ] */ end
.layer LAYER_2BC7
@@ -6515,12 +6524,12 @@ LAYER_2BAA:
/* 0x2C49 [0xC4 ] */ legato
/* 0x2C4A [0xC7 0x81 0x20 0xFF ] */ portamento 0x81, PITCH_F3, 255
LAYER_2C4E:
-/* 0x2C4E [0x4F 0x81 0x90 0x69 ] */ notedv PITCH_C2, 400, 105
+/* 0x2C4E [0x4F 0x81 0x90 0x69 ] */ notedv PITCH_C2, FRAMERATE_CONST(400, 480), 105
/* 0x2C52 [0xF4 0xFA ] */ rjump LAYER_2C4E
.channel CHAN_2C54
/* 0x2C54 [0x89 0x2C 0x62 ] */ ldlayer 1, LAYER_2C62
-/* 0x2C57 [0xCC 0x58 ] */ ldi (NOTEDV_OPCODE | PITCH_A2)
+/* 0x2C57 [0xCC 0x58 ] */ ldi (ASEQ_OP_LAYER_NOTEDV | PITCH_A2)
/* 0x2C59 [0xC7 0x00 0x22 0x88 ] */ stseq 0, CHAN_2287 + STSEQ_STSEQ_IMM
/* 0x2C5D [0xFB 0x22 0x67 ] */ jump CHAN_2267
@@ -6570,8 +6579,8 @@ LAYER_2C6D:
/* 0x2C9D [0xC6 0x51 ] */ instr SF0_INST_81
/* 0x2C9F [0xCF 0xF0 ] */ releaserate 240
/* 0x2CA1 [0xC7 0x83 0x08 0xFF ] */ portamento 0x83, PITCH_F1, 255
-/* 0x2CA5 [0x0F 0x80 0xA8 0x55 0x05] */ notedvg PITCH_C2, 168, 85, 5
-/* 0x2CAA [0x43 0x80 0x96 0x55 ] */ notedv PITCH_C1, 150, 85
+/* 0x2CA5 [0x0F 0x80 0xA8 0x55 0x05] */ notedvg PITCH_C2, FRAMERATE_CONST(168, 202), 85, 5
+/* 0x2CAA [0x43 0x80 0x96 0x55 ] */ notedv PITCH_C1, FRAMERATE_CONST(150, 180), 85
/* 0x2CAE [0xFF ] */ end
.channel CHAN_2CAF
@@ -6640,7 +6649,7 @@ CHAN_2D01:
.channel CHAN_2D13
/* 0x2D13 [0x89 0x2D 0x25 ] */ ldlayer 1, LAYER_2D25
/* 0x2D16 [0x8A 0x2D 0x23 ] */ ldlayer 2, LAYER_2D23
-/* 0x2D19 [0xCC 0x66 ] */ ldi (NOTEDV_OPCODE | PITCH_B3)
+/* 0x2D19 [0xCC 0x66 ] */ ldi (ASEQ_OP_LAYER_NOTEDV | PITCH_B3)
/* 0x2D1B [0xC7 0x00 0x22 0x88 ] */ stseq 0, CHAN_2287 + STSEQ_STSEQ_IMM
/* 0x2D1F [0xFB 0x22 0x67 ] */ jump CHAN_2267
/* 0x2D22 [0xFF ] */ end
@@ -6679,7 +6688,7 @@ LAYER_2D30:
/* 0x2D55 [0xC6 0x2F ] */ instr SF0_INST_47
/* 0x2D57 [0xCB 0x66 0x88 0xE6 ] */ env ENVELOPE_6688, 230
/* 0x2D5B [0xC7 0x81 0x0A 0xFF ] */ portamento 0x81, PITCH_G1, 255
-/* 0x2D5F [0x70 0x46 0x5F ] */ notedv PITCH_A4, 70, 95
+/* 0x2D5F [0x70 0x46 0x5F ] */ notedv PITCH_A4, FRAMERATE_CONST(70, 84), 95
/* 0x2D62 [0xFF ] */ end
.channel CHAN_2D63
@@ -6713,7 +6722,7 @@ LAYER_2D7B:
/* 0x2D8F [0xC6 0x40 ] */ instr SF0_INST_64
/* 0x2D91 [0xCB 0x66 0xFC 0xC3 ] */ env ENVELOPE_66FC, 195
/* 0x2D95 [0xC7 0x81 0x00 0xFF ] */ portamento 0x81, PITCH_A0, 255
-/* 0x2D99 [0x54 0x7F 0x55 ] */ notedv PITCH_F2, 127, 85
+/* 0x2D99 [0x54 0x7F 0x55 ] */ notedv PITCH_F2, FRAMERATE_CONST(127, 152), 85
/* 0x2D9C [0xFF ] */ end
.channel CHAN_2D9D
@@ -6747,7 +6756,7 @@ LAYER_2D7B:
.layer LAYER_2DC9
/* 0x2DC9 [0xC7 0x81 0x1B 0x7F ] */ portamento 0x81, PITCH_C3, 127
-/* 0x2DCD [0x60 0x64 0x64 ] */ notedv PITCH_F3, 100, 100
+/* 0x2DCD [0x60 0x64 0x64 ] */ notedv PITCH_F3, FRAMERATE_CONST(100, 120), 100
/* 0x2DD0 [0xFF ] */ end
.channel CHAN_2DD1
@@ -6900,12 +6909,12 @@ LAYER_2E80:
/* 0x2EA0 [0xC6 0x40 ] */ instr SF0_INST_64
/* 0x2EA2 [0xCB 0x67 0xE4 0xC8 ] */ env ENVELOPE_67E4, 200
/* 0x2EA6 [0xC7 0x81 0x32 0xB4 ] */ portamento 0x81, PITCH_B4, 180
-/* 0x2EAA [0x73 0x80 0xC8 0x6E ] */ notedv PITCH_C5, 200, 110
+/* 0x2EAA [0x73 0x80 0xC8 0x6E ] */ notedv PITCH_C5, FRAMERATE_CONST(200, 240), 110
/* 0x2EAE [0xFF ] */ end
.layer LAYER_2EAF
/* 0x2EAF [0xCF 0xC8 ] */ releaserate 200
-/* 0x2EB1 [0x67 0x80 0xC8 0x73 ] */ notedv PITCH_C4, 200, 115
+/* 0x2EB1 [0x67 0x80 0xC8 0x73 ] */ notedv PITCH_C4, FRAMERATE_CONST(200, 240), 115
/* 0x2EB5 [0xFF ] */ end
.channel CHAN_2EB6
@@ -7047,9 +7056,9 @@ CHAN_2F7D:
/* 0x2F85 [0xB8 0x02 ] */ rand 2
/* 0x2F87 [0xC7 0x2F 0x2F 0xAC ] */ stseq 47, LAYER_2FAB + STSEQ_TRANSPOSITION
/* 0x2F8B [0xBD 0x00 0x6A 0x00 0x96] */ randptr 106, 150
-/* 0x2F90 [0xCF 0x2F 0xB6 ] */ stptrtoseq UNK_2FB6
+/* 0x2F90 [0xCF 0x2F 0xB6 ] */ stptrtoseq BUF_2FB6
/* 0x2F93 [0xCC 0x01 ] */ ldi 1
-/* 0x2F95 [0xCB 0x2F 0xB6 ] */ ldseq UNK_2FB6
+/* 0x2F95 [0xCB 0x2F 0xB6 ] */ ldseq BUF_2FB6
/* 0x2F98 [0xC7 0x00 0x2F 0xA0 ] */ stseq 0, CHAN_2F9F + STSEQ_LDI_IMM
/* 0x2F9C [0x88 0x2F 0xAB ] */ ldlayer 0, LAYER_2FAB
CHAN_2F9F:
@@ -7068,8 +7077,8 @@ CHAN_2F9F:
/* 0x2FB2 [0xC0 0xFD 0x00 ] */ ldelay 32000
/* 0x2FB5 [0xFF ] */ end
-UNK_2FB6:
- .half 0x0000
+BUF_2FB6:
+ .half 0
.channel CHAN_2FB8
/* 0x2FB8 [0x88 0x2F 0xBF ] */ ldlayer 0, LAYER_2FBF
@@ -8257,8 +8266,8 @@ LAYER_3B1D:
.layer LAYER_3B42
/* 0x3B42 [0xC4 ] */ legato
/* 0x3B43 [0xC7 0x85 0x0F 0xFF ] */ portamento 0x85, PITCH_C2, 255
-/* 0x3B47 [0x51 0x32 0x64 ] */ notedv PITCH_D2, 50, 100
-/* 0x3B4A [0x4E 0x32 0x64 ] */ notedv PITCH_B1, 50, 100
+/* 0x3B47 [0x51 0x32 0x64 ] */ notedv PITCH_D2, FRAMERATE_CONST(50, 60), 100
+/* 0x3B4A [0x4E 0x32 0x64 ] */ notedv PITCH_B1, FRAMERATE_CONST(50, 60), 100
/* 0x3B4D [0xC5 ] */ nolegato
/* 0x3B4E [0xF4 0xF2 ] */ rjump LAYER_3B42
@@ -9192,7 +9201,7 @@ CHAN_4162:
/* 0x4164 [0xC7 0x03 0x41 0x7A ] */ stseq 3, LAYER_4179 + STSEQ_NOTEDV_DELAY_HI
/* 0x4168 [0xC7 0x03 0x41 0x73 ] */ stseq 3, CHAN_4172 + STSEQ_LDI_IMM
/* 0x416C [0xB8 0x08 ] */ rand 8
-/* 0x416E [0xC7 0x5B 0x41 0x79 ] */ stseq (NOTEDV_OPCODE | PITCH_C3), LAYER_4179 + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x416E [0xC7 0x5B 0x41 0x79 ] */ stseq (ASEQ_OP_LAYER_NOTEDV | PITCH_C3), LAYER_4179 + STSEQ_NOTEDV_OPCODE_PITCH
CHAN_4172:
/* 0x4172 [0xCC 0x01 ] */ ldi 1
/* 0x4174 [0xFC 0x00 0x48 ] */ call CHAN_0048
@@ -9754,7 +9763,7 @@ LAYER_4245:
/* 0x44C9 [0x88 0x44 0xD7 ] */ ldlayer 0, LAYER_44D7
/* 0x44CC [0xED 0x14 ] */ gain 20
/* 0x44CE [0xB8 0x04 ] */ rand 4
-/* 0x44D0 [0xC7 0x6B 0x44 0xD7 ] */ stseq (NOTEDV_OPCODE | PITCH_E4), LAYER_44D7 + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x44D0 [0xC7 0x6B 0x44 0xD7 ] */ stseq (ASEQ_OP_LAYER_NOTEDV | PITCH_E4), LAYER_44D7 + STSEQ_NOTEDV_OPCODE_PITCH
/* 0x44D4 [0xD9 0xE8 ] */ releaserate 232
/* 0x44D6 [0xFF ] */ end
@@ -10344,7 +10353,7 @@ LAYER_47B3:
/* 0x4860 [0x88 0x48 0x70 ] */ ldlayer 0, LAYER_4870
CHAN_4863:
/* 0x4863 [0xB8 0x04 ] */ rand 4
-/* 0x4865 [0xC7 0x60 0x48 0x70 ] */ stseq (NOTEDV_OPCODE | PITCH_F3), LAYER_4870 + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x4865 [0xC7 0x60 0x48 0x70 ] */ stseq (ASEQ_OP_LAYER_NOTEDV | PITCH_F3), LAYER_4870 + STSEQ_NOTEDV_OPCODE_PITCH
/* 0x4869 [0xCC 0x12 ] */ ldi 18
/* 0x486B [0xFC 0x00 0x48 ] */ call CHAN_0048
/* 0x486E [0xF4 0xF3 ] */ rjump CHAN_4863
@@ -12256,9 +12265,9 @@ LAYER_53FD:
.channel CHAN_5403
/* 0x5403 [0xC1 0x7E ] */ instr FONTANY_INSTR_SFX
/* 0x5405 [0x64 ] */ ldio IO_PORT_SFX_INDEX_LOBITS
-/* 0x5406 [0xC8 0xB0 ] */ sub 176
-/* 0x5408 [0xC7 0x00 0x54 0x17 ] */ stseq (NOTEDVG_OPCODE | PITCH_A0), LAYER_5417 + STSEQ_NOTEDVG_OPCODE_PITCH
-/* 0x540C [0xCB 0x54 0x1C ] */ ldseq UNK_541C
+/* 0x5406 [0xC8 0xB0 ] */ sub NA_SE_EN_TWINROBA_LAUGH & 0xFF
+/* 0x5408 [0xC7 0x00 0x54 0x17 ] */ stseq (ASEQ_OP_LAYER_NOTEDVG | PITCH_A0), LAYER_5417 + STSEQ_NOTEDVG_OPCODE_PITCH
+/* 0x540C [0xCB 0x54 0x1C ] */ ldseq ARRAY_541C
/* 0x540F [0xC7 0x00 0x54 0x19 ] */ stseq 0, LAYER_5417 + STSEQ_NOTEDVG_DELAY_LO
/* 0x5413 [0x88 0x54 0x17 ] */ ldlayer 0, LAYER_5417
/* 0x5416 [0xFF ] */ end
@@ -12267,10 +12276,10 @@ LAYER_53FD:
/* 0x5417 [0x00 0x00 0x64 0x00 ] */ notedvg PITCH_A0, 0, 100, 0
/* 0x541B [0xFF ] */ end
-UNK_541C:
- .byte 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64
- .byte 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64
- .byte 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64
+.array ARRAY_541C
+ .byte 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100
+ .byte 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100
+ .byte 100, 100, 100, 100, 100, 100, 100
.channel CHAN_5443
/* 0x5443 [0x88 0x42 0x20 ] */ ldlayer 0, LAYER_4220
@@ -12631,7 +12640,7 @@ CHAN_565E:
/* 0x5660 [0xC7 0x28 0x56 0x76 ] */ stseq 40, LAYER_5675 + STSEQ_NOTEDV_DELAY_HI
/* 0x5664 [0xC7 0x28 0x56 0x6F ] */ stseq 40, CHAN_566E + STSEQ_LDI_IMM
/* 0x5668 [0xB8 0x06 ] */ rand 6
-/* 0x566A [0xC7 0x64 0x56 0x75 ] */ stseq (NOTEDV_OPCODE | PITCH_A3), LAYER_5675 + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x566A [0xC7 0x64 0x56 0x75 ] */ stseq (ASEQ_OP_LAYER_NOTEDV | PITCH_A3), LAYER_5675 + STSEQ_NOTEDV_OPCODE_PITCH
CHAN_566E:
/* 0x566E [0xCC 0x01 ] */ ldi 1
/* 0x5670 [0xFC 0x00 0x48 ] */ call CHAN_0048
@@ -13502,7 +13511,7 @@ LAYER_5BCE:
/* 0x5CDE [0xC6 0x56 ] */ instr SF0_INST_86
/* 0x5CE0 [0xCB 0x67 0xCC 0xDD ] */ env ENVELOPE_67CC, 221
/* 0x5CE4 [0xC2 0x18 ] */ transpose 24
-/* 0x5CE6 [0x7E 0x80 0x96 0x64 ] */ notedv PITCH_B5, 150, 100
+/* 0x5CE6 [0x7E 0x80 0x96 0x64 ] */ notedv PITCH_B5, FRAMERATE_CONST(150, 165), 100
/* 0x5CEA [0xFF ] */ end
.layer LAYER_5CEB
@@ -13510,7 +13519,7 @@ LAYER_5BCE:
/* 0x5CED [0xCB 0x67 0xD8 0xDD ] */ env ENVELOPE_67D8, 221
/* 0x5CF1 [0xC2 0x0C ] */ transpose 12
/* 0x5CF3 [0xC7 0x81 0x02 0xFF ] */ portamento 0x81, PITCH_B0, 255
-/* 0x5CF7 [0x7E 0x80 0xFA 0x55 ] */ notedv PITCH_B5, 250, 85
+/* 0x5CF7 [0x7E 0x80 0xFA 0x55 ] */ notedv PITCH_B5, FRAMERATE_CONST(250, 275), 85
/* 0x5CFB [0xFF ] */ end
.channel CHAN_5CFC
@@ -13523,14 +13532,14 @@ LAYER_5BCE:
/* 0x5D05 [0xC6 0x56 ] */ instr SF0_INST_86
/* 0x5D07 [0xCB 0x67 0xD8 0xC8 ] */ env ENVELOPE_67D8, 200
/* 0x5D0B [0xC2 0x18 ] */ transpose 24
-/* 0x5D0D [0x7E 0x80 0xC8 0x64 ] */ notedv PITCH_B5, 200, 100
+/* 0x5D0D [0x7E 0x80 0xC8 0x64 ] */ notedv PITCH_B5, FRAMERATE_CONST(200, 220), 100
/* 0x5D11 [0xFF ] */ end
.layer LAYER_5D12
/* 0x5D12 [0xC6 0x0E ] */ instr SF0_INST_14
/* 0x5D14 [0xCB 0x67 0xD8 0xC8 ] */ env ENVELOPE_67D8, 200
/* 0x5D18 [0xC2 0x0C ] */ transpose 12
-/* 0x5D1A [0x7E 0x80 0xC8 0x55 ] */ notedv PITCH_B5, 200, 85
+/* 0x5D1A [0x7E 0x80 0xC8 0x55 ] */ notedv PITCH_B5, FRAMERATE_CONST(200, 220), 85
/* 0x5D1E [0xFF ] */ end
.channel CHAN_5D1F
@@ -13592,7 +13601,7 @@ LAYER_5BCE:
/* 0x5D70 [0xFF ] */ end
.layer LAYER_5D71
-/* 0x5D71 [0x40 0x48 0x46 ] */ notedv PITCH_A0, 72, 70
+/* 0x5D71 [0x40 0x48 0x46 ] */ notedv PITCH_A0, FRAMERATE_CONST(72, 74), 70
/* 0x5D74 [0xF4 0xFB ] */ rjump LAYER_5D71
.channel CHAN_5D76
@@ -13793,6 +13802,10 @@ CHAN_5EAB:
/* 0x5EAF [0xF3 0x06 ] */ rbeqz CHAN_5EB7
/* 0x5EB1 [0xF1 0x01 ] */ allocnotelist 1
/* 0x5EB3 [0xD1 0x02 ] */ notealloc 2
+#if OOT_PAL_N64
+/* [0xCC 0x00 ] */ ldi 0
+/* [0x76 ] */ stio IO_PORT_6
+#endif
/* 0x5EB5 [0xF4 0x03 ] */ rjump CHAN_5EBA
CHAN_5EB7:
@@ -13808,8 +13821,10 @@ CHAN_5EC1:
/* 0x5EC1 [0xD8 0x00 ] */ vibdepth 0
/* 0x5EC3 [0xE5 0x00 ] */ reverbidx 0
/* 0x5EC5 [0x90 ] */ dellayer 0
+#if !OOT_PAL_N64
/* 0x5EC6 [0xCC 0x00 ] */ ldi 0
/* 0x5EC8 [0x76 ] */ stio IO_PORT_6
+#endif
/* 0x5EC9 [0x64 ] */ ldio IO_PORT_SFX_INDEX_LOBITS
/* 0x5ECA [0xE4 ] */ dyncall
CHAN_5ECB:
@@ -13846,11 +13861,11 @@ CHAN_5EE2:
/* 0x5EF7 [0x71 ] */ stio IO_PORT_1
/* 0x5EF8 [0x67 ] */ ldio IO_PORT_7
/* 0x5EF9 [0xC9 0x07 ] */ and 7
-/* 0x5EFB [0xCB 0x5F 0x30 ] */ ldseq UNK_5F30
+/* 0x5EFB [0xCB 0x5F 0x30 ] */ ldseq ARRAY_5F30
/* 0x5EFE [0xC7 0x00 0x5F 0x0D ] */ stseq 0, CHAN_5F0C + STSEQ_INSTR
/* 0x5F02 [0x67 ] */ ldio IO_PORT_7
/* 0x5F03 [0xC9 0x07 ] */ and 7
-/* 0x5F05 [0xCB 0x5F 0x38 ] */ ldseq UNK_5F38
+/* 0x5F05 [0xCB 0x5F 0x38 ] */ ldseq ARRAY_5F38
/* 0x5F08 [0xC7 0x00 0x5F 0x2E ] */ stseq 0, LAYER_5F2B + STSEQ_NOTEDV_VELOCITY
CHAN_5F0C:
/* 0x5F0C [0xC1 0x34 ] */ instr SF0_INST_52
@@ -13861,7 +13876,9 @@ CHAN_5F15:
/* 0x5F15 [0x88 0x5F 0x28 ] */ ldlayer 0, LAYER_5F28
CHAN_5F18:
/* 0x5F18 [0x66 ] */ ldio IO_PORT_6
+#if !OOT_PAL_N64
/* 0x5F19 [0xF2 0x06 ] */ rbltz CHAN_5F21
+#endif
/* 0x5F1B [0xC7 0x00 0x5F 0x20 ] */ stseq 0, STSEQ_HERE + STSEQ_VIBDEPTH
/* 0x5F1F [0xD8 0x00 ] */ vibdepth 0
CHAN_5F21:
@@ -13877,11 +13894,18 @@ LAYER_5F2B:
/* 0x5F2B [0x67 0x81 0xE0 0x7F ] */ notedv PITCH_C4, 480, 127
/* 0x5F2F [0xFF ] */ end
-UNK_5F30:
- .byte 0x34, 0x55, 0x56, 0x59, 0x53, 0x52, 0x34, 0x34
+.array ARRAY_5F30
+ .byte SF0_INST_52
+ .byte SF0_INST_85
+ .byte SF0_INST_86
+ .byte SF0_INST_89
+ .byte SF0_INST_83
+ .byte SF0_INST_82
+ .byte SF0_INST_52
+ .byte SF0_INST_52
-UNK_5F38:
- .byte 0x73, 0x73, 0x64, 0x73, 0x64, 0x73, 0x73, 0x73
+.array ARRAY_5F38
+ .byte 115, 115, 100, 115, 100, 115, 115, 115
.channel CHAN_5F40
/* 0x5F40 [0xCC 0x81 ] */ ldi 129
@@ -13900,7 +13924,7 @@ CHAN_5F42:
/* 0x5F5A [0xC2 0x18 ] */ transpose 24
.layer LAYER_5F5C
/* 0x5F5C [0xC7 0x81 0x0F 0xFF ] */ portamento 0x81, PITCH_C2, 255
-/* 0x5F60 [0x62 0x80 0x8C 0x50 ] */ notedv PITCH_G3, 140, 80
+/* 0x5F60 [0x62 0x80 0x8C 0x50 ] */ notedv PITCH_G3, FRAMERATE_CONST(140, 168), 80
/* 0x5F64 [0xFF ] */ end
.channel CHAN_5F65
@@ -13908,7 +13932,7 @@ CHAN_5F42:
/* 0x5F67 [0xF4 0xD9 ] */ rjump CHAN_5F42
.channel CHAN_5F69
-/* 0x5F69 [0xCC 0x50 ] */ ldi 80
+/* 0x5F69 [0xCC 0x50 ] */ ldi FRAMERATE_CONST(80, 96)
/* 0x5F6B [0xC7 0x00 0x5F 0x91 ] */ stseq 0, LAYER_5F90 + STSEQ_NOTEDV_DELAY_HI
/* 0x5F6F [0xCC 0x81 ] */ ldi 129
CHAN_5F71:
@@ -13933,7 +13957,7 @@ LAYER_5F90:
/* 0x5F95 [0xFF ] */ end
.channel CHAN_5F96
-/* 0x5F96 [0xCC 0x28 ] */ ldi 40
+/* 0x5F96 [0xCC 0x28 ] */ ldi FRAMERATE_CONST(40, 48)
/* 0x5F98 [0xC7 0x00 0x5F 0x91 ] */ stseq 0, LAYER_5F90 + STSEQ_NOTEDV_DELAY_HI
/* 0x5F9C [0xCC 0x82 ] */ ldi 130
/* 0x5F9E [0xF4 0xD1 ] */ rjump CHAN_5F71
@@ -14027,11 +14051,11 @@ CHAN_6116:
/* 0x6116 [0x3E 0x06 ] */ stcio 14, IO_PORT_6
/* 0x6118 [0x3F 0x06 ] */ stcio 15, IO_PORT_6
CHAN_611A:
-/* 0x611A [0xCB 0x61 0x6D ] */ ldseq UNK_616D
-/* 0x611D [0xC7 0x40 0x61 0x2D ] */ stseq (NOTEDV_OPCODE | PITCH_A0), LAYER_612D + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x611A [0xCB 0x61 0x6D ] */ ldseq ARRAY_616D
+/* 0x611D [0xC7 0x40 0x61 0x2D ] */ stseq (ASEQ_OP_LAYER_NOTEDV | SF0_EFFECT_0), LAYER_612D + STSEQ_NOTEDV_OPCODE_PITCH
/* 0x6121 [0x66 ] */ ldio IO_PORT_6
CHAN_6122:
-/* 0x6122 [0xCB 0x61 0x71 ] */ ldseq UNK_6171
+/* 0x6122 [0xCB 0x61 0x71 ] */ ldseq ARRAY_6171
CHAN_6125:
/* 0x6125 [0xC7 0x00 0x61 0x2F ] */ stseq 0, LAYER_612D + STSEQ_NOTEDV_VELOCITY_2
/* 0x6129 [0x88 0x61 0x2D ] */ ldlayer 0, LAYER_612D
@@ -14062,8 +14086,8 @@ CHAN_613E:
/* 0x6145 [0xCC 0x00 ] */ ldi 0
// Reads the byte at (PTR + 0) into TR (the note)
/* 0x6147 [0xB6 ] */ dyntblv
- // Store NOTEDV_OPCODE + TR into the pitch
-/* 0x6148 [0xC7 0x40 0x61 0x2D ] */ stseq (NOTEDV_OPCODE | PITCH_A0), LAYER_612D + STSEQ_NOTEDV_OPCODE_PITCH
+ // Store ASEQ_OP_LAYER_NOTEDV + TR into the pitch
+/* 0x6148 [0xC7 0x40 0x61 0x2D ] */ stseq (ASEQ_OP_LAYER_NOTEDV | SF0_EFFECT_0), LAYER_612D + STSEQ_NOTEDV_OPCODE_PITCH
// Load 1 into TR
/* 0x614C [0xCC 0x01 ] */ ldi 1
// Reads the byte at (PTR + 1) into TR (the velocity)
@@ -14079,23 +14103,26 @@ CHAN_6151:
/* 0x615B [0xF4 0xBD ] */ rjump CHAN_611A
.channel CHAN_615D
-/* 0x615D [0xCE 0x61 0x6D ] */ ldptr UNK_616D
+/* 0x615D [0xCE 0x61 0x6D ] */ ldptr ARRAY_616D
/* 0x6160 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x6163 [0xCE 0x61 0x71 ] */ ldptr UNK_6171
+/* 0x6163 [0xCE 0x61 0x71 ] */ ldptr ARRAY_6171
/* 0x6166 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x6169 [0xCC 0x04 ] */ ldi 4
/* 0x616B [0xF4 0x85 ] */ rjump CHAN_60F2
-UNK_616D:
- .byte 0x00, 0x01, 0x02, 0x03
+.array ARRAY_616D
+ .byte SF0_EFFECT_0
+ .byte SF0_EFFECT_1
+ .byte SF0_EFFECT_2
+ .byte SF0_EFFECT_3
-UNK_6171:
- .byte 0x69, 0x69, 0x69, 0x69
+.array ARRAY_6171
+ .byte 105, 105, 105, 105
.channel CHAN_6175
-/* 0x6175 [0xCE 0x61 0x97 ] */ ldptr UNK_6197
+/* 0x6175 [0xCE 0x61 0x97 ] */ ldptr ARRAY_6197
/* 0x6178 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x617B [0xCE 0x61 0x99 ] */ ldptr UNK_6199
+/* 0x617B [0xCE 0x61 0x99 ] */ ldptr ARRAY_6199
/* 0x617E [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x6181 [0xB8 0x02 ] */ rand 2
/* 0x6183 [0xF4 0xAF ] */ rjump CHAN_6134
@@ -14115,16 +14142,17 @@ CHAN_618C:
CHAN_6196:
/* 0x6196 [0x76 ] */ stio IO_PORT_6
-UNK_6197:
- .byte 0x04, 0x05
+.array ARRAY_6197
+ .byte SF0_EFFECT_4
+ .byte SF0_EFFECT_5
-UNK_6199:
- .byte 0x6E, 0x6E
+.array ARRAY_6199
+ .byte 110, 110
.channel CHAN_619B
-/* 0x619B [0xCE 0x61 0xBD ] */ ldptr UNK_61BD
+/* 0x619B [0xCE 0x61 0xBD ] */ ldptr ARRAY_61BD
/* 0x619E [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x61A1 [0xCE 0x61 0xBF ] */ ldptr UNK_61BF
+/* 0x61A1 [0xCE 0x61 0xBF ] */ ldptr ARRAY_61BF
/* 0x61A4 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x61A7 [0xB8 0x02 ] */ rand 2
/* 0x61A9 [0xF4 0x89 ] */ rjump CHAN_6134
@@ -14144,109 +14172,119 @@ CHAN_61B2:
CHAN_61BC:
/* 0x61BC [0x76 ] */ stio IO_PORT_6
-UNK_61BD:
- .byte 0x15, 0x16
+.array ARRAY_61BD
+ .byte SF0_EFFECT_21
+ .byte SF0_EFFECT_22
-UNK_61BF:
- .byte 0x69, 0x69
+.array ARRAY_61BF
+ .byte 105, 105
.channel CHAN_61C1
-/* 0x61C1 [0xCE 0x61 0xD1 ] */ ldptr UNK_61D1
+/* 0x61C1 [0xCE 0x61 0xD1 ] */ ldptr ARRAY_61D1
/* 0x61C4 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x61C7 [0xCE 0x61 0xD3 ] */ ldptr UNK_61D3
+/* 0x61C7 [0xCE 0x61 0xD3 ] */ ldptr ARRAY_61D3
/* 0x61CA [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x61CD [0xCC 0x00 ] */ ldi 0
/* 0x61CF [0xF4 0x80 ] */ rjump CHAN_6151
-UNK_61D1:
- .byte 0x06, 0x19
+.array ARRAY_61D1
+ .byte SF0_EFFECT_6
+ .byte SF0_EFFECT_25
-UNK_61D3:
- .byte 0x5F, 0x69
+.array ARRAY_61D3
+ .byte 95, 105
.channel CHAN_61D5
-/* 0x61D5 [0xCE 0x61 0xE6 ] */ ldptr UNK_61E6
+/* 0x61D5 [0xCE 0x61 0xE6 ] */ ldptr ARRAY_61E6
/* 0x61D8 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x61DB [0xCE 0x61 0xE8 ] */ ldptr UNK_61E8
+/* 0x61DB [0xCE 0x61 0xE8 ] */ ldptr ARRAY_61E8
/* 0x61DE [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x61E1 [0xB8 0x02 ] */ rand 2
/* 0x61E3 [0xFB 0x61 0x34 ] */ jump CHAN_6134
-UNK_61E6:
- .byte 0x07, 0x08
+.array ARRAY_61E6
+ .byte SF0_EFFECT_7
+ .byte SF0_EFFECT_8
-UNK_61E8:
- .byte 0x48, 0x50
+.array ARRAY_61E8
+ .byte 72, 80
.channel CHAN_61EA
-/* 0x61EA [0xCE 0x61 0xFB ] */ ldptr UNK_61FB
+/* 0x61EA [0xCE 0x61 0xFB ] */ ldptr ARRAY_61FB
/* 0x61ED [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x61F0 [0xCE 0x61 0xFE ] */ ldptr UNK_61FE
+/* 0x61F0 [0xCE 0x61 0xFE ] */ ldptr ARRAY_61FE
/* 0x61F3 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x61F6 [0xCC 0x03 ] */ ldi 3
/* 0x61F8 [0xFB 0x60 0xF2 ] */ jump CHAN_60F2
-UNK_61FB:
- .byte 0x09, 0x0A, 0x0B
+.array ARRAY_61FB
+ .byte SF0_EFFECT_9
+ .byte SF0_EFFECT_10
+ .byte SF0_EFFECT_11
-UNK_61FE:
- .byte 0x75, 0x75, 0x75
+.array ARRAY_61FE
+ .byte 117, 117, 117
.channel CHAN_6201
-/* 0x6201 [0xCE 0x62 0x12 ] */ ldptr UNK_6212
+/* 0x6201 [0xCE 0x62 0x12 ] */ ldptr ARRAY_6212
/* 0x6204 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x6207 [0xCE 0x62 0x15 ] */ ldptr UNK_6215
+/* 0x6207 [0xCE 0x62 0x15 ] */ ldptr ARRAY_6215
/* 0x620A [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x620D [0xCC 0x03 ] */ ldi 3
/* 0x620F [0xFB 0x60 0xF2 ] */ jump CHAN_60F2
-UNK_6212:
- .byte 0x0C, 0x0D, 0x0E
+.array ARRAY_6212
+ .byte SF0_EFFECT_12
+ .byte SF0_EFFECT_13
+ .byte SF0_EFFECT_14
-UNK_6215:
- .byte 0x71, 0x71, 0x71
+.array ARRAY_6215
+ .byte 113, 113, 113
.channel CHAN_6218
-/* 0x6218 [0xCE 0x62 0x29 ] */ ldptr UNK_6229
+/* 0x6218 [0xCE 0x62 0x29 ] */ ldptr ARRAY_6229
/* 0x621B [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x621E [0xCE 0x62 0x2B ] */ ldptr UNK_622B
+/* 0x621E [0xCE 0x62 0x2B ] */ ldptr ARRAY_622B
/* 0x6221 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x6224 [0xB8 0x02 ] */ rand 2
/* 0x6226 [0xFB 0x61 0x34 ] */ jump CHAN_6134
-UNK_6229:
- .byte 0x11, 0x12
+.array ARRAY_6229
+ .byte SF0_EFFECT_17
+ .byte SF0_EFFECT_18
-UNK_622B:
- .byte 0x64, 0x64
+.array ARRAY_622B
+ .byte 100, 100
.channel CHAN_622D
-/* 0x622D [0xCE 0x62 0x3E ] */ ldptr UNK_623E
+/* 0x622D [0xCE 0x62 0x3E ] */ ldptr ARRAY_623E
/* 0x6230 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x6233 [0xCE 0x62 0x40 ] */ ldptr UNK_6240
+/* 0x6233 [0xCE 0x62 0x40 ] */ ldptr ARRAY_6240
/* 0x6236 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x6239 [0xB8 0x02 ] */ rand 2
/* 0x623B [0xFB 0x61 0x34 ] */ jump CHAN_6134
-UNK_623E:
- .byte 0x0F, 0x10
+.array ARRAY_623E
+ .byte SF0_EFFECT_15
+ .byte SF0_EFFECT_16
-UNK_6240:
- .byte 0x6E, 0x6E
+.array ARRAY_6240
+ .byte 110, 110
.channel CHAN_6242
-/* 0x6242 [0xCE 0x62 0x53 ] */ ldptr UNK_6253
+/* 0x6242 [0xCE 0x62 0x53 ] */ ldptr ARRAY_6253
/* 0x6245 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x6248 [0xCE 0x62 0x55 ] */ ldptr UNK_6255
+/* 0x6248 [0xCE 0x62 0x55 ] */ ldptr ARRAY_6255
/* 0x624B [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x624E [0xB8 0x02 ] */ rand 2
/* 0x6250 [0xFB 0x61 0x34 ] */ jump CHAN_6134
-UNK_6253:
- .byte 0x13, 0x17
+.array ARRAY_6253
+ .byte SF0_EFFECT_19
+ .byte SF0_EFFECT_23
-UNK_6255:
- .byte 0x5A, 0x5A
+.array ARRAY_6255
+ .byte 90, 90
.channel CHAN_6257
/* 0x6257 [0x88 0x62 0x5B ] */ ldlayer 0, LAYER_625B
@@ -14262,24 +14300,25 @@ UNK_6255:
.layer LAYER_6263
/* 0x6263 [0xC2 0x01 ] */ transpose 1
-/* 0x6265 [0x4D 0x57 0x64 ] */ notedv PITCH_BF1, 87, 100
-/* 0x6268 [0x4E 0x61 0x64 ] */ notedv PITCH_B1, 97, 100
-/* 0x626B [0x4F 0x47 0x64 ] */ notedv PITCH_C2, 71, 100
+/* 0x6265 [0x4D 0x57 0x64 ] */ notedv PITCH_BF1, FRAMERATE_CONST(87, 104), 100
+/* 0x6268 [0x4E 0x61 0x64 ] */ notedv PITCH_B1, FRAMERATE_CONST(97, 116), 100
+/* 0x626B [0x4F 0x47 0x64 ] */ notedv PITCH_C2, FRAMERATE_CONST(71, 85), 100
/* 0x626E [0xFF ] */ end
.channel CHAN_626F
-/* 0x626F [0xCE 0x62 0x80 ] */ ldptr UNK_6280
+/* 0x626F [0xCE 0x62 0x80 ] */ ldptr ARRAY_6280
/* 0x6272 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x6275 [0xCE 0x62 0x82 ] */ ldptr UNK_6282
+/* 0x6275 [0xCE 0x62 0x82 ] */ ldptr ARRAY_6282
/* 0x6278 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x627B [0xB8 0x02 ] */ rand 2
/* 0x627D [0xFB 0x61 0x34 ] */ jump CHAN_6134
-UNK_6280:
- .byte 0x0F, 0x10
+.array ARRAY_6280
+ .byte SF0_EFFECT_15
+ .byte SF0_EFFECT_16
-UNK_6282:
- .byte 0x69, 0x69
+.array ARRAY_6282
+ .byte 105, 105
.channel CHAN_6284
/* 0x6284 [0xFB 0x61 0xEA ] */ jump CHAN_61EA
@@ -14290,9 +14329,9 @@ UNK_6282:
.layer LAYER_628B
/* 0x628B [0xC2 0x01 ] */ transpose 1
-/* 0x628D [0x50 0x7F 0x64 ] */ notedv PITCH_DF2, 127, 100
-/* 0x6290 [0x51 0x81 0x18 0x64 ] */ notedv PITCH_D2, 280, 100
-/* 0x6294 [0x52 0x81 0x3E 0x64 ] */ notedv PITCH_EF2, 318, 100
+/* 0x628D [0x50 0x7F 0x64 ] */ notedv PITCH_DF2, FRAMERATE_CONST(127, 152), 100
+/* 0x6290 [0x51 0x81 0x18 0x64 ] */ notedv PITCH_D2, FRAMERATE_CONST(280, 336), 100
+/* 0x6294 [0x52 0x81 0x3E 0x64 ] */ notedv PITCH_EF2, FRAMERATE_CONST(318, 382), 100
/* 0x6298 [0xFF ] */ end
.channel CHAN_6299
@@ -14301,9 +14340,9 @@ UNK_6282:
.layer LAYER_629D
/* 0x629D [0xC2 0x01 ] */ transpose 1
-/* 0x629F [0x53 0x81 0x22 0x64 ] */ notedv PITCH_E2, 290, 100
-/* 0x62A3 [0x54 0x80 0xA3 0x64 ] */ notedv PITCH_F2, 163, 100
-/* 0x62A7 [0x55 0x35 0x64 ] */ notedv PITCH_GF2, 53, 100
+/* 0x629F [0x53 0x81 0x22 0x64 ] */ notedv PITCH_E2, FRAMERATE_CONST(290, 378), 100
+/* 0x62A3 [0x54 0x80 0xA3 0x64 ] */ notedv PITCH_F2, FRAMERATE_CONST(163, 196), 100
+/* 0x62A7 [0x55 0x35 0x64 ] */ notedv PITCH_GF2, FRAMERATE_CONST(53, 64), 100
/* 0x62AA [0xFF ] */ end
.channel CHAN_62AB
@@ -14311,7 +14350,7 @@ UNK_6282:
/* 0x62AE [0xFF ] */ end
.layer LAYER_62AF
-/* 0x62AF [0x77 0x50 0x50 ] */ notedv PITCH_E5, 80, 80
+/* 0x62AF [0x77 0x50 0x50 ] */ notedv PITCH_E5, FRAMERATE_CONST(80, 96), 80
/* 0x62B2 [0xF4 0xFB ] */ rjump LAYER_62AF
.channel CHAN_62B4
@@ -14320,43 +14359,46 @@ UNK_6282:
.layer LAYER_62B8
/* 0x62B8 [0xC2 0x01 ] */ transpose 1
-/* 0x62BA [0x56 0x80 0xB9 0x64 ] */ notedv PITCH_G2, 185, 100
-/* 0x62BE [0x57 0x80 0x86 0x64 ] */ notedv PITCH_AF2, 134, 100
+/* 0x62BA [0x56 0x80 0xB9 0x64 ] */ notedv PITCH_G2, FRAMERATE_CONST(185, 222), 100
+/* 0x62BE [0x57 0x80 0x86 0x64 ] */ notedv PITCH_AF2, FRAMERATE_CONST(134, 161), 100
/* 0x62C2 [0x58 0x74 0x64 ] */ notedv PITCH_A2, 116, 100
/* 0x62C5 [0xFF ] */ end
.channel CHAN_62C6
-/* 0x62C6 [0xCE 0x62 0xCC ] */ ldptr UNK_62CC
+/* 0x62C6 [0xCE 0x62 0xCC ] */ ldptr ARRAY_62CC
/* 0x62C9 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_62CC:
- .byte 0x00, 0x64
+.array ARRAY_62CC
+ .byte SF0_EFFECT_0
+ .byte 100
.channel CHAN_62CE
/* 0x62CE [0x66 ] */ ldio IO_PORT_6
/* 0x62CF [0xC8 0xFF ] */ sub 255
/* 0x62D1 [0x76 ] */ stio IO_PORT_6
/* 0x62D2 [0xC9 0x01 ] */ and 1
-/* 0x62D4 [0xCB 0x62 0xE8 ] */ ldseq UNK_62E8
-/* 0x62D7 [0xC7 0x40 0x64 0xBF ] */ stseq (NOTEDV_OPCODE | PITCH_A0), LAYER_64BF + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x62D4 [0xCB 0x62 0xE8 ] */ ldseq ARRAY_62E8
+/* 0x62D7 [0xC7 0x40 0x64 0xBF ] */ stseq (ASEQ_OP_LAYER_NOTEDV | SF0_EFFECT_0), LAYER_64BF + STSEQ_NOTEDV_OPCODE_PITCH
/* 0x62DB [0xB8 0x02 ] */ rand 2
-/* 0x62DD [0xCB 0x62 0xEA ] */ ldseq UNK_62EA
+/* 0x62DD [0xCB 0x62 0xEA ] */ ldseq ARRAY_62EA
/* 0x62E0 [0xC7 0x00 0x64 0xC1 ] */ stseq 0, LAYER_64BF + STSEQ_NOTEDV_VELOCITY_2
/* 0x62E4 [0x88 0x64 0xBF ] */ ldlayer 0, LAYER_64BF
/* 0x62E7 [0xFF ] */ end
-UNK_62E8:
- .byte 0x1A, 0x1B
+.array ARRAY_62E8
+ .byte SF0_EFFECT_26
+ .byte SF0_EFFECT_27
-UNK_62EA:
- .byte 0x50, 0x55
+.array ARRAY_62EA
+ .byte 80, 85
.channel CHAN_62EC
-/* 0x62EC [0xCE 0x62 0xF2 ] */ ldptr UNK_62F2
+/* 0x62EC [0xCE 0x62 0xF2 ] */ ldptr ARRAY_62F2
/* 0x62EF [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_62F2:
- .byte 0x05, 0x6E
+.array ARRAY_62F2
+ .byte SF0_EFFECT_5
+ .byte 110
.channel CHAN_62F4
/* 0x62F4 [0x88 0x62 0xF8 ] */ ldlayer 0, LAYER_62F8
@@ -14368,72 +14410,82 @@ UNK_62F2:
/* 0x62FD [0xFF ] */ end
.channel CHAN_62FE
-/* 0x62FE [0xCE 0x63 0x04 ] */ ldptr UNK_6304
+/* 0x62FE [0xCE 0x63 0x04 ] */ ldptr ARRAY_6304
/* 0x6301 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_6304:
- .byte 0x04, 0x5F
+.array ARRAY_6304
+ .byte SF0_EFFECT_4
+ .byte 95
.channel CHAN_6306
-/* 0x6306 [0xCE 0x63 0x0C ] */ ldptr UNK_630C
+/* 0x6306 [0xCE 0x63 0x0C ] */ ldptr ARRAY_630C
/* 0x6309 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_630C:
- .byte 0x07, 0x52
+.array ARRAY_630C
+ .byte SF0_EFFECT_7
+ .byte 82
.channel CHAN_630E
-/* 0x630E [0xCE 0x63 0x14 ] */ ldptr UNK_6314
+/* 0x630E [0xCE 0x63 0x14 ] */ ldptr ARRAY_6314
/* 0x6311 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_6314:
- .byte 0x06, 0x5F
+.array ARRAY_6314
+ .byte SF0_EFFECT_6
+ .byte 95
.channel CHAN_6316
-/* 0x6316 [0xCE 0x63 0x1C ] */ ldptr UNK_631C
+/* 0x6316 [0xCE 0x63 0x1C ] */ ldptr ARRAY_631C
/* 0x6319 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_631C:
- .byte 0x18, 0x6E
+.array ARRAY_631C
+ .byte SF0_EFFECT_24
+ .byte 110
.channel CHAN_631E
-/* 0x631E [0xCE 0x63 0x24 ] */ ldptr UNK_6324
+/* 0x631E [0xCE 0x63 0x24 ] */ ldptr ARRAY_6324
/* 0x6321 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_6324:
- .byte 0x3C, 0x64
+.array ARRAY_6324
+ .byte SF0_EFFECT_60
+ .byte 100
.channel CHAN_6326
-/* 0x6326 [0xCE 0x63 0x2C ] */ ldptr UNK_632C
+/* 0x6326 [0xCE 0x63 0x2C ] */ ldptr ARRAY_632C
/* 0x6329 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_632C:
- .byte 0x3D, 0x6E
+.array ARRAY_632C
+ .byte SF0_EFFECT_61
+ .byte 110
.channel CHAN_632E
-/* 0x632E [0xCE 0x63 0x34 ] */ ldptr UNK_6334
+/* 0x632E [0xCE 0x63 0x34 ] */ ldptr ARRAY_6334
/* 0x6331 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_6334:
- .byte 0x0D, 0x71
+.array ARRAY_6334
+ .byte SF0_EFFECT_13
+ .byte 113
.channel CHAN_6336
-/* 0x6336 [0xCE 0x63 0x47 ] */ ldptr UNK_6347
+/* 0x6336 [0xCE 0x63 0x47 ] */ ldptr ARRAY_6347
/* 0x6339 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x633C [0xCE 0x63 0x4B ] */ ldptr UNK_634B
+/* 0x633C [0xCE 0x63 0x4B ] */ ldptr ARRAY_634B
/* 0x633F [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x6342 [0xCC 0x04 ] */ ldi 4
/* 0x6344 [0xFB 0x60 0xF2 ] */ jump CHAN_60F2
-UNK_6347:
- .byte 0x1C, 0x1D, 0x1E, 0x1F
+.array ARRAY_6347
+ .byte SF0_EFFECT_28
+ .byte SF0_EFFECT_29
+ .byte SF0_EFFECT_30
+ .byte SF0_EFFECT_31
-UNK_634B:
- .byte 0x6E, 0x6E, 0x6E, 0x6E
+.array ARRAY_634B
+ .byte 110, 110, 110, 110
.channel CHAN_634F
-/* 0x634F [0xCE 0x63 0x72 ] */ ldptr UNK_6372
+/* 0x634F [0xCE 0x63 0x72 ] */ ldptr ARRAY_6372
/* 0x6352 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x6355 [0xCE 0x63 0x74 ] */ ldptr UNK_6374
+/* 0x6355 [0xCE 0x63 0x74 ] */ ldptr ARRAY_6374
/* 0x6358 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x635B [0xB8 0x02 ] */ rand 2
/* 0x635D [0xFB 0x61 0x34 ] */ jump CHAN_6134
@@ -14453,21 +14505,22 @@ CHAN_6367:
CHAN_6371:
/* 0x6371 [0x76 ] */ stio IO_PORT_6
-UNK_6372:
- .byte 0x20, 0x21
+.array ARRAY_6372
+ .byte SF0_EFFECT_32
+ .byte SF0_EFFECT_33
-UNK_6374:
- .byte 0x6E, 0x6E
+.array ARRAY_6374
+ .byte 110, 110
.channel CHAN_6376
/* 0x6376 [0x66 ] */ ldio IO_PORT_6
/* 0x6377 [0xC8 0xFF ] */ sub 255
/* 0x6379 [0x76 ] */ stio IO_PORT_6
/* 0x637A [0xC9 0x01 ] */ and 1
-/* 0x637C [0xCB 0x63 0x96 ] */ ldseq UNK_6396
-/* 0x637F [0xC7 0x40 0x63 0x90 ] */ stseq (NOTEDV_OPCODE | PITCH_A0), LAYER_6390 + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x637C [0xCB 0x63 0x96 ] */ ldseq ARRAY_6396
+/* 0x637F [0xC7 0x40 0x63 0x90 ] */ stseq (ASEQ_OP_LAYER_NOTEDV | SF0_EFFECT_0), LAYER_6390 + STSEQ_NOTEDV_OPCODE_PITCH
/* 0x6383 [0xB8 0x02 ] */ rand 2
-/* 0x6385 [0xCB 0x63 0x98 ] */ ldseq UNK_6398
+/* 0x6385 [0xCB 0x63 0x98 ] */ ldseq ARRAY_6398
/* 0x6388 [0xC7 0x00 0x63 0x92 ] */ stseq 0, LAYER_6390 + STSEQ_NOTEDV_VELOCITY_2
/* 0x638C [0x88 0x63 0x90 ] */ ldlayer 0, LAYER_6390
/* 0x638F [0xFF ] */ end
@@ -14477,95 +14530,104 @@ UNK_6374:
/* 0x6393 [0xC0 0x30 ] */ ldelay 48
/* 0x6395 [0xFF ] */ end
-UNK_6396:
- .byte 0x22, 0x32
+.array ARRAY_6396
+ .byte SF0_EFFECT_34
+ .byte SF0_EFFECT_50
-UNK_6398:
- .byte 0x64, 0x64
+.array ARRAY_6398
+ .byte 100, 100
.channel CHAN_639A
-/* 0x639A [0xCE 0x63 0xAB ] */ ldptr UNK_63AB
+/* 0x639A [0xCE 0x63 0xAB ] */ ldptr ARRAY_63AB
/* 0x639D [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x63A0 [0xCE 0x63 0xAD ] */ ldptr UNK_63AD
+/* 0x63A0 [0xCE 0x63 0xAD ] */ ldptr ARRAY_63AD
/* 0x63A3 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x63A6 [0xB8 0x02 ] */ rand 2
/* 0x63A8 [0xFB 0x61 0x34 ] */ jump CHAN_6134
-UNK_63AB:
- .byte 0x23, 0x24
+.array ARRAY_63AB
+ .byte SF0_EFFECT_35
+ .byte SF0_EFFECT_36
-UNK_63AD:
- .byte 0x5A, 0x46
+.array ARRAY_63AD
+ .byte 90, 70
.channel CHAN_63AF
-/* 0x63AF [0xCE 0x63 0xC0 ] */ ldptr UNK_63C0
+/* 0x63AF [0xCE 0x63 0xC0 ] */ ldptr ARRAY_63C0
/* 0x63B2 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x63B5 [0xCE 0x63 0xC3 ] */ ldptr UNK_63C3
+/* 0x63B5 [0xCE 0x63 0xC3 ] */ ldptr ARRAY_63C3
/* 0x63B8 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x63BB [0xCC 0x03 ] */ ldi 3
/* 0x63BD [0xFB 0x60 0xF2 ] */ jump CHAN_60F2
-UNK_63C0:
- .byte 0x25, 0x26, 0x27
+.array ARRAY_63C0
+ .byte SF0_EFFECT_37
+ .byte SF0_EFFECT_38
+ .byte SF0_EFFECT_39
-UNK_63C3:
- .byte 0x6E, 0x6E, 0x6E
+.array ARRAY_63C3
+ .byte 110, 110, 110
.channel CHAN_63C6
-/* 0x63C6 [0xCE 0x63 0xD7 ] */ ldptr UNK_63D7
+/* 0x63C6 [0xCE 0x63 0xD7 ] */ ldptr ARRAY_63D7
/* 0x63C9 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x63CC [0xCE 0x63 0xDA ] */ ldptr UNK_63DA
+/* 0x63CC [0xCE 0x63 0xDA ] */ ldptr ARRAY_63DA
/* 0x63CF [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x63D2 [0xCC 0x03 ] */ ldi 3
/* 0x63D4 [0xFB 0x60 0xF2 ] */ jump CHAN_60F2
-UNK_63D7:
- .byte 0x28, 0x29, 0x2A
+.array ARRAY_63D7
+ .byte SF0_EFFECT_40
+ .byte SF0_EFFECT_41
+ .byte SF0_EFFECT_42
-UNK_63DA:
- .byte 0x6E, 0x6E, 0x6E
+.array ARRAY_63DA
+ .byte 110, 110, 110
.channel CHAN_63DD
-/* 0x63DD [0xCE 0x63 0xEE ] */ ldptr UNK_63EE
+/* 0x63DD [0xCE 0x63 0xEE ] */ ldptr ARRAY_63EE
/* 0x63E0 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x63E3 [0xCE 0x63 0xF0 ] */ ldptr UNK_63F0
+/* 0x63E3 [0xCE 0x63 0xF0 ] */ ldptr ARRAY_63F0
/* 0x63E6 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x63E9 [0xB8 0x02 ] */ rand 2
/* 0x63EB [0xFB 0x61 0x34 ] */ jump CHAN_6134
-UNK_63EE:
- .byte 0x2D, 0x2E
+.array ARRAY_63EE
+ .byte SF0_EFFECT_45
+ .byte SF0_EFFECT_46
-UNK_63F0:
- .byte 0x64, 0x64
+.array ARRAY_63F0
+ .byte 100, 100
.channel CHAN_63F2
-/* 0x63F2 [0xCE 0x64 0x03 ] */ ldptr UNK_6403
+/* 0x63F2 [0xCE 0x64 0x03 ] */ ldptr ARRAY_6403
/* 0x63F5 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x63F8 [0xCE 0x64 0x05 ] */ ldptr UNK_6405
+/* 0x63F8 [0xCE 0x64 0x05 ] */ ldptr ARRAY_6405
/* 0x63FB [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x63FE [0xB8 0x02 ] */ rand 2
/* 0x6400 [0xFB 0x61 0x34 ] */ jump CHAN_6134
-UNK_6403:
- .byte 0x2B, 0x2C
+.array ARRAY_6403
+ .byte SF0_EFFECT_43
+ .byte SF0_EFFECT_44
-UNK_6405:
- .byte 0x64, 0x64
+.array ARRAY_6405
+ .byte 100, 100
.channel CHAN_6407
-/* 0x6407 [0xCE 0x64 0x18 ] */ ldptr UNK_6418
+/* 0x6407 [0xCE 0x64 0x18 ] */ ldptr ARRAY_6418
/* 0x640A [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x640D [0xCE 0x64 0x1A ] */ ldptr UNK_641A
+/* 0x640D [0xCE 0x64 0x1A ] */ ldptr ARRAY_641A
/* 0x6410 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x6413 [0xB8 0x02 ] */ rand 2
/* 0x6415 [0xFB 0x61 0x34 ] */ jump CHAN_6134
-UNK_6418:
- .byte 0x2F, 0x30
+.array ARRAY_6418
+ .byte SF0_EFFECT_47
+ .byte SF0_EFFECT_48
-UNK_641A:
- .byte 0x55, 0x55
+.array ARRAY_641A
+ .byte 85, 85
.channel CHAN_641C
/* 0x641C [0x88 0x64 0x20 ] */ ldlayer 0, LAYER_6420
@@ -14581,31 +14643,33 @@ UNK_641A:
.layer LAYER_6428
/* 0x6428 [0xC2 0x01 ] */ transpose 1
-/* 0x642A [0x40 0x62 0x64 ] */ notedv PITCH_A0, 98, 100
-/* 0x642D [0x41 0x6A 0x64 ] */ notedv PITCH_BF0, 106, 100
+/* 0x642A [0x40 0x62 0x64 ] */ notedv PITCH_A0, FRAMERATE_CONST(98, 118), 100
+/* 0x642D [0x41 0x6A 0x64 ] */ notedv PITCH_BF0, FRAMERATE_CONST(106, 127), 100
/* 0x6430 [0x42 0x3A 0x64 ] */ notedv PITCH_B0, 58, 100
/* 0x6433 [0xFF ] */ end
.channel CHAN_6434
-/* 0x6434 [0xCE 0x64 0x45 ] */ ldptr UNK_6445
+/* 0x6434 [0xCE 0x64 0x45 ] */ ldptr ARRAY_6445
/* 0x6437 [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x643A [0xCE 0x64 0x47 ] */ ldptr UNK_6447
+/* 0x643A [0xCE 0x64 0x47 ] */ ldptr ARRAY_6447
/* 0x643D [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x6440 [0xB8 0x02 ] */ rand 2
/* 0x6442 [0xFB 0x61 0x34 ] */ jump CHAN_6134
-UNK_6445:
- .byte 0x2B, 0x2C
+.array ARRAY_6445
+ .byte SF0_EFFECT_43
+ .byte SF0_EFFECT_44
-UNK_6447:
- .byte 0x64, 0x64
+.array ARRAY_6447
+ .byte 100, 100
.channel CHAN_6449
-/* 0x6449 [0xCE 0x64 0x4F ] */ ldptr UNK_644F
+/* 0x6449 [0xCE 0x64 0x4F ] */ ldptr ARRAY_644F
/* 0x644C [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_644F:
- .byte 0x14, 0x64
+.array ARRAY_644F
+ .byte SF0_EFFECT_20
+ .byte 100
.channel CHAN_6451
/* 0x6451 [0x88 0x64 0x55 ] */ ldlayer 0, LAYER_6455
@@ -14613,9 +14677,9 @@ UNK_644F:
.layer LAYER_6455
/* 0x6455 [0xC2 0x01 ] */ transpose 1
-/* 0x6457 [0x43 0x81 0x0B 0x32 ] */ notedv PITCH_C1, 267, 50
-/* 0x645B [0x43 0x80 0xC5 0x32 ] */ notedv PITCH_C1, 197, 50
-/* 0x645F [0x45 0x80 0x87 0x64 ] */ notedv PITCH_D1, 135, 100
+/* 0x6457 [0x43 0x81 0x0B 0x32 ] */ notedv PITCH_C1, FRAMERATE_CONST(267, 320), 50
+/* 0x645B [0x43 0x80 0xC5 0x32 ] */ notedv PITCH_C1, FRAMERATE_CONST(197, 236), 50
+/* 0x645F [0x45 0x80 0x87 0x64 ] */ notedv PITCH_D1, FRAMERATE_CONST(135, 162), 100
/* 0x6463 [0x46 0x21 0x64 ] */ notedv PITCH_EF1, 33, 100
/* 0x6466 [0xFF ] */ end
@@ -14625,8 +14689,8 @@ UNK_644F:
.layer LAYER_646B
/* 0x646B [0xC2 0x01 ] */ transpose 1
-/* 0x646D [0x47 0x80 0xD9 0x64 ] */ notedv PITCH_E1, 217, 100
-/* 0x6471 [0x48 0x62 0x64 ] */ notedv PITCH_F1, 98, 100
+/* 0x646D [0x47 0x80 0xD9 0x64 ] */ notedv PITCH_E1, FRAMERATE_CONST(217, 260), 100
+/* 0x6471 [0x48 0x62 0x64 ] */ notedv PITCH_F1, FRAMERATE_CONST(98, 118), 100
/* 0x6474 [0x49 0x81 0x09 0x64 ] */ notedv PITCH_GF1, 265, 100
/* 0x6478 [0xFF ] */ end
@@ -14635,7 +14699,7 @@ UNK_644F:
/* 0x647C [0xFF ] */ end
.layer LAYER_647D
-/* 0x647D [0x73 0x50 0x50 ] */ notedv PITCH_C5, 80, 80
+/* 0x647D [0x73 0x50 0x50 ] */ notedv PITCH_C5, FRAMERATE_CONST(80, 96), 80
/* 0x6480 [0xF4 0xFB ] */ rjump LAYER_647D
.channel CHAN_6482
@@ -14644,17 +14708,18 @@ UNK_644F:
.layer LAYER_6486
/* 0x6486 [0xC2 0x01 ] */ transpose 1
-/* 0x6488 [0x4A 0x41 0x64 ] */ notedv PITCH_G1, 65, 100
-/* 0x648B [0x4B 0x81 0x0A 0x64 ] */ notedv PITCH_AF1, 266, 100
+/* 0x6488 [0x4A 0x41 0x64 ] */ notedv PITCH_G1, FRAMERATE_CONST(65, 78), 100
+/* 0x648B [0x4B 0x81 0x0A 0x64 ] */ notedv PITCH_AF1, FRAMERATE_CONST(266, 319), 100
/* 0x648F [0x4C 0x53 0x64 ] */ notedv PITCH_A1, 83, 100
/* 0x6492 [0xFF ] */ end
.channel CHAN_6493
-/* 0x6493 [0xCE 0x64 0x99 ] */ ldptr UNK_6499
+/* 0x6493 [0xCE 0x64 0x99 ] */ ldptr ARRAY_6499
/* 0x6496 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_6499:
- .byte 0x1C, 0x64
+.array ARRAY_6499
+ .byte SF0_EFFECT_28
+ .byte 100
.channel CHAN_649B
/* 0x649B [0x88 0x64 0x9F ] */ ldlayer 0, LAYER_649F
@@ -14670,10 +14735,10 @@ UNK_6499:
/* 0x64A6 [0xC8 0xFF ] */ sub 255
/* 0x64A8 [0x76 ] */ stio IO_PORT_6
/* 0x64A9 [0xC9 0x01 ] */ and 1
-/* 0x64AB [0xCB 0x64 0xC5 ] */ ldseq UNK_64C5
-/* 0x64AE [0xC7 0x40 0x64 0xBF ] */ stseq (NOTEDV_OPCODE | PITCH_A0), LAYER_64BF + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x64AB [0xCB 0x64 0xC5 ] */ ldseq ARRAY_64C5
+/* 0x64AE [0xC7 0x40 0x64 0xBF ] */ stseq (ASEQ_OP_LAYER_NOTEDV | SF0_EFFECT_0), LAYER_64BF + STSEQ_NOTEDV_OPCODE_PITCH
/* 0x64B2 [0xB8 0x02 ] */ rand 2
-/* 0x64B4 [0xCB 0x64 0xC7 ] */ ldseq UNK_64C7
+/* 0x64B4 [0xCB 0x64 0xC7 ] */ ldseq ARRAY_64C7
/* 0x64B7 [0xC7 0x00 0x64 0xC1 ] */ stseq 0, LAYER_64BF + STSEQ_NOTEDV_VELOCITY_2
/* 0x64BB [0x88 0x64 0xBF ] */ ldlayer 0, LAYER_64BF
/* 0x64BE [0xFF ] */ end
@@ -14683,18 +14748,20 @@ UNK_6499:
/* 0x64C2 [0xC0 0x30 ] */ ldelay 48
/* 0x64C4 [0xFF ] */ end
-UNK_64C5:
- .byte 0x35, 0x36
+.array ARRAY_64C5
+ .byte SF0_EFFECT_53
+ .byte SF0_EFFECT_54
-UNK_64C7:
- .byte 0x50, 0x50
+.array ARRAY_64C7
+ .byte 80, 80
.channel CHAN_64C9
-/* 0x64C9 [0xCE 0x64 0xCF ] */ ldptr UNK_64CF
+/* 0x64C9 [0xCE 0x64 0xCF ] */ ldptr ARRAY_64CF
/* 0x64CC [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_64CF:
- .byte 0x21, 0x6E
+.array ARRAY_64CF
+ .byte SF0_EFFECT_33
+ .byte 110
.channel CHAN_64D1
/* 0x64D1 [0x88 0x64 0xD5 ] */ ldlayer 0, LAYER_64D5
@@ -14706,53 +14773,60 @@ UNK_64CF:
/* 0x64DA [0xFF ] */ end
.channel CHAN_64DB
-/* 0x64DB [0xCE 0x64 0xE1 ] */ ldptr UNK_64E1
+/* 0x64DB [0xCE 0x64 0xE1 ] */ ldptr ARRAY_64E1
/* 0x64DE [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_64E1:
- .byte 0x20, 0x5F
+.array ARRAY_64E1
+ .byte SF0_EFFECT_32
+ .byte 95
.channel CHAN_64E3
-/* 0x64E3 [0xCE 0x64 0xE9 ] */ ldptr UNK_64E9
+/* 0x64E3 [0xCE 0x64 0xE9 ] */ ldptr ARRAY_64E9
/* 0x64E6 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_64E9:
- .byte 0x23, 0x5A
+.array ARRAY_64E9
+ .byte SF0_EFFECT_35
+ .byte 90
.channel CHAN_64EB
-/* 0x64EB [0xCE 0x64 0xF1 ] */ ldptr UNK_64F1
+/* 0x64EB [0xCE 0x64 0xF1 ] */ ldptr ARRAY_64F1
/* 0x64EE [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_64F1:
- .byte 0x22, 0x64
+.array ARRAY_64F1
+ .byte SF0_EFFECT_34
+ .byte 100
.channel CHAN_64F3
-/* 0x64F3 [0xCE 0x64 0xF9 ] */ ldptr UNK_64F9
+/* 0x64F3 [0xCE 0x64 0xF9 ] */ ldptr ARRAY_64F9
/* 0x64F6 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_64F9:
- .byte 0x31, 0x73
+.array ARRAY_64F9
+ .byte SF0_EFFECT_49
+ .byte 115
.channel CHAN_64FB
-/* 0x64FB [0xCE 0x65 0x01 ] */ ldptr UNK_6501
+/* 0x64FB [0xCE 0x65 0x01 ] */ ldptr ARRAY_6501
/* 0x64FE [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_6501:
- .byte 0x3E, 0x64
+.array ARRAY_6501
+ .byte SF0_EFFECT_62
+ .byte 100
.channel CHAN_6503
-/* 0x6503 [0xCE 0x65 0x09 ] */ ldptr UNK_6509
+/* 0x6503 [0xCE 0x65 0x09 ] */ ldptr ARRAY_6509
/* 0x6506 [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_6509:
- .byte 0x3F, 0x6E
+.array ARRAY_6509
+ .byte SF0_EFFECT_63
+ .byte 110
.channel CHAN_650B
-/* 0x650B [0xCE 0x65 0x11 ] */ ldptr UNK_6511
+/* 0x650B [0xCE 0x65 0x11 ] */ ldptr ARRAY_6511
/* 0x650E [0xFB 0x61 0x3E ] */ jump CHAN_613E
-UNK_6511:
- .byte 0x2C, 0x64
+.array ARRAY_6511
+ .byte SF0_EFFECT_44
+ .byte 100
.channel CHAN_6513
/* 0x6513 [0xCC 0x20 ] */ ldi 32
@@ -14767,9 +14841,9 @@ UNK_6511:
.channel CHAN_6520
/* 0x6520 [0x64 ] */ ldio IO_PORT_SFX_INDEX_LOBITS
-/* 0x6521 [0xC8 0x50 ] */ sub 80
-/* 0x6523 [0xC7 0x19 0x65 0x36 ] */ stseq (NOTEDVG_OPCODE | PITCH_BF2), LAYER_6536 + STSEQ_NOTEDVG_OPCODE_PITCH
-/* 0x6527 [0xCB 0x65 0x3B ] */ ldseq UNK_653B
+/* 0x6521 [0xC8 0x50 ] */ sub NA_SE_VO_TA_SLEEP & 0xFF
+/* 0x6523 [0xC7 0x19 0x65 0x36 ] */ stseq (ASEQ_OP_LAYER_NOTEDVG | PITCH_BF2), LAYER_6536 + STSEQ_NOTEDVG_OPCODE_PITCH
+/* 0x6527 [0xCB 0x65 0x3B ] */ ldseq ARRAY_653B
/* 0x652A [0xC7 0x00 0x65 0x38 ] */ stseq 0, LAYER_6536 + STSEQ_NOTEDVG_DELAY_LO
/* 0x652E [0x88 0x65 0x34 ] */ ldlayer 0, LAYER_6534
/* 0x6531 [0xDC 0x60 ] */ panweight 96
@@ -14781,16 +14855,16 @@ LAYER_6536:
/* 0x6536 [0x21 0x00 0x64 0x00 ] */ notedvg PITCH_GF3, 0, 100, 0
/* 0x653A [0xFF ] */ end
-UNK_653B:
- .byte 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x6E, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64
- .byte 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64
- .byte 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x6E
+.array ARRAY_653B
+ .byte 100, 100, 100, 100, 100, 100, 100, 100, 110, 100, 100, 100, 100, 100, 100, 100
+ .byte 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100
+ .byte 100, 100, 100, 100, 100, 100, 110
.channel CHAN_6562
/* 0x6562 [0x64 ] */ ldio IO_PORT_SFX_INDEX_LOBITS
-/* 0x6563 [0xC8 0x77 ] */ sub 119
-/* 0x6565 [0xC7 0x00 0x65 0x76 ] */ stseq (NOTEDVG_OPCODE | PITCH_A0), LAYER_6576 + STSEQ_NOTEDVG_OPCODE_PITCH
-/* 0x6569 [0xCB 0x65 0x7B ] */ ldseq UNK_657B
+/* 0x6563 [0xC8 0x77 ] */ sub NA_SE_VO_Z1_OPENDOOR & 0xFF
+/* 0x6565 [0xC7 0x00 0x65 0x76 ] */ stseq (ASEQ_OP_LAYER_NOTEDVG | PITCH_A0), LAYER_6576 + STSEQ_NOTEDVG_OPCODE_PITCH
+/* 0x6569 [0xCB 0x65 0x7B ] */ ldseq ARRAY_657B
/* 0x656C [0xC7 0x00 0x65 0x78 ] */ stseq 0, LAYER_6576 + STSEQ_NOTEDVG_DELAY_LO
/* 0x6570 [0x88 0x65 0x74 ] */ ldlayer 0, LAYER_6574
/* 0x6573 [0xFF ] */ end
@@ -14801,16 +14875,16 @@ LAYER_6576:
/* 0x6576 [0x00 0x00 0x64 0x00 ] */ notedvg PITCH_A0, 0, 100, 0
/* 0x657A [0xFF ] */ end
-UNK_657B:
- .byte 0x64, 0x64, 0x64, 0x64, 0x64, 0x64
+.array ARRAY_657B
+ .byte 100, 100, 100, 100, 100, 100
.channel CHAN_6581
/* 0x6581 [0xCC 0x20 ] */ ldi 32
/* 0x6583 [0x71 ] */ stio IO_PORT_1
/* 0x6584 [0x89 0x65 0x98 ] */ ldlayer 1, LAYER_6598
-/* 0x6587 [0xCE 0x65 0xA7 ] */ ldptr UNK_65A7
+/* 0x6587 [0xCE 0x65 0xA7 ] */ ldptr ARRAY_65A7
/* 0x658A [0xCF 0x61 0x1B ] */ stptrtoseq CHAN_611A + STSEQ_PTR_LDSEQ
-/* 0x658D [0xCE 0x65 0xAA ] */ ldptr UNK_65AA
+/* 0x658D [0xCE 0x65 0xAA ] */ ldptr ARRAY_65AA
/* 0x6590 [0xCF 0x61 0x23 ] */ stptrtoseq CHAN_6122 + STSEQ_PTR_LDSEQ
/* 0x6593 [0xCC 0x03 ] */ ldi 3
/* 0x6595 [0xFB 0x60 0xF2 ] */ jump CHAN_60F2
@@ -14823,11 +14897,13 @@ UNK_657B:
/* 0x65A3 [0x78 0x30 0x41 ] */ notedv PITCH_F5, 48, 65
/* 0x65A6 [0xFF ] */ end
-UNK_65A7:
- .byte 0x39, 0x3A, 0x3B
+.array ARRAY_65A7
+ .byte SF0_EFFECT_57
+ .byte SF0_EFFECT_58
+ .byte SF0_EFFECT_59
-UNK_65AA:
- .byte 0x64, 0x5F, 0x69
+.array ARRAY_65AA
+ .byte 100, 95, 105
.balign 16
diff --git a/assets/audio/sequences/seq_1.prg.seq b/assets/audio/sequences/seq_1.prg.seq
index 0babce8065..02994cf733 100644
--- a/assets/audio/sequences/seq_1.prg.seq
+++ b/assets/audio/sequences/seq_1.prg.seq
@@ -454,7 +454,7 @@ CHAN_0308:
/* 0x0319 [0xC7 0x60 0x10 0x00 ] */ stseq 96, ENVELOPE_0FFA + STSEQ_ENVELOPE_POINT(3)
CHAN_031D:
/* 0x031D [0xB8 0x18 ] */ rand 24
-/* 0x031F [0xC7 0x62 0x03 0x6F ] */ stseq (NOTEDV_OPCODE | PITCH_G3), LAYER_036F + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x031F [0xC7 0x62 0x03 0x6F ] */ stseq (ASEQ_OP_LAYER_NOTEDV | PITCH_G3), LAYER_036F + STSEQ_NOTEDV_OPCODE_PITCH
/* 0x0323 [0xCC 0x40 ] */ ldi 64
/* 0x0325 [0x53 ] */ subio IO_PORT_3
/* 0x0326 [0xC7 0x00 0x03 0x2B ] */ stseq 0, STSEQ_HERE + STSEQ_RAND
@@ -482,7 +482,7 @@ CHAN_0335:
/* 0x034B [0xC8 0xFF ] */ sub 255
/* 0x034D [0xC7 0x64 0x03 0x87 ] */ stseq 100, LAYER_0385 + STSEQ_NOTEDV_VELOCITY_2
/* 0x0351 [0xC7 0x64 0x03 0x8A ] */ stseq 100, LAYER_0388 + STSEQ_NOTEDV_VELOCITY_2
-/* 0x0355 [0xC7 0x67 0x03 0x85 ] */ stseq (NOTEDV_OPCODE | PITCH_C4), LAYER_0385 + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x0355 [0xC7 0x67 0x03 0x85 ] */ stseq (ASEQ_OP_LAYER_NOTEDV | PITCH_C4), LAYER_0385 + STSEQ_NOTEDV_OPCODE_PITCH
/* 0x0359 [0xFF ] */ end
UNK_035A:
@@ -1664,7 +1664,7 @@ CHAN_0E72:
/* 0x0E84 [0xB8 0x02 ] */ rand 2
/* 0x0E86 [0x73 ] */ stio IO_PORT_3
CHAN_0E87:
-/* 0x0E87 [0xC7 0x67 0x0E 0xCF ] */ stseq (NOTEDV_OPCODE | PITCH_C4), LAYER_0ECF + STSEQ_NOTEDV_OPCODE_PITCH
+/* 0x0E87 [0xC7 0x67 0x0E 0xCF ] */ stseq (ASEQ_OP_LAYER_NOTEDV | PITCH_C4), LAYER_0ECF + STSEQ_NOTEDV_OPCODE_PITCH
/* 0x0E8B [0xB8 0x1E ] */ rand 30
/* 0x0E8D [0xC7 0x31 0x0E 0xCC ] */ stseq 49, LAYER_0ECB + STSEQ_NOTEPAN
/* 0x0E91 [0x76 ] */ stio IO_PORT_6
diff --git a/assets/audio/sequences/seq_109.prg.seq b/assets/audio/sequences/seq_109.prg.seq
index 77e678369a..ee3e8e0aa4 100644
--- a/assets/audio/sequences/seq_109.prg.seq
+++ b/assets/audio/sequences/seq_109.prg.seq
@@ -1,6 +1,7 @@
#include "aseq.h"
#include "Soundfont_1.h"
#include "Soundfont_0.h"
+#include "versions.h"
.startseq Sequence_109
@@ -53,8 +54,8 @@ CHAN_002D:
/* 0x0047 [0xC6 0x44 ] */ instr SF0_INST_68
/* 0x0049 [0xC2 0x18 ] */ transpose 24
/* 0x004B [0xCB 0x07 0x8A 0xE6 ] */ env ENVELOPE_078A, 230
-/* 0x004F [0x70 0x81 0x0E 0x50 ] */ notedv PITCH_A4, 270, 80
-/* 0x0053 [0x7C 0x81 0x2C 0x50 ] */ notedv PITCH_A5, 300, 80
+/* 0x004F [0x70 0x81 0x0E 0x50 ] */ notedv PITCH_A4, FRAMERATE_CONST(270, 324), 80
+/* 0x0053 [0x7C 0x81 0x2C 0x50 ] */ notedv PITCH_A5, FRAMERATE_CONST(300, 360), 80
/* 0x0057 [0xFF ] */ end
.layer LAYER_0058
@@ -64,8 +65,8 @@ CHAN_002D:
/* 0x005E [0xC2 0x30 ] */ transpose 48
/* 0x0060 [0xCB 0x07 0x8A 0xB4 ] */ env ENVELOPE_078A, 180
/* 0x0064 [0xC7 0x81 0x38 0xFF ] */ portamento 0x81, PITCH_F5, 255
-/* 0x0068 [0x78 0x80 0xFA 0x48 ] */ notedv PITCH_F5, 250, 72
-/* 0x006C [0x7C 0x81 0x40 0x48 ] */ notedv PITCH_A5, 320, 72
+/* 0x0068 [0x78 0x80 0xFA 0x48 ] */ notedv PITCH_F5, FRAMERATE_CONST(250, 300), 72
+/* 0x006C [0x7C 0x81 0x40 0x48 ] */ notedv PITCH_A5, FRAMERATE_CONST(320, 384), 72
/* 0x0070 [0xFF ] */ end
.layer LAYER_0071
@@ -73,7 +74,7 @@ CHAN_002D:
/* 0x0073 [0xC6 0x2E ] */ instr SF0_INST_46
/* 0x0075 [0xCB 0x07 0x8A 0xE6 ] */ env ENVELOPE_078A, 230
/* 0x0079 [0xC7 0x01 0x0F 0x85 0xC8] */ portamento 0x01, PITCH_C2, 1480
-/* 0x007E [0x73 0x82 0x3A 0x40 ] */ notedv PITCH_C5, 570, 64
+/* 0x007E [0x73 0x82 0x3A 0x40 ] */ notedv PITCH_C5, FRAMERATE_CONST(570, 684), 64
/* 0x0082 [0xFF ] */ end
.channel CHAN_0083
@@ -91,7 +92,7 @@ CHAN_002D:
/* 0x0099 [0xC6 0x44 ] */ instr SF0_INST_68
/* 0x009B [0xCB 0x08 0xD2 0xDD ] */ env ENVELOPE_08D2, 221
/* 0x009F [0xC2 0x18 ] */ transpose 24
-/* 0x00A1 [0x73 0x81 0x90 0x69 ] */ notedv PITCH_C5, 400, 105
+/* 0x00A1 [0x73 0x81 0x90 0x69 ] */ notedv PITCH_C5, FRAMERATE_CONST(400, 480), 105
/* 0x00A5 [0xFF ] */ end
.layer LAYER_00A6
@@ -99,17 +100,17 @@ CHAN_002D:
/* 0x00A8 [0xC6 0x45 ] */ instr SF0_INST_69
/* 0x00AA [0xCB 0x09 0x0A 0xE0 ] */ env ENVELOPE_090A, 224
/* 0x00AE [0xC7 0x81 0x03 0xFF ] */ portamento 0x81, PITCH_C1, 255
-/* 0x00B2 [0x5F 0x81 0x2C 0x41 ] */ notedv PITCH_E3, 300, 65
+/* 0x00B2 [0x5F 0x81 0x2C 0x41 ] */ notedv PITCH_E3, FRAMERATE_CONST(300, 360), 65
/* 0x00B6 [0xFF ] */ end
.layer LAYER_00B7
/* 0x00B7 [0xC6 0x08 ] */ instr SF0_INST_8
/* 0x00B9 [0xC7 0x81 0x18 0x19 ] */ portamento 0x81, PITCH_A2, 25
-/* 0x00BD [0x5D 0x46 0x55 ] */ notedv PITCH_D3, 70, 85
-/* 0x00C0 [0xC0 0x80 0xC8 ] */ ldelay 200
+/* 0x00BD [0x5D 0x46 0x55 ] */ notedv PITCH_D3, FRAMERATE_CONST(70, 84), 85
+/* 0x00C0 [0xC0 0x80 0xC8 ] */ ldelay FRAMERATE_CONST(200, 240)
/* 0x00C3 [0xCB 0x09 0x16 0xDD ] */ env ENVELOPE_0916, 221
/* 0x00C7 [0xC7 0x81 0x1B 0x19 ] */ portamento 0x81, PITCH_C3, 25
-/* 0x00CB [0x60 0x80 0x96 0x55 ] */ notedv PITCH_F3, 150, 85
+/* 0x00CB [0x60 0x80 0x96 0x55 ] */ notedv PITCH_F3, FRAMERATE_CONST(150, 180), 85
/* 0x00CF [0xFF ] */ end
.channel CHAN_00D0
@@ -125,8 +126,8 @@ CHAN_002D:
/* 0x00E0 [0xC6 0x2C ] */ instr SF0_INST_44
/* 0x00E2 [0xCF 0xDD ] */ releaserate 221
/* 0x00E4 [0xC7 0x84 0x16 0x7F ] */ portamento 0x84, PITCH_G2, 127
-/* 0x00E8 [0x70 0x60 0x55 ] */ notedv PITCH_A4, 96, 85
-/* 0x00EB [0x72 0x7F 0x5F ] */ notedv PITCH_B4, 127, 95
+/* 0x00E8 [0x70 0x60 0x55 ] */ notedv PITCH_A4, FRAMERATE_CONST(96, 115), 85
+/* 0x00EB [0x72 0x7F 0x5F ] */ notedv PITCH_B4, FRAMERATE_CONST(127, 152), 95
/* 0x00EE [0xFF ] */ end
.layer LAYER_00EF
@@ -140,11 +141,11 @@ CHAN_002D:
/* 0x00FB [0xCF 0xDD ] */ releaserate 221
LAYER_00FD:
/* 0x00FD [0xC7 0x85 0x2E 0xFF ] */ portamento 0x85, PITCH_G4, 255
-/* 0x0101 [0x58 0x3C 0x5A ] */ notedv PITCH_A2, 60, 90
+/* 0x0101 [0x58 0x3C 0x5A ] */ notedv PITCH_A2, FRAMERATE_CONST(60, 72), 90
/* 0x0104 [0xCB 0x07 0x12 0xDD ] */ env ENVELOPE_0712, 221
-/* 0x0108 [0x64 0x24 0x5A ] */ notedv PITCH_A3, 36, 90
+/* 0x0108 [0x64 0x24 0x5A ] */ notedv PITCH_A3, FRAMERATE_CONST(36, 43), 90
/* 0x010B [0xC7 0x85 0x33 0xFF ] */ portamento 0x85, PITCH_C5, 255
-/* 0x010F [0x5B 0x7F 0x5A ] */ notedv PITCH_C3, 127, 90
+/* 0x010F [0x5B 0x7F 0x5A ] */ notedv PITCH_C3, FRAMERATE_CONST(127, 152), 90
/* 0x0112 [0xFF ] */ end
.channel CHAN_0113
@@ -156,19 +157,19 @@ LAYER_00FD:
/* 0x011A [0xC2 0x24 ] */ transpose 36
/* 0x011C [0xC6 0x2E ] */ instr SF0_INST_46
/* 0x011E [0xCB 0x08 0x7A 0xB4 ] */ env ENVELOPE_087A, 180
-/* 0x0122 [0x6B 0x82 0x26 0x46 ] */ notedv PITCH_E4, 550, 70
+/* 0x0122 [0x6B 0x82 0x26 0x46 ] */ notedv PITCH_E4, FRAMERATE_CONST(550, 660), 70
/* 0x0126 [0xFF ] */ end
.layer LAYER_0127
/* 0x0127 [0xC2 0x1E ] */ transpose 30
/* 0x0129 [0xC6 0x44 ] */ instr SF0_INST_68
/* 0x012B [0xCB 0x08 0x7A 0xDD ] */ env ENVELOPE_087A, 221
-/* 0x012F [0x60 0x80 0x9B 0x64 ] */ notedv PITCH_F3, 155, 100
-/* 0x0133 [0x6C 0x7F 0x64 ] */ notedv PITCH_F4, 127, 100
+/* 0x012F [0x60 0x80 0x9B 0x64 ] */ notedv PITCH_F3, FRAMERATE_CONST(155, 186), 100
+/* 0x0133 [0x6C 0x7F 0x64 ] */ notedv PITCH_F4, FRAMERATE_CONST(127, 152), 100
/* 0x0136 [0xC2 0x24 ] */ transpose 36
/* 0x0138 [0xC6 0x44 ] */ instr SF0_INST_68
/* 0x013A [0xCB 0x08 0x8A 0xDD ] */ env ENVELOPE_088A, 221
-/* 0x013E [0x67 0x80 0xF8 0x64 ] */ notedv PITCH_C4, 248, 100
+/* 0x013E [0x67 0x80 0xF8 0x64 ] */ notedv PITCH_C4, FRAMERATE_CONST(248, 288), 100
/* 0x0142 [0xFF ] */ end
.channel CHAN_0143
@@ -178,7 +179,7 @@ LAYER_00FD:
/* 0x014C [0xFF ] */ end
.layer LAYER_014D
-/* 0x014D [0xC0 0x81 0x90 ] */ ldelay 400
+/* 0x014D [0xC0 0x81 0x90 ] */ ldelay FRAMERATE_CONST(400, 480)
/* 0x0150 [0xFF ] */ end
.channel CHAN_0151
@@ -195,20 +196,20 @@ LAYER_00FD:
.layer LAYER_0165
/* 0x0165 [0xCB 0x07 0x8A 0xE7 ] */ env ENVELOPE_078A, 231
/* 0x0169 [0xC7 0x81 0x26 0xFF ] */ portamento 0x81, PITCH_B3, 255
-/* 0x016D [0x60 0x82 0x4E 0x4B ] */ notedv PITCH_F3, 590, 75
+/* 0x016D [0x60 0x82 0x4E 0x4B ] */ notedv PITCH_F3, FRAMERATE_CONST(590, 708), 75
/* 0x0171 [0xFF ] */ end
.layer LAYER_0172
-/* 0x0172 [0xC0 0x81 0x5E ] */ ldelay 350
+/* 0x0172 [0xC0 0x81 0x5E ] */ ldelay FRAMERATE_CONST(350, 420)
/* 0x0175 [0xCB 0x07 0x92 0xE7 ] */ env ENVELOPE_0792, 231
/* 0x0179 [0xC7 0x81 0x03 0xFF ] */ portamento 0x81, PITCH_C1, 255
-/* 0x017D [0x5B 0x80 0xF0 0x64 ] */ notedv PITCH_C3, 240, 100
+/* 0x017D [0x5B 0x80 0xF0 0x64 ] */ notedv PITCH_C3, FRAMERATE_CONST(240, 288), 100
/* 0x0181 [0xFF ] */ end
.layer LAYER_0182
/* 0x0182 [0xC6 0x4D ] */ instr SF0_INST_77
/* 0x0184 [0xCB 0x07 0x92 0xE7 ] */ env ENVELOPE_0792, 231
-/* 0x0188 [0x63 0x82 0x08 0x5C ] */ notedv PITCH_AF3, 520, 92
+/* 0x0188 [0x63 0x82 0x08 0x5C ] */ notedv PITCH_AF3, FRAMERATE_CONST(520, 624), 92
/* 0x018C [0xFF ] */ end
.channel CHAN_018D
@@ -398,7 +399,7 @@ LAYER_02D0:
/* 0x02E7 [0xFF ] */ end
.layer LAYER_02E8
-/* 0x02E8 [0xC0 0x87 0x50 ] */ ldelay 1872
+/* 0x02E8 [0xC0 0x87 0x50 ] */ ldelay FRAMERATE_CONST(1872, 2247)
/* 0x02EB [0xFF ] */ end
.layer LAYER_02EC
@@ -416,30 +417,30 @@ LAYER_02D0:
.channel CHAN_0300
/* 0x0300 [0xC6 0x01 ] */ font Soundfont_1_ID
/* 0x0302 [0x21 0x03 0x44 ] */ ldchan 1, CHAN_0344
-/* 0x0305 [0xFD 0x81 0x02 ] */ delay 258
+/* 0x0305 [0xFD 0x81 0x02 ] */ delay FRAMERATE_CONST(258, 310)
/* 0x0308 [0x88 0x03 0x12 ] */ ldlayer 0, LAYER_0312
/* 0x030B [0x89 0x03 0x2C ] */ ldlayer 1, LAYER_032C
-/* 0x030E [0xFD 0x84 0x7E ] */ delay 1150
+/* 0x030E [0xFD 0x84 0x7E ] */ delay FRAMERATE_CONST(1150, 1380)
/* 0x0311 [0xFF ] */ end
.layer LAYER_0312
/* 0x0312 [0xC6 0x03 ] */ instr SF1_INST_3
/* 0x0314 [0xCB 0x09 0x16 0xDD ] */ env ENVELOPE_0916, 221
-/* 0x0318 [0x2D 0x64 0x5A 0x32 ] */ notedvg PITCH_GF4, 100, 90, 50
+/* 0x0318 [0x2D 0x64 0x5A 0x32 ] */ notedvg PITCH_GF4, FRAMERATE_CONST(100, 120), 90, 50
/* 0x031C [0xC7 0x81 0x30 0xFF ] */ portamento 0x81, PITCH_A4, 255
-/* 0x0320 [0x67 0x64 0x5A ] */ notedv PITCH_C4, 100, 90
+/* 0x0320 [0x67 0x64 0x5A ] */ notedv PITCH_C4, FRAMERATE_CONST(100, 120), 90
/* 0x0323 [0xC7 0x81 0x32 0x64 ] */ portamento 0x81, PITCH_B4, 100
-/* 0x0327 [0x4F 0x81 0xF4 0x5A ] */ notedv PITCH_C2, 500, 90
+/* 0x0327 [0x4F 0x81 0xF4 0x5A ] */ notedv PITCH_C2, FRAMERATE_CONST(500, 600), 90
/* 0x032B [0xFF ] */ end
.layer LAYER_032C
/* 0x032C [0xC6 0x29 ] */ instr SF1_INST_41
/* 0x032E [0xCF 0xDD ] */ releaserate 221
-/* 0x0330 [0x2B 0x64 0x5A 0x32 ] */ notedvg PITCH_E4, 100, 90, 50
+/* 0x0330 [0x2B 0x64 0x5A 0x32 ] */ notedvg PITCH_E4, FRAMERATE_CONST(100, 120), 90, 50
/* 0x0334 [0xC7 0x81 0x2E 0xFF ] */ portamento 0x81, PITCH_G4, 255
-/* 0x0338 [0x66 0x64 0x5A ] */ notedv PITCH_B3, 100, 90
+/* 0x0338 [0x66 0x64 0x5A ] */ notedv PITCH_B3, FRAMERATE_CONST(100, 120), 90
/* 0x033B [0xC7 0x81 0x30 0x64 ] */ portamento 0x81, PITCH_A4, 100
-/* 0x033F [0x4E 0x81 0xF4 0x5A ] */ notedv PITCH_B1, 500, 90
+/* 0x033F [0x4E 0x81 0xF4 0x5A ] */ notedv PITCH_B1, FRAMERATE_CONST(500, 600), 90
/* 0x0343 [0xFF ] */ end
.channel CHAN_0344
@@ -455,9 +456,9 @@ LAYER_02D0:
/* 0x0357 [0xD7 0x60 ] */ vibfreq 96
/* 0x0359 [0xD8 0x54 ] */ vibdepth 84
/* 0x035B [0xDB 0xF4 ] */ transpose -12
-/* 0x035D [0xFD 0x81 0x02 ] */ delay 258
+/* 0x035D [0xFD 0x81 0x02 ] */ delay FRAMERATE_CONST(258, 310)
/* 0x0360 [0xDB 0x04 ] */ transpose 4
-/* 0x0362 [0xFD 0x84 0x7E ] */ delay 1150
+/* 0x0362 [0xFD 0x84 0x7E ] */ delay FRAMERATE_CONST(1150, 1380)
CHAN_0365:
/* 0x0365 [0xFE ] */ delay1
/* 0x0366 [0x80 ] */ testlayer 0
@@ -489,7 +490,7 @@ CHAN_0365:
/* 0x038E [0xC6 0x3C ] */ instr SF0_INST_60
/* 0x0390 [0xCB 0x07 0x8A 0xF1 ] */ env ENVELOPE_078A, 241
/* 0x0394 [0xC7 0x81 0x03 0xE0 ] */ portamento 0x81, PITCH_C1, 224
-/* 0x0398 [0x72 0x80 0xC6 0x50 ] */ notedv PITCH_B4, 198, 80
+/* 0x0398 [0x72 0x80 0xC6 0x50 ] */ notedv PITCH_B4, FRAMERATE_CONST(198, 238), 80
/* 0x039C [0xFF ] */ end
.layer LAYER_039D
@@ -497,7 +498,7 @@ CHAN_0365:
/* 0x039F [0xCB 0x08 0x6E 0xDD ] */ env ENVELOPE_086E, 221
/* 0x03A3 [0xC2 0x0C ] */ transpose 12
/* 0x03A5 [0xC7 0x81 0x02 0xFF ] */ portamento 0x81, PITCH_B0, 255
-/* 0x03A9 [0x7E 0x80 0xFA 0x55 ] */ notedv PITCH_B5, 250, 85
+/* 0x03A9 [0x7E 0x80 0xFA 0x55 ] */ notedv PITCH_B5, FRAMERATE_CONST(250, 300), 85
/* 0x03AD [0xFF ] */ end
.channel CHAN_03AE
@@ -515,12 +516,12 @@ CHAN_0365:
/* 0x03C5 [0xC6 0x46 ] */ instr SF0_INST_70
/* 0x03C7 [0xCB 0x06 0xCE 0xF5 ] */ env ENVELOPE_06CE, 245
/* 0x03CB [0xC7 0x82 0x1B 0xFF ] */ portamento 0x82, PITCH_C3, 255
-/* 0x03CF [0x67 0x80 0x96 0x50 ] */ notedv PITCH_C4, 150, 80
-/* 0x03D3 [0xC0 0x80 0x96 ] */ ldelay 150
+/* 0x03CF [0x67 0x80 0x96 0x50 ] */ notedv PITCH_C4, FRAMERATE_CONST(150, 180), 80
+/* 0x03D3 [0xC0 0x80 0x96 ] */ ldelay FRAMERATE_CONST(150, 180)
/* 0x03D6 [0xFF ] */ end
.layer LAYER_03D7
-/* 0x03D7 [0x5B 0x64 0x55 ] */ notedv PITCH_C3, 100, 85
+/* 0x03D7 [0x5B 0x64 0x55 ] */ notedv PITCH_C3, FRAMERATE_CONST(100, 120), 85
/* 0x03DA [0xFF ] */ end
.layer LAYER_03DB
@@ -528,19 +529,21 @@ CHAN_0365:
/* 0x03DD [0xC6 0x0C ] */ instr SF0_INST_12
/* 0x03DF [0xCB 0x07 0x8A 0xC8 ] */ env ENVELOPE_078A, 200
/* 0x03E3 [0xC7 0x82 0x33 0xB4 ] */ portamento 0x82, PITCH_C5, 180
-/* 0x03E7 [0x7E 0x80 0xB4 0x4B ] */ notedv PITCH_B5, 180, 75
+/* 0x03E7 [0x7E 0x80 0xB4 0x4B ] */ notedv PITCH_B5, FRAMERATE_CONST(180, 216), 75
/* 0x03EB [0xFF ] */ end
.layer LAYER_03EC
/* 0x03EC [0xC6 0x2A ] */ instr SF0_INST_42
/* 0x03EE [0xC7 0x81 0x22 0xD0 ] */ portamento 0x81, PITCH_G3, 208
-/* 0x03F2 [0x5D 0x80 0xF0 0x69 ] */ notedv PITCH_D3, 240, 105
+/* 0x03F2 [0x5D 0x80 0xF0 0x69 ] */ notedv PITCH_D3, FRAMERATE_CONST(240, 288), 105
/* 0x03F6 [0xFF ] */ end
+#if !OOT_PAL_N64
/* 0x03F7 [0xC6 0x27 ] */ instr SF0_INST_39
/* 0x03F9 [0xC7 0x81 0x0A 0x2C ] */ portamento 0x81, PITCH_G1, 44
-/* 0x03FD [0x56 0x80 0x8C 0x4B ] */ notedv PITCH_G2, 140, 75
+/* 0x03FD [0x56 0x80 0x8C 0x4B ] */ notedv PITCH_G2, FRAMERATE_CONST(140, 168), 75
/* 0x0401 [0xFF ] */ end
+#endif
.channel CHAN_0402
/* 0x0402 [0xDC 0x30 ] */ panweight 48
@@ -553,7 +556,7 @@ CHAN_0365:
/* 0x0414 [0x8B 0x04 0x3B ] */ ldlayer 3, LAYER_043B
/* 0x0417 [0xD7 0x14 ] */ vibfreq 20
/* 0x0419 [0xD8 0x46 ] */ vibdepth 70
-/* 0x041B [0xFD 0x60 ] */ delay 96
+/* 0x041B [0xFD 0x60 ] */ delay FRAMERATE_CONST(96, 115)
/* 0x041D [0xE1 0x14 0x96 0x3C ] */ vibfreqgrad 20, 150, 60
/* 0x0421 [0xD8 0x46 ] */ vibdepth 70
/* 0x0423 [0xFF ] */ end
@@ -563,16 +566,16 @@ CHAN_0365:
/* 0x0426 [0xCB 0x07 0x8A 0xD3 ] */ env ENVELOPE_078A, 211
/* 0x042A [0xC4 ] */ legato
/* 0x042B [0xC7 0x85 0x03 0xFF ] */ portamento 0x85, PITCH_C1, 255
-/* 0x042F [0x54 0x60 0x64 ] */ notedv PITCH_F2, 96, 100
-/* 0x0432 [0x54 0x80 0xC8 0x64 ] */ notedv PITCH_F2, 200, 100
-/* 0x0436 [0x60 0x81 0x2C 0x4A ] */ notedv PITCH_F3, 300, 74
+/* 0x042F [0x54 0x60 0x64 ] */ notedv PITCH_F2, FRAMERATE_CONST(96, 115), 100
+/* 0x0432 [0x54 0x80 0xC8 0x64 ] */ notedv PITCH_F2, FRAMERATE_CONST(200, 240), 100
+/* 0x0436 [0x60 0x81 0x2C 0x4A ] */ notedv PITCH_F3, FRAMERATE_CONST(300, 360), 74
/* 0x043A [0xFF ] */ end
.layer LAYER_043B
/* 0x043B [0xC6 0x52 ] */ instr SF0_INST_82
/* 0x043D [0xC2 0x18 ] */ transpose 24
/* 0x043F [0xCA 0x58 ] */ notepan 88
-/* 0x0441 [0xC0 0x04 ] */ ldelay 4
+/* 0x0441 [0xC0 0x04 ] */ ldelay FRAMERATE_CONST(4, 5)
/* 0x0443 [0xF4 0x0D ] */ rjump LAYER_0452
.layer LAYER_0445
@@ -588,9 +591,9 @@ LAYER_0452:
/* 0x0452 [0xCB 0x07 0x8A 0xD3 ] */ env ENVELOPE_078A, 211
/* 0x0456 [0xC4 ] */ legato
/* 0x0457 [0xC7 0x85 0x0F 0xFF ] */ portamento 0x85, PITCH_C2, 255
-/* 0x045B [0x60 0x60 0x4A ] */ notedv PITCH_F3, 96, 74
-/* 0x045E [0x60 0x80 0xC8 0x4A ] */ notedv PITCH_F3, 200, 74
-/* 0x0462 [0x6C 0x81 0x2C 0x4A ] */ notedv PITCH_F4, 300, 74
+/* 0x045B [0x60 0x60 0x4A ] */ notedv PITCH_F3, FRAMERATE_CONST(96, 115), 74
+/* 0x045E [0x60 0x80 0xC8 0x4A ] */ notedv PITCH_F3, FRAMERATE_CONST(200, 240), 74
+/* 0x0462 [0x6C 0x81 0x2C 0x4A ] */ notedv PITCH_F4, FRAMERATE_CONST(300, 360), 74
/* 0x0466 [0xFF ] */ end
.channel CHAN_0467
@@ -600,29 +603,31 @@ LAYER_0452:
/* 0x046C [0xE9 0x0E ] */ notepri 0, 14
/* 0x046E [0xE5 0x01 ] */ reverbidx 1
/* 0x0470 [0xD4 0x28 ] */ reverb 40
+#if OOT_VERSION >= PAL_1_0
/* 0x0472 [0xC6 0x00 ] */ font Soundfont_0_ID
+#endif
/* 0x0474 [0xFC 0x01 0x56 ] */ call CHAN_0156
/* 0x0477 [0xFD 0x60 ] */ delay 96
/* 0x0479 [0xFC 0x01 0x56 ] */ call CHAN_0156
/* 0x047C [0x89 0x04 0x86 ] */ ldlayer 1, LAYER_0486
/* 0x047F [0x8B 0x04 0x98 ] */ ldlayer 3, LAYER_0498
-/* 0x0482 [0xFD 0x83 0xE8 ] */ delay 1000
+/* 0x0482 [0xFD 0x83 0xE8 ] */ delay FRAMERATE_CONST(1000, 1200)
/* 0x0485 [0xFF ] */ end
.layer LAYER_0486
/* 0x0486 [0xC6 0x0C ] */ instr SF0_INST_12
/* 0x0488 [0xCB 0x07 0x8A 0xE7 ] */ env ENVELOPE_078A, 231
-/* 0x048C [0xC0 0x80 0x96 ] */ ldelay 150
+/* 0x048C [0xC0 0x80 0x96 ] */ ldelay FRAMERATE_CONST(150, 180)
/* 0x048F [0xC7 0x81 0x1B 0xFF ] */ portamento 0x81, PITCH_C3, 255
-/* 0x0493 [0x73 0x81 0xB8 0x2D ] */ notedv PITCH_C5, 440, 45
+/* 0x0493 [0x73 0x81 0xB8 0x2D ] */ notedv PITCH_C5, FRAMERATE_CONST(440, 528), 45
/* 0x0497 [0xFF ] */ end
.layer LAYER_0498
/* 0x0498 [0xC6 0x2F ] */ instr SF0_INST_47
/* 0x049A [0xCB 0x07 0x92 0xE7 ] */ env ENVELOPE_0792, 231
-/* 0x049E [0xC0 0x80 0xDC ] */ ldelay 220
+/* 0x049E [0xC0 0x80 0xDC ] */ ldelay FRAMERATE_CONST(220, 264)
/* 0x04A1 [0xC7 0x81 0x0F 0xFF ] */ portamento 0x81, PITCH_C2, 255
-/* 0x04A5 [0x5B 0x81 0x72 0x6E ] */ notedv PITCH_C3, 370, 110
+/* 0x04A5 [0x5B 0x81 0x72 0x6E ] */ notedv PITCH_C3, FRAMERATE_CONST(370, 444), 110
/* 0x04A9 [0xFF ] */ end
.channel CHAN_04AA
@@ -647,7 +652,7 @@ LAYER_0452:
/* 0x04CE [0x89 0x04 0xDB ] */ ldlayer 1, LAYER_04DB
/* 0x04D1 [0x8A 0x05 0x14 ] */ ldlayer 2, LAYER_0514
/* 0x04D4 [0x8B 0x05 0x0E ] */ ldlayer 3, LAYER_050E
-/* 0x04D7 [0xFD 0x93 0x88 ] */ delay 5000
+/* 0x04D7 [0xFD 0x93 0x88 ] */ delay FRAMERATE_CONST(5000, 6000)
/* 0x04DA [0xFF ] */ end
.layer LAYER_04DB
@@ -655,11 +660,11 @@ LAYER_0452:
/* 0x04DD [0xCB 0x07 0x92 0xDD ] */ env ENVELOPE_0792, 221
/* 0x04E1 [0xCD 0x14 ] */ stereo 1, 0, 1, 0, 0
/* 0x04E3 [0xCA 0x54 ] */ notepan 84
-/* 0x04E5 [0x54 0x80 0x91 0x48 ] */ notedv PITCH_F2, 145, 72
+/* 0x04E5 [0x54 0x80 0x91 0x48 ] */ notedv PITCH_F2, FRAMERATE_CONST(145, 174), 72
LAYER_04E9:
-/* 0x04E9 [0x5D 0x5A 0x46 ] */ notedv PITCH_D3, 90, 70
-/* 0x04EC [0x60 0x80 0xE1 0x4A ] */ notedv PITCH_F3, 225, 74
-/* 0x04F0 [0x58 0x61 0x44 ] */ notedv PITCH_A2, 97, 68
+/* 0x04E9 [0x5D 0x5A 0x46 ] */ notedv PITCH_D3, FRAMERATE_CONST(90, 108), 70
+/* 0x04EC [0x60 0x80 0xE1 0x4A ] */ notedv PITCH_F3, FRAMERATE_CONST(225, 270), 74
+/* 0x04F0 [0x58 0x61 0x44 ] */ notedv PITCH_A2, FRAMERATE_CONST(97, 116), 68
/* 0x04F3 [0xF4 0xF4 ] */ rjump LAYER_04E9
.layer LAYER_04F5
@@ -667,11 +672,11 @@ LAYER_04E9:
/* 0x04F7 [0xCB 0x07 0x92 0xDD ] */ env ENVELOPE_0792, 221
/* 0x04FB [0xCD 0x14 ] */ stereo 1, 0, 1, 0, 0
/* 0x04FD [0xCA 0x2C ] */ notepan 44
-/* 0x04FF [0x5D 0x81 0x0B 0x48 ] */ notedv PITCH_D3, 267, 72
+/* 0x04FF [0x5D 0x81 0x0B 0x48 ] */ notedv PITCH_D3, FRAMERATE_CONST(267, 320), 72
LAYER_0503:
-/* 0x0503 [0x5B 0x5E 0x28 ] */ notedv PITCH_C3, 94, 40
-/* 0x0506 [0x5D 0x7C 0x2C ] */ notedv PITCH_D3, 124, 44
-/* 0x0509 [0x5A 0x30 0x44 ] */ notedv PITCH_B2, 48, 68
+/* 0x0503 [0x5B 0x5E 0x28 ] */ notedv PITCH_C3, FRAMERATE_CONST(94, 113), 40
+/* 0x0506 [0x5D 0x7C 0x2C ] */ notedv PITCH_D3, FRAMERATE_CONST(124, 149), 44
+/* 0x0509 [0x5A 0x30 0x44 ] */ notedv PITCH_B2, FRAMERATE_CONST(48, 58), 68
/* 0x050C [0xF4 0xF5 ] */ rjump LAYER_0503
.layer LAYER_050E
@@ -683,13 +688,13 @@ LAYER_0503:
/* 0x0514 [0xC6 0x2F ] */ instr SF0_INST_47
/* 0x0516 [0xCB 0x07 0x1E 0xE6 ] */ env ENVELOPE_071E, 230
LAYER_051A:
-/* 0x051A [0xC0 0x8A 0x82 ] */ ldelay 2690
+/* 0x051A [0xC0 0x8A 0x82 ] */ ldelay FRAMERATE_CONST(2690, 2854)
/* 0x051D [0xC7 0x81 0x37 0x3C ] */ portamento 0x81, PITCH_E5, 60
-/* 0x0521 [0x4F 0x80 0xC0 0x64 ] */ notedv PITCH_C2, 192, 100
+/* 0x0521 [0x4F 0x80 0xC0 0x64 ] */ notedv PITCH_C2, FRAMERATE_CONST(192, 230), 100
/* 0x0525 [0xC7 0x81 0x3A 0x3C ] */ portamento 0x81, PITCH_G5, 60
-/* 0x0529 [0x53 0x80 0xC0 0x64 ] */ notedv PITCH_E2, 192, 100
+/* 0x0529 [0x53 0x80 0xC0 0x64 ] */ notedv PITCH_E2, FRAMERATE_CONST(192, 230), 100
/* 0x052D [0xC7 0x81 0x3E 0x2D ] */ portamento 0x81, PITCH_B5, 45
-/* 0x0531 [0x56 0x81 0xF4 0x64 ] */ notedv PITCH_G2, 500, 100
+/* 0x0531 [0x56 0x81 0xF4 0x64 ] */ notedv PITCH_G2, FRAMERATE_CONST(500, 600), 100
/* 0x0535 [0xFF ] */ end
.layer LAYER_0536
@@ -698,7 +703,7 @@ LAYER_051A:
/* 0x053B [0xC5 ] */ nolegato
/* 0x053C [0xC8 ] */ noportamento
/* 0x053D [0xC6 0x41 ] */ instr SF0_INST_65
-/* 0x053F [0xC0 0x14 ] */ ldelay 20
+/* 0x053F [0xC0 0x14 ] */ ldelay FRAMERATE_CONST(20, 24)
/* 0x0541 [0xC2 0xFD ] */ transpose -3
/* 0x0543 [0xF4 0x44 ] */ rjump LAYER_0589
@@ -707,7 +712,7 @@ LAYER_051A:
/* 0x0548 [0xC5 ] */ nolegato
/* 0x0549 [0xC8 ] */ noportamento
/* 0x054A [0xC6 0x4D ] */ instr SF0_INST_77
-/* 0x054C [0xC0 0x0A ] */ ldelay 10
+/* 0x054C [0xC0 0x0A ] */ ldelay FRAMERATE_CONST(10, 12)
/* 0x054E [0xC2 0x0A ] */ transpose 10
/* 0x0550 [0xF4 0x37 ] */ rjump LAYER_0589
@@ -716,14 +721,14 @@ LAYER_051A:
/* 0x0554 [0xCB 0x07 0x92 0xD3 ] */ env ENVELOPE_0792, 211
/* 0x0558 [0xC4 ] */ legato
/* 0x0559 [0xC7 0x85 0x33 0xFF ] */ portamento 0x85, PITCH_C5, 255
-/* 0x055D [0x77 0x80 0xC8 0x5A ] */ notedv PITCH_E5, 200, 90
-/* 0x0561 [0x7A 0x89 0x79 0x50 ] */ notedv PITCH_G5, 2425, 80
+/* 0x055D [0x77 0x80 0xC8 0x5A ] */ notedv PITCH_E5, FRAMERATE_CONST(200, 240), 90
+/* 0x0561 [0x7A 0x89 0x79 0x50 ] */ notedv PITCH_G5, FRAMERATE_CONST(2425, 2910), 80
/* 0x0565 [0xFF ] */ end
.layer LAYER_0566
/* 0x0566 [0xC2 0x05 ] */ transpose 5
/* 0x0568 [0xFC 0x05 0x81 ] */ call LAYER_0581
-/* 0x056B [0xC0 0x14 ] */ ldelay 20
+/* 0x056B [0xC0 0x14 ] */ ldelay FRAMERATE_CONST(20, 24)
/* 0x056D [0xC6 0x4D ] */ instr SF0_INST_77
/* 0x056F [0xF4 0x18 ] */ rjump LAYER_0589
@@ -737,15 +742,15 @@ LAYER_051A:
/* 0x057D [0xC7 0x81 0x11 0xFF ] */ portamento 0x81, PITCH_D2, 255
.layer LAYER_0581
/* 0x0581 [0xC6 0x36 ] */ instr SF0_INST_54
-/* 0x0583 [0x58 0x8A 0x41 0x41 ] */ notedv PITCH_A2, 2625, 65
+/* 0x0583 [0x58 0x8A 0x41 0x41 ] */ notedv PITCH_A2, FRAMERATE_CONST(2625, 2920), 65
/* 0x0587 [0xC5 ] */ nolegato
/* 0x0588 [0xFF ] */ end
LAYER_0589:
-/* 0x0589 [0x5F 0x80 0xC0 0x78 ] */ notedv PITCH_E3, 192, 120
-/* 0x058D [0x62 0x80 0xC0 0x78 ] */ notedv PITCH_G3, 192, 120
+/* 0x0589 [0x5F 0x80 0xC0 0x78 ] */ notedv PITCH_E3, FRAMERATE_CONST(192, 230), 120
+/* 0x058D [0x62 0x80 0xC0 0x78 ] */ notedv PITCH_G3, FRAMERATE_CONST(192, 230), 120
/* 0x0591 [0xCF 0xA0 ] */ releaserate 160
-/* 0x0593 [0x64 0x80 0xC0 0x78 ] */ notedv PITCH_A3, 192, 120
+/* 0x0593 [0x64 0x80 0xC0 0x78 ] */ notedv PITCH_A3, FRAMERATE_CONST(192, 230), 120
/* 0x0597 [0xFF ] */ end
.channel CHAN_0598
@@ -773,22 +778,22 @@ LAYER_0589:
/* 0x05C9 [0x88 0x05 0xDA ] */ ldlayer 0, LAYER_05DA
/* 0x05CC [0x89 0x05 0xE0 ] */ ldlayer 1, LAYER_05E0
/* 0x05CF [0x21 0x05 0xE6 ] */ ldchan 1, CHAN_05E6
-/* 0x05D2 [0xFD 0x87 0x08 ] */ delay 1800
+/* 0x05D2 [0xFD 0x87 0x08 ] */ delay FRAMERATE_CONST(1800, 2160)
/* 0x05D5 [0x90 ] */ dellayer 0
/* 0x05D6 [0x91 ] */ dellayer 1
-/* 0x05D7 [0xFD 0x64 ] */ delay 100
+/* 0x05D7 [0xFD 0x64 ] */ delay FRAMERATE_CONST(100, 120)
/* 0x05D9 [0xFF ] */ end
.layer LAYER_05DA
/* 0x05DA [0xC4 ] */ legato
LAYER_05DB:
-/* 0x05DB [0x43 0x64 0x50 ] */ notedv PITCH_C1, 100, 80
+/* 0x05DB [0x43 0x64 0x50 ] */ notedv PITCH_C1, FRAMERATE_CONST(100, 120), 80
/* 0x05DE [0xF4 0xFB ] */ rjump LAYER_05DB
.layer LAYER_05E0
/* 0x05E0 [0xC4 ] */ legato
LAYER_05E1:
-/* 0x05E1 [0x42 0x64 0x50 ] */ notedv PITCH_B0, 100, 80
+/* 0x05E1 [0x42 0x64 0x50 ] */ notedv PITCH_B0, FRAMERATE_CONST(100, 120), 80
/* 0x05E4 [0xF4 0xFB ] */ rjump LAYER_05E1
.channel CHAN_05E6
@@ -800,26 +805,26 @@ LAYER_05E1:
/* 0x05EF [0xD4 0x14 ] */ reverb 20
/* 0x05F1 [0xDF 0x64 ] */ vol 100
/* 0x05F3 [0xED 0x0F ] */ gain 15
-/* 0x05F5 [0xFD 0x82 0x40 ] */ delay 576
+/* 0x05F5 [0xFD 0x82 0x40 ] */ delay FRAMERATE_CONST(576, 691)
/* 0x05F8 [0x88 0x06 0x33 ] */ ldlayer 0, LAYER_0633
/* 0x05FB [0x89 0x06 0x2F ] */ ldlayer 1, LAYER_062F
/* 0x05FE [0x8A 0x06 0x3F ] */ ldlayer 2, LAYER_063F
/* 0x0601 [0xDF 0x4B ] */ vol 75
-/* 0x0603 [0xFD 0x80 0xC8 ] */ delay 200
+/* 0x0603 [0xFD 0x80 0xC8 ] */ delay FRAMERATE_CONST(200, 240)
/* 0x0606 [0x88 0x06 0x33 ] */ ldlayer 0, LAYER_0633
/* 0x0609 [0x89 0x06 0x2F ] */ ldlayer 1, LAYER_062F
/* 0x060C [0x8A 0x06 0x3F ] */ ldlayer 2, LAYER_063F
/* 0x060F [0xDF 0x6E ] */ vol 110
-/* 0x0611 [0xFD 0x80 0x87 ] */ delay 135
+/* 0x0611 [0xFD 0x80 0x87 ] */ delay FRAMERATE_CONST(135, 162)
/* 0x0614 [0x88 0x06 0x33 ] */ ldlayer 0, LAYER_0633
/* 0x0617 [0x89 0x06 0x2F ] */ ldlayer 1, LAYER_062F
/* 0x061A [0x8A 0x06 0x3F ] */ ldlayer 2, LAYER_063F
/* 0x061D [0xDF 0x5F ] */ vol 95
-/* 0x061F [0xFD 0x81 0x56 ] */ delay 342
+/* 0x061F [0xFD 0x81 0x56 ] */ delay FRAMERATE_CONST(342, 410)
/* 0x0622 [0x88 0x06 0x33 ] */ ldlayer 0, LAYER_0633
/* 0x0625 [0x89 0x06 0x2F ] */ ldlayer 1, LAYER_062F
/* 0x0628 [0x8A 0x06 0x3F ] */ ldlayer 2, LAYER_063F
-/* 0x062B [0xFD 0x80 0xFA ] */ delay 250
+/* 0x062B [0xFD 0x80 0xFA ] */ delay FRAMERATE_CONST(250, 300)
/* 0x062E [0xFF ] */ end
.layer LAYER_062F
@@ -836,7 +841,7 @@ LAYER_0635:
.layer LAYER_063F
/* 0x063F [0xC6 0x46 ] */ instr SF0_INST_70
-/* 0x0641 [0x62 0x32 0x32 ] */ notedv PITCH_G3, 50, 50
+/* 0x0641 [0x62 0x32 0x32 ] */ notedv PITCH_G3, FRAMERATE_CONST(50, 60), 50
/* 0x0644 [0xFF ] */ end
.table TABLE_0646
@@ -1105,13 +1110,29 @@ ENVELOPE_08BA:
.envelope ENVELOPE_08EA
point 140, 20000
point 2540, 10000
+#if !OOT_PAL_N64
point 200, 32700
+#else
+ point 160, 32700
+#endif
point 720, 20000
point 240, 27000
point 20, 16000
point 940, 32700
hang
+#if OOT_PAL_N64
+.envelope ENVELOPE_090A_PAL
+ point 168, 20000
+ point 2488, 10000
+ point 240, 32700
+ point 864, 20000
+ point 288, 27000
+ point 24, 16000
+ point 1128, 32700
+ hang
+#endif
+
.envelope ENVELOPE_090A
point 100, 20000
point 400, 32700
@@ -1128,10 +1149,12 @@ ENVELOPE_08BA:
point 20, 20000
hang
+#if OOT_VERSION == NTSC_1_2 || !PLATFORM_N64
.filter FILTER_0932
filter 0, 0, 0, 0, 0, 0, 0, 0
.filter FILTER_0942
filter 0, 0, 0, 0, 0, 0, 0, 0
+#endif
.endseq Sequence_109
diff --git a/assets/objects/object_link_boy/object_link_boy.c b/assets/objects/object_link_boy/object_link_boy.c
new file mode 100644
index 0000000000..de35c03b67
--- /dev/null
+++ b/assets/objects/object_link_boy/object_link_boy.c
@@ -0,0 +1,1314 @@
+#include "object_link_boy.h"
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "z64player.h"
+
+// Eyes textures
+
+u64 gLinkAdultEyesOpenTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultEyesOpenTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultEyesHalfTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultEyesHalfTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultEyesClosedfTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultEyesClosedfTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultEyesLeftTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultEyesLeftTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultEyesRightTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultEyesRightTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultEyesWideTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultEyesWideTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultEyesDownTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultEyesDownTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultEyesWincingTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultEyesWincingTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+// Mouth textures
+
+u64 gLinkAdultMouthClosedTex[TEX_LEN(u64, LINK_ADULT_MOUTH_TEX_WIDTH, LINK_ADULT_MOUTH_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultMouthClosedTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultMouthHalfTex[TEX_LEN(u64, LINK_ADULT_MOUTH_TEX_WIDTH, LINK_ADULT_MOUTH_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultMouthHalfTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultMouthOpenTex[TEX_LEN(u64, LINK_ADULT_MOUTH_TEX_WIDTH, LINK_ADULT_MOUTH_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultMouthOpenTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultMouthSmileTex[TEX_LEN(u64, LINK_ADULT_MOUTH_TEX_WIDTH, LINK_ADULT_MOUTH_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultMouthSmileTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+// Textures
+
+#define gLinkAdultEarTex_WIDTH 16
+#define gLinkAdultEarTex_HEIGHT 16
+u64 gLinkAdultEarTex[TEX_LEN(u64, gLinkAdultEarTex_WIDTH, gLinkAdultEarTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultEarTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+#define gLinkAdultNoseTex_WIDTH 16
+#define gLinkAdultNoseTex_HEIGHT 16
+u64 gLinkAdultNoseTex[TEX_LEN(u64, gLinkAdultNoseTex_WIDTH, gLinkAdultNoseTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultNoseTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+#define gLinkAdultNose2Tex_WIDTH 16
+#define gLinkAdultNose2Tex_HEIGHT 16
+u64 gLinkAdultNose2Tex[TEX_LEN(u64, gLinkAdultNose2Tex_WIDTH, gLinkAdultNose2Tex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultNose2Tex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+#define gLinkAdultUnusedHandTex_WIDTH 16
+#define gLinkAdultUnusedHandTex_HEIGHT 16
+u64 gLinkAdultUnusedHandTex[TEX_LEN(u64, gLinkAdultUnusedHandTex_WIDTH, gLinkAdultUnusedHandTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultUnusedHandTex.ci8.tlut_gLinkAdultHeadTLUT.inc.c"
+};
+
+u64 gLinkAdultTLUT1[] = {
+#include "assets/objects/object_link_boy/gLinkAdultBootFarTex.tlut.rgba16.inc.c"
+};
+
+#define gLinkAdultBootFarTex_WIDTH 16
+#define gLinkAdultBootFarTex_HEIGHT 32
+u64 gLinkAdultBootFarTex[TEX_LEN(u64, gLinkAdultBootFarTex_WIDTH, gLinkAdultBootFarTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultBootFarTex.ci8.inc.c"
+};
+
+u64 gLinkAdultTLUT2[] = {
+#include "assets/objects/object_link_boy/gLinkAdultTLUT2.tlut.rgba16.inc.c"
+};
+
+u64 gLinkAdultTLUT3[] = {
+#include "assets/objects/object_link_boy/gLinkAdultTLUT3.tlut.rgba16.inc.c"
+};
+
+u8 gLinkAdult_5AB0_Blob[] = {
+#include "assets/objects/object_link_boy/gLinkAdult_5AB0_Blob.bin.inc.c"
+};
+
+u64 gLinkAdultHeadTLUT[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHeadTLUT.tlut.rgba16.inc.c"
+};
+
+u64 gLinkAdultTlut_005E00[] = {
+#include "assets/objects/object_link_boy/gLinkAdultTlut_005E00.tlut.rgba16.inc.c"
+};
+
+#define gLinkAdultBootTex_WIDTH 16
+#define gLinkAdultBootTex_HEIGHT 16
+u64 gLinkAdultBootTex[TEX_LEN(u64, gLinkAdultBootTex_WIDTH, gLinkAdultBootTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultBootTex.ci8.tlut_gLinkAdultTLUT2.inc.c"
+};
+
+#define gLinkAdultLegTex_WIDTH 16
+#define gLinkAdultLegTex_HEIGHT 32
+u64 gLinkAdultLegTex[TEX_LEN(u64, gLinkAdultLegTex_WIDTH, gLinkAdultLegTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultLegTex.ci8.tlut_gLinkAdultTLUT3.inc.c"
+};
+
+#define gLinkAdultBoot2Tex_WIDTH 16
+#define gLinkAdultBoot2Tex_HEIGHT 32
+u64 gLinkAdultBoot2Tex[TEX_LEN(u64, gLinkAdultBoot2Tex_WIDTH, gLinkAdultBoot2Tex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultBoot2Tex.ci8.tlut_gLinkAdultTLUT2.inc.c"
+};
+
+#define gLinkAdultBootBuckleTex_WIDTH 32
+#define gLinkAdultBootBuckleTex_HEIGHT 16
+u64 gLinkAdultBootBuckleTex[TEX_LEN(u64, gLinkAdultBootBuckleTex_WIDTH, gLinkAdultBootBuckleTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultBootBuckleTex.ci8.tlut_gLinkAdultTLUT2.inc.c"
+};
+
+#define gLinkAdultSkirtAndHatTex_WIDTH 32
+#define gLinkAdultSkirtAndHatTex_HEIGHT 32
+u64 gLinkAdultSkirtAndHatTex[TEX_LEN(u64, gLinkAdultSkirtAndHatTex_WIDTH, gLinkAdultSkirtAndHatTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultSkirtAndHatTex.rgba16.inc.c"
+};
+
+#define gLinkAdultBeltTex_WIDTH 8
+#define gLinkAdultBeltTex_HEIGHT 16
+u64 gLinkAdultBeltTex[TEX_LEN(u64, gLinkAdultBeltTex_WIDTH, gLinkAdultBeltTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultBeltTex.ci8.tlut_gLinkAdultTLUT2.inc.c"
+};
+
+#define gLinkAdultBeltClaspTex_WIDTH 32
+#define gLinkAdultBeltClaspTex_HEIGHT 16
+u64 gLinkAdultBeltClaspTex[TEX_LEN(u64, gLinkAdultBeltClaspTex_WIDTH, gLinkAdultBeltClaspTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultBeltClaspTex.ci8.tlut_gLinkAdultTLUT2.inc.c"
+};
+
+#define gLinkAdultEarringTex_WIDTH 32
+#define gLinkAdultEarringTex_HEIGHT 32
+u64 gLinkAdultEarringTex[TEX_LEN(u64, gLinkAdultEarringTex_WIDTH, gLinkAdultEarringTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultEarringTex.ia16.inc.c"
+};
+
+#define gLinkAdultNeckTex_WIDTH 16
+#define gLinkAdultNeckTex_HEIGHT 32
+u64 gLinkAdultNeckTex[TEX_LEN(u64, gLinkAdultNeckTex_WIDTH, gLinkAdultNeckTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultNeckTex.ci8.tlut_gLinkAdultTLUT3.inc.c"
+};
+
+#define gLinkAdultUnusedGauntlet1Tex_WIDTH 16
+#define gLinkAdultUnusedGauntlet1Tex_HEIGHT 32
+u64 gLinkAdultUnusedGauntlet1Tex[TEX_LEN(u64, gLinkAdultUnusedGauntlet1Tex_WIDTH, gLinkAdultUnusedGauntlet1Tex_HEIGHT,
+ 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultUnusedGauntlet1Tex.ci8.tlut_gLinkAdultTLUT2.inc.c"
+};
+
+#define gLinkAdultUnusedGauntlet2Tex_WIDTH 16
+#define gLinkAdultUnusedGauntlet2Tex_HEIGHT 32
+u64 gLinkAdultUnusedGauntlet2Tex[TEX_LEN(u64, gLinkAdultUnusedGauntlet2Tex_WIDTH, gLinkAdultUnusedGauntlet2Tex_HEIGHT,
+ 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultUnusedGauntlet2Tex.ci8.tlut_gLinkAdultTLUT2.inc.c"
+};
+
+#define gLinkAdultArmGauntletTex_WIDTH 32
+#define gLinkAdultArmGauntletTex_HEIGHT 32
+u64 gLinkAdultArmGauntletTex[TEX_LEN(u64, gLinkAdultArmGauntletTex_WIDTH, gLinkAdultArmGauntletTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultArmGauntletTex.ci8.tlut_gLinkAdultTLUT2.inc.c"
+};
+
+#define gLinkAdultUnusedSheathTex_WIDTH 32
+#define gLinkAdultUnusedSheathTex_HEIGHT 64
+u64 gLinkAdultUnusedSheathTex[TEX_LEN(u64, gLinkAdultUnusedSheathTex_WIDTH, gLinkAdultUnusedSheathTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultUnusedSheathTex.ci8.tlut_gLinkAdultTlut_005E00.inc.c"
+};
+
+#define gLinkAdultUnusedSheathBandTex_WIDTH 32
+#define gLinkAdultUnusedSheathBandTex_HEIGHT 16
+u64 gLinkAdultUnusedSheathBandTex[TEX_LEN(u64, gLinkAdultUnusedSheathBandTex_WIDTH,
+ gLinkAdultUnusedSheathBandTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultUnusedSheathBandTex.ci8.tlut_gLinkAdultTlut_005E00.inc.c"
+};
+
+#define gLinkAdultUnusedSwordPommelTex_WIDTH 16
+#define gLinkAdultUnusedSwordPommelTex_HEIGHT 16
+u64 gLinkAdultUnusedSwordPommelTex[TEX_LEN(u64, gLinkAdultUnusedSwordPommelTex_WIDTH,
+ gLinkAdultUnusedSwordPommelTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultUnusedSwordPommelTex.ci8.tlut_gLinkAdultTlut_005E00.inc.c"
+};
+
+#define gLinkAdultUnusedSwordGuardTex_WIDTH 32
+#define gLinkAdultUnusedSwordGuardTex_HEIGHT 32
+u64 gLinkAdultUnusedSwordGuardTex[TEX_LEN(u64, gLinkAdultUnusedSwordGuardTex_WIDTH,
+ gLinkAdultUnusedSwordGuardTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultUnusedSwordGuardTex.ci8.tlut_gLinkAdultTlut_005E00.inc.c"
+};
+
+#define gLinkAdultUnusedSwordEmblemTex_WIDTH 16
+#define gLinkAdultUnusedSwordEmblemTex_HEIGHT 16
+u64 gLinkAdultUnusedSwordEmblemTex[TEX_LEN(u64, gLinkAdultUnusedSwordEmblemTex_WIDTH,
+ gLinkAdultUnusedSwordEmblemTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultUnusedSwordEmblemTex.ci8.tlut_gLinkAdultTlut_005E00.inc.c"
+};
+
+#define gLinkAdultTunicTex_WIDTH 16
+#define gLinkAdultTunicTex_HEIGHT 32
+u64 gLinkAdultTunicTex[TEX_LEN(u64, gLinkAdultTunicTex_WIDTH, gLinkAdultTunicTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultTunicTex.ci8.tlut_gLinkAdultTLUT3.inc.c"
+};
+
+#define gLinkAdultCollarTex_WIDTH 16
+#define gLinkAdultCollarTex_HEIGHT 32
+u64 gLinkAdultCollarTex[TEX_LEN(u64, gLinkAdultCollarTex_WIDTH, gLinkAdultCollarTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultCollarTex.rgba16.inc.c"
+};
+
+#define gLinkAdultGauntletPlate1Tex_WIDTH 16
+#define gLinkAdultGauntletPlate1Tex_HEIGHT 32
+u64 gLinkAdultGauntletPlate1Tex[TEX_LEN(u64, gLinkAdultGauntletPlate1Tex_WIDTH, gLinkAdultGauntletPlate1Tex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultGauntletPlate1Tex.rgba16.inc.c"
+};
+
+#define gLinkAdultGauntletPlate2Tex_WIDTH 32
+#define gLinkAdultGauntletPlate2Tex_HEIGHT 32
+u64 gLinkAdultGauntletPlate2Tex[TEX_LEN(u64, gLinkAdultGauntletPlate2Tex_WIDTH, gLinkAdultGauntletPlate2Tex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultGauntletPlate2Tex.rgba16.inc.c"
+};
+
+#define gLinkAdultHoverBootsHeelTex_WIDTH 16
+#define gLinkAdultHoverBootsHeelTex_HEIGHT 8
+u64 gLinkAdultHoverBootsHeelTex[TEX_LEN(u64, gLinkAdultHoverBootsHeelTex_WIDTH, gLinkAdultHoverBootsHeelTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultHoverBootsHeelTex.rgba16.inc.c"
+};
+
+#define gLinkAdultHoverBootsJetTex_WIDTH 32
+#define gLinkAdultHoverBootsJetTex_HEIGHT 32
+u64 gLinkAdultHoverBootsJetTex[TEX_LEN(u64, gLinkAdultHoverBootsJetTex_WIDTH, gLinkAdultHoverBootsJetTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultHoverBootsJetTex.rgba16.inc.c"
+};
+
+#define gLinkAdultHoverBootsFeatherTex_WIDTH 32
+#define gLinkAdultHoverBootsFeatherTex_HEIGHT 16
+u64 gLinkAdultHoverBootsFeatherTex[TEX_LEN(u64, gLinkAdultHoverBootsFeatherTex_WIDTH,
+ gLinkAdultHoverBootsFeatherTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultHoverBootsFeatherTex.rgba16.inc.c"
+};
+
+#define gLinkAdultMirrorShieldLowerDesignTex_WIDTH 32
+#define gLinkAdultMirrorShieldLowerDesignTex_HEIGHT 64
+u64 gLinkAdultMirrorShieldLowerDesignTex[TEX_LEN(u64, gLinkAdultMirrorShieldLowerDesignTex_WIDTH,
+ gLinkAdultMirrorShieldLowerDesignTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldLowerDesignTex.ia16.inc.c"
+};
+
+#define gLinkAdultMirrorShieldUpperDesignTex_WIDTH 64
+#define gLinkAdultMirrorShieldUpperDesignTex_HEIGHT 32
+u64 gLinkAdultMirrorShieldUpperDesignTex[TEX_LEN(u64, gLinkAdultMirrorShieldUpperDesignTex_WIDTH,
+ gLinkAdultMirrorShieldUpperDesignTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldUpperDesignTex.ia8.inc.c"
+};
+
+#define gLinkAdultHookshotMetalTex_WIDTH 8
+#define gLinkAdultHookshotMetalTex_HEIGHT 8
+u64 gLinkAdultHookshotMetalTex[TEX_LEN(u64, gLinkAdultHookshotMetalTex_WIDTH, gLinkAdultHookshotMetalTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotMetalTex.rgba16.inc.c"
+};
+
+#define gLinkAdultBowBodyTex_WIDTH 8
+#define gLinkAdultBowBodyTex_HEIGHT 8
+u64 gLinkAdultBowBodyTex[TEX_LEN(u64, gLinkAdultBowBodyTex_WIDTH, gLinkAdultBowBodyTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultBowBodyTex.i8.inc.c"
+};
+
+u64 gLinkAdultTLUT4[] = {
+#include "assets/objects/object_link_boy/gLinkAdultTLUT4.tlut.rgba16.inc.c"
+};
+
+u8 gLinkAdult_CD40_Blob[] = {
+#include "assets/objects/object_link_boy/gLinkAdult_CD40_Blob.bin.inc.c"
+};
+
+u64 gLinkAdultTLUT5[] = {
+#include "assets/objects/object_link_boy/gLinkAdultTLUT5.tlut.rgba16.inc.c"
+};
+
+u8 gLinkAdult_CF48_Blob[] = {
+#include "assets/objects/object_link_boy/gLinkAdult_CF48_Blob.bin.inc.c"
+};
+
+u64 gLinkAdultTLUT6[] = {
+#include "assets/objects/object_link_boy/gLinkAdultTLUT6.tlut.rgba16.inc.c"
+};
+
+u8 gLinkAdult_D070_Blob[] = {
+#include "assets/objects/object_link_boy/gLinkAdult_D070_Blob.bin.inc.c"
+};
+
+u64 gLinkAdultTLUT7[] = {
+#include "assets/objects/object_link_boy/gLinkAdultArmOutSleeveTex.tlut.rgba16.inc.c"
+};
+
+#define gLinkAdultSwordPommelTex_WIDTH 16
+#define gLinkAdultSwordPommelTex_HEIGHT 16
+u64 gLinkAdultSwordPommelTex[TEX_LEN(u64, gLinkAdultSwordPommelTex_WIDTH, gLinkAdultSwordPommelTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultSwordPommelTex.ci8.tlut_gLinkAdultTLUT4.inc.c"
+};
+
+#define gLinkAdultIronBootTex_WIDTH 16
+#define gLinkAdultIronBootTex_HEIGHT 16
+u64 gLinkAdultIronBootTex[TEX_LEN(u64, gLinkAdultIronBootTex_WIDTH, gLinkAdultIronBootTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultIronBootTex.ci8.tlut_gLinkAdultTLUT4.inc.c"
+};
+
+#define gLinkAdultDefaultGauntlet1Tex_WIDTH 16
+#define gLinkAdultDefaultGauntlet1Tex_HEIGHT 32
+u64 gLinkAdultDefaultGauntlet1Tex[TEX_LEN(u64, gLinkAdultDefaultGauntlet1Tex_WIDTH,
+ gLinkAdultDefaultGauntlet1Tex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultDefaultGauntlet1Tex.ci8.tlut_gLinkAdultTLUT5.inc.c"
+};
+
+#define gLinkAdultShieldHandleTex_WIDTH 8
+#define gLinkAdultShieldHandleTex_HEIGHT 16
+u64 gLinkAdultShieldHandleTex[TEX_LEN(u64, gLinkAdultShieldHandleTex_WIDTH, gLinkAdultShieldHandleTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultShieldHandleTex.ci8.tlut_gLinkAdultTLUT5.inc.c"
+};
+
+#define gLinkAdultDefaultGauntlet2Tex_WIDTH 16
+#define gLinkAdultDefaultGauntlet2Tex_HEIGHT 32
+u64 gLinkAdultDefaultGauntlet2Tex[TEX_LEN(u64, gLinkAdultDefaultGauntlet2Tex_WIDTH,
+ gLinkAdultDefaultGauntlet2Tex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultDefaultGauntlet2Tex.ci8.tlut_gLinkAdultTLUT5.inc.c"
+};
+
+#define gLinkAdultHandTex_WIDTH 16
+#define gLinkAdultHandTex_HEIGHT 16
+u64 gLinkAdultHandTex[TEX_LEN(u64, gLinkAdultHandTex_WIDTH, gLinkAdultHandTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultHandTex.ci8.tlut_gLinkAdultTLUT6.inc.c"
+};
+
+#define gLinkAdultClosedHandThumbTex_WIDTH 16
+#define gLinkAdultClosedHandThumbTex_HEIGHT 16
+u64 gLinkAdultClosedHandThumbTex[TEX_LEN(u64, gLinkAdultClosedHandThumbTex_WIDTH, gLinkAdultClosedHandThumbTex_HEIGHT,
+ 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultClosedHandThumbTex.ci8.tlut_gLinkAdultTLUT6.inc.c"
+};
+
+#define gLinkAdultHylianShieldBackTex_WIDTH 16
+#define gLinkAdultHylianShieldBackTex_HEIGHT 32
+u64 gLinkAdultHylianShieldBackTex[TEX_LEN(u64, gLinkAdultHylianShieldBackTex_WIDTH,
+ gLinkAdultHylianShieldBackTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultHylianShieldBackTex.ci8.tlut_gLinkAdultTLUT4.inc.c"
+};
+
+#define gLinkAdultClosedHandSideTex_WIDTH 16
+#define gLinkAdultClosedHandSideTex_HEIGHT 16
+u64 gLinkAdultClosedHandSideTex[TEX_LEN(u64, gLinkAdultClosedHandSideTex_WIDTH, gLinkAdultClosedHandSideTex_HEIGHT,
+ 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultClosedHandSideTex.ci8.tlut_gLinkAdultTLUT6.inc.c"
+};
+
+#define gLinkAdultSheathTex_WIDTH 32
+#define gLinkAdultSheathTex_HEIGHT 32
+u64 gLinkAdultSheathTex[TEX_LEN(u64, gLinkAdultSheathTex_WIDTH, gLinkAdultSheathTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultSheathTex.ci8.tlut_gLinkAdultTLUT4.inc.c"
+};
+
+#define gLinkAdultArmOutUpperGauntletTex_WIDTH 32
+#define gLinkAdultArmOutUpperGauntletTex_HEIGHT 32
+u64 gLinkAdultArmOutUpperGauntletTex[TEX_LEN(u64, gLinkAdultArmOutUpperGauntletTex_WIDTH,
+ gLinkAdultArmOutUpperGauntletTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultArmOutUpperGauntletTex.ci8.tlut_gLinkAdultTLUT5.inc.c"
+};
+
+#define gLinkAdultSwordGuardTex_WIDTH 32
+#define gLinkAdultSwordGuardTex_HEIGHT 32
+u64 gLinkAdultSwordGuardTex[TEX_LEN(u64, gLinkAdultSwordGuardTex_WIDTH, gLinkAdultSwordGuardTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultSwordGuardTex.ci8.tlut_gLinkAdultTLUT4.inc.c"
+};
+
+#define gLinkAdultSheathBandTex_WIDTH 32
+#define gLinkAdultSheathBandTex_HEIGHT 16
+u64 gLinkAdultSheathBandTex[TEX_LEN(u64, gLinkAdultSheathBandTex_WIDTH, gLinkAdultSheathBandTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultSheathBandTex.ci8.tlut_gLinkAdultTLUT4.inc.c"
+};
+
+#define gLinkAdultSwordEmblemTex_WIDTH 16
+#define gLinkAdultSwordEmblemTex_HEIGHT 16
+u64 gLinkAdultSwordEmblemTex[TEX_LEN(u64, gLinkAdultSwordEmblemTex_WIDTH, gLinkAdultSwordEmblemTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultSwordEmblemTex.ci8.tlut_gLinkAdultTLUT4.inc.c"
+};
+
+#define gLinkAdultHookshotHandleTex_WIDTH 16
+#define gLinkAdultHookshotHandleTex_HEIGHT 8
+u64 gLinkAdultHookshotHandleTex[TEX_LEN(u64, gLinkAdultHookshotHandleTex_WIDTH, gLinkAdultHookshotHandleTex_HEIGHT,
+ 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotHandleTex.ci8.tlut_gLinkAdultTLUT5.inc.c"
+};
+
+#define gLinkAdultHookshotDesignTex_WIDTH 16
+#define gLinkAdultHookshotDesignTex_HEIGHT 32
+u64 gLinkAdultHookshotDesignTex[TEX_LEN(u64, gLinkAdultHookshotDesignTex_WIDTH, gLinkAdultHookshotDesignTex_HEIGHT,
+ 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotDesignTex.ci8.tlut_gLinkAdultTLUT4.inc.c"
+};
+
+#define gLinkAdultArmOutSleeveTex_WIDTH 16
+#define gLinkAdultArmOutSleeveTex_HEIGHT 32
+u64 gLinkAdultArmOutSleeveTex[TEX_LEN(u64, gLinkAdultArmOutSleeveTex_WIDTH, gLinkAdultArmOutSleeveTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultArmOutSleeveTex.ci8.inc.c"
+};
+
+// Various vertices and DLs
+
+Vtx gLinkAdultHylianShieldSwordAndSheathNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHylianShieldSwordAndSheathNearVtx.inc.c"
+};
+
+Vtx gLinkAdultHylianShieldAndSheathNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHylianShieldAndSheathNearVtx.inc.c"
+};
+
+Vtx gLinkAdultMirrorShieldSwordAndSheathNearVtx1[] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldSwordAndSheathNearVtx1.inc.c"
+};
+
+Vtx gLinkAdultMirrorShieldAndSheathNearVtx1[] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldAndSheathNearVtx1.inc.c"
+};
+
+Vtx gLinkAdultLeftHandNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftHandClosedNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandClosedNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftHandHoldingMasterSwordNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingMasterSwordNearVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandNearVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandClosedNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandClosedNearVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingHylianShieldNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingHylianShieldNearVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingBowNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingBowNearVtx.inc.c"
+};
+
+Vtx gLinkAdultMasterSwordAndSheathNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultMasterSwordAndSheathNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftHandHoldingHammerNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingHammerNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftHandHoldingBgsNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingBgsNearVtx.inc.c"
+};
+
+Vtx gLinkAdultHandHoldingBrokenGiantsKnifeVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHandHoldingBrokenGiantsKnifeVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingMirrorShieldNearVtx1[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingMirrorShieldNearVtx1.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingOotNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingOotNearVtx.inc.c"
+};
+
+Vtx gLinkAdultSheathNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultSheathNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftHandOutNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandOutNearVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingHookshotNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingHookshotNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftGauntletPlate1Vtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftGauntletPlate1Vtx.inc.c"
+};
+
+Vtx gLinkAdultLeftGauntletPlate2Vtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftGauntletPlate2Vtx.inc.c"
+};
+
+Vtx gLinkAdultLeftGauntletPlate3Vtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftGauntletPlate3Vtx.inc.c"
+};
+
+Vtx gLinkAdultRightGauntletPlate1Vtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightGauntletPlate1Vtx.inc.c"
+};
+
+Vtx gLinkAdultRightGauntletPlate2Vtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightGauntletPlate2Vtx.inc.c"
+};
+
+Vtx gLinkAdultRightGauntletPlate3Vtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightGauntletPlate3Vtx.inc.c"
+};
+
+Vtx gLinkAdultLeftIronBootVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftIronBootVtx.inc.c"
+};
+
+Vtx gLinkAdultRightIronBootVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightIronBootVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftHoverBootVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHoverBootVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHoverBootVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHoverBootVtx.inc.c"
+};
+
+Vtx gLinkAdultHylianShieldSwordAndSheathFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHylianShieldSwordAndSheathFarVtx.inc.c"
+};
+
+Vtx gLinkAdultHylianShieldAndSheathFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHylianShieldAndSheathFarVtx.inc.c"
+};
+
+Vtx gLinkAdultMirrorShieldSwordAndSheathFarVtx1[] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldSwordAndSheathFarVtx1.inc.c"
+};
+
+Vtx gLinkAdultMirrorShieldAndSheathFarVtx1[] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldAndSheathFarVtx1.inc.c"
+};
+
+Vtx gLinkAdultLeftHandFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandFarVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftHandClosedFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandClosedFarVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftHandHoldingMasterSwordFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingMasterSwordFarVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandFarVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandClosedFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandClosedFarVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingHylianShieldFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingHylianShieldFarVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingBowFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingBowFarVtx.inc.c"
+};
+
+Vtx gLinkAdultMasterSwordAndSheathFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultMasterSwordAndSheathFarVtx.inc.c"
+};
+
+Vtx gLinkAdultSheathFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultSheathFarVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftHandHoldingHammerFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingHammerFarVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftHandHoldingBgsFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingBgsFarVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingMirrorShieldFarVtx1[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingMirrorShieldFarVtx1.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingOotFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingOotFarVtx.inc.c"
+};
+
+Vtx gLinkAdultHandHoldingBrokenGiantsKnifeFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHandHoldingBrokenGiantsKnifeFarVtx.inc.c"
+};
+
+Vtx gLinkAdultHandHoldingBottleVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHandHoldingBottleVtx.inc.c"
+};
+
+Vtx gLinkAdultRightArmOutNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightArmOutNearVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandOutNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandOutNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftArmOutNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftArmOutNearVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingBowFirstPersonVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingBowFirstPersonVtx.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingHookshotFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingHookshotFarVtx.inc.c"
+};
+
+Vtx gLinkAdultMirrorShieldSwordAndSheathNearVtx2[] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldSwordAndSheathNearVtx2.inc.c"
+};
+
+Vtx gLinkAdultMirrorShieldAndSheathNearVtx2[] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldAndSheathNearVtx2.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingMirrorShieldNearVtx2[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingMirrorShieldNearVtx2.inc.c"
+};
+
+Vtx gLinkAdultBottleVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultBottleVtx.inc.c"
+};
+
+Vtx gLinkAdultMirrorShieldSwordAndSheathFarVtx2[] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldSwordAndSheathFarVtx2.inc.c"
+};
+
+Vtx gLinkAdultMirrorShieldAndSheathFarVtx2[] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldAndSheathFarVtx2.inc.c"
+};
+
+Vtx gLinkAdultRightHandHoldingMirrorShieldFarVtx2[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingMirrorShieldFarVtx2.inc.c"
+};
+
+Gfx gLinkAdultHylianShieldSwordAndSheathNearDL[127] = {
+#include "assets/objects/object_link_boy/gLinkAdultHylianShieldSwordAndSheathNearDL.inc.c"
+};
+
+Gfx gLinkAdultHylianShieldAndSheathNearDL[105] = {
+#include "assets/objects/object_link_boy/gLinkAdultHylianShieldAndSheathNearDL.inc.c"
+};
+
+Gfx gLinkAdultMirrorShieldSwordAndSheathNearDL[159] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldSwordAndSheathNearDL.inc.c"
+};
+
+Gfx gLinkAdultMirrorShieldAndSheathNearDL[127] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldAndSheathNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandNearDL[72] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandClosedNearDL[82] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandClosedNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandHoldingMasterSwordNearDL[164] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingMasterSwordNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandNearDL[73] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandClosedNearDL[82] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandClosedNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingHylianShieldNearDL[135] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingHylianShieldNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingBowNearDL[119] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingBowNearDL.inc.c"
+};
+
+Gfx gLinkAdultMasterSwordAndSheathNearDL[80] = {
+#include "assets/objects/object_link_boy/gLinkAdultMasterSwordAndSheathNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandHoldingHammerNearDL[157] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingHammerNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandHoldingBgsNearDL[145] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingBgsNearDL.inc.c"
+};
+
+Gfx gLinkAdultHandHoldingBrokenGiantsKnifeDL[142] = {
+#include "assets/objects/object_link_boy/gLinkAdultHandHoldingBrokenGiantsKnifeDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingMirrorShieldNearDL[155] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingMirrorShieldNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingOotNearDL[104] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingOotNearDL.inc.c"
+};
+
+Gfx gLinkAdultSheathNearDL[48] = {
+#include "assets/objects/object_link_boy/gLinkAdultSheathNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandOutNearDL[67] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandOutNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingHookshotNearDL[149] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingHookshotNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftGauntletPlate1DL[24] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftGauntletPlate1DL.inc.c"
+};
+
+Gfx gLinkAdultLeftGauntletPlate2DL[44] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftGauntletPlate2DL.inc.c"
+};
+
+Gfx gLinkAdultLeftGauntletPlate3DL[44] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftGauntletPlate3DL.inc.c"
+};
+
+Gfx gLinkAdultRightGauntletPlate1DL[24] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightGauntletPlate1DL.inc.c"
+};
+
+Gfx gLinkAdultRightGauntletPlate2DL[44] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightGauntletPlate2DL.inc.c"
+};
+
+Gfx gLinkAdultRightGauntletPlate3DL[44] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightGauntletPlate3DL.inc.c"
+};
+
+Gfx gLinkAdultLeftIronBootDL[41] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftIronBootDL.inc.c"
+};
+
+Gfx gLinkAdultRightIronBootDL[41] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightIronBootDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHoverBootDL[65] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHoverBootDL.inc.c"
+};
+
+Gfx gLinkAdultRightHoverBootDL[65] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHoverBootDL.inc.c"
+};
+
+Gfx gLinkAdultHylianShieldSwordAndSheathFarDL[96] = {
+#include "assets/objects/object_link_boy/gLinkAdultHylianShieldSwordAndSheathFarDL.inc.c"
+};
+
+Gfx gLinkAdultHylianShieldAndSheathFarDL[71] = {
+#include "assets/objects/object_link_boy/gLinkAdultHylianShieldAndSheathFarDL.inc.c"
+};
+
+Gfx gLinkAdultMirrorShieldSwordAndSheathFarDL[132] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldSwordAndSheathFarDL.inc.c"
+};
+
+Gfx gLinkAdultMirrorShieldAndSheathFarDL[105] = {
+#include "assets/objects/object_link_boy/gLinkAdultMirrorShieldAndSheathFarDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandFarDL[51] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandFarDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandClosedFarDL[81] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandClosedFarDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandHoldingMasterSwordFarDL[144] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingMasterSwordFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandFarDL[51] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandClosedFarDL[81] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandClosedFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingHylianShieldFarDL[78] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingHylianShieldFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingBowFarDL[111] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingBowFarDL.inc.c"
+};
+
+Gfx gLinkAdultMasterSwordAndSheathFarDL[74] = {
+#include "assets/objects/object_link_boy/gLinkAdultMasterSwordAndSheathFarDL.inc.c"
+};
+
+Gfx gLinkAdultSheathFarDL[39] = {
+#include "assets/objects/object_link_boy/gLinkAdultSheathFarDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandHoldingHammerFarDL[134] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingHammerFarDL.inc.c"
+};
+
+Gfx gLinkAdultLeftHandHoldingBgsFarDL[145] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandHoldingBgsFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingMirrorShieldFarDL[131] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingMirrorShieldFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingOotFarDL[82] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingOotFarDL.inc.c"
+};
+
+Gfx gLinkAdultHandHoldingBrokenGiantsKnifeFarDL[131] = {
+#include "assets/objects/object_link_boy/gLinkAdultHandHoldingBrokenGiantsKnifeFarDL.inc.c"
+};
+
+Gfx gLinkAdultHandHoldingBottleDL[99] = {
+#include "assets/objects/object_link_boy/gLinkAdultHandHoldingBottleDL.inc.c"
+};
+
+Gfx gLinkAdultRightArmOutNearDL[97] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightArmOutNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandOutNearDL[112] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandOutNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftArmOutNearDL[85] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftArmOutNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingBowFirstPersonDL[158] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingBowFirstPersonDL.inc.c"
+};
+
+Gfx gLinkAdultRightHandHoldingHookshotFarDL[196] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandHoldingHookshotFarDL.inc.c"
+};
+
+Gfx gLinkAdultBottleDL[35] = {
+#include "assets/objects/object_link_boy/gLinkAdultBottleDL.inc.c"
+};
+
+// Hookshot, bow, broken giant's knife
+
+Vtx gLinkAdultHookshotChainVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotChainVtx.inc.c"
+};
+
+#define gLinkAdultHookshotChainTex_WIDTH 16
+#define gLinkAdultHookshotChainTex_HEIGHT 32
+u64 gLinkAdultHookshotChainTex[TEX_LEN(u64, gLinkAdultHookshotChainTex_WIDTH, gLinkAdultHookshotChainTex_HEIGHT, 16)];
+
+Gfx gLinkAdultHookshotChainDL[23] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotChainDL.inc.c"
+};
+
+Vtx gLinkAdultBowStringVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultBowStringVtx.inc.c"
+};
+
+Gfx gLinkAdultBowStringDL[12] = {
+#include "assets/objects/object_link_boy/gLinkAdultBowStringDL.inc.c"
+};
+
+Vtx gLinkAdultHookshotTipVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotTipVtx.inc.c"
+};
+
+Gfx gLinkAdultHookshotTipDL[22] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotTipDL.inc.c"
+};
+
+u64 gLinkAdultHookshotChainTex[TEX_LEN(u64, gLinkAdultHookshotChainTex_WIDTH, gLinkAdultHookshotChainTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotChainTex.rgba16.inc.c"
+};
+
+Vtx gLinkAdultBrokenGiantsKnifeBladeVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultBrokenGiantsKnifeBladeVtx.inc.c"
+};
+
+Gfx gLinkAdultBrokenGiantsKnifeBladeDL[28] = {
+#include "assets/objects/object_link_boy/gLinkAdultBrokenGiantsKnifeBladeDL.inc.c"
+};
+
+// Hookshot reticle
+
+#define gLinkAdultHookshotReticleTex_WIDTH 64
+#define gLinkAdultHookshotReticleTex_HEIGHT 64
+u64 gLinkAdultHookshotReticleTex[TEX_LEN(u64, gLinkAdultHookshotReticleTex_WIDTH, gLinkAdultHookshotReticleTex_HEIGHT,
+ 8)] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotReticleTex.i8.inc.c"
+};
+
+Vtx gLinkAdultHookshotReticleVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotReticleVtx.inc.c"
+};
+
+Gfx gLinkAdultHookshotReticleDL[13] = {
+#include "assets/objects/object_link_boy/gLinkAdultHookshotReticleDL.inc.c"
+};
+
+// Far skeleton vertices and DLs
+
+Vtx gLinkAdultRightFootFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightFootFarVtx.inc.c"
+};
+
+Vtx gLinkAdultRightLegFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightLegFarVtx.inc.c"
+};
+
+Vtx gLinkAdultRightThighFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightThighFarVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftFootFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftFootFarVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftLegFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftLegFarVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftThighFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftThighFarVtx.inc.c"
+};
+
+Vtx gLinkAdultWaistFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultWaistFarVtx.inc.c"
+};
+
+Vtx gLinkAdultHatFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHatFarVtx.inc.c"
+};
+
+Vtx gLinkAdultHeadFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHeadFarVtx.inc.c"
+};
+
+Vtx gLinkAdultVtx_02E120[] = {
+#include "assets/objects/object_link_boy/gLinkAdultVtx_02E120.inc.c"
+};
+
+Vtx gLinkAdultLeftArmFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftArmFarVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftShoulderFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftShoulderFarVtx.inc.c"
+};
+
+Vtx gLinkAdultVtx_02E7E0[] = {
+#include "assets/objects/object_link_boy/gLinkAdultVtx_02E7E0.inc.c"
+};
+
+Vtx gLinkAdultRightArmFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightArmFarVtx.inc.c"
+};
+
+Vtx gLinkAdultRightShoulderFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightShoulderFarVtx.inc.c"
+};
+
+Vtx gLinkAdultTorsoFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultTorsoFarVtx.inc.c"
+};
+
+Vtx gLinkAdultCollarFarVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultCollarFarVtx.inc.c"
+};
+
+Gfx gLinkAdultWaistFarDL[78] = {
+#include "assets/objects/object_link_boy/gLinkAdultWaistFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightThighFarDL[67] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightThighFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightLegFarDL[57] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightLegFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightFootFarDL[36] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightFootFarDL.inc.c"
+};
+
+Gfx gLinkAdultLeftThighFarDL[68] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftThighFarDL.inc.c"
+};
+
+Gfx gLinkAdultLeftLegFarDL[57] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftLegFarDL.inc.c"
+};
+
+Gfx gLinkAdultLeftFootFarDL[36] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftFootFarDL.inc.c"
+};
+
+Gfx gLinkAdultCollarFarDL[21] = {
+#include "assets/objects/object_link_boy/gLinkAdultCollarFarDL.inc.c"
+};
+
+Gfx gLinkAdultTorsoFarDL[54] = {
+#include "assets/objects/object_link_boy/gLinkAdultTorsoFarDL.inc.c"
+};
+
+Gfx gLinkAdultHeadFarDL[182] = {
+#include "assets/objects/object_link_boy/gLinkAdultHeadFarDL.inc.c"
+};
+
+Gfx gLinkAdultHatFarDL[30] = {
+#include "assets/objects/object_link_boy/gLinkAdultHatFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightShoulderFarDL[53] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightShoulderFarDL.inc.c"
+};
+
+Gfx gLinkAdultRightArmFarDL[86] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightArmFarDL.inc.c"
+};
+
+Gfx gLinkAdultLeftShoulderFarDL[53] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftShoulderFarDL.inc.c"
+};
+
+Gfx gLinkAdultLeftArmFarDL[86] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftArmFarDL.inc.c"
+};
+
+// Near skeleton vertices and DLs
+
+Vtx gLinkAdultRightFootNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightFootNearVtx.inc.c"
+};
+
+Vtx gLinkAdultRightLegNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightLegNearVtx.inc.c"
+};
+
+Vtx gLinkAdultRightThighNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightThighNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftFootNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftFootNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftLegNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftLegNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftThighNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftThighNearVtx.inc.c"
+};
+
+Vtx gLinkAdultWaistNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultWaistNearVtx.inc.c"
+};
+
+Vtx gLinkAdultHatNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHatNearVtx.inc.c"
+};
+
+Vtx gLinkAdultHeadNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultHeadNearVtx.inc.c"
+};
+
+Vtx gLinkAdultVtx_033760[] = {
+#include "assets/objects/object_link_boy/gLinkAdultVtx_033760.inc.c"
+};
+
+Vtx gLinkAdultLeftArmNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftArmNearVtx.inc.c"
+};
+
+Vtx gLinkAdultLeftShoulderNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftShoulderNearVtx.inc.c"
+};
+
+Vtx gLinkAdultVtx_0340A0[] = {
+#include "assets/objects/object_link_boy/gLinkAdultVtx_0340A0.inc.c"
+};
+
+Vtx gLinkAdultRightArmNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightArmNearVtx.inc.c"
+};
+
+Vtx gLinkAdultRightShoulderNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightShoulderNearVtx.inc.c"
+};
+
+Vtx gLinkAdultTorsoNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultTorsoNearVtx.inc.c"
+};
+
+Vtx gLinkAdultCollarNearVtx[] = {
+#include "assets/objects/object_link_boy/gLinkAdultCollarNearVtx.inc.c"
+};
+
+Gfx gLinkAdultWaistNearDL[105] = {
+#include "assets/objects/object_link_boy/gLinkAdultWaistNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightThighNearDL[71] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightThighNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightLegNearDL[86] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightLegNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightFootNearDL[43] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightFootNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftThighNearDL[71] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftThighNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftLegNearDL[86] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftLegNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftFootNearDL[43] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftFootNearDL.inc.c"
+};
+
+Gfx gLinkAdultCollarNearDL[24] = {
+#include "assets/objects/object_link_boy/gLinkAdultCollarNearDL.inc.c"
+};
+
+Gfx gLinkAdultTorsoNearDL[70] = {
+#include "assets/objects/object_link_boy/gLinkAdultTorsoNearDL.inc.c"
+};
+
+Gfx gLinkAdultHeadNearDL[233] = {
+#include "assets/objects/object_link_boy/gLinkAdultHeadNearDL.inc.c"
+};
+
+Gfx gLinkAdultHatNearDL[37] = {
+#include "assets/objects/object_link_boy/gLinkAdultHatNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightShoulderNearDL[56] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightShoulderNearDL.inc.c"
+};
+
+Gfx gLinkAdultRightArmNearDL[63] = {
+#include "assets/objects/object_link_boy/gLinkAdultRightArmNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftShoulderNearDL[57] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftShoulderNearDL.inc.c"
+};
+
+Gfx gLinkAdultLeftArmNearDL[79] = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftArmNearDL.inc.c"
+};
+
+// Skeleton
+
+LodLimb gLinkAdultRootLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultRootLimb.inc.c"
+};
+
+LodLimb gLinkAdultWaistLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultWaistLimb.inc.c"
+};
+
+LodLimb gLinkAdultLowerControlLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultLowerControlLimb.inc.c"
+};
+
+LodLimb gLinkAdultRightThighLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultRightThighLimb.inc.c"
+};
+
+LodLimb gLinkAdultRightLegLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultRightLegLimb.inc.c"
+};
+
+LodLimb gLinkAdultRightFootLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultRightFootLimb.inc.c"
+};
+
+LodLimb gLinkAdultLeftThighLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftThighLimb.inc.c"
+};
+
+LodLimb gLinkAdultLeftLegLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftLegLimb.inc.c"
+};
+
+LodLimb gLinkAdultLeftFootLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftFootLimb.inc.c"
+};
+
+LodLimb gLinkAdultUpperControlLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultUpperControlLimb.inc.c"
+};
+
+LodLimb gLinkAdultHeadLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultHeadLimb.inc.c"
+};
+
+LodLimb gLinkAdultHatLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultHatLimb.inc.c"
+};
+
+LodLimb gLinkAdultCollarLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultCollarLimb.inc.c"
+};
+
+LodLimb gLinkAdultLeftShoulderLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftShoulderLimb.inc.c"
+};
+
+LodLimb gLinkAdultLeftArmLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftArmLimb.inc.c"
+};
+
+LodLimb gLinkAdultLeftHandLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultLeftHandLimb.inc.c"
+};
+
+LodLimb gLinkAdultRightShoulderLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultRightShoulderLimb.inc.c"
+};
+
+LodLimb gLinkAdultRightArmLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultRightArmLimb.inc.c"
+};
+
+LodLimb gLinkAdultRightHandLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultRightHandLimb.inc.c"
+};
+
+LodLimb gLinkAdultSwordAndSheathLimb = {
+#include "assets/objects/object_link_boy/gLinkAdultSwordAndSheathLimb.inc.c"
+};
+
+LodLimb gLinkTorsoLimb = {
+#include "assets/objects/object_link_boy/gLinkTorsoLimb.inc.c"
+};
+
+void* gLinkAdultLimbs[] = {
+#include "assets/objects/object_link_boy/gLinkAdultLimbs.inc.c"
+};
+
+FlexSkeletonHeader gLinkAdultSkel = {
+#include "assets/objects/object_link_boy/gLinkAdultSkel.inc.c"
+};
diff --git a/assets/objects/object_link_boy/object_link_boy.h b/assets/objects/object_link_boy/object_link_boy.h
new file mode 100644
index 0000000000..d8b77c1048
--- /dev/null
+++ b/assets/objects/object_link_boy/object_link_boy.h
@@ -0,0 +1,94 @@
+#ifndef OBJECT_LINK_BOY_H
+#define OBJECT_LINK_BOY_H
+
+#include "ultra64.h"
+#include "tex_len.h"
+#include "z64animation.h"
+
+#define LINK_ADULT_EYES_TEX_WIDTH 64
+#define LINK_ADULT_EYES_TEX_HEIGHT 32
+extern u64 gLinkAdultEyesOpenTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkAdultEyesHalfTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkAdultEyesClosedfTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkAdultEyesLeftTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkAdultEyesRightTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkAdultEyesWideTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkAdultEyesDownTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkAdultEyesWincingTex[TEX_LEN(u64, LINK_ADULT_EYES_TEX_WIDTH, LINK_ADULT_EYES_TEX_HEIGHT, 8)];
+
+#define LINK_ADULT_MOUTH_TEX_WIDTH 32
+#define LINK_ADULT_MOUTH_TEX_HEIGHT 32
+extern u64 gLinkAdultMouthClosedTex[TEX_LEN(u64, LINK_ADULT_MOUTH_TEX_WIDTH, LINK_ADULT_MOUTH_TEX_HEIGHT, 8)];
+extern u64 gLinkAdultMouthHalfTex[TEX_LEN(u64, LINK_ADULT_MOUTH_TEX_WIDTH, LINK_ADULT_MOUTH_TEX_HEIGHT, 8)];
+extern u64 gLinkAdultMouthOpenTex[TEX_LEN(u64, LINK_ADULT_MOUTH_TEX_WIDTH, LINK_ADULT_MOUTH_TEX_HEIGHT, 8)];
+extern u64 gLinkAdultMouthSmileTex[TEX_LEN(u64, LINK_ADULT_MOUTH_TEX_WIDTH, LINK_ADULT_MOUTH_TEX_HEIGHT, 8)];
+
+extern Gfx gLinkAdultHylianShieldSwordAndSheathNearDL[127];
+extern Gfx gLinkAdultHylianShieldAndSheathNearDL[105];
+extern Gfx gLinkAdultMirrorShieldSwordAndSheathNearDL[159];
+extern Gfx gLinkAdultMirrorShieldAndSheathNearDL[127];
+extern Gfx gLinkAdultLeftHandNearDL[72];
+extern Gfx gLinkAdultLeftHandClosedNearDL[82];
+extern Gfx gLinkAdultLeftHandHoldingMasterSwordNearDL[164];
+extern Gfx gLinkAdultRightHandNearDL[73];
+extern Gfx gLinkAdultRightHandClosedNearDL[82];
+extern Gfx gLinkAdultRightHandHoldingHylianShieldNearDL[135];
+extern Gfx gLinkAdultRightHandHoldingBowNearDL[119];
+extern Gfx gLinkAdultMasterSwordAndSheathNearDL[80];
+extern Gfx gLinkAdultLeftHandHoldingHammerNearDL[157];
+extern Gfx gLinkAdultLeftHandHoldingBgsNearDL[145];
+extern Gfx gLinkAdultHandHoldingBrokenGiantsKnifeDL[142];
+extern Gfx gLinkAdultRightHandHoldingMirrorShieldNearDL[155];
+extern Gfx gLinkAdultRightHandHoldingOotNearDL[104];
+extern Gfx gLinkAdultSheathNearDL[48];
+extern Gfx gLinkAdultLeftHandOutNearDL[67];
+extern Gfx gLinkAdultRightHandHoldingHookshotNearDL[149];
+extern Gfx gLinkAdultLeftGauntletPlate1DL[24];
+extern Gfx gLinkAdultLeftGauntletPlate2DL[44];
+extern Gfx gLinkAdultLeftGauntletPlate3DL[44];
+extern Gfx gLinkAdultRightGauntletPlate1DL[24];
+extern Gfx gLinkAdultRightGauntletPlate2DL[44];
+extern Gfx gLinkAdultRightGauntletPlate3DL[44];
+extern Gfx gLinkAdultLeftIronBootDL[41];
+extern Gfx gLinkAdultRightIronBootDL[41];
+extern Gfx gLinkAdultLeftHoverBootDL[65];
+extern Gfx gLinkAdultRightHoverBootDL[65];
+extern Gfx gLinkAdultHylianShieldSwordAndSheathFarDL[96];
+extern Gfx gLinkAdultHylianShieldAndSheathFarDL[71];
+extern Gfx gLinkAdultMirrorShieldSwordAndSheathFarDL[132];
+extern Gfx gLinkAdultMirrorShieldAndSheathFarDL[105];
+extern Gfx gLinkAdultLeftHandFarDL[51];
+extern Gfx gLinkAdultLeftHandClosedFarDL[81];
+extern Gfx gLinkAdultLeftHandHoldingMasterSwordFarDL[144];
+extern Gfx gLinkAdultRightHandFarDL[51];
+extern Gfx gLinkAdultRightHandClosedFarDL[81];
+extern Gfx gLinkAdultRightHandHoldingHylianShieldFarDL[78];
+extern Gfx gLinkAdultRightHandHoldingBowFarDL[111];
+extern Gfx gLinkAdultMasterSwordAndSheathFarDL[74];
+extern Gfx gLinkAdultSheathFarDL[39];
+extern Gfx gLinkAdultLeftHandHoldingHammerFarDL[134];
+extern Gfx gLinkAdultLeftHandHoldingBgsFarDL[145];
+extern Gfx gLinkAdultRightHandHoldingMirrorShieldFarDL[131];
+extern Gfx gLinkAdultRightHandHoldingOotFarDL[82];
+extern Gfx gLinkAdultHandHoldingBrokenGiantsKnifeFarDL[131];
+extern Gfx gLinkAdultHandHoldingBottleDL[99];
+extern Gfx gLinkAdultRightArmOutNearDL[97];
+extern Gfx gLinkAdultRightHandOutNearDL[112];
+extern Gfx gLinkAdultLeftArmOutNearDL[85];
+extern Gfx gLinkAdultRightHandHoldingBowFirstPersonDL[158];
+extern Gfx gLinkAdultRightHandHoldingHookshotFarDL[196];
+extern Gfx gLinkAdultBottleDL[35];
+extern Gfx gLinkAdultHookshotChainDL[23];
+extern Gfx gLinkAdultBowStringDL[12];
+extern Gfx gLinkAdultHookshotTipDL[22];
+extern Gfx gLinkAdultBrokenGiantsKnifeBladeDL[28];
+extern Gfx gLinkAdultHookshotReticleDL[13];
+
+extern Gfx gLinkAdultWaistFarDL[78];
+
+extern Gfx gLinkAdultWaistNearDL[105];
+extern Gfx gLinkAdultRightShoulderNearDL[56];
+
+extern FlexSkeletonHeader gLinkAdultSkel;
+
+#endif
diff --git a/assets/objects/object_link_child/object_link_child.c b/assets/objects/object_link_child/object_link_child.c
new file mode 100644
index 0000000000..035cbedb30
--- /dev/null
+++ b/assets/objects/object_link_child/object_link_child.c
@@ -0,0 +1,1195 @@
+#include "object_link_child.h"
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "z64player.h"
+
+// Eyes textures
+
+u64 gLinkChildEyesOpenTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildEyesOpenTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildEyesHalfTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildEyesHalfTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildEyesClosedfTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildEyesClosedfTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildEyesLeftTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildEyesLeftTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildEyesRightTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildEyesRightTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildEyesWideTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildEyesWideTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildEyesDownTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildEyesDownTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildEyesWincingTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildEyesWincingTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+// Mouth textures
+
+u64 gLinkChildMouthClosedTex[TEX_LEN(u64, LINK_CHILD_MOUTH_TEX_WIDTH, LINK_CHILD_MOUTH_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildMouthClosedTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildMouthHalfTex[TEX_LEN(u64, LINK_CHILD_MOUTH_TEX_WIDTH, LINK_CHILD_MOUTH_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildMouthHalfTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildMouthOpenTex[TEX_LEN(u64, LINK_CHILD_MOUTH_TEX_WIDTH, LINK_CHILD_MOUTH_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildMouthOpenTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildMouthSmileTex[TEX_LEN(u64, LINK_CHILD_MOUTH_TEX_WIDTH, LINK_CHILD_MOUTH_TEX_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildMouthSmileTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+// Textures
+
+#define gLinkChildNoseTex_WIDTH 16
+#define gLinkChildNoseTex_HEIGHT 16
+u64 gLinkChildNoseTex[TEX_LEN(u64, gLinkChildNoseTex_WIDTH, gLinkChildNoseTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildNoseTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+#define gLinkChildUnusedHandTex_WIDTH 16
+#define gLinkChildUnusedHandTex_HEIGHT 16
+u64 gLinkChildUnusedHandTex[TEX_LEN(u64, gLinkChildUnusedHandTex_WIDTH, gLinkChildUnusedHandTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildUnusedHandTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+#define gLinkChildEarTex_WIDTH 16
+#define gLinkChildEarTex_HEIGHT 16
+u64 gLinkChildEarTex[TEX_LEN(u64, gLinkChildEarTex_WIDTH, gLinkChildEarTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildEarTex.ci8.tlut_gLinkChildSkinTLUT.inc.c"
+};
+
+u64 gLinkChildBeltTLUT[] = {
+#include "assets/objects/object_link_child/gLinkChildBeltTLUT.tlut.rgba16.inc.c"
+};
+
+u64 gLinkChildSkinTLUT[] = {
+#include "assets/objects/object_link_child/gLinkChildSkinTLUT.tlut.rgba16.inc.c"
+};
+
+u64 gLinkChildUnusedTLUT[] = {
+#include "assets/objects/object_link_child/gLinkChildUnused1Tex.tlut.rgba16.inc.c"
+};
+
+#define gLinkChildUnused1Tex_WIDTH 16
+#define gLinkChildUnused1Tex_HEIGHT 16
+u64 gLinkChildUnused1Tex[TEX_LEN(u64, gLinkChildUnused1Tex_WIDTH, gLinkChildUnused1Tex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildUnused1Tex.ci8.inc.c"
+};
+
+#define gLinkChildUnused2Tex_WIDTH 32
+#define gLinkChildUnused2Tex_HEIGHT 16
+u64 gLinkChildUnused2Tex[TEX_LEN(u64, gLinkChildUnused2Tex_WIDTH, gLinkChildUnused2Tex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildUnused2Tex.ci8.tlut_gLinkChildBeltTLUT.inc.c"
+};
+
+#define gLinkChildLowerBootTex_WIDTH 32
+#define gLinkChildLowerBootTex_HEIGHT 32
+u64 gLinkChildLowerBootTex[TEX_LEN(u64, gLinkChildLowerBootTex_WIDTH, gLinkChildLowerBootTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildLowerBootTex.ci8.tlut_gLinkChildBeltTLUT.inc.c"
+};
+
+#define gLinkChildBootTex_WIDTH 32
+#define gLinkChildBootTex_HEIGHT 32
+u64 gLinkChildBootTex[TEX_LEN(u64, gLinkChildBootTex_WIDTH, gLinkChildBootTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildBootTex.ci8.tlut_gLinkChildBeltTLUT.inc.c"
+};
+
+#define gLinkChildWaistTex_WIDTH 32
+#define gLinkChildWaistTex_HEIGHT 32
+u64 gLinkChildWaistTex[TEX_LEN(u64, gLinkChildWaistTex_WIDTH, gLinkChildWaistTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildWaistTex.i8.inc.c"
+};
+
+#define gLinkChildBeltTex_WIDTH 8
+#define gLinkChildBeltTex_HEIGHT 16
+u64 gLinkChildBeltTex[TEX_LEN(u64, gLinkChildBeltTex_WIDTH, gLinkChildBeltTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildBeltTex.ci8.tlut_gLinkChildBeltTLUT.inc.c"
+};
+
+#define gLinkChildBeltClaspTex_WIDTH 32
+#define gLinkChildBeltClaspTex_HEIGHT 16
+u64 gLinkChildBeltClaspTex[TEX_LEN(u64, gLinkChildBeltClaspTex_WIDTH, gLinkChildBeltClaspTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildBeltClaspTex.ci8.tlut_gLinkChildBeltTLUT.inc.c"
+};
+
+// Deku stick
+
+Vtx gLinkChildLinkDekuStickVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLinkDekuStickVtx.inc.c"
+};
+
+Gfx gLinkChildLinkDekuStickDL[41] = {
+#include "assets/objects/object_link_child/gLinkChildLinkDekuStickDL.inc.c"
+};
+
+// Textures
+
+#define gLinkChildFairyOcarinaTex_WIDTH 32
+#define gLinkChildFairyOcarinaTex_HEIGHT 16
+u64 gLinkChildFairyOcarinaTex[TEX_LEN(u64, gLinkChildFairyOcarinaTex_WIDTH, gLinkChildFairyOcarinaTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildFairyOcarinaTex.rgba16.inc.c"
+};
+
+#define gLinkChildGoronBraceletTex_WIDTH 8
+#define gLinkChildGoronBraceletTex_HEIGHT 8
+u64 gLinkChildGoronBraceletTex[TEX_LEN(u64, gLinkChildGoronBraceletTex_WIDTH, gLinkChildGoronBraceletTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGoronBraceletTex.rgba16.inc.c"
+};
+
+#define gLinkChildGoronSymbolTex_WIDTH 16
+#define gLinkChildGoronSymbolTex_HEIGHT 32
+u64 gLinkChildGoronSymbolTex[TEX_LEN(u64, gLinkChildGoronSymbolTex_WIDTH, gLinkChildGoronSymbolTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGoronSymbolTex.ia16.inc.c"
+};
+
+#define gLinkChildDekuShieldBackTex_WIDTH 32
+#define gLinkChildDekuShieldBackTex_HEIGHT 32
+u64 gLinkChildDekuShieldBackTex[TEX_LEN(u64, gLinkChildDekuShieldBackTex_WIDTH, gLinkChildDekuShieldBackTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldBackTex.rgba16.inc.c"
+};
+
+#define gLinkChildDekuShieldFrontTex_WIDTH 32
+#define gLinkChildDekuShieldFrontTex_HEIGHT 64
+u64 gLinkChildDekuShieldFrontTex[TEX_LEN(u64, gLinkChildDekuShieldFrontTex_WIDTH, gLinkChildDekuShieldFrontTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldFrontTex.rgba16.inc.c"
+};
+
+#define gLinkChildHylianShieldBackTex_WIDTH 16
+#define gLinkChildHylianShieldBackTex_HEIGHT 32
+u64 gLinkChildHylianShieldBackTex[TEX_LEN(u64, gLinkChildHylianShieldBackTex_WIDTH,
+ gLinkChildHylianShieldBackTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildHylianShieldBackTex.rgba16.inc.c"
+};
+
+#define gLinkChildSlingshotTex_WIDTH 16
+#define gLinkChildSlingshotTex_HEIGHT 32
+u64 gLinkChildSlingshotTex[TEX_LEN(u64, gLinkChildSlingshotTex_WIDTH, gLinkChildSlingshotTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildSlingshotTex.rgba16.inc.c"
+};
+
+#define gLinkChildSlingshotSeedTex_WIDTH 32
+#define gLinkChildSlingshotSeedTex_HEIGHT 32
+u64 gLinkChildSlingshotSeedTex[TEX_LEN(u64, gLinkChildSlingshotSeedTex_WIDTH, gLinkChildSlingshotSeedTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildSlingshotSeedTex.rgba16.inc.c"
+};
+
+u64 gLinkChildHandTLUT[] = {
+#include "assets/objects/object_link_child/gLinkChildHandTex.tlut.rgba16.inc.c"
+};
+
+u64 gLinkChildSwordsTLUT[] = {
+#include "assets/objects/object_link_child/gLinkChildSwordsTLUT.tlut.rgba16.inc.c"
+};
+
+u8 gLinkChild_A110_Blob[] = {
+#include "assets/objects/object_link_child/gLinkChild_A110_Blob.bin.inc.c"
+};
+
+u64 gLinkChildSwordTLUT[] = {
+#include "assets/objects/object_link_child/gLinkChildSwordJewelTex.tlut.rgba16.inc.c"
+};
+
+#define gLinkChildHandTex_WIDTH 16
+#define gLinkChildHandTex_HEIGHT 16
+u64 gLinkChildHandTex[TEX_LEN(u64, gLinkChildHandTex_WIDTH, gLinkChildHandTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildHandTex.ci8.inc.c"
+};
+
+#define gLinkChildKokiriSwordSheathTex_WIDTH 16
+#define gLinkChildKokiriSwordSheathTex_HEIGHT 16
+u64 gLinkChildKokiriSwordSheathTex[TEX_LEN(u64, gLinkChildKokiriSwordSheathTex_WIDTH,
+ gLinkChildKokiriSwordSheathTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildKokiriSwordSheathTex.ci8.tlut_gLinkChildSwordsTLUT.inc.c"
+};
+
+#define gLinkChildSwordJewelTex_WIDTH 32
+#define gLinkChildSwordJewelTex_HEIGHT 16
+u64 gLinkChildSwordJewelTex[TEX_LEN(u64, gLinkChildSwordJewelTex_WIDTH, gLinkChildSwordJewelTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildSwordJewelTex.ci8.inc.c"
+};
+
+#define gLinkChildMasterSwordPommelTex_WIDTH 16
+#define gLinkChildMasterSwordPommelTex_HEIGHT 16
+u64 gLinkChildMasterSwordPommelTex[TEX_LEN(u64, gLinkChildMasterSwordPommelTex_WIDTH,
+ gLinkChildMasterSwordPommelTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildMasterSwordPommelTex.ci8.tlut_gLinkChildSwordsTLUT.inc.c"
+};
+
+#define gLinkChildMasterSwordGuardTex_WIDTH 32
+#define gLinkChildMasterSwordGuardTex_HEIGHT 32
+u64 gLinkChildMasterSwordGuardTex[TEX_LEN(u64, gLinkChildMasterSwordGuardTex_WIDTH,
+ gLinkChildMasterSwordGuardTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildMasterSwordGuardTex.ci8.tlut_gLinkChildSwordsTLUT.inc.c"
+};
+
+#define gLinkChildMasterSwordEmblemTex_WIDTH 16
+#define gLinkChildMasterSwordEmblemTex_HEIGHT 16
+u64 gLinkChildMasterSwordEmblemTex[TEX_LEN(u64, gLinkChildMasterSwordEmblemTex_WIDTH,
+ gLinkChildMasterSwordEmblemTex_HEIGHT, 8)] = {
+#include "assets/objects/object_link_child/gLinkChildMasterSwordEmblemTex.ci8.tlut_gLinkChildSwordsTLUT.inc.c"
+};
+
+// Various vertices and DLs
+
+Vtx gLinkChildLeftHandNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandNearVtx.inc.c"
+};
+
+Vtx gLinkChildLeftFistNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistNearVtx.inc.c"
+};
+
+Vtx gLinkChildLeftFistAndKokiriSwordNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistAndKokiriSwordNearVtx.inc.c"
+};
+
+Vtx gLinkChildRightHandNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandNearVtx.inc.c"
+};
+
+Vtx gLinkChildRightHandClosedNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandClosedNearVtx.inc.c"
+};
+
+Vtx gLinkChildRightFistAndDekuShieldNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightFistAndDekuShieldNearVtx.inc.c"
+};
+
+Vtx gLinkChildLeftFistAndBoomerangNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistAndBoomerangNearVtx.inc.c"
+};
+
+Vtx gLinkChildHylianShieldSwordAndSheathNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildHylianShieldSwordAndSheathNearVtx.inc.c"
+};
+
+Vtx gLinkChildHylianShieldAndSheathNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildHylianShieldAndSheathNearVtx.inc.c"
+};
+
+Vtx gLinkChildDekuShieldSwordAndSheathNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldSwordAndSheathNearVtx.inc.c"
+};
+
+Vtx gLinkChildDekuShieldAndSheathNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldAndSheathNearVtx.inc.c"
+};
+
+Vtx gLinkChildSwordAndSheathNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildSwordAndSheathNearVtx.inc.c"
+};
+
+Vtx gLinkChildSheathNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildSheathNearVtx.inc.c"
+};
+
+Vtx gLinkChildLeftHandHoldingMasterSwordVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandHoldingMasterSwordVtx.inc.c"
+};
+
+Vtx gLinkChildRightHandAndOotNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandAndOotNearVtx.inc.c"
+};
+
+Vtx gLinkChildRightHandHoldingFairyOcarinaNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandHoldingFairyOcarinaNearVtx.inc.c"
+};
+
+Vtx gLinkChildRightHandHoldingSlingshotNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandHoldingSlingshotNearVtx.inc.c"
+};
+
+Vtx gLinkChildLeftHandUpNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandUpNearVtx.inc.c"
+};
+
+Vtx gLinkChildGoronBraceletVtx1[] = {
+#include "assets/objects/object_link_child/gLinkChildGoronBraceletVtx1.inc.c"
+};
+
+Vtx gLinkChildLeftHandFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandFarVtx.inc.c"
+};
+
+Vtx gLinkChildLeftFistFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistFarVtx.inc.c"
+};
+
+Vtx gLinkChildRightHandFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandFarVtx.inc.c"
+};
+
+Vtx gLinkChildRightHandClosedFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandClosedFarVtx.inc.c"
+};
+
+Vtx gLinkChildRightFistAndDekuShieldFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightFistAndDekuShieldFarVtx.inc.c"
+};
+
+Vtx gLinkChildLeftFistAndBoomerangFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistAndBoomerangFarVtx.inc.c"
+};
+
+Vtx gLinkChildHylianShieldSwordAndSheathFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildHylianShieldSwordAndSheathFarVtx.inc.c"
+};
+
+Vtx gLinkChildHylianShieldAndSheathFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildHylianShieldAndSheathFarVtx.inc.c"
+};
+
+Vtx gLinkChildDekuShieldSwordAndSheathFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldSwordAndSheathFarVtx.inc.c"
+};
+
+Vtx gLinkChildDekuShieldAndSheathFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldAndSheathFarVtx.inc.c"
+};
+
+Vtx gLinkChildSwordAndSheathFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildSwordAndSheathFarVtx.inc.c"
+};
+
+Vtx gLinkChildSheathFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildSheathFarVtx.inc.c"
+};
+
+Vtx gLinkChildLeftFistAndKokiriSwordFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistAndKokiriSwordFarVtx.inc.c"
+};
+
+Vtx gLinkChildRightHandHoldingOOTFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandHoldingOOTFarVtx.inc.c"
+};
+
+Vtx gLinkChildRightHandHoldingFairyOcarinaFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandHoldingFairyOcarinaFarVtx.inc.c"
+};
+
+Vtx gLinkChildRightHandHoldingSlingshotFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandHoldingSlingshotFarVtx.inc.c"
+};
+
+Vtx gLinkChildLeftHandUpFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandUpFarVtx.inc.c"
+};
+
+Vtx gLinkChildRightArmStretchedSlingshotVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightArmStretchedSlingshotVtx.inc.c"
+};
+
+Vtx gLinkChildBottleVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildBottleVtx.inc.c"
+};
+
+Vtx gLinkChildGoronBraceletVtx2[] = {
+#include "assets/objects/object_link_child/gLinkChildGoronBraceletVtx2.inc.c"
+};
+
+Vtx gLinkChildDL_18580_Vtx[] = {
+#include "assets/objects/object_link_child/gLinkChildDL_18580_Vtx.inc.c"
+};
+
+Vtx gLinkChildBottle2Vtx[] = {
+#include "assets/objects/object_link_child/gLinkChildBottle2Vtx.inc.c"
+};
+
+Gfx gLinkChildLeftHandNearDL[45] = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandNearDL.inc.c"
+};
+
+Gfx gLinkChildLeftFistNearDL[36] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistNearDL.inc.c"
+};
+
+Gfx gLinkChildLeftFistAndKokiriSwordNearDL[81] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistAndKokiriSwordNearDL.inc.c"
+};
+
+Gfx gLinkChildRightHandNearDL[44] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandNearDL.inc.c"
+};
+
+Gfx gLinkChildRightHandClosedNearDL[36] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandClosedNearDL.inc.c"
+};
+
+Gfx gLinkChildRightFistAndDekuShieldNearDL[68] = {
+#include "assets/objects/object_link_child/gLinkChildRightFistAndDekuShieldNearDL.inc.c"
+};
+
+Gfx gLinkChildLeftFistAndBoomerangNearDL[73] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistAndBoomerangNearDL.inc.c"
+};
+
+Gfx gLinkChildHylianShieldSwordAndSheathNearDL[83] = {
+#include "assets/objects/object_link_child/gLinkChildHylianShieldSwordAndSheathNearDL.inc.c"
+};
+
+Gfx gLinkChildHylianShieldAndSheathNearDL[69] = {
+#include "assets/objects/object_link_child/gLinkChildHylianShieldAndSheathNearDL.inc.c"
+};
+
+Gfx gLinkChildDekuShieldSwordAndSheathNearDL[85] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldSwordAndSheathNearDL.inc.c"
+};
+
+Gfx gLinkChildDekuShieldAndSheathNearDL[71] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldAndSheathNearDL.inc.c"
+};
+
+Gfx gLinkChildSwordAndSheathNearDL[56] = {
+#include "assets/objects/object_link_child/gLinkChildSwordAndSheathNearDL.inc.c"
+};
+
+Gfx gLinkChildSheathNearDL[39] = {
+#include "assets/objects/object_link_child/gLinkChildSheathNearDL.inc.c"
+};
+
+Gfx gLinkChildLeftHandHoldingMasterSwordDL[131] = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandHoldingMasterSwordDL.inc.c"
+};
+
+Gfx gLinkChildRightHandAndOotNearDL[74] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandAndOotNearDL.inc.c"
+};
+
+Gfx gLinkChildRightHandHoldingFairyOcarinaNearDL[73] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandHoldingFairyOcarinaNearDL.inc.c"
+};
+
+Gfx gLinkChildRightHandHoldingSlingshotNearDL[60] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandHoldingSlingshotNearDL.inc.c"
+};
+
+Gfx gLinkChildLeftHandUpNearDL[41] = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandUpNearDL.inc.c"
+};
+
+Gfx gLinkChildGoronBraceletDL[45] = {
+#include "assets/objects/object_link_child/gLinkChildGoronBraceletDL.inc.c"
+};
+
+Gfx gLinkChildLeftHandFarDL[40] = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandFarDL.inc.c"
+};
+
+Gfx gLinkChildLeftFistFarDL[36] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistFarDL.inc.c"
+};
+
+Gfx gLinkChildRightHandFarDL[40] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandFarDL.inc.c"
+};
+
+Gfx gLinkChildRightHandClosedFarDL[36] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandClosedFarDL.inc.c"
+};
+
+Gfx gLinkChildRightFistAndDekuShieldFarDL[57] = {
+#include "assets/objects/object_link_child/gLinkChildRightFistAndDekuShieldFarDL.inc.c"
+};
+
+Gfx gLinkChildLeftFistAndBoomerangFarDL[50] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistAndBoomerangFarDL.inc.c"
+};
+
+Gfx gLinkChildHylianShieldSwordAndSheathFarDL[76] = {
+#include "assets/objects/object_link_child/gLinkChildHylianShieldSwordAndSheathFarDL.inc.c"
+};
+
+Gfx gLinkChildHylianShieldAndSheathFarDL[62] = {
+#include "assets/objects/object_link_child/gLinkChildHylianShieldAndSheathFarDL.inc.c"
+};
+
+Gfx gLinkChildDekuShieldSwordAndSheathFarDL[77] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldSwordAndSheathFarDL.inc.c"
+};
+
+Gfx gLinkChildDekuShieldAndSheathFarDL[66] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldAndSheathFarDL.inc.c"
+};
+
+Gfx gLinkChildSwordAndSheathFarDL[52] = {
+#include "assets/objects/object_link_child/gLinkChildSwordAndSheathFarDL.inc.c"
+};
+
+Gfx gLinkChildSheathFarDL[38] = {
+#include "assets/objects/object_link_child/gLinkChildSheathFarDL.inc.c"
+};
+
+Gfx gLinkChildLeftFistAndKokiriSwordFarDL[78] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFistAndKokiriSwordFarDL.inc.c"
+};
+
+Gfx gLinkChildRightHandHoldingOOTFarDL[74] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandHoldingOOTFarDL.inc.c"
+};
+
+Gfx gLinkChildRightHandHoldingFairyOcarinaFarDL[73] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandHoldingFairyOcarinaFarDL.inc.c"
+};
+
+Gfx gLinkChildRightHandHoldingSlingshotFarDL[57] = {
+#include "assets/objects/object_link_child/gLinkChildRightHandHoldingSlingshotFarDL.inc.c"
+};
+
+Gfx gLinkChildLeftHandUpFarDL[41] = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandUpFarDL.inc.c"
+};
+
+Gfx gLinkChildRightArmStretchedSlingshotDL[134] = {
+#include "assets/objects/object_link_child/gLinkChildRightArmStretchedSlingshotDL.inc.c"
+};
+
+Gfx gLinkChildBottleDL[33] = {
+#include "assets/objects/object_link_child/gLinkChildBottleDL.inc.c"
+};
+
+Gfx gLinkChildDL_18580[25] = {
+#include "assets/objects/object_link_child/gLinkChildDL_18580.inc.c"
+};
+
+Gfx gLinkChildBottle2DL[34] = {
+#include "assets/objects/object_link_child/gLinkChildBottle2DL.inc.c"
+};
+
+// Far skeleton vertices and DLs
+
+Vtx gLinkChildRightFootFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightFootFarVtx.inc.c"
+};
+
+Vtx gLinkChildRightShinFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightShinFarVtx.inc.c"
+};
+
+Vtx gLinkChildRightThighFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightThighFarVtx.inc.c"
+};
+
+Vtx gLinkChildLeftFootFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFootFarVtx.inc.c"
+};
+
+Vtx gLinkChildLeftShinFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftShinFarVtx.inc.c"
+};
+
+Vtx gLinkChildLeftThighFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftThighFarVtx.inc.c"
+};
+
+Vtx gLinkChildWaistFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildWaistFarVtx.inc.c"
+};
+
+Vtx gLinkChildHatFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildHatFarVtx.inc.c"
+};
+
+Vtx gLinkChildHeadFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildHeadFarVtx.inc.c"
+};
+
+Vtx gLinkChildCollarFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildCollarFarVtx.inc.c"
+};
+
+Vtx gLinkChildVtx_019E08[] = {
+#include "assets/objects/object_link_child/gLinkChildVtx_019E08.inc.c"
+};
+
+Vtx gLinkChildLeftForearmFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftForearmFarVtx.inc.c"
+};
+
+Vtx gLinkChildLeftShoulderFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftShoulderFarVtx.inc.c"
+};
+
+Vtx gLinkChildVtx_01A428[] = {
+#include "assets/objects/object_link_child/gLinkChildVtx_01A428.inc.c"
+};
+
+Vtx gLinkChildRightForearmFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightForearmFarVtx.inc.c"
+};
+
+Vtx gLinkChildRightShoulderFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightShoulderFarVtx.inc.c"
+};
+
+Vtx gLinkChildVtx_01AA98[] = {
+#include "assets/objects/object_link_child/gLinkChildVtx_01AA98.inc.c"
+};
+
+Vtx gLinkChildTorsoFarVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildTorsoFarVtx.inc.c"
+};
+
+Gfx gLinkChildWaistFarDL[70] = {
+#include "assets/objects/object_link_child/gLinkChildWaistFarDL.inc.c"
+};
+
+Gfx gLinkChildRightThighFarDL[56] = {
+#include "assets/objects/object_link_child/gLinkChildRightThighFarDL.inc.c"
+};
+
+Gfx gLinkChildRightShinFarDL[75] = {
+#include "assets/objects/object_link_child/gLinkChildRightShinFarDL.inc.c"
+};
+
+Gfx gLinkChildRightFootFarDL[37] = {
+#include "assets/objects/object_link_child/gLinkChildRightFootFarDL.inc.c"
+};
+
+Gfx gLinkChildLeftThighFarDL[56] = {
+#include "assets/objects/object_link_child/gLinkChildLeftThighFarDL.inc.c"
+};
+
+Gfx gLinkChildLeftShinFarDL[75] = {
+#include "assets/objects/object_link_child/gLinkChildLeftShinFarDL.inc.c"
+};
+
+Gfx gLinkChildLeftFootFarDL[37] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFootFarDL.inc.c"
+};
+
+Gfx gLinkChildCollarFarDL[12] = {
+#include "assets/objects/object_link_child/gLinkChildCollarFarDL.inc.c"
+};
+
+Gfx gLinkChildTorsoFarDL[57] = {
+#include "assets/objects/object_link_child/gLinkChildTorsoFarDL.inc.c"
+};
+
+Gfx gLinkChildHeadFarDL[161] = {
+#include "assets/objects/object_link_child/gLinkChildHeadFarDL.inc.c"
+};
+
+Gfx gLinkChildHatFarDL[30] = {
+#include "assets/objects/object_link_child/gLinkChildHatFarDL.inc.c"
+};
+
+Gfx gLinkChildRightShoulderFarDL[56] = {
+#include "assets/objects/object_link_child/gLinkChildRightShoulderFarDL.inc.c"
+};
+
+Gfx gLinkChildRightForearmFarDL[38] = {
+#include "assets/objects/object_link_child/gLinkChildRightForearmFarDL.inc.c"
+};
+
+Gfx gLinkChildLeftShoulderFarDL[56] = {
+#include "assets/objects/object_link_child/gLinkChildLeftShoulderFarDL.inc.c"
+};
+
+Gfx gLinkChildLeftForearmFarDL[38] = {
+#include "assets/objects/object_link_child/gLinkChildLeftForearmFarDL.inc.c"
+};
+
+// Near skeleton vertices and DLs
+
+Vtx gLinkChildRightFootNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightFootNearVtx.inc.c"
+};
+
+Vtx gLinkChildRightShinNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightShinNearVtx.inc.c"
+};
+
+Vtx gLinkChildRightThighNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightThighNearVtx.inc.c"
+};
+
+Vtx gLinkChildLeftFootNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFootNearVtx.inc.c"
+};
+
+Vtx gLinkChildLeftShinNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftShinNearVtx.inc.c"
+};
+
+Vtx gLinkChildLeftThighNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftThighNearVtx.inc.c"
+};
+
+Vtx gLinkChildWaistNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildWaistNearVtx.inc.c"
+};
+
+Vtx gLinkChildHatNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildHatNearVtx.inc.c"
+};
+
+Vtx gLinkChildHeadNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildHeadNearVtx.inc.c"
+};
+
+Vtx gLinkChildCollarNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildCollarNearVtx.inc.c"
+};
+
+Vtx gLinkChildVtx_01EB38[] = {
+#include "assets/objects/object_link_child/gLinkChildVtx_01EB38.inc.c"
+};
+
+Vtx gLinkChildLeftForearmNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftForearmNearVtx.inc.c"
+};
+
+Vtx gLinkChildLeftShoulderNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildLeftShoulderNearVtx.inc.c"
+};
+
+Vtx gLinkChildVtx_01F2B8[] = {
+#include "assets/objects/object_link_child/gLinkChildVtx_01F2B8.inc.c"
+};
+
+Vtx gLinkChildRightForearmNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightForearmNearVtx.inc.c"
+};
+
+Vtx gLinkChildRightShoulderNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildRightShoulderNearVtx.inc.c"
+};
+
+Vtx gLinkChildVtx_01FA28[] = {
+#include "assets/objects/object_link_child/gLinkChildVtx_01FA28.inc.c"
+};
+
+Vtx gLinkChildTorsoNearVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildTorsoNearVtx.inc.c"
+};
+
+Gfx gLinkChildWaistNearDL[73] = {
+#include "assets/objects/object_link_child/gLinkChildWaistNearDL.inc.c"
+};
+
+Gfx gLinkChildRightThighNearDL[63] = {
+#include "assets/objects/object_link_child/gLinkChildRightThighNearDL.inc.c"
+};
+
+Gfx gLinkChildRightShinNearDL[82] = {
+#include "assets/objects/object_link_child/gLinkChildRightShinNearDL.inc.c"
+};
+
+Gfx gLinkChildRightFootNearDL[44] = {
+#include "assets/objects/object_link_child/gLinkChildRightFootNearDL.inc.c"
+};
+
+Gfx gLinkChildLeftThighNearDL[63] = {
+#include "assets/objects/object_link_child/gLinkChildLeftThighNearDL.inc.c"
+};
+
+Gfx gLinkChildLeftShinNearDL[82] = {
+#include "assets/objects/object_link_child/gLinkChildLeftShinNearDL.inc.c"
+};
+
+Gfx gLinkChildLeftFootNearDL[44] = {
+#include "assets/objects/object_link_child/gLinkChildLeftFootNearDL.inc.c"
+};
+
+Gfx gLinkChildCollarNearDL[14] = {
+#include "assets/objects/object_link_child/gLinkChildCollarNearDL.inc.c"
+};
+
+Gfx gLinkChildTorsoNearDL[70] = {
+#include "assets/objects/object_link_child/gLinkChildTorsoNearDL.inc.c"
+};
+
+Gfx gLinkChildHeadNearDL[202] = {
+#include "assets/objects/object_link_child/gLinkChildHeadNearDL.inc.c"
+};
+
+Gfx gLinkChildHatNearDL[39] = {
+#include "assets/objects/object_link_child/gLinkChildHatNearDL.inc.c"
+};
+
+Gfx gLinkChildRightShoulderNearDL[58] = {
+#include "assets/objects/object_link_child/gLinkChildRightShoulderNearDL.inc.c"
+};
+
+Gfx gLinkChildRightForearmNearDL[44] = {
+#include "assets/objects/object_link_child/gLinkChildRightForearmNearDL.inc.c"
+};
+
+Gfx gLinkChildLeftShoulderNearDL[58] = {
+#include "assets/objects/object_link_child/gLinkChildLeftShoulderNearDL.inc.c"
+};
+
+Gfx gLinkChildLeftForearmNearDL[44] = {
+#include "assets/objects/object_link_child/gLinkChildLeftForearmNearDL.inc.c"
+};
+
+// Slingshot string
+
+Vtx gLinkChildSlingshotStringVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildSlingshotStringVtx.inc.c"
+};
+
+Gfx gLinkChildSlingshotStringDL[12] = {
+#include "assets/objects/object_link_child/gLinkChildSlingshotStringDL.inc.c"
+};
+
+// Deku shield
+
+Vtx gLinkChildDekuShieldVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldVtx.inc.c"
+};
+
+Gfx gLinkChildDekuShieldDL[42] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldDL.inc.c"
+};
+
+Mtx gLinkChildDekuShieldMtx =
+#include "assets/objects/object_link_child/gLinkChildDekuShieldMtx.inc.c"
+ ;
+
+Gfx gLinkChildDekuShieldWithMatrixDL[3] = {
+#include "assets/objects/object_link_child/gLinkChildDekuShieldWithMatrixDL.inc.c"
+};
+
+// Masks
+
+#define gLinkChildSpookyMaskTex_WIDTH 32
+#define gLinkChildSpookyMaskTex_HEIGHT 64
+u64 gLinkChildSpookyMaskTex[TEX_LEN(u64, gLinkChildSpookyMaskTex_WIDTH, gLinkChildSpookyMaskTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildSpookyMaskTex.ia16.inc.c"
+};
+
+#define gLinkChildKeatonMaskEyeBrowTex_WIDTH 32
+#define gLinkChildKeatonMaskEyeBrowTex_HEIGHT 16
+u64 gLinkChildKeatonMaskEyeBrowTex[TEX_LEN(u64, gLinkChildKeatonMaskEyeBrowTex_WIDTH,
+ gLinkChildKeatonMaskEyeBrowTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildKeatonMaskEyeBrowTex.rgba16.inc.c"
+};
+
+#define gLinkChildKeatonMaskEarTex_WIDTH 8
+#define gLinkChildKeatonMaskEarTex_HEIGHT 8
+u64 gLinkChildKeatonMaskEarTex[TEX_LEN(u64, gLinkChildKeatonMaskEarTex_WIDTH, gLinkChildKeatonMaskEarTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildKeatonMaskEarTex.rgba16.inc.c"
+};
+
+#define gLinkChildSkullMaskEyeTex_WIDTH 16
+#define gLinkChildSkullMaskEyeTex_HEIGHT 16
+u64 gLinkChildSkullMaskEyeTex[TEX_LEN(u64, gLinkChildSkullMaskEyeTex_WIDTH, gLinkChildSkullMaskEyeTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildSkullMaskEyeTex.rgba16.inc.c"
+};
+
+#define gLinkChildMaskOfTruthTex_WIDTH 32
+#define gLinkChildMaskOfTruthTex_HEIGHT 64
+u64 gLinkChildMaskOfTruthTex[TEX_LEN(u64, gLinkChildMaskOfTruthTex_WIDTH, gLinkChildMaskOfTruthTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildMaskOfTruthTex.rgba16.inc.c"
+};
+
+#define gLinkChildMaskOfTruthCurveTex_WIDTH 16
+#define gLinkChildMaskOfTruthCurveTex_HEIGHT 32
+u64 gLinkChildMaskOfTruthCurveTex[TEX_LEN(u64, gLinkChildMaskOfTruthCurveTex_WIDTH,
+ gLinkChildMaskOfTruthCurveTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildMaskOfTruthCurveTex.rgba16.inc.c"
+};
+
+#define gLinkChildGoronMaskMouthTex_WIDTH 64
+#define gLinkChildGoronMaskMouthTex_HEIGHT 32
+u64 gLinkChildGoronMaskMouthTex[TEX_LEN(u64, gLinkChildGoronMaskMouthTex_WIDTH, gLinkChildGoronMaskMouthTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGoronMaskMouthTex.rgba16.inc.c"
+};
+
+#define gLinkChildGoronMaskEyeTex_WIDTH 32
+#define gLinkChildGoronMaskEyeTex_HEIGHT 32
+u64 gLinkChildGoronMaskEyeTex[TEX_LEN(u64, gLinkChildGoronMaskEyeTex_WIDTH, gLinkChildGoronMaskEyeTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGoronMaskEyeTex.rgba16.inc.c"
+};
+
+#define gLinkChildGoronMaskNoseTex_WIDTH 8
+#define gLinkChildGoronMaskNoseTex_HEIGHT 8
+u64 gLinkChildGoronMaskNoseTex[TEX_LEN(u64, gLinkChildGoronMaskNoseTex_WIDTH, gLinkChildGoronMaskNoseTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGoronMaskNoseTex.rgba16.inc.c"
+};
+
+#define gLinkChildGoronMaskHairTex_WIDTH 16
+#define gLinkChildGoronMaskHairTex_HEIGHT 16
+u64 gLinkChildGoronMaskHairTex[TEX_LEN(u64, gLinkChildGoronMaskHairTex_WIDTH, gLinkChildGoronMaskHairTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGoronMaskHairTex.rgba16.inc.c"
+};
+
+#define gLinkChildSkullMaskTeethTex_WIDTH 8
+#define gLinkChildSkullMaskTeethTex_HEIGHT 8
+u64 gLinkChildSkullMaskTeethTex[TEX_LEN(u64, gLinkChildSkullMaskTeethTex_WIDTH, gLinkChildSkullMaskTeethTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildSkullMaskTeethTex.rgba16.inc.c"
+};
+
+#define gLinkChildGoronMaskEarTex_WIDTH 8
+#define gLinkChildGoronMaskEarTex_HEIGHT 8
+u64 gLinkChildGoronMaskEarTex[TEX_LEN(u64, gLinkChildGoronMaskEarTex_WIDTH, gLinkChildGoronMaskEarTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGoronMaskEarTex.rgba16.inc.c"
+};
+
+#define gLinkChildZoraMaskEyeBoarderTex_WIDTH 8
+#define gLinkChildZoraMaskEyeBoarderTex_HEIGHT 8
+u64 gLinkChildZoraMaskEyeBoarderTex[TEX_LEN(u64, gLinkChildZoraMaskEyeBoarderTex_WIDTH,
+ gLinkChildZoraMaskEyeBoarderTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildZoraMaskEyeBoarderTex.rgba16.inc.c"
+};
+
+#define gLinkChildZoraMaskEarTex_WIDTH 32
+#define gLinkChildZoraMaskEarTex_HEIGHT 32
+u64 gLinkChildZoraMaskEarTex[TEX_LEN(u64, gLinkChildZoraMaskEarTex_WIDTH, gLinkChildZoraMaskEarTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildZoraMaskEarTex.rgba16.inc.c"
+};
+
+#define gLinkChildSkullMaskNoseTex_WIDTH 8
+#define gLinkChildSkullMaskNoseTex_HEIGHT 8
+u64 gLinkChildSkullMaskNoseTex[TEX_LEN(u64, gLinkChildSkullMaskNoseTex_WIDTH, gLinkChildSkullMaskNoseTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildSkullMaskNoseTex.rgba16.inc.c"
+};
+
+#define gLinkChildZoraMaskEyeTex_WIDTH 32
+#define gLinkChildZoraMaskEyeTex_HEIGHT 32
+u64 gLinkChildZoraMaskEyeTex[TEX_LEN(u64, gLinkChildZoraMaskEyeTex_WIDTH, gLinkChildZoraMaskEyeTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildZoraMaskEyeTex.rgba16.inc.c"
+};
+
+#define gLinkChildZoraMaskMouthTex_WIDTH 32
+#define gLinkChildZoraMaskMouthTex_HEIGHT 32
+u64 gLinkChildZoraMaskMouthTex[TEX_LEN(u64, gLinkChildZoraMaskMouthTex_WIDTH, gLinkChildZoraMaskMouthTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildZoraMaskMouthTex.rgba16.inc.c"
+};
+
+#define gLinkChildGerudoMaskEyeTex_WIDTH 32
+#define gLinkChildGerudoMaskEyeTex_HEIGHT 32
+u64 gLinkChildGerudoMaskEyeTex[TEX_LEN(u64, gLinkChildGerudoMaskEyeTex_WIDTH, gLinkChildGerudoMaskEyeTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGerudoMaskEyeTex.rgba16.inc.c"
+};
+
+#define gLinkChildGerudoMaskMouthTex_WIDTH 16
+#define gLinkChildGerudoMaskMouthTex_HEIGHT 16
+u64 gLinkChildGerudoMaskMouthTex[TEX_LEN(u64, gLinkChildGerudoMaskMouthTex_WIDTH, gLinkChildGerudoMaskMouthTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGerudoMaskMouthTex.rgba16.inc.c"
+};
+
+#define gLinkChildGerudoMaskHairTex_WIDTH 16
+#define gLinkChildGerudoMaskHairTex_HEIGHT 16
+u64 gLinkChildGerudoMaskHairTex[TEX_LEN(u64, gLinkChildGerudoMaskHairTex_WIDTH, gLinkChildGerudoMaskHairTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGerudoMaskHairTex.rgba16.inc.c"
+};
+
+#define gLinkChildGerudoMaskNoseTex_WIDTH 8
+#define gLinkChildGerudoMaskNoseTex_HEIGHT 8
+u64 gLinkChildGerudoMaskNoseTex[TEX_LEN(u64, gLinkChildGerudoMaskNoseTex_WIDTH, gLinkChildGerudoMaskNoseTex_HEIGHT,
+ 16)] = {
+#include "assets/objects/object_link_child/gLinkChildGerudoMaskNoseTex.rgba16.inc.c"
+};
+
+Vtx gLinkChildSkullMaskVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildSkullMaskVtx.inc.c"
+};
+
+Vtx gLinkChildSpookyMaskVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildSpookyMaskVtx.inc.c"
+};
+
+Vtx gLinkChildKeatonMaskVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildKeatonMaskVtx.inc.c"
+};
+
+Vtx gLinkChildMaskOfTruthVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildMaskOfTruthVtx.inc.c"
+};
+
+Vtx gLinkChildGoronMaskVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildGoronMaskVtx.inc.c"
+};
+
+Vtx gLinkChildZoraMaskVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildZoraMaskVtx.inc.c"
+};
+
+Vtx gLinkChildGerudoMaskVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildGerudoMaskVtx.inc.c"
+};
+
+Gfx gLinkChildSkullMaskDL[70] = {
+#include "assets/objects/object_link_child/gLinkChildSkullMaskDL.inc.c"
+};
+
+Gfx gLinkChildSpookyMaskDL[30] = {
+#include "assets/objects/object_link_child/gLinkChildSpookyMaskDL.inc.c"
+};
+
+Gfx gLinkChildKeatonMaskDL[50] = {
+#include "assets/objects/object_link_child/gLinkChildKeatonMaskDL.inc.c"
+};
+
+Gfx gLinkChildMaskOfTruthDL[44] = {
+#include "assets/objects/object_link_child/gLinkChildMaskOfTruthDL.inc.c"
+};
+
+Gfx gLinkChildGoronMaskDL[70] = {
+#include "assets/objects/object_link_child/gLinkChildGoronMaskDL.inc.c"
+};
+
+Gfx gLinkChildZoraMaskDL[65] = {
+#include "assets/objects/object_link_child/gLinkChildZoraMaskDL.inc.c"
+};
+
+Gfx gLinkChildGerudoMaskDL[84] = {
+#include "assets/objects/object_link_child/gLinkChildGerudoMaskDL.inc.c"
+};
+
+// Bunny hood
+
+#define gLinkChildBunnyHoodEyeTex_WIDTH 16
+#define gLinkChildBunnyHoodEyeTex_HEIGHT 16
+u64 gLinkChildBunnyHoodEyeTex[TEX_LEN(u64, gLinkChildBunnyHoodEyeTex_WIDTH, gLinkChildBunnyHoodEyeTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildBunnyHoodEyeTex.rgba16.inc.c"
+};
+
+#define gLinkChildBunnyHoodTex_WIDTH 16
+#define gLinkChildBunnyHoodTex_HEIGHT 32
+u64 gLinkChildBunnyHoodTex[TEX_LEN(u64, gLinkChildBunnyHoodTex_WIDTH, gLinkChildBunnyHoodTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildBunnyHoodTex.rgba16.inc.c"
+};
+
+#define gLinkChildBunnyHoodEarTex_WIDTH 16
+#define gLinkChildBunnyHoodEarTex_HEIGHT 32
+u64 gLinkChildBunnyHoodEarTex[TEX_LEN(u64, gLinkChildBunnyHoodEarTex_WIDTH, gLinkChildBunnyHoodEarTex_HEIGHT, 16)] = {
+#include "assets/objects/object_link_child/gLinkChildBunnyHoodEarTex.rgba16.inc.c"
+};
+
+Vtx gLinkChildBunnyHoodVtx[] = {
+#include "assets/objects/object_link_child/gLinkChildBunnyHoodVtx.inc.c"
+};
+
+Gfx gLinkChildBunnyHoodDL[114] = {
+#include "assets/objects/object_link_child/gLinkChildBunnyHoodDL.inc.c"
+};
+
+// Skeleton
+
+LodLimb gLinkChildRootLimb = {
+#include "assets/objects/object_link_child/gLinkChildRootLimb.inc.c"
+};
+
+LodLimb gLinkChildWaistLimb = {
+#include "assets/objects/object_link_child/gLinkChildWaistLimb.inc.c"
+};
+
+LodLimb gLinkChildLowerControlLimb = {
+#include "assets/objects/object_link_child/gLinkChildLowerControlLimb.inc.c"
+};
+
+LodLimb gLinkChildRightThighLimb = {
+#include "assets/objects/object_link_child/gLinkChildRightThighLimb.inc.c"
+};
+
+LodLimb gLinkChildRightShinLimb = {
+#include "assets/objects/object_link_child/gLinkChildRightShinLimb.inc.c"
+};
+
+LodLimb gLinkChildRightFootLimb = {
+#include "assets/objects/object_link_child/gLinkChildRightFootLimb.inc.c"
+};
+
+LodLimb gLinkChildLeftThighLimb = {
+#include "assets/objects/object_link_child/gLinkChildLeftThighLimb.inc.c"
+};
+
+LodLimb gLinkChildLeftShinLimb = {
+#include "assets/objects/object_link_child/gLinkChildLeftShinLimb.inc.c"
+};
+
+LodLimb gLinkChildLeftFootLimb = {
+#include "assets/objects/object_link_child/gLinkChildLeftFootLimb.inc.c"
+};
+
+LodLimb gLinkChildUpperControlLimb = {
+#include "assets/objects/object_link_child/gLinkChildUpperControlLimb.inc.c"
+};
+
+LodLimb gLinkChildHeadLimb = {
+#include "assets/objects/object_link_child/gLinkChildHeadLimb.inc.c"
+};
+
+LodLimb gLinkChildHatLimb = {
+#include "assets/objects/object_link_child/gLinkChildHatLimb.inc.c"
+};
+
+LodLimb gLinkChildCollarLimb = {
+#include "assets/objects/object_link_child/gLinkChildCollarLimb.inc.c"
+};
+
+LodLimb gLinkChildLeftshoulderLimb = {
+#include "assets/objects/object_link_child/gLinkChildLeftshoulderLimb.inc.c"
+};
+
+LodLimb gLinkChildLeftForearmLimb = {
+#include "assets/objects/object_link_child/gLinkChildLeftForearmLimb.inc.c"
+};
+
+LodLimb gLinkChildLeftHandLimb = {
+#include "assets/objects/object_link_child/gLinkChildLeftHandLimb.inc.c"
+};
+
+LodLimb gLinkChildRightshoulderLimb = {
+#include "assets/objects/object_link_child/gLinkChildRightshoulderLimb.inc.c"
+};
+
+LodLimb gLinkChildRightForearmLimb = {
+#include "assets/objects/object_link_child/gLinkChildRightForearmLimb.inc.c"
+};
+
+LodLimb gLinkChildRightHandLimb = {
+#include "assets/objects/object_link_child/gLinkChildRightHandLimb.inc.c"
+};
+
+LodLimb gLinkChildSwordAndSheathLimb = {
+#include "assets/objects/object_link_child/gLinkChildSwordAndSheathLimb.inc.c"
+};
+
+LodLimb gLinkChildTorsoLimb = {
+#include "assets/objects/object_link_child/gLinkChildTorsoLimb.inc.c"
+};
+
+void* gLinkChildLimbs[] = {
+#include "assets/objects/object_link_child/gLinkChildLimbs.inc.c"
+};
+
+FlexSkeletonHeader gLinkChildSkel = {
+#include "assets/objects/object_link_child/gLinkChildSkel.inc.c"
+};
diff --git a/assets/objects/object_link_child/object_link_child.h b/assets/objects/object_link_child/object_link_child.h
new file mode 100644
index 0000000000..7efc576808
--- /dev/null
+++ b/assets/objects/object_link_child/object_link_child.h
@@ -0,0 +1,87 @@
+#ifndef OBJECT_LINK_CHILD_H
+#define OBJECT_LINK_CHILD_H
+
+#include "ultra64.h"
+#include "tex_len.h"
+#include "z64animation.h"
+
+#define LINK_CHILD_EYES_TEX_WIDTH 64
+#define LINK_CHILD_EYES_TEX_HEIGHT 32
+extern u64 gLinkChildEyesOpenTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkChildEyesHalfTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkChildEyesClosedfTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkChildEyesLeftTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkChildEyesRightTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkChildEyesWideTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkChildEyesDownTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)];
+extern u64 gLinkChildEyesWincingTex[TEX_LEN(u64, LINK_CHILD_EYES_TEX_WIDTH, LINK_CHILD_EYES_TEX_HEIGHT, 8)];
+
+#define LINK_CHILD_MOUTH_TEX_WIDTH 32
+#define LINK_CHILD_MOUTH_TEX_HEIGHT 32
+extern u64 gLinkChildMouthClosedTex[TEX_LEN(u64, LINK_CHILD_MOUTH_TEX_WIDTH, LINK_CHILD_MOUTH_TEX_HEIGHT, 8)];
+extern u64 gLinkChildMouthHalfTex[TEX_LEN(u64, LINK_CHILD_MOUTH_TEX_WIDTH, LINK_CHILD_MOUTH_TEX_HEIGHT, 8)];
+extern u64 gLinkChildMouthOpenTex[TEX_LEN(u64, LINK_CHILD_MOUTH_TEX_WIDTH, LINK_CHILD_MOUTH_TEX_HEIGHT, 8)];
+extern u64 gLinkChildMouthSmileTex[TEX_LEN(u64, LINK_CHILD_MOUTH_TEX_WIDTH, LINK_CHILD_MOUTH_TEX_HEIGHT, 8)];
+
+extern Gfx gLinkChildLinkDekuStickDL[41];
+
+extern Gfx gLinkChildLeftHandNearDL[45];
+extern Gfx gLinkChildLeftFistNearDL[36];
+extern Gfx gLinkChildLeftFistAndKokiriSwordNearDL[81];
+extern Gfx gLinkChildRightHandNearDL[44];
+extern Gfx gLinkChildRightHandClosedNearDL[36];
+extern Gfx gLinkChildRightFistAndDekuShieldNearDL[68];
+extern Gfx gLinkChildLeftFistAndBoomerangNearDL[73];
+extern Gfx gLinkChildHylianShieldSwordAndSheathNearDL[83];
+extern Gfx gLinkChildHylianShieldAndSheathNearDL[69];
+extern Gfx gLinkChildDekuShieldSwordAndSheathNearDL[85];
+extern Gfx gLinkChildDekuShieldAndSheathNearDL[71];
+extern Gfx gLinkChildSwordAndSheathNearDL[56];
+extern Gfx gLinkChildSheathNearDL[39];
+extern Gfx gLinkChildLeftHandHoldingMasterSwordDL[131];
+extern Gfx gLinkChildRightHandAndOotNearDL[74];
+extern Gfx gLinkChildRightHandHoldingFairyOcarinaNearDL[73];
+extern Gfx gLinkChildRightHandHoldingSlingshotNearDL[60];
+extern Gfx gLinkChildLeftHandUpNearDL[41];
+extern Gfx gLinkChildGoronBraceletDL[45];
+extern Gfx gLinkChildLeftHandFarDL[40];
+extern Gfx gLinkChildLeftFistFarDL[36];
+extern Gfx gLinkChildRightHandFarDL[40];
+extern Gfx gLinkChildRightHandClosedFarDL[36];
+extern Gfx gLinkChildRightFistAndDekuShieldFarDL[57];
+extern Gfx gLinkChildLeftFistAndBoomerangFarDL[50];
+extern Gfx gLinkChildHylianShieldSwordAndSheathFarDL[76];
+extern Gfx gLinkChildHylianShieldAndSheathFarDL[62];
+extern Gfx gLinkChildDekuShieldSwordAndSheathFarDL[77];
+extern Gfx gLinkChildDekuShieldAndSheathFarDL[66];
+extern Gfx gLinkChildSwordAndSheathFarDL[52];
+extern Gfx gLinkChildSheathFarDL[38];
+extern Gfx gLinkChildLeftFistAndKokiriSwordFarDL[78];
+extern Gfx gLinkChildRightHandHoldingOOTFarDL[74];
+extern Gfx gLinkChildRightHandHoldingFairyOcarinaFarDL[73];
+extern Gfx gLinkChildRightHandHoldingSlingshotFarDL[57];
+extern Gfx gLinkChildRightArmStretchedSlingshotDL[134];
+extern Gfx gLinkChildBottleDL[33];
+
+extern Gfx gLinkChildWaistFarDL[70];
+
+extern Gfx gLinkChildWaistNearDL[73];
+extern Gfx gLinkChildRightShoulderNearDL[58];
+
+extern Gfx gLinkChildSlingshotStringDL[12];
+
+extern Gfx gLinkChildDekuShieldDL[42];
+extern Gfx gLinkChildDekuShieldWithMatrixDL[3];
+
+extern Gfx gLinkChildSkullMaskDL[70];
+extern Gfx gLinkChildSpookyMaskDL[30];
+extern Gfx gLinkChildKeatonMaskDL[50];
+extern Gfx gLinkChildMaskOfTruthDL[44];
+extern Gfx gLinkChildGoronMaskDL[70];
+extern Gfx gLinkChildZoraMaskDL[65];
+extern Gfx gLinkChildGerudoMaskDL[84];
+extern Gfx gLinkChildBunnyHoodDL[114];
+
+extern FlexSkeletonHeader gLinkChildSkel;
+
+#endif
diff --git a/assets/text/charmap.chn.txt b/assets/text/charmap.chn.txt
new file mode 100644
index 0000000000..08d4d451df
--- /dev/null
+++ b/assets/text/charmap.chn.txt
@@ -0,0 +1,1823 @@
+# Determines how certain text sequences should be encoded for the CHN text encoding.
+{
+ '\n' : 0x01,
+
+ '[A]' : 0xAA9F,
+ '[B]' : 0xAAA0,
+ '[C]' : 0xAAA1,
+ '[L]' : 0xAAA2,
+ '[R]' : 0xAAA3,
+ '[Z]' : 0xAAA4,
+ '[C-Up]' : 0xAAA5,
+ '[C-Down]' : 0xAAA6,
+ '[C-Left]' : 0xAAA7,
+ '[C-Right]' : 0xAAA8,
+ '▼' : 0xAAA9,
+ '[Control-Pad]' : 0xAAAA,
+
+ 'À' : 0x80,
+ 'î' : 0x81,
+ 'Â' : 0x82,
+ 'Ä' : 0x83,
+ 'Ç' : 0x84,
+ 'È' : 0x85,
+ 'É' : 0x86,
+ 'Ê' : 0x87,
+ 'Ë' : 0x88,
+ 'Ï' : 0x89,
+ 'Ô' : 0x8A,
+ 'Ö' : 0x8B,
+ 'Ù' : 0x8C,
+ 'Û' : 0x8D,
+ 'Ü' : 0x8E,
+ 'ß' : 0x8F,
+ 'à' : 0x90,
+ 'á' : 0x91,
+ 'â' : 0x92,
+ 'ä' : 0x93,
+ 'ç' : 0x94,
+ 'è' : 0x95,
+ 'é' : 0x96,
+ 'ê' : 0x97,
+ 'ë' : 0x98,
+ 'ï' : 0x99,
+ 'ô' : 0x9A,
+ 'ö' : 0x9B,
+ 'ù' : 0x9C,
+ 'û' : 0x9D,
+ 'ü' : 0x9E,
+
+ # Unfortunately the CN codepoint map does not correspond to any standard encoding,
+ # characters were added in the order they were needed in the text. The order is
+ # reproduced here.
+ '你' : 0xA08C,
+ '借' : 0xA08D,
+ '到' : 0xA08E,
+ '了' : 0xA08F,
+ '一' : 0xA090,
+ '颗' : 0xA091,
+ '口' : 0xA092,
+ '袋' : 0xA093,
+ '鸡' : 0xA094,
+ '蛋' : 0xA095,
+ '过' : 0xA096,
+ '夜' : 0xA097,
+ '后' : 0xA098,
+ '就' : 0xA099,
+ '会' : 0xA09A,
+ '孵' : 0xA09B,
+ '出' : 0xA09C,
+ '只' : 0xA09D,
+ ',' : 0xA09E,
+ '用' : 0xA09F,
+ '完' : 0xA0A0,
+ '别' : 0xA0A1,
+ '忘' : 0xA0A2,
+ '记' : 0xA0A3,
+ '把' : 0xA0A4,
+ '它' : 0xA0A5,
+ '还' : 0xA0A6,
+ '回' : 0xA0A7,
+ '去' : 0xA0A8,
+ '。' : 0xA0A9,
+ '归' : 0xA0AA,
+ '得' : 0xA0AB,
+ '克' : 0xA0AC,
+ '洛' : 0xA0AD,
+ '!' : 0xA0AE,
+ '与' : 0xA0AF,
+ '不' : 0xA0B0,
+ '同' : 0xA0B1,
+ '很' : 0xA0B2,
+ '少' : 0xA0B3,
+ '啼' : 0xA0B4,
+ '叫' : 0xA0B5,
+ '个' : 0xA0B6,
+ '奇' : 0xA0B7,
+ '异' : 0xA0B8,
+ '蘑' : 0xA0B9,
+ '菇' : 0xA0BA,
+ '新' : 0xA0BB,
+ '鲜' : 0xA0BC,
+ '的' : 0xA0BD,
+ '都' : 0xA0BE,
+ '容' : 0xA0BF,
+ '易' : 0xA0C0,
+ '变' : 0xA0C1,
+ '质' : 0xA0C2,
+ '快' : 0xA0C3,
+ '拿' : 0xA0C4,
+ '卡' : 0xA0C5,
+ '利' : 0xA0C6,
+ '科' : 0xA0C7,
+ '药' : 0xA0C8,
+ '店' : 0xA0C9,
+ '吧' : 0xA0CA,
+ '之' : 0xA0CB,
+ '知' : 0xA0CC,
+ '道' : 0xA0CD,
+ '这' : 0xA0CE,
+ '两' : 0xA0CF,
+ '人' : 0xA0D0,
+ '间' : 0xA0D1,
+ '发' : 0xA0D2,
+ '生' : 0xA0D3,
+ '什' : 0xA0D4,
+ '么' : 0xA0D5,
+ '事' : 0xA0D6,
+ '但' : 0xA0D7,
+ '带' : 0xA0D8,
+ '迷' : 0xA0D9,
+ '失' : 0xA0DA,
+ '森' : 0xA0DB,
+ '林' : 0xA0DC,
+ '物' : 0xA0DD,
+ '原' : 0xA0DE,
+ '主' : 0xA0DF,
+ '偷' : 0xA0E0,
+ '猎' : 0xA0E1,
+ '者' : 0xA0E2,
+ '锯' : 0xA0E3,
+ '定' : 0xA0E4,
+ '是' : 0xA0E5,
+ '那' : 0xA0E6,
+ '年' : 0xA0E7,
+ '轻' : 0xA0E8,
+ '留' : 0xA0E9,
+ '下' : 0xA0EA,
+ '炸' : 0xA0EB,
+ '弹' : 0xA0EC,
+ '枚' : 0xA0ED,
+ '卢' : 0xA0EE,
+ '比' : 0xA0EF,
+ '买' : 0xA0F0,
+ '德' : 0xA0F1,
+ '库' : 0xA0F2,
+ '子' : 0xA0F3,
+ '可' : 0xA0F4,
+ '以' : 0xA0F5,
+ '装' : 0xA0F6,
+ '弓' : 0xA0F7,
+ '换' : 0xA0F8,
+ '破' : 0xA0F9,
+ '损' : 0xA0FA,
+ '格' : 0xA0FB,
+ '雷' : 0xA0FC,
+ '剑' : 0xA0FD,
+ '大' : 0xA0FE,
+ '城' : 0xA0FF,
+ '修' : 0xA100,
+ '好' : 0xA101,
+ '交' : 0xA102,
+ '处' : 0xA103,
+ '方' : 0xA104,
+ '见' : 0xA105,
+ '卓' : 0xA106,
+ '拉' : 0xA107,
+ '王' : 0xA108,
+ '⋯' : 0xA109, # TODO this isn't quite the same width as everything else..
+ '兑' : 0xA10A,
+ '券' : 0xA10B,
+ '急' : 0xA10C,
+ '切' : 0xA10D,
+ '地' : 0xA10E,
+ '希' : 0xA10F,
+ '望' : 0xA110,
+ '点' : 0xA111,
+ '铸' : 0xA112,
+ '卖' : 0xA113,
+ '掉' : 0xA114,
+ '巨' : 0xA115,
+ '刀' : 0xA116,
+ '铁' : 0xA117,
+ '匠' : 0xA118,
+ '师' : 0xA119,
+ '所' : 0xA11A,
+ '造' : 0xA11B,
+ '坚' : 0xA11C,
+ '摧' : 0xA11D,
+ '卷' : 0xA11E,
+ '眼' : 0xA11F,
+ '青' : 0xA120,
+ '蛙' : 0xA121,
+ '趁' : 0xA122,
+ '凉' : 0xA123,
+ '海' : 0xA124,
+ '鲁' : 0xA125,
+ '湖' : 0xA126,
+ '世' : 0xA127,
+ '上' : 0xA128,
+ '最' : 0xA129,
+ '水' : 0xA12A,
+ '在' : 0xA12B,
+ '前' : 0xA12C,
+ '送' : 0xA12D,
+ '蠃' : 0xA12E,
+ '啦' : 0xA12F,
+ '骷' : 0xA130,
+ '髅' : 0xA131,
+ '面' : 0xA132,
+ '具' : 0xA133,
+ '按' : 0xA134,
+ '戴' : 0xA135,
+ '试' : 0xA136,
+ '看' : 0xA137,
+ '着' : 0xA138,
+ '真' : 0xA139,
+ '像' : 0xA13A,
+ '怪' : 0xA13B,
+ '恐' : 0xA13C,
+ '怖' : 0xA13D,
+ '吓' : 0xA13E,
+ '基' : 0xA13F,
+ '顿' : 0xA140,
+ '受' : 0xA141,
+ '欢' : 0xA142,
+ '迎' : 0xA143,
+ '哦' : 0xA144,
+ '兔' : 0xA145,
+ '兜' : 0xA146,
+ '帽' : 0xA147,
+ '长' : 0xA148,
+ '耳' : 0xA149,
+ '朵' : 0xA14A,
+ '太' : 0xA14B,
+ '爱' : 0xA14C,
+ '让' : 0xA14D,
+ '头' : 0xA14E,
+ '起' : 0xA14F,
+ '来' : 0xA150,
+ '有' : 0xA151,
+ '女' : 0xA152,
+ '孩' : 0xA153,
+ '?' : 0xA154,
+ '理' : 0xA155,
+ '更' : 0xA156,
+ '多' : 0xA157,
+ '我' : 0xA158,
+ '们' : 0xA159,
+ '娱' : 0xA15A,
+ '乐' : 0xA15B,
+ '中' : 0xA15C,
+ '心' : 0xA15D,
+ ':' : 0xA15E,
+ '保' : 0xA15F,
+ '龄' : 0xA160,
+ '球' : 0xA161,
+ '场' : 0xA162,
+ '想' : 0xA163,
+ '奖' : 0xA164,
+ '品' : 0xA165,
+ '吗' : 0xA166,
+ '秘' : 0xA167,
+ '密' : 0xA168,
+ '付' : 0xA169,
+ '钱' : 0xA16A,
+ '才' : 0xA16B,
+ '告' : 0xA16C,
+ '诉' : 0xA16D,
+ '玩' : 0xA16E,
+ '次' : 0xA16F,
+ '要' : 0xA170,
+ '瞄' : 0xA171,
+ '准' : 0xA172,
+ '洞' : 0xA173,
+ '放' : 0xA174,
+ '鼠' : 0xA175,
+ '十' : 0xA176,
+ '机' : 0xA177,
+ '预' : 0xA178,
+ '备' : 0xA179,
+ '开' : 0xA17A,
+ '始' : 0xA17B,
+ '再' : 0xA17C,
+ '差' : 0xA17D,
+ '(' : 0xA17E,
+ ')' : 0xA17F,
+ '捡' : 0xA180,
+ '扔' : 0xA181,
+ '没' : 0xA182,
+ '能' : 0xA183,
+ '恢' : 0xA184,
+ '复' : 0xA185,
+ '正' : 0xA186,
+ '常' : 0xA187,
+ '请' : 0xA188,
+ '救' : 0xA189,
+ '其' : 0xA18A,
+ '他' : 0xA18B,
+ '兄' : 0xA18C,
+ '弟' : 0xA18D,
+ '给' : 0xA18E,
+ '励' : 0xA18F,
+ '诅' : 0xA190,
+ '咒' : 0xA191,
+ '解' : 0xA192,
+ '除' : 0xA193,
+ '谢' : 0xA194,
+ '报' : 0xA195,
+ '呀' : 0xA196,
+ '啊' : 0xA197,
+ '被' : 0xA198,
+ '小' : 0xA199,
+ '消' : 0xA19A,
+ '灭' : 0xA19B,
+ '蜘' : 0xA19C,
+ '蛛' : 0xA19D,
+ '已' : 0xA19E,
+ '经' : 0xA19F,
+ '减' : 0xA1A0,
+ '弱' : 0xA1A1,
+ '富' : 0xA1A2,
+ '办' : 0xA1A3,
+ '法' : 0xA1A4,
+ '越' : 0xA1A5,
+ '些' : 0xA1A6,
+ '验' : 0xA1A7,
+ '帮' : 0xA1A8,
+ '助' : 0xA1A9,
+ '寻' : 0xA1AA,
+ '找' : 0xA1AB,
+ '首' : 0xA1AC,
+ '先' : 0xA1AD,
+ '晚' : 0xA1AE,
+ '行' : 0xA1AF,
+ '动' : 0xA1B0,
+ '第' : 0xA1B1,
+ '二' : 0xA1B2,
+ '住' : 0xA1B3,
+ '喜' : 0xA1B4,
+ '松' : 0xA1B5,
+ '柔' : 0xA1B6,
+ '土' : 0xA1B7,
+ '壤' : 0xA1B8,
+ '仔' : 0xA1B9,
+ '细' : 0xA1BA,
+ '观' : 0xA1BB,
+ '察' : 0xA1BC,
+ '周' : 0xA1BD,
+ '围' : 0xA1BE,
+ '全' : 0xA1BF,
+ '靠' : 0xA1C0,
+ '成' : 0xA1C1,
+ '样' : 0xA1C2,
+ '因' : 0xA1C3,
+ '为' : 0xA1C4,
+ '种' : 0xA1C5,
+ '界' : 0xA1C6,
+ '每' : 0xA1C7,
+ '现' : 0xA1C8,
+ '徽' : 0xA1C9,
+ '章' : 0xA1CA,
+ '收' : 0xA1CB,
+ '集' : 0xA1CC,
+ '作' : 0xA1CD,
+ '战' : 0xA1CE,
+ '绩' : 0xA1CF,
+ '证' : 0xA1D0,
+ '明' : 0xA1D1,
+ '征' : 0xA1D2,
+ '途' : 0xA1D3,
+ '状' : 0xA1D4,
+ '态' : 0xA1D5,
+ '窗' : 0xA1D6,
+ '此' : 0xA1D7,
+ '图' : 0xA1D8,
+ '标' : 0xA1D9,
+ '旁' : 0xA1DA,
+ '边' : 0xA1DB,
+ '数' : 0xA1DC,
+ '字' : 0xA1DD,
+ '显' : 0xA1DE,
+ '示' : 0xA1DF,
+ '目' : 0xA1E0,
+ '量' : 0xA1E1,
+ '如' : 0xA1E2,
+ '果' : 0xA1E3,
+ '区' : 0xA1E4,
+ '名' : 0xA1E5,
+ '说' : 0xA1E6,
+ '里' : 0xA1E7,
+ '家' : 0xA1E8,
+ '族' : 0xA1E9,
+ '身' : 0xA1EA,
+ '感' : 0xA1EB,
+ '止' : 0xA1EC,
+ '错' : 0xA1ED,
+ '担' : 0xA1EE,
+ '需' : 0xA1EF,
+ '箭' : 0xA1F0,
+ '关' : 0xA1F1,
+ '系' : 0xA1F2,
+ '强' : 0xA1F3,
+ '迫' : 0xA1F4,
+ '游' : 0xA1F5,
+ '戏' : 0xA1F6,
+ '著' : 0xA1F7,
+ '射' : 0xA1F8,
+ '击' : 0xA1F9,
+ '从' : 0xA1FA,
+ '台' : 0xA1FB,
+ '够' : 0xA1FC,
+ '五' : 0xA1FD,
+ '支' : 0xA1FE,
+ '武' : 0xA1FF,
+ '器' : 0xA200,
+ '争' : 0xA201,
+ '取' : 0xA202,
+ '祝' : 0xA203,
+ '运' : 0xA204,
+ '堆' : 0xA205,
+ '软' : 0xA206,
+ '泥' : 0xA207,
+ '精' : 0xA208,
+ '灵' : 0xA209,
+ '选' : 0xA20A,
+ '择' : 0xA20B,
+ '或' : 0xA20C,
+ '键' : 0xA20D,
+ '并' : 0xA20E,
+ '立' : 0xA20F,
+ '即' : 0xA210,
+ '时' : 0xA211,
+ '举' : 0xA212,
+ '置' : 0xA213,
+ '跑' : 0xA214,
+ '投' : 0xA215,
+ '掷' : 0xA216,
+ '疑' : 0xA217,
+ '型' : 0xA218,
+ '甚' : 0xA219,
+ '至' : 0xA21A,
+ '飞' : 0xA21B,
+ '檐' : 0xA21C,
+ '走' : 0xA21D,
+ '壁' : 0xA21E,
+ '闪' : 0xA21F,
+ '光' : 0xA220,
+ '使' : 0xA221,
+ '敌' : 0xA222,
+ '眩' : 0xA223,
+ '晕' : 0xA224,
+ '旋' : 0xA225,
+ '镖' : 0xA226,
+ '攻' : 0xA227,
+ '远' : 0xA228,
+ '短' : 0xA229,
+ '钩' : 0xA22A,
+ '条' : 0xA22B,
+ '力' : 0xA22C,
+ '链' : 0xA22D,
+ '勾' : 0xA22E,
+ '体' : 0xA22F,
+ '获' : 0xA230,
+ '自' : 0xA231,
+ '己' : 0xA232,
+ '根' : 0xA233,
+ '木' : 0xA234,
+ '棒' : 0xA235,
+ '挥' : 0xA236,
+ '舞' : 0xA237,
+ '站' : 0xA238,
+ '携' : 0xA239,
+ '浪' : 0xA23A,
+ '费' : 0xA23B,
+ '锤' : 0xA23C,
+ '砸' : 0xA23D,
+ '碎' : 0xA23E,
+ '废' : 0xA23F,
+ '沉' : 0xA240,
+ '双' : 0xA241,
+ '手' : 0xA242,
+ '镜' : 0xA243,
+ '神' : 0xA244,
+ '井' : 0xA245,
+ '外' : 0xA246,
+ '也' : 0xA247,
+ '耗' : 0xA248,
+ '魔' : 0xA249,
+ '停' : 0xA24A,
+ '笛' : 0xA24B,
+ '塞' : 0xA24C,
+ '尔' : 0xA24D,
+ '达' : 0xA24E,
+ '宝' : 0xA24F,
+ '散' : 0xA250,
+ '芒' : 0xA251,
+ '施' : 0xA252,
+ '展' : 0xA253,
+ '花' : 0xA254,
+ '风' : 0xA255,
+ '返' : 0xA256,
+ '避' : 0xA257,
+ '退' : 0xA258,
+ '火' : 0xA259,
+ '勋' : 0xA25A,
+ '圣' : 0xA25B,
+ '尼' : 0xA25C,
+ '亚' : 0xA25D,
+ '觉' : 0xA25E,
+ '醒' : 0xA25F,
+ '将' : 0xA260,
+ '赐' : 0xA261,
+ '予' : 0xA262,
+ '茹' : 0xA263,
+ '特' : 0xA264,
+ '她' : 0xA265,
+ '萨' : 0xA266,
+ '莉' : 0xA267,
+ '娅' : 0xA268,
+ '魂' : 0xA269,
+ '纳' : 0xA26A,
+ '波' : 0xA26B,
+ '若' : 0xA26C,
+ '暗' : 0xA26D,
+ '英' : 0xA26E,
+ '帕' : 0xA26F,
+ '空' : 0xA270,
+ '瓶' : 0xA271,
+ '红' : 0xA272,
+ '色' : 0xA273,
+ '命' : 0xA274,
+ '份' : 0xA275,
+ '绿' : 0xA276,
+ '蓝' : 0xA277,
+ '和' : 0xA278,
+ '抓' : 0xA279,
+ '伙' : 0xA27A,
+ '伴' : 0xA27B,
+ '活' : 0xA27C,
+ '随' : 0xA27D,
+ '呼' : 0xA27E,
+ '唤' : 0xA27F,
+ '鱼' : 0xA280,
+ '非' : 0xA281,
+ '美' : 0xA282,
+ '豆' : 0xA283,
+ '园' : 0xA284,
+ '合' : 0xA285,
+ '适' : 0xA286,
+ '趣' : 0xA287,
+ '对' : 0xA288,
+ '纪' : 0xA289,
+ '念' : 0xA28A,
+ '演' : 0xA28B,
+ '奏' : 0xA28C,
+ '各' : 0xA28D,
+ '律' : 0xA28E,
+ '重' : 0xA28F,
+ '握' : 0xA290,
+ '盾' : 0xA291,
+ '蹲' : 0xA292,
+ '防' : 0xA293,
+ '御' : 0xA294,
+ '移' : 0xA295,
+ '表' : 0xA296,
+ '滑' : 0xA297,
+ '反' : 0xA298,
+ '升' : 0xA299,
+ '级' : 0xA29A,
+ '延' : 0xA29B,
+ '伸' : 0xA29C,
+ '距' : 0xA29D,
+ '离' : 0xA29E,
+ '倍' : 0xA29F,
+ '套' : 0xA2A0,
+ '件' : 0xA2A1,
+ '隔' : 0xA2A2,
+ '热' : 0xA2A3,
+ '穿' : 0xA2A4,
+ '潜' : 0xA2A5,
+ '服' : 0xA2A6,
+ '淹' : 0xA2A7,
+ '死' : 0xA2A8,
+ '坛' : 0xA2A9,
+ '充' : 0xA2AA,
+ '满' : 0xA2AB,
+ '靴' : 0xA2AC,
+ '浮' : 0xA2AD,
+ '悬' : 0xA2AE,
+ '缺' : 0xA2AF,
+ '摩' : 0xA2B0,
+ '擦' : 0xA2B1,
+ '段' : 0xA2B2,
+ '勇' : 0xA2B3,
+ '敢' : 0xA2B4,
+ '相' : 0xA2B5,
+ '信' : 0xA2B6,
+ '超' : 0xA2B7,
+ '东' : 0xA2B8,
+ '哥' : 0xA2B9,
+ '猛' : 0xA2BA,
+ '龙' : 0xA2BB,
+ '胃' : 0xA2BC,
+ '做' : 0xA2BD,
+ '幸' : 0xA2BE,
+ '银' : 0xA2BF,
+ '臂' : 0xA2C0,
+ '答' : 0xA2C1,
+ '应' : 0xA2C2,
+ '遵' : 0xA2C3,
+ '守' : 0xA2C4,
+ '诺' : 0xA2C5,
+ '言' : 0xA2C6,
+ '金' : 0xA2C7,
+ '焰' : 0xA2C8,
+ '入' : 0xA2C9,
+ '冷' : 0xA2CA,
+ '艳' : 0xA2CB,
+ '包' : 0xA2CC,
+ '钥' : 0xA2CD,
+ '匙' : 0xA2CE,
+ '打' : 0xA2CF,
+ '锁' : 0xA2D0,
+ '门' : 0xA2D1,
+ '限' : 0xA2D2,
+ '于' : 0xA2D3,
+ '宫' : 0xA2D4,
+ '内' : 0xA2D5,
+ '老' : 0xA2D6,
+ '却' : 0xA2D7,
+ '驱' : 0xA2D8,
+ '喝' : 0xA2D9,
+ '进' : 0xA2DA,
+ '然' : 0xA2DB,
+ '域' : 0xA2DC,
+ '烁' : 0xA2DD,
+ '当' : 0xA2DE,
+ '位' : 0xA2DF,
+ '拨' : 0xA2E0,
+ '查' : 0xA2E1,
+ '某' : 0xA2E2,
+ '层' : 0xA2E3,
+ '罗' : 0xA2E4,
+ '盘' : 0xA2E5,
+ '隐' : 0xA2E6,
+ '藏' : 0xA2E7,
+ '振' : 0xA2E8,
+ '石' : 0xA2E9,
+ '继' : 0xA2EA,
+ '续' : 0xA2EB,
+ '努' : 0xA2EC,
+ '哇' : 0xA2ED,
+ '公' : 0xA2EE,
+ '签' : 0xA2EF,
+ '临' : 0xA2F0,
+ '西' : 0xA2F1,
+ '便' : 0xA2F2,
+ '箱' : 0xA2F3,
+ '意' : 0xA2F4,
+ '惊' : 0xA2F5,
+ '话' : 0xA2F6,
+ '左' : 0xA2F7,
+ '右' : 0xA2F8,
+ '赌' : 0xA2F9,
+ '徒' : 0xA2FA,
+ '值' : 0xA2FB,
+ '威' : 0xA2FC,
+ '增' : 0xA2FD,
+ '冰' : 0xA2FE,
+ '结' : 0xA2FF,
+ '授' : 0xA300,
+ '艰' : 0xA301,
+ '苦' : 0xA302,
+ '训' : 0xA303,
+ '练' : 0xA304,
+ '该' : 0xA305,
+ '拥' : 0xA306,
+ '而' : 0xA307,
+ '荣' : 0xA308,
+ '义' : 0xA309,
+ '邪' : 0xA30A,
+ '恶' : 0xA30B,
+ '学' : 0xA30C,
+ '步' : 0xA30D,
+ '曲' : 0xA30E,
+ '烈' : 0xA30F,
+ '安' : 0xA310,
+ '影' : 0xA311,
+ '梦' : 0xA312,
+ '幻' : 0xA313,
+ '镯' : 0xA314,
+ '拔' : 0xA315,
+ '虫' : 0xA316,
+ '员' : 0xA317,
+ '张' : 0xA318,
+ '据' : 0xA319,
+ '翡' : 0xA31A,
+ '翠' : 0xA31B,
+ '伟' : 0xA31C,
+ '树' : 0xA31D,
+ '托' : 0xA31E,
+ '代' : 0xA31F,
+ '传' : 0xA320,
+ '碧' : 0xA321,
+ '商' : 0xA322,
+ '讲' : 0xA323,
+ '妖' : 0xA324,
+ '婆' : 0xA325,
+ '堡' : 0xA326,
+ '男' : 0xA327,
+ '情' : 0xA328,
+ '隆' : 0xA329,
+ '牛' : 0xA32A,
+ '奶' : 0xA32B,
+ '营' : 0xA32C,
+ '养' : 0xA32D,
+ '排' : 0xA32E,
+ '销' : 0xA32F,
+ '售' : 0xA330,
+ '榜' : 0xA331,
+ '朋' : 0xA332,
+ '友' : 0xA333,
+ '搬' : 0xA334,
+ '日' : 0xA335,
+ '客' : 0xA336,
+ '碰' : 0xA337,
+ '烧' : 0xA338,
+ '毁' : 0xA339,
+ '折' : 0xA33A,
+ '断' : 0xA33B,
+ '斗' : 0xA33C,
+ '习' : 0xA33D,
+ '骑' : 0xA33E,
+ '士' : 0xA33F,
+ '又' : 0xA340,
+ '承' : 0xA341,
+ '制' : 0xA342,
+ '尺' : 0xA343,
+ '码' : 0xA344,
+ '护' : 0xA345,
+ '炙' : 0xA346,
+ '侵' : 0xA347,
+ '害' : 0xA348,
+ '底' : 0xA349,
+ '溺' : 0xA34A,
+ '掌' : 0xA34B,
+ '丁' : 0xA34C,
+ '妮' : 0xA34D,
+ '席' : 0xA34E,
+ '性' : 0xA34F,
+ '危' : 0xA350,
+ '往' : 0xA351,
+ '创' : 0xA352,
+ '建' : 0xA353,
+ '娜' : 0xA354,
+ '产' : 0xA355,
+ '罩' : 0xA356,
+ '刚' : 0xA357,
+ '清' : 0xA358,
+ '舒' : 0xA359,
+ '爽' : 0xA35A,
+ '般' : 0xA35B,
+ '暂' : 0xA35C,
+ '脱' : 0xA35D,
+ '参' : 0xA35E,
+ '加' : 0xA35F,
+ '嗯' : 0xA360,
+ '顾' : 0xA361,
+ '片' : 0xA362,
+ '四' : 0xA363,
+ '整' : 0xA364,
+ '三' : 0xA365,
+ '房' : 0xA366,
+ '干' : 0xA367,
+ '稍' : 0xA368,
+ '候' : 0xA369,
+ '赛' : 0xA36A,
+ '鳞' : 0xA36B,
+ '跳' : 0xA36C,
+ '深' : 0xA36D,
+ '歌' : 0xA36E,
+ '伊' : 0xA36F,
+ '阳' : 0xA370,
+ '摇' : 0xA371,
+ '篮' : 0xA372,
+ '雪' : 0xA373,
+ '壮' : 0xA374,
+ '管' : 0xA375,
+ '术' : 0xA376,
+ '接' : 0xA377,
+ '智' : 0xA378,
+ '慧' : 0xA379,
+ '气' : 0xA37A,
+ '疲' : 0xA37B,
+ '惫' : 0xA37C,
+ '治' : 0xA37D,
+ '疗' : 0xA37E,
+ '伤' : 0xA37F,
+ '且' : 0xA380,
+ '硬' : 0xA381,
+ '技' : 0xA382,
+ '斩' : 0xA383,
+ '积' : 0xA384,
+ '蓄' : 0xA385,
+ '直' : 0xA386,
+ '释' : 0xA387,
+ '转' : 0xA388,
+ '效' : 0xA389,
+ '谈' : 0xA38A,
+ '听' : 0xA38B,
+ '束' : 0xA38C,
+ '刻' : 0xA38D,
+ '注' : 0xA38E,
+ '嗨' : 0xA38F,
+ '皇' : 0xA390,
+ '探' : 0xA391,
+ '儿' : 0xA392,
+ '附' : 0xA393,
+ '近' : 0xA394,
+ '半' : 0xA395,
+ '思' : 0xA396,
+ '仅' : 0xA397,
+ '燃' : 0xA398,
+ '紫' : 0xA399,
+ '价' : 0xA39A,
+ '高' : 0xA39B,
+ '百' : 0xA39C,
+ '索' : 0xA39D,
+ '何' : 0xA39E,
+ '输' : 0xA39F,
+ '虽' : 0xA3A0,
+ '惜' : 0xA3A1,
+ '幽' : 0xA3A2,
+ '妙' : 0xA3A3,
+ '愿' : 0xA3A4,
+ '勉' : 0xA3A5,
+ '网' : 0xA3A6,
+ '墙' : 0xA3A7,
+ '布' : 0xA3A8,
+ '藤' : 0xA3A9,
+ '蔓' : 0xA3AA,
+ '平' : 0xA3AB,
+ '爬' : 0xA3AC,
+ '屏' : 0xA3AD,
+ '幕' : 0xA3AE,
+ '顶' : 0xA3AF,
+ '端' : 0xA3B0,
+ '挂' : 0xA3B1,
+ '旧' : 0xA3B2,
+ '梯' : 0xA3B3,
+ '嘿' : 0xA3B4,
+ '饰' : 0xA3B5,
+ '熄' : 0xA3B6,
+ '久' : 0xA3B7,
+ '通' : 0xA3B8,
+ '狭' : 0xA3B9,
+ '路' : 0xA3BA,
+ '慢' : 0xA3BB,
+ '躲' : 0xA3BC,
+ '调' : 0xA3BD,
+ '视' : 0xA3BE,
+ '角' : 0xA3BF,
+ '弯' : 0xA3C0,
+ '旦' : 0xA3C1,
+ '侧' : 0xA3C2,
+ '落' : 0xA3C3,
+ '块' : 0xA3C4,
+ '推' : 0xA3C5,
+ '向' : 0xA3C6,
+ '兴' : 0xA3C7,
+ '引' : 0xA3C8,
+ '爆' : 0xA3C9,
+ '呢' : 0xA3CA,
+ '山' : 0xA3CB,
+ '坑' : 0xA3CC,
+ '楼' : 0xA3CD,
+ '绝' : 0xA3CE,
+ '总' : 0xA3CF,
+ '巧' : 0xA3D0,
+ '脸' : 0xA3D1,
+ '私' : 0xA3D2,
+ '语' : 0xA3D3,
+ '足' : 0xA3D4,
+ '导' : 0xA3D5,
+ '写' : 0xA3D6,
+ '险' : 0xA3D7,
+ '雕' : 0xA3D8,
+ '流' : 0xA3D9,
+ '粘' : 0xA3DA,
+ '浑' : 0xA3DB,
+ '电' : 0xA3DC,
+ '尾' : 0xA3DD,
+ '巴' : 0xA3DE,
+ '几' : 0xA3DF,
+ '瞧' : 0xA3E0,
+ '旗' : 0xA3E1,
+ '哪' : 0xA3E2,
+ '召' : 0xA3E3,
+ '跟' : 0xA3E4,
+ '拜' : 0xA3E5,
+ '访' : 0xA3E6,
+ '牧' : 0xA3E7,
+ '爸' : 0xA3E8,
+ '拯' : 0xA3E9,
+ '窟' : 0xA3EA,
+ '卜' : 0xA3EB,
+ '肚' : 0xA3EC,
+ '白' : 0xA3ED,
+ '马' : 0xA3EE,
+ '丢' : 0xA3EF,
+ '河' : 0xA3F0,
+ '殿' : 0xA3F1,
+ '村' : 0xA3F2,
+ '云' : 0xA3F3,
+ '吹' : 0xA3F4,
+ '寒' : 0xA3F5,
+ '庄' : 0xA3F6,
+ '谁' : 0xA3F7,
+ '教' : 0xA3F8,
+ '沙' : 0xA3F9,
+ '漠' : 0xA3FA,
+ '盖' : 0xA3FB,
+ '侬' : 0xA3FC,
+ '夫' : 0xA3FD,
+ '等' : 0xA3FE,
+ '介' : 0xA3FF,
+ '联' : 0xA400,
+ '声' : 0xA401,
+ '嘻' : 0xA402,
+ '曾' : 0xA403,
+ '领' : 0xA404,
+ '统' : 0xA405,
+ '疆' : 0xA406,
+ '怕' : 0xA407,
+ '鸟' : 0xA408,
+ '黑' : 0xA409,
+ '睛' : 0xA40A,
+ '暴' : 0xA40B,
+ '雨' : 0xA40C,
+ '息' : 0xA40D,
+ '初' : 0xA40E,
+ '六' : 0xA40F,
+ '聚' : 0xA410,
+ '封' : 0xA411,
+ '印' : 0xA412,
+ '七' : 0xA413,
+ '认' : 0xA414,
+ '识' : 0xA415,
+ '必' : 0xA416,
+ '须' : 0xA417,
+ '未' : 0xA418,
+ '梭' : 0xA419,
+ '另' : 0xA41A,
+ '渡' : 0xA41B,
+ '船' : 0xA41C,
+ '乘' : 0xA41D,
+ '艘' : 0xA41E,
+ '咯' : 0xA41F,
+ '扇' : 0xA420,
+ '许' : 0xA421,
+ '鬼' : 0xA422,
+ '板' : 0xA423,
+ '画' : 0xA424,
+ '廊' : 0xA425,
+ '扭' : 0xA426,
+ '天' : 0xA427,
+ '味' : 0xA428,
+ '冻' : 0xA429,
+ '音' : 0xA42A,
+ '座' : 0xA42B,
+ '锈' : 0xA42C,
+ '漩' : 0xA42D,
+ '涡' : 0xA42E,
+ '吞' : 0xA42F,
+ '嘛' : 0xA430,
+ '牢' : 0xA431,
+ '固' : 0xA432,
+ '殊' : 0xA433,
+ '静' : 0xA434,
+ '墓' : 0xA435,
+ '培' : 0xA436,
+ '睡' : 0xA437,
+ '掘' : 0xA438,
+ '阅' : 0xA439,
+ '读' : 0xA43A,
+ '式' : 0xA43B,
+ '租' : 0xA43C,
+ '货' : 0xA43D,
+ '款' : 0xA43E,
+ '仍' : 0xA43F,
+ ';' : 0xA440,
+ '载' : 0xA441,
+ '贪' : 0xA442,
+ '婪' : 0xA443,
+ '仇' : 0xA444,
+ '恨' : 0xA445,
+ '血' : 0xA446,
+ '腥' : 0xA447,
+ '历' : 0xA448,
+ '史' : 0xA449,
+ '诡' : 0xA44A,
+ '计' : 0xA44B,
+ '谜' : 0xA44C,
+ '题' : 0xA44D,
+ '亡' : 0xA44E,
+ '闭' : 0xA44F,
+ '今' : 0xA450,
+ '业' : 0xA451,
+ '早' : 0xA452,
+ '招' : 0xA453,
+ '聘' : 0xA454,
+ '兼' : 0xA455,
+ '职' : 0xA456,
+ '杂' : 0xA457,
+ '指' : 0xA458,
+ '启' : 0xA459,
+ '遗' : 0xA45A,
+ '极' : 0xA45B,
+ '亮' : 0xA45C,
+ '照' : 0xA45D,
+ '闯' : 0xA45E,
+ '穴' : 0xA45F,
+ '伏' : 0xA460,
+ '阻' : 0xA461,
+ '拦' : 0xA462,
+ '朝' : 0xA463,
+ '囚' : 0xA464,
+ '室' : 0xA465,
+ '贝' : 0xA466,
+ '泊' : 0xA467,
+ '泉' : 0xA468,
+ '黎' : 0xA469,
+ '童' : 0xA46A,
+ '纯' : 0xA46B,
+ '洁' : 0xA46C,
+ '翻' : 0xA46D,
+ '嘴' : 0xA46E,
+ '陷' : 0xA46F,
+ '野' : 0xA470,
+ '研' : 0xA471,
+ '究' : 0xA472,
+ '考' : 0xA473,
+ '坏' : 0xA474,
+ '竟' : 0xA475,
+ '坐' : 0xA476,
+ '玛' : 0xA477,
+ '录' : 0xA478,
+ '钓' : 0xA479,
+ '磅' : 0xA47A,
+ '分' : 0xA47B,
+ '纹' : 0xA47C,
+ '誓' : 0xA47D,
+ '忠' : 0xA47E,
+ '哈' : 0xA47F,
+ '眠' : 0xA480,
+ '瀑' : 0xA481,
+ '国' : 0xA482,
+ '务' : 0xA483,
+ '盯' : 0xA484,
+ '毯' : 0xA485,
+ '踩' : 0xA486,
+ '资' : 0xA487,
+ '瞎' : 0xA488,
+ '难' : 0xA489,
+ '倒' : 0xA48A,
+ '阱' : 0xA48B,
+ '塘' : 0xA48C,
+ '屈' : 0xA48D,
+ '镇' : 0xA48E,
+ '径' : 0xA48F,
+ '窄' : 0xA490,
+ '慌' : 0xA491,
+ '允' : 0xA492,
+ '禁' : 0xA493,
+ '激' : 0xA494,
+ '颁' : 0xA495,
+ '喷' : 0xA496,
+ '扰' : 0xA497,
+ '砍' : 0xA498,
+ '持' : 0xA499,
+ '草' : 0xA49A,
+ '泰' : 0xA49B,
+ '沿' : 0xA49C,
+ '实' : 0xA49D,
+ '峡' : 0xA49E,
+ '谷' : 0xA49F,
+ '册' : 0xA4A0,
+ '追' : 0xA4A1,
+ '赶' : 0xA4A2,
+ '市' : 0xA4A3,
+ '蜃' : 0xA4A4,
+ '崖' : 0xA4A5,
+ '灼' : 0xA4A6,
+ '宣' : 0xA4A7,
+ '疯' : 0xA4A8,
+ '狂' : 0xA4A9,
+ '滚' : 0xA4AA,
+ '伞' : 0xA4AB,
+ '脚' : 0xA4AC,
+ '共' : 0xA4AD,
+ '部' : 0xA4AE,
+ '免' : 0xA4AF,
+ '规' : 0xA4B0,
+ '递' : 0xA4B1,
+ '登' : 0xA4B2,
+ '补' : 0xA4B3,
+ '肉' : 0xA4B4,
+ '歉' : 0xA4B5,
+ '刺' : 0xA4B6,
+ '杀' : 0xA4B7,
+ '节' : 0xA4B8,
+ '横' : 0xA4B9,
+ '纵' : 0xA4BA,
+ '礼' : 0xA4BB,
+ '貌' : 0xA4BC,
+ '米' : 0xA4BD,
+ '无' : 0xA4BE,
+ '孪' : 0xA4BF,
+ '姐' : 0xA4C0,
+ '妹' : 0xA4C1,
+ '改' : 0xA4C2,
+ '池' : 0xA4C3,
+ '胆' : 0xA4C4,
+ '跃' : 0xA4C5,
+ '任' : 0xA4C6,
+ '句' : 0xA4C7,
+ '线' : 0xA4C8,
+ '范' : 0xA4C9,
+ '逃' : 0xA4CA,
+ '期' : 0xA4CB,
+ '待' : 0xA4CC,
+ '丽' : 0xA4CD,
+ '问' : 0xA4CE,
+ '闲' : 0xA4CF,
+ '泳' : 0xA4D0,
+ '连' : 0xA4D1,
+ '北' : 0xA4D2,
+ '棵' : 0xA4D3,
+ '锐' : 0xA4D4,
+ '虑' : 0xA4D5,
+ '挤' : 0xA4D6,
+ '障' : 0xA4D7,
+ '碍' : 0xA4D8,
+ '盔' : 0xA4D9,
+ '甲' : 0xA4DA,
+ '假' : 0xA4DB,
+ '设' : 0xA4DC,
+ '温' : 0xA4DD,
+ '际' : 0xA4DE,
+ '顽' : 0xA4DF,
+ '皮' : 0xA4E0,
+ '姆' : 0xA4E1,
+ '违' : 0xA4E2,
+ '盗' : 0xA4E3,
+ '贼' : 0xA4E4,
+ '蝴' : 0xA4E5,
+ '蝶' : 0xA4E6,
+ '崇' : 0xA4E7,
+ '象' : 0xA4E8,
+ '猫' : 0xA4E9,
+ '鹰' : 0xA4EA,
+ '凯' : 0xA4EB,
+ '普' : 0xA4EC,
+ '・' : 0xA4ED,
+ '博' : 0xA4EE,
+ '古' : 0xA4EF,
+ '化' : 0xA4F0,
+ '笨' : 0xA4F1,
+ '朗' : 0xA4F2,
+ '匹' : 0xA4F3,
+ '雄' : 0xA4F4,
+ '赚' : 0xA4F5,
+ '寄' : 0xA4F6,
+ '卵' : 0xA4F7,
+ '幼' : 0xA4F8,
+ '突' : 0xA4F9,
+ '袭' : 0xA4FA,
+ '腹' : 0xA4FB,
+ '绦' : 0xA4FC,
+ '食' : 0xA4FD,
+ '笔' : 0xA4FE,
+ '竖' : 0xA4FF,
+ '枯' : 0xA500,
+ '矮' : 0xA501,
+ '丛' : 0xA502,
+ '吃' : 0xA503,
+ '震' : 0xA504,
+ '撼' : 0xA505,
+ '吸' : 0xA506,
+ '败' : 0xA507,
+ '蜥' : 0xA508,
+ '蜴' : 0xA509,
+ '蝙' : 0xA50A,
+ '蝠' : 0xA50B,
+ '否' : 0xA50C,
+ '则' : 0xA50D,
+ '阿' : 0xA50E,
+ '莫' : 0xA50F,
+ '斯' : 0xA510,
+ '母' : 0xA511,
+ '绕' : 0xA512,
+ '触' : 0xA513,
+ '傻' : 0xA514,
+ '遭' : 0xA515,
+ '汀' : 0xA516,
+ '幅' : 0xA517,
+ '敬' : 0xA518,
+ '诱' : 0xA519,
+ '泡' : 0xA51A,
+ '挡' : 0xA51B,
+ '沃' : 0xA51C,
+ '衣' : 0xA51D,
+ '炬' : 0xA51E,
+ '黏' : 0xA51F,
+ '背' : 0xA520,
+ '抵' : 0xA521,
+ '权' : 0xA522,
+ '核' : 0xA523,
+ '挑' : 0xA524,
+ '壳' : 0xA525,
+ '肌' : 0xA526,
+ '缩' : 0xA527,
+ '邦' : 0xA528,
+ '苏' : 0xA529,
+ '透' : 0xA52A,
+ '僵' : 0xA52B,
+ '尸' : 0xA52C,
+ '麻' : 0xA52D,
+ '痹' : 0xA52E,
+ '咬' : 0xA52F,
+ '吉' : 0xA530,
+ '乃' : 0xA531,
+ '穷' : 0xA532,
+ '尽' : 0xA533,
+ '裂' : 0xA534,
+ '拢' : 0xA535,
+ '娃' : 0xA536,
+ '傀' : 0xA537,
+ '儡' : 0xA538,
+ '亲' : 0xA539,
+ '巫' : 0xA53A,
+ '低' : 0xA53B,
+ '骨' : 0xA53C,
+ '斧' : 0xA53D,
+ '漏' : 0xA53E,
+ '莱' : 0xA53F,
+ '彼' : 0xA540,
+ '塔' : 0xA541,
+ '扫' : 0xA542,
+ '描' : 0xA543,
+ '烟' : 0xA544,
+ '蛇' : 0xA545,
+ '弗' : 0xA546,
+ '扎' : 0xA547,
+ '挺' : 0xA548,
+ '八' : 0xA549,
+ '爪' : 0xA54A,
+ '迪' : 0xA54B,
+ '困' : 0xA54C,
+ '陆' : 0xA54D,
+ '嗜' : 0xA54E,
+ '仙' : 0xA54F,
+ '狼' : 0xA550,
+ '懈' : 0xA551,
+ '贩' : 0xA552,
+ '麦' : 0xA553,
+ '判' : 0xA554,
+ '乔' : 0xA555,
+ '绽' : 0xA556,
+ '速' : 0xA557,
+ '嗄' : 0xA558,
+ '羞' : 0xA559,
+ '永' : 0xA55A,
+ '稻' : 0xA55B,
+ '终' : 0xA55C,
+ '薇' : 0xA55D,
+ '呵' : 0xA55E,
+ '父' : 0xA55F,
+ '程' : 0xA560,
+ '工' : 0xA561,
+ '存' : 0xA562,
+ '氛' : 0xA563,
+ '笼' : 0xA564,
+ '令' : 0xA565,
+ '敏' : 0xA566,
+ '项' : 0xA567,
+ '欧' : 0xA568,
+ '谅' : 0xA569,
+ '众' : 0xA56A,
+ '悍' : 0xA56B,
+ '怎' : 0xA56C,
+ '亏' : 0xA56D,
+ '掏' : 0xA56E,
+ '毕' : 0xA56F,
+ '缓' : 0xA570,
+ '冲' : 0xA571,
+ '酷' : 0xA572,
+ '俯' : 0xA573,
+ '瞰' : 0xA574,
+ '哼' : 0xA575,
+ '蚀' : 0xA576,
+ '功' : 0xA577,
+ '糟' : 0xA578,
+ '呸' : 0xA579,
+ '黄' : 0xA57A,
+ '类' : 0xA57B,
+ '篇' : 0xA57C,
+ '论' : 0xA57D,
+ '控' : 0xA57E,
+ '括' : 0xA57F,
+ '冒' : 0xA580,
+ '度' : 0xA581,
+ '检' : 0xA582,
+ '单' : 0xA583,
+ '懂' : 0xA584,
+ '屋' : 0xA585,
+ '户' : 0xA586,
+ '致' : 0xA587,
+ '腾' : 0xA588,
+ '模' : 0xA589,
+ '嗒' : 0xA58A,
+ '咔' : 0xA58B,
+ '咋' : 0xA58C,
+ '萎' : 0xA58D,
+ '紧' : 0xA58E,
+ '决' : 0xA58F,
+ '呆' : 0xA590,
+ '闷' : 0xA591,
+ '畏' : 0xA592,
+ '骗' : 0xA593,
+ '苗' : 0xA594,
+ '茁' : 0xA595,
+ '算' : 0xA596,
+ '猜' : 0xA597,
+ '残' : 0xA598,
+ '妇' : 0xA599,
+ '婴' : 0xA59A,
+ '蔽' : 0xA59B,
+ '唯' : 0xA59C,
+ '响' : 0xA59D,
+ '抚' : 0xA59E,
+ '吵' : 0xA59F,
+ '境' : 0xA5A0,
+ '隙' : 0xA5A1,
+ '逝' : 0xA5A2,
+ '忆' : 0xA5A3,
+ '喂' : 0xA5A4,
+ '辈' : 0xA5A5,
+ '肩' : 0xA5A6,
+ '洋' : 0xA5A7,
+ '溢' : 0xA5A8,
+ '确' : 0xA5A9,
+ '迹' : 0xA5AA,
+ '凝' : 0xA5AB,
+ '髓' : 0xA5AC,
+ '混' : 0xA5AD,
+ '沌' : 0xA5AE,
+ '降' : 0xA5AF,
+ '健' : 0xA5B0,
+ '耕' : 0xA5B1,
+ '耘' : 0xA5B2,
+ '星' : 0xA5B3,
+ '倾' : 0xA5B4,
+ '沛' : 0xA5B5,
+ '础' : 0xA5B6,
+ '堂' : 0xA5B7,
+ '万' : 0xA5B8,
+ '宗' : 0xA5B9,
+ '源' : 0xA5BA,
+ '本' : 0xA5BB,
+ '替' : 0xA5BC,
+ '缝' : 0xA5BD,
+ '惩' : 0xA5BE,
+ '罚' : 0xA5BF,
+ '遇' : 0xA5C0,
+ '懒' : 0xA5C1,
+ '惰' : 0xA5C2,
+ '衷' : 0xA5C3,
+ '势' : 0xA5C4,
+ '维' : 0xA5C5,
+ '秩' : 0xA5C6,
+ '序' : 0xA5C7,
+ '抗' : 0xA5C8,
+ '衡' : 0xA5C9,
+ '旅' : 0xA5CA,
+ '顺' : 0xA5CB,
+ '叛' : 0xA5CC,
+ '愤' : 0xA5CD,
+ '辽' : 0xA5CE,
+ '阔' : 0xA5CF,
+ '茂' : 0xA5D0,
+ '称' : 0xA5D1,
+ '讨' : 0xA5D2,
+ '厌' : 0xA5D3,
+ '靶' : 0xA5D4,
+ '饲' : 0xA5D5,
+ '求' : 0xA5D6,
+ '材' : 0xA5D7,
+ '耶' : 0xA5D8,
+ '谊' : 0xA5D9,
+ '噓' : 0xA5DA,
+ '遍' : 0xA5DB,
+ '谱' : 0xA5DC,
+ '议' : 0xA5DD,
+ '吼' : 0xA5DE,
+ '薄' : 0xA5DF,
+ '饶' : 0xA5E0,
+ '稽' : 0xA5E1,
+ '齐' : 0xA5E2,
+ '懦' : 0xA5E3,
+ '抱' : 0xA5E4,
+ '千' : 0xA5E5,
+ '辛' : 0xA5E6,
+ '漂' : 0xA5E7,
+ '环' : 0xA5E8,
+ '配' : 0xA5E9,
+ '帝' : 0xA5EA,
+ '焦' : 0xA5EB,
+ '乎' : 0xA5EC,
+ '欠' : 0xA5ED,
+ '驯' : 0xA5EE,
+ '圈' : 0xA5EF,
+ '局' : 0xA5F0,
+ '咩' : 0xA5F1,
+ '既' : 0xA5F2,
+ '劳' : 0xA5F3,
+ '祭' : 0xA5F4,
+ '伪' : 0xA5F5,
+ '弃' : 0xA5F6,
+ '耐' : 0xA5F7,
+ '岗' : 0xA5F8,
+ '唔' : 0xA5F9,
+ '佳' : 0xA5FA,
+ '搭' : 0xA5FB,
+ '档' : 0xA5FC,
+ '负' : 0xA5FD,
+ '责' : 0xA5FE,
+ '攀' : 0xA5FF,
+ '绍' : 0xA600,
+ '忙' : 0xA601,
+ '提' : 0xA602,
+ '缠' : 0xA603,
+ '唉' : 0xA604,
+ '亳' : 0xA605,
+ '毛' : 0xA606,
+ '笑' : 0xA607,
+ '欣' : 0xA608,
+ '赏' : 0xA609,
+ '怜' : 0xA60A,
+ '瓜' : 0xA60B,
+ '奔' : 0xA60C,
+ '啧' : 0xA60D,
+ '踢' : 0xA60E,
+ '志' : 0xA60F,
+ '宜' : 0xA610,
+ '仿' : 0xA611,
+ '楚' : 0xA612,
+ '挖' : 0xA613,
+ '由' : 0xA614,
+ '捕' : 0xA615,
+ '播' : 0xA616,
+ '谣' : 0xA617,
+ '勤' : 0xA618,
+ '陌' : 0xA619,
+ '杰' : 0xA61A,
+ '骏' : 0xA61B,
+ '鞭' : 0xA61C,
+ '抽' : 0xA61D,
+ '享' : 0xA61E,
+ '栏' : 0xA61F,
+ '逛' : 0xA620,
+ '汊' : 0xA621,
+ '烦' : 0xA622,
+ '匆' : 0xA623,
+ '妈' : 0xA624,
+ '唱' : 0xA625,
+ '墟' : 0xA626,
+ '粗' : 0xA627,
+ '虐' : 0xA628,
+ '乡' : 0xA629,
+ '彻' : 0xA62A,
+ '咕' : 0xA62B,
+ '哝' : 0xA62C,
+ '简' : 0xA62D,
+ '优' : 0xA62E,
+ '惠' : 0xA62F,
+ '民' : 0xA630,
+ '灰' : 0xA631,
+ '聪' : 0xA632,
+ '南' : 0xA633,
+ '澈' : 0xA634,
+ '卫' : 0xA635,
+ '熟' : 0xA636,
+ '悉' : 0xA637,
+ '故' : 0xA638,
+ '乌' : 0xA639,
+ '兆' : 0xA63A,
+ '企' : 0xA63B,
+ '抢' : 0xA63C,
+ '夺' : 0xA63D,
+ '拼' : 0xA63E,
+ '粉' : 0xA63F,
+ '番' : 0xA640,
+ '群' : 0xA641,
+ '秒' : 0xA642,
+ '料' : 0xA643,
+ '肯' : 0xA644,
+ '赋' : 0xA645,
+ '婚' : 0xA646,
+ '诚' : 0xA647,
+ '邀' : 0xA648,
+ '斜' : 0xA649,
+ '诞' : 0xA64A,
+ '及' : 0xA64B,
+ '盛' : 0xA64C,
+ '典' : 0xA64D,
+ '拍' : 0xA64E,
+ '轰' : 0xA64F,
+ '植' : 0xA650,
+ '矿' : 0xA651,
+ '采' : 0xA652,
+ '阴' : 0xA653,
+ '罕' : 0xA654,
+ '昏' : 0xA655,
+ '压' : 0xA656,
+ '悦' : 0xA657,
+ '饿' : 0xA658,
+ '忍' : 0xA659,
+ '咳' : 0xA65A,
+ '弄' : 0xA65B,
+ '舔' : 0xA65C,
+ '醉' : 0xA65D,
+ '怀' : 0xA65E,
+ '尊' : 0xA65F,
+ '严' : 0xA660,
+ '滋' : 0xA661,
+ '农' : 0xA662,
+ '饥' : 0xA663,
+ '沮' : 0xA664,
+ '丧' : 0xA665,
+ '奋' : 0xA666,
+ '省' : 0xA667,
+ '撑' : 0xA668,
+ '脑' : 0xA669,
+ '灯' : 0xA66A,
+ '隧' : 0xA66B,
+ '派' : 0xA66C,
+ '狗' : 0xA66D,
+ '呜' : 0xA66E,
+ '咣' : 0xA66F,
+ '警' : 0xA670,
+ '挪' : 0xA671,
+ '窜' : 0xA672,
+ '峙' : 0xA673,
+ '含' : 0xA674,
+ '痛' : 0xA675,
+ '夸' : 0xA676,
+ '艺' : 0xA677,
+ '撒' : 0xA678,
+ '谎' : 0xA679,
+ '昨' : 0xA67A,
+ '炎' : 0xA67B,
+ '痒' : 0xA67C,
+ '泪' : 0xA67D,
+ '稳' : 0xA67E,
+ '况' : 0xA67F,
+ '磨' : 0xA680,
+ '休' : 0xA681,
+ '柱' : 0xA682,
+ '敲' : 0xA683,
+ '油' : 0xA684,
+ '菜' : 0xA685,
+ '盟' : 0xA686,
+ '骄' : 0xA687,
+ '傲' : 0xA688,
+ '献' : 0xA689,
+ '噢' : 0xA68A,
+ '窒' : 0xA68B,
+ '医' : 0xA68C,
+ '甜' : 0xA68D,
+ '鰓' : 0xA68E,
+ '恼' : 0xA68F,
+ '耽' : 0xA690,
+ '搁' : 0xA691,
+ '孤' : 0xA692,
+ '丈' : 0xA693,
+ '订' : 0xA694,
+ '戒' : 0xA695,
+ '贵' : 0xA696,
+ '财' : 0xA697,
+ '惹' : 0xA698,
+ '腐' : 0xA699,
+ '剂' : 0xA69A,
+ '融' : 0xA69B,
+ '厚' : 0xA69C,
+ '映' : 0xA69D,
+ '妻' : 0xA69E,
+ '狠' : 0xA69F,
+ '泄' : 0xA6A0,
+ '咿' : 0xA6A1,
+ '瞒' : 0xA6A2,
+ '咽' : 0xA6A3,
+ '恭' : 0xA6A4,
+ '涨' : 0xA6A5,
+ '嘎' : 0xA6A6,
+ '悔' : 0xA6A7,
+ '犹' : 0xA6A8,
+ '豫' : 0xA6A9,
+ '呃' : 0xA6AA,
+ '糕' : 0xA6AB,
+ '埃' : 0xA6AC,
+ '荡' : 0xA6AD,
+ '漾' : 0xA6AE,
+ '饵' : 0xA6AF,
+ '晃' : 0xA6B0,
+ '约' : 0xA6B1,
+ '专' : 0xA6B2,
+ '剔' : 0xA6B3,
+ '窍' : 0xA6B4,
+ '.' : 0xA6B5,
+ '乱' : 0xA6B6,
+ '甩' : 0xA6B7,
+ '鳅' : 0xA6B8,
+ '剧' : 0xA6B9,
+ '竿' : 0xA6BA,
+ '杆' : 0xA6BB,
+ '符' : 0xA6BC,
+ '呱' : 0xA6BD,
+ '团' : 0xA6BE,
+ '饱' : 0xA6BF,
+ '犯' : 0xA6C0,
+ '肃' : 0xA6C1,
+ '啵' : 0xA6C2,
+ '吟' : 0xA6C3,
+ '月' : 0xA6C4,
+ '诗' : 0xA6C5,
+ '碑' : 0xA6C6,
+ '奥' : 0xA6C7,
+ '扬' : 0xA6C8,
+ '舍' : 0xA6C9,
+ '副' : 0xA6CA,
+ '袖' : 0xA6CB,
+ '夏' : 0xA6CC,
+ '赖' : 0xA6CD,
+ '仆' : 0xA6CE,
+ '摆' : 0xA6CF,
+ '雇' : 0xA6D0,
+ '疙' : 0xA6D1,
+ '瘩' : 0xA6D2,
+ '居' : 0xA6D3,
+ '簧' : 0xA6D4,
+ '车' : 0xA6D5,
+ '剩' : 0xA6D6,
+ '玻' : 0xA6D7,
+ '璃' : 0xA6D8,
+ '赔' : 0xA6D9,
+ '欺' : 0xA6DA,
+ '育' : 0xA6DB,
+ '珍' : 0xA6DC,
+ '床' : 0xA6DD,
+ '蛮' : 0xA6DE,
+ '啄' : 0xA6DF,
+ '、' : 0xA6E0,
+ '稀' : 0xA6E1,
+ '栋' : 0xA6E2,
+ '柜' : 0xA6E3,
+ '鼻' : 0xA6E4,
+ '厉' : 0xA6E5,
+ '乏' : 0xA6E6,
+ '饭' : 0xA6E7,
+ '胡' : 0xA6E8,
+ '叮' : 0xA6E9,
+ '咚' : 0xA6EA,
+ '兵' : 0xA6EB,
+ '勃' : 0xA6EC,
+ '苛' : 0xA6ED,
+ '薪' : 0xA6EE,
+ '痴' : 0xA6EF,
+ '挣' : 0xA6F0,
+ '馊' : 0xA6F1,
+ '扑' : 0xA6F2,
+ '良' : 0xA6F3,
+ '竭' : 0xA6F4,
+ '慷' : 0xA6F5,
+ '慨' : 0xA6F6,
+ '欲' : 0xA6F7,
+ '愚' : 0xA6F8,
+ '蠢' : 0xA6F9,
+ '嘉' : 0xA6FA,
+ '监' : 0xA6FB,
+ '狱' : 0xA6FC,
+ '喔' : 0xA6FD,
+ '港' : 0xA6FE,
+ '逆' : 0xA6FF,
+ '误' : 0xA700,
+ '独' : 0xA701,
+ '划' : 0xA702,
+ '措' : 0xA703,
+ '颜' : 0xA704,
+ '奴' : 0xA705,
+ '罢' : 0xA706,
+ '洗' : 0xA707,
+ '俊' : 0xA708,
+ '罪' : 0xA709,
+ '偿' : 0xA70A,
+ '牺' : 0xA70B,
+ '牲' : 0xA70C,
+ '劲' : 0xA70D,
+ '岁' : 0xA70E,
+ '恩' : 0xA70F,
+ '账' : 0xA710,
+ '珂' : 0xA711,
+ '艾' : 0xA712,
+ '组' : 0xA713,
+ '织' : 0xA714,
+ '伯' : 0xA715,
+ '社' : 0xA716,
+ '架' : 0xA717,
+ '桥' : 0xA718,
+ '碟' : 0xA719,
+ '卑' : 0xA71A,
+ '鄙' : 0xA71B,
+ '臭' : 0xA71C,
+ '占' : 0xA71D,
+ '讶' : 0xA71E,
+ '兽' : 0xA71F,
+ '刷' : 0xA720,
+ '竞' : 0xA721,
+ '帐' : 0xA722,
+ '篷' : 0xA723,
+ '迟' : 0xA724,
+ '繁' : 0xA725,
+ '倦' : 0xA726,
+ '罐' : 0xA727,
+ '牌' : 0xA728,
+ '晨' : 0xA729,
+ '景' : 0xA72A,
+ '田' : 0xA72B,
+ '孔' : 0xA72C,
+ '钻' : 0xA72D,
+ '浓' : 0xA72E,
+ '盒' : 0xA72F,
+ '溜' : 0xA730,
+ '街' : 0xA731,
+ '概' : 0xA732,
+ '盹' : 0xA733,
+ '敞' : 0xA734,
+ '扉' : 0xA735,
+ '文' : 0xA736,
+ '撞' : 0xA737,
+ '姑' : 0xA738,
+ '娘' : 0xA739,
+ '糊' : 0xA73A,
+ '涂' : 0xA73B,
+ '依' : 0xA73C,
+ '辐' : 0xA73D,
+ '微' : 0xA73E,
+ '汇' : 0xA73F,
+ '缚' : 0xA740,
+ '宰' : 0xA741,
+ '摸' : 0xA742,
+ '侍' : 0xA743,
+ '垒' : 0xA744,
+ '扮' : 0xA745,
+ '惕' : 0xA746,
+ '估' : 0xA747,
+ '执' : 0xA748,
+ '悲' : 0xA749,
+ '拖' : 0xA74A,
+ '累' : 0xA74B,
+ '弥' : 0xA74C,
+ '渴' : 0xA74D,
+ '班' : 0xA74E,
+ '搞' : 0xA74F,
+ '谛' : 0xA750,
+ '哀' : 0xA751,
+ '圆' : 0xA752,
+ '鸣' : 0xA753,
+ '俩' : 0xA754,
+ '善' : 0xA755,
+ '塌' : 0xA756,
+ '埋' : 0xA757,
+ '孙' : 0xA758,
+ '凶' : 0xA759,
+ '聊' : 0xA75A,
+ '寃' : 0xA75B,
+ '怨' : 0xA75C,
+ '购' : 0xA75D,
+ '涌' : 0xA75E,
+ '劈' : 0xA75F,
+ '狐' : 0xA760,
+ '狸' : 0xA761,
+ '票' : 0xA762,
+ '闻' : 0xA763,
+ '哟' : 0xA764,
+ '唬' : 0xA765,
+ '摘' : 0xA766,
+ '愉' : 0xA767,
+ '呦' : 0xA768,
+ '棺' : 0xA769,
+ '溶' : 0xA76A,
+ '褐' : 0xA76B,
+ '肤' : 0xA76C,
+ '颤' : 0xA76D,
+ '逗' : 0xA76E,
+ '娶' : 0xA76F,
+ '逼' : 0xA770,
+ '悠' : 0xA771,
+ '蒙' : 0xA772,
+ '漆' : 0xA773,
+ '彩' : 0xA774,
+ '丰' : 0xA775,
+}
diff --git a/assets/text/charmap.jpn.txt b/assets/text/charmap.jpn.txt
new file mode 100644
index 0000000000..f615e8807f
--- /dev/null
+++ b/assets/text/charmap.jpn.txt
@@ -0,0 +1,20 @@
+# Determines how certain text sequences should be encoded for the JPN text encoding.
+{
+ '\n' : 0x000A,
+
+ '[A]' : 0x839F,
+ '[B]' : 0x83A0,
+ '[C]' : 0x83A1,
+ '[L]' : 0x83A2,
+ '[R]' : 0x83A3,
+ '[Z]' : 0x83A4,
+ '[C-Up]' : 0x83A5,
+ '[C-Down]' : 0x83A6,
+ '[C-Left]' : 0x83A7,
+ '[C-Right]' : 0x83A8,
+ '▼' : 0x83A9,
+ '[Control-Pad]' : 0x83AA,
+
+ # Possibly from a SHIFT-JIS extension, python doesn't have builtin support
+ '┯' : 0x86D3,
+}
diff --git a/assets/text/charmap.nes.txt b/assets/text/charmap.nes.txt
new file mode 100644
index 0000000000..1dd6445712
--- /dev/null
+++ b/assets/text/charmap.nes.txt
@@ -0,0 +1,50 @@
+# Determines how certain text sequences should be encoded for the NES text encoding.
+{
+ '\n' : 0x01,
+
+ '[A]' : 0x9F,
+ '[B]' : 0xA0,
+ '[C]' : 0xA1,
+ '[L]' : 0xA2,
+ '[R]' : 0xA3,
+ '[Z]' : 0xA4,
+ '[C-Up]' : 0xA5,
+ '[C-Down]' : 0xA6,
+ '[C-Left]' : 0xA7,
+ '[C-Right]' : 0xA8,
+ '▼' : 0xA9,
+ '[Control-Pad]' : 0xAA,
+ '[D-Pad]' : 0xAB,
+
+ 'À' : 0x80,
+ 'î' : 0x81,
+ 'Â' : 0x82,
+ 'Ä' : 0x83,
+ 'Ç' : 0x84,
+ 'È' : 0x85,
+ 'É' : 0x86,
+ 'Ê' : 0x87,
+ 'Ë' : 0x88,
+ 'Ï' : 0x89,
+ 'Ô' : 0x8A,
+ 'Ö' : 0x8B,
+ 'Ù' : 0x8C,
+ 'Û' : 0x8D,
+ 'Ü' : 0x8E,
+ 'ß' : 0x8F,
+ 'à' : 0x90,
+ 'á' : 0x91,
+ 'â' : 0x92,
+ 'ä' : 0x93,
+ 'ç' : 0x94,
+ 'è' : 0x95,
+ 'é' : 0x96,
+ 'ê' : 0x97,
+ 'ë' : 0x98,
+ 'ï' : 0x99,
+ 'ô' : 0x9A,
+ 'ö' : 0x9B,
+ 'ù' : 0x9C,
+ 'û' : 0x9D,
+ 'ü' : 0x9E,
+}
diff --git a/assets/text/charmap.txt b/assets/text/charmap.txt
deleted file mode 100644
index a6c94bee28..0000000000
--- a/assets/text/charmap.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-# Determines how certain text sequences should be encoded. The text sequence is
-# converted to either the first or second tuple element based on whether the
-# target encoding is the "wide" encoding. The first element is for the non-wide
-# encoding, used for all languages besides JP, while the second element is for
-# the wide encoding, used for JP.
-{
- '\n' : (0x01, 0x000A),
-
- '[A]' : (0x9F, 0x839F),
- '[B]' : (0xA0, 0x83A0),
- '[C]' : (0xA1, 0x83A1),
- '[L]' : (0xA2, 0x83A2),
- '[R]' : (0xA3, 0x83A3),
- '[Z]' : (0xA4, 0x83A4),
- '[C-Up]' : (0xA5, 0x83A5),
- '[C-Down]' : (0xA6, 0x83A6),
- '[C-Left]' : (0xA7, 0x83A7),
- '[C-Right]' : (0xA8, 0x83A8),
- '▼' : (0xA9, 0x83A9),
- '[Control-Pad]' : (0xAA, 0x83AA),
- '[D-Pad]' : (0xAB, None),
-
- # Possibly from a SHIFT-JIS extension, python doesn't have builtin support
- '┯' : (None, 0x86D3),
-
- '‾' : (0x7F, None),
- 'À' : (0x80, None),
- 'î' : (0x81, None),
- 'Â' : (0x82, None),
- 'Ä' : (0x83, None),
- 'Ç' : (0x84, None),
- 'È' : (0x85, None),
- 'É' : (0x86, None),
- 'Ê' : (0x87, None),
- 'Ë' : (0x88, None),
- 'Ï' : (0x89, None),
- 'Ô' : (0x8A, None),
- 'Ö' : (0x8B, None),
- 'Ù' : (0x8C, None),
- 'Û' : (0x8D, None),
- 'Ü' : (0x8E, None),
- 'ß' : (0x8F, None),
- 'à' : (0x90, None),
- 'á' : (0x91, None),
- 'â' : (0x92, None),
- 'ä' : (0x93, None),
- 'ç' : (0x94, None),
- 'è' : (0x95, None),
- 'é' : (0x96, None),
- 'ê' : (0x97, None),
- 'ë' : (0x98, None),
- 'ï' : (0x99, None),
- 'ô' : (0x9A, None),
- 'ö' : (0x9B, None),
- 'ù' : (0x9C, None),
- 'û' : (0x9D, None),
- 'ü' : (0x9E, None),
-}
diff --git a/assets/textures/icon_item_static/icon_item_static.c b/assets/textures/icon_item_static/icon_item_static.c
new file mode 100644
index 0000000000..2adb277ebd
--- /dev/null
+++ b/assets/textures/icon_item_static/icon_item_static.c
@@ -0,0 +1,781 @@
+#include "icon_item_static.h"
+
+// Item icons textures
+
+u64 gItemIconDekuStickTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconDekuStickTex.rgba32.inc.c"
+};
+
+u64 gItemIconDekuNutTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconDekuNutTex.rgba32.inc.c"
+};
+
+u64 gItemIconBombTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBombTex.rgba32.inc.c"
+};
+
+u64 gItemIconBowTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBowTex.rgba32.inc.c"
+};
+
+u64 gItemIconArrowFireTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconArrowFireTex.rgba32.inc.c"
+};
+
+u64 gItemIconDinsFireTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconDinsFireTex.rgba32.inc.c"
+};
+
+u64 gItemIconSlingshotTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconSlingshotTex.rgba32.inc.c"
+};
+
+u64 gItemIconOcarinaFairyTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconOcarinaFairyTex.rgba32.inc.c"
+};
+
+u64 gItemIconOcarinaOfTimeTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconOcarinaOfTimeTex.rgba32.inc.c"
+};
+
+u64 gItemIconBombchuTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBombchuTex.rgba32.inc.c"
+};
+
+u64 gItemIconHookshotTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconHookshotTex.rgba32.inc.c"
+};
+
+u64 gItemIconLongshotTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconLongshotTex.rgba32.inc.c"
+};
+
+u64 gItemIconArrowIceTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconArrowIceTex.rgba32.inc.c"
+};
+
+u64 gItemIconFaroresWindTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconFaroresWindTex.rgba32.inc.c"
+};
+
+u64 gItemIconBoomerangTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBoomerangTex.rgba32.inc.c"
+};
+
+u64 gItemIconLensOfTruthTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconLensOfTruthTex.rgba32.inc.c"
+};
+
+u64 gItemIconMagicBeanTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconMagicBeanTex.rgba32.inc.c"
+};
+
+u64 gItemIconHammerTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconHammerTex.rgba32.inc.c"
+};
+
+u64 gItemIconArrowLightTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconArrowLightTex.rgba32.inc.c"
+};
+
+u64 gItemIconNayrusLoveTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconNayrusLoveTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottleEmptyTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottleEmptyTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottlePotionRedTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottlePotionRedTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottlePotionGreenTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottlePotionGreenTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottlePotionBlueTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottlePotionBlueTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottleFairyTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottleFairyTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottleFishTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottleFishTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottleMilkFullTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottleMilkFullTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottleRutosLetterTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottleRutosLetterTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottleBlueFireTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottleBlueFireTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottleBugTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottleBugTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottleBigPoeTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottleBigPoeTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottleMilkHalfTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottleMilkHalfTex.rgba32.inc.c"
+};
+
+u64 gItemIconBottlePoeTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBottlePoeTex.rgba32.inc.c"
+};
+
+u64 gItemIconWeirdEggTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconWeirdEggTex.rgba32.inc.c"
+};
+
+u64 gItemIconChickenTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconChickenTex.rgba32.inc.c"
+};
+
+u64 gItemIconZeldasLetterTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconZeldasLetterTex.rgba32.inc.c"
+};
+
+u64 gItemIconMaskKeatonTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconMaskKeatonTex.rgba32.inc.c"
+};
+
+u64 gItemIconMaskSkullTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconMaskSkullTex.rgba32.inc.c"
+};
+
+u64 gItemIconMaskSpookyTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconMaskSpookyTex.rgba32.inc.c"
+};
+
+u64 gItemIconMaskBunnyHoodTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconMaskBunnyHoodTex.rgba32.inc.c"
+};
+
+u64 gItemIconMaskGoronTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconMaskGoronTex.rgba32.inc.c"
+};
+
+u64 gItemIconMaskZoraTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconMaskZoraTex.rgba32.inc.c"
+};
+
+u64 gItemIconMaskGerudoTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconMaskGerudoTex.rgba32.inc.c"
+};
+
+u64 gItemIconMaskTruthTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconMaskTruthTex.rgba32.inc.c"
+};
+
+u64 gItemIconSoldOutTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconSoldOutTex.rgba32.inc.c"
+};
+
+u64 gItemIconPocketEggTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconPocketEggTex.rgba32.inc.c"
+};
+
+u64 gItemIconPocketCuccoTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconPocketCuccoTex.rgba32.inc.c"
+};
+
+u64 gItemIconCojiroTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconCojiroTex.rgba32.inc.c"
+};
+
+u64 gItemIconOddMushroomTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconOddMushroomTex.rgba32.inc.c"
+};
+
+u64 gItemIconOddPotionTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconOddPotionTex.rgba32.inc.c"
+};
+
+u64 gItemIconPoachersSawTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconPoachersSawTex.rgba32.inc.c"
+};
+
+u64 gItemIconBrokenGoronsSwordTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBrokenGoronsSwordTex.rgba32.inc.c"
+};
+
+u64 gItemIconPrescriptionTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconPrescriptionTex.rgba32.inc.c"
+};
+
+u64 gItemIconEyeballFrogTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconEyeballFrogTex.rgba32.inc.c"
+};
+
+u64 gItemIconEyeDropsTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconEyeDropsTex.rgba32.inc.c"
+};
+
+u64 gItemIconClaimCheckTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconClaimCheckTex.rgba32.inc.c"
+};
+
+u64 gItemIconBowFireTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBowFireTex.rgba32.inc.c"
+};
+
+u64 gItemIconBowIceTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBowIceTex.rgba32.inc.c"
+};
+
+u64 gItemIconBowLightTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBowLightTex.rgba32.inc.c"
+};
+
+u64 gItemIconSwordKokiriTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconSwordKokiriTex.rgba32.inc.c"
+};
+
+u64 gItemIconSwordMasterTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconSwordMasterTex.rgba32.inc.c"
+};
+
+u64 gItemIconSwordBiggoronTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconSwordBiggoronTex.rgba32.inc.c"
+};
+
+u64 gItemIconShieldDekuTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconShieldDekuTex.rgba32.inc.c"
+};
+
+u64 gItemIconShieldHylianTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconShieldHylianTex.rgba32.inc.c"
+};
+
+u64 gItemIconShieldMirrorTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconShieldMirrorTex.rgba32.inc.c"
+};
+
+u64 gItemIconTunicKokiriTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconTunicKokiriTex.rgba32.inc.c"
+};
+
+u64 gItemIconTunicGoronTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconTunicGoronTex.rgba32.inc.c"
+};
+
+u64 gItemIconTunicZoraTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconTunicZoraTex.rgba32.inc.c"
+};
+
+u64 gItemIconBootsKokiriTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBootsKokiriTex.rgba32.inc.c"
+};
+
+u64 gItemIconBootsIronTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBootsIronTex.rgba32.inc.c"
+};
+
+u64 gItemIconBootsHoverTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBootsHoverTex.rgba32.inc.c"
+};
+
+u64 gItemIconBulletBag30Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBulletBag30Tex.rgba32.inc.c"
+};
+
+u64 gItemIconBulletBag40Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBulletBag40Tex.rgba32.inc.c"
+};
+
+u64 gItemIconBulletBag50Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBulletBag50Tex.rgba32.inc.c"
+};
+
+u64 gItemIconQuiver30Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconQuiver30Tex.rgba32.inc.c"
+};
+
+u64 gItemIconQuiver40Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconQuiver40Tex.rgba32.inc.c"
+};
+
+u64 gItemIconQuiver50Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconQuiver50Tex.rgba32.inc.c"
+};
+
+u64 gItemIconBombBag20Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBombBag20Tex.rgba32.inc.c"
+};
+
+u64 gItemIconBombBag30Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBombBag30Tex.rgba32.inc.c"
+};
+
+u64 gItemIconBombBag40Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBombBag40Tex.rgba32.inc.c"
+};
+
+u64 gItemIconGoronsBraceletTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconGoronsBraceletTex.rgba32.inc.c"
+};
+
+u64 gItemIconSilverGauntletsTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconSilverGauntletsTex.rgba32.inc.c"
+};
+
+u64 gItemIconGoldenGauntletsTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconGoldenGauntletsTex.rgba32.inc.c"
+};
+
+u64 gItemIconScaleSilverTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconScaleSilverTex.rgba32.inc.c"
+};
+
+u64 gItemIconScaleGoldenTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconScaleGoldenTex.rgba32.inc.c"
+};
+
+u64 gItemIconBrokenGiantsKnifeTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconBrokenGiantsKnifeTex.rgba32.inc.c"
+};
+
+u64 gItemIconAdultsWalletTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconAdultsWalletTex.rgba32.inc.c"
+};
+
+u64 gItemIconGiantsWalletTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconGiantsWalletTex.rgba32.inc.c"
+};
+
+u64 gItemIconDekuSeedsTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconDekuSeedsTex.rgba32.inc.c"
+};
+
+u64 gItemIconFishingPoleTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)] = {
+#include "assets/textures/icon_item_static/gItemIconFishingPoleTex.rgba32.inc.c"
+};
+
+// Heart piece icons textures
+
+u64 gHeartPieceIcon1Tex[TEX_LEN(u64, HEART_PIECE_ICON_TEX_WIDTH, HEART_PIECE_ICON_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gHeartPieceIcon1Tex.ia8.inc.c"
+};
+
+u64 gHeartPieceIcon2Tex[TEX_LEN(u64, HEART_PIECE_ICON_TEX_WIDTH, HEART_PIECE_ICON_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gHeartPieceIcon2Tex.ia8.inc.c"
+};
+
+u64 gHeartPieceIcon3Tex[TEX_LEN(u64, HEART_PIECE_ICON_TEX_WIDTH, HEART_PIECE_ICON_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gHeartPieceIcon3Tex.ia8.inc.c"
+};
+
+// Pause menu cursor textures
+
+#define gPausePromptCursorTex_WIDTH 48
+#define gPausePromptCursorTex_HEIGHT 48
+u64 gPausePromptCursorTex[TEX_LEN(u64, gPausePromptCursorTex_WIDTH, gPausePromptCursorTex_HEIGHT, 4)] = {
+#include "assets/textures/icon_item_static/gPausePromptCursorTex.i4.inc.c"
+};
+
+#define gPauseUnusedCursorTex_WIDTH 24
+#define gPauseUnusedCursorTex_HEIGHT 24
+u64 gPauseUnusedCursorTex[TEX_LEN(u64, gPauseUnusedCursorTex_WIDTH, gPauseUnusedCursorTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseUnusedCursorTex.i8.inc.c"
+};
+
+u64 gPauseMenuCursorTopLeftTex[TEX_LEN(u64, PAUSE_MENU_CURSOR_CORNER_TEX_WIDTH, PAUSE_MENU_CURSOR_CORNER_TEX_HEIGHT,
+ 4)] = {
+#include "assets/textures/icon_item_static/gPauseMenuCursorTopLeftTex.ia4.inc.c"
+};
+
+u64 gPauseMenuCursorTopRightTex[TEX_LEN(u64, PAUSE_MENU_CURSOR_CORNER_TEX_WIDTH, PAUSE_MENU_CURSOR_CORNER_TEX_HEIGHT,
+ 4)] = {
+#include "assets/textures/icon_item_static/gPauseMenuCursorTopRightTex.ia4.inc.c"
+};
+
+u64 gPauseMenuCursorBottomLeftTex[TEX_LEN(u64, PAUSE_MENU_CURSOR_CORNER_TEX_WIDTH, PAUSE_MENU_CURSOR_CORNER_TEX_HEIGHT,
+ 4)] = {
+#include "assets/textures/icon_item_static/gPauseMenuCursorBottomLeftTex.ia4.inc.c"
+};
+
+u64 gPauseMenuCursorBottomRightTex[TEX_LEN(u64, PAUSE_MENU_CURSOR_CORNER_TEX_WIDTH, PAUSE_MENU_CURSOR_CORNER_TEX_HEIGHT,
+ 4)] = {
+#include "assets/textures/icon_item_static/gPauseMenuCursorBottomRightTex.ia4.inc.c"
+};
+
+// Pause menu pages background textures
+
+u64 gPauseEquipment00Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment00Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment20Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment20Tex.ia8.inc.c"
+};
+
+u64 gPauseMap00Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap00Tex.ia8.inc.c"
+};
+
+u64 gPauseMap20Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap20Tex.ia8.inc.c"
+};
+
+#if OOT_PAL
+u64 gPauseQuestStatus00Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus00Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus20Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus20Tex.ia8.inc.c"
+};
+#endif
+
+u64 gPauseSave00Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave00Tex.ia8.inc.c"
+};
+
+u64 gPauseSave20Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave20Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment01Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment01Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment11Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment11Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment21Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment21Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem01Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem01Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem11Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem11Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem21Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem21Tex.ia8.inc.c"
+};
+
+u64 gPauseMap01Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap01Tex.ia8.inc.c"
+};
+
+u64 gPauseMap11Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap11Tex.ia8.inc.c"
+};
+
+u64 gPauseMap21Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap21Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus01Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus01Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus11Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus11Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus21Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus21Tex.ia8.inc.c"
+};
+
+u64 gPauseSave01Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave01Tex.ia8.inc.c"
+};
+
+u64 gPauseSave11Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave11Tex.ia8.inc.c"
+};
+
+u64 gPauseSave21Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave21Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment02Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment02Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment12Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment12Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment22Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment22Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem02Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem02Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem12Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem12Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem22Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem22Tex.ia8.inc.c"
+};
+
+u64 gPauseMap02Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap02Tex.ia8.inc.c"
+};
+
+u64 gPauseMap12Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap12Tex.ia8.inc.c"
+};
+
+u64 gPauseMap22Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap22Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus02Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus02Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus12Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus12Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus22Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus22Tex.ia8.inc.c"
+};
+
+u64 gPauseSave02Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave02Tex.ia8.inc.c"
+};
+
+u64 gPauseSave12Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave12Tex.ia8.inc.c"
+};
+
+u64 gPauseSave22Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave22Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment03Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment03Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment13Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment13Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment23Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment23Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem03Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem03Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem13Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem13Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem23Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem23Tex.ia8.inc.c"
+};
+
+u64 gPauseMap03Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap03Tex.ia8.inc.c"
+};
+
+u64 gPauseMap13Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap13Tex.ia8.inc.c"
+};
+
+u64 gPauseMap23Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap23Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus03Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus03Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus13Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus13Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus23Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus23Tex.ia8.inc.c"
+};
+
+u64 gPauseSave03Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave03Tex.ia8.inc.c"
+};
+
+u64 gPauseSave13Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave13Tex.ia8.inc.c"
+};
+
+u64 gPauseSave23Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave23Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment04Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment04Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment14Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment14Tex.ia8.inc.c"
+};
+
+u64 gPauseEquipment24Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseEquipment24Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem04Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem04Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem14Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem14Tex.ia8.inc.c"
+};
+
+u64 gPauseSelectItem24Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSelectItem24Tex.ia8.inc.c"
+};
+
+u64 gPauseMap04Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap04Tex.ia8.inc.c"
+};
+
+u64 gPauseMap14Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap14Tex.ia8.inc.c"
+};
+
+u64 gPauseMap24Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseMap24Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus04Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus04Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus14Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus14Tex.ia8.inc.c"
+};
+
+u64 gPauseQuestStatus24Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseQuestStatus24Tex.ia8.inc.c"
+};
+
+u64 gPauseSave04Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave04Tex.ia8.inc.c"
+};
+
+u64 gPauseSave14Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave14Tex.ia8.inc.c"
+};
+
+u64 gPauseSave24Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseSave24Tex.ia8.inc.c"
+};
+
+u64 gPauseGameOver10Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gPauseGameOver10Tex.ia8.inc.c"
+};
+
+// Various textures and DLs
+
+#define gABtnSymbolTex_WIDTH 24
+#define gABtnSymbolTex_HEIGHT 16
+u64 gABtnSymbolTex[TEX_LEN(u64, gABtnSymbolTex_WIDTH, gABtnSymbolTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gABtnSymbolTex.ia8.inc.c"
+};
+
+#define gBBtnSymbolTex_WIDTH 24
+#define gBBtnSymbolTex_HEIGHT 16
+u64 gBBtnSymbolTex[TEX_LEN(u64, gBBtnSymbolTex_WIDTH, gBBtnSymbolTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gBBtnSymbolTex.ia8.inc.c"
+};
+
+#define gCBtnSymbolsTex_WIDTH 48
+#define gCBtnSymbolsTex_HEIGHT 16
+u64 gCBtnSymbolsTex[TEX_LEN(u64, gCBtnSymbolsTex_WIDTH, gCBtnSymbolsTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gCBtnSymbolsTex.ia8.inc.c"
+};
+
+#define gNamePanelLeftTex_WIDTH 72
+#define gNamePanelLeftTex_HEIGHT 24
+u64 gNamePanelLeftTex[TEX_LEN(u64, gNamePanelLeftTex_WIDTH, gNamePanelLeftTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gNamePanelLeftTex.ia8.inc.c"
+};
+
+#define gNamePanelRightTex_WIDTH 72
+#define gNamePanelRightTex_HEIGHT 24
+u64 gNamePanelRightTex[TEX_LEN(u64, gNamePanelRightTex_WIDTH, gNamePanelRightTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gNamePanelRightTex.ia8.inc.c"
+};
+
+#define gLButtonTex_WIDTH 24
+#define gLButtonTex_HEIGHT 32
+u64 gLButtonTex[TEX_LEN(u64, gLButtonTex_WIDTH, gLButtonTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gLButtonTex.ia8.inc.c"
+};
+
+#define gRButtonTex_WIDTH 24
+#define gRButtonTex_HEIGHT 32
+u64 gRButtonTex[TEX_LEN(u64, gRButtonTex_WIDTH, gRButtonTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gRButtonTex.ia8.inc.c"
+};
+
+#define gUnknownJPNTex_WIDTH 80
+#define gUnknownJPNTex_HEIGHT 16
+u64 gUnknownJPNTex[TEX_LEN(u64, gUnknownJPNTex_WIDTH, gUnknownJPNTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gUnknownJPNTex.ia8.inc.c"
+};
+
+u64 gSongNoteTex[TEX_LEN(u64, gSongNoteTex_WIDTH, gSongNoteTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gSongNoteTex.ia8.inc.c"
+};
+
+u64 gMagicArrowEquipEffectTex[TEX_LEN(u64, gMagicArrowEquipEffectTex_WIDTH, gMagicArrowEquipEffectTex_HEIGHT, 8)] = {
+#include "assets/textures/icon_item_static/gMagicArrowEquipEffectTex.ia8.inc.c"
+};
+
+Gfx gItemNamePanelDL[18] = {
+#include "assets/textures/icon_item_static/gItemNamePanelDL.inc.c"
+};
+
+Gfx gLButtonIconDL[10] = {
+#include "assets/textures/icon_item_static/gLButtonIconDL.inc.c"
+};
+
+Gfx gRButtonIconDL[10] = {
+#include "assets/textures/icon_item_static/gRButtonIconDL.inc.c"
+};
+
+Gfx gCButtonIconsDL[11] = {
+#include "assets/textures/icon_item_static/gCButtonIconsDL.inc.c"
+};
+
+Gfx gAButtonIconDL[11] = {
+#include "assets/textures/icon_item_static/gAButtonIconDL.inc.c"
+};
+
+Gfx gBButtonIconDL[11] = {
+#include "assets/textures/icon_item_static/gBButtonIconDL.inc.c"
+};
+
+Gfx gPromptCursorLeftDL[10] = {
+#include "assets/textures/icon_item_static/gPromptCursorLeftDL.inc.c"
+};
+
+Gfx gPromptCursorRightDL[10] = {
+#include "assets/textures/icon_item_static/gPromptCursorRightDL.inc.c"
+};
diff --git a/assets/textures/icon_item_static/icon_item_static.h b/assets/textures/icon_item_static/icon_item_static.h
new file mode 100644
index 0000000000..74c837280f
--- /dev/null
+++ b/assets/textures/icon_item_static/icon_item_static.h
@@ -0,0 +1,204 @@
+#ifndef ICON_ITEM_STATIC_H
+#define ICON_ITEM_STATIC_H
+
+#include "ultra64.h"
+#include "src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h"
+#include "tex_len.h"
+#include "versions.h"
+#include "z64interface.h"
+
+extern u64 gItemIconDekuStickTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconDekuNutTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBombTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBowTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconArrowFireTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconDinsFireTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconSlingshotTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconOcarinaFairyTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconOcarinaOfTimeTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBombchuTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconHookshotTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconLongshotTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconArrowIceTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconFaroresWindTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBoomerangTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconLensOfTruthTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconMagicBeanTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconHammerTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconArrowLightTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconNayrusLoveTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottleEmptyTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottlePotionRedTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottlePotionGreenTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottlePotionBlueTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottleFairyTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottleFishTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottleMilkFullTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottleRutosLetterTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottleBlueFireTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottleBugTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottleBigPoeTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottleMilkHalfTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBottlePoeTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconWeirdEggTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconChickenTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconZeldasLetterTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconMaskKeatonTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconMaskSkullTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconMaskSpookyTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconMaskBunnyHoodTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconMaskGoronTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconMaskZoraTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconMaskGerudoTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconMaskTruthTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconSoldOutTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconPocketEggTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconPocketCuccoTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconCojiroTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconOddMushroomTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconOddPotionTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconPoachersSawTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBrokenGoronsSwordTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconPrescriptionTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconEyeballFrogTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconEyeDropsTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconClaimCheckTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBowFireTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBowIceTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBowLightTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconSwordKokiriTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconSwordMasterTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconSwordBiggoronTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconShieldDekuTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconShieldHylianTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconShieldMirrorTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconTunicKokiriTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconTunicGoronTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconTunicZoraTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBootsKokiriTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBootsIronTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBootsHoverTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBulletBag30Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBulletBag40Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBulletBag50Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconQuiver30Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconQuiver40Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconQuiver50Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBombBag20Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBombBag30Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBombBag40Tex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconGoronsBraceletTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconSilverGauntletsTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconGoldenGauntletsTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconScaleSilverTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconScaleGoldenTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconBrokenGiantsKnifeTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconAdultsWalletTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconGiantsWalletTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconDekuSeedsTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+extern u64 gItemIconFishingPoleTex[TEX_LEN(u64, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 32)];
+
+#define HEART_PIECE_ICON_TEX_WIDTH 48
+#define HEART_PIECE_ICON_TEX_HEIGHT 48
+extern u64 gHeartPieceIcon1Tex[TEX_LEN(u64, HEART_PIECE_ICON_TEX_WIDTH, HEART_PIECE_ICON_TEX_HEIGHT, 8)];
+extern u64 gHeartPieceIcon2Tex[TEX_LEN(u64, HEART_PIECE_ICON_TEX_WIDTH, HEART_PIECE_ICON_TEX_HEIGHT, 8)];
+extern u64 gHeartPieceIcon3Tex[TEX_LEN(u64, HEART_PIECE_ICON_TEX_WIDTH, HEART_PIECE_ICON_TEX_HEIGHT, 8)];
+
+#define PAUSE_MENU_CURSOR_CORNER_TEX_SIZE 16
+#define PAUSE_MENU_CURSOR_CORNER_TEX_WIDTH PAUSE_MENU_CURSOR_CORNER_TEX_SIZE
+#define PAUSE_MENU_CURSOR_CORNER_TEX_HEIGHT PAUSE_MENU_CURSOR_CORNER_TEX_SIZE
+extern u64 gPauseMenuCursorTopLeftTex[TEX_LEN(u64, PAUSE_MENU_CURSOR_CORNER_TEX_WIDTH, PAUSE_MENU_CURSOR_CORNER_TEX_HEIGHT, 4)];
+extern u64 gPauseMenuCursorTopRightTex[TEX_LEN(u64, PAUSE_MENU_CURSOR_CORNER_TEX_WIDTH, PAUSE_MENU_CURSOR_CORNER_TEX_HEIGHT, 4)];
+extern u64 gPauseMenuCursorBottomLeftTex[TEX_LEN(u64, PAUSE_MENU_CURSOR_CORNER_TEX_WIDTH, PAUSE_MENU_CURSOR_CORNER_TEX_HEIGHT, 4)];
+extern u64 gPauseMenuCursorBottomRightTex[TEX_LEN(u64, PAUSE_MENU_CURSOR_CORNER_TEX_WIDTH, PAUSE_MENU_CURSOR_CORNER_TEX_HEIGHT, 4)];
+
+extern u64 gPauseEquipment00Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment20Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap00Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap20Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+#if OOT_PAL
+extern u64 gPauseQuestStatus00Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus20Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+#endif
+extern u64 gPauseSave00Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave20Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment01Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment11Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment21Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem01Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem11Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem21Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap01Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap11Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap21Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus01Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus11Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus21Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave01Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave11Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave21Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment02Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment12Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment22Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem02Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem12Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem22Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap02Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap12Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap22Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus02Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus12Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus22Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave02Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave12Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave22Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment03Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment13Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment23Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem03Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem13Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem23Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap03Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap13Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap23Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus03Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus13Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus23Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave03Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave13Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave23Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment04Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment14Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseEquipment24Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem04Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem14Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSelectItem24Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap04Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap14Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseMap24Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus04Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus14Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseQuestStatus24Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave04Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave14Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseSave24Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+extern u64 gPauseGameOver10Tex[TEX_LEN(u64, PAGE_BG_QUAD_TEX_WIDTH, PAGE_BG_QUAD_TEX_HEIGHT, 8)];
+
+#define gSongNoteTex_WIDTH 16
+#define gSongNoteTex_HEIGHT 24
+extern u64 gSongNoteTex[TEX_LEN(u64, gSongNoteTex_WIDTH, gSongNoteTex_HEIGHT, 8)];
+
+#define gMagicArrowEquipEffectTex_SIZE 32
+#define gMagicArrowEquipEffectTex_WIDTH gMagicArrowEquipEffectTex_SIZE
+#define gMagicArrowEquipEffectTex_HEIGHT gMagicArrowEquipEffectTex_SIZE
+extern u64 gMagicArrowEquipEffectTex[TEX_LEN(u64, gMagicArrowEquipEffectTex_WIDTH, gMagicArrowEquipEffectTex_HEIGHT, 8)];
+
+extern Gfx gItemNamePanelDL[18];
+extern Gfx gLButtonIconDL[10];
+extern Gfx gRButtonIconDL[10];
+extern Gfx gCButtonIconsDL[11];
+extern Gfx gAButtonIconDL[11];
+extern Gfx gPromptCursorLeftDL[10];
+extern Gfx gPromptCursorRightDL[10];
+
+#endif
diff --git a/assets/xml/audio/samplebanks/SampleBank_0.xml b/assets/xml/audio/samplebanks/SampleBank_0.xml
index e90a084930..5de4e44b12 100644
--- a/assets/xml/audio/samplebanks/SampleBank_0.xml
+++ b/assets/xml/audio/samplebanks/SampleBank_0.xml
@@ -1,433 +1,436 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/audio/samplebanks/SampleBank_2.xml b/assets/xml/audio/samplebanks/SampleBank_2.xml
index 21e76424e2..05d2563d1a 100644
--- a/assets/xml/audio/samplebanks/SampleBank_2.xml
+++ b/assets/xml/audio/samplebanks/SampleBank_2.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/assets/xml/audio/samplebanks/SampleBank_3.xml b/assets/xml/audio/samplebanks/SampleBank_3.xml
index e6738f8b39..268db38821 100644
--- a/assets/xml/audio/samplebanks/SampleBank_3.xml
+++ b/assets/xml/audio/samplebanks/SampleBank_3.xml
@@ -1,8 +1,8 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/assets/xml/audio/samplebanks/SampleBank_4.xml b/assets/xml/audio/samplebanks/SampleBank_4.xml
index 8d68e285ff..11688e4bc7 100644
--- a/assets/xml/audio/samplebanks/SampleBank_4.xml
+++ b/assets/xml/audio/samplebanks/SampleBank_4.xml
@@ -1,8 +1,8 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/assets/xml/audio/samplebanks/SampleBank_5.xml b/assets/xml/audio/samplebanks/SampleBank_5.xml
index 6eb7356935..899efe7f9c 100644
--- a/assets/xml/audio/samplebanks/SampleBank_5.xml
+++ b/assets/xml/audio/samplebanks/SampleBank_5.xml
@@ -1,9 +1,9 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/assets/xml/audio/samplebanks/SampleBank_6.xml b/assets/xml/audio/samplebanks/SampleBank_6.xml
index e6971659b0..6b565dd112 100644
--- a/assets/xml/audio/samplebanks/SampleBank_6.xml
+++ b/assets/xml/audio/samplebanks/SampleBank_6.xml
@@ -1,10 +1,10 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/assets/xml/audio/soundfonts/Soundfont_10.xml b/assets/xml/audio/soundfonts/Soundfont_10.xml
index 578101fd4d..126488b548 100644
--- a/assets/xml/audio/soundfonts/Soundfont_10.xml
+++ b/assets/xml/audio/soundfonts/Soundfont_10.xml
@@ -5,16 +5,19 @@
-
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/assets/xml/code/fbdemo_circle.xml b/assets/xml/code/fbdemo_circle.xml
index 530506369c..618c743314 100644
--- a/assets/xml/code/fbdemo_circle.xml
+++ b/assets/xml/code/fbdemo_circle.xml
@@ -7,7 +7,6 @@
-
-
+
diff --git a/assets/xml/code/fbdemo_wipe1.xml b/assets/xml/code/fbdemo_wipe1.xml
index 74f129776b..87f7e47b6f 100644
--- a/assets/xml/code/fbdemo_wipe1.xml
+++ b/assets/xml/code/fbdemo_wipe1.xml
@@ -4,7 +4,6 @@
-
-
+
diff --git a/assets/xml/objects/gameplay_field_keep.xml b/assets/xml/objects/gameplay_field_keep.xml
index 011e8f7fc7..3c0f18d74e 100644
--- a/assets/xml/objects/gameplay_field_keep.xml
+++ b/assets/xml/objects/gameplay_field_keep.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/assets/xml/objects/gameplay_keep.xml b/assets/xml/objects/gameplay_keep.xml
index dcb7e29605..2555cf68dc 100644
--- a/assets/xml/objects/gameplay_keep.xml
+++ b/assets/xml/objects/gameplay_keep.xml
@@ -1,5 +1,5 @@
-
+
@@ -709,10 +709,10 @@
-
+
@@ -759,7 +759,7 @@
-
+
@@ -848,7 +848,7 @@
-
+
diff --git a/assets/xml/objects/gameplay_keep_pal.xml b/assets/xml/objects/gameplay_keep_pal.xml
index fbea0efd0c..90bf296c85 100644
--- a/assets/xml/objects/gameplay_keep_pal.xml
+++ b/assets/xml/objects/gameplay_keep_pal.xml
@@ -1,5 +1,5 @@
-
+
@@ -697,16 +697,16 @@
-
-
+
+
-
+
@@ -753,7 +753,7 @@
-
+
@@ -841,9 +841,9 @@
-
-
+
+
@@ -898,8 +898,8 @@
-
+
diff --git a/assets/xml/objects/object_ahg.xml b/assets/xml/objects/object_ahg.xml
index 4d37b1b110..8147abb75f 100644
--- a/assets/xml/objects/object_ahg.xml
+++ b/assets/xml/objects/object_ahg.xml
@@ -1,61 +1,66 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_am.xml b/assets/xml/objects/object_am.xml
index 0a4b88ddf8..2467baf6ab 100644
--- a/assets/xml/objects/object_am.xml
+++ b/assets/xml/objects/object_am.xml
@@ -5,5 +5,6 @@
+
diff --git a/assets/xml/objects/object_ani.xml b/assets/xml/objects/object_ani.xml
index 25ad7af354..d83aa7656a 100644
--- a/assets/xml/objects/object_ani.xml
+++ b/assets/xml/objects/object_ani.xml
@@ -51,6 +51,8 @@
+
+
diff --git a/assets/xml/objects/object_aob.xml b/assets/xml/objects/object_aob.xml
index 61b28914bd..74838f6af3 100644
--- a/assets/xml/objects/object_aob.xml
+++ b/assets/xml/objects/object_aob.xml
@@ -1,59 +1,58 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/assets/xml/objects/object_bba.xml b/assets/xml/objects/object_bba.xml
index ccc5c21365..f988d8fbe4 100644
--- a/assets/xml/objects/object_bba.xml
+++ b/assets/xml/objects/object_bba.xml
@@ -1,45 +1,50 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_bdoor.xml b/assets/xml/objects/object_bdoor.xml
index e926ae40bd..e15f0f6294 100644
--- a/assets/xml/objects/object_bdoor.xml
+++ b/assets/xml/objects/object_bdoor.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_bji.xml b/assets/xml/objects/object_bji.xml
index c665b6b001..8dd89dd875 100644
--- a/assets/xml/objects/object_bji.xml
+++ b/assets/xml/objects/object_bji.xml
@@ -1,56 +1,61 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_bob.xml b/assets/xml/objects/object_bob.xml
index 289e994e47..ad59e56ea3 100644
--- a/assets/xml/objects/object_bob.xml
+++ b/assets/xml/objects/object_bob.xml
@@ -1,47 +1,52 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_boj.xml b/assets/xml/objects/object_boj.xml
index 4be4764ab5..d43332de00 100644
--- a/assets/xml/objects/object_boj.xml
+++ b/assets/xml/objects/object_boj.xml
@@ -1,65 +1,73 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_box.xml b/assets/xml/objects/object_box.xml
index 34162fc94f..7ab9d9e7f4 100644
--- a/assets/xml/objects/object_box.xml
+++ b/assets/xml/objects/object_box.xml
@@ -5,7 +5,9 @@
+
+
@@ -19,11 +21,7 @@
-
+
-
-
-
-
diff --git a/assets/xml/objects/object_bv.xml b/assets/xml/objects/object_bv.xml
index e2c2ce9202..5a8e6c594d 100644
--- a/assets/xml/objects/object_bv.xml
+++ b/assets/xml/objects/object_bv.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/assets/xml/objects/object_bv_pal.xml b/assets/xml/objects/object_bv_pal.xml
index 204273fc01..8de7492663 100644
--- a/assets/xml/objects/object_bv_pal.xml
+++ b/assets/xml/objects/object_bv_pal.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/assets/xml/objects/object_cne.xml b/assets/xml/objects/object_cne.xml
index 0c14d0bc54..ecf151d641 100644
--- a/assets/xml/objects/object_cne.xml
+++ b/assets/xml/objects/object_cne.xml
@@ -1,53 +1,57 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
-
+
+
diff --git a/assets/xml/objects/object_cob.xml b/assets/xml/objects/object_cob.xml
index ba051cfa74..b5047b4993 100644
--- a/assets/xml/objects/object_cob.xml
+++ b/assets/xml/objects/object_cob.xml
@@ -1,41 +1,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_demo_6k.xml b/assets/xml/objects/object_demo_6k.xml
index 73058d5e46..e2de93db2e 100644
--- a/assets/xml/objects/object_demo_6k.xml
+++ b/assets/xml/objects/object_demo_6k.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_demo_kekkai.xml b/assets/xml/objects/object_demo_kekkai.xml
index 1b9c9b4027..8b7b739c64 100644
--- a/assets/xml/objects/object_demo_kekkai.xml
+++ b/assets/xml/objects/object_demo_kekkai.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_door_killer.xml b/assets/xml/objects/object_door_killer.xml
index a37f590d60..fbee0e5f70 100644
--- a/assets/xml/objects/object_door_killer.xml
+++ b/assets/xml/objects/object_door_killer.xml
@@ -12,6 +12,6 @@
-
+
diff --git a/assets/xml/objects/object_efc_erupc.xml b/assets/xml/objects/object_efc_erupc.xml
index 800d9535f1..13cc2ab033 100644
--- a/assets/xml/objects/object_efc_erupc.xml
+++ b/assets/xml/objects/object_efc_erupc.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_fd.xml b/assets/xml/objects/object_fd.xml
index a28919d8e8..4a5ce9fafa 100644
--- a/assets/xml/objects/object_fd.xml
+++ b/assets/xml/objects/object_fd.xml
@@ -19,9 +19,10 @@
-
-
-
+
+
+
+
diff --git a/assets/xml/objects/object_fd2.xml b/assets/xml/objects/object_fd2.xml
index b3fbdcb216..8d2b3dcdb6 100644
--- a/assets/xml/objects/object_fd2.xml
+++ b/assets/xml/objects/object_fd2.xml
@@ -21,9 +21,10 @@
-
-
-
+
+
+
+
diff --git a/assets/xml/objects/object_fd_pal.xml b/assets/xml/objects/object_fd_pal.xml
index 776a2ee494..be375399f6 100644
--- a/assets/xml/objects/object_fd_pal.xml
+++ b/assets/xml/objects/object_fd_pal.xml
@@ -19,9 +19,10 @@
-
-
-
+
+
+
+
diff --git a/assets/xml/objects/object_fish.xml b/assets/xml/objects/object_fish.xml
index f5ad4f6da0..2ce27bac3a 100644
--- a/assets/xml/objects/object_fish.xml
+++ b/assets/xml/objects/object_fish.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_fz.xml b/assets/xml/objects/object_fz.xml
index dad6fec5ce..bbed88b106 100644
--- a/assets/xml/objects/object_fz.xml
+++ b/assets/xml/objects/object_fz.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_arrow.xml b/assets/xml/objects/object_gi_arrow.xml
index 4b58787a9d..4ce9110cc1 100644
--- a/assets/xml/objects/object_gi_arrow.xml
+++ b/assets/xml/objects/object_gi_arrow.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_arrowcase.xml b/assets/xml/objects/object_gi_arrowcase.xml
index 267b0a734d..990576428d 100644
--- a/assets/xml/objects/object_gi_arrowcase.xml
+++ b/assets/xml/objects/object_gi_arrowcase.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_bean.xml b/assets/xml/objects/object_gi_bean.xml
index e74247816f..2c6ce0cf12 100644
--- a/assets/xml/objects/object_gi_bean.xml
+++ b/assets/xml/objects/object_gi_bean.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_bomb_1.xml b/assets/xml/objects/object_gi_bomb_1.xml
index bae86c11d8..5d7dab6d86 100644
--- a/assets/xml/objects/object_gi_bomb_1.xml
+++ b/assets/xml/objects/object_gi_bomb_1.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_bomb_2.xml b/assets/xml/objects/object_gi_bomb_2.xml
index 1400c4a4d4..01f3956803 100644
--- a/assets/xml/objects/object_gi_bomb_2.xml
+++ b/assets/xml/objects/object_gi_bomb_2.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_bombpouch.xml b/assets/xml/objects/object_gi_bombpouch.xml
index 07134748c3..42620ec94d 100644
--- a/assets/xml/objects/object_gi_bombpouch.xml
+++ b/assets/xml/objects/object_gi_bombpouch.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_boomerang.xml b/assets/xml/objects/object_gi_boomerang.xml
index 3c1a0fe7fc..fef261c489 100644
--- a/assets/xml/objects/object_gi_boomerang.xml
+++ b/assets/xml/objects/object_gi_boomerang.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_boots_2.xml b/assets/xml/objects/object_gi_boots_2.xml
index 8e9cd1028d..e172bd006c 100644
--- a/assets/xml/objects/object_gi_boots_2.xml
+++ b/assets/xml/objects/object_gi_boots_2.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_bosskey.xml b/assets/xml/objects/object_gi_bosskey.xml
index e5e4bc86c9..8e93c10d1a 100644
--- a/assets/xml/objects/object_gi_bosskey.xml
+++ b/assets/xml/objects/object_gi_bosskey.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_bottle.xml b/assets/xml/objects/object_gi_bottle.xml
index 3b0884a03f..0a27562954 100644
--- a/assets/xml/objects/object_gi_bottle.xml
+++ b/assets/xml/objects/object_gi_bottle.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_bottle_letter.xml b/assets/xml/objects/object_gi_bottle_letter.xml
index 443219caf5..04b08dd673 100644
--- a/assets/xml/objects/object_gi_bottle_letter.xml
+++ b/assets/xml/objects/object_gi_bottle_letter.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_bow.xml b/assets/xml/objects/object_gi_bow.xml
index 946e9c4965..6e9101b413 100644
--- a/assets/xml/objects/object_gi_bow.xml
+++ b/assets/xml/objects/object_gi_bow.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_bracelet.xml b/assets/xml/objects/object_gi_bracelet.xml
index 5a0b62a60a..da35c003f8 100644
--- a/assets/xml/objects/object_gi_bracelet.xml
+++ b/assets/xml/objects/object_gi_bracelet.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_brokensword.xml b/assets/xml/objects/object_gi_brokensword.xml
index 408741ac54..44cae3e100 100644
--- a/assets/xml/objects/object_gi_brokensword.xml
+++ b/assets/xml/objects/object_gi_brokensword.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_butterfly.xml b/assets/xml/objects/object_gi_butterfly.xml
index 76ac706096..9882d27954 100644
--- a/assets/xml/objects/object_gi_butterfly.xml
+++ b/assets/xml/objects/object_gi_butterfly.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_coin.xml b/assets/xml/objects/object_gi_coin.xml
index 22e29f255f..f65993465b 100644
--- a/assets/xml/objects/object_gi_coin.xml
+++ b/assets/xml/objects/object_gi_coin.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_compass.xml b/assets/xml/objects/object_gi_compass.xml
index 076229b11e..10c6fbb63a 100644
--- a/assets/xml/objects/object_gi_compass.xml
+++ b/assets/xml/objects/object_gi_compass.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_dekupouch.xml b/assets/xml/objects/object_gi_dekupouch.xml
index 3d6d95d98a..25cde931f2 100644
--- a/assets/xml/objects/object_gi_dekupouch.xml
+++ b/assets/xml/objects/object_gi_dekupouch.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_egg.xml b/assets/xml/objects/object_gi_egg.xml
index 2b2e2847db..ceae8be407 100644
--- a/assets/xml/objects/object_gi_egg.xml
+++ b/assets/xml/objects/object_gi_egg.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_eye_lotion.xml b/assets/xml/objects/object_gi_eye_lotion.xml
index 5128c5f6ff..86e053cd94 100644
--- a/assets/xml/objects/object_gi_eye_lotion.xml
+++ b/assets/xml/objects/object_gi_eye_lotion.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_fire.xml b/assets/xml/objects/object_gi_fire.xml
index a57fba6e86..3b81815d5f 100644
--- a/assets/xml/objects/object_gi_fire.xml
+++ b/assets/xml/objects/object_gi_fire.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_fish.xml b/assets/xml/objects/object_gi_fish.xml
index edb39dc297..75361b32da 100644
--- a/assets/xml/objects/object_gi_fish.xml
+++ b/assets/xml/objects/object_gi_fish.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_frog.xml b/assets/xml/objects/object_gi_frog.xml
index f180fd267b..8c5d616eb4 100644
--- a/assets/xml/objects/object_gi_frog.xml
+++ b/assets/xml/objects/object_gi_frog.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_gerudo.xml b/assets/xml/objects/object_gi_gerudo.xml
index 3be8d34620..26dc606ce0 100644
--- a/assets/xml/objects/object_gi_gerudo.xml
+++ b/assets/xml/objects/object_gi_gerudo.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_ghost.xml b/assets/xml/objects/object_gi_ghost.xml
index 186f4c74b7..e6c631c98e 100644
--- a/assets/xml/objects/object_gi_ghost.xml
+++ b/assets/xml/objects/object_gi_ghost.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_glasses.xml b/assets/xml/objects/object_gi_glasses.xml
index 63d32ab5ac..4a9cacf086 100644
--- a/assets/xml/objects/object_gi_glasses.xml
+++ b/assets/xml/objects/object_gi_glasses.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_gloves.xml b/assets/xml/objects/object_gi_gloves.xml
index 1b4282dcaa..fb273e95f4 100644
--- a/assets/xml/objects/object_gi_gloves.xml
+++ b/assets/xml/objects/object_gi_gloves.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_goddess.xml b/assets/xml/objects/object_gi_goddess.xml
index 50cbdd8918..6339012d47 100644
--- a/assets/xml/objects/object_gi_goddess.xml
+++ b/assets/xml/objects/object_gi_goddess.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_grass.xml b/assets/xml/objects/object_gi_grass.xml
index ae7834201a..2cc465c959 100644
--- a/assets/xml/objects/object_gi_grass.xml
+++ b/assets/xml/objects/object_gi_grass.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_hammer.xml b/assets/xml/objects/object_gi_hammer.xml
index feb5c8659d..49da345a93 100644
--- a/assets/xml/objects/object_gi_hammer.xml
+++ b/assets/xml/objects/object_gi_hammer.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_heart.xml b/assets/xml/objects/object_gi_heart.xml
index 48e78b1b5c..b3576efaad 100644
--- a/assets/xml/objects/object_gi_heart.xml
+++ b/assets/xml/objects/object_gi_heart.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_hearts.xml b/assets/xml/objects/object_gi_hearts.xml
index d2e763e631..122c898571 100644
--- a/assets/xml/objects/object_gi_hearts.xml
+++ b/assets/xml/objects/object_gi_hearts.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_hookshot.xml b/assets/xml/objects/object_gi_hookshot.xml
index a6b3b0fdac..513194fa7d 100644
--- a/assets/xml/objects/object_gi_hookshot.xml
+++ b/assets/xml/objects/object_gi_hookshot.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_hoverboots.xml b/assets/xml/objects/object_gi_hoverboots.xml
index c4a67877b2..9d710662e5 100644
--- a/assets/xml/objects/object_gi_hoverboots.xml
+++ b/assets/xml/objects/object_gi_hoverboots.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_insect.xml b/assets/xml/objects/object_gi_insect.xml
index 7af5b5b3b2..9467605ce2 100644
--- a/assets/xml/objects/object_gi_insect.xml
+++ b/assets/xml/objects/object_gi_insect.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_jewel.xml b/assets/xml/objects/object_gi_jewel.xml
index e83c651164..5dc87f53e2 100644
--- a/assets/xml/objects/object_gi_jewel.xml
+++ b/assets/xml/objects/object_gi_jewel.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_key.xml b/assets/xml/objects/object_gi_key.xml
index a37d45a71c..e38547a32c 100644
--- a/assets/xml/objects/object_gi_key.xml
+++ b/assets/xml/objects/object_gi_key.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_ki_tan_mask.xml b/assets/xml/objects/object_gi_ki_tan_mask.xml
index f66535af37..e447c8fadf 100644
--- a/assets/xml/objects/object_gi_ki_tan_mask.xml
+++ b/assets/xml/objects/object_gi_ki_tan_mask.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_liquid.xml b/assets/xml/objects/object_gi_liquid.xml
index 5eeeca0fd2..b3af2b2627 100644
--- a/assets/xml/objects/object_gi_liquid.xml
+++ b/assets/xml/objects/object_gi_liquid.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_longsword.xml b/assets/xml/objects/object_gi_longsword.xml
index 7161e42e38..bdfffe3b16 100644
--- a/assets/xml/objects/object_gi_longsword.xml
+++ b/assets/xml/objects/object_gi_longsword.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_m_arrow.xml b/assets/xml/objects/object_gi_m_arrow.xml
index 0fd659ae95..069a1bf1d4 100644
--- a/assets/xml/objects/object_gi_m_arrow.xml
+++ b/assets/xml/objects/object_gi_m_arrow.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_magicpot.xml b/assets/xml/objects/object_gi_magicpot.xml
index 7623e6353e..070de07fa0 100644
--- a/assets/xml/objects/object_gi_magicpot.xml
+++ b/assets/xml/objects/object_gi_magicpot.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_map.xml b/assets/xml/objects/object_gi_map.xml
index 8887dd22c9..619b0bc845 100644
--- a/assets/xml/objects/object_gi_map.xml
+++ b/assets/xml/objects/object_gi_map.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_medal.xml b/assets/xml/objects/object_gi_medal.xml
index 28e5b1e683..5676a9e316 100644
--- a/assets/xml/objects/object_gi_medal.xml
+++ b/assets/xml/objects/object_gi_medal.xml
@@ -1,11 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_gi_melody.xml b/assets/xml/objects/object_gi_melody.xml
index b01fca9538..e028bc9463 100644
--- a/assets/xml/objects/object_gi_melody.xml
+++ b/assets/xml/objects/object_gi_melody.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_milk.xml b/assets/xml/objects/object_gi_milk.xml
index 00b9530d95..3e5cb0cb5a 100644
--- a/assets/xml/objects/object_gi_milk.xml
+++ b/assets/xml/objects/object_gi_milk.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_mushroom.xml b/assets/xml/objects/object_gi_mushroom.xml
index 5b19bca743..8ee686263c 100644
--- a/assets/xml/objects/object_gi_mushroom.xml
+++ b/assets/xml/objects/object_gi_mushroom.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_niwatori.xml b/assets/xml/objects/object_gi_niwatori.xml
index 713cc1ce5a..8af44b8708 100644
--- a/assets/xml/objects/object_gi_niwatori.xml
+++ b/assets/xml/objects/object_gi_niwatori.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_nuts.xml b/assets/xml/objects/object_gi_nuts.xml
index 5508fe8569..d1a8454dbc 100644
--- a/assets/xml/objects/object_gi_nuts.xml
+++ b/assets/xml/objects/object_gi_nuts.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_ocarina.xml b/assets/xml/objects/object_gi_ocarina.xml
index 7693cc122f..b8714d6e3c 100644
--- a/assets/xml/objects/object_gi_ocarina.xml
+++ b/assets/xml/objects/object_gi_ocarina.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_ocarina_0.xml b/assets/xml/objects/object_gi_ocarina_0.xml
index 336d338946..caca8f2002 100644
--- a/assets/xml/objects/object_gi_ocarina_0.xml
+++ b/assets/xml/objects/object_gi_ocarina_0.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_pachinko.xml b/assets/xml/objects/object_gi_pachinko.xml
index 5f808baf92..9967813b3d 100644
--- a/assets/xml/objects/object_gi_pachinko.xml
+++ b/assets/xml/objects/object_gi_pachinko.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_powder.xml b/assets/xml/objects/object_gi_powder.xml
index fb7dc0155d..4e33b58208 100644
--- a/assets/xml/objects/object_gi_powder.xml
+++ b/assets/xml/objects/object_gi_powder.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_prescription.xml b/assets/xml/objects/object_gi_prescription.xml
index 081de301c4..9fa16660c7 100644
--- a/assets/xml/objects/object_gi_prescription.xml
+++ b/assets/xml/objects/object_gi_prescription.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_rabit_mask.xml b/assets/xml/objects/object_gi_rabit_mask.xml
index 75f855550d..a3c07e469c 100644
--- a/assets/xml/objects/object_gi_rabit_mask.xml
+++ b/assets/xml/objects/object_gi_rabit_mask.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_redead_mask.xml b/assets/xml/objects/object_gi_redead_mask.xml
index 7de08487f8..fe601cab64 100644
--- a/assets/xml/objects/object_gi_redead_mask.xml
+++ b/assets/xml/objects/object_gi_redead_mask.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_rupy.xml b/assets/xml/objects/object_gi_rupy.xml
index 0a1af96d0f..07b18b82dd 100644
--- a/assets/xml/objects/object_gi_rupy.xml
+++ b/assets/xml/objects/object_gi_rupy.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_saw.xml b/assets/xml/objects/object_gi_saw.xml
index dcc038b7c1..999b818e8b 100644
--- a/assets/xml/objects/object_gi_saw.xml
+++ b/assets/xml/objects/object_gi_saw.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_scale.xml b/assets/xml/objects/object_gi_scale.xml
index 1cf5de5b99..c6794b6aea 100644
--- a/assets/xml/objects/object_gi_scale.xml
+++ b/assets/xml/objects/object_gi_scale.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_seed.xml b/assets/xml/objects/object_gi_seed.xml
index 82c15c82d2..5d3ef9c03f 100644
--- a/assets/xml/objects/object_gi_seed.xml
+++ b/assets/xml/objects/object_gi_seed.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_shield_1.xml b/assets/xml/objects/object_gi_shield_1.xml
index 2e93695699..867292a4c3 100644
--- a/assets/xml/objects/object_gi_shield_1.xml
+++ b/assets/xml/objects/object_gi_shield_1.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_shield_2.xml b/assets/xml/objects/object_gi_shield_2.xml
index 176ae025fe..364070d101 100644
--- a/assets/xml/objects/object_gi_shield_2.xml
+++ b/assets/xml/objects/object_gi_shield_2.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_shield_3.xml b/assets/xml/objects/object_gi_shield_3.xml
index 250bf7fea3..974a2539a9 100644
--- a/assets/xml/objects/object_gi_shield_3.xml
+++ b/assets/xml/objects/object_gi_shield_3.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_skj_mask.xml b/assets/xml/objects/object_gi_skj_mask.xml
index e6c90f76f1..6479015715 100644
--- a/assets/xml/objects/object_gi_skj_mask.xml
+++ b/assets/xml/objects/object_gi_skj_mask.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_soul.xml b/assets/xml/objects/object_gi_soul.xml
index 76ffc56852..ee9dbd9570 100644
--- a/assets/xml/objects/object_gi_soul.xml
+++ b/assets/xml/objects/object_gi_soul.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_stick.xml b/assets/xml/objects/object_gi_stick.xml
index fed89f4659..d974b7ac5d 100644
--- a/assets/xml/objects/object_gi_stick.xml
+++ b/assets/xml/objects/object_gi_stick.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_sutaru.xml b/assets/xml/objects/object_gi_sutaru.xml
index a2606afbe3..343d301868 100644
--- a/assets/xml/objects/object_gi_sutaru.xml
+++ b/assets/xml/objects/object_gi_sutaru.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_sword_1.xml b/assets/xml/objects/object_gi_sword_1.xml
index e1119abca0..3bc15dcaf3 100644
--- a/assets/xml/objects/object_gi_sword_1.xml
+++ b/assets/xml/objects/object_gi_sword_1.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_ticketstone.xml b/assets/xml/objects/object_gi_ticketstone.xml
index 0fa37fe11e..6cdd5ea2f0 100644
--- a/assets/xml/objects/object_gi_ticketstone.xml
+++ b/assets/xml/objects/object_gi_ticketstone.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gi_truth_mask.xml b/assets/xml/objects/object_gi_truth_mask.xml
index f28c7cbcad..64bd0939c6 100644
--- a/assets/xml/objects/object_gi_truth_mask.xml
+++ b/assets/xml/objects/object_gi_truth_mask.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_gla.xml b/assets/xml/objects/object_gla.xml
index ca4d9225da..dbbfcb58ff 100644
--- a/assets/xml/objects/object_gla.xml
+++ b/assets/xml/objects/object_gla.xml
@@ -58,7 +58,7 @@
-
+
diff --git a/assets/xml/objects/object_gnd.xml b/assets/xml/objects/object_gnd.xml
index 53d2bbde4c..d073b8b973 100644
--- a/assets/xml/objects/object_gnd.xml
+++ b/assets/xml/objects/object_gnd.xml
@@ -44,11 +44,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/assets/xml/objects/object_god_lgt.xml b/assets/xml/objects/object_god_lgt.xml
index 60df9e4693..b630605364 100644
--- a/assets/xml/objects/object_god_lgt.xml
+++ b/assets/xml/objects/object_god_lgt.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_hintnuts.xml b/assets/xml/objects/object_hintnuts.xml
index f7da2e8f5c..d3595d85e8 100644
--- a/assets/xml/objects/object_hintnuts.xml
+++ b/assets/xml/objects/object_hintnuts.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/assets/xml/objects/object_hni.xml b/assets/xml/objects/object_hni.xml
index 6b317eb7a6..763f6892c0 100644
--- a/assets/xml/objects/object_hni.xml
+++ b/assets/xml/objects/object_hni.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/assets/xml/objects/object_ik.xml b/assets/xml/objects/object_ik.xml
index 5d86e1075a..50f47e9d7c 100644
--- a/assets/xml/objects/object_ik.xml
+++ b/assets/xml/objects/object_ik.xml
@@ -1,8 +1,8 @@
-
-
-
+
+
+
@@ -29,7 +29,10 @@
+
+
+
diff --git a/assets/xml/objects/object_jya_obj.xml b/assets/xml/objects/object_jya_obj.xml
index 4a203b0b92..50c2700db1 100644
--- a/assets/xml/objects/object_jya_obj.xml
+++ b/assets/xml/objects/object_jya_obj.xml
@@ -29,7 +29,7 @@
-
+
@@ -59,10 +59,10 @@
-
+
-
-
+
+
diff --git a/assets/xml/objects/object_kanban.xml b/assets/xml/objects/object_kanban.xml
index 9ffc7a2ceb..b989d3572a 100644
--- a/assets/xml/objects/object_kanban.xml
+++ b/assets/xml/objects/object_kanban.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_kingdodongo.xml b/assets/xml/objects/object_kingdodongo.xml
index 32c28766b2..3ada2822c9 100644
--- a/assets/xml/objects/object_kingdodongo.xml
+++ b/assets/xml/objects/object_kingdodongo.xml
@@ -101,7 +101,15 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_kingdodongo_pal.xml b/assets/xml/objects/object_kingdodongo_pal.xml
index 1aa1735cbe..a0790a6db5 100644
--- a/assets/xml/objects/object_kingdodongo_pal.xml
+++ b/assets/xml/objects/object_kingdodongo_pal.xml
@@ -101,7 +101,15 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_kusa.xml b/assets/xml/objects/object_kusa.xml
index 67291a5543..5eaaa99c58 100644
--- a/assets/xml/objects/object_kusa.xml
+++ b/assets/xml/objects/object_kusa.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_lightbox.xml b/assets/xml/objects/object_lightbox.xml
index 552a79d7c7..c67059b89d 100644
--- a/assets/xml/objects/object_lightbox.xml
+++ b/assets/xml/objects/object_lightbox.xml
@@ -1,12 +1,11 @@
-
-
-
+
+
-
+
-
+
diff --git a/assets/xml/objects/object_link_boy.xml b/assets/xml/objects/object_link_boy.xml
index c5e11f54ce..83dd1dfbcc 100644
--- a/assets/xml/objects/object_link_boy.xml
+++ b/assets/xml/objects/object_link_boy.xml
@@ -1,130 +1,352 @@
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -153,25 +375,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -191,25 +461,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_link_child.xml b/assets/xml/objects/object_link_child.xml
index 640228441a..9e1c1e5733 100644
--- a/assets/xml/objects/object_link_child.xml
+++ b/assets/xml/objects/object_link_child.xml
@@ -1,130 +1,380 @@
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
@@ -175,11 +425,13 @@
+
+
+
-
diff --git a/assets/xml/objects/object_mag_ique.xml b/assets/xml/objects/object_mag_ique.xml
new file mode 100644
index 0000000000..005fc2462d
--- /dev/null
+++ b/assets/xml/objects/object_mag_ique.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_md.xml b/assets/xml/objects/object_md.xml
index 717443537a..45527ca1b9 100644
--- a/assets/xml/objects/object_md.xml
+++ b/assets/xml/objects/object_md.xml
@@ -71,17 +71,17 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/assets/xml/objects/object_medal.xml b/assets/xml/objects/object_medal.xml
index 533872a551..94976bd3f9 100644
--- a/assets/xml/objects/object_medal.xml
+++ b/assets/xml/objects/object_medal.xml
@@ -1,4 +1,5 @@
+
@@ -6,7 +7,7 @@
-
+
diff --git a/assets/xml/objects/object_mo.xml b/assets/xml/objects/object_mo.xml
index 68035c3844..ad84a14026 100644
--- a/assets/xml/objects/object_mo.xml
+++ b/assets/xml/objects/object_mo.xml
@@ -74,9 +74,5 @@
-
-
-
-
diff --git a/assets/xml/objects/object_mo_pal.xml b/assets/xml/objects/object_mo_pal.xml
index b191e8395e..17cd4fc2f4 100644
--- a/assets/xml/objects/object_mo_pal.xml
+++ b/assets/xml/objects/object_mo_pal.xml
@@ -74,9 +74,5 @@
-
-
-
-
diff --git a/assets/xml/objects/object_mori_hineri1.xml b/assets/xml/objects/object_mori_hineri1.xml
index a2033a6f97..572eb6e1f3 100644
--- a/assets/xml/objects/object_mori_hineri1.xml
+++ b/assets/xml/objects/object_mori_hineri1.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_mori_hineri1a.xml b/assets/xml/objects/object_mori_hineri1a.xml
index d7e3489044..23e6f5e665 100644
--- a/assets/xml/objects/object_mori_hineri1a.xml
+++ b/assets/xml/objects/object_mori_hineri1a.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_mori_hineri2.xml b/assets/xml/objects/object_mori_hineri2.xml
index 9f1c892afb..d539cd86f0 100644
--- a/assets/xml/objects/object_mori_hineri2.xml
+++ b/assets/xml/objects/object_mori_hineri2.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_mori_hineri2a.xml b/assets/xml/objects/object_mori_hineri2a.xml
index 6fd6818562..0334488567 100644
--- a/assets/xml/objects/object_mori_hineri2a.xml
+++ b/assets/xml/objects/object_mori_hineri2a.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_mori_objects.xml b/assets/xml/objects/object_mori_objects.xml
index aa24a38d70..1844cf6f69 100644
--- a/assets/xml/objects/object_mori_objects.xml
+++ b/assets/xml/objects/object_mori_objects.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_mori_tex.xml b/assets/xml/objects/object_mori_tex.xml
index 79f1f0b4c0..756347bcc6 100644
--- a/assets/xml/objects/object_mori_tex.xml
+++ b/assets/xml/objects/object_mori_tex.xml
@@ -1,12 +1,12 @@
-
+
-
+
diff --git a/assets/xml/objects/object_nwc.xml b/assets/xml/objects/object_nwc.xml
index 96ffa32383..abe2be092b 100644
--- a/assets/xml/objects/object_nwc.xml
+++ b/assets/xml/objects/object_nwc.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_ny.xml b/assets/xml/objects/object_ny.xml
index e2e8187ff8..c81d66ab56 100644
--- a/assets/xml/objects/object_ny.xml
+++ b/assets/xml/objects/object_ny.xml
@@ -1,10 +1,11 @@
+
-
-
+
+
diff --git a/assets/xml/objects/object_oA3.xml b/assets/xml/objects/object_oA3.xml
index a492bd8751..176ad09315 100644
--- a/assets/xml/objects/object_oA3.xml
+++ b/assets/xml/objects/object_oA3.xml
@@ -1,7 +1,6 @@
-
-
+
diff --git a/assets/xml/objects/object_oE1.xml b/assets/xml/objects/object_oE1.xml
index 4d5b1663fe..5b3234893e 100644
--- a/assets/xml/objects/object_oE1.xml
+++ b/assets/xml/objects/object_oE1.xml
@@ -56,7 +56,8 @@
-
+
+
diff --git a/assets/xml/objects/object_oE11.xml b/assets/xml/objects/object_oE11.xml
index 04f6f186da..26ff739cd0 100644
--- a/assets/xml/objects/object_oE11.xml
+++ b/assets/xml/objects/object_oE11.xml
@@ -3,7 +3,8 @@
-
+
+
diff --git a/assets/xml/objects/object_oE12.xml b/assets/xml/objects/object_oE12.xml
index a5fa39fd25..4b89954e0d 100644
--- a/assets/xml/objects/object_oE12.xml
+++ b/assets/xml/objects/object_oE12.xml
@@ -3,7 +3,8 @@
-
+
+
diff --git a/assets/xml/objects/object_oE2.xml b/assets/xml/objects/object_oE2.xml
index af62ad6d11..ea3ba91fc6 100644
--- a/assets/xml/objects/object_oE2.xml
+++ b/assets/xml/objects/object_oE2.xml
@@ -56,7 +56,8 @@
-
+
+
diff --git a/assets/xml/objects/object_oE3.xml b/assets/xml/objects/object_oE3.xml
index 95227da384..4a6cb3d926 100644
--- a/assets/xml/objects/object_oE3.xml
+++ b/assets/xml/objects/object_oE3.xml
@@ -56,13 +56,14 @@
-
+
+
-
+
-
+
diff --git a/assets/xml/objects/object_oE5.xml b/assets/xml/objects/object_oE5.xml
index 040fb8d733..c05917dc9a 100644
--- a/assets/xml/objects/object_oE5.xml
+++ b/assets/xml/objects/object_oE5.xml
@@ -52,9 +52,9 @@
-
-
-
+
+
+
diff --git a/assets/xml/objects/object_oE6.xml b/assets/xml/objects/object_oE6.xml
index 95bb602b6b..d253130af1 100644
--- a/assets/xml/objects/object_oE6.xml
+++ b/assets/xml/objects/object_oE6.xml
@@ -3,7 +3,8 @@
-
+
+
diff --git a/assets/xml/objects/object_oE7.xml b/assets/xml/objects/object_oE7.xml
index b3e588d4c2..2b6b5cf316 100644
--- a/assets/xml/objects/object_oE7.xml
+++ b/assets/xml/objects/object_oE7.xml
@@ -7,7 +7,8 @@
-
+
+
diff --git a/assets/xml/objects/object_oE8.xml b/assets/xml/objects/object_oE8.xml
index be5de24947..8b1333fa9c 100644
--- a/assets/xml/objects/object_oE8.xml
+++ b/assets/xml/objects/object_oE8.xml
@@ -3,7 +3,8 @@
-
+
+
diff --git a/assets/xml/objects/object_oE9.xml b/assets/xml/objects/object_oE9.xml
index 8ea7ee18c7..e43cee426b 100644
--- a/assets/xml/objects/object_oE9.xml
+++ b/assets/xml/objects/object_oE9.xml
@@ -3,7 +3,8 @@
-
+
+
diff --git a/assets/xml/objects/object_ossan.xml b/assets/xml/objects/object_ossan.xml
index 963053f3f4..7e51c33bce 100644
--- a/assets/xml/objects/object_ossan.xml
+++ b/assets/xml/objects/object_ossan.xml
@@ -1,6 +1,9 @@
+
+
+
diff --git a/assets/xml/objects/object_owl.xml b/assets/xml/objects/object_owl.xml
index 24be378985..4ea2006678 100644
--- a/assets/xml/objects/object_owl.xml
+++ b/assets/xml/objects/object_owl.xml
@@ -61,7 +61,7 @@
-
+
diff --git a/assets/xml/objects/object_po_composer.xml b/assets/xml/objects/object_po_composer.xml
index 2ab8d64d85..17c04fd18b 100644
--- a/assets/xml/objects/object_po_composer.xml
+++ b/assets/xml/objects/object_po_composer.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_po_field.xml b/assets/xml/objects/object_po_field.xml
index 10b402e2c7..43e1066e3b 100644
--- a/assets/xml/objects/object_po_field.xml
+++ b/assets/xml/objects/object_po_field.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_poh.xml b/assets/xml/objects/object_poh.xml
index 009d0fca3f..33517945e8 100644
--- a/assets/xml/objects/object_poh.xml
+++ b/assets/xml/objects/object_poh.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_ps.xml b/assets/xml/objects/object_ps.xml
index 043e232d64..98f548db1b 100644
--- a/assets/xml/objects/object_ps.xml
+++ b/assets/xml/objects/object_ps.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_rl.xml b/assets/xml/objects/object_rl.xml
index bbe0246ac8..8453935b1f 100644
--- a/assets/xml/objects/object_rl.xml
+++ b/assets/xml/objects/object_rl.xml
@@ -12,8 +12,6 @@
-
-
@@ -22,13 +20,12 @@
-
-
+
diff --git a/assets/xml/objects/object_sa.xml b/assets/xml/objects/object_sa.xml
index 8a63840409..e87cd793dd 100644
--- a/assets/xml/objects/object_sa.xml
+++ b/assets/xml/objects/object_sa.xml
@@ -66,7 +66,7 @@
-
+
diff --git a/assets/xml/objects/object_sb.xml b/assets/xml/objects/object_sb.xml
index 64d3bb005a..57a0f7f8f7 100644
--- a/assets/xml/objects/object_sb.xml
+++ b/assets/xml/objects/object_sb.xml
@@ -1,11 +1,13 @@
+
-
-
+
+
+
diff --git a/assets/xml/objects/object_siofuki.xml b/assets/xml/objects/object_siofuki.xml
index a23240a728..f8a9e50d83 100644
--- a/assets/xml/objects/object_siofuki.xml
+++ b/assets/xml/objects/object_siofuki.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_skb.xml b/assets/xml/objects/object_skb.xml
index 5b5efb4848..1220ddf6d9 100644
--- a/assets/xml/objects/object_skb.xml
+++ b/assets/xml/objects/object_skb.xml
@@ -55,10 +55,15 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_skj.xml b/assets/xml/objects/object_skj.xml
index 38636256fe..958301d2e8 100644
--- a/assets/xml/objects/object_skj.xml
+++ b/assets/xml/objects/object_skj.xml
@@ -41,27 +41,25 @@
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
diff --git a/assets/xml/objects/object_spot02_objects.xml b/assets/xml/objects/object_spot02_objects.xml
index 65f45ff515..3dfaf227d3 100644
--- a/assets/xml/objects/object_spot02_objects.xml
+++ b/assets/xml/objects/object_spot02_objects.xml
@@ -3,7 +3,6 @@
-
diff --git a/assets/xml/objects/object_spot17_obj.xml b/assets/xml/objects/object_spot17_obj.xml
index d4239d8d28..73a4ca5203 100644
--- a/assets/xml/objects/object_spot17_obj.xml
+++ b/assets/xml/objects/object_spot17_obj.xml
@@ -7,6 +7,6 @@
-
+
diff --git a/assets/xml/objects/object_sst.xml b/assets/xml/objects/object_sst.xml
index c142c50f43..66cf6c8e02 100644
--- a/assets/xml/objects/object_sst.xml
+++ b/assets/xml/objects/object_sst.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_sst_pal.xml b/assets/xml/objects/object_sst_pal.xml
index 9a9199b58f..138a320324 100644
--- a/assets/xml/objects/object_sst_pal.xml
+++ b/assets/xml/objects/object_sst_pal.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_st.xml b/assets/xml/objects/object_st.xml
index 983b9e2eab..e374b4cb4a 100644
--- a/assets/xml/objects/object_st.xml
+++ b/assets/xml/objects/object_st.xml
@@ -1,4 +1,5 @@
+
@@ -22,7 +23,9 @@
-
+
+
+
diff --git a/assets/xml/objects/object_stream.xml b/assets/xml/objects/object_stream.xml
index 59b0838e47..6c65f77c34 100644
--- a/assets/xml/objects/object_stream.xml
+++ b/assets/xml/objects/object_stream.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_syokudai.xml b/assets/xml/objects/object_syokudai.xml
index 11af7e9a3a..6434d923a5 100644
--- a/assets/xml/objects/object_syokudai.xml
+++ b/assets/xml/objects/object_syokudai.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/assets/xml/objects/object_ta.xml b/assets/xml/objects/object_ta.xml
index 5e446bf5c9..4f339fc951 100644
--- a/assets/xml/objects/object_ta.xml
+++ b/assets/xml/objects/object_ta.xml
@@ -66,7 +66,6 @@
-
-
+
diff --git a/assets/xml/objects/object_tk.xml b/assets/xml/objects/object_tk.xml
index 5b2fd13806..5c9d0a0a6f 100644
--- a/assets/xml/objects/object_tk.xml
+++ b/assets/xml/objects/object_tk.xml
@@ -4,10 +4,12 @@
+
-
+
+
diff --git a/assets/xml/objects/object_toki_objects.xml b/assets/xml/objects/object_toki_objects.xml
index cd07e60d2b..917d239347 100644
--- a/assets/xml/objects/object_toki_objects.xml
+++ b/assets/xml/objects/object_toki_objects.xml
@@ -1,4 +1,5 @@
+
@@ -12,7 +13,8 @@
-
+
+
diff --git a/assets/xml/objects/object_tr.xml b/assets/xml/objects/object_tr.xml
index 986a88cc5c..827b85bfe6 100644
--- a/assets/xml/objects/object_tr.xml
+++ b/assets/xml/objects/object_tr.xml
@@ -9,7 +9,9 @@
-
+
+
+
@@ -97,7 +99,9 @@
-
+
+
+
diff --git a/assets/xml/objects/object_trap.xml b/assets/xml/objects/object_trap.xml
index 56195cf41b..1f8f4b5310 100644
--- a/assets/xml/objects/object_trap.xml
+++ b/assets/xml/objects/object_trap.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_tw.xml b/assets/xml/objects/object_tw.xml
index c6b9ec6099..c528fb4518 100644
--- a/assets/xml/objects/object_tw.xml
+++ b/assets/xml/objects/object_tw.xml
@@ -106,9 +106,11 @@
-
-
+
+
+
+
@@ -130,9 +132,11 @@
-
-
+
+
+
+
diff --git a/assets/xml/objects/object_wf.xml b/assets/xml/objects/object_wf.xml
index 96ea841032..d5d70639d7 100644
--- a/assets/xml/objects/object_wf.xml
+++ b/assets/xml/objects/object_wf.xml
@@ -122,6 +122,7 @@
+
diff --git a/assets/xml/objects/object_wood02.xml b/assets/xml/objects/object_wood02.xml
index 5dd80a17b6..dcf6d21291 100644
--- a/assets/xml/objects/object_wood02.xml
+++ b/assets/xml/objects/object_wood02.xml
@@ -1,5 +1,5 @@
-
+
@@ -20,7 +20,7 @@
-
+
diff --git a/assets/xml/objects/object_ydan_objects.xml b/assets/xml/objects/object_ydan_objects.xml
index baf7ca4c9c..70174a1e70 100644
--- a/assets/xml/objects/object_ydan_objects.xml
+++ b/assets/xml/objects/object_ydan_objects.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/objects/object_zf.xml b/assets/xml/objects/object_zf.xml
index 7f20eb7866..74e9d45915 100644
--- a/assets/xml/objects/object_zf.xml
+++ b/assets/xml/objects/object_zf.xml
@@ -1,4 +1,5 @@
+
@@ -109,7 +110,7 @@
-
+
diff --git a/assets/xml/objects/object_zl2.xml b/assets/xml/objects/object_zl2.xml
index 9af0a65270..2503b811d3 100644
--- a/assets/xml/objects/object_zl2.xml
+++ b/assets/xml/objects/object_zl2.xml
@@ -38,5 +38,7 @@
+
+
diff --git a/assets/xml/objects/object_zl4.xml b/assets/xml/objects/object_zl4.xml
index e87a654656..99cc12ea2a 100644
--- a/assets/xml/objects/object_zl4.xml
+++ b/assets/xml/objects/object_zl4.xml
@@ -39,19 +39,21 @@
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_zo.xml b/assets/xml/objects/object_zo.xml
index 77465760ef..8872cc4c9f 100644
--- a/assets/xml/objects/object_zo.xml
+++ b/assets/xml/objects/object_zo.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/overlays/ovl_Boss_Ganon.xml b/assets/xml/overlays/ovl_Boss_Ganon.xml
index a6ed9c66eb..d09648d8d7 100644
--- a/assets/xml/overlays/ovl_Boss_Ganon.xml
+++ b/assets/xml/overlays/ovl_Boss_Ganon.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/overlays/ovl_Boss_Ganon2.xml b/assets/xml/overlays/ovl_Boss_Ganon2.xml
index 07b11108cc..b922003dfa 100644
--- a/assets/xml/overlays/ovl_Boss_Ganon2.xml
+++ b/assets/xml/overlays/ovl_Boss_Ganon2.xml
@@ -1,28 +1,29 @@
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/overlays/ovl_En_Jsjutan.xml b/assets/xml/overlays/ovl_En_Jsjutan.xml
index b3b012b1f5..13bbd82199 100644
--- a/assets/xml/overlays/ovl_En_Jsjutan.xml
+++ b/assets/xml/overlays/ovl_En_Jsjutan.xml
@@ -16,9 +16,6 @@
-
-
-
diff --git a/assets/xml/overlays/ovl_En_Mag_ique.xml b/assets/xml/overlays/ovl_En_Mag_ique.xml
new file mode 100644
index 0000000000..bd239b7f0c
--- /dev/null
+++ b/assets/xml/overlays/ovl_En_Mag_ique.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/assets/xml/overlays/ovl_End_Title_ique.xml b/assets/xml/overlays/ovl_End_Title_ique.xml
new file mode 100644
index 0000000000..300448cabf
--- /dev/null
+++ b/assets/xml/overlays/ovl_End_Title_ique.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/overlays/ovl_Magic_Dark.xml b/assets/xml/overlays/ovl_Magic_Dark.xml
index 965d140db4..37165cebc2 100644
--- a/assets/xml/overlays/ovl_Magic_Dark.xml
+++ b/assets/xml/overlays/ovl_Magic_Dark.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/overlays/ovl_Oceff_Storm.xml b/assets/xml/overlays/ovl_Oceff_Storm.xml
index 385f56dbff..d9e1f7e65a 100644
--- a/assets/xml/overlays/ovl_Oceff_Storm.xml
+++ b/assets/xml/overlays/ovl_Oceff_Storm.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/overlays/ovl_Oceff_Wipe4.xml b/assets/xml/overlays/ovl_Oceff_Wipe4.xml
index 6446beedb2..a4ec2c5def 100644
--- a/assets/xml/overlays/ovl_Oceff_Wipe4.xml
+++ b/assets/xml/overlays/ovl_Oceff_Wipe4.xml
@@ -1,4 +1,5 @@
+
diff --git a/assets/xml/overlays/ovl_file_choose_pal.xml b/assets/xml/overlays/ovl_file_choose_pal_gc.xml
similarity index 100%
rename from assets/xml/overlays/ovl_file_choose_pal.xml
rename to assets/xml/overlays/ovl_file_choose_pal_gc.xml
diff --git a/assets/xml/overlays/ovl_file_choose_pal_n64.xml b/assets/xml/overlays/ovl_file_choose_pal_n64.xml
new file mode 100644
index 0000000000..282fad0c37
--- /dev/null
+++ b/assets/xml/overlays/ovl_file_choose_pal_n64.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/dungeons/MIZUsin.xml b/assets/xml/scenes/dungeons/MIZUsin.xml
index e48f534d88..12a124cf09 100644
--- a/assets/xml/scenes/dungeons/MIZUsin.xml
+++ b/assets/xml/scenes/dungeons/MIZUsin.xml
@@ -7,6 +7,7 @@
+
diff --git a/assets/xml/scenes/dungeons/MIZUsin_mq.xml b/assets/xml/scenes/dungeons/MIZUsin_mq.xml
index bd0e260ace..cbbe48287e 100644
--- a/assets/xml/scenes/dungeons/MIZUsin_mq.xml
+++ b/assets/xml/scenes/dungeons/MIZUsin_mq.xml
@@ -7,6 +7,7 @@
+
diff --git a/assets/xml/scenes/dungeons/bdan.xml b/assets/xml/scenes/dungeons/bdan.xml
index c4edc9bea4..ceee898fb5 100644
--- a/assets/xml/scenes/dungeons/bdan.xml
+++ b/assets/xml/scenes/dungeons/bdan.xml
@@ -1,6 +1,7 @@
-
+
+
diff --git a/assets/xml/scenes/dungeons/bdan_mq.xml b/assets/xml/scenes/dungeons/bdan_mq.xml
index 0aee687a80..8f73efde9b 100644
--- a/assets/xml/scenes/dungeons/bdan_mq.xml
+++ b/assets/xml/scenes/dungeons/bdan_mq.xml
@@ -1,6 +1,7 @@
-
+
+
diff --git a/assets/xml/scenes/dungeons/ddan.xml b/assets/xml/scenes/dungeons/ddan.xml
index a42e97cfc9..295f651739 100644
--- a/assets/xml/scenes/dungeons/ddan.xml
+++ b/assets/xml/scenes/dungeons/ddan.xml
@@ -1,5 +1,6 @@
+
@@ -18,6 +19,7 @@
+
diff --git a/assets/xml/scenes/dungeons/ddan_boss.xml b/assets/xml/scenes/dungeons/ddan_boss.xml
index 2b61024906..86a34e6d9a 100644
--- a/assets/xml/scenes/dungeons/ddan_boss.xml
+++ b/assets/xml/scenes/dungeons/ddan_boss.xml
@@ -6,7 +6,7 @@
-
+
diff --git a/assets/xml/scenes/dungeons/ddan_boss_v2.xml b/assets/xml/scenes/dungeons/ddan_boss_v2.xml
new file mode 100644
index 0000000000..2b61024906
--- /dev/null
+++ b/assets/xml/scenes/dungeons/ddan_boss_v2.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/dungeons/ddan_mq.xml b/assets/xml/scenes/dungeons/ddan_mq.xml
index a42e97cfc9..295f651739 100644
--- a/assets/xml/scenes/dungeons/ddan_mq.xml
+++ b/assets/xml/scenes/dungeons/ddan_mq.xml
@@ -1,5 +1,6 @@
+
@@ -18,6 +19,7 @@
+
diff --git a/assets/xml/scenes/dungeons/ganon_boss.xml b/assets/xml/scenes/dungeons/ganon_boss.xml
index c75914c29c..7c28b472d6 100644
--- a/assets/xml/scenes/dungeons/ganon_boss.xml
+++ b/assets/xml/scenes/dungeons/ganon_boss.xml
@@ -1,6 +1,9 @@
+
+
+
diff --git a/assets/xml/scenes/dungeons/ganon_demo.xml b/assets/xml/scenes/dungeons/ganon_demo.xml
index 779cb9335a..d1a41b6c43 100644
--- a/assets/xml/scenes/dungeons/ganon_demo.xml
+++ b/assets/xml/scenes/dungeons/ganon_demo.xml
@@ -1,6 +1,7 @@
+
diff --git a/assets/xml/scenes/dungeons/ice_doukutu.xml b/assets/xml/scenes/dungeons/ice_doukutu.xml
index 4d25aa74f4..f816d7ca24 100644
--- a/assets/xml/scenes/dungeons/ice_doukutu.xml
+++ b/assets/xml/scenes/dungeons/ice_doukutu.xml
@@ -1,8 +1,8 @@
-
-
+
+
diff --git a/assets/xml/scenes/dungeons/ice_doukutu_pal_n64.xml b/assets/xml/scenes/dungeons/ice_doukutu_pal_n64.xml
new file mode 100644
index 0000000000..9f08f559ed
--- /dev/null
+++ b/assets/xml/scenes/dungeons/ice_doukutu_pal_n64.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/dungeons/ice_doukutu_v2.xml b/assets/xml/scenes/dungeons/ice_doukutu_v2.xml
new file mode 100644
index 0000000000..4d25aa74f4
--- /dev/null
+++ b/assets/xml/scenes/dungeons/ice_doukutu_v2.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/dungeons/jyasinboss.xml b/assets/xml/scenes/dungeons/jyasinboss.xml
index 0f81c26fbc..28abd03612 100644
--- a/assets/xml/scenes/dungeons/jyasinboss.xml
+++ b/assets/xml/scenes/dungeons/jyasinboss.xml
@@ -2,6 +2,7 @@
+
diff --git a/assets/xml/scenes/dungeons/jyasinzou.xml b/assets/xml/scenes/dungeons/jyasinzou.xml
index 07f7944f9b..1a44e14d72 100644
--- a/assets/xml/scenes/dungeons/jyasinzou.xml
+++ b/assets/xml/scenes/dungeons/jyasinzou.xml
@@ -6,6 +6,10 @@
+
+
+
+
diff --git a/assets/xml/scenes/dungeons/jyasinzou_mq.xml b/assets/xml/scenes/dungeons/jyasinzou_mq.xml
index 5614bc8936..6a99888abb 100644
--- a/assets/xml/scenes/dungeons/jyasinzou_mq.xml
+++ b/assets/xml/scenes/dungeons/jyasinzou_mq.xml
@@ -6,6 +6,10 @@
+
+
+
+
diff --git a/assets/xml/scenes/dungeons/ydan.xml b/assets/xml/scenes/dungeons/ydan.xml
index 465c5f0ca8..434f40a982 100644
--- a/assets/xml/scenes/dungeons/ydan.xml
+++ b/assets/xml/scenes/dungeons/ydan.xml
@@ -1,8 +1,8 @@
-
-
+
+
diff --git a/assets/xml/scenes/dungeons/ydan_mq.xml b/assets/xml/scenes/dungeons/ydan_mq.xml
index c0a47d6dae..f982489d35 100644
--- a/assets/xml/scenes/dungeons/ydan_mq.xml
+++ b/assets/xml/scenes/dungeons/ydan_mq.xml
@@ -1,8 +1,8 @@
-
-
+
+
diff --git a/assets/xml/scenes/indoors/kenjyanoma.xml b/assets/xml/scenes/indoors/kenjyanoma.xml
index e6bcef90a0..7252a5a2c3 100644
--- a/assets/xml/scenes/indoors/kenjyanoma.xml
+++ b/assets/xml/scenes/indoors/kenjyanoma.xml
@@ -1,6 +1,9 @@
+
+
+
diff --git a/assets/xml/scenes/indoors/link_home.xml b/assets/xml/scenes/indoors/link_home.xml
index 2fb88ae347..7eabae43f3 100644
--- a/assets/xml/scenes/indoors/link_home.xml
+++ b/assets/xml/scenes/indoors/link_home.xml
@@ -1,6 +1,8 @@
+
+
diff --git a/assets/xml/scenes/indoors/nakaniwa.xml b/assets/xml/scenes/indoors/nakaniwa.xml
index 49ff4a29cb..d606bdc335 100644
--- a/assets/xml/scenes/indoors/nakaniwa.xml
+++ b/assets/xml/scenes/indoors/nakaniwa.xml
@@ -4,6 +4,8 @@
+
+
diff --git a/assets/xml/scenes/indoors/syatekijyou.xml b/assets/xml/scenes/indoors/syatekijyou.xml
index 5490e84f13..78ce084bb7 100644
--- a/assets/xml/scenes/indoors/syatekijyou.xml
+++ b/assets/xml/scenes/indoors/syatekijyou.xml
@@ -1,6 +1,9 @@
+
+
+
diff --git a/assets/xml/scenes/indoors/tokinoma.xml b/assets/xml/scenes/indoors/tokinoma.xml
index e43f0a9339..fb62d9c2cc 100644
--- a/assets/xml/scenes/indoors/tokinoma.xml
+++ b/assets/xml/scenes/indoors/tokinoma.xml
@@ -1,8 +1,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/indoors/tokinoma_pal_n64.xml b/assets/xml/scenes/indoors/tokinoma_pal_n64.xml
new file mode 100644
index 0000000000..9c0a970998
--- /dev/null
+++ b/assets/xml/scenes/indoors/tokinoma_pal_n64.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/misc/hiral_demo.xml b/assets/xml/scenes/misc/hiral_demo.xml
index 32c55fac4b..47cf353d4c 100644
--- a/assets/xml/scenes/misc/hiral_demo.xml
+++ b/assets/xml/scenes/misc/hiral_demo.xml
@@ -4,6 +4,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/misc/hiral_demo_pal_n64.xml b/assets/xml/scenes/misc/hiral_demo_pal_n64.xml
new file mode 100644
index 0000000000..26c0287300
--- /dev/null
+++ b/assets/xml/scenes/misc/hiral_demo_pal_n64.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot00.xml b/assets/xml/scenes/overworld/spot00.xml
index 0ffdc18871..dd78fc86ab 100644
--- a/assets/xml/scenes/overworld/spot00.xml
+++ b/assets/xml/scenes/overworld/spot00.xml
@@ -7,6 +7,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot00_pal_n64.xml b/assets/xml/scenes/overworld/spot00_pal_n64.xml
new file mode 100644
index 0000000000..d1641fe360
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot00_pal_n64.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot01.xml b/assets/xml/scenes/overworld/spot01.xml
index 4a57964115..0074733cc4 100644
--- a/assets/xml/scenes/overworld/spot01.xml
+++ b/assets/xml/scenes/overworld/spot01.xml
@@ -2,12 +2,16 @@
+
+
+
+
+
-
diff --git a/assets/xml/scenes/overworld/spot01_pal_n64.xml b/assets/xml/scenes/overworld/spot01_pal_n64.xml
new file mode 100644
index 0000000000..8b2651c1ff
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot01_pal_n64.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot02.xml b/assets/xml/scenes/overworld/spot02.xml
index 334d0e5991..23037c742b 100644
--- a/assets/xml/scenes/overworld/spot02.xml
+++ b/assets/xml/scenes/overworld/spot02.xml
@@ -2,13 +2,12 @@
-
-
-
+
+
+
-
diff --git a/assets/xml/scenes/overworld/spot04.xml b/assets/xml/scenes/overworld/spot04.xml
index 3cfc140950..5a3e3079fc 100644
--- a/assets/xml/scenes/overworld/spot04.xml
+++ b/assets/xml/scenes/overworld/spot04.xml
@@ -2,8 +2,20 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -14,8 +26,6 @@
-
-
diff --git a/assets/xml/scenes/overworld/spot04_pal_n64.xml b/assets/xml/scenes/overworld/spot04_pal_n64.xml
new file mode 100644
index 0000000000..c9054cca4e
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot04_pal_n64.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot05.xml b/assets/xml/scenes/overworld/spot05.xml
index b799f21d1e..53ee4a5125 100644
--- a/assets/xml/scenes/overworld/spot05.xml
+++ b/assets/xml/scenes/overworld/spot05.xml
@@ -1,8 +1,7 @@
-
-
-
+
+
diff --git a/assets/xml/scenes/overworld/spot05_pal_n64.xml b/assets/xml/scenes/overworld/spot05_pal_n64.xml
new file mode 100644
index 0000000000..eba27fbc44
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot05_pal_n64.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot06.xml b/assets/xml/scenes/overworld/spot06.xml
index 0c5ccea251..77226b2ce5 100644
--- a/assets/xml/scenes/overworld/spot06.xml
+++ b/assets/xml/scenes/overworld/spot06.xml
@@ -2,8 +2,11 @@
-
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot06_pal_n64.xml b/assets/xml/scenes/overworld/spot06_pal_n64.xml
new file mode 100644
index 0000000000..df16711d4e
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot06_pal_n64.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot07.xml b/assets/xml/scenes/overworld/spot07.xml
index 9b9b5ac667..857cab9f01 100644
--- a/assets/xml/scenes/overworld/spot07.xml
+++ b/assets/xml/scenes/overworld/spot07.xml
@@ -1,6 +1,7 @@
+
diff --git a/assets/xml/scenes/overworld/spot07_pal_n64.xml b/assets/xml/scenes/overworld/spot07_pal_n64.xml
new file mode 100644
index 0000000000..f856e54438
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot07_pal_n64.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot08.xml b/assets/xml/scenes/overworld/spot08.xml
index 136727c6d3..1ec02bc693 100644
--- a/assets/xml/scenes/overworld/spot08.xml
+++ b/assets/xml/scenes/overworld/spot08.xml
@@ -1,6 +1,9 @@
+
+
+
diff --git a/assets/xml/scenes/overworld/spot09.xml b/assets/xml/scenes/overworld/spot09.xml
index a447c9df44..641ab8b7aa 100644
--- a/assets/xml/scenes/overworld/spot09.xml
+++ b/assets/xml/scenes/overworld/spot09.xml
@@ -3,14 +3,15 @@
+
+
+
+
-
-
-
diff --git a/assets/xml/scenes/overworld/spot09_pal_n64.xml b/assets/xml/scenes/overworld/spot09_pal_n64.xml
new file mode 100644
index 0000000000..7bb06c8a8f
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot09_pal_n64.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot10.xml b/assets/xml/scenes/overworld/spot10.xml
index 58080b9c0c..b8c77cc2af 100644
--- a/assets/xml/scenes/overworld/spot10.xml
+++ b/assets/xml/scenes/overworld/spot10.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/assets/xml/scenes/overworld/spot11.xml b/assets/xml/scenes/overworld/spot11.xml
index 99bf24c829..96677d60fd 100644
--- a/assets/xml/scenes/overworld/spot11.xml
+++ b/assets/xml/scenes/overworld/spot11.xml
@@ -1,6 +1,8 @@
+
+
diff --git a/assets/xml/scenes/overworld/spot11_pal_n64.xml b/assets/xml/scenes/overworld/spot11_pal_n64.xml
new file mode 100644
index 0000000000..67b662bfb5
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot11_pal_n64.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot12.xml b/assets/xml/scenes/overworld/spot12.xml
index 77b0cfb076..e4b38cbe88 100644
--- a/assets/xml/scenes/overworld/spot12.xml
+++ b/assets/xml/scenes/overworld/spot12.xml
@@ -2,8 +2,10 @@
-
-
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot12_pal_n64.xml b/assets/xml/scenes/overworld/spot12_pal_n64.xml
new file mode 100644
index 0000000000..d1f94eb6b4
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot12_pal_n64.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot16.xml b/assets/xml/scenes/overworld/spot16.xml
index 57a64323b2..6f48610c8b 100644
--- a/assets/xml/scenes/overworld/spot16.xml
+++ b/assets/xml/scenes/overworld/spot16.xml
@@ -2,6 +2,11 @@
+
+
+
+
+
@@ -10,6 +15,6 @@
-
+
diff --git a/assets/xml/scenes/overworld/spot16_pal_n64.xml b/assets/xml/scenes/overworld/spot16_pal_n64.xml
new file mode 100644
index 0000000000..070a8a2d7e
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot16_pal_n64.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot16_v2.xml b/assets/xml/scenes/overworld/spot16_v2.xml
new file mode 100644
index 0000000000..b254e7f983
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot16_v2.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot17.xml b/assets/xml/scenes/overworld/spot17.xml
index 3aecc15a60..926eeb3e10 100644
--- a/assets/xml/scenes/overworld/spot17.xml
+++ b/assets/xml/scenes/overworld/spot17.xml
@@ -2,6 +2,7 @@
+
diff --git a/assets/xml/scenes/overworld/spot17_pal_n64.xml b/assets/xml/scenes/overworld/spot17_pal_n64.xml
new file mode 100644
index 0000000000..046da9144c
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot17_pal_n64.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot18.xml b/assets/xml/scenes/overworld/spot18.xml
index 513e67cbc9..affece84b7 100644
--- a/assets/xml/scenes/overworld/spot18.xml
+++ b/assets/xml/scenes/overworld/spot18.xml
@@ -1,9 +1,14 @@
-
-
-
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot18_pal_n64.xml b/assets/xml/scenes/overworld/spot18_pal_n64.xml
new file mode 100644
index 0000000000..809e099cfc
--- /dev/null
+++ b/assets/xml/scenes/overworld/spot18_pal_n64.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot20.xml b/assets/xml/scenes/overworld/spot20.xml
index 6e09a5de82..d3dd77a41e 100644
--- a/assets/xml/scenes/overworld/spot20.xml
+++ b/assets/xml/scenes/overworld/spot20.xml
@@ -1,6 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/scenes/overworld/spot20_pal.xml b/assets/xml/scenes/overworld/spot20_pal.xml
index cc94f8443c..297b1c316e 100644
--- a/assets/xml/scenes/overworld/spot20_pal.xml
+++ b/assets/xml/scenes/overworld/spot20_pal.xml
@@ -1,6 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/textures/map_48x85_static.xml b/assets/xml/textures/map_48x85_static.xml
index 2788498a84..b8795bd07d 100644
--- a/assets/xml/textures/map_48x85_static.xml
+++ b/assets/xml/textures/map_48x85_static.xml
@@ -1,72 +1,74 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/textures/nes_font_static_ique_cn.xml b/assets/xml/textures/nes_font_static_ique_cn.xml
new file mode 100644
index 0000000000..484707b05d
--- /dev/null
+++ b/assets/xml/textures/nes_font_static_ique_cn.xml
@@ -0,0 +1,1919 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/textures/nintendo_rogo_static.xml b/assets/xml/textures/nintendo_rogo_static.xml
index 7a60524b20..295bbfcfa2 100644
--- a/assets/xml/textures/nintendo_rogo_static.xml
+++ b/assets/xml/textures/nintendo_rogo_static.xml
@@ -3,6 +3,6 @@
-
+
diff --git a/assets/xml/textures/nintendo_rogo_static_v2.xml b/assets/xml/textures/nintendo_rogo_static_v2.xml
new file mode 100644
index 0000000000..7a60524b20
--- /dev/null
+++ b/assets/xml/textures/nintendo_rogo_static_v2.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/assets/xml/textures/parameter_static_ique.xml b/assets/xml/textures/parameter_static_ique.xml
new file mode 100644
index 0000000000..98449e6746
--- /dev/null
+++ b/assets/xml/textures/parameter_static_ique.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/textures/title_static_pal.xml b/assets/xml/textures/title_static_pal_gc.xml
similarity index 100%
rename from assets/xml/textures/title_static_pal.xml
rename to assets/xml/textures/title_static_pal_gc.xml
diff --git a/assets/xml/textures/title_static_pal_n64.xml b/assets/xml/textures/title_static_pal_n64.xml
new file mode 100644
index 0000000000..ad3bf9dbbe
--- /dev/null
+++ b/assets/xml/textures/title_static_pal_n64.xml
@@ -0,0 +1,204 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0x1d480
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/baseroms/gc-eu-mq-dbg/config.yml b/baseroms/gc-eu-mq-dbg/config.yml
index 824e6ed9d5..e457028060 100644
--- a/baseroms/gc-eu-mq-dbg/config.yml
+++ b/baseroms/gc-eu-mq-dbg/config.yml
@@ -1,5 +1,5 @@
dmadata_start: 0x12F70
-text_lang_pal: true
+text_lang: PAL
incbins:
- name: ipl3
segment: makerom
@@ -50,7 +50,7 @@ incbins:
vram: 0x80157D30
size: 0x60
variables:
- gMtxClear: 0x8012DB20
+ gIdentityMtx: 0x8012DB20
sNesMessageEntryTable: 0x8014B320
sGerMessageEntryTable: 0x8014F548
sFraMessageEntryTable: 0x80151658
@@ -64,7 +64,7 @@ assets:
- name: code/fbdemo_circle
xml_path: assets/xml/code/fbdemo_circle.xml
start_offset: 0x10ED48
- end_offset: 0x10FF68
+ end_offset: 0x110038
- name: code/fbdemo_triforce
xml_path: assets/xml/code/fbdemo_triforce.xml
start_offset: 0x10E1D0
@@ -72,7 +72,7 @@ assets:
- name: code/fbdemo_wipe1
xml_path: assets/xml/code/fbdemo_wipe1.xml
start_offset: 0x10E2A0
- end_offset: 0x10EC30
+ end_offset: 0x10ED28
- name: misc/link_animetion
xml_path: assets/xml/misc/link_animetion.xml
- name: misc/z_select_static
@@ -940,7 +940,7 @@ assets:
start_offset: 0x780
end_offset: 0x4128
- name: overlays/ovl_file_choose
- xml_path: assets/xml/overlays/ovl_file_choose_pal.xml
+ xml_path: assets/xml/overlays/ovl_file_choose_pal_gc.xml
start_offset: 0xDE70
end_offset: 0xE740
- name: overlays/ovl_Magic_Dark
@@ -988,7 +988,7 @@ assets:
- 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.xml
+ 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
@@ -1160,7 +1160,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
- xml_path: assets/xml/scenes/overworld/spot16.xml
+ 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
@@ -1236,7 +1236,7 @@ assets:
- 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.xml
+ 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
@@ -1244,4 +1244,4 @@ assets:
- name: textures/skyboxes
xml_path: assets/xml/textures/skyboxes.xml
- name: textures/title_static
- xml_path: assets/xml/textures/title_static_pal.xml
+ xml_path: assets/xml/textures/title_static_pal_gc.xml
diff --git a/baseroms/gc-eu-mq/config.yml b/baseroms/gc-eu-mq/config.yml
index bfab3b5072..0093015d7e 100644
--- a/baseroms/gc-eu-mq/config.yml
+++ b/baseroms/gc-eu-mq/config.yml
@@ -1,5 +1,5 @@
dmadata_start: 0x7170
-text_lang_pal: true
+text_lang: PAL
incbins:
- name: ipl3
segment: makerom
@@ -42,7 +42,7 @@ incbins:
vram: 0x801130D0
size: 0x60
variables:
- gMtxClear: 0x800FBC00
+ gIdentityMtx: 0x800FBC00
sNesMessageEntryTable: 0x801077F0
sGerMessageEntryTable: 0x8010BA18
sFraMessageEntryTable: 0x8010DB28
@@ -56,7 +56,7 @@ assets:
- name: code/fbdemo_circle
xml_path: assets/xml/code/fbdemo_circle.xml
start_offset: 0xE90A8
- end_offset: 0xEA2C8
+ end_offset: 0xEA398
- name: code/fbdemo_triforce
xml_path: assets/xml/code/fbdemo_triforce.xml
start_offset: 0xE8530
@@ -64,7 +64,7 @@ assets:
- name: code/fbdemo_wipe1
xml_path: assets/xml/code/fbdemo_wipe1.xml
start_offset: 0xE8600
- end_offset: 0xE8F90
+ end_offset: 0xE9088
- name: misc/link_animetion
xml_path: assets/xml/misc/link_animetion.xml
- name: misc/z_select_static
@@ -924,7 +924,7 @@ assets:
start_offset: 0x6E0
end_offset: 0x4088
- name: overlays/ovl_file_choose
- xml_path: assets/xml/overlays/ovl_file_choose_pal.xml
+ xml_path: assets/xml/overlays/ovl_file_choose_pal_gc.xml
start_offset: 0xD740
end_offset: 0xE010
- name: overlays/ovl_Magic_Dark
@@ -972,7 +972,7 @@ assets:
- 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.xml
+ 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
@@ -1142,7 +1142,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
- xml_path: assets/xml/scenes/overworld/spot16.xml
+ 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
@@ -1202,7 +1202,7 @@ assets:
- 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.xml
+ 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
@@ -1210,4 +1210,4 @@ assets:
- name: textures/skyboxes
xml_path: assets/xml/textures/skyboxes.xml
- name: textures/title_static
- xml_path: assets/xml/textures/title_static_pal.xml
+ xml_path: assets/xml/textures/title_static_pal_gc.xml
diff --git a/baseroms/gc-eu/config.yml b/baseroms/gc-eu/config.yml
index 7f4840cb7f..9aef9891f9 100644
--- a/baseroms/gc-eu/config.yml
+++ b/baseroms/gc-eu/config.yml
@@ -1,5 +1,5 @@
dmadata_start: 0x7170
-text_lang_pal: true
+text_lang: PAL
incbins:
- name: ipl3
segment: makerom
@@ -42,7 +42,7 @@ incbins:
vram: 0x801130F0
size: 0x60
variables:
- gMtxClear: 0x800FBC20
+ gIdentityMtx: 0x800FBC20
sNesMessageEntryTable: 0x80107810
sGerMessageEntryTable: 0x8010BA38
sFraMessageEntryTable: 0x8010DB48
@@ -56,7 +56,7 @@ assets:
- name: code/fbdemo_circle
xml_path: assets/xml/code/fbdemo_circle.xml
start_offset: 0xE90C8
- end_offset: 0xEA2E8
+ end_offset: 0xEA3B8
- name: code/fbdemo_triforce
xml_path: assets/xml/code/fbdemo_triforce.xml
start_offset: 0xE8550
@@ -64,7 +64,7 @@ assets:
- name: code/fbdemo_wipe1
xml_path: assets/xml/code/fbdemo_wipe1.xml
start_offset: 0xE8620
- end_offset: 0xE8FB0
+ end_offset: 0xE90A8
- name: misc/link_animetion
xml_path: assets/xml/misc/link_animetion.xml
- name: misc/z_select_static
@@ -924,7 +924,7 @@ assets:
start_offset: 0x6E0
end_offset: 0x4088
- name: overlays/ovl_file_choose
- xml_path: assets/xml/overlays/ovl_file_choose_pal.xml
+ xml_path: assets/xml/overlays/ovl_file_choose_pal_gc.xml
start_offset: 0xD740
end_offset: 0xE010
- name: overlays/ovl_Magic_Dark
@@ -972,7 +972,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
- xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
+ 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
@@ -1000,7 +1000,7 @@ assets:
- name: scenes/dungeons/HIDAN
xml_path: assets/xml/scenes/dungeons/HIDAN.xml
- name: scenes/dungeons/ice_doukutu
- xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
+ xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
- name: scenes/dungeons/jyasinboss
xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
- name: scenes/dungeons/jyasinzou
@@ -1142,7 +1142,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
- xml_path: assets/xml/scenes/overworld/spot16.xml
+ 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
@@ -1202,7 +1202,7 @@ assets:
- 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.xml
+ 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
@@ -1210,4 +1210,4 @@ assets:
- name: textures/skyboxes
xml_path: assets/xml/textures/skyboxes.xml
- name: textures/title_static
- xml_path: assets/xml/textures/title_static_pal.xml
+ xml_path: assets/xml/textures/title_static_pal_gc.xml
diff --git a/baseroms/gc-jp-ce/config.yml b/baseroms/gc-jp-ce/config.yml
index 59c57730af..f3c0541a62 100644
--- a/baseroms/gc-jp-ce/config.yml
+++ b/baseroms/gc-jp-ce/config.yml
@@ -1,5 +1,5 @@
dmadata_start: 0x7170
-text_lang_pal: false
+text_lang: NTSC
incbins:
- name: ipl3
segment: makerom
@@ -42,7 +42,7 @@ incbins:
vram: 0x801158E0
size: 0x60
variables:
- gMtxClear: 0x800FE2A0
+ gIdentityMtx: 0x800FE2A0
sJpnMessageEntryTable: 0x80109E8C
sNesMessageEntryTable: 0x8010DFCC
sStaffMessageEntryTable: 0x801121EC
@@ -55,7 +55,7 @@ assets:
- name: code/fbdemo_circle
xml_path: assets/xml/code/fbdemo_circle.xml
start_offset: 0xEB768
- end_offset: 0xEC988
+ end_offset: 0xECA58
- name: code/fbdemo_triforce
xml_path: assets/xml/code/fbdemo_triforce.xml
start_offset: 0xEABF0
@@ -63,7 +63,7 @@ assets:
- name: code/fbdemo_wipe1
xml_path: assets/xml/code/fbdemo_wipe1.xml
start_offset: 0xEACC0
- end_offset: 0xEB650
+ end_offset: 0xEB748
- name: misc/link_animetion
xml_path: assets/xml/misc/link_animetion.xml
- name: misc/z_select_static
@@ -971,7 +971,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
- xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
+ 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
@@ -999,7 +999,7 @@ assets:
- name: scenes/dungeons/HIDAN
xml_path: assets/xml/scenes/dungeons/HIDAN.xml
- name: scenes/dungeons/ice_doukutu
- xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
+ xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
- name: scenes/dungeons/jyasinboss
xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
- name: scenes/dungeons/jyasinzou
@@ -1141,7 +1141,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
- xml_path: assets/xml/scenes/overworld/spot16.xml
+ 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
@@ -1201,7 +1201,7 @@ assets:
- 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.xml
+ 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
diff --git a/baseroms/gc-jp-mq/config.yml b/baseroms/gc-jp-mq/config.yml
index 433e3fe6ad..41d1721f3d 100644
--- a/baseroms/gc-jp-mq/config.yml
+++ b/baseroms/gc-jp-mq/config.yml
@@ -1,5 +1,5 @@
dmadata_start: 0x7170
-text_lang_pal: false
+text_lang: NTSC
incbins:
- name: ipl3
segment: makerom
@@ -42,7 +42,7 @@ incbins:
vram: 0x801158E0
size: 0x60
variables:
- gMtxClear: 0x800FE2A0
+ gIdentityMtx: 0x800FE2A0
sJpnMessageEntryTable: 0x80109E8C
sNesMessageEntryTable: 0x8010DFCC
sStaffMessageEntryTable: 0x801121EC
@@ -55,7 +55,7 @@ assets:
- name: code/fbdemo_circle
xml_path: assets/xml/code/fbdemo_circle.xml
start_offset: 0xEB768
- end_offset: 0xEC988
+ end_offset: 0xECA58
- name: code/fbdemo_triforce
xml_path: assets/xml/code/fbdemo_triforce.xml
start_offset: 0xEABF0
@@ -63,7 +63,7 @@ assets:
- name: code/fbdemo_wipe1
xml_path: assets/xml/code/fbdemo_wipe1.xml
start_offset: 0xEACC0
- end_offset: 0xEB650
+ end_offset: 0xEB748
- name: misc/link_animetion
xml_path: assets/xml/misc/link_animetion.xml
- name: misc/z_select_static
@@ -971,7 +971,7 @@ assets:
- 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.xml
+ 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
@@ -1141,7 +1141,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
- xml_path: assets/xml/scenes/overworld/spot16.xml
+ 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
@@ -1201,7 +1201,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static.xml
- name: textures/nintendo_rogo_static
- xml_path: assets/xml/textures/nintendo_rogo_static.xml
+ 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
diff --git a/baseroms/gc-jp/config.yml b/baseroms/gc-jp/config.yml
index f86773ac41..73285664c6 100644
--- a/baseroms/gc-jp/config.yml
+++ b/baseroms/gc-jp/config.yml
@@ -1,5 +1,5 @@
dmadata_start: 0x7170
-text_lang_pal: false
+text_lang: NTSC
incbins:
- name: ipl3
segment: makerom
@@ -42,7 +42,7 @@ incbins:
vram: 0x80115900
size: 0x60
variables:
- gMtxClear: 0x800FE2C0
+ gIdentityMtx: 0x800FE2C0
sJpnMessageEntryTable: 0x80109EAC
sNesMessageEntryTable: 0x8010DFEC
sStaffMessageEntryTable: 0x8011220C
@@ -55,7 +55,7 @@ assets:
- name: code/fbdemo_circle
xml_path: assets/xml/code/fbdemo_circle.xml
start_offset: 0xEB788
- end_offset: 0xEC9A8
+ end_offset: 0xECA78
- name: code/fbdemo_triforce
xml_path: assets/xml/code/fbdemo_triforce.xml
start_offset: 0xEAC10
@@ -63,7 +63,7 @@ assets:
- name: code/fbdemo_wipe1
xml_path: assets/xml/code/fbdemo_wipe1.xml
start_offset: 0xEACE0
- end_offset: 0xEB670
+ end_offset: 0xEB768
- name: misc/link_animetion
xml_path: assets/xml/misc/link_animetion.xml
- name: misc/z_select_static
@@ -971,7 +971,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
- xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
+ 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
@@ -999,7 +999,7 @@ assets:
- name: scenes/dungeons/HIDAN
xml_path: assets/xml/scenes/dungeons/HIDAN.xml
- name: scenes/dungeons/ice_doukutu
- xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
+ xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
- name: scenes/dungeons/jyasinboss
xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
- name: scenes/dungeons/jyasinzou
@@ -1141,7 +1141,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
- xml_path: assets/xml/scenes/overworld/spot16.xml
+ 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
@@ -1201,7 +1201,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static.xml
- name: textures/nintendo_rogo_static
- xml_path: assets/xml/textures/nintendo_rogo_static.xml
+ 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
diff --git a/baseroms/gc-us-mq/config.yml b/baseroms/gc-us-mq/config.yml
index 1a64ec2dbd..1057e49b2e 100644
--- a/baseroms/gc-us-mq/config.yml
+++ b/baseroms/gc-us-mq/config.yml
@@ -1,5 +1,5 @@
dmadata_start: 0x7170
-text_lang_pal: false
+text_lang: NTSC
incbins:
- name: ipl3
segment: makerom
@@ -42,7 +42,7 @@ incbins:
vram: 0x801158C0
size: 0x60
variables:
- gMtxClear: 0x800FE280
+ gIdentityMtx: 0x800FE280
sJpnMessageEntryTable: 0x80109E6C
sNesMessageEntryTable: 0x8010DFAC
sStaffMessageEntryTable: 0x801121CC
@@ -55,7 +55,7 @@ assets:
- name: code/fbdemo_circle
xml_path: assets/xml/code/fbdemo_circle.xml
start_offset: 0xEB748
- end_offset: 0xEC968
+ end_offset: 0xECA38
- name: code/fbdemo_triforce
xml_path: assets/xml/code/fbdemo_triforce.xml
start_offset: 0xEABD0
@@ -63,7 +63,7 @@ assets:
- name: code/fbdemo_wipe1
xml_path: assets/xml/code/fbdemo_wipe1.xml
start_offset: 0xEACA0
- end_offset: 0xEB630
+ end_offset: 0xEB728
- name: misc/link_animetion
xml_path: assets/xml/misc/link_animetion.xml
- name: misc/z_select_static
@@ -971,7 +971,7 @@ assets:
- 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.xml
+ 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
@@ -1141,7 +1141,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
- xml_path: assets/xml/scenes/overworld/spot16.xml
+ 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
@@ -1201,7 +1201,7 @@ assets:
- 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.xml
+ 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
diff --git a/baseroms/gc-us/config.yml b/baseroms/gc-us/config.yml
index 3a63996ed1..620d550631 100644
--- a/baseroms/gc-us/config.yml
+++ b/baseroms/gc-us/config.yml
@@ -1,5 +1,5 @@
dmadata_start: 0x7170
-text_lang_pal: false
+text_lang: NTSC
incbins:
- name: ipl3
segment: makerom
@@ -42,7 +42,7 @@ incbins:
vram: 0x801158E0
size: 0x60
variables:
- gMtxClear: 0x800FE2A0
+ gIdentityMtx: 0x800FE2A0
sJpnMessageEntryTable: 0x80109E8C
sNesMessageEntryTable: 0x8010DFCC
sStaffMessageEntryTable: 0x801121EC
@@ -55,7 +55,7 @@ assets:
- name: code/fbdemo_circle
xml_path: assets/xml/code/fbdemo_circle.xml
start_offset: 0xEB768
- end_offset: 0xEC988
+ end_offset: 0xECA58
- name: code/fbdemo_triforce
xml_path: assets/xml/code/fbdemo_triforce.xml
start_offset: 0xEABF0
@@ -63,7 +63,7 @@ assets:
- name: code/fbdemo_wipe1
xml_path: assets/xml/code/fbdemo_wipe1.xml
start_offset: 0xEACC0
- end_offset: 0xEB650
+ end_offset: 0xEB748
- name: misc/link_animetion
xml_path: assets/xml/misc/link_animetion.xml
- name: misc/z_select_static
@@ -971,7 +971,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
- xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
+ 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
@@ -999,7 +999,7 @@ assets:
- name: scenes/dungeons/HIDAN
xml_path: assets/xml/scenes/dungeons/HIDAN.xml
- name: scenes/dungeons/ice_doukutu
- xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
+ xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
- name: scenes/dungeons/jyasinboss
xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
- name: scenes/dungeons/jyasinzou
@@ -1141,7 +1141,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
- xml_path: assets/xml/scenes/overworld/spot16.xml
+ 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
@@ -1201,7 +1201,7 @@ assets:
- 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.xml
+ 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
diff --git a/baseroms/ique-cn/bss-order.txt b/baseroms/ique-cn/bss-order.txt
new file mode 100644
index 0000000000..3bc7f2237e
--- /dev/null
+++ b/baseroms/ique-cn/bss-order.txt
@@ -0,0 +1,110 @@
+// Specification for linker plugin COMMON symbol order for the ique-cn version
+
+build/ique-cn/boot_bss_1.o {
+ bk;
+ __osBaseCounter;
+ __osBbRCountWraps;
+ __osBbLastRCount;
+ __osViIntrCount;
+ insize;
+ outcnt;
+ bb;
+ __osCurrentTime;
+ hufts;
+ __osBbLastVCount;
+ __osTimerCounter;
+ __osBbVCountWraps;
+ __osFinalrom;
+ inptr;
+ ifd;
+}
+
+build/ique-cn/boot_bss_boot_main.o {
+ sBootThreadInfo;
+ sIdleThread;
+ sIdleThreadStack;
+ sIdleThreadInfo;
+ sBootThreadStack;
+}
+
+build/ique-cn/boot_bss_idle.o {
+ sMainThread;
+ sMainStack;
+ sMainStackInfo;
+ sPiMgrCmdBuff;
+}
+
+build/ique-cn/boot_bss_viconfig.o {
+ gViConfigMode;
+ gViConfigModeType;
+}
+
+build/ique-cn/boot_bss_z_std_dma.o {
+ sDmaMgrStackInfo;
+ sDmaMgrMsgQueue;
+ sDmaMgrMsgBuf;
+ sDmaMgrThread;
+ sDmaMgrStack;
+}
+
+build/ique-cn/boot_bss_2.o {
+ __osThreadSave;
+ __Dom2SpeedParam;
+ __CartRomHandle;
+ __osPiAccessQueue;
+ __Dom1SpeedParam;
+ gPiMgrCmdQueue;
+ __osBaseTimer;
+ __osEventStateTab;
+}
+
+
+
+build/ique-cn/code_bss_1.o {
+ D_8015FA8C;
+ __osMaxControllers;
+ D_8015FA88;
+ __osContLastCmd;
+ __osEepromTimerMsg;
+}
+
+build/ique-cn/code_bss_z_actor.o {
+ D_8015BBA8;
+ sCurCeilingPoly;
+ sCurCeilingBgId;
+ D_8015BC00;
+ D_8015BC10;
+ D_8015BC14;
+ D_8015BC18;
+ sNearestAttentionActor;
+ sPrioritizedAttentionActor;
+ sNearestAttentionActorDistSq;
+ sBgmEnemyDistSq;
+ sHighestAttentionPriority;
+ sAttentionPlayerRotY;
+}
+
+build/ique-cn/code_bss_2.o {
+ __osContPifRam;
+ gSaveContext;
+ sUnknownBssPadding;
+ __osEepromTimerMsgQueue;
+ __osSiAccessQueue;
+}
+
+build/ique-cn/code_bss_3.o {
+ sCharTexSize;
+ sCharTexScale;
+ sOcarinaButtonAPrimR;
+ sOcarinaButtonAPrimB;
+ sOcarinaButtonAPrimG;
+ sOcarinaButtonAEnvR;
+ sOcarinaButtonAEnvB;
+ sOcarinaButtonAEnvG;
+ sOcarinaButtonCPrimR;
+ sOcarinaButtonCPrimB;
+ sOcarinaButtonCPrimG;
+ sOcarinaButtonCEnvR;
+ sOcarinaButtonCEnvB;
+ sOcarinaButtonCEnvG;
+}
diff --git a/baseroms/ique-cn/checksum-compressed.md5 b/baseroms/ique-cn/checksum-compressed.md5
new file mode 100644
index 0000000000..ba4e5e57bf
--- /dev/null
+++ b/baseroms/ique-cn/checksum-compressed.md5
@@ -0,0 +1 @@
+0ab48b2d44a74b3bb2d384f6170c2742 build/ique-cn/oot-ique-cn-compressed.z64
diff --git a/baseroms/ique-cn/checksum.md5 b/baseroms/ique-cn/checksum.md5
new file mode 100644
index 0000000000..6390fc95b9
--- /dev/null
+++ b/baseroms/ique-cn/checksum.md5
@@ -0,0 +1 @@
+0238288a8e7c53b558b818865daf6ef3 build/ique-cn/oot-ique-cn.z64
diff --git a/baseroms/ique-cn/config.yml b/baseroms/ique-cn/config.yml
new file mode 100644
index 0000000000..6236b0cf51
--- /dev/null
+++ b/baseroms/ique-cn/config.yml
@@ -0,0 +1,1216 @@
+dmadata_start: 0xB7A0
+text_lang: CN
+incbins:
+ - name: ipl3
+ segment: makerom
+ vram: 0x80000040
+ size: 0xFC0
+ - name: rspbootText
+ segment: boot
+ vram: 0x80009C30
+ size: 0xD0
+ - name: aspMainText
+ segment: code
+ vram: 0x800EBF70
+ size: 0xFB0
+ - name: gspS2DEX2d_fifoText
+ segment: code
+ vram: 0x800ECF20
+ size: 0x18C0
+ - name: njpgdspMainText
+ segment: code
+ vram: 0x800EE7E0
+ size: 0xAF0
+ - name: aspMainData
+ segment: code
+ vram: 0x8011FE20
+ size: 0x2E0
+ - name: gspF3DZEX2_NoN_PosLight_fifoText
+ segment: code
+ vram: 0x80120100
+ size: 0x1630
+ - name: gspF3DZEX2_NoN_PosLight_fifoData
+ segment: code
+ vram: 0x80121730
+ size: 0x420
+ - name: gspS2DEX2d_fifoData
+ segment: code
+ vram: 0x80121B50
+ size: 0x390
+ - name: njpgdspMainData
+ segment: code
+ vram: 0x80121EE0
+ size: 0x60
+variables:
+ gIdentityMtx: 0x80106980
+ sJpnMessageEntryTable: 0x80115838
+ sNesMessageEntryTable: 0x80119978
+ sStaffMessageEntryTable: 0x8011DB98
+ gSoundFontTable: 0x8011F280
+ gSequenceFontTable: 0x8011F4F0
+ gSequenceTable: 0x8011F6B0
+ gSampleBankTable: 0x8011FDA0
+ sShadowTex: 0x80AE0B10
+assets:
+- name: code/fbdemo_circle
+ xml_path: assets/xml/code/fbdemo_circle.xml
+ start_offset: 0xEBD88
+ end_offset: 0xED078
+- name: code/fbdemo_triforce
+ xml_path: assets/xml/code/fbdemo_triforce.xml
+ start_offset: 0xEB210
+ end_offset: 0xEB2E0
+- name: code/fbdemo_wipe1
+ xml_path: assets/xml/code/fbdemo_wipe1.xml
+ start_offset: 0xEB2E0
+ end_offset: 0xEBD68
+- 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.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.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.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.xml
+- name: objects/object_fd2
+ xml_path: assets/xml/objects/object_fd2.xml
+- name: objects/object_fhg
+ xml_path: assets/xml/objects/object_fhg.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.xml
+- name: objects/object_ganon2
+ xml_path: assets/xml/objects/object_ganon2.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.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.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_ique.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.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.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.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.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: 0x980
+ end_offset: 0x1DA0
+- name: overlays/ovl_Arrow_Ice
+ xml_path: assets/xml/overlays/ovl_Arrow_Ice.xml
+ start_offset: 0x9A0
+ end_offset: 0x1DC0
+- name: overlays/ovl_Arrow_Light
+ xml_path: assets/xml/overlays/ovl_Arrow_Light.xml
+ start_offset: 0x9B0
+ end_offset: 0x1DD0
+- name: overlays/ovl_Bg_Ganon_Otyuka
+ xml_path: assets/xml/overlays/ovl_Bg_Ganon_Otyuka.xml
+ start_offset: 0x1100
+ end_offset: 0x24DC
+- name: overlays/ovl_Bg_Jya_Cobra
+ xml_path: assets/xml/overlays/ovl_Bg_Jya_Cobra.xml
+ start_offset: 0x1850
+ end_offset: 0x18C8
+- name: overlays/ovl_Boss_Dodongo
+ xml_path: assets/xml/overlays/ovl_Boss_Dodongo.xml
+ start_offset: 0x61E8
+ end_offset: 0x91E8
+- name: overlays/ovl_Boss_Ganon
+ xml_path: assets/xml/overlays/ovl_Boss_Ganon.xml
+ start_offset: 0xE3C8
+ end_offset: 0x20EE8
+- name: overlays/ovl_Boss_Ganon2
+ xml_path: assets/xml/overlays/ovl_Boss_Ganon2.xml
+ start_offset: 0x9F88
+ end_offset: 0x10438
+- name: overlays/ovl_Boss_Sst
+ xml_path: assets/xml/overlays/ovl_Boss_Sst.xml
+ start_offset: 0xA380
+ end_offset: 0xAD30
+- name: overlays/ovl_Demo_Shd
+ xml_path: assets/xml/overlays/ovl_Demo_Shd.xml
+ start_offset: 0x410
+ end_offset: 0x2390
+- name: overlays/ovl_Effect_Ss_Fhg_Flash
+ xml_path: assets/xml/overlays/ovl_Effect_Ss_Fhg_Flash.xml
+ start_offset: 0x9F0
+ end_offset: 0xEA8
+- name: overlays/ovl_En_Bili
+ xml_path: assets/xml/overlays/ovl_En_Bili.xml
+ start_offset: 0x1E40
+ end_offset: 0x1E60
+- name: overlays/ovl_En_Clear_Tag
+ xml_path: assets/xml/overlays/ovl_En_Clear_Tag.xml
+ start_offset: 0x2600
+ end_offset: 0x8900
+- name: overlays/ovl_En_Ganon_Mant
+ xml_path: assets/xml/overlays/ovl_En_Ganon_Mant.xml
+ start_offset: 0x11F8
+ end_offset: 0x40F8
+- name: overlays/ovl_En_Ganon_Organ
+ xml_path: assets/xml/overlays/ovl_En_Ganon_Organ.xml
+ start_offset: 0x368
+ end_offset: 0x6EF0
+- name: overlays/ovl_En_Holl
+ xml_path: assets/xml/overlays/ovl_En_Holl.xml
+ start_offset: 0xE68
+ end_offset: 0xED0
+- name: overlays/ovl_En_Jsjutan
+ xml_path: assets/xml/overlays/ovl_En_Jsjutan.xml
+ start_offset: 0x12C8
+ end_offset: 0x4C60
+- name: overlays/ovl_En_Kanban
+ xml_path: assets/xml/overlays/ovl_En_Kanban.xml
+ start_offset: 0x2E70
+ end_offset: 0x2F30
+- name: overlays/ovl_En_Mag
+ xml_path: assets/xml/overlays/ovl_En_Mag_ique.xml
+ start_offset: 0x2D8C
+ end_offset: 0x2E0C
+- name: overlays/ovl_En_Sda
+ xml_path: assets/xml/overlays/ovl_En_Sda.xml
+ start_offset: 0x1498
+ end_offset: 0x1528
+- 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: 0x26A0
+ end_offset: 0x2730
+- name: overlays/ovl_En_Sth
+ xml_path: assets/xml/overlays/ovl_En_Sth.xml
+ start_offset: 0xE70
+ end_offset: 0x3E44
+- name: overlays/ovl_End_Title
+ xml_path: assets/xml/overlays/ovl_End_Title_ique.xml
+ start_offset: 0x750
+ end_offset: 0x59D0
+- name: overlays/ovl_file_choose
+ xml_path: assets/xml/overlays/ovl_file_choose.xml
+ start_offset: 0xF6E0
+ end_offset: 0xFDC0
+- name: overlays/ovl_Magic_Dark
+ xml_path: assets/xml/overlays/ovl_Magic_Dark.xml
+ start_offset: 0xC90
+ end_offset: 0x16C0
+- name: overlays/ovl_Magic_Fire
+ xml_path: assets/xml/overlays/ovl_Magic_Fire.xml
+ start_offset: 0xB50
+ end_offset: 0x21A0
+- name: overlays/ovl_Magic_Wind
+ xml_path: assets/xml/overlays/ovl_Magic_Wind.xml
+ start_offset: 0x6A0
+ end_offset: 0x1BB8
+- name: overlays/ovl_Oceff_Spot
+ xml_path: assets/xml/overlays/ovl_Oceff_Spot.xml
+ start_offset: 0x780
+ end_offset: 0xE58
+- name: overlays/ovl_Oceff_Storm
+ xml_path: assets/xml/overlays/ovl_Oceff_Storm.xml
+ start_offset: 0x750
+ end_offset: 0x1AE0
+- name: overlays/ovl_Oceff_Wipe
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe.xml
+ start_offset: 0x520
+ end_offset: 0xCE0
+- name: overlays/ovl_Oceff_Wipe2
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe2.xml
+ start_offset: 0x430
+ end_offset: 0x1698
+- name: overlays/ovl_Oceff_Wipe3
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe3.xml
+ start_offset: 0x430
+ end_offset: 0x1678
+- name: overlays/ovl_Oceff_Wipe4
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe4.xml
+ start_offset: 0x410
+ end_offset: 0xEF8
+- name: scenes/dungeons/bdan
+ xml_path: assets/xml/scenes/dungeons/bdan.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.xml
+- name: scenes/dungeons/ddan
+ xml_path: assets/xml/scenes/dungeons/ddan.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.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.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.xml
+- name: scenes/dungeons/HIDAN
+ xml_path: assets/xml/scenes/dungeons/HIDAN.xml
+- name: scenes/dungeons/ice_doukutu
+ xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
+- name: scenes/dungeons/jyasinboss
+ xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
+- name: scenes/dungeons/jyasinzou
+ xml_path: assets/xml/scenes/dungeons/jyasinzou.xml
+- name: scenes/dungeons/men
+ xml_path: assets/xml/scenes/dungeons/men.xml
+- name: scenes/dungeons/MIZUsin
+ xml_path: assets/xml/scenes/dungeons/MIZUsin.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.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_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.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: textures/backgrounds
+ xml_path: assets/xml/textures/backgrounds.xml
+- name: textures/do_action_static
+ xml_path: assets/xml/textures/do_action_static.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_gameover_static
+ xml_path: assets/xml/textures/icon_item_gameover_static.xml
+- name: textures/icon_item_jpn_static
+ xml_path: assets/xml/textures/icon_item_jpn_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.xml
+- name: textures/item_name_static
+ xml_path: assets/xml/textures/item_name_static.xml
+- name: textures/kanji
+ xml_path: assets/xml/textures/kanji.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.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_ique_cn.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_ique.xml
+- name: textures/place_title_cards
+ xml_path: assets/xml/textures/place_title_cards.xml
+- name: textures/skyboxes
+ xml_path: assets/xml/textures/skyboxes.xml
+- name: textures/title_static
+ xml_path: assets/xml/textures/title_static.xml
diff --git a/baseroms/ique-cn/segments.csv b/baseroms/ique-cn/segments.csv
new file mode 100644
index 0000000000..e06853b6c2
--- /dev/null
+++ b/baseroms/ique-cn/segments.csv
@@ -0,0 +1,1510 @@
+Name,VRAM start
+makerom,80000000
+boot,80000450
+dmadata,
+Audiobank,
+Audioseq,
+Audiotable,
+kanji,
+link_animetion,
+icon_item_static,
+icon_item_24_static,
+icon_item_field_static,
+icon_item_dungeon_static,
+icon_item_gameover_static,
+icon_item_jpn_static,
+icon_item_nes_static,
+item_name_static,
+map_name_static,
+do_action_static,
+message_static,
+message_texture_static,
+nes_font_static,
+jpn_message_data_static,
+nes_message_data_static,
+staff_message_data_static,
+map_grand_static,
+map_48x85_static,
+map_i_static,
+code,80018FA0
+ovl_title,80800000
+ovl_select,80800930
+ovl_opening,808035B0
+ovl_file_choose,80803700
+ovl_kaleido_scope,808141F0
+ovl_player_actor,80830290
+ovl_map_mark_data,80856A70
+ovl_En_Test,8085D5D0
+ovl_En_GirlA,80862E80
+ovl_En_Part,808657A0
+ovl_En_Light,80866E00
+ovl_En_Door,80867C00
+ovl_En_Box,80868A40
+ovl_En_Poh,8086A5A0
+ovl_En_Okuta,8086E790
+ovl_En_Bom,80870D70
+ovl_En_Wallmas,80871C40
+ovl_En_Dodongo,80873650
+ovl_En_Firefly,808763F0
+ovl_En_Horse,80878560
+ovl_En_Arrow,808847C0
+ovl_En_Elf,80885EC0
+ovl_En_Niw,8088A880
+ovl_En_Tite,8088DBB0
+ovl_En_Reeba,80890950
+ovl_En_Peehat,808923C0
+ovl_En_Holl,80895AC0
+ovl_En_Scene_Change,80896A90
+ovl_En_Zf,80896BC0
+ovl_En_Hata,8089D6B0
+ovl_Boss_Dodongo,8089DC40
+ovl_Boss_Goma,808A7740
+ovl_En_Zl1,808AD6E0
+ovl_En_Viewer,808B14F0
+ovl_En_Goma,808B43B0
+ovl_Bg_Pushbox,808B7060
+ovl_En_Bubble,808B7360
+ovl_Door_Shutter,808B8780
+ovl_En_Dodojr,808BAA40
+ovl_En_Bdfire,808BC8E0
+ovl_En_Boom,808BD480
+ovl_En_Torch2,808BDD50
+ovl_En_Bili,808C04F0
+ovl_En_Tp,808C27C0
+ovl_En_St,808C4630
+ovl_En_Bw,808C72A0
+ovl_En_Eiyer,808CA630
+ovl_En_River_Sound,808CC290
+ovl_En_Horse_Normal,808CCC20
+ovl_En_Ossan,808CF240
+ovl_Bg_Treemouth,808D5820
+ovl_Bg_Dodoago,808D6E80
+ovl_Bg_Hidan_Dalm,808D7C30
+ovl_Bg_Hidan_Hrock,808D8480
+ovl_En_Horse_Ganon,808D8CB0
+ovl_Bg_Hidan_Rock,808D9A30
+ovl_Bg_Hidan_Rsekizou,808DAB30
+ovl_Bg_Hidan_Sekizou,808DB710
+ovl_Bg_Hidan_Sima,808DCB60
+ovl_Bg_Hidan_Syoku,808DDA60
+ovl_En_Xc,808DDEC0
+ovl_Bg_Hidan_Curtain,808E4650
+ovl_Bg_Spot00_Hanebasi,808E50F0
+ovl_En_Mb,808E6200
+ovl_En_Bombf,808EA430
+ovl_Bg_Hidan_Firewall,808EB8C0
+ovl_Bg_Dy_Yoseizo,808EC020
+ovl_En_Zl2,808EEE10
+ovl_Bg_Hidan_Fslift,808F3510
+ovl_En_OE2,808F39E0
+ovl_Bg_Ydan_Hasi,808F3AC0
+ovl_Bg_Ydan_Maruta,808F4270
+ovl_Boss_Ganondrof,808F4950
+ovl_En_Am,808F96E0
+ovl_En_Dekubaba,808FBAE0
+ovl_En_M_Fire1,808FF590
+ovl_En_M_Thunder,808FF730
+ovl_Bg_Ddan_Jd,80900D30
+ovl_Bg_Breakwall,80901380
+ovl_En_Jj,809021F0
+ovl_En_Horse_Zelda,809037C0
+ovl_Bg_Ddan_Kd,809042B0
+ovl_Door_Warp1,80904BA0
+ovl_Obj_Syokudai,80908EB0
+ovl_Item_B_Heart,80909B00
+ovl_En_Dekunuts,80909F10
+ovl_Bg_Menkuri_Kaiten,8090B710
+ovl_Bg_Menkuri_Eye,8090B8A0
+ovl_En_Vali,8090BD40
+ovl_Bg_Mizu_Movebg,8090E400
+ovl_Bg_Mizu_Water,8090F590
+ovl_Arms_Hook,80910260
+ovl_En_fHG,80910FD0
+ovl_Bg_Mori_Hineri,80913900
+ovl_En_Bb,80914650
+ovl_Bg_Toki_Hikari,80918330
+ovl_En_Yukabyun,809190D0
+ovl_Bg_Toki_Swd,809196E0
+ovl_En_Fhg_Fire,8091AD30
+ovl_Bg_Mjin,8091D3D0
+ovl_Bg_Hidan_Kousi,8091D7C0
+ovl_Door_Toki,8091DD50
+ovl_Bg_Hidan_Hamstep,8091DEB0
+ovl_En_Bird,8091ED60
+ovl_En_Wood02,8091F220
+ovl_En_Lightbox,80920400
+ovl_En_Pu_box,80920880
+ovl_En_Trap,80920BC0
+ovl_En_Arow_Trap,80921E60
+ovl_En_Vase,80921FB0
+ovl_En_Ta,809220B0
+ovl_En_Tk,80925A70
+ovl_Bg_Mori_Bigst,809278A0
+ovl_Bg_Mori_Elevator,809281D0
+ovl_Bg_Mori_Kaitenkabe,80928CC0
+ovl_Bg_Mori_Rakkatenjo,80929330
+ovl_En_Vm,80929CB0
+ovl_Demo_Effect,8092B570
+ovl_Demo_Kankyo,80931110
+ovl_Bg_Hidan_Fwbig,80934E00
+ovl_En_Floormas,80935AE0
+ovl_En_Heishi1,80938EC0
+ovl_En_Rd,8093A3D0
+ovl_En_Po_Sisters,8093CC90
+ovl_Bg_Heavy_Block,80941980
+ovl_Bg_Po_Event,80943270
+ovl_Obj_Mure,809450B0
+ovl_En_Sw,809460C0
+ovl_Boss_Fd,809498B0
+ovl_Object_Kankyo,80950C10
+ovl_En_Du,80953E90
+ovl_En_Fd,80955920
+ovl_En_Horse_Link_Child,809585C0
+ovl_Door_Ana,8095A3C0
+ovl_Bg_Spot02_Objects,8095AA30
+ovl_Bg_Haka,8095BD90
+ovl_Magic_Wind,8095C450
+ovl_Magic_Fire,8095E150
+ovl_En_Ru1,80960450
+ovl_Boss_Fd2,80967AF0
+ovl_En_Fd_Fire,8096B820
+ovl_En_Dh,8096C530
+ovl_En_Dha,8096E010
+ovl_En_Rl,8096F010
+ovl_En_Encount1,8096FEF0
+ovl_Demo_Du,80970A50
+ovl_Demo_Im,80974230
+ovl_Demo_Tre_Lgt,809781A0
+ovl_En_Fw,809788B0
+ovl_Bg_Vb_Sima,8097A070
+ovl_En_Vb_Ball,8097A790
+ovl_Bg_Haka_Megane,8097B940
+ovl_Bg_Haka_MeganeBG,8097BD40
+ovl_Bg_Haka_Ship,8097C400
+ovl_Bg_Haka_Sgami,8097CE50
+ovl_En_Heishi2,8097DA70
+ovl_En_Encount2,8097FC70
+ovl_En_Fire_Rock,80980EA0
+ovl_En_Brob,80981FB0
+ovl_Mir_Ray,809830A0
+ovl_Bg_Spot09_Obj,80984950
+ovl_Bg_Spot18_Obj,80984E70
+ovl_Boss_Va,80985740
+ovl_Bg_Haka_Tubo,8099C9D0
+ovl_Bg_Haka_Trap,8099D3F0
+ovl_Bg_Haka_Huta,8099E9C0
+ovl_Bg_Haka_Zou,8099F460
+ovl_Bg_Spot17_Funen,809A0650
+ovl_En_Syateki_Itm,809A08A0
+ovl_En_Syateki_Man,809A1640
+ovl_En_Tana,809A2400
+ovl_En_Nb,809A26B0
+ovl_Boss_Mo,809A6C80
+ovl_En_Sb,809B7260
+ovl_En_Bigokuta,809B86A0
+ovl_En_Karebaba,809BB1A0
+ovl_Bg_Bdan_Objects,809BCA90
+ovl_Demo_Sa,809BDD60
+ovl_Demo_Go,809C0880
+ovl_En_In,809C15D0
+ovl_En_Tr,809C4370
+ovl_Bg_Spot16_Bombstone,809C5C70
+ovl_Bg_Hidan_Kowarerukabe,809C71C0
+ovl_Bg_Bombwall,809C80A0
+ovl_En_Ru2,809C8960
+ovl_Obj_Dekujr,809CB6E0
+ovl_Bg_Mizu_Uzu,809CBD20
+ovl_Bg_Spot06_Objects,809CBEF0
+ovl_Bg_Ice_Objects,809CD2F0
+ovl_Bg_Haka_Water,809CE230
+ovl_En_Ma2,809CEA30
+ovl_En_Bom_Chu,809CFA90
+ovl_En_Horse_Game_Check,809D1130
+ovl_Boss_Tw,809D2200
+ovl_En_Rr,809E7DD0
+ovl_En_Ba,809EA300
+ovl_En_Bx,809EC1D0
+ovl_En_Anubice,809ECCD0
+ovl_En_Anubice_Fire,809EDF80
+ovl_Bg_Mori_Hashigo,809EED40
+ovl_Bg_Mori_Hashira4,809EF600
+ovl_Bg_Mori_Idomizu,809EFB90
+ovl_Bg_Spot16_Doughnut,809F01D0
+ovl_Bg_Bdan_Switch,809F0790
+ovl_En_Ma1,809F1BC0
+ovl_Boss_Ganon,809F2EA0
+ovl_Boss_Sst,80A18CD0
+ovl_En_Ny,80A252A0
+ovl_En_Fr,80A26BE0
+ovl_Item_Shield,80A29670
+ovl_Bg_Ice_Shelter,80A2A080
+ovl_En_Ice_Hono,80A2B2C0
+ovl_Item_Ocarina,80A2C4B0
+ovl_Magic_Dark,80A2CC80
+ovl_Demo_6K,80A2E4D0
+ovl_En_Anubice_Tag,80A31230
+ovl_Bg_Haka_Gate,80A31500
+ovl_Bg_Spot15_Saku,80A325A0
+ovl_Bg_Jya_Goroiwa,80A328E0
+ovl_Bg_Jya_Zurerukabe,80A33060
+ovl_Bg_Jya_Cobra,80A33710
+ovl_Bg_Jya_Kanaami,80A35450
+ovl_Fishing,80A35800
+ovl_Obj_Oshihiki,80A4ED40
+ovl_Bg_Gate_Shutter,80A507F0
+ovl_Eff_Dust,80A50C80
+ovl_Bg_Spot01_Fusya,80A52050
+ovl_Bg_Spot01_Idohashira,80A522F0
+ovl_Bg_Spot01_Idomizu,80A52EF0
+ovl_Bg_Po_Syokudai,80A53210
+ovl_Bg_Ganon_Otyuka,80A53B80
+ovl_Bg_Spot15_Rrbox,80A561C0
+ovl_Bg_Umajump,80A56FA0
+ovl_En_Insect,80A57130
+ovl_En_Butte,80A59650
+ovl_En_Fish,80A5AC20
+ovl_Bg_Spot08_Iceblock,80A5CD30
+ovl_Item_Etcetera,80A5DD70
+ovl_Arrow_Fire,80A5E640
+ovl_Arrow_Ice,80A60520
+ovl_Arrow_Light,80A62420
+ovl_Obj_Kibako,80A64330
+ovl_Obj_Tsubo,80A65030
+ovl_En_Wonder_Item,80A66020
+ovl_En_Ik,80A66D50
+ovl_Demo_Ik,80A6B3B0
+ovl_En_Skj,80A6C8C0
+ovl_En_Skjneedle,80A70210
+ovl_En_G_Switch,80A70520
+ovl_Demo_Ext,80A71D40
+ovl_Demo_Shd,80A72690
+ovl_En_Dns,80A74AA0
+ovl_Elf_Msg,80A75E30
+ovl_En_Honotrap,80A76420
+ovl_En_Tubo_Trap,80A77980
+ovl_Obj_Ice_Poly,80A78620
+ovl_Bg_Spot03_Taki,80A78FD0
+ovl_Bg_Spot07_Taki,80A798F0
+ovl_En_Fz,80A79EE0
+ovl_En_Po_Relay,80A7BEF0
+ovl_Bg_Relay_Objects,80A7D600
+ovl_En_Diving_Game,80A7DDB0
+ovl_En_Kusa,80A7F760
+ovl_Obj_Bean,80A80C40
+ovl_Obj_Bombiwa,80A833D0
+ovl_Obj_Switch,80A83940
+ovl_Obj_Elevator,80A85720
+ovl_Obj_Lift,80A85AE0
+ovl_Obj_Hsblock,80A86500
+ovl_En_Okarina_Tag,80A86AD0
+ovl_En_Yabusame_Mark,80A87FD0
+ovl_En_Goroiwa,80A886A0
+ovl_En_Ex_Ruppy,80A8AA60
+ovl_En_Toryo,80A8BB20
+ovl_En_Daiku,80A8C7B0
+ovl_En_Nwc,80A8DEF0
+ovl_En_Blkobj,80A8E910
+ovl_Item_Inbox,80A8EE70
+ovl_En_Ge1,80A8EFD0
+ovl_Obj_Blockstop,80A91000
+ovl_En_Sda,80A911A0
+ovl_En_Clear_Tag,80A92890
+ovl_En_Niw_Lady,80A9DE30
+ovl_En_Gm,80A9F730
+ovl_En_Ms,80AA0460
+ovl_En_Hs,80AA0B50
+ovl_Bg_Ingate,80AA16F0
+ovl_En_Kanban,80AA1A80
+ovl_En_Heishi3,80AA4BD0
+ovl_En_Syateki_Niw,80AA55A0
+ovl_En_Attack_Niw,80AA7630
+ovl_Bg_Spot01_Idosoko,80AA8890
+ovl_En_Sa,80AA8AA0
+ovl_En_Wonder_Talk,80AAAD10
+ovl_Bg_Gjyo_Bridge,80AAB3A0
+ovl_En_Ds,80AAB890
+ovl_En_Mk,80AAC4B0
+ovl_En_Bom_Bowl_Man,80AAD340
+ovl_En_Bom_Bowl_Pit,80AAE880
+ovl_En_Owl,80AAF1F0
+ovl_En_Ishi,80AB2D90
+ovl_Obj_Hana,80ABBEE0
+ovl_Obj_Lightswitch,80ABC1F0
+ovl_Obj_Mure2,80ABD620
+ovl_En_Go,80ABE040
+ovl_En_Fu,80AC2680
+ovl_En_Changer,80AC33D0
+ovl_Bg_Jya_Megami,80AC3DB0
+ovl_Bg_Jya_Lift,80AC4FA0
+ovl_Bg_Jya_Bigmirror,80AC54F0
+ovl_Bg_Jya_Bombchuiwa,80AC5D40
+ovl_Bg_Jya_Amishutter,80AC6880
+ovl_Bg_Jya_Bombiwa,80AC6C10
+ovl_Bg_Spot18_Basket,80AC71D0
+ovl_En_Ganon_Organ,80AC81C0
+ovl_En_Siofuki,80ACF200
+ovl_En_Stream,80ACFFB0
+ovl_En_Mm,80AD0540
+ovl_En_Ko,80AD1BA0
+ovl_En_Kz,80AD5CE0
+ovl_En_Weather_Tag,80AD7280
+ovl_Bg_Sst_Floor,80AD8170
+ovl_En_Ani,80AD86D0
+ovl_En_Ex_Item,80AD9440
+ovl_Bg_Jya_Ironobj,80ADA5C0
+ovl_En_Js,80ADB370
+ovl_En_Jsjutan,80ADBD40
+ovl_En_Cs,80AE1670
+ovl_En_Md,80AE28A0
+ovl_En_Hy,80AE4F10
+ovl_En_Ganon_Mant,80AE8850
+ovl_En_Okarina_Effect,80AECA80
+ovl_En_Mag,80AECE40
+ovl_Door_Gerudo,80AF1E80
+ovl_Elf_Msg2,80AF2470
+ovl_Demo_Gt,80AF28E0
+ovl_En_Po_Field,80AF7EF0
+ovl_Efc_Erupc,80AFB980
+ovl_Bg_Zg,80AFC470
+ovl_En_Heishi4,80AFC8C0
+ovl_En_Zl3,80AFD7C0
+ovl_Boss_Ganon2,80B05610
+ovl_En_Kakasi,80B18480
+ovl_En_Takara_Man,80B191C0
+ovl_Obj_Makeoshihiki,80B19A80
+ovl_Oceff_Spot,80B19F10
+ovl_End_Title,80B1AE40
+ovl_En_Torch,80B20880
+ovl_Demo_Ec,80B20970
+ovl_Shot_Sun,80B241D0
+ovl_En_Dy_Extra,80B24890
+ovl_En_Wonder_Talk2,80B24E30
+ovl_En_Ge2,80B254D0
+ovl_Obj_Roomtimer,80B26E70
+ovl_En_Ssh,80B270C0
+ovl_En_Sth,80B296B0
+ovl_Oceff_Wipe,80B2D770
+ovl_Effect_Ss_Dust,80B2E4F0
+ovl_Effect_Ss_KiraKira,80B2ED30
+ovl_Effect_Ss_Bomb,80B2F3A0
+ovl_Effect_Ss_Bomb2,80B2F7D0
+ovl_Effect_Ss_Blast,80B300D0
+ovl_Effect_Ss_G_Spk,80B30460
+ovl_Effect_Ss_D_Fire,80B30A10
+ovl_Effect_Ss_Bubble,80B30F00
+ovl_Effect_Ss_G_Ripple,80B31380
+ovl_Effect_Ss_G_Splash,80B318E0
+ovl_Effect_Ss_G_Magma,80B31D90
+ovl_Effect_Ss_G_Fire,80B31FF0
+ovl_Effect_Ss_Lightning,80B32280
+ovl_Effect_Ss_Dt_Bubble,80B32950
+ovl_Effect_Ss_Hahen,80B32EE0
+ovl_Effect_Ss_Stick,80B33520
+ovl_Effect_Ss_Sibuki,80B338C0
+ovl_Effect_Ss_Sibuki2,80B33F90
+ovl_Effect_Ss_G_Magma2,80B342C0
+ovl_Effect_Ss_Stone1,80B347D0
+ovl_Effect_Ss_HitMark,80B34B50
+ovl_Effect_Ss_Fhg_Flash,80B350A0
+ovl_Effect_Ss_K_Fire,80B36020
+ovl_Effect_Ss_Solder_Srch_Ball,80B36460
+ovl_Effect_Ss_Kakera,80B36610
+ovl_Effect_Ss_Ice_Piece,80B376A0
+ovl_Effect_Ss_En_Ice,80B37AE0
+ovl_Effect_Ss_Fire_Tail,80B383A0
+ovl_Effect_Ss_En_Fire,80B38AA0
+ovl_Effect_Ss_Extra,80B391F0
+ovl_Effect_Ss_Fcircle,80B395B0
+ovl_Effect_Ss_Dead_Db,80B39A60
+ovl_Effect_Ss_Dead_Dd,80B39F40
+ovl_Effect_Ss_Dead_Ds,80B3A4D0
+ovl_Effect_Ss_Dead_Sound,80B3A950
+ovl_Oceff_Storm,80B3AA90
+ovl_En_Weiyer,80B3C640
+ovl_Bg_Spot05_Soko,80B3E040
+ovl_Bg_Jya_1flift,80B3E360
+ovl_Bg_Jya_Haheniron,80B3E9F0
+ovl_Bg_Spot12_Gate,80B3F1E0
+ovl_Bg_Spot12_Saku,80B3F5F0
+ovl_En_Hintnuts,80B3FAB0
+ovl_En_Nutsball,80B414E0
+ovl_Bg_Spot00_Break,80B41B00
+ovl_En_Shopnuts,80B41CA0
+ovl_En_It,80B42BB0
+ovl_En_GeldB,80B42D40
+ovl_Oceff_Wipe2,80B480F0
+ovl_Oceff_Wipe3,80B49860
+ovl_En_Niw_Girl,80B4AFB0
+ovl_En_Dog,80B4BA80
+ovl_En_Si,80B4CC30
+ovl_Bg_Spot01_Objects2,80B4D130
+ovl_Obj_Comb,80B4D5F0
+ovl_Bg_Spot11_Bakudankabe,80B4DE50
+ovl_Obj_Kibako2,80B4E490
+ovl_En_Dnt_Demo,80B4EB50
+ovl_En_Dnt_Jiji,80B4F870
+ovl_En_Dnt_Nomal,80B50D90
+ovl_En_Guest,80B53B90
+ovl_Bg_Bom_Guard,80B54530
+ovl_En_Hs2,80B54750
+ovl_Demo_Kekkai,80B54D30
+ovl_Bg_Spot08_Bakudankabe,80B56020
+ovl_Bg_Spot17_Bakudankabe,80B566C0
+ovl_Obj_Mure3,80B56DB0
+ovl_En_Tg,80B57580
+ovl_En_Mu,80B57C60
+ovl_En_Go2,80B58580
+ovl_En_Wf,80B5E5C0
+ovl_En_Skb,80B628D0
+ovl_Demo_Gj,80B641C0
+ovl_Demo_Geff,80B67E70
+ovl_Bg_Gnd_Firemeiro,80B68690
+ovl_Bg_Gnd_Darkmeiro,80B68BE0
+ovl_Bg_Gnd_Soulmeiro,80B693A0
+ovl_Bg_Gnd_Nisekabe,80B69C00
+ovl_Bg_Gnd_Iceblock,80B69D70
+ovl_Bg_Ydan_Sp,80B6AE70
+ovl_En_Gb,80B6C590
+ovl_En_Gs,80B6DCC0
+ovl_Bg_Mizu_Bwall,80B6FB30
+ovl_Bg_Mizu_Shutter,80B71000
+ovl_En_Daiku_Kakariko,80B71800
+ovl_Bg_Bowl_Wall,80B72BC0
+ovl_En_Wall_Tubo,80B73540
+ovl_En_Po_Desert,80B73A30
+ovl_En_Crow,80B747F0
+ovl_Door_Killer,80B75E90
+ovl_Bg_Spot11_Oasis,80B77400
+ovl_Bg_Spot18_Futa,80B77B30
+ovl_Bg_Spot18_Shutter,80B77CD0
+ovl_En_Ma3,80B78220
+ovl_En_Cow,80B791D0
+ovl_Bg_Ice_Turara,80B7A630
+ovl_Bg_Ice_Shutter,80B7AE60
+ovl_En_Kakasi2,80B7B2D0
+ovl_En_Kakasi3,80B7B9F0
+ovl_Oceff_Wipe4,80B7CAD0
+ovl_En_Eg,80B7DAB0
+ovl_Bg_Menkuri_Nisekabe,80B7DC60
+ovl_En_Zo,80B7DDB0
+ovl_Effect_Ss_Ice_Smoke,80B80370
+ovl_Obj_Makekinsuta,80B80850
+ovl_En_Ge3,80B809A0
+ovl_Obj_Timeblock,80B815E0
+ovl_Obj_Hamishi,80B82230
+ovl_En_Zl4,80B82A80
+ovl_En_Mm2,80B874B0
+ovl_Bg_Jya_Block,80B88270
+ovl_Obj_Warp2block,80B884E0
+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,
+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,
+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,
+market_day_scene,
+market_day_room_0,
+market_night_scene,
+market_night_room_0,
+kenjyanoma_scene,
+kenjyanoma_room_0,
+tokinoma_scene,
+tokinoma_room_0,
+tokinoma_room_1,
+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,
+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,
+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,
+face_shop_scene,
+face_shop_room_0,
+kinsuta_scene,
+kinsuta_room_0,
+ganontikasonogo_scene,
+ganontikasonogo_room_0,
+ganontikasonogo_room_1,
+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/ntsc-1.0/checksum-JP-compressed.md5 b/baseroms/ntsc-1.0/checksum-JP-compressed.md5
new file mode 100644
index 0000000000..b371d6ee69
--- /dev/null
+++ b/baseroms/ntsc-1.0/checksum-JP-compressed.md5
@@ -0,0 +1 @@
+9f04c8e68534b870f707c247fa4b50fc build/ntsc-1.0/oot-ntsc-1.0-compressed.z64
diff --git a/baseroms/ntsc-1.0/checksum-JP.md5 b/baseroms/ntsc-1.0/checksum-JP.md5
new file mode 100644
index 0000000000..0bdeb74cb9
--- /dev/null
+++ b/baseroms/ntsc-1.0/checksum-JP.md5
@@ -0,0 +1 @@
+963d8ee3bd921f4d3c833b82004a76d2 build/ntsc-1.0/oot-ntsc-1.0.z64
diff --git a/baseroms/ntsc-1.0/checksum-US-compressed.md5 b/baseroms/ntsc-1.0/checksum-US-compressed.md5
new file mode 100644
index 0000000000..7aa912648b
--- /dev/null
+++ b/baseroms/ntsc-1.0/checksum-US-compressed.md5
@@ -0,0 +1 @@
+5bd1fe107bf8106b2ab6650abecd54d6 build/ntsc-1.0/oot-ntsc-1.0-compressed.z64
diff --git a/baseroms/ntsc-1.0/checksum-US.md5 b/baseroms/ntsc-1.0/checksum-US.md5
new file mode 100644
index 0000000000..fda12ac58c
--- /dev/null
+++ b/baseroms/ntsc-1.0/checksum-US.md5
@@ -0,0 +1 @@
+6829a16db1a34e8ce989847cd8da8d9a build/ntsc-1.0/oot-ntsc-1.0.z64
diff --git a/baseroms/ntsc-1.0/config.yml b/baseroms/ntsc-1.0/config.yml
new file mode 100644
index 0000000000..948bbd179a
--- /dev/null
+++ b/baseroms/ntsc-1.0/config.yml
@@ -0,0 +1,1219 @@
+checksums:
+ - checksum-JP
+ - checksum-US
+dmadata_start: 0x7430
+text_lang: NTSC
+incbins:
+ - name: ipl3
+ segment: makerom
+ vram: 0x80000040
+ size: 0xFC0
+ - name: rspbootText
+ segment: boot
+ vram: 0x800060B0
+ size: 0x160
+ - name: aspMainText
+ segment: code
+ vram: 0x800E2FC0
+ size: 0xFB0
+ - name: gspF3DZEX2_NoN_PosLight_fifoText
+ segment: code
+ vram: 0x800E3F70
+ size: 0x1390
+ - name: gspS2DEX2d_fifoText
+ segment: code
+ vram: 0x800E5300
+ size: 0x18C0
+ - name: njpgdspMainText
+ segment: code
+ vram: 0x800E6BC0
+ size: 0xAF0
+ - name: aspMainData
+ segment: code
+ vram: 0x801142E0
+ size: 0x2E0
+ - name: gspF3DZEX2_NoN_PosLight_fifoData
+ segment: code
+ vram: 0x801145C0
+ size: 0x420
+ - name: gspS2DEX2d_fifoData
+ segment: code
+ vram: 0x801149E0
+ size: 0x390
+ - name: njpgdspMainData
+ segment: code
+ vram: 0x80114D70
+ size: 0x60
+variables:
+ gIdentityMtx: 0x800FEDB0
+ sJpnMessageEntryTable: 0x8010A94C
+ sNesMessageEntryTable: 0x8010EA8C
+ sStaffMessageEntryTable: 0x80112CAC
+ gSoundFontTable: 0x80113740
+ gSequenceFontTable: 0x801139B0
+ gSequenceTable: 0x80113B70
+ gSampleBankTable: 0x80114260
+ sShadowTex: 0x80AE0AE0
+assets:
+- name: code/fbdemo_circle
+ xml_path: assets/xml/code/fbdemo_circle.xml
+ start_offset: 0xEC0A8
+ end_offset: 0xED398
+- name: code/fbdemo_triforce
+ xml_path: assets/xml/code/fbdemo_triforce.xml
+ start_offset: 0xEB530
+ end_offset: 0xEB600
+- name: code/fbdemo_wipe1
+ xml_path: assets/xml/code/fbdemo_wipe1.xml
+ start_offset: 0xEB600
+ end_offset: 0xEC088
+- name: n64dd/error_textures
+ xml_path: assets/xml/n64dd/error_textures.xml
+ start_offset: 0xC160
+ end_offset: 0x11D60
+- 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.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.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.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.xml
+- name: objects/object_fd2
+ xml_path: assets/xml/objects/object_fd2.xml
+- name: objects/object_fhg
+ xml_path: assets/xml/objects/object_fhg.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.xml
+- name: objects/object_ganon2
+ xml_path: assets/xml/objects/object_ganon2.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.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.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.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.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.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.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.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: 0x960
+ end_offset: 0x1D80
+- name: overlays/ovl_Arrow_Ice
+ xml_path: assets/xml/overlays/ovl_Arrow_Ice.xml
+ start_offset: 0x980
+ end_offset: 0x1DA0
+- name: overlays/ovl_Arrow_Light
+ xml_path: assets/xml/overlays/ovl_Arrow_Light.xml
+ start_offset: 0x990
+ end_offset: 0x1DB0
+- name: overlays/ovl_Bg_Ganon_Otyuka
+ xml_path: assets/xml/overlays/ovl_Bg_Ganon_Otyuka.xml
+ start_offset: 0x1110
+ end_offset: 0x24EC
+- name: overlays/ovl_Bg_Jya_Cobra
+ xml_path: assets/xml/overlays/ovl_Bg_Jya_Cobra.xml
+ start_offset: 0x1830
+ end_offset: 0x18A8
+- name: overlays/ovl_Boss_Dodongo
+ xml_path: assets/xml/overlays/ovl_Boss_Dodongo.xml
+ start_offset: 0x61C8
+ end_offset: 0x91C8
+- name: overlays/ovl_Boss_Ganon
+ xml_path: assets/xml/overlays/ovl_Boss_Ganon.xml
+ start_offset: 0xE398
+ end_offset: 0x20EB8
+- name: overlays/ovl_Boss_Ganon2
+ xml_path: assets/xml/overlays/ovl_Boss_Ganon2.xml
+ start_offset: 0x9F48
+ end_offset: 0x103F8
+- name: overlays/ovl_Boss_Sst
+ xml_path: assets/xml/overlays/ovl_Boss_Sst.xml
+ start_offset: 0xA330
+ end_offset: 0xACE0
+- name: overlays/ovl_Demo_Shd
+ xml_path: assets/xml/overlays/ovl_Demo_Shd.xml
+ start_offset: 0x410
+ end_offset: 0x2390
+- name: overlays/ovl_Effect_Ss_Fhg_Flash
+ xml_path: assets/xml/overlays/ovl_Effect_Ss_Fhg_Flash.xml
+ start_offset: 0x9F0
+ end_offset: 0xEA8
+- name: overlays/ovl_En_Bili
+ xml_path: assets/xml/overlays/ovl_En_Bili.xml
+ start_offset: 0x1E40
+ end_offset: 0x1E60
+- name: overlays/ovl_En_Clear_Tag
+ xml_path: assets/xml/overlays/ovl_En_Clear_Tag.xml
+ start_offset: 0x2600
+ end_offset: 0x8900
+- name: overlays/ovl_En_Ganon_Mant
+ xml_path: assets/xml/overlays/ovl_En_Ganon_Mant.xml
+ start_offset: 0x11E8
+ end_offset: 0x40E8
+- name: overlays/ovl_En_Ganon_Organ
+ xml_path: assets/xml/overlays/ovl_En_Ganon_Organ.xml
+ start_offset: 0x328
+ end_offset: 0x6EB0
+- name: overlays/ovl_En_Holl
+ xml_path: assets/xml/overlays/ovl_En_Holl.xml
+ start_offset: 0xE68
+ end_offset: 0xED0
+- name: overlays/ovl_En_Jsjutan
+ xml_path: assets/xml/overlays/ovl_En_Jsjutan.xml
+ start_offset: 0x12B8
+ end_offset: 0x4C50
+- name: overlays/ovl_En_Kanban
+ xml_path: assets/xml/overlays/ovl_En_Kanban.xml
+ start_offset: 0x2E70
+ end_offset: 0x2F30
+- name: overlays/ovl_En_Sda
+ xml_path: assets/xml/overlays/ovl_En_Sda.xml
+ start_offset: 0x14A8
+ end_offset: 0x1538
+- 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: 0x26A0
+ end_offset: 0x2730
+- name: overlays/ovl_En_Sth
+ xml_path: assets/xml/overlays/ovl_En_Sth.xml
+ start_offset: 0xE60
+ end_offset: 0x3E34
+- name: overlays/ovl_End_Title
+ xml_path: assets/xml/overlays/ovl_End_Title.xml
+ start_offset: 0x6F0
+ end_offset: 0x4098
+- name: overlays/ovl_file_choose
+ xml_path: assets/xml/overlays/ovl_file_choose.xml
+ start_offset: 0xEC50
+ end_offset: 0xF330
+- name: overlays/ovl_Magic_Dark
+ xml_path: assets/xml/overlays/ovl_Magic_Dark.xml
+ start_offset: 0xC90
+ end_offset: 0x16C0
+- name: overlays/ovl_Magic_Fire
+ xml_path: assets/xml/overlays/ovl_Magic_Fire.xml
+ start_offset: 0xB20
+ end_offset: 0x2170
+- name: overlays/ovl_Magic_Wind
+ xml_path: assets/xml/overlays/ovl_Magic_Wind.xml
+ start_offset: 0x6A0
+ end_offset: 0x1BB8
+- name: overlays/ovl_Oceff_Spot
+ xml_path: assets/xml/overlays/ovl_Oceff_Spot.xml
+ start_offset: 0x780
+ end_offset: 0xE58
+- name: overlays/ovl_Oceff_Storm
+ xml_path: assets/xml/overlays/ovl_Oceff_Storm.xml
+ start_offset: 0x740
+ end_offset: 0x1AD0
+- name: overlays/ovl_Oceff_Wipe
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe.xml
+ start_offset: 0x4F0
+ end_offset: 0xCB0
+- name: overlays/ovl_Oceff_Wipe2
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe2.xml
+ start_offset: 0x430
+ end_offset: 0x1698
+- name: overlays/ovl_Oceff_Wipe3
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe3.xml
+ start_offset: 0x430
+ end_offset: 0x1678
+- name: overlays/ovl_Oceff_Wipe4
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe4.xml
+ start_offset: 0x410
+ end_offset: 0xEF8
+- name: scenes/dungeons/bdan
+ xml_path: assets/xml/scenes/dungeons/bdan.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.xml
+- name: scenes/dungeons/ddan
+ xml_path: assets/xml/scenes/dungeons/ddan.xml
+- name: scenes/dungeons/ddan_boss
+ xml_path: assets/xml/scenes/dungeons/ddan_boss.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.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.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.xml
+- name: scenes/dungeons/HIDAN
+ xml_path: assets/xml/scenes/dungeons/HIDAN.xml
+- name: scenes/dungeons/ice_doukutu
+ xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
+- name: scenes/dungeons/jyasinboss
+ xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
+- name: scenes/dungeons/jyasinzou
+ xml_path: assets/xml/scenes/dungeons/jyasinzou.xml
+- name: scenes/dungeons/men
+ xml_path: assets/xml/scenes/dungeons/men.xml
+- name: scenes/dungeons/MIZUsin
+ xml_path: assets/xml/scenes/dungeons/MIZUsin.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.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_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.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.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: textures/backgrounds
+ xml_path: assets/xml/textures/backgrounds.xml
+- name: textures/do_action_static
+ xml_path: assets/xml/textures/do_action_static.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_gameover_static
+ xml_path: assets/xml/textures/icon_item_gameover_static.xml
+- name: textures/icon_item_jpn_static
+ xml_path: assets/xml/textures/icon_item_jpn_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.xml
+- name: textures/item_name_static
+ xml_path: assets/xml/textures/item_name_static.xml
+- name: textures/kanji
+ xml_path: assets/xml/textures/kanji.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.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.xml
+- name: textures/nintendo_rogo_static
+ xml_path: assets/xml/textures/nintendo_rogo_static.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.xml
+- name: textures/skyboxes
+ xml_path: assets/xml/textures/skyboxes.xml
+- name: textures/title_static
+ xml_path: assets/xml/textures/title_static.xml
diff --git a/baseroms/ntsc-1.0/segments.csv b/baseroms/ntsc-1.0/segments.csv
new file mode 100644
index 0000000000..cb73e168af
--- /dev/null
+++ b/baseroms/ntsc-1.0/segments.csv
@@ -0,0 +1,1511 @@
+Name,VRAM start
+makerom,80000000
+boot,80000460
+dmadata,
+Audiobank,
+Audioseq,
+Audiotable,
+kanji,
+link_animetion,
+icon_item_static,
+icon_item_24_static,
+icon_item_field_static,
+icon_item_dungeon_static,
+icon_item_gameover_static,
+icon_item_jpn_static,
+icon_item_nes_static,
+item_name_static,
+map_name_static,
+do_action_static,
+message_static,
+jpn_message_data_static,
+message_texture_static,
+nes_font_static,
+nes_message_data_static,
+staff_message_data_static,
+map_grand_static,
+map_i_static,
+map_48x85_static,
+code,800110A0
+n64dd,801C6E80
+ovl_title,80800000
+ovl_select,808009C0
+ovl_opening,80803720
+ovl_file_choose,80803880
+ovl_kaleido_scope,808137C0
+ovl_player_actor,808301C0
+ovl_map_mark_data,808567F0
+ovl_En_Test,8085D350
+ovl_En_GirlA,80862C00
+ovl_En_Part,80865520
+ovl_En_Light,80866B30
+ovl_En_Door,80867920
+ovl_En_Box,80868750
+ovl_En_Poh,8086A290
+ovl_En_Okuta,8086E420
+ovl_En_Bom,80870A00
+ovl_En_Wallmas,808718D0
+ovl_En_Dodongo,808732E0
+ovl_En_Firefly,80876080
+ovl_En_Horse,808781F0
+ovl_En_Arrow,80884410
+ovl_En_Elf,80885B00
+ovl_En_Niw,8088A4C0
+ovl_En_Tite,8088D7F0
+ovl_En_Reeba,80890590
+ovl_En_Peehat,80892000
+ovl_En_Holl,80895700
+ovl_En_Scene_Change,808966D0
+ovl_En_Zf,80896800
+ovl_En_Hata,8089D300
+ovl_Boss_Dodongo,8089D890
+ovl_Boss_Goma,808A7370
+ovl_En_Zl1,808AD2F0
+ovl_En_Viewer,808B10F0
+ovl_En_Goma,808B3FC0
+ovl_Bg_Pushbox,808B6C50
+ovl_En_Bubble,808B6F50
+ovl_Door_Shutter,808B8370
+ovl_En_Dodojr,808BA5F0
+ovl_En_Bdfire,808BC490
+ovl_En_Boom,808BD020
+ovl_En_Torch2,808BD8E0
+ovl_En_Bili,808C0080
+ovl_En_Tp,808C2350
+ovl_En_St,808C41A0
+ovl_En_Bw,808C6E10
+ovl_En_Eiyer,808CA170
+ovl_En_River_Sound,808CBDD0
+ovl_En_Horse_Normal,808CC760
+ovl_En_Ossan,808CED80
+ovl_Bg_Treemouth,808D5360
+ovl_Bg_Dodoago,808D69B0
+ovl_Bg_Hidan_Dalm,808D7760
+ovl_Bg_Hidan_Hrock,808D7FB0
+ovl_En_Horse_Ganon,808D87E0
+ovl_Bg_Hidan_Rock,808D9560
+ovl_Bg_Hidan_Rsekizou,808DA650
+ovl_Bg_Hidan_Sekizou,808DB230
+ovl_Bg_Hidan_Sima,808DC680
+ovl_Bg_Hidan_Syoku,808DD5A0
+ovl_En_Xc,808DDA00
+ovl_Bg_Hidan_Curtain,808E4190
+ovl_Bg_Spot00_Hanebasi,808E4C30
+ovl_En_Mb,808E5D40
+ovl_En_Bombf,808E9E80
+ovl_Bg_Hidan_Firewall,808EB2F0
+ovl_Bg_Dy_Yoseizo,808EBA50
+ovl_En_Zl2,808EE7A0
+ovl_Bg_Hidan_Fslift,808F2ED0
+ovl_En_OE2,808F33A0
+ovl_Bg_Ydan_Hasi,808F3480
+ovl_Bg_Ydan_Maruta,808F3C30
+ovl_Boss_Ganondrof,808F4310
+ovl_En_Am,808F9080
+ovl_En_Dekubaba,808FB480
+ovl_En_M_Fire1,808FEF20
+ovl_En_M_Thunder,808FF0C0
+ovl_Bg_Ddan_Jd,809006B0
+ovl_Bg_Breakwall,80900D00
+ovl_En_Jj,80901B70
+ovl_En_Horse_Zelda,80903140
+ovl_Bg_Ddan_Kd,80903C30
+ovl_Door_Warp1,80904520
+ovl_Obj_Syokudai,809087D0
+ovl_Item_B_Heart,80909410
+ovl_En_Dekunuts,80909800
+ovl_Bg_Menkuri_Kaiten,8090B000
+ovl_Bg_Menkuri_Eye,8090B190
+ovl_En_Vali,8090B630
+ovl_Bg_Mizu_Movebg,8090DCD0
+ovl_Bg_Mizu_Water,8090EE70
+ovl_Arms_Hook,8090FB40
+ovl_En_fHG,809108A0
+ovl_Bg_Mori_Hineri,809131D0
+ovl_En_Bb,80913EA0
+ovl_Bg_Toki_Hikari,80917B70
+ovl_En_Yukabyun,80918910
+ovl_Bg_Toki_Swd,80918F20
+ovl_En_Fhg_Fire,8091A570
+ovl_Bg_Mjin,8091CB90
+ovl_Bg_Hidan_Kousi,8091CF70
+ovl_Door_Toki,8091D4F0
+ovl_Bg_Hidan_Hamstep,8091D650
+ovl_En_Bird,8091E4E0
+ovl_En_Wood02,8091E9A0
+ovl_En_Lightbox,8091FB80
+ovl_En_Pu_box,80920000
+ovl_En_Trap,80920340
+ovl_En_Arow_Trap,809215E0
+ovl_En_Vase,80921730
+ovl_En_Ta,80921830
+ovl_En_Tk,809251F0
+ovl_Bg_Mori_Bigst,80927020
+ovl_Bg_Mori_Elevator,80927950
+ovl_Bg_Mori_Kaitenkabe,80928440
+ovl_Bg_Mori_Rakkatenjo,80928AA0
+ovl_En_Vm,80929410
+ovl_Demo_Effect,8092ACC0
+ovl_Demo_Kankyo,809307C0
+ovl_Bg_Hidan_Fwbig,809344C0
+ovl_En_Floormas,809351A0
+ovl_En_Heishi1,80938580
+ovl_En_Rd,80939A90
+ovl_En_Po_Sisters,8093C340
+ovl_Bg_Heavy_Block,80941030
+ovl_Bg_Po_Event,80942920
+ovl_Obj_Mure,80944760
+ovl_En_Sw,80945770
+ovl_Boss_Fd,80948F60
+ovl_Object_Kankyo,80950290
+ovl_En_Du,809534B0
+ovl_En_Fd,80954F50
+ovl_En_Horse_Link_Child,80957C10
+ovl_Door_Ana,80959A10
+ovl_Bg_Spot02_Objects,8095A080
+ovl_Bg_Haka,8095B3D0
+ovl_Magic_Wind,8095BA90
+ovl_Magic_Fire,8095D790
+ovl_En_Ru1,8095FA60
+ovl_Boss_Fd2,80967100
+ovl_En_Fd_Fire,8096AE30
+ovl_En_Dh,8096BB40
+ovl_En_Dha,8096D610
+ovl_En_Rl,8096E5E0
+ovl_En_Encount1,8096F4C0
+ovl_Demo_Du,80970020
+ovl_Demo_Im,80973800
+ovl_Demo_Tre_Lgt,80977770
+ovl_En_Fw,80977E80
+ovl_Bg_Vb_Sima,80979630
+ovl_En_Vb_Ball,80979D40
+ovl_Bg_Haka_Megane,8097AEE0
+ovl_Bg_Haka_MeganeBG,8097B2E0
+ovl_Bg_Haka_Ship,8097B9A0
+ovl_Bg_Haka_Sgami,8097C3E0
+ovl_En_Heishi2,8097D000
+ovl_En_Encount2,8097F200
+ovl_En_Fire_Rock,80980430
+ovl_En_Brob,80981540
+ovl_Mir_Ray,80982630
+ovl_Bg_Spot09_Obj,80983EF0
+ovl_Bg_Spot18_Obj,80984400
+ovl_Boss_Va,80984CD0
+ovl_Bg_Haka_Tubo,8099BEC0
+ovl_Bg_Haka_Trap,8099C8E0
+ovl_Bg_Haka_Huta,8099DEB0
+ovl_Bg_Haka_Zou,8099E950
+ovl_Bg_Spot17_Funen,8099FB40
+ovl_En_Syateki_Itm,8099FD90
+ovl_En_Syateki_Man,809A0B30
+ovl_En_Tana,809A18F0
+ovl_En_Nb,809A1B90
+ovl_Boss_Mo,809A6160
+ovl_En_Sb,809B6210
+ovl_En_Bigokuta,809B7650
+ovl_En_Karebaba,809BA160
+ovl_Bg_Bdan_Objects,809BBA50
+ovl_Demo_Sa,809BCD20
+ovl_Demo_Go,809BF840
+ovl_En_In,809C05A0
+ovl_En_Tr,809C3300
+ovl_Bg_Spot16_Bombstone,809C4C00
+ovl_Bg_Hidan_Kowarerukabe,809C6140
+ovl_Bg_Bombwall,809C7010
+ovl_En_Ru2,809C78D0
+ovl_Obj_Dekujr,809CA650
+ovl_Bg_Mizu_Uzu,809CAC90
+ovl_Bg_Spot06_Objects,809CAE60
+ovl_Bg_Ice_Objects,809CC270
+ovl_Bg_Haka_Water,809CD1B0
+ovl_En_Ma2,809CD990
+ovl_En_Bom_Chu,809CE9F0
+ovl_En_Horse_Game_Check,809D0090
+ovl_Boss_Tw,809D1160
+ovl_En_Rr,809E6C60
+ovl_En_Ba,809E9180
+ovl_En_Bx,809EB050
+ovl_En_Anubice,809EBB40
+ovl_En_Anubice_Fire,809ECDF0
+ovl_Bg_Mori_Hashigo,809EDBB0
+ovl_Bg_Mori_Hashira4,809EE470
+ovl_Bg_Mori_Idomizu,809EEA00
+ovl_Bg_Spot16_Doughnut,809EF040
+ovl_Bg_Bdan_Switch,809EF5F0
+ovl_En_Ma1,809F0A20
+ovl_Boss_Ganon,809F1D00
+ovl_Boss_Sst,80A17AF0
+ovl_En_Ny,80A24050
+ovl_En_Fr,80A25980
+ovl_Item_Shield,80A28410
+ovl_Bg_Ice_Shelter,80A28E20
+ovl_En_Ice_Hono,80A2A050
+ovl_Item_Ocarina,80A2B240
+ovl_Magic_Dark,80A2BA10
+ovl_Demo_6K,80A2D260
+ovl_En_Anubice_Tag,80A2FF70
+ovl_Bg_Haka_Gate,80A30240
+ovl_Bg_Spot15_Saku,80A312D0
+ovl_Bg_Jya_Goroiwa,80A31610
+ovl_Bg_Jya_Zurerukabe,80A31D90
+ovl_Bg_Jya_Cobra,80A32440
+ovl_Bg_Jya_Kanaami,80A34160
+ovl_Fishing,80A34510
+ovl_Obj_Oshihiki,80A4EFC0
+ovl_Bg_Gate_Shutter,80A50A70
+ovl_Eff_Dust,80A50EF0
+ovl_Bg_Spot01_Fusya,80A522D0
+ovl_Bg_Spot01_Idohashira,80A52570
+ovl_Bg_Spot01_Idomizu,80A53170
+ovl_Bg_Po_Syokudai,80A53480
+ovl_Bg_Ganon_Otyuka,80A53DD0
+ovl_Bg_Spot15_Rrbox,80A56410
+ovl_Bg_Umajump,80A571F0
+ovl_En_Insect,80A57380
+ovl_En_Butte,80A598A0
+ovl_En_Fish,80A5AE70
+ovl_Bg_Spot08_Iceblock,80A5CF80
+ovl_Item_Etcetera,80A5DFC0
+ovl_Arrow_Fire,80A5E890
+ovl_Arrow_Ice,80A60750
+ovl_Arrow_Light,80A62630
+ovl_Obj_Kibako,80A64520
+ovl_Obj_Tsubo,80A65220
+ovl_En_Wonder_Item,80A66210
+ovl_En_Ik,80A66F40
+ovl_Demo_Ik,80A6B580
+ovl_En_Skj,80A6CA90
+ovl_En_Skjneedle,80A703D0
+ovl_En_G_Switch,80A706E0
+ovl_Demo_Ext,80A71F10
+ovl_Demo_Shd,80A72850
+ovl_En_Dns,80A74C60
+ovl_Elf_Msg,80A75FF0
+ovl_En_Honotrap,80A765E0
+ovl_En_Tubo_Trap,80A77B30
+ovl_Obj_Ice_Poly,80A787D0
+ovl_Bg_Spot03_Taki,80A79180
+ovl_Bg_Spot07_Taki,80A79A70
+ovl_En_Fz,80A7A030
+ovl_En_Po_Relay,80A7C040
+ovl_Bg_Relay_Objects,80A7D750
+ovl_En_Diving_Game,80A7DF00
+ovl_En_Kusa,80A7F8B0
+ovl_Obj_Bean,80A80D90
+ovl_Obj_Bombiwa,80A83520
+ovl_Obj_Switch,80A83A90
+ovl_Obj_Elevator,80A85850
+ovl_Obj_Lift,80A85C10
+ovl_Obj_Hsblock,80A86630
+ovl_En_Okarina_Tag,80A86C00
+ovl_En_Yabusame_Mark,80A880E0
+ovl_En_Goroiwa,80A887B0
+ovl_En_Ex_Ruppy,80A8AB70
+ovl_En_Toryo,80A8BC30
+ovl_En_Daiku,80A8C8C0
+ovl_En_Nwc,80A8E000
+ovl_En_Blkobj,80A8EA40
+ovl_Item_Inbox,80A8EFA0
+ovl_En_Ge1,80A8F100
+ovl_Obj_Blockstop,80A91130
+ovl_En_Sda,80A912D0
+ovl_En_Clear_Tag,80A929D0
+ovl_En_Niw_Lady,80A9DF70
+ovl_En_Gm,80A9F850
+ovl_En_Ms,80AA0580
+ovl_En_Hs,80AA0C70
+ovl_Bg_Ingate,80AA1810
+ovl_En_Kanban,80AA1BA0
+ovl_En_Heishi3,80AA4CF0
+ovl_En_Syateki_Niw,80AA56C0
+ovl_En_Attack_Niw,80AA7750
+ovl_Bg_Spot01_Idosoko,80AA89B0
+ovl_En_Sa,80AA8BC0
+ovl_En_Wonder_Talk,80AAAE30
+ovl_Bg_Gjyo_Bridge,80AAB4C0
+ovl_En_Ds,80AAB9C0
+ovl_En_Mk,80AAC5E0
+ovl_En_Bom_Bowl_Man,80AAD470
+ovl_En_Bom_Bowl_Pit,80AAE9B0
+ovl_En_Owl,80AAF320
+ovl_En_Ishi,80AB2EC0
+ovl_Obj_Hana,80ABC010
+ovl_Obj_Lightswitch,80ABC320
+ovl_Obj_Mure2,80ABD750
+ovl_En_Go,80ABE170
+ovl_En_Fu,80AC27B0
+ovl_En_Changer,80AC3500
+ovl_Bg_Jya_Megami,80AC3EE0
+ovl_Bg_Jya_Lift,80AC50C0
+ovl_Bg_Jya_Bigmirror,80AC5610
+ovl_Bg_Jya_Bombchuiwa,80AC5E50
+ovl_Bg_Jya_Amishutter,80AC6980
+ovl_Bg_Jya_Bombiwa,80AC6D10
+ovl_Bg_Spot18_Basket,80AC72D0
+ovl_En_Ganon_Organ,80AC82C0
+ovl_En_Siofuki,80ACF2C0
+ovl_En_Stream,80AD0070
+ovl_En_Mm,80AD0600
+ovl_En_Ko,80AD1C20
+ovl_En_Kz,80AD5D60
+ovl_En_Weather_Tag,80AD7270
+ovl_Bg_Sst_Floor,80AD8160
+ovl_En_Ani,80AD86C0
+ovl_En_Ex_Item,80AD9430
+ovl_Bg_Jya_Ironobj,80ADA5A0
+ovl_En_Js,80ADB350
+ovl_En_Jsjutan,80ADBD20
+ovl_En_Cs,80AE1640
+ovl_En_Md,80AE2870
+ovl_En_Hy,80AE4EE0
+ovl_En_Ganon_Mant,80AE8820
+ovl_En_Okarina_Effect,80AECA40
+ovl_En_Mag,80AECDF0
+ovl_Door_Gerudo,80AF1D00
+ovl_Elf_Msg2,80AF22F0
+ovl_Demo_Gt,80AF2760
+ovl_En_Po_Field,80AF7D60
+ovl_Efc_Erupc,80AFB7D0
+ovl_Bg_Zg,80AFC2B0
+ovl_En_Heishi4,80AFC720
+ovl_En_Zl3,80AFD620
+ovl_Boss_Ganon2,80B05470
+ovl_En_Kakasi,80B18280
+ovl_En_Takara_Man,80B18FC0
+ovl_Obj_Makeoshihiki,80B19880
+ovl_Oceff_Spot,80B19D10
+ovl_End_Title,80B1AC40
+ovl_En_Torch,80B1ED70
+ovl_Demo_Ec,80B1EE60
+ovl_Shot_Sun,80B226C0
+ovl_En_Dy_Extra,80B22D80
+ovl_En_Wonder_Talk2,80B23300
+ovl_En_Ge2,80B239A0
+ovl_Obj_Roomtimer,80B25340
+ovl_En_Ssh,80B25590
+ovl_En_Sth,80B27B80
+ovl_Oceff_Wipe,80B2BC30
+ovl_Effect_Ss_Dust,80B2C980
+ovl_Effect_Ss_KiraKira,80B2D1B0
+ovl_Effect_Ss_Bomb,80B2D820
+ovl_Effect_Ss_Bomb2,80B2DC40
+ovl_Effect_Ss_Blast,80B2E570
+ovl_Effect_Ss_G_Spk,80B2E900
+ovl_Effect_Ss_D_Fire,80B2EEB0
+ovl_Effect_Ss_Bubble,80B2F3A0
+ovl_Effect_Ss_G_Ripple,80B2F820
+ovl_Effect_Ss_G_Splash,80B2FD80
+ovl_Effect_Ss_G_Magma,80B30230
+ovl_Effect_Ss_G_Fire,80B30490
+ovl_Effect_Ss_Lightning,80B30720
+ovl_Effect_Ss_Dt_Bubble,80B30DF0
+ovl_Effect_Ss_Hahen,80B31380
+ovl_Effect_Ss_Stick,80B319C0
+ovl_Effect_Ss_Sibuki,80B31D60
+ovl_Effect_Ss_Sibuki2,80B32430
+ovl_Effect_Ss_G_Magma2,80B32760
+ovl_Effect_Ss_Stone1,80B32C70
+ovl_Effect_Ss_HitMark,80B33000
+ovl_Effect_Ss_Fhg_Flash,80B33550
+ovl_Effect_Ss_K_Fire,80B344D0
+ovl_Effect_Ss_Solder_Srch_Ball,80B34900
+ovl_Effect_Ss_Kakera,80B34AB0
+ovl_Effect_Ss_Ice_Piece,80B35B40
+ovl_Effect_Ss_En_Ice,80B35F80
+ovl_Effect_Ss_Fire_Tail,80B36790
+ovl_Effect_Ss_En_Fire,80B36E90
+ovl_Effect_Ss_Extra,80B375D0
+ovl_Effect_Ss_Fcircle,80B37990
+ovl_Effect_Ss_Dead_Db,80B37E40
+ovl_Effect_Ss_Dead_Dd,80B38320
+ovl_Effect_Ss_Dead_Ds,80B388B0
+ovl_Effect_Ss_Dead_Sound,80B38D30
+ovl_Oceff_Storm,80B38E70
+ovl_En_Weiyer,80B3AA10
+ovl_Bg_Spot05_Soko,80B3C410
+ovl_Bg_Jya_1flift,80B3C730
+ovl_Bg_Jya_Haheniron,80B3CDC0
+ovl_Bg_Spot12_Gate,80B3D5B0
+ovl_Bg_Spot12_Saku,80B3D9C0
+ovl_En_Hintnuts,80B3DE80
+ovl_En_Nutsball,80B3F8B0
+ovl_Bg_Spot00_Break,80B3FED0
+ovl_En_Shopnuts,80B40070
+ovl_En_It,80B40F80
+ovl_En_GeldB,80B41110
+ovl_Oceff_Wipe2,80B464C0
+ovl_Oceff_Wipe3,80B47C30
+ovl_En_Niw_Girl,80B49380
+ovl_En_Dog,80B49E50
+ovl_En_Si,80B4B000
+ovl_Bg_Spot01_Objects2,80B4B500
+ovl_Obj_Comb,80B4B9C0
+ovl_Bg_Spot11_Bakudankabe,80B4C220
+ovl_Obj_Kibako2,80B4C860
+ovl_En_Dnt_Demo,80B4CF20
+ovl_En_Dnt_Jiji,80B4DC40
+ovl_En_Dnt_Nomal,80B4F150
+ovl_En_Guest,80B51F50
+ovl_Bg_Bom_Guard,80B528F0
+ovl_En_Hs2,80B52B10
+ovl_Demo_Kekkai,80B530F0
+ovl_Bg_Spot08_Bakudankabe,80B543D0
+ovl_Bg_Spot17_Bakudankabe,80B54A70
+ovl_Obj_Mure3,80B55150
+ovl_En_Tg,80B55920
+ovl_En_Mu,80B55FF0
+ovl_En_Go2,80B56910
+ovl_En_Wf,80B5C930
+ovl_En_Skb,80B60C40
+ovl_Demo_Gj,80B62530
+ovl_Demo_Geff,80B661E0
+ovl_Bg_Gnd_Firemeiro,80B66A00
+ovl_Bg_Gnd_Darkmeiro,80B66F40
+ovl_Bg_Gnd_Soulmeiro,80B67700
+ovl_Bg_Gnd_Nisekabe,80B67F60
+ovl_Bg_Gnd_Iceblock,80B680D0
+ovl_Bg_Ydan_Sp,80B691D0
+ovl_En_Gb,80B6A940
+ovl_En_Gs,80B6C070
+ovl_Bg_Mizu_Bwall,80B6DF10
+ovl_Bg_Mizu_Shutter,80B6F3E0
+ovl_En_Daiku_Kakariko,80B6FBE0
+ovl_Bg_Bowl_Wall,80B70FA0
+ovl_En_Wall_Tubo,80B71920
+ovl_En_Po_Desert,80B71E10
+ovl_En_Crow,80B72BD0
+ovl_Door_Killer,80B74270
+ovl_Bg_Spot11_Oasis,80B757E0
+ovl_Bg_Spot18_Futa,80B75F10
+ovl_Bg_Spot18_Shutter,80B760B0
+ovl_En_Ma3,80B76600
+ovl_En_Cow,80B77570
+ovl_Bg_Ice_Turara,80B789D0
+ovl_Bg_Ice_Shutter,80B79200
+ovl_En_Kakasi2,80B79670
+ovl_En_Kakasi3,80B79D90
+ovl_Oceff_Wipe4,80B7AE70
+ovl_En_Eg,80B7BE50
+ovl_Bg_Menkuri_Nisekabe,80B7C000
+ovl_En_Zo,80B7C150
+ovl_Effect_Ss_Ice_Smoke,80B7E700
+ovl_Obj_Makekinsuta,80B7EBC0
+ovl_En_Ge3,80B7ED10
+ovl_Obj_Timeblock,80B7F860
+ovl_Obj_Hamishi,80B804A0
+ovl_En_Zl4,80B80CF0
+ovl_En_Mm2,80B85720
+ovl_Bg_Jya_Block,80B864E0
+ovl_Obj_Warp2block,80B86750
+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,
+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,
+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,
+market_day_scene,
+market_day_room_0,
+market_night_scene,
+market_night_room_0,
+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,
+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,
+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,
+kenjyanoma_scene,
+kenjyanoma_room_0,
+tokinoma_scene,
+tokinoma_room_0,
+tokinoma_room_1,
+link_home_scene,
+link_home_room_0,
+kokiri_shop_scene,
+kokiri_shop_room_0,
+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,
+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,
+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,
+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,
+moribossroom_scene,
+moribossroom_room_0,
+moribossroom_room_1,
+syatekijyou_scene,
+syatekijyou_room_0,
+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,
+shop1_scene,
+shop1_room_0,
+hairal_niwa_scene,
+hairal_niwa_room_0,
+ganon_tou_scene,
+ganon_tou_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,
+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,
+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,
+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,
+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,
+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,
+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,
+HAKAdanCH_scene,
+HAKAdanCH_room_0,
+HAKAdanCH_room_1,
+HAKAdanCH_room_2,
+HAKAdanCH_room_3,
+HAKAdanCH_room_4,
+HAKAdanCH_room_5,
+HAKAdanCH_room_6,
+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,
+face_shop_scene,
+face_shop_room_0,
+kinsuta_scene,
+kinsuta_room_0,
+ganontikasonogo_scene,
+ganontikasonogo_room_0,
+ganontikasonogo_room_1,
+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/ntsc-1.1/checksum-JP-compressed.md5 b/baseroms/ntsc-1.1/checksum-JP-compressed.md5
new file mode 100644
index 0000000000..f02c9c055f
--- /dev/null
+++ b/baseroms/ntsc-1.1/checksum-JP-compressed.md5
@@ -0,0 +1 @@
+1bf5f42b98c3e97948f01155f12e2d88 build/ntsc-1.1/oot-ntsc-1.1-compressed.z64
diff --git a/baseroms/ntsc-1.1/checksum-JP.md5 b/baseroms/ntsc-1.1/checksum-JP.md5
new file mode 100644
index 0000000000..771035379f
--- /dev/null
+++ b/baseroms/ntsc-1.1/checksum-JP.md5
@@ -0,0 +1 @@
+8b07c719217cb89334edf481a52ef392 build/ntsc-1.1/oot-ntsc-1.1.z64
diff --git a/baseroms/ntsc-1.1/checksum-US-compressed.md5 b/baseroms/ntsc-1.1/checksum-US-compressed.md5
new file mode 100644
index 0000000000..4d13bee152
--- /dev/null
+++ b/baseroms/ntsc-1.1/checksum-US-compressed.md5
@@ -0,0 +1 @@
+721fdcc6f5f34be55c43a807f2a16af4 build/ntsc-1.1/oot-ntsc-1.1-compressed.z64
diff --git a/baseroms/ntsc-1.1/checksum-US.md5 b/baseroms/ntsc-1.1/checksum-US.md5
new file mode 100644
index 0000000000..df5611fe03
--- /dev/null
+++ b/baseroms/ntsc-1.1/checksum-US.md5
@@ -0,0 +1 @@
+a11496a4abcd9f173f2f2a342a6370d2 build/ntsc-1.1/oot-ntsc-1.1.z64
diff --git a/baseroms/ntsc-1.1/config.yml b/baseroms/ntsc-1.1/config.yml
new file mode 100644
index 0000000000..2317ae2dac
--- /dev/null
+++ b/baseroms/ntsc-1.1/config.yml
@@ -0,0 +1,1219 @@
+checksums:
+ - checksum-JP
+ - checksum-US
+dmadata_start: 0x7430
+text_lang: NTSC
+incbins:
+ - name: ipl3
+ segment: makerom
+ vram: 0x80000040
+ size: 0xFC0
+ - name: rspbootText
+ segment: boot
+ vram: 0x800060B0
+ size: 0x160
+ - name: aspMainText
+ segment: code
+ vram: 0x800E3180
+ size: 0xFB0
+ - name: gspF3DZEX2_NoN_PosLight_fifoText
+ segment: code
+ vram: 0x800E4130
+ size: 0x1390
+ - name: gspS2DEX2d_fifoText
+ segment: code
+ vram: 0x800E54C0
+ size: 0x18C0
+ - name: njpgdspMainText
+ segment: code
+ vram: 0x800E6D80
+ size: 0xAF0
+ - name: aspMainData
+ segment: code
+ vram: 0x801144A0
+ size: 0x2E0
+ - name: gspF3DZEX2_NoN_PosLight_fifoData
+ segment: code
+ vram: 0x80114780
+ size: 0x420
+ - name: gspS2DEX2d_fifoData
+ segment: code
+ vram: 0x80114BA0
+ size: 0x390
+ - name: njpgdspMainData
+ segment: code
+ vram: 0x80114F30
+ size: 0x60
+variables:
+ gIdentityMtx: 0x800FEF70
+ sJpnMessageEntryTable: 0x8010AB0C
+ sNesMessageEntryTable: 0x8010EC4C
+ sStaffMessageEntryTable: 0x80112E6C
+ gSoundFontTable: 0x80113900
+ gSequenceFontTable: 0x80113B70
+ gSequenceTable: 0x80113D30
+ gSampleBankTable: 0x80114420
+ sShadowTex: 0x80AE0C80
+assets:
+- name: code/fbdemo_circle
+ xml_path: assets/xml/code/fbdemo_circle.xml
+ start_offset: 0xEC268
+ end_offset: 0xED558
+- name: code/fbdemo_triforce
+ xml_path: assets/xml/code/fbdemo_triforce.xml
+ start_offset: 0xEB6F0
+ end_offset: 0xEB7C0
+- name: code/fbdemo_wipe1
+ xml_path: assets/xml/code/fbdemo_wipe1.xml
+ start_offset: 0xEB7C0
+ end_offset: 0xEC248
+- name: n64dd/error_textures
+ xml_path: assets/xml/n64dd/error_textures.xml
+ start_offset: 0xC140
+ end_offset: 0x11D40
+- 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.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.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.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.xml
+- name: objects/object_fd2
+ xml_path: assets/xml/objects/object_fd2.xml
+- name: objects/object_fhg
+ xml_path: assets/xml/objects/object_fhg.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.xml
+- name: objects/object_ganon2
+ xml_path: assets/xml/objects/object_ganon2.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.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.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.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.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.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.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.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: 0x960
+ end_offset: 0x1D80
+- name: overlays/ovl_Arrow_Ice
+ xml_path: assets/xml/overlays/ovl_Arrow_Ice.xml
+ start_offset: 0x980
+ end_offset: 0x1DA0
+- name: overlays/ovl_Arrow_Light
+ xml_path: assets/xml/overlays/ovl_Arrow_Light.xml
+ start_offset: 0x990
+ end_offset: 0x1DB0
+- name: overlays/ovl_Bg_Ganon_Otyuka
+ xml_path: assets/xml/overlays/ovl_Bg_Ganon_Otyuka.xml
+ start_offset: 0x1110
+ end_offset: 0x24EC
+- name: overlays/ovl_Bg_Jya_Cobra
+ xml_path: assets/xml/overlays/ovl_Bg_Jya_Cobra.xml
+ start_offset: 0x1830
+ end_offset: 0x18A8
+- name: overlays/ovl_Boss_Dodongo
+ xml_path: assets/xml/overlays/ovl_Boss_Dodongo.xml
+ start_offset: 0x61C8
+ end_offset: 0x91C8
+- name: overlays/ovl_Boss_Ganon
+ xml_path: assets/xml/overlays/ovl_Boss_Ganon.xml
+ start_offset: 0xE398
+ end_offset: 0x20EB8
+- name: overlays/ovl_Boss_Ganon2
+ xml_path: assets/xml/overlays/ovl_Boss_Ganon2.xml
+ start_offset: 0x9F48
+ end_offset: 0x103F8
+- name: overlays/ovl_Boss_Sst
+ xml_path: assets/xml/overlays/ovl_Boss_Sst.xml
+ start_offset: 0xA330
+ end_offset: 0xACE0
+- name: overlays/ovl_Demo_Shd
+ xml_path: assets/xml/overlays/ovl_Demo_Shd.xml
+ start_offset: 0x410
+ end_offset: 0x2390
+- name: overlays/ovl_Effect_Ss_Fhg_Flash
+ xml_path: assets/xml/overlays/ovl_Effect_Ss_Fhg_Flash.xml
+ start_offset: 0x9F0
+ end_offset: 0xEA8
+- name: overlays/ovl_En_Bili
+ xml_path: assets/xml/overlays/ovl_En_Bili.xml
+ start_offset: 0x1E40
+ end_offset: 0x1E60
+- name: overlays/ovl_En_Clear_Tag
+ xml_path: assets/xml/overlays/ovl_En_Clear_Tag.xml
+ start_offset: 0x2600
+ end_offset: 0x8900
+- name: overlays/ovl_En_Ganon_Mant
+ xml_path: assets/xml/overlays/ovl_En_Ganon_Mant.xml
+ start_offset: 0x11E8
+ end_offset: 0x40E8
+- name: overlays/ovl_En_Ganon_Organ
+ xml_path: assets/xml/overlays/ovl_En_Ganon_Organ.xml
+ start_offset: 0x328
+ end_offset: 0x6EB0
+- name: overlays/ovl_En_Holl
+ xml_path: assets/xml/overlays/ovl_En_Holl.xml
+ start_offset: 0xE68
+ end_offset: 0xED0
+- name: overlays/ovl_En_Jsjutan
+ xml_path: assets/xml/overlays/ovl_En_Jsjutan.xml
+ start_offset: 0x12B8
+ end_offset: 0x4C50
+- name: overlays/ovl_En_Kanban
+ xml_path: assets/xml/overlays/ovl_En_Kanban.xml
+ start_offset: 0x2E70
+ end_offset: 0x2F30
+- name: overlays/ovl_En_Sda
+ xml_path: assets/xml/overlays/ovl_En_Sda.xml
+ start_offset: 0x14A8
+ end_offset: 0x1538
+- 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: 0x26A0
+ end_offset: 0x2730
+- name: overlays/ovl_En_Sth
+ xml_path: assets/xml/overlays/ovl_En_Sth.xml
+ start_offset: 0xE60
+ end_offset: 0x3E34
+- name: overlays/ovl_End_Title
+ xml_path: assets/xml/overlays/ovl_End_Title.xml
+ start_offset: 0x6F0
+ end_offset: 0x4098
+- name: overlays/ovl_file_choose
+ xml_path: assets/xml/overlays/ovl_file_choose.xml
+ start_offset: 0xEC50
+ end_offset: 0xF330
+- name: overlays/ovl_Magic_Dark
+ xml_path: assets/xml/overlays/ovl_Magic_Dark.xml
+ start_offset: 0xC90
+ end_offset: 0x16C0
+- name: overlays/ovl_Magic_Fire
+ xml_path: assets/xml/overlays/ovl_Magic_Fire.xml
+ start_offset: 0xB20
+ end_offset: 0x2170
+- name: overlays/ovl_Magic_Wind
+ xml_path: assets/xml/overlays/ovl_Magic_Wind.xml
+ start_offset: 0x6A0
+ end_offset: 0x1BB8
+- name: overlays/ovl_Oceff_Spot
+ xml_path: assets/xml/overlays/ovl_Oceff_Spot.xml
+ start_offset: 0x780
+ end_offset: 0xE58
+- name: overlays/ovl_Oceff_Storm
+ xml_path: assets/xml/overlays/ovl_Oceff_Storm.xml
+ start_offset: 0x740
+ end_offset: 0x1AD0
+- name: overlays/ovl_Oceff_Wipe
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe.xml
+ start_offset: 0x4F0
+ end_offset: 0xCB0
+- name: overlays/ovl_Oceff_Wipe2
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe2.xml
+ start_offset: 0x430
+ end_offset: 0x1698
+- name: overlays/ovl_Oceff_Wipe3
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe3.xml
+ start_offset: 0x430
+ end_offset: 0x1678
+- name: overlays/ovl_Oceff_Wipe4
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe4.xml
+ start_offset: 0x410
+ end_offset: 0xEF8
+- name: scenes/dungeons/bdan
+ xml_path: assets/xml/scenes/dungeons/bdan.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.xml
+- name: scenes/dungeons/ddan
+ xml_path: assets/xml/scenes/dungeons/ddan.xml
+- name: scenes/dungeons/ddan_boss
+ xml_path: assets/xml/scenes/dungeons/ddan_boss.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.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.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.xml
+- name: scenes/dungeons/HIDAN
+ xml_path: assets/xml/scenes/dungeons/HIDAN.xml
+- name: scenes/dungeons/ice_doukutu
+ xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
+- name: scenes/dungeons/jyasinboss
+ xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
+- name: scenes/dungeons/jyasinzou
+ xml_path: assets/xml/scenes/dungeons/jyasinzou.xml
+- name: scenes/dungeons/men
+ xml_path: assets/xml/scenes/dungeons/men.xml
+- name: scenes/dungeons/MIZUsin
+ xml_path: assets/xml/scenes/dungeons/MIZUsin.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.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_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.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.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: textures/backgrounds
+ xml_path: assets/xml/textures/backgrounds.xml
+- name: textures/do_action_static
+ xml_path: assets/xml/textures/do_action_static.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_gameover_static
+ xml_path: assets/xml/textures/icon_item_gameover_static.xml
+- name: textures/icon_item_jpn_static
+ xml_path: assets/xml/textures/icon_item_jpn_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.xml
+- name: textures/item_name_static
+ xml_path: assets/xml/textures/item_name_static.xml
+- name: textures/kanji
+ xml_path: assets/xml/textures/kanji.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.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.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.xml
+- name: textures/skyboxes
+ xml_path: assets/xml/textures/skyboxes.xml
+- name: textures/title_static
+ xml_path: assets/xml/textures/title_static.xml
diff --git a/baseroms/ntsc-1.1/segments.csv b/baseroms/ntsc-1.1/segments.csv
new file mode 100644
index 0000000000..78f80b081e
--- /dev/null
+++ b/baseroms/ntsc-1.1/segments.csv
@@ -0,0 +1,1511 @@
+Name,VRAM start
+makerom,80000000
+boot,80000460
+dmadata,
+Audiobank,
+Audioseq,
+Audiotable,
+kanji,
+link_animetion,
+icon_item_static,
+icon_item_24_static,
+icon_item_field_static,
+icon_item_dungeon_static,
+icon_item_gameover_static,
+icon_item_jpn_static,
+icon_item_nes_static,
+item_name_static,
+map_name_static,
+do_action_static,
+message_static,
+jpn_message_data_static,
+message_texture_static,
+nes_font_static,
+nes_message_data_static,
+staff_message_data_static,
+map_grand_static,
+map_i_static,
+map_48x85_static,
+code,800110A0
+n64dd,801C7040
+ovl_title,80800000
+ovl_select,808009C0
+ovl_opening,80803720
+ovl_file_choose,80803880
+ovl_kaleido_scope,808137C0
+ovl_player_actor,808301C0
+ovl_map_mark_data,80856810
+ovl_En_Test,8085D370
+ovl_En_GirlA,80862C20
+ovl_En_Part,80865540
+ovl_En_Light,80866B50
+ovl_En_Door,80867940
+ovl_En_Box,80868780
+ovl_En_Poh,8086A2C0
+ovl_En_Okuta,8086E450
+ovl_En_Bom,80870A30
+ovl_En_Wallmas,80871900
+ovl_En_Dodongo,80873310
+ovl_En_Firefly,808760B0
+ovl_En_Horse,80878220
+ovl_En_Arrow,80884440
+ovl_En_Elf,80885B30
+ovl_En_Niw,8088A4F0
+ovl_En_Tite,8088D820
+ovl_En_Reeba,808905C0
+ovl_En_Peehat,80892030
+ovl_En_Holl,80895730
+ovl_En_Scene_Change,80896700
+ovl_En_Zf,80896830
+ovl_En_Hata,8089D330
+ovl_Boss_Dodongo,8089D8C0
+ovl_Boss_Goma,808A73A0
+ovl_En_Zl1,808AD320
+ovl_En_Viewer,808B1120
+ovl_En_Goma,808B3FF0
+ovl_Bg_Pushbox,808B6C80
+ovl_En_Bubble,808B6F80
+ovl_Door_Shutter,808B83A0
+ovl_En_Dodojr,808BA620
+ovl_En_Bdfire,808BC4C0
+ovl_En_Boom,808BD050
+ovl_En_Torch2,808BD910
+ovl_En_Bili,808C00B0
+ovl_En_Tp,808C2380
+ovl_En_St,808C41D0
+ovl_En_Bw,808C6E40
+ovl_En_Eiyer,808CA1A0
+ovl_En_River_Sound,808CBE00
+ovl_En_Horse_Normal,808CC790
+ovl_En_Ossan,808CEDB0
+ovl_Bg_Treemouth,808D5390
+ovl_Bg_Dodoago,808D69E0
+ovl_Bg_Hidan_Dalm,808D7790
+ovl_Bg_Hidan_Hrock,808D7FE0
+ovl_En_Horse_Ganon,808D8810
+ovl_Bg_Hidan_Rock,808D9590
+ovl_Bg_Hidan_Rsekizou,808DA680
+ovl_Bg_Hidan_Sekizou,808DB260
+ovl_Bg_Hidan_Sima,808DC6B0
+ovl_Bg_Hidan_Syoku,808DD5D0
+ovl_En_Xc,808DDA30
+ovl_Bg_Hidan_Curtain,808E41C0
+ovl_Bg_Spot00_Hanebasi,808E4C60
+ovl_En_Mb,808E5D70
+ovl_En_Bombf,808E9F00
+ovl_Bg_Hidan_Firewall,808EB370
+ovl_Bg_Dy_Yoseizo,808EBAD0
+ovl_En_Zl2,808EE8D0
+ovl_Bg_Hidan_Fslift,808F3000
+ovl_En_OE2,808F34D0
+ovl_Bg_Ydan_Hasi,808F35B0
+ovl_Bg_Ydan_Maruta,808F3D60
+ovl_Boss_Ganondrof,808F4440
+ovl_En_Am,808F91B0
+ovl_En_Dekubaba,808FB5B0
+ovl_En_M_Fire1,808FF050
+ovl_En_M_Thunder,808FF1F0
+ovl_Bg_Ddan_Jd,809007E0
+ovl_Bg_Breakwall,80900E30
+ovl_En_Jj,80901CA0
+ovl_En_Horse_Zelda,80903270
+ovl_Bg_Ddan_Kd,80903D60
+ovl_Door_Warp1,80904650
+ovl_Obj_Syokudai,80908900
+ovl_Item_B_Heart,80909540
+ovl_En_Dekunuts,80909930
+ovl_Bg_Menkuri_Kaiten,8090B130
+ovl_Bg_Menkuri_Eye,8090B2C0
+ovl_En_Vali,8090B760
+ovl_Bg_Mizu_Movebg,8090DE00
+ovl_Bg_Mizu_Water,8090EFA0
+ovl_Arms_Hook,8090FC70
+ovl_En_fHG,809109D0
+ovl_Bg_Mori_Hineri,80913300
+ovl_En_Bb,80913FD0
+ovl_Bg_Toki_Hikari,80917CA0
+ovl_En_Yukabyun,80918A40
+ovl_Bg_Toki_Swd,80919050
+ovl_En_Fhg_Fire,8091A6A0
+ovl_Bg_Mjin,8091CCC0
+ovl_Bg_Hidan_Kousi,8091D0A0
+ovl_Door_Toki,8091D620
+ovl_Bg_Hidan_Hamstep,8091D780
+ovl_En_Bird,8091E610
+ovl_En_Wood02,8091EAD0
+ovl_En_Lightbox,8091FCB0
+ovl_En_Pu_box,80920130
+ovl_En_Trap,80920470
+ovl_En_Arow_Trap,80921710
+ovl_En_Vase,80921860
+ovl_En_Ta,80921960
+ovl_En_Tk,80925320
+ovl_Bg_Mori_Bigst,80927150
+ovl_Bg_Mori_Elevator,80927A80
+ovl_Bg_Mori_Kaitenkabe,80928570
+ovl_Bg_Mori_Rakkatenjo,80928BD0
+ovl_En_Vm,80929540
+ovl_Demo_Effect,8092ADF0
+ovl_Demo_Kankyo,809308F0
+ovl_Bg_Hidan_Fwbig,809345F0
+ovl_En_Floormas,809352D0
+ovl_En_Heishi1,809386B0
+ovl_En_Rd,80939BC0
+ovl_En_Po_Sisters,8093C470
+ovl_Bg_Heavy_Block,80941160
+ovl_Bg_Po_Event,80942A50
+ovl_Obj_Mure,80944890
+ovl_En_Sw,809458A0
+ovl_Boss_Fd,80949090
+ovl_Object_Kankyo,809503C0
+ovl_En_Du,809535E0
+ovl_En_Fd,80955080
+ovl_En_Horse_Link_Child,80957D40
+ovl_Door_Ana,80959B40
+ovl_Bg_Spot02_Objects,8095A1B0
+ovl_Bg_Haka,8095B500
+ovl_Magic_Wind,8095BBC0
+ovl_Magic_Fire,8095D8C0
+ovl_En_Ru1,8095FB90
+ovl_Boss_Fd2,80967230
+ovl_En_Fd_Fire,8096AF60
+ovl_En_Dh,8096BC70
+ovl_En_Dha,8096D740
+ovl_En_Rl,8096E730
+ovl_En_Encount1,8096F610
+ovl_Demo_Du,80970170
+ovl_Demo_Im,80973950
+ovl_Demo_Tre_Lgt,809778C0
+ovl_En_Fw,80977FD0
+ovl_Bg_Vb_Sima,80979780
+ovl_En_Vb_Ball,80979E90
+ovl_Bg_Haka_Megane,8097B030
+ovl_Bg_Haka_MeganeBG,8097B430
+ovl_Bg_Haka_Ship,8097BAF0
+ovl_Bg_Haka_Sgami,8097C530
+ovl_En_Heishi2,8097D150
+ovl_En_Encount2,8097F350
+ovl_En_Fire_Rock,80980580
+ovl_En_Brob,80981690
+ovl_Mir_Ray,80982780
+ovl_Bg_Spot09_Obj,80984040
+ovl_Bg_Spot18_Obj,80984550
+ovl_Boss_Va,80984E20
+ovl_Bg_Haka_Tubo,8099C010
+ovl_Bg_Haka_Trap,8099CA30
+ovl_Bg_Haka_Huta,8099E000
+ovl_Bg_Haka_Zou,8099EAA0
+ovl_Bg_Spot17_Funen,8099FC90
+ovl_En_Syateki_Itm,8099FEE0
+ovl_En_Syateki_Man,809A0C80
+ovl_En_Tana,809A1A40
+ovl_En_Nb,809A1CE0
+ovl_Boss_Mo,809A62B0
+ovl_En_Sb,809B6360
+ovl_En_Bigokuta,809B77A0
+ovl_En_Karebaba,809BA2B0
+ovl_Bg_Bdan_Objects,809BBBA0
+ovl_Demo_Sa,809BCE70
+ovl_Demo_Go,809BF990
+ovl_En_In,809C06F0
+ovl_En_Tr,809C3450
+ovl_Bg_Spot16_Bombstone,809C4D50
+ovl_Bg_Hidan_Kowarerukabe,809C6290
+ovl_Bg_Bombwall,809C7160
+ovl_En_Ru2,809C7A20
+ovl_Obj_Dekujr,809CA7A0
+ovl_Bg_Mizu_Uzu,809CADE0
+ovl_Bg_Spot06_Objects,809CAFB0
+ovl_Bg_Ice_Objects,809CC3C0
+ovl_Bg_Haka_Water,809CD300
+ovl_En_Ma2,809CDAE0
+ovl_En_Bom_Chu,809CEB40
+ovl_En_Horse_Game_Check,809D01E0
+ovl_Boss_Tw,809D12B0
+ovl_En_Rr,809E6DB0
+ovl_En_Ba,809E92E0
+ovl_En_Bx,809EB1B0
+ovl_En_Anubice,809EBCA0
+ovl_En_Anubice_Fire,809ECF50
+ovl_Bg_Mori_Hashigo,809EDD10
+ovl_Bg_Mori_Hashira4,809EE5D0
+ovl_Bg_Mori_Idomizu,809EEB60
+ovl_Bg_Spot16_Doughnut,809EF1A0
+ovl_Bg_Bdan_Switch,809EF750
+ovl_En_Ma1,809F0B80
+ovl_Boss_Ganon,809F1E60
+ovl_Boss_Sst,80A17C50
+ovl_En_Ny,80A241B0
+ovl_En_Fr,80A25AE0
+ovl_Item_Shield,80A28570
+ovl_Bg_Ice_Shelter,80A28F80
+ovl_En_Ice_Hono,80A2A1B0
+ovl_Item_Ocarina,80A2B3A0
+ovl_Magic_Dark,80A2BB70
+ovl_Demo_6K,80A2D3C0
+ovl_En_Anubice_Tag,80A300D0
+ovl_Bg_Haka_Gate,80A303A0
+ovl_Bg_Spot15_Saku,80A31430
+ovl_Bg_Jya_Goroiwa,80A31770
+ovl_Bg_Jya_Zurerukabe,80A31EF0
+ovl_Bg_Jya_Cobra,80A325A0
+ovl_Bg_Jya_Kanaami,80A342C0
+ovl_Fishing,80A34670
+ovl_Obj_Oshihiki,80A4F120
+ovl_Bg_Gate_Shutter,80A50BD0
+ovl_Eff_Dust,80A51050
+ovl_Bg_Spot01_Fusya,80A52430
+ovl_Bg_Spot01_Idohashira,80A526D0
+ovl_Bg_Spot01_Idomizu,80A532D0
+ovl_Bg_Po_Syokudai,80A535E0
+ovl_Bg_Ganon_Otyuka,80A53F30
+ovl_Bg_Spot15_Rrbox,80A56570
+ovl_Bg_Umajump,80A57350
+ovl_En_Insect,80A574E0
+ovl_En_Butte,80A59A00
+ovl_En_Fish,80A5AFD0
+ovl_Bg_Spot08_Iceblock,80A5D0E0
+ovl_Item_Etcetera,80A5E120
+ovl_Arrow_Fire,80A5E9F0
+ovl_Arrow_Ice,80A608B0
+ovl_Arrow_Light,80A62790
+ovl_Obj_Kibako,80A64680
+ovl_Obj_Tsubo,80A65380
+ovl_En_Wonder_Item,80A66370
+ovl_En_Ik,80A670A0
+ovl_Demo_Ik,80A6B6E0
+ovl_En_Skj,80A6CBF0
+ovl_En_Skjneedle,80A70530
+ovl_En_G_Switch,80A70840
+ovl_Demo_Ext,80A72070
+ovl_Demo_Shd,80A729B0
+ovl_En_Dns,80A74DC0
+ovl_Elf_Msg,80A76150
+ovl_En_Honotrap,80A76740
+ovl_En_Tubo_Trap,80A77C90
+ovl_Obj_Ice_Poly,80A78930
+ovl_Bg_Spot03_Taki,80A792E0
+ovl_Bg_Spot07_Taki,80A79BD0
+ovl_En_Fz,80A7A190
+ovl_En_Po_Relay,80A7C1A0
+ovl_Bg_Relay_Objects,80A7D8B0
+ovl_En_Diving_Game,80A7E060
+ovl_En_Kusa,80A7FA10
+ovl_Obj_Bean,80A80EF0
+ovl_Obj_Bombiwa,80A83680
+ovl_Obj_Switch,80A83BF0
+ovl_Obj_Elevator,80A859B0
+ovl_Obj_Lift,80A85D70
+ovl_Obj_Hsblock,80A86790
+ovl_En_Okarina_Tag,80A86D60
+ovl_En_Yabusame_Mark,80A88260
+ovl_En_Goroiwa,80A88930
+ovl_En_Ex_Ruppy,80A8ACF0
+ovl_En_Toryo,80A8BDB0
+ovl_En_Daiku,80A8CA40
+ovl_En_Nwc,80A8E180
+ovl_En_Blkobj,80A8EBC0
+ovl_Item_Inbox,80A8F120
+ovl_En_Ge1,80A8F280
+ovl_Obj_Blockstop,80A912B0
+ovl_En_Sda,80A91450
+ovl_En_Clear_Tag,80A92B50
+ovl_En_Niw_Lady,80A9E0F0
+ovl_En_Gm,80A9F9F0
+ovl_En_Ms,80AA0720
+ovl_En_Hs,80AA0E10
+ovl_Bg_Ingate,80AA19B0
+ovl_En_Kanban,80AA1D40
+ovl_En_Heishi3,80AA4E90
+ovl_En_Syateki_Niw,80AA5860
+ovl_En_Attack_Niw,80AA78F0
+ovl_Bg_Spot01_Idosoko,80AA8B50
+ovl_En_Sa,80AA8D60
+ovl_En_Wonder_Talk,80AAAFD0
+ovl_Bg_Gjyo_Bridge,80AAB660
+ovl_En_Ds,80AABB60
+ovl_En_Mk,80AAC780
+ovl_En_Bom_Bowl_Man,80AAD610
+ovl_En_Bom_Bowl_Pit,80AAEB50
+ovl_En_Owl,80AAF4C0
+ovl_En_Ishi,80AB3060
+ovl_Obj_Hana,80ABC1B0
+ovl_Obj_Lightswitch,80ABC4C0
+ovl_Obj_Mure2,80ABD8F0
+ovl_En_Go,80ABE310
+ovl_En_Fu,80AC2950
+ovl_En_Changer,80AC36A0
+ovl_Bg_Jya_Megami,80AC4080
+ovl_Bg_Jya_Lift,80AC5260
+ovl_Bg_Jya_Bigmirror,80AC57B0
+ovl_Bg_Jya_Bombchuiwa,80AC5FF0
+ovl_Bg_Jya_Amishutter,80AC6B20
+ovl_Bg_Jya_Bombiwa,80AC6EB0
+ovl_Bg_Spot18_Basket,80AC7470
+ovl_En_Ganon_Organ,80AC8460
+ovl_En_Siofuki,80ACF460
+ovl_En_Stream,80AD0210
+ovl_En_Mm,80AD07A0
+ovl_En_Ko,80AD1DC0
+ovl_En_Kz,80AD5F00
+ovl_En_Weather_Tag,80AD7410
+ovl_Bg_Sst_Floor,80AD8300
+ovl_En_Ani,80AD8860
+ovl_En_Ex_Item,80AD95D0
+ovl_Bg_Jya_Ironobj,80ADA740
+ovl_En_Js,80ADB4F0
+ovl_En_Jsjutan,80ADBEC0
+ovl_En_Cs,80AE17E0
+ovl_En_Md,80AE2A10
+ovl_En_Hy,80AE5080
+ovl_En_Ganon_Mant,80AE89C0
+ovl_En_Okarina_Effect,80AECBE0
+ovl_En_Mag,80AECF90
+ovl_Door_Gerudo,80AF1EA0
+ovl_Elf_Msg2,80AF2490
+ovl_Demo_Gt,80AF2900
+ovl_En_Po_Field,80AF7F00
+ovl_Efc_Erupc,80AFB970
+ovl_Bg_Zg,80AFC450
+ovl_En_Heishi4,80AFC8C0
+ovl_En_Zl3,80AFD7C0
+ovl_Boss_Ganon2,80B05610
+ovl_En_Kakasi,80B18420
+ovl_En_Takara_Man,80B19160
+ovl_Obj_Makeoshihiki,80B19A20
+ovl_Oceff_Spot,80B19EB0
+ovl_End_Title,80B1ADE0
+ovl_En_Torch,80B1EF10
+ovl_Demo_Ec,80B1F000
+ovl_Shot_Sun,80B22860
+ovl_En_Dy_Extra,80B22F20
+ovl_En_Wonder_Talk2,80B234A0
+ovl_En_Ge2,80B23B40
+ovl_Obj_Roomtimer,80B254E0
+ovl_En_Ssh,80B25730
+ovl_En_Sth,80B27D20
+ovl_Oceff_Wipe,80B2BDD0
+ovl_Effect_Ss_Dust,80B2CB20
+ovl_Effect_Ss_KiraKira,80B2D350
+ovl_Effect_Ss_Bomb,80B2D9C0
+ovl_Effect_Ss_Bomb2,80B2DDE0
+ovl_Effect_Ss_Blast,80B2E710
+ovl_Effect_Ss_G_Spk,80B2EAA0
+ovl_Effect_Ss_D_Fire,80B2F050
+ovl_Effect_Ss_Bubble,80B2F540
+ovl_Effect_Ss_G_Ripple,80B2F9C0
+ovl_Effect_Ss_G_Splash,80B2FF20
+ovl_Effect_Ss_G_Magma,80B303D0
+ovl_Effect_Ss_G_Fire,80B30630
+ovl_Effect_Ss_Lightning,80B308C0
+ovl_Effect_Ss_Dt_Bubble,80B30F90
+ovl_Effect_Ss_Hahen,80B31520
+ovl_Effect_Ss_Stick,80B31B60
+ovl_Effect_Ss_Sibuki,80B31F00
+ovl_Effect_Ss_Sibuki2,80B325D0
+ovl_Effect_Ss_G_Magma2,80B32900
+ovl_Effect_Ss_Stone1,80B32E10
+ovl_Effect_Ss_HitMark,80B331A0
+ovl_Effect_Ss_Fhg_Flash,80B336F0
+ovl_Effect_Ss_K_Fire,80B34670
+ovl_Effect_Ss_Solder_Srch_Ball,80B34AA0
+ovl_Effect_Ss_Kakera,80B34C50
+ovl_Effect_Ss_Ice_Piece,80B35CE0
+ovl_Effect_Ss_En_Ice,80B36120
+ovl_Effect_Ss_Fire_Tail,80B369E0
+ovl_Effect_Ss_En_Fire,80B370E0
+ovl_Effect_Ss_Extra,80B37820
+ovl_Effect_Ss_Fcircle,80B37BE0
+ovl_Effect_Ss_Dead_Db,80B38090
+ovl_Effect_Ss_Dead_Dd,80B38570
+ovl_Effect_Ss_Dead_Ds,80B38B00
+ovl_Effect_Ss_Dead_Sound,80B38F80
+ovl_Oceff_Storm,80B390C0
+ovl_En_Weiyer,80B3AC60
+ovl_Bg_Spot05_Soko,80B3C660
+ovl_Bg_Jya_1flift,80B3C980
+ovl_Bg_Jya_Haheniron,80B3D010
+ovl_Bg_Spot12_Gate,80B3D800
+ovl_Bg_Spot12_Saku,80B3DC10
+ovl_En_Hintnuts,80B3E0D0
+ovl_En_Nutsball,80B3FB00
+ovl_Bg_Spot00_Break,80B40120
+ovl_En_Shopnuts,80B402C0
+ovl_En_It,80B411D0
+ovl_En_GeldB,80B41360
+ovl_Oceff_Wipe2,80B46710
+ovl_Oceff_Wipe3,80B47E80
+ovl_En_Niw_Girl,80B495D0
+ovl_En_Dog,80B4A0A0
+ovl_En_Si,80B4B250
+ovl_Bg_Spot01_Objects2,80B4B750
+ovl_Obj_Comb,80B4BC10
+ovl_Bg_Spot11_Bakudankabe,80B4C470
+ovl_Obj_Kibako2,80B4CAB0
+ovl_En_Dnt_Demo,80B4D170
+ovl_En_Dnt_Jiji,80B4DE90
+ovl_En_Dnt_Nomal,80B4F3A0
+ovl_En_Guest,80B521A0
+ovl_Bg_Bom_Guard,80B52B40
+ovl_En_Hs2,80B52D60
+ovl_Demo_Kekkai,80B53340
+ovl_Bg_Spot08_Bakudankabe,80B54620
+ovl_Bg_Spot17_Bakudankabe,80B54CC0
+ovl_Obj_Mure3,80B553A0
+ovl_En_Tg,80B55B70
+ovl_En_Mu,80B56240
+ovl_En_Go2,80B56B60
+ovl_En_Wf,80B5CB80
+ovl_En_Skb,80B60E90
+ovl_Demo_Gj,80B62780
+ovl_Demo_Geff,80B66430
+ovl_Bg_Gnd_Firemeiro,80B66C50
+ovl_Bg_Gnd_Darkmeiro,80B67190
+ovl_Bg_Gnd_Soulmeiro,80B67950
+ovl_Bg_Gnd_Nisekabe,80B681B0
+ovl_Bg_Gnd_Iceblock,80B68320
+ovl_Bg_Ydan_Sp,80B69420
+ovl_En_Gb,80B6AB90
+ovl_En_Gs,80B6C2C0
+ovl_Bg_Mizu_Bwall,80B6E160
+ovl_Bg_Mizu_Shutter,80B6F630
+ovl_En_Daiku_Kakariko,80B6FE30
+ovl_Bg_Bowl_Wall,80B711F0
+ovl_En_Wall_Tubo,80B71B70
+ovl_En_Po_Desert,80B72060
+ovl_En_Crow,80B72E20
+ovl_Door_Killer,80B744C0
+ovl_Bg_Spot11_Oasis,80B75A30
+ovl_Bg_Spot18_Futa,80B76160
+ovl_Bg_Spot18_Shutter,80B76300
+ovl_En_Ma3,80B76850
+ovl_En_Cow,80B777C0
+ovl_Bg_Ice_Turara,80B78C20
+ovl_Bg_Ice_Shutter,80B79450
+ovl_En_Kakasi2,80B798C0
+ovl_En_Kakasi3,80B79FE0
+ovl_Oceff_Wipe4,80B7B0C0
+ovl_En_Eg,80B7C0A0
+ovl_Bg_Menkuri_Nisekabe,80B7C250
+ovl_En_Zo,80B7C3A0
+ovl_Effect_Ss_Ice_Smoke,80B7E950
+ovl_Obj_Makekinsuta,80B7EE10
+ovl_En_Ge3,80B7EF60
+ovl_Obj_Timeblock,80B7FAB0
+ovl_Obj_Hamishi,80B806F0
+ovl_En_Zl4,80B80F40
+ovl_En_Mm2,80B85970
+ovl_Bg_Jya_Block,80B86730
+ovl_Obj_Warp2block,80B869A0
+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,
+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,
+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,
+market_day_scene,
+market_day_room_0,
+market_night_scene,
+market_night_room_0,
+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,
+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,
+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,
+kenjyanoma_scene,
+kenjyanoma_room_0,
+tokinoma_scene,
+tokinoma_room_0,
+tokinoma_room_1,
+link_home_scene,
+link_home_room_0,
+kokiri_shop_scene,
+kokiri_shop_room_0,
+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,
+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,
+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,
+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,
+moribossroom_scene,
+moribossroom_room_0,
+moribossroom_room_1,
+syatekijyou_scene,
+syatekijyou_room_0,
+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,
+shop1_scene,
+shop1_room_0,
+hairal_niwa_scene,
+hairal_niwa_room_0,
+ganon_tou_scene,
+ganon_tou_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,
+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,
+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,
+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,
+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,
+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,
+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,
+HAKAdanCH_scene,
+HAKAdanCH_room_0,
+HAKAdanCH_room_1,
+HAKAdanCH_room_2,
+HAKAdanCH_room_3,
+HAKAdanCH_room_4,
+HAKAdanCH_room_5,
+HAKAdanCH_room_6,
+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,
+face_shop_scene,
+face_shop_room_0,
+kinsuta_scene,
+kinsuta_room_0,
+ganontikasonogo_scene,
+ganontikasonogo_room_0,
+ganontikasonogo_room_1,
+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/ntsc-1.2/config.yml b/baseroms/ntsc-1.2/config.yml
index 9dc77744df..6fc7896db0 100644
--- a/baseroms/ntsc-1.2/config.yml
+++ b/baseroms/ntsc-1.2/config.yml
@@ -2,7 +2,7 @@ checksums:
- checksum-JP
- checksum-US
dmadata_start: 0x7960
-text_lang_pal: false
+text_lang: NTSC
incbins:
- name: ipl3
segment: makerom
@@ -45,7 +45,7 @@ incbins:
vram: 0x80115420
size: 0x60
variables:
- gMtxClear: 0x800FF3F0
+ gIdentityMtx: 0x800FF3F0
sJpnMessageEntryTable: 0x8010AFFC
sNesMessageEntryTable: 0x8010F13C
sStaffMessageEntryTable: 0x8011335C
@@ -58,7 +58,7 @@ assets:
- name: code/fbdemo_circle
xml_path: assets/xml/code/fbdemo_circle.xml
start_offset: 0xEC0B8
- end_offset: 0xED2D8
+ end_offset: 0xED3A8
- name: code/fbdemo_triforce
xml_path: assets/xml/code/fbdemo_triforce.xml
start_offset: 0xEB540
@@ -66,7 +66,7 @@ assets:
- name: code/fbdemo_wipe1
xml_path: assets/xml/code/fbdemo_wipe1.xml
start_offset: 0xEB610
- end_offset: 0xEBFA0
+ end_offset: 0xEC098
- name: n64dd/error_textures
xml_path: assets/xml/n64dd/error_textures.xml
start_offset: 0xC120
@@ -978,7 +978,7 @@ assets:
- name: scenes/dungeons/ddan
xml_path: assets/xml/scenes/dungeons/ddan.xml
- name: scenes/dungeons/ddan_boss
- xml_path: assets/xml/scenes/dungeons/ddan_boss.xml
+ 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
@@ -1006,7 +1006,7 @@ assets:
- name: scenes/dungeons/HIDAN
xml_path: assets/xml/scenes/dungeons/HIDAN.xml
- name: scenes/dungeons/ice_doukutu
- xml_path: assets/xml/scenes/dungeons/ice_doukutu.xml
+ xml_path: assets/xml/scenes/dungeons/ice_doukutu_v2.xml
- name: scenes/dungeons/jyasinboss
xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
- name: scenes/dungeons/jyasinzou
@@ -1148,7 +1148,7 @@ assets:
- name: scenes/overworld/spot15
xml_path: assets/xml/scenes/overworld/spot15.xml
- name: scenes/overworld/spot16
- xml_path: assets/xml/scenes/overworld/spot16.xml
+ 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
@@ -1208,7 +1208,7 @@ assets:
- name: textures/nes_font_static
xml_path: assets/xml/textures/nes_font_static.xml
- name: textures/nintendo_rogo_static
- xml_path: assets/xml/textures/nintendo_rogo_static.xml
+ 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
diff --git a/baseroms/pal-1.0/checksum-compressed.md5 b/baseroms/pal-1.0/checksum-compressed.md5
new file mode 100644
index 0000000000..0689459f03
--- /dev/null
+++ b/baseroms/pal-1.0/checksum-compressed.md5
@@ -0,0 +1 @@
+e040de91a74b61e3201db0e2323f768a build/pal-1.0/oot-pal-1.0-compressed.z64
diff --git a/baseroms/pal-1.0/checksum.md5 b/baseroms/pal-1.0/checksum.md5
new file mode 100644
index 0000000000..352e0126b5
--- /dev/null
+++ b/baseroms/pal-1.0/checksum.md5
@@ -0,0 +1 @@
+f7e8dec14a2fbae90aafa838c801310f build/pal-1.0/oot-pal-1.0.z64
diff --git a/baseroms/pal-1.0/config.yml b/baseroms/pal-1.0/config.yml
new file mode 100644
index 0000000000..37ffb7500b
--- /dev/null
+++ b/baseroms/pal-1.0/config.yml
@@ -0,0 +1,1225 @@
+dmadata_start: 0x7950
+text_lang: PAL
+incbins:
+ - name: ipl3
+ segment: makerom
+ vram: 0x80000040
+ size: 0xFC0
+ - name: rspbootText
+ segment: boot
+ vram: 0x80006560
+ size: 0x160
+ - name: aspMainText
+ segment: code
+ vram: 0x800E0F10
+ size: 0xFB0
+ - name: gspF3DZEX2_NoN_PosLight_fifoText
+ segment: code
+ vram: 0x800E1EC0
+ size: 0x1390
+ - name: gspS2DEX2d_fifoText
+ segment: code
+ vram: 0x800E3250
+ size: 0x18C0
+ - name: njpgdspMainText
+ segment: code
+ vram: 0x800E4B10
+ size: 0xAF0
+ - name: gSequenceFontTable
+ segment: code
+ vram: 0x801117B0
+ size: 0x1C0
+ - name: gSequenceTable
+ segment: code
+ vram: 0x80111970
+ size: 0x6F0
+ - name: aspMainData
+ segment: code
+ vram: 0x801120E0
+ size: 0x2E0
+ - name: gspF3DZEX2_NoN_PosLight_fifoData
+ segment: code
+ vram: 0x801123C0
+ size: 0x420
+ - name: gspS2DEX2d_fifoData
+ segment: code
+ vram: 0x801127E0
+ size: 0x390
+ - name: njpgdspMainData
+ segment: code
+ vram: 0x80112B70
+ size: 0x60
+variables:
+ gIdentityMtx: 0x800FCD00
+ sNesMessageEntryTable: 0x801088BC
+ sGerMessageEntryTable: 0x8010CAE4
+ sFraMessageEntryTable: 0x8010EBF4
+ sStaffMessageEntryTable: 0x80110D04
+ gSoundFontTable: 0x80111540
+ gSequenceFontTable: 0x801117B0
+ gSequenceTable: 0x80111970
+ gSampleBankTable: 0x80112060
+ sShadowTex: 0x80AE19F0
+assets:
+- name: code/fbdemo_circle
+ xml_path: assets/xml/code/fbdemo_circle.xml
+ start_offset: 0xE99C8
+ end_offset: 0xEACB8
+- name: code/fbdemo_triforce
+ xml_path: assets/xml/code/fbdemo_triforce.xml
+ start_offset: 0xE8E50
+ end_offset: 0xE8F20
+- name: code/fbdemo_wipe1
+ xml_path: assets/xml/code/fbdemo_wipe1.xml
+ start_offset: 0xE8F20
+ end_offset: 0xE99A8
+- name: n64dd/error_textures
+ xml_path: assets/xml/n64dd/error_textures.xml
+ start_offset: 0xC0E0
+ end_offset: 0x11CE0
+- 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.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: 0x960
+ end_offset: 0x1D80
+- name: overlays/ovl_Arrow_Ice
+ xml_path: assets/xml/overlays/ovl_Arrow_Ice.xml
+ start_offset: 0x980
+ end_offset: 0x1DA0
+- name: overlays/ovl_Arrow_Light
+ xml_path: assets/xml/overlays/ovl_Arrow_Light.xml
+ start_offset: 0x990
+ end_offset: 0x1DB0
+- name: overlays/ovl_Bg_Ganon_Otyuka
+ xml_path: assets/xml/overlays/ovl_Bg_Ganon_Otyuka.xml
+ start_offset: 0x1110
+ end_offset: 0x24EC
+- name: overlays/ovl_Bg_Jya_Cobra
+ xml_path: assets/xml/overlays/ovl_Bg_Jya_Cobra.xml
+ start_offset: 0x1830
+ end_offset: 0x18A8
+- name: overlays/ovl_Boss_Dodongo
+ xml_path: assets/xml/overlays/ovl_Boss_Dodongo.xml
+ start_offset: 0x61C8
+ end_offset: 0x91C8
+- name: overlays/ovl_Boss_Ganon
+ xml_path: assets/xml/overlays/ovl_Boss_Ganon.xml
+ start_offset: 0xE388
+ end_offset: 0x20EA8
+- name: overlays/ovl_Boss_Ganon2
+ xml_path: assets/xml/overlays/ovl_Boss_Ganon2.xml
+ start_offset: 0x9F38
+ end_offset: 0x103E8
+- name: overlays/ovl_Boss_Sst
+ xml_path: assets/xml/overlays/ovl_Boss_Sst.xml
+ start_offset: 0xA330
+ end_offset: 0xACE0
+- name: overlays/ovl_Demo_Shd
+ xml_path: assets/xml/overlays/ovl_Demo_Shd.xml
+ start_offset: 0x410
+ end_offset: 0x2390
+- name: overlays/ovl_Effect_Ss_Fhg_Flash
+ xml_path: assets/xml/overlays/ovl_Effect_Ss_Fhg_Flash.xml
+ start_offset: 0x9F0
+ end_offset: 0xEA8
+- name: overlays/ovl_En_Bili
+ xml_path: assets/xml/overlays/ovl_En_Bili.xml
+ start_offset: 0x1E40
+ end_offset: 0x1E60
+- name: overlays/ovl_En_Clear_Tag
+ xml_path: assets/xml/overlays/ovl_En_Clear_Tag.xml
+ start_offset: 0x2600
+ end_offset: 0x8900
+- name: overlays/ovl_En_Ganon_Mant
+ xml_path: assets/xml/overlays/ovl_En_Ganon_Mant.xml
+ start_offset: 0x11E8
+ end_offset: 0x40E8
+- name: overlays/ovl_En_Ganon_Organ
+ xml_path: assets/xml/overlays/ovl_En_Ganon_Organ.xml
+ start_offset: 0x328
+ end_offset: 0x6EB0
+- name: overlays/ovl_En_Holl
+ xml_path: assets/xml/overlays/ovl_En_Holl.xml
+ start_offset: 0xE68
+ end_offset: 0xED0
+- name: overlays/ovl_En_Jsjutan
+ xml_path: assets/xml/overlays/ovl_En_Jsjutan.xml
+ start_offset: 0x12B8
+ end_offset: 0x4C50
+- name: overlays/ovl_En_Kanban
+ xml_path: assets/xml/overlays/ovl_En_Kanban.xml
+ start_offset: 0x2E70
+ end_offset: 0x2F30
+- name: overlays/ovl_En_Sda
+ xml_path: assets/xml/overlays/ovl_En_Sda.xml
+ start_offset: 0x14A8
+ end_offset: 0x1538
+- 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: 0x26A0
+ end_offset: 0x2730
+- name: overlays/ovl_En_Sth
+ xml_path: assets/xml/overlays/ovl_En_Sth.xml
+ start_offset: 0xE60
+ end_offset: 0x3E34
+- name: overlays/ovl_End_Title
+ xml_path: assets/xml/overlays/ovl_End_Title.xml
+ start_offset: 0x6F0
+ end_offset: 0x4098
+- name: overlays/ovl_file_choose
+ xml_path: assets/xml/overlays/ovl_file_choose_pal_n64.xml
+ start_offset: 0xF0A0
+ end_offset: 0xF9B0
+- name: overlays/ovl_Magic_Dark
+ xml_path: assets/xml/overlays/ovl_Magic_Dark.xml
+ start_offset: 0xC90
+ end_offset: 0x16C0
+- name: overlays/ovl_Magic_Fire
+ xml_path: assets/xml/overlays/ovl_Magic_Fire.xml
+ start_offset: 0xB20
+ end_offset: 0x2170
+- name: overlays/ovl_Magic_Wind
+ xml_path: assets/xml/overlays/ovl_Magic_Wind.xml
+ start_offset: 0x6A0
+ end_offset: 0x1BB8
+- name: overlays/ovl_Oceff_Spot
+ xml_path: assets/xml/overlays/ovl_Oceff_Spot.xml
+ start_offset: 0x780
+ end_offset: 0xE58
+- name: overlays/ovl_Oceff_Storm
+ xml_path: assets/xml/overlays/ovl_Oceff_Storm.xml
+ start_offset: 0x740
+ end_offset: 0x1AD0
+- name: overlays/ovl_Oceff_Wipe
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe.xml
+ start_offset: 0x4F0
+ end_offset: 0xCB0
+- name: overlays/ovl_Oceff_Wipe2
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe2.xml
+ start_offset: 0x430
+ end_offset: 0x1698
+- name: overlays/ovl_Oceff_Wipe3
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe3.xml
+ start_offset: 0x430
+ end_offset: 0x1678
+- name: overlays/ovl_Oceff_Wipe4
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe4.xml
+ start_offset: 0x410
+ end_offset: 0xEF8
+- name: scenes/dungeons/bdan
+ xml_path: assets/xml/scenes/dungeons/bdan.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.xml
+- name: scenes/dungeons/ddan
+ xml_path: assets/xml/scenes/dungeons/ddan.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.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.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.xml
+- name: scenes/dungeons/HIDAN
+ xml_path: assets/xml/scenes/dungeons/HIDAN.xml
+- name: scenes/dungeons/ice_doukutu
+ xml_path: assets/xml/scenes/dungeons/ice_doukutu_pal_n64.xml
+- name: scenes/dungeons/jyasinboss
+ xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
+- name: scenes/dungeons/jyasinzou
+ xml_path: assets/xml/scenes/dungeons/jyasinzou.xml
+- name: scenes/dungeons/men
+ xml_path: assets/xml/scenes/dungeons/men.xml
+- name: scenes/dungeons/MIZUsin
+ xml_path: assets/xml/scenes/dungeons/MIZUsin.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.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_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_pal_n64.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_pal_n64.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_pal_n64.xml
+- name: scenes/overworld/spot01
+ xml_path: assets/xml/scenes/overworld/spot01_pal_n64.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_pal_n64.xml
+- name: scenes/overworld/spot05
+ xml_path: assets/xml/scenes/overworld/spot05_pal_n64.xml
+- name: scenes/overworld/spot06
+ xml_path: assets/xml/scenes/overworld/spot06_pal_n64.xml
+- name: scenes/overworld/spot07
+ xml_path: assets/xml/scenes/overworld/spot07_pal_n64.xml
+- name: scenes/overworld/spot08
+ xml_path: assets/xml/scenes/overworld/spot08.xml
+- name: scenes/overworld/spot09
+ xml_path: assets/xml/scenes/overworld/spot09_pal_n64.xml
+- name: scenes/overworld/spot10
+ xml_path: assets/xml/scenes/overworld/spot10.xml
+- name: scenes/overworld/spot11
+ xml_path: assets/xml/scenes/overworld/spot11_pal_n64.xml
+- name: scenes/overworld/spot12
+ xml_path: assets/xml/scenes/overworld/spot12_pal_n64.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_pal_n64.xml
+- name: scenes/overworld/spot17
+ xml_path: assets/xml/scenes/overworld/spot17_pal_n64.xml
+- name: scenes/overworld/spot18
+ xml_path: assets/xml/scenes/overworld/spot18_pal_n64.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: 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.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_n64.xml
diff --git a/baseroms/pal-1.0/segments.csv b/baseroms/pal-1.0/segments.csv
new file mode 100644
index 0000000000..28d8dbd2ce
--- /dev/null
+++ b/baseroms/pal-1.0/segments.csv
@@ -0,0 +1,1512 @@
+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,800116E0
+n64dd,801C4EC0
+ovl_title,80800000
+ovl_select,808009C0
+ovl_opening,80803720
+ovl_file_choose,80803880
+ovl_kaleido_scope,80813F90
+ovl_player_actor,80830C00
+ovl_map_mark_data,80857380
+ovl_En_Test,8085DEE0
+ovl_En_GirlA,80863790
+ovl_En_Part,808660B0
+ovl_En_Light,808676C0
+ovl_En_Door,808684B0
+ovl_En_Box,808692F0
+ovl_En_Poh,8086AE30
+ovl_En_Okuta,8086EFC0
+ovl_En_Bom,808715A0
+ovl_En_Wallmas,80872470
+ovl_En_Dodongo,80873E80
+ovl_En_Firefly,80876C20
+ovl_En_Horse,80878D90
+ovl_En_Arrow,80884FF0
+ovl_En_Elf,808866E0
+ovl_En_Niw,8088B0A0
+ovl_En_Tite,8088E3D0
+ovl_En_Reeba,80891170
+ovl_En_Peehat,80892BE0
+ovl_En_Holl,808962E0
+ovl_En_Scene_Change,808972B0
+ovl_En_Zf,808973E0
+ovl_En_Hata,8089DEE0
+ovl_Boss_Dodongo,8089E470
+ovl_Boss_Goma,808A7F50
+ovl_En_Zl1,808ADED0
+ovl_En_Viewer,808B1CD0
+ovl_En_Goma,808B4BA0
+ovl_Bg_Pushbox,808B7830
+ovl_En_Bubble,808B7B30
+ovl_Door_Shutter,808B8F50
+ovl_En_Dodojr,808BB1D0
+ovl_En_Bdfire,808BD070
+ovl_En_Boom,808BDC00
+ovl_En_Torch2,808BE4C0
+ovl_En_Bili,808C0C60
+ovl_En_Tp,808C2F30
+ovl_En_St,808C4D80
+ovl_En_Bw,808C79F0
+ovl_En_Eiyer,808CAD60
+ovl_En_River_Sound,808CC9C0
+ovl_En_Horse_Normal,808CD350
+ovl_En_Ossan,808CF970
+ovl_Bg_Treemouth,808D5F50
+ovl_Bg_Dodoago,808D75B0
+ovl_Bg_Hidan_Dalm,808D8360
+ovl_Bg_Hidan_Hrock,808D8BB0
+ovl_En_Horse_Ganon,808D93E0
+ovl_Bg_Hidan_Rock,808DA160
+ovl_Bg_Hidan_Rsekizou,808DB250
+ovl_Bg_Hidan_Sekizou,808DBE30
+ovl_Bg_Hidan_Sima,808DD280
+ovl_Bg_Hidan_Syoku,808DE1A0
+ovl_En_Xc,808DE600
+ovl_Bg_Hidan_Curtain,808E4D90
+ovl_Bg_Spot00_Hanebasi,808E5830
+ovl_En_Mb,808E6940
+ovl_En_Bombf,808EAB50
+ovl_Bg_Hidan_Firewall,808EBFC0
+ovl_Bg_Dy_Yoseizo,808EC720
+ovl_En_Zl2,808EF520
+ovl_Bg_Hidan_Fslift,808F3C50
+ovl_En_OE2,808F4120
+ovl_Bg_Ydan_Hasi,808F4200
+ovl_Bg_Ydan_Maruta,808F49B0
+ovl_Boss_Ganondrof,808F5090
+ovl_En_Am,808F9E00
+ovl_En_Dekubaba,808FC200
+ovl_En_M_Fire1,808FFCA0
+ovl_En_M_Thunder,808FFE40
+ovl_Bg_Ddan_Jd,80901430
+ovl_Bg_Breakwall,80901A80
+ovl_En_Jj,809028F0
+ovl_En_Horse_Zelda,80903EC0
+ovl_Bg_Ddan_Kd,809049B0
+ovl_Door_Warp1,809052A0
+ovl_Obj_Syokudai,80909550
+ovl_Item_B_Heart,8090A190
+ovl_En_Dekunuts,8090A580
+ovl_Bg_Menkuri_Kaiten,8090BD80
+ovl_Bg_Menkuri_Eye,8090BF10
+ovl_En_Vali,8090C3B0
+ovl_Bg_Mizu_Movebg,8090EA50
+ovl_Bg_Mizu_Water,8090FBF0
+ovl_Arms_Hook,809108C0
+ovl_En_fHG,80911620
+ovl_Bg_Mori_Hineri,80913F50
+ovl_En_Bb,80914C50
+ovl_Bg_Toki_Hikari,80918920
+ovl_En_Yukabyun,809196C0
+ovl_Bg_Toki_Swd,80919CD0
+ovl_En_Fhg_Fire,8091B320
+ovl_Bg_Mjin,8091D940
+ovl_Bg_Hidan_Kousi,8091DD20
+ovl_Door_Toki,8091E2A0
+ovl_Bg_Hidan_Hamstep,8091E400
+ovl_En_Bird,8091F2B0
+ovl_En_Wood02,8091F770
+ovl_En_Lightbox,80920950
+ovl_En_Pu_box,80920DD0
+ovl_En_Trap,80921110
+ovl_En_Arow_Trap,809223B0
+ovl_En_Vase,80922500
+ovl_En_Ta,80922600
+ovl_En_Tk,80925FC0
+ovl_Bg_Mori_Bigst,80927DF0
+ovl_Bg_Mori_Elevator,80928720
+ovl_Bg_Mori_Kaitenkabe,80929210
+ovl_Bg_Mori_Rakkatenjo,80929870
+ovl_En_Vm,8092A1E0
+ovl_Demo_Effect,8092BA90
+ovl_Demo_Kankyo,80931590
+ovl_Bg_Hidan_Fwbig,80935290
+ovl_En_Floormas,80935F70
+ovl_En_Heishi1,80939350
+ovl_En_Rd,8093A860
+ovl_En_Po_Sisters,8093D110
+ovl_Bg_Heavy_Block,80941E00
+ovl_Bg_Po_Event,809436F0
+ovl_Obj_Mure,80945530
+ovl_En_Sw,80946540
+ovl_Boss_Fd,80949D30
+ovl_Object_Kankyo,80951060
+ovl_En_Du,80954280
+ovl_En_Fd,80955D20
+ovl_En_Horse_Link_Child,809589E0
+ovl_Door_Ana,8095A7E0
+ovl_Bg_Spot02_Objects,8095AE50
+ovl_Bg_Haka,8095C1A0
+ovl_Magic_Wind,8095C860
+ovl_Magic_Fire,8095E560
+ovl_En_Ru1,80960830
+ovl_Boss_Fd2,80967ED0
+ovl_En_Fd_Fire,8096BC00
+ovl_En_Dh,8096C910
+ovl_En_Dha,8096E3E0
+ovl_En_Rl,8096F3E0
+ovl_En_Encount1,809702C0
+ovl_Demo_Du,80970E20
+ovl_Demo_Im,80974600
+ovl_Demo_Tre_Lgt,80978570
+ovl_En_Fw,80978C80
+ovl_Bg_Vb_Sima,8097A430
+ovl_En_Vb_Ball,8097AB40
+ovl_Bg_Haka_Megane,8097BCE0
+ovl_Bg_Haka_MeganeBG,8097C0E0
+ovl_Bg_Haka_Ship,8097C7A0
+ovl_Bg_Haka_Sgami,8097D1E0
+ovl_En_Heishi2,8097DE00
+ovl_En_Encount2,80980000
+ovl_En_Fire_Rock,80981230
+ovl_En_Brob,80982340
+ovl_Mir_Ray,80983430
+ovl_Bg_Spot09_Obj,80984CF0
+ovl_Bg_Spot18_Obj,80985200
+ovl_Boss_Va,80985AD0
+ovl_Bg_Haka_Tubo,8099CCC0
+ovl_Bg_Haka_Trap,8099D6E0
+ovl_Bg_Haka_Huta,8099ECB0
+ovl_Bg_Haka_Zou,8099F750
+ovl_Bg_Spot17_Funen,809A0940
+ovl_En_Syateki_Itm,809A0B90
+ovl_En_Syateki_Man,809A1930
+ovl_En_Tana,809A26F0
+ovl_En_Nb,809A2990
+ovl_Boss_Mo,809A6F60
+ovl_En_Sb,809B7010
+ovl_En_Bigokuta,809B8450
+ovl_En_Karebaba,809BAF60
+ovl_Bg_Bdan_Objects,809BC850
+ovl_Demo_Sa,809BDB20
+ovl_Demo_Go,809C0640
+ovl_En_In,809C13A0
+ovl_En_Tr,809C4140
+ovl_Bg_Spot16_Bombstone,809C5A40
+ovl_Bg_Hidan_Kowarerukabe,809C6F80
+ovl_Bg_Bombwall,809C7E50
+ovl_En_Ru2,809C8710
+ovl_Obj_Dekujr,809CB490
+ovl_Bg_Mizu_Uzu,809CBAD0
+ovl_Bg_Spot06_Objects,809CBCA0
+ovl_Bg_Ice_Objects,809CD0B0
+ovl_Bg_Haka_Water,809CDFF0
+ovl_En_Ma2,809CE7D0
+ovl_En_Bom_Chu,809CF830
+ovl_En_Horse_Game_Check,809D0ED0
+ovl_Boss_Tw,809D1FA0
+ovl_En_Rr,809E7AA0
+ovl_En_Ba,809E9FD0
+ovl_En_Bx,809EBEA0
+ovl_En_Anubice,809EC990
+ovl_En_Anubice_Fire,809EDC40
+ovl_Bg_Mori_Hashigo,809EEA00
+ovl_Bg_Mori_Hashira4,809EF2C0
+ovl_Bg_Mori_Idomizu,809EF850
+ovl_Bg_Spot16_Doughnut,809EFE90
+ovl_Bg_Bdan_Switch,809F0440
+ovl_En_Ma1,809F1870
+ovl_Boss_Ganon,809F2B50
+ovl_Boss_Sst,80A18930
+ovl_En_Ny,80A24E90
+ovl_En_Fr,80A267C0
+ovl_Item_Shield,80A29250
+ovl_Bg_Ice_Shelter,80A29C60
+ovl_En_Ice_Hono,80A2AE90
+ovl_Item_Ocarina,80A2C080
+ovl_Magic_Dark,80A2C850
+ovl_Demo_6K,80A2E0A0
+ovl_En_Anubice_Tag,80A30DB0
+ovl_Bg_Haka_Gate,80A31080
+ovl_Bg_Spot15_Saku,80A32110
+ovl_Bg_Jya_Goroiwa,80A32450
+ovl_Bg_Jya_Zurerukabe,80A32BD0
+ovl_Bg_Jya_Cobra,80A33280
+ovl_Bg_Jya_Kanaami,80A34FA0
+ovl_Fishing,80A35350
+ovl_Obj_Oshihiki,80A4FDE0
+ovl_Bg_Gate_Shutter,80A51890
+ovl_Eff_Dust,80A51D10
+ovl_Bg_Spot01_Fusya,80A530F0
+ovl_Bg_Spot01_Idohashira,80A53390
+ovl_Bg_Spot01_Idomizu,80A53F90
+ovl_Bg_Po_Syokudai,80A542A0
+ovl_Bg_Ganon_Otyuka,80A54BF0
+ovl_Bg_Spot15_Rrbox,80A57230
+ovl_Bg_Umajump,80A58010
+ovl_En_Insect,80A581A0
+ovl_En_Butte,80A5A6C0
+ovl_En_Fish,80A5BC90
+ovl_Bg_Spot08_Iceblock,80A5DDA0
+ovl_Item_Etcetera,80A5EDE0
+ovl_Arrow_Fire,80A5F6B0
+ovl_Arrow_Ice,80A61570
+ovl_Arrow_Light,80A63450
+ovl_Obj_Kibako,80A65340
+ovl_Obj_Tsubo,80A66040
+ovl_En_Wonder_Item,80A67030
+ovl_En_Ik,80A67D60
+ovl_Demo_Ik,80A6C390
+ovl_En_Skj,80A6D8A0
+ovl_En_Skjneedle,80A711E0
+ovl_En_G_Switch,80A714F0
+ovl_Demo_Ext,80A72D20
+ovl_Demo_Shd,80A73660
+ovl_En_Dns,80A75A70
+ovl_Elf_Msg,80A76E00
+ovl_En_Honotrap,80A773F0
+ovl_En_Tubo_Trap,80A78940
+ovl_Obj_Ice_Poly,80A795E0
+ovl_Bg_Spot03_Taki,80A79F90
+ovl_Bg_Spot07_Taki,80A7A880
+ovl_En_Fz,80A7AE50
+ovl_En_Po_Relay,80A7CE60
+ovl_Bg_Relay_Objects,80A7E570
+ovl_En_Diving_Game,80A7ED20
+ovl_En_Kusa,80A806D0
+ovl_Obj_Bean,80A81BB0
+ovl_Obj_Bombiwa,80A84340
+ovl_Obj_Switch,80A848B0
+ovl_Obj_Elevator,80A86670
+ovl_Obj_Lift,80A86A30
+ovl_Obj_Hsblock,80A87450
+ovl_En_Okarina_Tag,80A87A20
+ovl_En_Yabusame_Mark,80A88F20
+ovl_En_Goroiwa,80A895F0
+ovl_En_Ex_Ruppy,80A8B9B0
+ovl_En_Toryo,80A8CA70
+ovl_En_Daiku,80A8D700
+ovl_En_Nwc,80A8EE40
+ovl_En_Blkobj,80A8F880
+ovl_Item_Inbox,80A8FDE0
+ovl_En_Ge1,80A8FF40
+ovl_Obj_Blockstop,80A91F70
+ovl_En_Sda,80A92110
+ovl_En_Clear_Tag,80A93810
+ovl_En_Niw_Lady,80A9EDB0
+ovl_En_Gm,80AA06B0
+ovl_En_Ms,80AA13E0
+ovl_En_Hs,80AA1AD0
+ovl_Bg_Ingate,80AA2670
+ovl_En_Kanban,80AA2A00
+ovl_En_Heishi3,80AA5B50
+ovl_En_Syateki_Niw,80AA6540
+ovl_En_Attack_Niw,80AA85D0
+ovl_Bg_Spot01_Idosoko,80AA9830
+ovl_En_Sa,80AA9A40
+ovl_En_Wonder_Talk,80AABCB0
+ovl_Bg_Gjyo_Bridge,80AAC340
+ovl_En_Ds,80AAC840
+ovl_En_Mk,80AAD460
+ovl_En_Bom_Bowl_Man,80AAE2F0
+ovl_En_Bom_Bowl_Pit,80AAF830
+ovl_En_Owl,80AB01A0
+ovl_En_Ishi,80AB3D40
+ovl_Obj_Hana,80ABCE90
+ovl_Obj_Lightswitch,80ABD1A0
+ovl_Obj_Mure2,80ABE5D0
+ovl_En_Go,80ABEFF0
+ovl_En_Fu,80AC3630
+ovl_En_Changer,80AC4380
+ovl_Bg_Jya_Megami,80AC4D60
+ovl_Bg_Jya_Lift,80AC5F40
+ovl_Bg_Jya_Bigmirror,80AC6490
+ovl_Bg_Jya_Bombchuiwa,80AC6CD0
+ovl_Bg_Jya_Amishutter,80AC7800
+ovl_Bg_Jya_Bombiwa,80AC7B90
+ovl_Bg_Spot18_Basket,80AC8150
+ovl_En_Ganon_Organ,80AC9140
+ovl_En_Siofuki,80AD0140
+ovl_En_Stream,80AD0EF0
+ovl_En_Mm,80AD1480
+ovl_En_Ko,80AD2AA0
+ovl_En_Kz,80AD6BE0
+ovl_En_Weather_Tag,80AD8180
+ovl_Bg_Sst_Floor,80AD9070
+ovl_En_Ani,80AD95D0
+ovl_En_Ex_Item,80ADA340
+ovl_Bg_Jya_Ironobj,80ADB4B0
+ovl_En_Js,80ADC260
+ovl_En_Jsjutan,80ADCC30
+ovl_En_Cs,80AE2550
+ovl_En_Md,80AE3780
+ovl_En_Hy,80AE5DF0
+ovl_En_Ganon_Mant,80AE9730
+ovl_En_Okarina_Effect,80AED950
+ovl_En_Mag,80AEDD10
+ovl_Door_Gerudo,80AF2870
+ovl_Elf_Msg2,80AF2E60
+ovl_Demo_Gt,80AF32D0
+ovl_En_Po_Field,80AF88D0
+ovl_Efc_Erupc,80AFC340
+ovl_Bg_Zg,80AFCE20
+ovl_En_Heishi4,80AFD290
+ovl_En_Zl3,80AFE190
+ovl_Boss_Ganon2,80B05FE0
+ovl_En_Kakasi,80B18E00
+ovl_En_Takara_Man,80B19B40
+ovl_Obj_Makeoshihiki,80B1A400
+ovl_Oceff_Spot,80B1A890
+ovl_End_Title,80B1B7C0
+ovl_En_Torch,80B1F8F0
+ovl_Demo_Ec,80B1F9E0
+ovl_Shot_Sun,80B23240
+ovl_En_Dy_Extra,80B23900
+ovl_En_Wonder_Talk2,80B23E80
+ovl_En_Ge2,80B24520
+ovl_Obj_Roomtimer,80B25EC0
+ovl_En_Ssh,80B26110
+ovl_En_Sth,80B28700
+ovl_Oceff_Wipe,80B2C7B0
+ovl_Effect_Ss_Dust,80B2D500
+ovl_Effect_Ss_KiraKira,80B2DD30
+ovl_Effect_Ss_Bomb,80B2E3A0
+ovl_Effect_Ss_Bomb2,80B2E7C0
+ovl_Effect_Ss_Blast,80B2F0F0
+ovl_Effect_Ss_G_Spk,80B2F480
+ovl_Effect_Ss_D_Fire,80B2FA30
+ovl_Effect_Ss_Bubble,80B2FF20
+ovl_Effect_Ss_G_Ripple,80B303A0
+ovl_Effect_Ss_G_Splash,80B30900
+ovl_Effect_Ss_G_Magma,80B30DB0
+ovl_Effect_Ss_G_Fire,80B31010
+ovl_Effect_Ss_Lightning,80B312A0
+ovl_Effect_Ss_Dt_Bubble,80B31970
+ovl_Effect_Ss_Hahen,80B31F00
+ovl_Effect_Ss_Stick,80B32540
+ovl_Effect_Ss_Sibuki,80B328E0
+ovl_Effect_Ss_Sibuki2,80B32FB0
+ovl_Effect_Ss_G_Magma2,80B332E0
+ovl_Effect_Ss_Stone1,80B337F0
+ovl_Effect_Ss_HitMark,80B33B80
+ovl_Effect_Ss_Fhg_Flash,80B340D0
+ovl_Effect_Ss_K_Fire,80B35050
+ovl_Effect_Ss_Solder_Srch_Ball,80B35480
+ovl_Effect_Ss_Kakera,80B35630
+ovl_Effect_Ss_Ice_Piece,80B366C0
+ovl_Effect_Ss_En_Ice,80B36B00
+ovl_Effect_Ss_Fire_Tail,80B373C0
+ovl_Effect_Ss_En_Fire,80B37AC0
+ovl_Effect_Ss_Extra,80B38200
+ovl_Effect_Ss_Fcircle,80B385C0
+ovl_Effect_Ss_Dead_Db,80B38A70
+ovl_Effect_Ss_Dead_Dd,80B38F50
+ovl_Effect_Ss_Dead_Ds,80B394E0
+ovl_Effect_Ss_Dead_Sound,80B39960
+ovl_Oceff_Storm,80B39AA0
+ovl_En_Weiyer,80B3B640
+ovl_Bg_Spot05_Soko,80B3D040
+ovl_Bg_Jya_1flift,80B3D360
+ovl_Bg_Jya_Haheniron,80B3D9F0
+ovl_Bg_Spot12_Gate,80B3E1E0
+ovl_Bg_Spot12_Saku,80B3E5F0
+ovl_En_Hintnuts,80B3EAB0
+ovl_En_Nutsball,80B404E0
+ovl_Bg_Spot00_Break,80B40B00
+ovl_En_Shopnuts,80B40CA0
+ovl_En_It,80B41BB0
+ovl_En_GeldB,80B41D40
+ovl_Oceff_Wipe2,80B470F0
+ovl_Oceff_Wipe3,80B48860
+ovl_En_Niw_Girl,80B49FB0
+ovl_En_Dog,80B4AA80
+ovl_En_Si,80B4BC30
+ovl_Bg_Spot01_Objects2,80B4C130
+ovl_Obj_Comb,80B4C5F0
+ovl_Bg_Spot11_Bakudankabe,80B4CE50
+ovl_Obj_Kibako2,80B4D490
+ovl_En_Dnt_Demo,80B4DB50
+ovl_En_Dnt_Jiji,80B4E870
+ovl_En_Dnt_Nomal,80B4FD80
+ovl_En_Guest,80B52BC0
+ovl_Bg_Bom_Guard,80B53560
+ovl_En_Hs2,80B53780
+ovl_Demo_Kekkai,80B53D60
+ovl_Bg_Spot08_Bakudankabe,80B55040
+ovl_Bg_Spot17_Bakudankabe,80B556E0
+ovl_Obj_Mure3,80B55DC0
+ovl_En_Tg,80B56590
+ovl_En_Mu,80B56C60
+ovl_En_Go2,80B57580
+ovl_En_Wf,80B5D5A0
+ovl_En_Skb,80B618B0
+ovl_Demo_Gj,80B631A0
+ovl_Demo_Geff,80B66E50
+ovl_Bg_Gnd_Firemeiro,80B67670
+ovl_Bg_Gnd_Darkmeiro,80B67BB0
+ovl_Bg_Gnd_Soulmeiro,80B68370
+ovl_Bg_Gnd_Nisekabe,80B68BD0
+ovl_Bg_Gnd_Iceblock,80B68D40
+ovl_Bg_Ydan_Sp,80B69E40
+ovl_En_Gb,80B6B5B0
+ovl_En_Gs,80B6CCE0
+ovl_Bg_Mizu_Bwall,80B6EB80
+ovl_Bg_Mizu_Shutter,80B70050
+ovl_En_Daiku_Kakariko,80B70850
+ovl_Bg_Bowl_Wall,80B71C10
+ovl_En_Wall_Tubo,80B72590
+ovl_En_Po_Desert,80B72A80
+ovl_En_Crow,80B73840
+ovl_Door_Killer,80B74EE0
+ovl_Bg_Spot11_Oasis,80B76450
+ovl_Bg_Spot18_Futa,80B76B80
+ovl_Bg_Spot18_Shutter,80B76D20
+ovl_En_Ma3,80B77270
+ovl_En_Cow,80B78340
+ovl_Bg_Ice_Turara,80B797A0
+ovl_Bg_Ice_Shutter,80B79FD0
+ovl_En_Kakasi2,80B7A440
+ovl_En_Kakasi3,80B7AB60
+ovl_Oceff_Wipe4,80B7BC40
+ovl_En_Eg,80B7CC20
+ovl_Bg_Menkuri_Nisekabe,80B7CDD0
+ovl_En_Zo,80B7CF20
+ovl_Effect_Ss_Ice_Smoke,80B7F4D0
+ovl_Obj_Makekinsuta,80B7F990
+ovl_En_Ge3,80B7FAE0
+ovl_Obj_Timeblock,80B80630
+ovl_Obj_Hamishi,80B81270
+ovl_En_Zl4,80B81AC0
+ovl_En_Mm2,80B864F0
+ovl_Bg_Jya_Block,80B872B0
+ovl_Obj_Warp2block,80B87520
+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,
+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,
+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,
+market_day_scene,
+market_day_room_0,
+market_night_scene,
+market_night_room_0,
+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,
+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,
+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,
+kenjyanoma_scene,
+kenjyanoma_room_0,
+tokinoma_scene,
+tokinoma_room_0,
+tokinoma_room_1,
+link_home_scene,
+link_home_room_0,
+kokiri_shop_scene,
+kokiri_shop_room_0,
+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,
+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,
+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,
+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,
+moribossroom_scene,
+moribossroom_room_0,
+moribossroom_room_1,
+syatekijyou_scene,
+syatekijyou_room_0,
+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,
+shop1_scene,
+shop1_room_0,
+hairal_niwa_scene,
+hairal_niwa_room_0,
+ganon_tou_scene,
+ganon_tou_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,
+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,
+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,
+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,
+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,
+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,
+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,
+HAKAdanCH_scene,
+HAKAdanCH_room_0,
+HAKAdanCH_room_1,
+HAKAdanCH_room_2,
+HAKAdanCH_room_3,
+HAKAdanCH_room_4,
+HAKAdanCH_room_5,
+HAKAdanCH_room_6,
+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,
+face_shop_scene,
+face_shop_room_0,
+kinsuta_scene,
+kinsuta_room_0,
+ganontikasonogo_scene,
+ganontikasonogo_room_0,
+ganontikasonogo_room_1,
+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/pal-1.1/checksum-compressed.md5 b/baseroms/pal-1.1/checksum-compressed.md5
new file mode 100644
index 0000000000..ef351b211c
--- /dev/null
+++ b/baseroms/pal-1.1/checksum-compressed.md5
@@ -0,0 +1 @@
+d714580dd74c2c033f5e1b6dc0aeac77 build/pal-1.1/oot-pal-1.1-compressed.z64
diff --git a/baseroms/pal-1.1/checksum.md5 b/baseroms/pal-1.1/checksum.md5
new file mode 100644
index 0000000000..60671db15f
--- /dev/null
+++ b/baseroms/pal-1.1/checksum.md5
@@ -0,0 +1 @@
+fee6fe6e4cc6228aae02e15c40168aa1 build/pal-1.1/oot-pal-1.1.z64
diff --git a/baseroms/pal-1.1/config.yml b/baseroms/pal-1.1/config.yml
new file mode 100644
index 0000000000..45bf82b877
--- /dev/null
+++ b/baseroms/pal-1.1/config.yml
@@ -0,0 +1,1225 @@
+dmadata_start: 0x7950
+text_lang: PAL
+incbins:
+ - name: ipl3
+ segment: makerom
+ vram: 0x80000040
+ size: 0xFC0
+ - name: rspbootText
+ segment: boot
+ vram: 0x80006560
+ size: 0x160
+ - name: aspMainText
+ segment: code
+ vram: 0x800E0F50
+ size: 0xFB0
+ - name: gspF3DZEX2_NoN_PosLight_fifoText
+ segment: code
+ vram: 0x800E1F00
+ size: 0x1390
+ - name: gspS2DEX2d_fifoText
+ segment: code
+ vram: 0x800E3290
+ size: 0x18C0
+ - name: njpgdspMainText
+ segment: code
+ vram: 0x800E4B50
+ size: 0xAF0
+ - name: gSequenceFontTable
+ segment: code
+ vram: 0x801117F0
+ size: 0x1C0
+ - name: gSequenceTable
+ segment: code
+ vram: 0x801119B0
+ size: 0x6F0
+ - name: aspMainData
+ segment: code
+ vram: 0x80112120
+ size: 0x2E0
+ - name: gspF3DZEX2_NoN_PosLight_fifoData
+ segment: code
+ vram: 0x80112400
+ size: 0x420
+ - name: gspS2DEX2d_fifoData
+ segment: code
+ vram: 0x80112820
+ size: 0x390
+ - name: njpgdspMainData
+ segment: code
+ vram: 0x80112BB0
+ size: 0x60
+variables:
+ gIdentityMtx: 0x800FCD40
+ sNesMessageEntryTable: 0x801088FC
+ sGerMessageEntryTable: 0x8010CB24
+ sFraMessageEntryTable: 0x8010EC34
+ sStaffMessageEntryTable: 0x80110D44
+ gSoundFontTable: 0x80111580
+ gSequenceFontTable: 0x801117F0
+ gSequenceTable: 0x801119B0
+ gSampleBankTable: 0x801120A0
+ sShadowTex: 0x80AE1B80
+assets:
+- name: code/fbdemo_circle
+ xml_path: assets/xml/code/fbdemo_circle.xml
+ start_offset: 0xE9A08
+ end_offset: 0xEACF8
+- name: code/fbdemo_triforce
+ xml_path: assets/xml/code/fbdemo_triforce.xml
+ start_offset: 0xE8E90
+ end_offset: 0xE8F60
+- name: code/fbdemo_wipe1
+ xml_path: assets/xml/code/fbdemo_wipe1.xml
+ start_offset: 0xE8F60
+ end_offset: 0xE99E8
+- name: n64dd/error_textures
+ xml_path: assets/xml/n64dd/error_textures.xml
+ start_offset: 0xC0E0
+ end_offset: 0x11CE0
+- 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.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: 0x960
+ end_offset: 0x1D80
+- name: overlays/ovl_Arrow_Ice
+ xml_path: assets/xml/overlays/ovl_Arrow_Ice.xml
+ start_offset: 0x980
+ end_offset: 0x1DA0
+- name: overlays/ovl_Arrow_Light
+ xml_path: assets/xml/overlays/ovl_Arrow_Light.xml
+ start_offset: 0x990
+ end_offset: 0x1DB0
+- name: overlays/ovl_Bg_Ganon_Otyuka
+ xml_path: assets/xml/overlays/ovl_Bg_Ganon_Otyuka.xml
+ start_offset: 0x1110
+ end_offset: 0x24EC
+- name: overlays/ovl_Bg_Jya_Cobra
+ xml_path: assets/xml/overlays/ovl_Bg_Jya_Cobra.xml
+ start_offset: 0x1830
+ end_offset: 0x18A8
+- name: overlays/ovl_Boss_Dodongo
+ xml_path: assets/xml/overlays/ovl_Boss_Dodongo.xml
+ start_offset: 0x61C8
+ end_offset: 0x91C8
+- name: overlays/ovl_Boss_Ganon
+ xml_path: assets/xml/overlays/ovl_Boss_Ganon.xml
+ start_offset: 0xE388
+ end_offset: 0x20EA8
+- name: overlays/ovl_Boss_Ganon2
+ xml_path: assets/xml/overlays/ovl_Boss_Ganon2.xml
+ start_offset: 0x9F38
+ end_offset: 0x103E8
+- name: overlays/ovl_Boss_Sst
+ xml_path: assets/xml/overlays/ovl_Boss_Sst.xml
+ start_offset: 0xA370
+ end_offset: 0xAD20
+- name: overlays/ovl_Demo_Shd
+ xml_path: assets/xml/overlays/ovl_Demo_Shd.xml
+ start_offset: 0x410
+ end_offset: 0x2390
+- name: overlays/ovl_Effect_Ss_Fhg_Flash
+ xml_path: assets/xml/overlays/ovl_Effect_Ss_Fhg_Flash.xml
+ start_offset: 0x9F0
+ end_offset: 0xEA8
+- name: overlays/ovl_En_Bili
+ xml_path: assets/xml/overlays/ovl_En_Bili.xml
+ start_offset: 0x1E40
+ end_offset: 0x1E60
+- name: overlays/ovl_En_Clear_Tag
+ xml_path: assets/xml/overlays/ovl_En_Clear_Tag.xml
+ start_offset: 0x2600
+ end_offset: 0x8900
+- name: overlays/ovl_En_Ganon_Mant
+ xml_path: assets/xml/overlays/ovl_En_Ganon_Mant.xml
+ start_offset: 0x11E8
+ end_offset: 0x40E8
+- name: overlays/ovl_En_Ganon_Organ
+ xml_path: assets/xml/overlays/ovl_En_Ganon_Organ.xml
+ start_offset: 0x328
+ end_offset: 0x6EB0
+- name: overlays/ovl_En_Holl
+ xml_path: assets/xml/overlays/ovl_En_Holl.xml
+ start_offset: 0xE68
+ end_offset: 0xED0
+- name: overlays/ovl_En_Jsjutan
+ xml_path: assets/xml/overlays/ovl_En_Jsjutan.xml
+ start_offset: 0x12B8
+ end_offset: 0x4C50
+- name: overlays/ovl_En_Kanban
+ xml_path: assets/xml/overlays/ovl_En_Kanban.xml
+ start_offset: 0x2E70
+ end_offset: 0x2F30
+- name: overlays/ovl_En_Sda
+ xml_path: assets/xml/overlays/ovl_En_Sda.xml
+ start_offset: 0x14A8
+ end_offset: 0x1538
+- 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: 0x26A0
+ end_offset: 0x2730
+- name: overlays/ovl_En_Sth
+ xml_path: assets/xml/overlays/ovl_En_Sth.xml
+ start_offset: 0xE60
+ end_offset: 0x3E34
+- name: overlays/ovl_End_Title
+ xml_path: assets/xml/overlays/ovl_End_Title.xml
+ start_offset: 0x6F0
+ end_offset: 0x4098
+- name: overlays/ovl_file_choose
+ xml_path: assets/xml/overlays/ovl_file_choose_pal_n64.xml
+ start_offset: 0xF120
+ end_offset: 0xFA30
+- name: overlays/ovl_Magic_Dark
+ xml_path: assets/xml/overlays/ovl_Magic_Dark.xml
+ start_offset: 0xC90
+ end_offset: 0x16C0
+- name: overlays/ovl_Magic_Fire
+ xml_path: assets/xml/overlays/ovl_Magic_Fire.xml
+ start_offset: 0xB20
+ end_offset: 0x2170
+- name: overlays/ovl_Magic_Wind
+ xml_path: assets/xml/overlays/ovl_Magic_Wind.xml
+ start_offset: 0x6A0
+ end_offset: 0x1BB8
+- name: overlays/ovl_Oceff_Spot
+ xml_path: assets/xml/overlays/ovl_Oceff_Spot.xml
+ start_offset: 0x780
+ end_offset: 0xE58
+- name: overlays/ovl_Oceff_Storm
+ xml_path: assets/xml/overlays/ovl_Oceff_Storm.xml
+ start_offset: 0x740
+ end_offset: 0x1AD0
+- name: overlays/ovl_Oceff_Wipe
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe.xml
+ start_offset: 0x4F0
+ end_offset: 0xCB0
+- name: overlays/ovl_Oceff_Wipe2
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe2.xml
+ start_offset: 0x430
+ end_offset: 0x1698
+- name: overlays/ovl_Oceff_Wipe3
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe3.xml
+ start_offset: 0x430
+ end_offset: 0x1678
+- name: overlays/ovl_Oceff_Wipe4
+ xml_path: assets/xml/overlays/ovl_Oceff_Wipe4.xml
+ start_offset: 0x410
+ end_offset: 0xEF8
+- name: scenes/dungeons/bdan
+ xml_path: assets/xml/scenes/dungeons/bdan.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.xml
+- name: scenes/dungeons/ddan
+ xml_path: assets/xml/scenes/dungeons/ddan.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.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.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.xml
+- name: scenes/dungeons/HIDAN
+ xml_path: assets/xml/scenes/dungeons/HIDAN.xml
+- name: scenes/dungeons/ice_doukutu
+ xml_path: assets/xml/scenes/dungeons/ice_doukutu_pal_n64.xml
+- name: scenes/dungeons/jyasinboss
+ xml_path: assets/xml/scenes/dungeons/jyasinboss.xml
+- name: scenes/dungeons/jyasinzou
+ xml_path: assets/xml/scenes/dungeons/jyasinzou.xml
+- name: scenes/dungeons/men
+ xml_path: assets/xml/scenes/dungeons/men.xml
+- name: scenes/dungeons/MIZUsin
+ xml_path: assets/xml/scenes/dungeons/MIZUsin.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.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_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_pal_n64.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_pal_n64.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_pal_n64.xml
+- name: scenes/overworld/spot01
+ xml_path: assets/xml/scenes/overworld/spot01_pal_n64.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_pal_n64.xml
+- name: scenes/overworld/spot05
+ xml_path: assets/xml/scenes/overworld/spot05_pal_n64.xml
+- name: scenes/overworld/spot06
+ xml_path: assets/xml/scenes/overworld/spot06_pal_n64.xml
+- name: scenes/overworld/spot07
+ xml_path: assets/xml/scenes/overworld/spot07_pal_n64.xml
+- name: scenes/overworld/spot08
+ xml_path: assets/xml/scenes/overworld/spot08.xml
+- name: scenes/overworld/spot09
+ xml_path: assets/xml/scenes/overworld/spot09_pal_n64.xml
+- name: scenes/overworld/spot10
+ xml_path: assets/xml/scenes/overworld/spot10.xml
+- name: scenes/overworld/spot11
+ xml_path: assets/xml/scenes/overworld/spot11_pal_n64.xml
+- name: scenes/overworld/spot12
+ xml_path: assets/xml/scenes/overworld/spot12_pal_n64.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_pal_n64.xml
+- name: scenes/overworld/spot17
+ xml_path: assets/xml/scenes/overworld/spot17_pal_n64.xml
+- name: scenes/overworld/spot18
+ xml_path: assets/xml/scenes/overworld/spot18_pal_n64.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: 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.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_n64.xml
diff --git a/baseroms/pal-1.1/segments.csv b/baseroms/pal-1.1/segments.csv
new file mode 100644
index 0000000000..9104452ea7
--- /dev/null
+++ b/baseroms/pal-1.1/segments.csv
@@ -0,0 +1,1512 @@
+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,800116E0
+n64dd,801C4F00
+ovl_title,80800000
+ovl_select,808009C0
+ovl_opening,80803720
+ovl_file_choose,80803880
+ovl_kaleido_scope,808140A0
+ovl_player_actor,80830D10
+ovl_map_mark_data,80857490
+ovl_En_Test,8085DFF0
+ovl_En_GirlA,808638A0
+ovl_En_Part,808661C0
+ovl_En_Light,808677D0
+ovl_En_Door,808685C0
+ovl_En_Box,80869400
+ovl_En_Poh,8086AF40
+ovl_En_Okuta,8086F0D0
+ovl_En_Bom,808716B0
+ovl_En_Wallmas,80872580
+ovl_En_Dodongo,80873F90
+ovl_En_Firefly,80876D30
+ovl_En_Horse,80878EA0
+ovl_En_Arrow,80885100
+ovl_En_Elf,808867F0
+ovl_En_Niw,8088B1B0
+ovl_En_Tite,8088E4E0
+ovl_En_Reeba,80891280
+ovl_En_Peehat,80892CF0
+ovl_En_Holl,808963F0
+ovl_En_Scene_Change,808973C0
+ovl_En_Zf,808974F0
+ovl_En_Hata,8089DFF0
+ovl_Boss_Dodongo,8089E580
+ovl_Boss_Goma,808A8060
+ovl_En_Zl1,808ADFE0
+ovl_En_Viewer,808B1DE0
+ovl_En_Goma,808B4CB0
+ovl_Bg_Pushbox,808B7940
+ovl_En_Bubble,808B7C40
+ovl_Door_Shutter,808B9060
+ovl_En_Dodojr,808BB2E0
+ovl_En_Bdfire,808BD180
+ovl_En_Boom,808BDD10
+ovl_En_Torch2,808BE5D0
+ovl_En_Bili,808C0D70
+ovl_En_Tp,808C3040
+ovl_En_St,808C4E90
+ovl_En_Bw,808C7B00
+ovl_En_Eiyer,808CAE70
+ovl_En_River_Sound,808CCAD0
+ovl_En_Horse_Normal,808CD460
+ovl_En_Ossan,808CFA80
+ovl_Bg_Treemouth,808D6060
+ovl_Bg_Dodoago,808D76C0
+ovl_Bg_Hidan_Dalm,808D8470
+ovl_Bg_Hidan_Hrock,808D8CC0
+ovl_En_Horse_Ganon,808D94F0
+ovl_Bg_Hidan_Rock,808DA270
+ovl_Bg_Hidan_Rsekizou,808DB360
+ovl_Bg_Hidan_Sekizou,808DBF40
+ovl_Bg_Hidan_Sima,808DD390
+ovl_Bg_Hidan_Syoku,808DE2B0
+ovl_En_Xc,808DE710
+ovl_Bg_Hidan_Curtain,808E4EA0
+ovl_Bg_Spot00_Hanebasi,808E5940
+ovl_En_Mb,808E6A50
+ovl_En_Bombf,808EAC80
+ovl_Bg_Hidan_Firewall,808EC0F0
+ovl_Bg_Dy_Yoseizo,808EC850
+ovl_En_Zl2,808EF650
+ovl_Bg_Hidan_Fslift,808F3D80
+ovl_En_OE2,808F4250
+ovl_Bg_Ydan_Hasi,808F4330
+ovl_Bg_Ydan_Maruta,808F4AE0
+ovl_Boss_Ganondrof,808F51C0
+ovl_En_Am,808F9F30
+ovl_En_Dekubaba,808FC330
+ovl_En_M_Fire1,808FFDD0
+ovl_En_M_Thunder,808FFF70
+ovl_Bg_Ddan_Jd,80901560
+ovl_Bg_Breakwall,80901BB0
+ovl_En_Jj,80902A20
+ovl_En_Horse_Zelda,80903FF0
+ovl_Bg_Ddan_Kd,80904AE0
+ovl_Door_Warp1,809053D0
+ovl_Obj_Syokudai,80909680
+ovl_Item_B_Heart,8090A2C0
+ovl_En_Dekunuts,8090A6B0
+ovl_Bg_Menkuri_Kaiten,8090BEB0
+ovl_Bg_Menkuri_Eye,8090C040
+ovl_En_Vali,8090C4E0
+ovl_Bg_Mizu_Movebg,8090EB80
+ovl_Bg_Mizu_Water,8090FD20
+ovl_Arms_Hook,809109F0
+ovl_En_fHG,80911750
+ovl_Bg_Mori_Hineri,80914080
+ovl_En_Bb,80914D80
+ovl_Bg_Toki_Hikari,80918A50
+ovl_En_Yukabyun,809197F0
+ovl_Bg_Toki_Swd,80919E00
+ovl_En_Fhg_Fire,8091B450
+ovl_Bg_Mjin,8091DA70
+ovl_Bg_Hidan_Kousi,8091DE50
+ovl_Door_Toki,8091E3D0
+ovl_Bg_Hidan_Hamstep,8091E530
+ovl_En_Bird,8091F3E0
+ovl_En_Wood02,8091F8A0
+ovl_En_Lightbox,80920A80
+ovl_En_Pu_box,80920F00
+ovl_En_Trap,80921240
+ovl_En_Arow_Trap,809224E0
+ovl_En_Vase,80922630
+ovl_En_Ta,80922730
+ovl_En_Tk,809260F0
+ovl_Bg_Mori_Bigst,80927F20
+ovl_Bg_Mori_Elevator,80928850
+ovl_Bg_Mori_Kaitenkabe,80929340
+ovl_Bg_Mori_Rakkatenjo,809299A0
+ovl_En_Vm,8092A310
+ovl_Demo_Effect,8092BBC0
+ovl_Demo_Kankyo,809316C0
+ovl_Bg_Hidan_Fwbig,809353C0
+ovl_En_Floormas,809360A0
+ovl_En_Heishi1,80939480
+ovl_En_Rd,8093A990
+ovl_En_Po_Sisters,8093D240
+ovl_Bg_Heavy_Block,80941F30
+ovl_Bg_Po_Event,80943820
+ovl_Obj_Mure,80945660
+ovl_En_Sw,80946670
+ovl_Boss_Fd,80949E60
+ovl_Object_Kankyo,80951190
+ovl_En_Du,809543B0
+ovl_En_Fd,80955E50
+ovl_En_Horse_Link_Child,80958B10
+ovl_Door_Ana,8095A910
+ovl_Bg_Spot02_Objects,8095AF80
+ovl_Bg_Haka,8095C2D0
+ovl_Magic_Wind,8095C990
+ovl_Magic_Fire,8095E690
+ovl_En_Ru1,80960960
+ovl_Boss_Fd2,80968000
+ovl_En_Fd_Fire,8096BD30
+ovl_En_Dh,8096CA40
+ovl_En_Dha,8096E510
+ovl_En_Rl,8096F510
+ovl_En_Encount1,809703F0
+ovl_Demo_Du,80970F50
+ovl_Demo_Im,80974730
+ovl_Demo_Tre_Lgt,809786A0
+ovl_En_Fw,80978DB0
+ovl_Bg_Vb_Sima,8097A560
+ovl_En_Vb_Ball,8097AC70
+ovl_Bg_Haka_Megane,8097BE10
+ovl_Bg_Haka_MeganeBG,8097C210
+ovl_Bg_Haka_Ship,8097C8D0
+ovl_Bg_Haka_Sgami,8097D310
+ovl_En_Heishi2,8097DF30
+ovl_En_Encount2,80980130
+ovl_En_Fire_Rock,80981360
+ovl_En_Brob,80982470
+ovl_Mir_Ray,80983560
+ovl_Bg_Spot09_Obj,80984E20
+ovl_Bg_Spot18_Obj,80985330
+ovl_Boss_Va,80985C00
+ovl_Bg_Haka_Tubo,8099CDF0
+ovl_Bg_Haka_Trap,8099D810
+ovl_Bg_Haka_Huta,8099EDE0
+ovl_Bg_Haka_Zou,8099F880
+ovl_Bg_Spot17_Funen,809A0A70
+ovl_En_Syateki_Itm,809A0CC0
+ovl_En_Syateki_Man,809A1A60
+ovl_En_Tana,809A2820
+ovl_En_Nb,809A2AC0
+ovl_Boss_Mo,809A7090
+ovl_En_Sb,809B7140
+ovl_En_Bigokuta,809B8580
+ovl_En_Karebaba,809BB090
+ovl_Bg_Bdan_Objects,809BC980
+ovl_Demo_Sa,809BDC50
+ovl_Demo_Go,809C0770
+ovl_En_In,809C14D0
+ovl_En_Tr,809C4270
+ovl_Bg_Spot16_Bombstone,809C5B70
+ovl_Bg_Hidan_Kowarerukabe,809C70B0
+ovl_Bg_Bombwall,809C7F80
+ovl_En_Ru2,809C8840
+ovl_Obj_Dekujr,809CB5C0
+ovl_Bg_Mizu_Uzu,809CBC00
+ovl_Bg_Spot06_Objects,809CBDD0
+ovl_Bg_Ice_Objects,809CD1E0
+ovl_Bg_Haka_Water,809CE120
+ovl_En_Ma2,809CE900
+ovl_En_Bom_Chu,809CF960
+ovl_En_Horse_Game_Check,809D1000
+ovl_Boss_Tw,809D20D0
+ovl_En_Rr,809E7BD0
+ovl_En_Ba,809EA100
+ovl_En_Bx,809EBFD0
+ovl_En_Anubice,809ECAC0
+ovl_En_Anubice_Fire,809EDD70
+ovl_Bg_Mori_Hashigo,809EEB30
+ovl_Bg_Mori_Hashira4,809EF3F0
+ovl_Bg_Mori_Idomizu,809EF980
+ovl_Bg_Spot16_Doughnut,809EFFC0
+ovl_Bg_Bdan_Switch,809F0570
+ovl_En_Ma1,809F19A0
+ovl_Boss_Ganon,809F2C80
+ovl_Boss_Sst,80A18A60
+ovl_En_Ny,80A25020
+ovl_En_Fr,80A26950
+ovl_Item_Shield,80A293E0
+ovl_Bg_Ice_Shelter,80A29DF0
+ovl_En_Ice_Hono,80A2B020
+ovl_Item_Ocarina,80A2C210
+ovl_Magic_Dark,80A2C9E0
+ovl_Demo_6K,80A2E230
+ovl_En_Anubice_Tag,80A30F40
+ovl_Bg_Haka_Gate,80A31210
+ovl_Bg_Spot15_Saku,80A322A0
+ovl_Bg_Jya_Goroiwa,80A325E0
+ovl_Bg_Jya_Zurerukabe,80A32D60
+ovl_Bg_Jya_Cobra,80A33410
+ovl_Bg_Jya_Kanaami,80A35130
+ovl_Fishing,80A354E0
+ovl_Obj_Oshihiki,80A4FF70
+ovl_Bg_Gate_Shutter,80A51A20
+ovl_Eff_Dust,80A51EA0
+ovl_Bg_Spot01_Fusya,80A53280
+ovl_Bg_Spot01_Idohashira,80A53520
+ovl_Bg_Spot01_Idomizu,80A54120
+ovl_Bg_Po_Syokudai,80A54430
+ovl_Bg_Ganon_Otyuka,80A54D80
+ovl_Bg_Spot15_Rrbox,80A573C0
+ovl_Bg_Umajump,80A581A0
+ovl_En_Insect,80A58330
+ovl_En_Butte,80A5A850
+ovl_En_Fish,80A5BE20
+ovl_Bg_Spot08_Iceblock,80A5DF30
+ovl_Item_Etcetera,80A5EF70
+ovl_Arrow_Fire,80A5F840
+ovl_Arrow_Ice,80A61700
+ovl_Arrow_Light,80A635E0
+ovl_Obj_Kibako,80A654D0
+ovl_Obj_Tsubo,80A661D0
+ovl_En_Wonder_Item,80A671C0
+ovl_En_Ik,80A67EF0
+ovl_Demo_Ik,80A6C520
+ovl_En_Skj,80A6DA30
+ovl_En_Skjneedle,80A71370
+ovl_En_G_Switch,80A71680
+ovl_Demo_Ext,80A72EB0
+ovl_Demo_Shd,80A737F0
+ovl_En_Dns,80A75C00
+ovl_Elf_Msg,80A76F90
+ovl_En_Honotrap,80A77580
+ovl_En_Tubo_Trap,80A78AD0
+ovl_Obj_Ice_Poly,80A79770
+ovl_Bg_Spot03_Taki,80A7A120
+ovl_Bg_Spot07_Taki,80A7AA10
+ovl_En_Fz,80A7AFE0
+ovl_En_Po_Relay,80A7CFF0
+ovl_Bg_Relay_Objects,80A7E700
+ovl_En_Diving_Game,80A7EEB0
+ovl_En_Kusa,80A80860
+ovl_Obj_Bean,80A81D40
+ovl_Obj_Bombiwa,80A844D0
+ovl_Obj_Switch,80A84A40
+ovl_Obj_Elevator,80A86800
+ovl_Obj_Lift,80A86BC0
+ovl_Obj_Hsblock,80A875E0
+ovl_En_Okarina_Tag,80A87BB0
+ovl_En_Yabusame_Mark,80A890B0
+ovl_En_Goroiwa,80A89780
+ovl_En_Ex_Ruppy,80A8BB40
+ovl_En_Toryo,80A8CC00
+ovl_En_Daiku,80A8D890
+ovl_En_Nwc,80A8EFD0
+ovl_En_Blkobj,80A8FA10
+ovl_Item_Inbox,80A8FF70
+ovl_En_Ge1,80A900D0
+ovl_Obj_Blockstop,80A92100
+ovl_En_Sda,80A922A0
+ovl_En_Clear_Tag,80A939A0
+ovl_En_Niw_Lady,80A9EF40
+ovl_En_Gm,80AA0840
+ovl_En_Ms,80AA1570
+ovl_En_Hs,80AA1C60
+ovl_Bg_Ingate,80AA2800
+ovl_En_Kanban,80AA2B90
+ovl_En_Heishi3,80AA5CE0
+ovl_En_Syateki_Niw,80AA66D0
+ovl_En_Attack_Niw,80AA8760
+ovl_Bg_Spot01_Idosoko,80AA99C0
+ovl_En_Sa,80AA9BD0
+ovl_En_Wonder_Talk,80AABE40
+ovl_Bg_Gjyo_Bridge,80AAC4D0
+ovl_En_Ds,80AAC9D0
+ovl_En_Mk,80AAD5F0
+ovl_En_Bom_Bowl_Man,80AAE480
+ovl_En_Bom_Bowl_Pit,80AAF9C0
+ovl_En_Owl,80AB0330
+ovl_En_Ishi,80AB3ED0
+ovl_Obj_Hana,80ABD020
+ovl_Obj_Lightswitch,80ABD330
+ovl_Obj_Mure2,80ABE760
+ovl_En_Go,80ABF180
+ovl_En_Fu,80AC37C0
+ovl_En_Changer,80AC4510
+ovl_Bg_Jya_Megami,80AC4EF0
+ovl_Bg_Jya_Lift,80AC60D0
+ovl_Bg_Jya_Bigmirror,80AC6620
+ovl_Bg_Jya_Bombchuiwa,80AC6E60
+ovl_Bg_Jya_Amishutter,80AC7990
+ovl_Bg_Jya_Bombiwa,80AC7D20
+ovl_Bg_Spot18_Basket,80AC82E0
+ovl_En_Ganon_Organ,80AC92D0
+ovl_En_Siofuki,80AD02D0
+ovl_En_Stream,80AD1080
+ovl_En_Mm,80AD1610
+ovl_En_Ko,80AD2C30
+ovl_En_Kz,80AD6D70
+ovl_En_Weather_Tag,80AD8310
+ovl_Bg_Sst_Floor,80AD9200
+ovl_En_Ani,80AD9760
+ovl_En_Ex_Item,80ADA4D0
+ovl_Bg_Jya_Ironobj,80ADB640
+ovl_En_Js,80ADC3F0
+ovl_En_Jsjutan,80ADCDC0
+ovl_En_Cs,80AE26E0
+ovl_En_Md,80AE3910
+ovl_En_Hy,80AE5F80
+ovl_En_Ganon_Mant,80AE98C0
+ovl_En_Okarina_Effect,80AEDAE0
+ovl_En_Mag,80AEDEA0
+ovl_Door_Gerudo,80AF2A00
+ovl_Elf_Msg2,80AF2FF0
+ovl_Demo_Gt,80AF3460
+ovl_En_Po_Field,80AF8A60
+ovl_Efc_Erupc,80AFC4D0
+ovl_Bg_Zg,80AFCFB0
+ovl_En_Heishi4,80AFD420
+ovl_En_Zl3,80AFE320
+ovl_Boss_Ganon2,80B06170
+ovl_En_Kakasi,80B18F90
+ovl_En_Takara_Man,80B19CD0
+ovl_Obj_Makeoshihiki,80B1A590
+ovl_Oceff_Spot,80B1AA20
+ovl_End_Title,80B1B950
+ovl_En_Torch,80B1FA80
+ovl_Demo_Ec,80B1FB70
+ovl_Shot_Sun,80B233D0
+ovl_En_Dy_Extra,80B23A90
+ovl_En_Wonder_Talk2,80B24010
+ovl_En_Ge2,80B246B0
+ovl_Obj_Roomtimer,80B26050
+ovl_En_Ssh,80B262A0
+ovl_En_Sth,80B28890
+ovl_Oceff_Wipe,80B2C940
+ovl_Effect_Ss_Dust,80B2D690
+ovl_Effect_Ss_KiraKira,80B2DEC0
+ovl_Effect_Ss_Bomb,80B2E530
+ovl_Effect_Ss_Bomb2,80B2E950
+ovl_Effect_Ss_Blast,80B2F280
+ovl_Effect_Ss_G_Spk,80B2F610
+ovl_Effect_Ss_D_Fire,80B2FBC0
+ovl_Effect_Ss_Bubble,80B300B0
+ovl_Effect_Ss_G_Ripple,80B30530
+ovl_Effect_Ss_G_Splash,80B30A90
+ovl_Effect_Ss_G_Magma,80B30F40
+ovl_Effect_Ss_G_Fire,80B311A0
+ovl_Effect_Ss_Lightning,80B31430
+ovl_Effect_Ss_Dt_Bubble,80B31B00
+ovl_Effect_Ss_Hahen,80B32090
+ovl_Effect_Ss_Stick,80B326D0
+ovl_Effect_Ss_Sibuki,80B32A70
+ovl_Effect_Ss_Sibuki2,80B33140
+ovl_Effect_Ss_G_Magma2,80B33470
+ovl_Effect_Ss_Stone1,80B33980
+ovl_Effect_Ss_HitMark,80B33D10
+ovl_Effect_Ss_Fhg_Flash,80B34260
+ovl_Effect_Ss_K_Fire,80B351E0
+ovl_Effect_Ss_Solder_Srch_Ball,80B35610
+ovl_Effect_Ss_Kakera,80B357C0
+ovl_Effect_Ss_Ice_Piece,80B36850
+ovl_Effect_Ss_En_Ice,80B36C90
+ovl_Effect_Ss_Fire_Tail,80B37550
+ovl_Effect_Ss_En_Fire,80B37C50
+ovl_Effect_Ss_Extra,80B38390
+ovl_Effect_Ss_Fcircle,80B38750
+ovl_Effect_Ss_Dead_Db,80B38C00
+ovl_Effect_Ss_Dead_Dd,80B390E0
+ovl_Effect_Ss_Dead_Ds,80B39670
+ovl_Effect_Ss_Dead_Sound,80B39AF0
+ovl_Oceff_Storm,80B39C30
+ovl_En_Weiyer,80B3B7D0
+ovl_Bg_Spot05_Soko,80B3D1D0
+ovl_Bg_Jya_1flift,80B3D4F0
+ovl_Bg_Jya_Haheniron,80B3DB80
+ovl_Bg_Spot12_Gate,80B3E370
+ovl_Bg_Spot12_Saku,80B3E780
+ovl_En_Hintnuts,80B3EC40
+ovl_En_Nutsball,80B40670
+ovl_Bg_Spot00_Break,80B40C90
+ovl_En_Shopnuts,80B40E30
+ovl_En_It,80B41D40
+ovl_En_GeldB,80B41ED0
+ovl_Oceff_Wipe2,80B47280
+ovl_Oceff_Wipe3,80B489F0
+ovl_En_Niw_Girl,80B4A140
+ovl_En_Dog,80B4AC10
+ovl_En_Si,80B4BDC0
+ovl_Bg_Spot01_Objects2,80B4C2C0
+ovl_Obj_Comb,80B4C780
+ovl_Bg_Spot11_Bakudankabe,80B4CFE0
+ovl_Obj_Kibako2,80B4D620
+ovl_En_Dnt_Demo,80B4DCE0
+ovl_En_Dnt_Jiji,80B4EA00
+ovl_En_Dnt_Nomal,80B4FF10
+ovl_En_Guest,80B52D50
+ovl_Bg_Bom_Guard,80B536F0
+ovl_En_Hs2,80B53910
+ovl_Demo_Kekkai,80B53EF0
+ovl_Bg_Spot08_Bakudankabe,80B551D0
+ovl_Bg_Spot17_Bakudankabe,80B55870
+ovl_Obj_Mure3,80B55F50
+ovl_En_Tg,80B56720
+ovl_En_Mu,80B56DF0
+ovl_En_Go2,80B57710
+ovl_En_Wf,80B5D750
+ovl_En_Skb,80B61A60
+ovl_Demo_Gj,80B63350
+ovl_Demo_Geff,80B67000
+ovl_Bg_Gnd_Firemeiro,80B67820
+ovl_Bg_Gnd_Darkmeiro,80B67D60
+ovl_Bg_Gnd_Soulmeiro,80B68520
+ovl_Bg_Gnd_Nisekabe,80B68D80
+ovl_Bg_Gnd_Iceblock,80B68EF0
+ovl_Bg_Ydan_Sp,80B69FF0
+ovl_En_Gb,80B6B760
+ovl_En_Gs,80B6CE90
+ovl_Bg_Mizu_Bwall,80B6ED30
+ovl_Bg_Mizu_Shutter,80B70200
+ovl_En_Daiku_Kakariko,80B70A00
+ovl_Bg_Bowl_Wall,80B71DC0
+ovl_En_Wall_Tubo,80B72740
+ovl_En_Po_Desert,80B72C30
+ovl_En_Crow,80B739F0
+ovl_Door_Killer,80B75090
+ovl_Bg_Spot11_Oasis,80B76600
+ovl_Bg_Spot18_Futa,80B76D30
+ovl_Bg_Spot18_Shutter,80B76ED0
+ovl_En_Ma3,80B77420
+ovl_En_Cow,80B784F0
+ovl_Bg_Ice_Turara,80B79950
+ovl_Bg_Ice_Shutter,80B7A180
+ovl_En_Kakasi2,80B7A5F0
+ovl_En_Kakasi3,80B7AD10
+ovl_Oceff_Wipe4,80B7BDF0
+ovl_En_Eg,80B7CDD0
+ovl_Bg_Menkuri_Nisekabe,80B7CF80
+ovl_En_Zo,80B7D0D0
+ovl_Effect_Ss_Ice_Smoke,80B7F680
+ovl_Obj_Makekinsuta,80B7FB40
+ovl_En_Ge3,80B7FC90
+ovl_Obj_Timeblock,80B808D0
+ovl_Obj_Hamishi,80B81510
+ovl_En_Zl4,80B81D60
+ovl_En_Mm2,80B86790
+ovl_Bg_Jya_Block,80B87550
+ovl_Obj_Warp2block,80B877C0
+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,
+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,
+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,
+market_day_scene,
+market_day_room_0,
+market_night_scene,
+market_night_room_0,
+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,
+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,
+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,
+kenjyanoma_scene,
+kenjyanoma_room_0,
+tokinoma_scene,
+tokinoma_room_0,
+tokinoma_room_1,
+link_home_scene,
+link_home_room_0,
+kokiri_shop_scene,
+kokiri_shop_room_0,
+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,
+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,
+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,
+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,
+moribossroom_scene,
+moribossroom_room_0,
+moribossroom_room_1,
+syatekijyou_scene,
+syatekijyou_room_0,
+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,
+shop1_scene,
+shop1_room_0,
+hairal_niwa_scene,
+hairal_niwa_room_0,
+ganon_tou_scene,
+ganon_tou_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,
+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,
+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,
+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,
+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,
+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,
+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,
+HAKAdanCH_scene,
+HAKAdanCH_room_0,
+HAKAdanCH_room_1,
+HAKAdanCH_room_2,
+HAKAdanCH_room_3,
+HAKAdanCH_room_4,
+HAKAdanCH_room_5,
+HAKAdanCH_room_6,
+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,
+face_shop_scene,
+face_shop_room_0,
+kinsuta_scene,
+kinsuta_room_0,
+ganontikasonogo_scene,
+ganontikasonogo_room_0,
+ganontikasonogo_room_1,
+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/data/unk_80009410.data.s b/data/unk_80009410.data.s
deleted file mode 100644
index 175b179a58..0000000000
--- a/data/unk_80009410.data.s
+++ /dev/null
@@ -1,27 +0,0 @@
-.include "macro.inc"
-
-/* assembler directives */
-.set noat /* allow manual use of $at */
-.set noreorder /* don't insert nops after branches */
-.set gp=64 /* allow use of 64-bit general purpose registers */
-
-.section .data
-
-.balign 16
-
-/* Unused */
-glabel D_80009410
- .word osStopThread
- .word __osSetHWIntrRoutine
-#if PLATFORM_N64
- .word osEPiWriteIo
- .word osEPiReadIo
-#endif
- .word __osSetFpcCsr
- .word __osGetFpcCsr
- .word __osGetHWIntrRoutine
- .word __osSetHWIntrRoutine
- .word osViGetNextFramebuffer
-#if !PLATFORM_N64
- .word bcmp
-#endif
diff --git a/data/z_text.data.s b/data/z_text.data.s
index d2a76e0b8e..6efaf07205 100644
--- a/data/z_text.data.s
+++ b/data/z_text.data.s
@@ -1,4 +1,5 @@
.include "macro.inc"
+#include "versions.h"
/* assembler directives */
.set noat /* allow manual use of $at */
@@ -11,7 +12,7 @@
/* temporary file name, rename to something more appropriate when decompiled */
-#if OOT_DEBUG
+#if DEBUG_ASSETS
glabel gMojiFontTLUTs
.incbin "incbin/gMojiFontTLUTs"
diff --git a/docker-compose.yml b/docker-compose.yml
index a6cdbbdf8e..bca75f474c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,11 +1,8 @@
-version: "3"
services:
oot:
+ build:
+ dockerfile: Dockerfile
volumes:
- - oot-sync:/oot:nocopy
- image: "oot:latest"
+ - ./:/oot
tty: true
-
-volumes:
- oot-sync:
- external: true
+ stdin_open: true
diff --git a/docs/BUILDING_DOCKER.md b/docs/BUILDING_DOCKER.md
index afc35b48bc..98aed29c97 100644
--- a/docs/BUILDING_DOCKER.md
+++ b/docs/BUILDING_DOCKER.md
@@ -6,22 +6,20 @@ To use Docker, you'll need either Docker Desktop or Docker Toolbox installed and
You'll also need to prepare a local version of the project with a copied base ROM (see steps [2](../README.md#2-clone-the-repository) and [3](../README.md#3-prepare-a-base-rom) of the Linux instructions).
-## 2. Create the Docker image
+## 2. Create and start the Docker image build
-From inside your local project, run the following command:
+From the root of your local project, run the following command:
```bash
-docker build . -t oot
+docker-compose up --build
```
-## 3. Start the container
+This should immediately begin steps [4](../README.md#4-setup-the-rom-and-build-process) and [5](../README.md#5-build-the-rom) within the Docker container.
-To start the container, you can mount your local filesystem into the Docker container and run an interactive bash session.
+## 3. Shell into the 'oot' container
+
+To exec into the oot Docker image at any time, run the following command either during or after the build:
```bash
-docker run -it --rm --mount type=bind,source="$(pwd)",destination=/oot oot /bin/bash
+docker-compose exec oot bash
```
-
-## 4. Setup and Build the ROM
-
-Once inside the container, you can follow steps [4](../README.md#4-setup-the-rom-and-build-process) and [5](../README.md#5-build-the-rom) of the Linux instructions to setup and build the ROM, or run any other command you need.
diff --git a/docs/BUILDING_MACOS.md b/docs/BUILDING_MACOS.md
index af58ac3fce..8d2f67458e 100644
--- a/docs/BUILDING_MACOS.md
+++ b/docs/BUILDING_MACOS.md
@@ -14,12 +14,13 @@ For macOS, use Homebrew to install the following dependencies:
* bash
* clang-format
* libxml2
+* libiconv
You can install them with the following commands:
```bash
brew update
-brew install coreutils make python3 libpng bash clang-format libxml2
+brew install coreutils make python3 libpng bash clang-format libxml2 libiconv
```
(The repository expects Homebrew-installed programs to be either linked correctly in `$PATH` etc. or in their default locations.)
@@ -42,10 +43,9 @@ cd ~/binutils-tmp
Get and extract binutils source
```bash
-wget https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
+curl -O https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
tar xjf binutils-2.35.tar.bz2
```
-(You may find this command does not work: if so, just access the URL in a browser and save it to `~/binutils-tmp`.)
Create and enter a build directory
```bash
@@ -55,18 +55,18 @@ cd build-binutils
Configure the build
```bash
-../binutils-2.35/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-gprof --disable-gdb --disable-werror
+../binutils-2.35/configure --target=mips-linux-gnu --prefix=/opt/cross --with-system-zlib --disable-gprof --disable-gdb --disable-werror
```
Make and install binutils
```bash
-make -j
+make -j$(nproc)
sudo make install
```
-Edit your `~/.bash_profile`/`~/.zsh_profile` (or whichever shell you use) to add the new binutils binaries to the system PATH
+Edit your `~/.bash_profile`/`~/.zprofile` (or whichever shell you use) to add the new binutils binaries to the system PATH
```bash
-echo "export PATH=$PATH:/opt/cross/bin" >> ~/.bash_profile
+echo 'export PATH="$PATH:/opt/cross/bin"' >> ~/.bash_profile
```
Reload `~/.bash_profile` (or just launch a new terminal tab)
@@ -82,3 +82,44 @@ If this worked, you can now delete the temporary directory `~/binutils-tmp`.
Apple's version of `make` is very out-of-date, so you should use the brew-installed `gmake` in place of `make` in this repo from now on.
You should now be able to continue from [step 2](../README.md#2-clone-the-repository) of the Linux instructions.
+
+
+## 4. Building GCC (optional)
+
+If you'd like to compile with GCC instead of IDO (e.g. for modding), you can build it from source similarly to how we built binutils:
+
+Install dependences
+```bash
+brew install gcc@14 gmp isl libmpc mpfr
+```
+
+Create and enter local working dir
+```bash
+mkdir ~/gcc-tmp
+cd ~/gcc-tmp
+```
+
+Get and extract gcc source
+```bash
+curl -O https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz
+tar xvf gcc-14.2.0.tar.xz
+```
+
+Create and enter a build directory
+```bash
+mkdir build-gcc
+cd build-gcc
+```
+
+Configure the build
+```bash
+CC=gcc-14 CXX=g++-14 ../gcc-14.2.0/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-nls --enable-languages=c --with-gmp=$(brew --prefix)/opt/gmp --with-mpfr=$(brew --prefix)/opt/mpfr --with-mpc=$(brew --prefix)/opt/libmpc --with-isl=$(brew --prefix)/opt/isl
+```
+
+Make and install gcc
+```bash
+CC=gcc-14 CXX=g++-14 make all-gcc -j$(nproc)
+sudo make install-gcc
+```
+
+If this worked, you can now delete the temporary directory `~/gcc-tmp`.
diff --git a/docs/assets/extraction.md b/docs/assets/extraction.md
new file mode 100644
index 0000000000..a4c342db3b
--- /dev/null
+++ b/docs/assets/extraction.md
@@ -0,0 +1,18 @@
+Assets are not committed to the repo; instead, they are extracted from the ROM files as part of `make setup`.
+
+Assets are extracted to `extracted/VERSION/assets` (for example `extracted/ntsc-1.0/assets` for the `ntsc-1.0` version), based on the descriptions stored in xml files in `assets/xml/`.
+
+For details on the xml files contents, see [the assets xml specification file](../../tools/assets/descriptor/spec.md).
+
+The extraction tool can use [rich](https://github.com/Textualize/rich) if installed to make output prettier.
+If you are looking at output or errors from during extraction, consider installing rich for a better experience: `.venv/bin/python3 -m pip install rich`
+
+To run the extraction outside of `make setup`, use `./tools/extract_assets.sh VERSION`.
+- Pass `-f` to force extraction: otherwise only assets for which xmls were modified will be extracted.
+- Pass `-j` to use multiprocessing, making extraction quicker. Note that this makes for less readable errors if any error happens.
+- Pass `-s name` to extract assets using baserom file `name`.
+- Pass `-r -s 'name.*'` to extract assets using baserom files whose name match regular expression `name.*`.
+
+There currently are various hacks in place in the extraction tool source code to make extraction of some corner cases possible, or to silence extraction warnings.
+Some of these hacks check for the name of resources, so renaming a few specific resources may need updating the extraction tool's source too.
+The plan is to eventually remove those hardcoded checks from the source and use a `HackMode` attribute in the xmls to trigger the hacks code paths.
diff --git a/docs/assets/images.md b/docs/assets/images.md
new file mode 100644
index 0000000000..e35e16201a
--- /dev/null
+++ b/docs/assets/images.md
@@ -0,0 +1,72 @@
+# Images
+
+Images in the rom are in N64 image formats.
+On extraction, they are converted to png and written to `extracted/VERSION/`.
+On build, they are converted back to N64 formats and written as C arrays to `.inc.c` files in `build/VERSION/`.
+
+The build system will also pick up images in `assets/`, allowing modders to add or even [replace](#replacing-images) images.
+
+PNG files have suffixes indicating how they are to be converted. For example, a `gDekuStickTex.i8.png` file will be converted to `i8`.
+
+The valid formats are `rgba32`, `rgba16`, `i4`, `i8`, `ia4`, `ia8`, `ia16`, `ci4` and `ci8`.
+
+An optional suffix can be used to indicate the element type of the C array written out, for example `.u32` in `gHylianMan1ShirtTex.i8.u32.png`. The valid array element types are `u64` and `u32`. If omitted, the element type defaults to `u64`. `u32` is only used for unaligned textures.
+
+The tool implementing png->n64 conversion is [build_from_png](../../tools/assets/build_from_png/build_from_png.c), using [n64texconv](../../tools/assets/n64texconv/) as its backbone.
+
+# Replacing images
+
+The contents of `extracted/` are meant to hold the baserom assets and should not be modified. Instead, replacing an image can be done by creating a png file at the same relative path under `assets/` as the image to replace.
+
+For example, replacing `gLinkHairTex` (`extracted/VERSION/assets/objects/gameplay_keep/gLinkHairTex.rgba16.png`) with the texture for `gHylianMan1BeardedEyeOpenTex` (`extracted/VERSION/assets/objects/object_ahg/gHylianMan1BeardedEyeOpenTex.ci8.tlut_gHylianMan1TLUT_u32.u32.png`):
+
+```sh
+# for VERSION=gc-eu-mq-dbg
+
+mkdir -p assets/objects/gameplay_keep/
+cp \
+ extracted/gc-eu-mq-dbg/assets/objects/object_ahg/gHylianMan1BeardedEyeOpenTex.ci8.tlut_gHylianMan1TLUT_u32.u32.png \
+ assets/objects/gameplay_keep/gLinkHairTex.rgba16.png
+
+# Cause make to rebuild gameplay_keep, where gLinkHairTex is
+touch extracted/gc-eu-mq-dbg/assets/objects/gameplay_keep/gameplay_keep.c
+
+make VERSION=gc-eu-mq-dbg
+```
+
+# CI images
+
+CI (Color Indexed) images also have a palette or TLUT (Texture Look-Up Table).
+
+PNG images to be converted to CI formats may have a `.tlut_gNameTLUT[_]` suffix indicating the name and element type (optional, defaults to u64) of the TLUT `gNameTLUT.tlut.rgba16[.].inc.c` file to write the palette to.
+
+If this suffix is omitted, the TLUT will be written to a `gNameTex.tlut.rgba16.inc.c` file named after the CI image.
+
+For example without the `.tlut_` suffix, `gGanonHairFringeTex.ci8.png`:
+
+- extracted to `extracted/VERSION/assets/objects/object_ganon2/gGanonHairFringeTex.ci8.png`
+- texture written to `build/VERSION/assets/objects/object_ganon2/gGanonHairFringeTex.ci8.inc.c`
+- palette written to `build/VERSION/assets/objects/object_ganon2/gGanonHairFringeTex.tlut.rgba16.inc.c`
+
+For example with the `.tlut_` suffix, `gCowNoseTex.ci8.tlut_gCowTLUT.png`:
+
+- extracted to `extracted/gc-eu-mq-dbg/assets/objects/object_cow/gCowNoseTex.ci8.tlut_gCowTLUT.png`
+- texture written to `build/gc-eu-mq-dbg/assets/objects/object_cow/gCowNoseTex.ci8.tlut_gCowTLUT.inc.c`
+- palette written to `build/gc-eu-mq-dbg/assets/objects/object_cow/gCowTLUT.tlut.rgba16.bin`
+
+CI images with a `.tlut_` suffix have a shared palette: there are several CI images using the same palette.
+The build system (`build_from_png`) will find images sharing the same palette by looking at the `.tlut_` suffixes of png files in the same folder and in the corresponding `assets/` folder.
+
+In the matching case of shared palettes, all png files have the same palette, which is written out.
+Otherwise the images are automatically co-quantized and the resulting images and palette are written out.
+
+Note the N64 supports CI images with IA16 palettes instead of RGBA16 palettes, but OoT doesn't have such textures.
+For simplicity, CI images with IA16 palettes are not supported in the build system, and all CI images are assumed to use RGBA16 palettes.
+
+# Skybox textures
+
+Skybox textures, located in (`extracted/VERSION/`)`assets/textures/skyboxes`, are ci8 images with the additional specificity of being limited to a palette of 128 colors that can be loaded as either the first or last 128 colors of a 256-colors palette, depending on the skybox.
+
+The build system identifies such textures with the additional "sub-format" suffix `.split_lo` or `.split_hi` right after the `.ci8` suffix. `split_lo` corresponds to textures where the half palette is mapped to the lower half, and `split_hi` to the higher half.
+
+Like for regular ci images, images are automatically converted, quantized and written within those restrictions by the build system.
diff --git a/docs/audio/Samplebank_XML.md b/docs/audio/Samplebank_XML.md
new file mode 100644
index 0000000000..b9c027bcb7
--- /dev/null
+++ b/docs/audio/Samplebank_XML.md
@@ -0,0 +1,77 @@
+# Samplebank XML Format Specification
+
+Samplebank XMLs describe a samplebank file that contains compressed waveform data. It specifies which sample files to include as well as certain global properties such as the index of this samplebank.
+
+---
+
+```xml
+
+```
+Begins a new samplebank.
+
+**Attributes**
+
+- **Name**: The name of the samplebank.
+- **Index**: The index of the samplebank for the samplebank table. Must be a unique index for all samplebanks and pointers.
+- **Medium**: The storage medium, from the `SampleMedium` enum.
+- **CachePolicy**: The cache policy, from the `AudioCacheLoadType` enum.
+- [Optional] **BufferBug**: Whether this samplebank suffers from a buffer clearing bug present in the original audio tools. For matching only.
+
+**Tags**
+
+-
+ ```xml
+
+ ```
+ Create an alternate index that refers to this samplebank.
+
+ **Attributes**
+
+ - **Index**: The alternative index, must be unique among all samplebanks and pointers.
+
+ ---
+
+-
+ ```xml
+
+ ```
+ Adds a **compressed** sample file to the samplebank. The sample should be single-channel and big-endian, in a format that is recognizable by the audio driver such as: pcm16, vadpcm, or half-frame vadpcm.
+
+ **Attributes**
+
+ - **Name**: Name of this sample. Must be a valid C language identifier.
+ - **Path**: Path to aifc file relative to the project root (typically in `$(BUILD_DIR)/assets/audio/samples/`)
+
+ ---
+
+-
+ ```xml
+
+ ```
+ Adds a binary blob to the samplebank. Intended for matching only when data cannot be identified.
+
+ **Attributes**
+
+ - **Name**: Name of this blob. Must be a valid C language identifier.
+ - **Path**: Path to binary file, relative to the project root (typically in `$(BUILD_DIR)/assets/audio/samples/`)
+
+ ---
+
+```xml
+
+```
+---
diff --git a/docs/audio/Soundfont_XML.md b/docs/audio/Soundfont_XML.md
new file mode 100644
index 0000000000..c2d8a572ed
--- /dev/null
+++ b/docs/audio/Soundfont_XML.md
@@ -0,0 +1,319 @@
+# Soundfont XML Format Specification
+
+Soundfont XMLs describe the layout of a single soundfont. These package raw samples together into instruments, of which there are three kinds:
+- **Effects**: These are simple sound effects that just play a single sample without any modulation.
+- **Drums**: These define a MIDI-style percussion key map.
+- **Instruments**: These are instruments that may be played at any key with up to three voices and may be modulated by an envelope.
+
+In the specification, `Note Name`s can be either a MIDI note name e.g. `C4` or it may be a **Zelda64** note number, which are related to MIDI note numbers ($n$) by $(n - 21) \mod 128$.
+
+---
+
+```xml
+
+```
+Begins a new soundfont.
+
+**Attributes**
+- **Name**: Soundfont symbol name. Must be a valid C identifier.
+- **Index**: Soundfont index. Must be an integer.
+- **Medium**: Storage medium. Must be an enum name from `SampleMedium`.
+- **CachePolicy**: Cache policy. Must be an enum name from `AudioCacheLoadType`.
+- **SampleBank**: Path to samplebank xml used by this soundfont.
+- [Optional] **Indirect**: Pointer index if the samplebank is referenced indirectly.
+- [Optional] **SampleBankDD**: Path to samplebank xml used for DD medium.
+- [Optional] **IndirectDD**: Pointer index if the DD samplebank is referenced indirectly.
+- [Optional] **LoopsHaveFrames**: Whether loops in this soundfont store the total frame count of the sample. Must be a boolean.
+- [Optional] **PadToSize**: For matching only. Specifies the total file size the result output should be padded to.
+- [Optional] **NumInstruments**: For matching only. Specifies the total number of instrument pointers. Usually this is automatically assigned based on `max(program_number) + 1` but some vanilla banks don't match this way.
+
+**Tags**
+
+-
+ ```xml
+
+ ```
+ Lists envelopes defined in this soundfont.
+
+ **Attributes**
+
+ N/A
+
+ **Tags**
+
+ -
+ ```xml
+
+ ```
+ Starts a new envelope.
+
+ **Attributes**
+
+ - **Name**: Unique name for this envelope. Must be a valid C identifier.
+ - **Release**: Release rate index (into `gAudioCtx.adsrDecayTable`) for this envelope
+
+ **Tags**
+
+ -
+ ```xml
+
+ ```
+ Add a point to the envelope at (delay, arg)
+
+ **Attributes**
+
+ - **Delay**: Duration until the next point
+ - **Arg**: Value of the envelope at this point
+
+ ---
+
+ -
+ ```xml
+
+ ```
+ Insert a ADSR_DISABLE command
+
+ ---
+
+ -
+ ```xml
+
+ ```
+ Insert a ADSR_HANG command
+
+ ---
+
+ -
+ ```xml
+
+ ```
+ Insert a ADSR_GOTO command
+
+ **Attributes**
+
+ - **Index**: Index of the envelope point to jump to
+
+ ---
+
+ ```xml
+
+ ```
+ ---
+
+ ```xml
+
+ ```
+ ---
+
+-
+ ```xml
+
+ ```
+ Begins a list of samples used in this Soundfont.
+
+ **Attributes**
+
+ - [Optional] **IsDD**: Whether all the samples in the list are on the Disk Drive. The sample data will come from the samplebank `SampleBankDD`. **Default is `false`.** **NOTE this is not fully implemented, it should always be `false`.**
+ - [Optional] **Cached**: Whether all the samples in the list should be added to the `usedSamples` cache. **Default is `false`.**
+
+ **Tags**
+
+ -
+ ```xml
+
+ ```
+ Declares a sample used in this soundfont.
+
+ **Attributes**
+
+ - **Name**: The name of this sample. A sample with this name must be present in the samplebank used by the soundfont.
+ - [Optional] **SampleRate**: An overriding sample rate for this sample. **Default comes from the sample file.**
+ - [Optional] **BaseNote**: An overriding root key for this sample. **Default comes from the sample file.**
+ - [Optional] **IsDD**: Whether this sample is on the Disk Drive. The sample data will come from the samplebank `SampleBankDD`. **Default is `false`.** **NOTE this is not fully implemented, it should always be `false`.**
+ - [Optional] **Cached**: Whether this sample should be added to the `usedSamples` cache. **Default is `false`.**
+
+ ---
+
+ ```xml
+
+ ```
+ ---
+
+-
+ ```xml
+
+ ```
+ Begins a list of sound effects to define for this soundfont. Sound effects correspond to simple sounds that cannot be played at different keys.
+
+ **Attributes**
+
+ N/A
+
+ **Tags**
+
+ -
+ ```xml
+
+ ```
+ Defines a single sound effect.
+
+ **Attributes**
+ - **Name**: The name of the sound effect, the name is made available in sequence files in the form `SF{n}_{name}` where `n` is the index of this soundfont and `name` is this name. For example, if `n=0` and `name=ExampleEffect` the name to use in sequence files is `SF0_ExampleEffect`.
+ - **Sample**: The name of the sample associated with this effect.
+ - [Optional] **SampleRate**: An overriding sample rate for this effect. **Default comes from the sample definition.**
+ - [Optional] **BaseNote**: An overriding root key for this effect. **Default comes from the sample definition.**
+
+ ---
+
+ ```xml
+
+ ```
+ ---
+
+-
+ ```xml
+
+ ```
+ Begins the percussion definitions for this soundfont. Percussion corresponds to the MIDI notion of percussion, where single samples are mapped across a range of keys.
+
+ **Attributes**
+
+ N/A
+
+ **Tags**
+
+ -
+ ```xml
+
+ ```
+ Defines a single percussion range.
+
+ **Attributes**
+ - **Name**: The name of this sound. Definitions are emitted for sequence files in the form `SF{n}_{name}_{note}` for every note covered by this sound.
+ - [Optional] **Note**: The key to map this sound to. Should not overlap with other definitions. **If this field is left unspecified, `NoteStart` and `NoteEnd` become required.**
+ - [Optional] **NoteStart**: The first key that is mapped to this sound. Should not overlap with other definitions. **If this field is left unspecified, `Note` becomes required. If this field is specified, `NoteEnd` must also be specified.**
+ - [Optional] **NoteEnd**: The last key that is mapped to this sound. Should not overlap with other definitions. **If this field is left unspecified, `Note` becomes required. If this field is specified, `NoteStart` must also be specified.**
+ - **Pan**: The stereo weight for this sound. Center=`64`.
+ - **Envelope**: The envelope to modulate the volume over time with. Must be defined in the `Envelopes` list.
+ - [Optional] **Release**: An override for the envelope release rate. **Default is the release rate specified in the envelope definition**
+ - **Sample**: The name of the sample to use.
+ - [Optional] **SampleRate**: An overriding sample rate for this sound. **Default comes from the sample definition.**
+ - [Optional] **BaseNote**: An overriding root key for this sound. **Default comes from the sample definition.**
+
+ ---
+
+ ```xml
+
+ ```
+ ---
+
+-
+ ```xml
+
+ ```
+ Begins the instrument definitions for this soundfont. Instruments correspond to the MIDI notion of instruments, with up to 3 samples (voices) per instrument that must map to contiguous ranges of notes.
+
+ **Attributes**
+
+ N/A
+
+ **Tags**
+
+ -
+ ```xml
+
+ ```
+ Defines an instrument.
+
+ **Attributes**
+ - **ProgramNumber**: MIDI Program Number for this instrument. Must be in the range `0 <= n <= 125`
+ - **Name**: The name of this instrument.
+ - **Envelope**: Envelope to use, identified by name.
+ - [Optional] **Release**: Release rate index override. **Default release rate comes from the chosen envelope.**
+ - **Sample**: The name of the middle sample to use for this instrument.
+ - [Optional] **SampleRate**: Sample rate override for the middle sample. **Default is sourced from the sample properties.**
+ - [Optional] **BaseNote**: Base note override for the middle sample. **Default is sourced from the sample properties.**
+ - [Optional] **RangeLo**: The largest note for SampleLo. SampleLo will be used instead of Sample for keys in the range [0, RangeLo]. **If left unspecified, SampleLo must not be specified. If specified, SampleLo must be specified.**
+ - [Optional] **SampleLo**: The name of the low sample to use for this instrument.
+ - [Optional] **SampleRateLo**: Sample rate override for the low sample. **Default is sourced from the sample properties.**
+ - [Optional] **BaseNoteLo**: Base note override for the low sample. **Default is sourced from the sample properties.**
+ - [Optional] **RangeHi**: The smallest note for SampleHi. SampleHi will be used instead of Sample for keys in the range [RangeHi, 127]. **If left unspecified, SampleHi must not be specified. If specified, SampleHi must be specified.**
+ - [Optional] **SampleHi**: The name of the high sample to use for this instrument.
+ - [Optional] **SampleRateHi**: Sample rate override for the high sample. **Default is sourced from the sample properties.**
+ - [Optional] **BaseNoteHi**: Base note override for the high sample. **Default is sourced from the sample properties.**
+
+ ---
+
+ ```xml
+
+ ```
+ ---
+
+```xml
+
+```
+---
diff --git a/docs/audio/build_flowchart.png b/docs/audio/build_flowchart.png
new file mode 100644
index 0000000000..9ef26221ee
Binary files /dev/null and b/docs/audio/build_flowchart.png differ
diff --git a/docs/c_cpp_properties.json b/docs/c_cpp_properties.json
index b863d21c63..276e67bd1c 100644
--- a/docs/c_cpp_properties.json
+++ b/docs/c_cpp_properties.json
@@ -19,7 +19,8 @@
"OOT_REGION=REGION_JP",
"PLATFORM_N64=1",
"PLATFORM_GC=0",
- "OOT_DEBUG=0",
+ "PLATFORM_IQUE=0",
+ "DEBUG_FEATURES=0",
"NDEBUG",
"F3DEX_GBI_2"
],
@@ -44,7 +45,8 @@
"OOT_REGION=REGION_JP",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
- "OOT_DEBUG=0",
+ "PLATFORM_IQUE=0",
+ "DEBUG_FEATURES=0",
"NDEBUG",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
@@ -71,7 +73,8 @@
"OOT_REGION=REGION_JP",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
- "OOT_DEBUG=0",
+ "PLATFORM_IQUE=0",
+ "DEBUG_FEATURES=0",
"NDEBUG",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
@@ -98,7 +101,8 @@
"OOT_REGION=REGION_US",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
- "OOT_DEBUG=0",
+ "PLATFORM_IQUE=0",
+ "DEBUG_FEATURES=0",
"NDEBUG",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
@@ -125,7 +129,8 @@
"OOT_REGION=REGION_US",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
- "OOT_DEBUG=0",
+ "PLATFORM_IQUE=0",
+ "DEBUG_FEATURES=0",
"NDEBUG",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
@@ -152,7 +157,8 @@
"OOT_REGION=REGION_EU",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
- "OOT_DEBUG=1",
+ "PLATFORM_IQUE=0",
+ "DEBUG_FEATURES=1",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
"GBI_DOWHILE",
@@ -179,7 +185,8 @@
"OOT_REGION=REGION_EU",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
- "OOT_DEBUG=0",
+ "PLATFORM_IQUE=0",
+ "DEBUG_FEATURES=0",
"NDEBUG",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
@@ -206,7 +213,8 @@
"OOT_REGION=REGION_EU",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
- "OOT_DEBUG=0",
+ "PLATFORM_IQUE=0",
+ "DEBUG_FEATURES=0",
"NDEBUG",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
@@ -233,7 +241,8 @@
"OOT_REGION=REGION_JP",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
- "OOT_DEBUG=0",
+ "PLATFORM_IQUE=0",
+ "DEBUG_FEATURES=0",
"NDEBUG",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
@@ -241,6 +250,35 @@
],
"cStandard": "gnu89"
},
+ {
+ "name": "oot-ique-cn",
+ "compilerArgs": [
+ "-m32"
+ ],
+ "includePath": [
+ "include",
+ "include/libc",
+ "src",
+ "build/ique-cn",
+ ".",
+ "extracted/ique-cn"
+ ],
+ "defines": [
+ "_LANGUAGE_C",
+ "OOT_VERSION=IQUE_CN",
+ "OOT_REGION=REGION_US",
+ "PLATFORM_N64=0",
+ "PLATFORM_GC=0",
+ "PLATFORM_IQUE=1",
+ "BBPLAYER",
+ "DEBUG_FEATURES=0",
+ "NDEBUG",
+ "F3DEX_GBI_2",
+ "F3DEX_GBI_PL",
+ "GBI_DOWHILE"
+ ],
+ "cStandard": "gnu89"
+ }
],
"version": 4
}
diff --git a/docs/compilers.md b/docs/compilers.md
new file mode 100644
index 0000000000..120aaf43c6
--- /dev/null
+++ b/docs/compilers.md
@@ -0,0 +1,63 @@
+# Compilers
+
+Ocarina of Time was written mostly in C, compiled to MIPS machine code. For the
+N64 and GameCube versions, all code was compiled with the IDO compiler. For the
+iQue Player versions, some of the code (namely libultra, and some game files
+such as those related to Chinese text) was compiled with the EGCS compiler instead.
+
+## IDO
+
+Ocarina of Time was originally developed on
+[Silicon Graphics "Indy"](https://en.wikipedia.org/wiki/SGI_Indy) workstations,
+and IDO (IRIS Development Option) was the C compiler toolchain that shipped with
+these. Two different versions of IDO were used for Ocarina of Time: IDO 5.3 was
+used for some libraries (namely libultra, libleo, and the JPEG library) while
+IDO 7.1 was used for the other libraries and all of the "main" game code.
+
+These Silicon Graphics workstations ran the MIPS-based IRIX operating system, so
+the original compiler binaries can't run on modern systems. Originally this
+project used [qemu-irix](https://github.com/n64decomp/qemu-irix) (now
+unmaintained) to run emulate IRIX on modern systems, but nowadays we use the
+more lightweight
+[ido-static-recomp](https://github.com/decompals/ido-static-recomp) instead.
+
+## EGCS
+
+[EGCS (Experimental/Enhanced GNU Compiler System)](https://en.wikipedia.org/wiki/GNU_Compiler_Collection#EGCS_fork)
+was a fork of the GCC compiler. The Linux-based iQue SDK included a patched
+version of EGCS release 1.1.2. The original compiler can still run on modern Linux
+systems, but we use a
+[modified version](https://github.com/decompals/mips-gcc-egcs-2.91.66)
+that includes Mac support and a few other minor improvements (such as anonymous
+struct/union support).
+
+This version of the EGCS compiler has a bug where code that indexes into an array member can
+fail to compile if the array member is at a large (>= 0x8000) offset in a struct. For
+example, when run on the source code
+
+```c
+struct Foo {
+ char a[0x8000];
+ int b[1];
+};
+
+int test(struct Foo* foo, int i) {
+ return foo->b[i];
+}
+```
+
+the compiler errors with
+
+```
+Compiler error: src.c: In function `test':
+src.c:8: internal error--unrecognizable insn:
+(insn 20 18 22 (set (reg:SI 85)
+ (plus:SI (reg:SI 81)
+ (const_int 32768))) -1 (nil)
+ (nil))
+../../gcc/toplev.c:1367: Internal compiler error in function fatal_insn
+```
+
+In some recompiled files, the game developers had to modify the code to work
+around this bug, for example by storing a pointer to the array in a temporary
+variable before indexing into it.
diff --git a/docs/libu64.md b/docs/libu64.md
new file mode 100644
index 0000000000..67c1223231
--- /dev/null
+++ b/docs/libu64.md
@@ -0,0 +1,77 @@
+# libu64
+
+This document explains the reasoning behind organizing the libu64 files.
+
+libu64 is known about from the Animal Crossing (GameCube) map files.
+
+Here is the relevant excerpt from the Doubutsu no Mori+ 1.0 map file (for .text):
+
+```
+ 00057f00 00043c 8005d4c0 1 .text libu64.a debug.c
+ UNUSED 000070 ........ f_debug_range_f libu64.a debug.c
+ UNUSED 00007c ........ _dbg_range libu64.a debug.c
+ UNUSED 000158 ........ _dbg_dump libu64.a debug.c
+ UNUSED 000048 ........ _dbg_array_error libu64.a debug.c
+ UNUSED 000054 ........ _dbg_bound libu64.a debug.c
+ UNUSED 000044 ........ _dbg_null libu64.a debug.c
+ UNUSED 000060 ........ _dbg_ptr libu64.a debug.c
+ UNUSED 000058 ........ _dbg_here libu64.a debug.c
+ 00057f00 00005c 8005d4c0 4 _dbg_hungup libu64.a debug.c
+ UNUSED 000004 ........ Reset libu64.a debug.c
+ 00057f5c 000b70 8005d51c 1 .text libu64.a gfxprint.c
+ 00057f5c 0002e8 8005d51c 4 gfxprint_setup libu64.a gfxprint.c
+ 00058244 00004c 8005d804 4 gfxprint_color libu64.a gfxprint.c
+ UNUSED 000024 ........ gfxprint_locate libu64.a gfxprint.c
+ 00058290 000024 8005d850 4 gfxprint_locate8x8 libu64.a gfxprint.c
+ UNUSED 000014 ........ gfxprint_setoffset libu64.a gfxprint.c
+ 000582b4 000378 8005d874 4 gfxprint_putc1 libu64.a gfxprint.c
+ 0005862c 000198 8005dbec 4 gfxprint_putc libu64.a gfxprint.c
+ UNUSED 000060 ........ gfxprint_write libu64.a gfxprint.c
+ UNUSED 000054 ........ gfxprint_puts libu64.a gfxprint.c
+ 000587c4 000064 8005dd84 4 gfxprint_prout libu64.a gfxprint.c
+ 00058828 000090 8005dde8 4 gfxprint_init libu64.a gfxprint.c
+ 000588b8 000004 8005de78 4 gfxprint_cleanup libu64.a gfxprint.c
+ 000588bc 00004c 8005de7c 4 gfxprint_open libu64.a gfxprint.c
+ 00058908 000038 8005dec8 4 gfxprint_close libu64.a gfxprint.c
+ UNUSED 000020 ........ gfxprint_vprintf libu64.a gfxprint.c
+ 00058940 000080 8005df00 4 gfxprint_printf libu64.a gfxprint.c
+ 000589c0 000000 8005df80 1 .text libu64.a gfxprint_data.c
+ 000589c0 000164 8005df80 1 .text libu64.a pad.c
+ UNUSED 000024 ........ pad_init libu64.a pad.c
+ UNUSED 000004 ........ pad_cleanup libu64.a pad.c
+ UNUSED 000010 ........ pad_flush libu64.a pad.c
+ UNUSED 000018 ........ pad_push_only libu64.a pad.c
+ UNUSED 00001c ........ pad_push_also libu64.a pad.c
+ UNUSED 00001c ........ pad_on_trigger libu64.a pad.c
+ UNUSED 00001c ........ pad_off_trigger libu64.a pad.c
+ UNUSED 000008 ........ pad_button libu64.a pad.c
+ UNUSED 000008 ........ pad_trigger libu64.a pad.c
+ UNUSED 00000c ........ pad_physical_stick_x libu64.a pad.c
+ UNUSED 00000c ........ pad_physical_stick_y libu64.a pad.c
+ UNUSED 000014 ........ pad_set_logical_stick libu64.a pad.c
+ UNUSED 00000c ........ pad_logical_stick_x libu64.a pad.c
+ UNUSED 00000c ........ pad_logical_stick_y libu64.a pad.c
+ UNUSED 00000c ........ pad_stick_x libu64.a pad.c
+ UNUSED 00000c ........ pad_stick_y libu64.a pad.c
+ 000589c0 000054 8005df80 4 pad_correct_stick libu64.a pad.c
+```
+
+This repository's `debug.c` (formerly `logutils.c`), `gfxprint.c` and `pad.c` (formerly `padutils.c`) line up with the map.
+
+Note `debug.c` has additional debug-only functions in gc-eu-mq-dbg, hinting that there were two versions of libu64, a debug version and a non-debug version.
+
+Additionally `debug.c`, `gfxprint.c` and `pad.c` all require compilation flags `-O2` (instead of `-O2 -g3`) to match, as supplementary evidence these were part of a separately compiled library.
+
+`-O2` is also required for most files between `gfxprint.c` and `pad.c` in the code segment (see spec), hinting that these other files (`loadfragment2_n64.c`, `loadfragment2_gc.c`, `mtxuty-cvt.c`, `relocation_gc.c`, `load_gc.c`, `system_heap.c`) are also part of libu64.
+
+Files `rcp_utils.c` and `logseverity_gc.c` do not strictly require `-O2`, but they do match with `-O2`.
+
+`padsetup.c` also requires `-O2`.
+
+On the other hand, the function `Overlay_Load` (in `loadfragment2_n64.c` or `load_gc.c` depending on game version) calls `DmaMgr_RequestSync`, a function that is not part of libu64.
+This could suggest these files are not part of libu64, but the other evidence detailed above seems stronger.
+It is also a possibility that libu64 expected users to provide the function, and it would have been an undefined symbol in the library.
+
+All in all this suggests all files in code between the audio code and libc64, are part of libu64.
+
+In the OoT boot segment, `stackcheck.c` is right next to `debug.c` and requires `-O2`: this hints `stackcheck.c` could be part of libu64 too. This is confirmed by looking at Majora's Mask n64-us, where `stackcheck.c` is in the middle of other libu64 files in the boot segment (see MM spec).
diff --git a/docs/vscode.md b/docs/vscode.md
index 6450e0020e..4262d0beae 100644
--- a/docs/vscode.md
+++ b/docs/vscode.md
@@ -64,7 +64,7 @@ A more complete `c_cpp_properties.json` with configurations for all supported ve
"OOT_REGION=REGION_EU",
"PLATFORM_N64=0",
"PLATFORM_GC=1",
- "OOT_DEBUG=1",
+ "DEBUG_FEATURES=1",
"F3DEX_GBI_2",
"F3DEX_GBI_PL",
"GBI_DOWHILE",
diff --git a/extract_assets.py b/extract_assets.py
deleted file mode 100755
index 2188cfcc0b..0000000000
--- a/extract_assets.py
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/usr/bin/env python3
-
-import argparse
-import json
-import os
-import signal
-import time
-import multiprocessing
-from pathlib import Path
-
-from tools import version_config
-
-
-def SignalHandler(sig, frame):
- print(f'Signal {sig} received. Aborting...')
- mainAbort.set()
- # Don't exit immediately to update the extracted assets file.
-
-def ExtractFile(assetConfig: version_config.AssetConfig, outputPath: Path, outputSourcePath: Path):
- name = assetConfig.name
- xmlPath = assetConfig.xml_path
- version = globalVersionConfig.version
- if globalAbort.is_set():
- # Don't extract if another file wasn't extracted properly.
- return
-
- zapdPath = Path("tools") / "ZAPD" / "ZAPD.out"
- configPath = Path("tools") / "ZAPDConfigs" / version / "Config.xml"
-
- outputPath.mkdir(parents=True, exist_ok=True)
- outputSourcePath.mkdir(parents=True, exist_ok=True)
-
- execStr = f"{zapdPath} e -eh -i {xmlPath} -b {globalBaseromSegmentsDir} -o {outputPath} -osf {outputSourcePath} -gsf 1 -rconf {configPath} --cs-float both {ZAPDArgs}"
-
- if name.startswith("code/") or name.startswith("n64dd/") or name.startswith("overlays/"):
- assert assetConfig.start_offset is not None
- assert assetConfig.end_offset is not None
-
- execStr += f" --start-offset 0x{assetConfig.start_offset:X}"
- execStr += f" --end-offset 0x{assetConfig.end_offset:X}"
-
- if name.startswith("overlays/"):
- overlayName = name.split("/")[1]
- baseAddress = globalVersionConfig.dmadata_segments[overlayName].vram + assetConfig.start_offset
-
- execStr += f" --base-address 0x{baseAddress:X}"
- execStr += " --static"
-
- if globalUnaccounted:
- execStr += " -Wunaccounted"
-
- print(execStr)
- exitValue = os.system(execStr)
- if exitValue != 0:
- globalAbort.set()
- print("\n")
- print(f"Error when extracting from file {xmlPath}", file=os.sys.stderr)
- print("Aborting...", file=os.sys.stderr)
- print("\n")
-
-def ExtractFunc(assetConfig: version_config.AssetConfig):
- objectName = assetConfig.name
- xml_path = assetConfig.xml_path
- xml_path_str = str(xml_path)
-
- outPath = globalOutputDir / objectName
- outSourcePath = outPath
-
- if xml_path_str in globalExtractedAssetsTracker:
- timestamp = globalExtractedAssetsTracker[xml_path_str]["timestamp"]
- modificationTime = int(os.path.getmtime(xml_path))
- if modificationTime < timestamp:
- # XML has not been modified since last extraction.
- return
-
- currentTimeStamp = int(time.time())
-
- ExtractFile(assetConfig, outPath, outSourcePath)
-
- if not globalAbort.is_set():
- # Only update timestamp on succesful extractions
- if xml_path_str not in globalExtractedAssetsTracker:
- globalExtractedAssetsTracker[xml_path_str] = globalManager.dict()
- globalExtractedAssetsTracker[xml_path_str]["timestamp"] = currentTimeStamp
-
-def initializeWorker(versionConfig: version_config.VersionConfig, abort, unaccounted: bool, extractedAssetsTracker: dict, manager, baseromSegmentsDir: Path, outputDir: Path):
- global globalVersionConfig
- global globalAbort
- global globalUnaccounted
- global globalExtractedAssetsTracker
- global globalManager
- global globalBaseromSegmentsDir
- global globalOutputDir
- globalVersionConfig = versionConfig
- globalAbort = abort
- globalUnaccounted = unaccounted
- globalExtractedAssetsTracker = extractedAssetsTracker
- globalManager = manager
- globalBaseromSegmentsDir = baseromSegmentsDir
- globalOutputDir = outputDir
-
-def processZAPDArgs(argsZ):
- badZAPDArg = False
- for z in argsZ:
- if z[0] == '-':
- print(f'error: argument "{z}" starts with "-", which is not supported.', file=os.sys.stderr)
- badZAPDArg = True
-
- if badZAPDArg:
- exit(1)
-
- ZAPDArgs = " ".join(f"-{z}" for z in argsZ)
- print("Using extra ZAPD arguments: " + ZAPDArgs)
- return ZAPDArgs
-
-def main():
- parser = argparse.ArgumentParser(description="baserom asset extractor")
- parser.add_argument(
- "baserom_segments_dir",
- type=Path,
- help="Directory of uncompressed ROM segments",
- )
- parser.add_argument(
- "output_dir",
- type=Path,
- help="Output directory to place files in",
- )
- parser.add_argument("-v", "--version", dest="oot_version", help="OOT game version", default="gc-eu-mq-dbg")
- parser.add_argument("-s", "--single", help="Extract a single asset by name, e.g. objects/gameplay_keep")
- parser.add_argument("-f", "--force", help="Force the extraction of every xml instead of checking the touched ones (overwriting current files).", action="store_true")
- parser.add_argument("-j", "--jobs", help="Number of cpu cores to extract with.")
- parser.add_argument("-u", "--unaccounted", help="Enables ZAPD unaccounted detector warning system.", action="store_true")
- parser.add_argument("-Z", help="Pass the argument on to ZAPD, e.g. `-ZWunaccounted` to warn about unaccounted blocks in XMLs. Each argument should be passed separately, *without* the leading dash.", metavar="ZAPD_ARG", action="append")
- args = parser.parse_args()
-
- baseromSegmentsDir: Path = args.baserom_segments_dir
- version: str = args.oot_version
- outputDir: Path = args.output_dir
-
- args.output_dir.mkdir(parents=True, exist_ok=True)
-
- versionConfig = version_config.load_version_config(version)
-
- global ZAPDArgs
- ZAPDArgs = processZAPDArgs(args.Z) if args.Z else ""
-
- global mainAbort
- mainAbort = multiprocessing.Event()
- manager = multiprocessing.Manager()
- signal.signal(signal.SIGINT, SignalHandler)
-
- extraction_times_p = outputDir / "assets_extraction_times.json"
- extractedAssetsTracker = manager.dict()
- if extraction_times_p.exists() and not args.force:
- with extraction_times_p.open(encoding='utf-8') as f:
- extractedAssetsTracker.update(json.load(f, object_hook=manager.dict))
-
- singleAssetName = args.single
- if singleAssetName is not None:
- assetConfig = None
- for asset in versionConfig.assets:
- if asset.name == singleAssetName:
- assetConfig = asset
- break
- else:
- print(f"Error. Asset {singleAssetName} not found in config.", file=os.sys.stderr)
- exit(1)
-
- initializeWorker(versionConfig, mainAbort, args.unaccounted, extractedAssetsTracker, manager, baseromSegmentsDir, outputDir)
- # Always extract if -s is used.
- xml_path_str = str(assetConfig.xml_path)
- if xml_path_str in extractedAssetsTracker:
- del extractedAssetsTracker[xml_path_str]
- ExtractFunc(assetConfig)
- else:
- class CannotMultiprocessError(Exception):
- pass
-
- try:
- numCores = int(args.jobs or 0)
- if numCores <= 0:
- numCores = 1
- print("Extracting assets with " + str(numCores) + " CPU core" + ("s" if numCores > 1 else "") + ".")
- try:
- mp_context = multiprocessing.get_context("fork")
- except ValueError as e:
- raise CannotMultiprocessError() from e
- with mp_context.Pool(numCores, initializer=initializeWorker, initargs=(versionConfig, mainAbort, args.unaccounted, extractedAssetsTracker, manager, baseromSegmentsDir, outputDir)) as p:
- p.map(ExtractFunc, versionConfig.assets)
- except (multiprocessing.ProcessError, TypeError, CannotMultiprocessError):
- print("Warning: Multiprocessing exception ocurred.", file=os.sys.stderr)
- print("Disabling mutliprocessing.", file=os.sys.stderr)
-
- initializeWorker(versionConfig, mainAbort, args.unaccounted, extractedAssetsTracker, manager, baseromSegmentsDir, outputDir)
- for assetConfig in versionConfig.assets:
- ExtractFunc(assetConfig)
-
- with extraction_times_p.open('w', encoding='utf-8') as f:
- serializableDict = dict()
- for xml, data in extractedAssetsTracker.items():
- serializableDict[xml] = dict(data)
- json.dump(dict(serializableDict), f, ensure_ascii=False, indent=4)
-
- if mainAbort.is_set():
- exit(1)
-
-if __name__ == "__main__":
- main()
diff --git a/format.py b/format.py
index 775d188c18..b0043075d5 100755
--- a/format.py
+++ b/format.py
@@ -31,7 +31,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."
-DEFINES = "-D_LANGUAGE_C -DNON_MATCHING -DF3DEX_GBI_2"
+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}"
@@ -97,8 +97,7 @@ def run_clang_apply_replacements(tmp_dir: str):
def cleanup_whitespace(file: str):
"""
- Remove whitespace at the end of lines,
- ensure the file ends with an empty line.
+ Remove whitespace at the end of lines, and ensure all lines end with a newline.
"""
file_p = Path(file)
contents = file_p.read_text(encoding="UTF-8")
@@ -108,7 +107,7 @@ def cleanup_whitespace(file: str):
if n_subst != 0:
modified = True
- if not contents.endswith("\n"):
+ if contents and not contents.endswith("\n"):
contents += "\n"
modified = True
@@ -155,12 +154,22 @@ def format_files(src_files: List[str], extra_files: List[str], nb_jobs: int):
def list_files_to_format():
- files = glob.glob("src/**/*.c", recursive=True)
+ files = (
+ glob.glob("src/**/*.c", recursive=True)
+ + glob.glob("assets/**/*.c", recursive=True)
+ )
extra_files = (
glob.glob("assets/**/*.xml", recursive=True)
+ glob.glob("include/**/*.h", recursive=True)
+ glob.glob("src/**/*.h", recursive=True)
+ + glob.glob("assets/**/*.h", recursive=True)
)
+
+ # Do not format assets/text/ files
+ for assets_text_f in glob.glob("assets/text/**/*.c", recursive=True):
+ if assets_text_f in files:
+ files.remove(assets_text_f)
+
return files, extra_files
diff --git a/include/array_count.h b/include/array_count.h
new file mode 100644
index 0000000000..9e5f6ed4ca
--- /dev/null
+++ b/include/array_count.h
@@ -0,0 +1,8 @@
+#ifndef ARRAY_COUNT_H
+#define ARRAY_COUNT_H
+
+#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
+#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
+#define ARRAY_COUNT_2D(arr) (s32)(sizeof(arr) / sizeof(arr[0][0]))
+
+#endif
diff --git a/include/attributes.h b/include/attributes.h
index 0bee9c40ca..acfaf3edc0 100644
--- a/include/attributes.h
+++ b/include/attributes.h
@@ -6,9 +6,32 @@
#endif
#define UNUSED __attribute__((unused))
-#define FALLTHROUGH __attribute__((fallthrough))
-#define NORETURN __attribute__((noreturn))
#define NO_REORDER __attribute__((no_reorder))
#define SECTION_DATA __attribute__((section(".data")))
+#if __GNUC__ >= 7
+#define FALLTHROUGH __attribute__((fallthrough))
+#else
+#define FALLTHROUGH
+#endif
+
+#if defined(__GNUC__) && defined(NON_MATCHING)
+#define NORETURN __attribute__((noreturn))
+#else
+#define NORETURN
+#endif
+
+#if defined(__GNUC__) && defined(NON_MATCHING)
+#define UNREACHABLE() __builtin_unreachable()
+#else
+#define UNREACHABLE()
+#endif
+
+// Variables may be unused in retail versions but used in debug versions
+#if DEBUG_FEATURES
+#define UNUSED_NDEBUG
+#else
+#define UNUSED_NDEBUG UNUSED
+#endif
+
#endif
diff --git a/include/audio/aseq.h b/include/audio/aseq.h
index 1c66a3a2c3..99df3248f7 100644
--- a/include/audio/aseq.h
+++ b/include/audio/aseq.h
@@ -52,6 +52,19 @@
#ifndef ASEQ_H
#define ASEQ_H
+/**
+ * MML Version
+ */
+
+#ifndef MML_VERSION
+ #error "MML version not defined, define MML_VERSION in the cpp invocation"
+#endif
+
+#define MML_VERSION_OOT 0
+#define MML_VERSION_MM 1
+
+
+
/**
* IO Ports
*/
@@ -218,21 +231,190 @@
#define FONTANY_INSTR_ASM_NOISE 136
-
-#ifdef _LANGUAGE_ASEQ
-
/**
- * MML Version
+ * Command Opcode IDs
*/
-#ifndef MML_VERSION
- #error "MML version not defined, define MML_VERSION in the cpp invocation"
+// control flow commands
+#define ASEQ_OP_CONTROL_FLOW_FIRST 0xF2
+#define ASEQ_OP_RBLTZ 0xF2
+#define ASEQ_OP_RBEQZ 0xF3
+#define ASEQ_OP_RJUMP 0xF4
+#define ASEQ_OP_BGEZ 0xF5
+#define ASEQ_OP_BREAK 0xF6
+#define ASEQ_OP_LOOPEND 0xF7
+#define ASEQ_OP_LOOP 0xF8
+#define ASEQ_OP_BLTZ 0xF9
+#define ASEQ_OP_BEQZ 0xFA
+#define ASEQ_OP_JUMP 0xFB
+#define ASEQ_OP_CALL 0xFC
+#define ASEQ_OP_DELAY 0xFD
+#define ASEQ_OP_DELAY1 0xFE
+#define ASEQ_OP_END 0xFF
+
+// sequence commands
+#define ASEQ_OP_SEQ_TESTCHAN 0x00 // low nibble used as argument
+#define ASEQ_OP_SEQ_STOPCHAN 0x40 // low nibble used as argument
+#define ASEQ_OP_SEQ_SUBIO 0x50 // low nibble used as argument
+#define ASEQ_OP_SEQ_LDRES 0x60 // low nibble used as argument
+#define ASEQ_OP_SEQ_STIO 0x70 // low nibble used as argument
+#define ASEQ_OP_SEQ_LDIO 0x80 // low nibble used as argument
+#define ASEQ_OP_SEQ_LDCHAN 0x90 // low nibble used as argument
+#define ASEQ_OP_SEQ_RLDCHAN 0xA0 // low nibble used as argument
+#define ASEQ_OP_SEQ_LDSEQ 0xB0 // low nibble used as argument
+#if (MML_VERSION == MML_VERSION_MM)
+#define ASEQ_OP_SEQ_C2 0xC2
+#define ASEQ_OP_SEQ_C3 0xC3
+#endif
+#define ASEQ_OP_SEQ_RUNSEQ 0xC4
+#define ASEQ_OP_SEQ_SCRIPTCTR 0xC5
+#define ASEQ_OP_SEQ_STOP 0xC6
+#define ASEQ_OP_SEQ_STSEQ 0xC7
+#define ASEQ_OP_SEQ_SUB 0xC8
+#define ASEQ_OP_SEQ_AND 0xC9
+#define ASEQ_OP_SEQ_LDI 0xCC
+#define ASEQ_OP_SEQ_DYNCALL 0xCD
+#define ASEQ_OP_SEQ_RAND 0xCE
+#define ASEQ_OP_SEQ_NOTEALLOC 0xD0
+#define ASEQ_OP_SEQ_LDSHORTGATEARR 0xD1
+#define ASEQ_OP_SEQ_LDSHORTVELARR 0xD2
+#define ASEQ_OP_SEQ_MUTEBHV 0xD3
+#define ASEQ_OP_SEQ_MUTE 0xD4
+#define ASEQ_OP_SEQ_MUTESCALE 0xD5
+#define ASEQ_OP_SEQ_FREECHAN 0xD6
+#define ASEQ_OP_SEQ_INITCHAN 0xD7
+#define ASEQ_OP_SEQ_VOLSCALE 0xD9
+#define ASEQ_OP_SEQ_VOLMODE 0xDA
+#define ASEQ_OP_SEQ_VOL 0xDB
+#define ASEQ_OP_SEQ_TEMPOCHG 0xDC
+#define ASEQ_OP_SEQ_TEMPO 0xDD
+#define ASEQ_OP_SEQ_RTRANSPOSE 0xDE
+#define ASEQ_OP_SEQ_TRANSPOSE 0xDF
+#define ASEQ_OP_SEQ_EF 0xEF
+#define ASEQ_OP_SEQ_FREENOTELIST 0xF0
+#define ASEQ_OP_SEQ_ALLOCNOTELIST 0xF1
+
+// channel commands
+#define ASEQ_OP_CHAN_CDELAY 0x00 // low nibble used as argument
+#define ASEQ_OP_CHAN_LDSAMPLE 0x10 // low nibble used as argument
+#define ASEQ_OP_CHAN_LDCHAN 0x20 // low nibble used as argument
+#define ASEQ_OP_CHAN_STCIO 0x30 // low nibble used as argument
+#define ASEQ_OP_CHAN_LDCIO 0x40 // low nibble used as argument
+#define ASEQ_OP_CHAN_SUBIO 0x50 // low nibble used as argument
+#define ASEQ_OP_CHAN_LDIO 0x60 // low nibble used as argument
+#define ASEQ_OP_CHAN_STIO 0x70 // lower 3 bits used as argument
+#define ASEQ_OP_CHAN_RLDLAYER 0x78 // lower 3 bits used as argument
+#define ASEQ_OP_CHAN_TESTLAYER 0x80 // lower 3 bits used as argument
+#define ASEQ_OP_CHAN_LDLAYER 0x88 // lower 3 bits used as argument
+#define ASEQ_OP_CHAN_DELLAYER 0x90 // lower 3 bits used as argument
+#define ASEQ_OP_CHAN_DYNLDLAYER 0x98 // lower 3 bits used as argument
+#if (MML_VERSION == MML_VERSION_MM)
+#define ASEQ_OP_CHAN_A0 0xA0
+#define ASEQ_OP_CHAN_A1 0xA1
+#define ASEQ_OP_CHAN_A2 0xA2
+#define ASEQ_OP_CHAN_A3 0xA3
+#define ASEQ_OP_CHAN_A4 0xA4
+#define ASEQ_OP_CHAN_A5 0xA5
+#define ASEQ_OP_CHAN_A6 0xA6
+#define ASEQ_OP_CHAN_A7 0xA7
+#define ASEQ_OP_CHAN_RANDPTR 0xA8
+#endif
+#define ASEQ_OP_CHAN_LDFILTER 0xB0
+#define ASEQ_OP_CHAN_FREEFILTER 0xB1
+#define ASEQ_OP_CHAN_LDSEQTOPTR 0xB2
+#define ASEQ_OP_CHAN_FILTER 0xB3
+#define ASEQ_OP_CHAN_PTRTODYNTBL 0xB4
+#define ASEQ_OP_CHAN_DYNTBLTOPTR 0xB5
+#define ASEQ_OP_CHAN_DYNTBLV 0xB6
+#define ASEQ_OP_CHAN_RANDTOPTR 0xB7
+#define ASEQ_OP_CHAN_RAND 0xB8
+#define ASEQ_OP_CHAN_RANDVEL 0xB9
+#define ASEQ_OP_CHAN_RANDGATE 0xBA
+#define ASEQ_OP_CHAN_COMBFILTER 0xBB
+#define ASEQ_OP_CHAN_PTRADD 0xBC
+#if (MML_VERSION == MML_VERSION_OOT)
+#define ASEQ_OP_CHAN_RANDPTR 0xBD
+#endif
+#if (MML_VERSION == MML_VERSION_MM)
+#define ASEQ_OP_CHAN_SAMPLESTART 0xBD
+#define ASEQ_OP_CHAN_UNK_BE 0xBE
+#endif
+#define ASEQ_OP_CHAN_INSTR 0xC1
+#define ASEQ_OP_CHAN_DYNTBL 0xC2
+#define ASEQ_OP_CHAN_SHORT 0xC3
+#define ASEQ_OP_CHAN_NOSHORT 0xC4
+#define ASEQ_OP_CHAN_DYNTBLLOOKUP 0xC5
+#define ASEQ_OP_CHAN_FONT 0xC6
+#define ASEQ_OP_CHAN_STSEQ 0xC7
+#define ASEQ_OP_CHAN_SUB 0xC8
+#define ASEQ_OP_CHAN_AND 0xC9
+#define ASEQ_OP_CHAN_MUTEBHV 0xCA
+#define ASEQ_OP_CHAN_LDSEQ 0xCB
+#define ASEQ_OP_CHAN_LDI 0xCC
+#define ASEQ_OP_CHAN_STOPCHAN 0xCD
+#define ASEQ_OP_CHAN_LDPTR 0xCE
+#define ASEQ_OP_CHAN_STPTRTOSEQ 0xCF
+#define ASEQ_OP_CHAN_EFFECTS 0xD0
+#define ASEQ_OP_CHAN_NOTEALLOC 0xD1
+#define ASEQ_OP_CHAN_SUSTAIN 0xD2
+#define ASEQ_OP_CHAN_BEND 0xD3
+#define ASEQ_OP_CHAN_REVERB 0xD4
+#define ASEQ_OP_CHAN_VIBFREQ 0xD7
+#define ASEQ_OP_CHAN_VIBDEPTH 0xD8
+#define ASEQ_OP_CHAN_RELEASERATE 0xD9
+#define ASEQ_OP_CHAN_ENV 0xDA
+#define ASEQ_OP_CHAN_TRANSPOSE 0xDB
+#define ASEQ_OP_CHAN_PANWEIGHT 0xDC
+#define ASEQ_OP_CHAN_PAN 0xDD
+#define ASEQ_OP_CHAN_FREQSCALE 0xDE
+#define ASEQ_OP_CHAN_VOL 0xDF
+#define ASEQ_OP_CHAN_VOLEXP 0xE0
+#define ASEQ_OP_CHAN_VIBFREQGRAD 0xE1
+#define ASEQ_OP_CHAN_VIBDEPTHGRAD 0xE2
+#define ASEQ_OP_CHAN_VIBDELAY 0xE3
+#define ASEQ_OP_CHAN_DYNCALL 0xE4
+#define ASEQ_OP_CHAN_REVERBIDX 0xE5
+#define ASEQ_OP_CHAN_SAMPLEBOOK 0xE6
+#define ASEQ_OP_CHAN_LDPARAMS 0xE7
+#define ASEQ_OP_CHAN_PARAMS 0xE8
+#define ASEQ_OP_CHAN_NOTEPRI 0xE9
+#define ASEQ_OP_CHAN_STOP 0xEA
+#define ASEQ_OP_CHAN_FONTINSTR 0xEB
+#define ASEQ_OP_CHAN_VIBRESET 0xEC
+#define ASEQ_OP_CHAN_GAIN 0xED
+#define ASEQ_OP_CHAN_BENDFINE 0xEE
+#define ASEQ_OP_CHAN_FREENOTELIST 0xF0
+#define ASEQ_OP_CHAN_ALLOCNOTELIST 0xF1
+
+// layer commands
+#define ASEQ_OP_LAYER_NOTEDVG 0x00
+#define ASEQ_OP_LAYER_NOTEDV 0x40
+#define ASEQ_OP_LAYER_NOTEVG 0x80
+#define ASEQ_OP_LAYER_LDELAY 0xC0
+#define ASEQ_OP_LAYER_SHORTVEL 0xC1
+#define ASEQ_OP_LAYER_TRANSPOSE 0xC2
+#define ASEQ_OP_LAYER_SHORTDELAY 0xC3
+#define ASEQ_OP_LAYER_LEGATO 0xC4
+#define ASEQ_OP_LAYER_NOLEGATO 0xC5
+#define ASEQ_OP_LAYER_INSTR 0xC6
+#define ASEQ_OP_LAYER_PORTAMENTO 0xC7
+#define ASEQ_OP_LAYER_NOPORTAMENTO 0xC8
+#define ASEQ_OP_LAYER_SHORTGATE 0xC9
+#define ASEQ_OP_LAYER_NOTEPAN 0xCA
+#define ASEQ_OP_LAYER_ENV 0xCB
+#define ASEQ_OP_LAYER_NODRUMPAN 0xCC
+#define ASEQ_OP_LAYER_STEREO 0xCD
+#define ASEQ_OP_LAYER_BENDFINE 0xCE
+#define ASEQ_OP_LAYER_RELEASERATE 0xCF
+#define ASEQ_OP_LAYER_LDSHORTVEL 0xD0 // low nibble used as an argument
+#define ASEQ_OP_LAYER_LDSHORTGATE 0xE0 // low nibble used as an argument
+#if (MML_VERSION == MML_VERSION_MM)
+#define ASEQ_OP_LAYER_F0 0xF0
+#define ASEQ_OP_LAYER_F1 0xF1
#endif
-#define MML_VERSION_OOT 0
-#define MML_VERSION_MM 1
-
+#ifdef _LANGUAGE_ASEQ
/**
* IDENT
@@ -389,7 +571,7 @@ _RESET_SECTION
/* `ldseq` changes structure based on current section. */
.purgem ldseq
.macro ldseq ioPortNum, seqId, label
- _wr_cmd_id ldseq, 0xB0,,,,,,,, \ioPortNum, 4
+ _wr_cmd_id ldseq, ASEQ_OP_SEQ_LDSEQ,,,,,,,, \ioPortNum, 4
_wr_u8 \seqId
_wr_lbl \label
.endm
@@ -407,7 +589,7 @@ _RESET_SECTION
/* `ldseq` changes structure based on current section. */
.purgem ldseq
.macro ldseq label
- _wr_cmd_id ldseq, ,0xCB,,,,,,, 0, 0
+ _wr_cmd_id ldseq, ,ASEQ_OP_CHAN_LDSEQ,,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -417,14 +599,14 @@ _RESET_SECTION
_check_arg_bitwidth_u \lowpassCutoff, 4
_check_arg_bitwidth_u \highpassCutoff, 4
- _wr_cmd_id filter, ,0xB3,,,,,,, 0, 0
+ _wr_cmd_id filter, ,ASEQ_OP_CHAN_FILTER,,,,,,, 0, 0
_wr_u8 (\lowpassCutoff << 4) | (\highpassCutoff)
.endm
/* `env` changes structure based on current section. */
.purgem env
.macro env label
- _wr_cmd_id env, ,0xDA,,,,,,, 0, 0
+ _wr_cmd_id env, ,ASEQ_OP_CHAN_ENV,,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -441,7 +623,7 @@ _RESET_SECTION
/* `env` changes structure based on current section. */
.purgem env
.macro env label, arg
- _wr_cmd_id env, ,,0xCB,,,,,, 0, 0
+ _wr_cmd_id env, ,,ASEQ_OP_LAYER_ENV,,,,,, 0, 0
_wr_lbl \label
_wr_u8 \arg
.endm
@@ -556,8 +738,8 @@ _RESET_SECTION
.macro .startseq name
/* Begin a sequence. */
- /* Write the sequence name into a special .name section */
- .pushsection .name, "", @note
+ /* Write the sequence name into a special .note.name section */
+ .pushsection .note.name, "", @note
.asciz "\name"
.balign 4
.popsection
@@ -645,7 +827,7 @@ _RESET_SECTION
.macro _wr_s16 value
/* Ensure the provided arg value fits in 16 bits (signed) */
_check_arg_bitwidth_s \value, 16
- _wr16 \value
+ _wr16 \value & 0xFFFF
.endm
.macro _wr_u16 value
@@ -733,7 +915,7 @@ $reladdr\@:
* closed, so are its layers.
*/
.macro end
- _wr_cmd_id end, 0xFF,0xFF,0xFF,,,,,, 0, 0
+ _wr_cmd_id end, ASEQ_OP_END,ASEQ_OP_END,ASEQ_OP_END,,,,,, 0, 0
.endm
/**
@@ -742,7 +924,7 @@ $reladdr\@:
* Delays for one tick.
*/
.macro delay1
- _wr_cmd_id delay1, 0xFE,0xFE,,,,,,, 0, 0
+ _wr_cmd_id delay1, ASEQ_OP_DELAY1,ASEQ_OP_DELAY1,,,,,,, 0, 0
.endm
/**
@@ -751,7 +933,7 @@ $reladdr\@:
* Delays for `delay` ticks.
*/
.macro delay delay
- _wr_cmd_id delay, 0xFD,0xFD,,,,,,, 0, 0
+ _wr_cmd_id delay, ASEQ_OP_DELAY,ASEQ_OP_DELAY,,,,,,, 0, 0
_var \delay
.endm
@@ -762,7 +944,7 @@ $reladdr\@:
* subroutine encounters an `end` instruction.
*/
.macro call label
- _wr_cmd_id call, 0xFC,0xFC,0xFC,,,,,, 0, 0
+ _wr_cmd_id call, ASEQ_OP_CALL,ASEQ_OP_CALL,ASEQ_OP_CALL,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -772,7 +954,7 @@ $reladdr\@:
* Branches to `label` unconditionally.
*/
.macro jump label
- _wr_cmd_id jump, 0xFB,0xFB,0xFB,,,,,, 0, 0
+ _wr_cmd_id jump, ASEQ_OP_JUMP,ASEQ_OP_JUMP,ASEQ_OP_JUMP,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -782,7 +964,7 @@ $reladdr\@:
* Branches to `label` if TR == 0.
*/
.macro beqz label
- _wr_cmd_id beqz, 0xFA,0xFA,0xFA,,,,,, 0, 0
+ _wr_cmd_id beqz, ASEQ_OP_BEQZ,ASEQ_OP_BEQZ,ASEQ_OP_BEQZ,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -792,7 +974,7 @@ $reladdr\@:
* Branches to `label` if TR < 0.
*/
.macro bltz label
- _wr_cmd_id beqz, 0xF9,0xF9,0xF9,,,,,, 0, 0
+ _wr_cmd_id beqz, ASEQ_OP_BLTZ,ASEQ_OP_BLTZ,ASEQ_OP_BLTZ,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -806,7 +988,7 @@ $reladdr\@:
* becomes full.
*/
.macro loop num
- _wr_cmd_id loop, 0xF8,0xF8,0xF8,,,,,, 0, 0
+ _wr_cmd_id loop, ASEQ_OP_LOOP,ASEQ_OP_LOOP,ASEQ_OP_LOOP,,,,,, 0, 0
_wr_u8 \num
.endm
@@ -820,7 +1002,7 @@ $reladdr\@:
* stack is popped.
*/
.macro loopend
- _wr_cmd_id loopend, 0xF7,0xF7,0xF7,,,,,, 0, 0
+ _wr_cmd_id loopend, ASEQ_OP_LOOPEND,ASEQ_OP_LOOPEND,ASEQ_OP_LOOPEND,,,,,, 0, 0
.endm
/**
@@ -833,7 +1015,7 @@ $reladdr\@:
* the call stack would be popped twice.
*/
.macro break
- _wr_cmd_id break, 0xF6,0xF6,0xF6,,,,,, 0, 0
+ _wr_cmd_id break, ASEQ_OP_BREAK,ASEQ_OP_BREAK,ASEQ_OP_BREAK,,,,,, 0, 0
.endm
/**
@@ -842,7 +1024,7 @@ $reladdr\@:
* Branches to `label` if TR >= 0.
*/
.macro bgez label
- _wr_cmd_id bgez, 0xF5,0xF5,0xF5,,,,,, 0, 0
+ _wr_cmd_id bgez, ASEQ_OP_BGEZ,ASEQ_OP_BGEZ,ASEQ_OP_BGEZ,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -856,7 +1038,7 @@ $reladdr\@:
* signed 8-bit (+/-128) range are reachable.
*/
.macro rjump label
- _wr_cmd_id rjump, 0xF4,0xF4,0xF4,,,,,, 0, 0
+ _wr_cmd_id rjump, ASEQ_OP_RJUMP,ASEQ_OP_RJUMP,ASEQ_OP_RJUMP,,,,,, 0, 0
_wr_8_rel \label
.endm
@@ -870,7 +1052,7 @@ $reladdr\@:
* signed 8-bit (+/-128) range are reachable.
*/
.macro rbeqz label
- _wr_cmd_id rbeqz, 0xF3,0xF3,0xF3,,,,,, 0, 0
+ _wr_cmd_id rbeqz, ASEQ_OP_RBEQZ,ASEQ_OP_RBEQZ,ASEQ_OP_RBEQZ,,,,,, 0, 0
_wr_8_rel \label
.endm
@@ -884,7 +1066,7 @@ $reladdr\@:
* signed 8-bit (+/-128) range are reachable.
*/
.macro rbltz label
- _wr_cmd_id rbltz, 0xF2,0xF2,0xF2,,,,,, 0, 0
+ _wr_cmd_id rbltz, ASEQ_OP_RBLTZ,ASEQ_OP_RBLTZ,ASEQ_OP_RBLTZ,,,,,, 0, 0
_wr_8_rel \label
.endm
@@ -894,7 +1076,7 @@ $reladdr\@:
* Clears the channel note pool and reallocates it with space for `num` notes.
*/
.macro allocnotelist num
- _wr_cmd_id allocnotelist, 0xF1,0xF1,,,,,,, 0, 0
+ _wr_cmd_id allocnotelist, ASEQ_OP_SEQ_ALLOCNOTELIST,ASEQ_OP_CHAN_ALLOCNOTELIST,,,,,,, 0, 0
_wr_u8 \num
.endm
@@ -904,7 +1086,7 @@ $reladdr\@:
* Clears the channel note pool.
*/
.macro freenotelist
- _wr_cmd_id freenotelist, 0xF0,0xF0,,,,,,, 0, 0
+ _wr_cmd_id freenotelist, ASEQ_OP_SEQ_FREENOTELIST,ASEQ_OP_CHAN_FREENOTELIST,,,,,,, 0, 0
.endm
/**
@@ -913,7 +1095,7 @@ $reladdr\@:
* Has no function.
*/
.macro unk_EF arg1, arg2
- _wr_cmd_id unk_EF, 0xEF,,,,,,,, 0, 0
+ _wr_cmd_id unk_EF, ASEQ_OP_SEQ_EF,,,,,,,, 0, 0
_wr_s16 \arg1
_w_u8 \arg2
.endm
@@ -924,7 +1106,7 @@ $reladdr\@:
* Fine-tunes the pitch bend amount for the channel or layer.
*/
.macro bendfine amt
- _wr_cmd_id bendfine, ,0xEE,0xCE,,,,,, 0, 0
+ _wr_cmd_id bendfine, ,ASEQ_OP_CHAN_BENDFINE,ASEQ_OP_LAYER_BENDFINE,,,,,, 0, 0
_wr_s8 \amt
.endm
@@ -934,7 +1116,7 @@ $reladdr\@:
* Sets the channel gain (multiplicative volume scale factor) to the provided qu4.4 fixed-point value.
*/
.macro gain value
- _wr_cmd_id gain, ,0xED,,,,,,, 0, 0
+ _wr_cmd_id gain, ,ASEQ_OP_CHAN_GAIN,,,,,,, 0, 0
_wr_u8 \value
.endm
@@ -944,7 +1126,7 @@ $reladdr\@:
* Resets channel vibrato, filter, gain, sustain, etc. state.
*/
.macro vibreset
- _wr_cmd_id vibreset, ,0xEC,,,,,,, 0, 0
+ _wr_cmd_id vibreset, ,ASEQ_OP_CHAN_VIBRESET,,,,,,, 0, 0
.endm
/**
@@ -953,7 +1135,7 @@ $reladdr\@:
* Updates the soundfont and instrument for the channel simultaneously.
*/
.macro fontinstr fontId, instId
- _wr_cmd_id fontinstr, ,0xEB,,,,,,, 0, 0
+ _wr_cmd_id fontinstr, ,ASEQ_OP_CHAN_FONTINSTR,,,,,,, 0, 0
_wr_u8 \fontId
_wr_u8 \instId
.endm
@@ -966,7 +1148,7 @@ $reladdr\@:
.macro notepri priority1, priority2
_check_arg_bitwidth_u \priority1, 4
_check_arg_bitwidth_u \priority2, 4
- _wr_cmd_id notepri, ,0xE9,,,,,,, 0, 0
+ _wr_cmd_id notepri, ,ASEQ_OP_CHAN_NOTEPRI,,,,,,, 0, 0
_wr_u8 (\priority1 << 4) | \priority2
.endm
@@ -977,7 +1159,7 @@ $reladdr\@:
* Sets various channel parameters.
*/
.macro params muteBhv, noteAllocPolicy, channelPriority, transposition, pan, panWeight, reverb, reverbIndex
- _wr_cmd_id params, ,0xE8,,,,,,, 0, 0
+ _wr_cmd_id params, ,ASEQ_OP_CHAN_PARAMS,,,,,,, 0, 0
_wr_u8 \muteBhv
_wr_u8 \noteAllocPolicy
_wr_u8 \channelPriority
@@ -995,7 +1177,7 @@ $reladdr\@:
* is ordered in the same way as the arguments in `params`.
*/
.macro ldparams label
- _wr_cmd_id ldparams, ,0xE7,,,,,,, 0, 0
+ _wr_cmd_id ldparams, ,ASEQ_OP_CHAN_LDPARAMS,,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -1005,7 +1187,7 @@ $reladdr\@:
* Sets the sample book mode.
*/
.macro samplebook value
- _wr_cmd_id samplebook, ,0xE6,,,,,,, 0, 0
+ _wr_cmd_id samplebook, ,ASEQ_OP_CHAN_SAMPLEBOOK,,,,,,, 0, 0
_wr_u8 \value
.endm
@@ -1015,7 +1197,7 @@ $reladdr\@:
* Sets the channel reverb.
*/
.macro reverbidx arg
- _wr_cmd_id reverbidx, ,0xE5,,,,,,, 0, 0
+ _wr_cmd_id reverbidx, ,ASEQ_OP_CHAN_REVERBIDX,,,,,,, 0, 0
_wr_u8 \arg
.endm
@@ -1025,7 +1207,7 @@ $reladdr\@:
* Sets the channel vibrato delay.
*/
.macro vibdelay arg
- _wr_cmd_id vibdelay, ,0xE3,,,,,,, 0, 0
+ _wr_cmd_id vibdelay, ,ASEQ_OP_CHAN_VIBDELAY,,,,,,, 0, 0
_wr_u8 \arg
.endm
@@ -1035,7 +1217,7 @@ $reladdr\@:
* Sets the vibrato extent.
*/
.macro vibdepthgrad arg0, arg1, arg2
- _wr_cmd_id vibdepthgrad, ,0xE2,,,,,,, 0, 0
+ _wr_cmd_id vibdepthgrad, ,ASEQ_OP_CHAN_VIBDEPTHGRAD,,,,,,, 0, 0
_wr_u8 \arg0
_wr_u8 \arg1
_wr_u8 \arg2
@@ -1047,7 +1229,7 @@ $reladdr\@:
* Sets the vibrato rate.
*/
.macro vibfreqgrad arg0, arg1, arg2
- _wr_cmd_id vibfreqgrad, ,0xE1,,,,,,, 0, 0
+ _wr_cmd_id vibfreqgrad, ,ASEQ_OP_CHAN_VIBFREQGRAD,,,,,,, 0, 0
_wr_u8 \arg0
_wr_u8 \arg1
_wr_u8 \arg2
@@ -1059,7 +1241,7 @@ $reladdr\@:
* Changes the expression amount for the channel.
*/
.macro volexp amt
- _wr_cmd_id volexp, ,0xE0,,,,,,, 0, 0
+ _wr_cmd_id volexp, ,ASEQ_OP_CHAN_VOLEXP,,,,,,, 0, 0
_wr_u8 \amt
.endm
@@ -1070,7 +1252,7 @@ $reladdr\@:
* provided number of semitones.
*/
.macro transpose semitones
- _wr_cmd_id transpose, 0xDF,0xDB,0xC2,,,,,, 0, 0
+ _wr_cmd_id transpose, ASEQ_OP_SEQ_TRANSPOSE,ASEQ_OP_CHAN_TRANSPOSE,ASEQ_OP_LAYER_TRANSPOSE,,,,,, 0, 0
_wr_s8 \semitones
.endm
@@ -1080,7 +1262,7 @@ $reladdr\@:
* Adjusts the transposition amount. This is only available at the top sequence level.
*/
.macro rtranspose semitones
- _wr_cmd_id rtranspose, 0xDE,,,,,,,, 0, 0
+ _wr_cmd_id rtranspose, ASEQ_OP_SEQ_RTRANSPOSE,,,,,,,, 0, 0
_wr_s8 \semitones
.endm
@@ -1090,7 +1272,7 @@ $reladdr\@:
* Sets the freqScale for the current channel.
*/
.macro freqscale arg
- _wr_cmd_id freqscale, ,0xDE,,,,,,, 0, 0
+ _wr_cmd_id freqscale, ,ASEQ_OP_CHAN_FREQSCALE,,,,,,, 0, 0
_wr_s16 \arg
.endm
@@ -1100,7 +1282,7 @@ $reladdr\@:
* Changes the tempo of the sequence.
*/
.macro tempo bpm
- _wr_cmd_id tempo, 0xDD,,,,,,,, 0, 0
+ _wr_cmd_id tempo, ASEQ_OP_SEQ_TEMPO,,,,,,,, 0, 0
_wr_u8 \bpm
.endm
@@ -1110,7 +1292,7 @@ $reladdr\@:
* Sets the tempoChange for the sequence.
*/
.macro tempochg arg
- _wr_cmd_id tempochg, 0xDC,,,,,,,, 0, 0
+ _wr_cmd_id tempochg, ASEQ_OP_SEQ_TEMPOCHG,,,,,,,, 0, 0
_wr_s8 \arg
.endm
@@ -1122,7 +1304,7 @@ $reladdr\@:
.macro pan pan
/* pan can only take values in 0..127 */
_check_arg_bitwidth_u \pan, 7
- _wr_cmd_id pan, ,0xDD,,,,,,, 0, 0
+ _wr_cmd_id pan, ,ASEQ_OP_CHAN_PAN,,,,,,, 0, 0
_wr_u8 \pan
.endm
@@ -1138,7 +1320,7 @@ $reladdr\@:
.macro panweight weight
/* weight can only take values in 0..127 */
_check_arg_bitwidth_u \weight, 7
- _wr_cmd_id panweight, ,0xDC,,,,,,, 0, 0
+ _wr_cmd_id panweight, ,ASEQ_OP_CHAN_PANWEIGHT,,,,,,, 0, 0
_wr_u8 \weight
.endm
@@ -1148,7 +1330,7 @@ $reladdr\@:
* Sets the volume amount for this sequence or channel.
*/
.macro vol amt
- _wr_cmd_id vol, 0xDB,0xDF,,,,,,, 0, 0
+ _wr_cmd_id vol, ASEQ_OP_SEQ_VOL,ASEQ_OP_CHAN_VOL,,,,,,, 0, 0
_wr_u8 \amt
.endm
@@ -1158,7 +1340,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro volmode mode, fadeTimer
- _wr_cmd_id volmode, 0xDA,,,,,,,, 0, 0
+ _wr_cmd_id volmode, ASEQ_OP_SEQ_VOLMODE,,,,,,,, 0, 0
_wr_u8 \mode
_wr_u16 \fadeTimer
.endm
@@ -1169,7 +1351,7 @@ $reladdr\@:
* Sets the fadeVolumeScale for the sequence.
*/
.macro volscale arg
- _wr_cmd_id volscale, 0xD9,,,,,,,, 0, 0
+ _wr_cmd_id volscale, ASEQ_OP_SEQ_VOLSCALE,,,,,,,, 0, 0
_wr_u8 \arg
.endm
@@ -1179,7 +1361,7 @@ $reladdr\@:
* Sets the envelope release rate for this channel or layer.
*/
.macro releaserate release
- _wr_cmd_id releaserate, ,0xD9,0xCF,,,,,, 0, 0
+ _wr_cmd_id releaserate, ,ASEQ_OP_CHAN_RELEASERATE,ASEQ_OP_LAYER_RELEASERATE,,,,,, 0, 0
_wr_u8 \release
.endm
@@ -1189,7 +1371,7 @@ $reladdr\@:
* Sets the vibrato depth for the channel.
*/
.macro vibdepth arg
- _wr_cmd_id vibdepth, ,0xD8,,,,,,, 0, 0
+ _wr_cmd_id vibdepth, ,ASEQ_OP_CHAN_VIBDEPTH,,,,,,, 0, 0
_wr_u8 \arg
.endm
@@ -1199,7 +1381,7 @@ $reladdr\@:
* Sets the vibrato rate for the channel.
*/
.macro vibfreq arg
- _wr_cmd_id vibfreq, ,0xD7,,,,,,, 0, 0
+ _wr_cmd_id vibfreq, ,ASEQ_OP_CHAN_VIBFREQ,,,,,,, 0, 0
_wr_u8 \arg
.endm
@@ -1212,7 +1394,7 @@ $reladdr\@:
* initchan 0b101 initializes channels 0 and 2.
*/
.macro initchan bitmask
- _wr_cmd_id initchan, 0xD7,,,,,,,, 0, 0
+ _wr_cmd_id initchan, ASEQ_OP_SEQ_INITCHAN,,,,,,,, 0, 0
_wr_u16 \bitmask
.endm
@@ -1222,7 +1404,7 @@ $reladdr\@:
* Frees the channels marked in the provided bitmask.
*/
.macro freechan bitmask
- _wr_cmd_id freechan, 0xD6,,,,,,,, 0, 0
+ _wr_cmd_id freechan, ASEQ_OP_SEQ_FREECHAN,,,,,,,, 0, 0
_wr_u16 \bitmask
.endm
@@ -1232,7 +1414,7 @@ $reladdr\@:
* Sets the muteVolumeScale for the sequence.
*/
.macro mutescale arg
- _wr_cmd_id mutescale, 0xD5,,,,,,,, 0, 0
+ _wr_cmd_id mutescale, ASEQ_OP_SEQ_MUTESCALE,,,,,,,, 0, 0
_wr_s8 \arg
.endm
@@ -1242,7 +1424,7 @@ $reladdr\@:
* Mutes the sequence player.
*/
.macro mute
- _wr_cmd_id mute, 0xD4,,,,,,,, 0, 0
+ _wr_cmd_id mute, ASEQ_OP_SEQ_MUTE,,,,,,,, 0, 0
.endm
/**
@@ -1251,7 +1433,7 @@ $reladdr\@:
* Sets the reverb amount for this channel.
*/
.macro reverb amt
- _wr_cmd_id reverb, ,0xD4,,,,,,, 0, 0
+ _wr_cmd_id reverb, ,ASEQ_OP_CHAN_REVERB,,,,,,, 0, 0
_wr_u8 \amt
.endm
@@ -1261,7 +1443,7 @@ $reladdr\@:
* Sets mute behavior for this sequence or channel.
*/
.macro mutebhv flags
- _wr_cmd_id mutebhv, 0xD3,0xCA,,,,,,, 0, 0
+ _wr_cmd_id mutebhv, ASEQ_OP_SEQ_MUTEBHV,ASEQ_OP_CHAN_MUTEBHV,,,,,,, 0, 0
_wr_u8 \flags
.endm
@@ -1271,7 +1453,7 @@ $reladdr\@:
* Sets the pitch bend amount for this channel.
*/
.macro bend amt
- _wr_cmd_id bend, ,0xD3,,,,,,, 0, 0
+ _wr_cmd_id bend, ,ASEQ_OP_CHAN_BEND,,,,,,, 0, 0
_wr_s8 \amt
.endm
@@ -1281,7 +1463,7 @@ $reladdr\@:
* Sets the location of SHORTVELTBL.
*/
.macro ldshortvelarr label
- _wr_cmd_id ldshortvelarr, 0xD2,,,,,,,, 0, 0
+ _wr_cmd_id ldshortvelarr, ASEQ_OP_SEQ_LDSHORTVELARR,,,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -1291,7 +1473,7 @@ $reladdr\@:
* Sets the adsr sustain value for this channel.
*/
.macro sustain value
- _wr_cmd_id sustain, ,0xD2,,,,,,, 0, 0
+ _wr_cmd_id sustain, ,ASEQ_OP_CHAN_SUSTAIN,,,,,,, 0, 0
_wr_u8 \value
.endm
@@ -1301,7 +1483,7 @@ $reladdr\@:
* Sets the location of SHORTGATETBL.
*/
.macro ldshortgatearr label
- _wr_cmd_id ldshortgatearr, 0xD1,,,,,,,, 0, 0
+ _wr_cmd_id ldshortgatearr, ASEQ_OP_SEQ_LDSHORTGATEARR,,,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -1311,7 +1493,7 @@ $reladdr\@:
* Sets the noteAllocPolicy for either the sequence or the current channel.
*/
.macro notealloc arg
- _wr_cmd_id notealloc, 0xD0,0xD1,,,,,,, 0, 0
+ _wr_cmd_id notealloc, ASEQ_OP_SEQ_NOTEALLOC,ASEQ_OP_CHAN_NOTEALLOC,,,,,,, 0, 0
_wr_u8 \arg
.endm
@@ -1328,7 +1510,7 @@ $reladdr\@:
_check_arg_bitwidth_u \strongRvrbR, 1
_check_arg_bitwidth_u \strongRvrbL, 1
- _wr_cmd_id effects, ,0xD0,,,,,,, 0, 0
+ _wr_cmd_id effects, ,ASEQ_OP_CHAN_EFFECTS,,,,,,, 0, 0
_wr_u8 (\headset << 7) | (\type << 4) | (\strongR << 3) | (\strongL << 2) | (\strongRvrbR << 1) | (\strongRvrbL << 0)
.endm
@@ -1338,7 +1520,7 @@ $reladdr\@:
* Stores TP -> label
*/
.macro stptrtoseq label
- _wr_cmd_id stptrtoseq, ,0xCF,,,,,,, 0, 0
+ _wr_cmd_id stptrtoseq, ,ASEQ_OP_CHAN_STPTRTOSEQ,,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -1348,7 +1530,7 @@ $reladdr\@:
* Loads label -> TP
*/
.macro ldptr label
- _wr_cmd_id ldptr, ,0xCE,,,,,,, 0, 0
+ _wr_cmd_id ldptr, ,ASEQ_OP_CHAN_LDPTR,,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -1358,7 +1540,7 @@ $reladdr\@:
* Loads imm -> TP
*/
.macro ldptri imm
- _wr_cmd_id ldptr, ,0xCE,,,,,,, 0, 0
+ _wr_cmd_id ldptr, ,ASEQ_OP_CHAN_LDPTR,,,,,,, 0, 0
_wr_u16 \imm
.endm
@@ -1368,7 +1550,7 @@ $reladdr\@:
* Stores a random number in the range [0, max) into TR. If max is 0 the range is [0, 255]
*/
.macro rand max
- _wr_cmd_id rand, 0xCE,0xB8,,,,,,, 0, 0
+ _wr_cmd_id rand, ASEQ_OP_SEQ_RAND,ASEQ_OP_CHAN_RAND,,,,,,, 0, 0
_wr_u8 \max
.endm
@@ -1383,9 +1565,9 @@ $reladdr\@:
*/
.macro dyncall table=-1
.if \table == -1
- _wr_cmd_id dyncall, ,0xE4,,,,,,, 0, 0
+ _wr_cmd_id dyncall, ,ASEQ_OP_CHAN_DYNCALL,,,,,,, 0, 0
.else
- _wr_cmd_id dyncall, 0xCD,,,,,,,, 0, 0
+ _wr_cmd_id dyncall, ASEQ_OP_SEQ_DYNCALL,,,,,,,, 0, 0
_wr_lbl \table
.endif
.endm
@@ -1396,7 +1578,7 @@ $reladdr\@:
* Loads the immediate value `imm` into TR.
*/
.macro ldi imm
- _wr_cmd_id ldi, 0xCC,0xCC,,,,,,, 0, 0
+ _wr_cmd_id ldi, ASEQ_OP_SEQ_LDI,ASEQ_OP_CHAN_LDI,,,,,,, 0, 0
_wr_u8 \imm
.endm
@@ -1406,7 +1588,7 @@ $reladdr\@:
* Computes TR = TR & imm
*/
.macro and imm
- _wr_cmd_id and, 0xC9,0xC9,,,,,,, 0, 0
+ _wr_cmd_id and, ASEQ_OP_SEQ_AND,ASEQ_OP_CHAN_AND,,,,,,, 0, 0
_wr_u8 \imm
.endm
@@ -1416,7 +1598,7 @@ $reladdr\@:
* Computes TR = TR - imm
*/
.macro sub imm
- _wr_cmd_id sub, 0xC8,0xC8,,,,,,, 0, 0
+ _wr_cmd_id sub, ASEQ_OP_SEQ_SUB,ASEQ_OP_CHAN_SUB,,,,,,, 0, 0
_wr_u8 \imm
.endm
@@ -1426,7 +1608,7 @@ $reladdr\@:
* Stores the u8 value `TR + imm` to the location specified by `label`.
*/
.macro stseq imm, label
- _wr_cmd_id stseq, 0xC7,0xC7,,,,,,, 0, 0
+ _wr_cmd_id stseq, ASEQ_OP_SEQ_STSEQ,ASEQ_OP_CHAN_STSEQ,,,,,,, 0, 0
_wr_u8 \imm
_wr_lbl \label
.endm
@@ -1437,7 +1619,7 @@ $reladdr\@:
* Immediately stops the sequence or channel.
*/
.macro stop
- _wr_cmd_id stop, 0xC6,0xEA,,,,,,, 0, 0
+ _wr_cmd_id stop, ASEQ_OP_SEQ_STOP,ASEQ_OP_CHAN_STOP,,,,,,, 0, 0
.endm
/**
@@ -1446,7 +1628,7 @@ $reladdr\@:
* Set the current soundfont for this channel to `fontId`.
*/
.macro font fontId
- _wr_cmd_id font, ,0xC6,,,,,,, 0, 0
+ _wr_cmd_id font, ,ASEQ_OP_CHAN_FONT,,,,,,, 0, 0
_wr_u8 \fontId
.endm
@@ -1459,7 +1641,7 @@ $reladdr\@:
* never used, so changing it with this instruction has no useful effects.
*/
.macro scriptctr arg
- _wr_cmd_id scriptctr, 0xC5,,,,,,,, 0, 0
+ _wr_cmd_id scriptctr, ASEQ_OP_SEQ_SCRIPTCTR,,,,,,,, 0, 0
_wr_u16 \arg
.endm
@@ -1470,7 +1652,7 @@ $reladdr\@:
* unless TR is -1, in which case nothing happens.
*/
.macro dyntbllookup
- _wr_cmd_id dyntbllookup, ,0xC5,,,,,,, 0, 0
+ _wr_cmd_id dyntbllookup, ,ASEQ_OP_CHAN_DYNTBLLOOKUP,,,,,,, 0, 0
.endm
/**
@@ -1479,7 +1661,7 @@ $reladdr\@:
* Plays the sequence seqId on seqPlayer.
*/
.macro runseq seqPlayer, seqId
- _wr_cmd_id runseq, 0xC4,,,,,,,, 0, 0
+ _wr_cmd_id runseq, ASEQ_OP_SEQ_RUNSEQ,,,,,,,, 0, 0
_wr_u8 \seqPlayer
_wr_u8 \seqId
.endm
@@ -1492,7 +1674,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro mutechan arg0
- _wr_cmd_id mutechan, 0xC3,,,,,,,, 0, 0
+ _wr_cmd_id mutechan, ASEQ_OP_SEQ_C3,,,,,,,, 0, 0
_wr_s16 \arg0
.endm
@@ -1504,7 +1686,7 @@ $reladdr\@:
* Disable short notes encoding.
*/
.macro noshort
- _wr_cmd_id noshort, ,0xC4,,,,,,, 0, 0
+ _wr_cmd_id noshort, ,ASEQ_OP_CHAN_NOSHORT,,,,,,, 0, 0
.endm
/**
@@ -1513,7 +1695,7 @@ $reladdr\@:
* Enable short notes encoding.
*/
.macro short
- _wr_cmd_id short, ,0xC3,,,,,,, 0, 0
+ _wr_cmd_id short, ,ASEQ_OP_CHAN_SHORT,,,,,,, 0, 0
.endm
/**
@@ -1522,7 +1704,7 @@ $reladdr\@:
* Loads label -> DYNTBL
*/
.macro dyntbl label
- _wr_cmd_id dyntbl, ,0xC2,,,,,,, 0, 0
+ _wr_cmd_id dyntbl, ,ASEQ_OP_CHAN_DYNTBL,,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -1532,7 +1714,7 @@ $reladdr\@:
* Set instrument `instNum` from the current soundfont as the active instrument for this channel or layer.
*/
.macro instr instNum
- _wr_cmd_id instr, ,0xC1,0xC6,,,,,, 0, 0
+ _wr_cmd_id instr, ,ASEQ_OP_CHAN_INSTR,ASEQ_OP_LAYER_INSTR,,,,,, 0, 0
_wr_u8 \instNum
.endm
@@ -1544,7 +1726,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro unk_BE arg0
- _wr_cmd_id unk_BE, ,0xBE,,,,,,, 0, 0
+ _wr_cmd_id unk_BE, ,ASEQ_OP_CHAN_UNK_BE,,,,,,, 0, 0
_wr_u8 \arg0
.endm
@@ -1558,13 +1740,9 @@ $reladdr\@:
* If range is 0, it is treated as 65536.
*/
.macro randptr range, offset
- #if (MML_VERSION == MML_VERSION_OOT)
- _wr_cmd_id randptr, ,0xBD,,,,,,, 0, 0
- #else
- _wr_cmd_id randptr, ,0xA8,,,,,,, 0, 0
- #endif
- _wr_u16 \range
- _wr_u16 \offset
+ _wr_cmd_id randptr, ,ASEQ_OP_CHAN_RANDPTR,,,,,,, 0, 0
+ _wr_u16 \range
+ _wr_u16 \offset
.endm
#if (MML_VERSION == MML_VERSION_MM)
@@ -1575,7 +1753,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro samplestart arg
- _wr_cmd_id samplestart, ,0xBD,,,,,,, 0, 0
+ _wr_cmd_id samplestart, ,ASEQ_OP_CHAN_SAMPLESTART,,,,,,, 0, 0
_wr_u8 \arg
.endm
@@ -1585,7 +1763,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro unk_A7 arg
- _wr_cmd_id unk_A7, ,0xA7,,,,,,, 0, 0
+ _wr_cmd_id unk_A7, ,ASEQ_OP_CHAN_A7,,,,,,, 0, 0
_wr_u8 \arg
.endm
@@ -1595,7 +1773,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro unk_A6 arg0, arg1
- _wr_cmd_id unk_A6, ,0xA6,,,,,,, 0, 0
+ _wr_cmd_id unk_A6, ,ASEQ_OP_CHAN_A6,,,,,,, 0, 0
_wr_u8 \arg0
_wr_s16 \arg1
.endm
@@ -1606,7 +1784,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro unk_A5
- _wr_cmd_id unk_A5, ,0xA5,,,,,,, 0, 0
+ _wr_cmd_id unk_A5, ,ASEQ_OP_CHAN_A5,,,,,,, 0, 0
.endm
/**
@@ -1615,7 +1793,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro unk_A4 arg
- _wr_cmd_id unk_A4, ,0xA4,,,,,,, 0, 0
+ _wr_cmd_id unk_A4, ,ASEQ_OP_CHAN_A4,,,,,,, 0, 0
_wr_u8 \arg
.endm
@@ -1625,7 +1803,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro unk_A3
- _wr_cmd_id unk_A3, ,0xA3,,,,,,, 0, 0
+ _wr_cmd_id unk_A3, ,ASEQ_OP_CHAN_A3,,,,,,, 0, 0
.endm
/**
@@ -1634,7 +1812,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro unk_A2 arg
- _wr_cmd_id unk_A2, ,0xA2,,,,,,, 0, 0
+ _wr_cmd_id unk_A2, ,ASEQ_OP_CHAN_A2,,,,,,, 0, 0
_wr_s16 \arg
.endm
@@ -1644,7 +1822,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro unk_A1
- _wr_cmd_id unk_A1, ,0xA1,,,,,,, 0, 0
+ _wr_cmd_id unk_A1, ,ASEQ_OP_CHAN_A1,,,,,,, 0, 0
.endm
/**
@@ -1653,7 +1831,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro unk_A0 arg
- _wr_cmd_id unk_A0, ,0xA0,,,,,,, 0, 0
+ _wr_cmd_id unk_A0, ,ASEQ_OP_CHAN_A0,,,,,,, 0, 0
_wr_s16 \arg
.endm
@@ -1665,20 +1843,20 @@ $reladdr\@:
* Computes TP += value
*/
.macro ptradd value
- _wr_cmd_id ptradd, ,0xBC,,,,,,, 0, 0
+ _wr_cmd_id ptradd, ,ASEQ_OP_CHAN_PTRADD,,,,,,, 0, 0
_wr_lbl \value
.endm
/**
- * ptraddi
+ * ptraddi
*
* Like ptradd but for immediates instead of labels
*
* Computes TP += value
*/
.macro ptraddi value
- _wr_cmd_id ptradd, ,0xBC,,,,,,, 0, 0
- _wr_u16 \value
+ _wr_cmd_id ptradd, ,ASEQ_OP_CHAN_PTRADD,,,,,,, 0, 0
+ _wr_s16 \value
.endm
/**
@@ -1688,7 +1866,7 @@ $reladdr\@:
* TODO args? arg0=16,arg1=val<<8 maps well to midi chorus
*/
.macro combfilter arg0, arg1
- _wr_cmd_id combfilter, ,0xBB,,,,,,, 0, 0
+ _wr_cmd_id combfilter, ,ASEQ_OP_CHAN_COMBFILTER,,,,,,, 0, 0
_wr_u8 \arg0
_wr_u16 \arg1
.endm
@@ -1701,7 +1879,7 @@ $reladdr\@:
* NOTE: This feature is bugged. If this is non-zero it will actually use the range set by randvel.
*/
.macro randgate range
- _wr_cmd_id randgate, ,0xBA,,,,,,, 0, 0
+ _wr_cmd_id randgate, ,ASEQ_OP_CHAN_RANDGATE,,,,,,, 0, 0
_wr_u8 \range
.endm
@@ -1711,7 +1889,7 @@ $reladdr\@:
* Sets the range for random note velocity fluctuations.
*/
.macro randvel range
- _wr_cmd_id randvel, ,0xB9,,,,,,, 0, 0
+ _wr_cmd_id randvel, ,ASEQ_OP_CHAN_RANDVEL,,,,,,, 0, 0
_wr_u8 \range
.endm
@@ -1721,7 +1899,7 @@ $reladdr\@:
* Stores a random number in the range [0, max) into TP. If max is 0 the range is [0, 65535]
*/
.macro randtoptr max
- _wr_cmd_id randtoptr, ,0xB7,,,,,,, 0, 0
+ _wr_cmd_id randtoptr, ,ASEQ_OP_CHAN_RANDTOPTR,,,,,,, 0, 0
_wr_u16 \max
.endm
@@ -1731,7 +1909,7 @@ $reladdr\@:
* Loads DYNTBL8[TR] -> TR
*/
.macro dyntblv
- _wr_cmd_id dyntblv, ,0xB6,,,,,,, 0, 0
+ _wr_cmd_id dyntblv, ,ASEQ_OP_CHAN_DYNTBLV,,,,,,, 0, 0
.endm
/**
@@ -1740,7 +1918,7 @@ $reladdr\@:
* Loads DYNTBL16[TR] -> TP
*/
.macro dyntbltoptr
- _wr_cmd_id dyntbltoptr, ,0xB5,,,,,,, 0, 0
+ _wr_cmd_id dyntbltoptr, ,ASEQ_OP_CHAN_DYNTBLTOPTR,,,,,,, 0, 0
.endm
/**
@@ -1749,7 +1927,7 @@ $reladdr\@:
* Transfers TP -> DYNTBL
*/
.macro ptrtodyntbl
- _wr_cmd_id ptrtodyntbl, ,0xB4,,,,,,, 0, 0
+ _wr_cmd_id ptrtodyntbl, ,ASEQ_OP_CHAN_PTRTODYNTBL,,,,,,, 0, 0
.endm
/**
@@ -1760,7 +1938,7 @@ $reladdr\@:
* Note that TR acts as an index into an array of u16 starting at label.
*/
.macro ldseqtoptr label
- _wr_cmd_id ldseqtoptr, ,0xB2,,,,,,, 0, 0
+ _wr_cmd_id ldseqtoptr, ,ASEQ_OP_CHAN_LDSEQTOPTR,,,,,,, 0, 0
_wr_lbl \label
.endm
@@ -1770,7 +1948,7 @@ $reladdr\@:
* Invalidates the current active filter buffer.
*/
.macro freefilter
- _wr_cmd_id freefilter, ,0xB1,,,,,,, 0, 0
+ _wr_cmd_id freefilter, ,ASEQ_OP_CHAN_FREEFILTER,,,,,,, 0, 0
.endm
/**
@@ -1779,7 +1957,7 @@ $reladdr\@:
* Sets the active filter buffer to the location specified by `filter`.
*/
.macro ldfilter filter
- _wr_cmd_id ldfilter, ,0xB0,,,,,,, 0, 0
+ _wr_cmd_id ldfilter, ,ASEQ_OP_CHAN_LDFILTER,,,,,,, 0, 0
_wr_lbl \filter
.endm
@@ -1790,7 +1968,7 @@ $reladdr\@:
* Delays by `delay` ticks.
*/
.macro cdelay delay
- _wr_cmd_id cdelay, ,0x00,,,,,,, \delay, 4
+ _wr_cmd_id cdelay, ,ASEQ_OP_CHAN_CDELAY,,,,,,, \delay, 4
.endm
/**
@@ -1804,9 +1982,9 @@ $reladdr\@:
*/
.macro ldsample type, portNum
.if \type == LDSAMPLE_INST
- _wr_cmd_id ldsample, ,0x10,,,,,,, \portNum, 3
+ _wr_cmd_id ldsample, ,ASEQ_OP_CHAN_LDSAMPLE,,,,,,, \portNum, 3
.elif \type == LDSAMPLE_SFX
- _wr_cmd_id ldsample, ,0x18,,,,,,, \portNum, 3
+ _wr_cmd_id ldsample, ,ASEQ_OP_CHAN_LDSAMPLE | 8,,,,,,, \portNum, 3
.else
.error "ldsample: invalid type"
.endif
@@ -1820,7 +1998,7 @@ $reladdr\@:
* Stores the contents of TR into CIO[channelNum][portNum]
*/
.macro stcio channelNum, portNum
- _wr_cmd_id stcio, ,0x30,,,,,,, \channelNum, 4
+ _wr_cmd_id stcio, ,ASEQ_OP_CHAN_STCIO,,,,,,, \channelNum, 4
_wr_u8 \portNum
.endm
@@ -1830,7 +2008,7 @@ $reladdr\@:
* Loads the contents of CIO[channelNum][portNum] into TR.
*/
.macro ldcio channelNum, portNum
- _wr_cmd_id ldcio, ,0x40,,,,,,, \channelNum, 4
+ _wr_cmd_id ldcio, ,ASEQ_OP_CHAN_LDCIO,,,,,,, \channelNum, 4
_wr_u8 \portNum
.endm
@@ -1842,7 +2020,7 @@ $reladdr\@:
* for use in position-independent code.
*/
.macro rldlayer layerNum, label
- _wr_cmd_id rldlayer, ,0x78,,,,,,, \layerNum, 3
+ _wr_cmd_id rldlayer, ,ASEQ_OP_CHAN_RLDLAYER,,,,,,, \layerNum, 3
_wr_16_rel \label
.endm
@@ -1856,7 +2034,7 @@ $reladdr\@:
* - -1 if layer does not exist.
*/
.macro testlayer layerNum
- _wr_cmd_id testlayer, ,0x80,,,,,,, \layerNum, 3
+ _wr_cmd_id testlayer, ,ASEQ_OP_CHAN_TESTLAYER,,,,,,, \layerNum, 3
.endm
/**
@@ -1865,7 +2043,7 @@ $reladdr\@:
* Opens the note layer at `label` for index `layerNum`.
*/
.macro ldlayer layerNum, label
- _wr_cmd_id ldlayer, ,0x88,,,,,,, \layerNum, 3
+ _wr_cmd_id ldlayer, ,ASEQ_OP_CHAN_LDLAYER,,,,,,, \layerNum, 3
_wr_lbl \label
.endm
@@ -1875,7 +2053,7 @@ $reladdr\@:
* Deletes the layer specified by index `layerNum`.
*/
.macro dellayer arg
- _wr_cmd_id dellayer, ,0x90,,,,,,, \arg, 3
+ _wr_cmd_id dellayer, ,ASEQ_OP_CHAN_DELLAYER,,,,,,, \arg, 3
.endm
/**
@@ -1884,7 +2062,7 @@ $reladdr\@:
* Allocates a new layer starting at the pointer read from DYNTBL16[TR]
*/
.macro dynldlayer arg
- _wr_cmd_id dynldlayer, ,0x98,,,,,,, \arg, 3
+ _wr_cmd_id dynldlayer, ,ASEQ_OP_CHAN_DYNLDLAYER,,,,,,, \arg, 3
.endm
/**
@@ -1896,7 +2074,7 @@ $reladdr\@:
* - 1 if disabled
*/
.macro testchan channelNum
- _wr_cmd_id testchan, 0x00,,,,,,,, \channelNum, 4
+ _wr_cmd_id testchan, ASEQ_OP_SEQ_TESTCHAN,,,,,,,, \channelNum, 4
.endm
/**
@@ -1906,9 +2084,9 @@ $reladdr\@:
*/
.macro stopchan channelNum
.if ASEQ_MODE == ASEQ_MODE_SEQUENCE
- _wr_cmd_id stopchan, 0x40,,,,,,,, \channelNum, 4
+ _wr_cmd_id stopchan, ASEQ_OP_SEQ_STOPCHAN,,,,,,,, \channelNum, 4
.else
- _wr_cmd_id stopchan, ,0xCD,,,,,,, 0, 0
+ _wr_cmd_id stopchan, ,ASEQ_OP_CHAN_STOPCHAN,,,,,,, 0, 0
_wr_u8 \channelNum
.endif
.endm
@@ -1923,7 +2101,7 @@ $reladdr\@:
* Computes TR = TR - CIO[CUR_CHANNEL][portNum]
*/
.macro subio portNum
- _wr_cmd_id subio, 0x50,0x50,,,,,,, \portNum, 4
+ _wr_cmd_id subio, ASEQ_OP_SEQ_SUBIO,ASEQ_OP_CHAN_SUBIO,,,,,,, \portNum, 4
.endm
/**
@@ -1940,7 +2118,7 @@ $reladdr\@:
* Load status is made available in SIO[portNum].
*/
.macro ldres portNum, resType, resId
- _wr_cmd_id ldres, 0x60,,,,,,,, \portNum, 4
+ _wr_cmd_id ldres, ASEQ_OP_SEQ_LDRES,,,,,,,, \portNum, 4
_wr_u8 \resType
_wr_u8 \resId
.endm
@@ -1954,9 +2132,9 @@ $reladdr\@:
*/
.macro stio portNum
.if ASEQ_MODE == ASEQ_MODE_CHANNEL
- _wr_cmd_id stio, ,0x70,,,,,,, \portNum, 3
+ _wr_cmd_id stio, ,ASEQ_OP_CHAN_STIO,,,,,,, \portNum, 3
.else
- _wr_cmd_id stio, 0x70,,,,,,,, \portNum, 4
+ _wr_cmd_id stio, ASEQ_OP_SEQ_STIO,,,,,,,, \portNum, 4
.endif
.endm
@@ -1967,7 +2145,7 @@ $reladdr\@:
* depending on current section.
*/
.macro ldio portNum
- _wr_cmd_id ldio, 0x80,0x60,,,,,,, \portNum, 4
+ _wr_cmd_id ldio, ASEQ_OP_SEQ_LDIO,ASEQ_OP_CHAN_LDIO,,,,,,, \portNum, 4
.endm
/**
@@ -1976,7 +2154,7 @@ $reladdr\@:
* Opens the sequence channel for index `channelNum` with data beginning at `label`.
*/
.macro ldchan channelNum, label
- _wr_cmd_id ldchan, 0x90,0x20,,,,,,, \channelNum, 4
+ _wr_cmd_id ldchan, ASEQ_OP_SEQ_LDCHAN,ASEQ_OP_CHAN_LDCHAN,,,,,,, \channelNum, 4
_wr_lbl \label
.endm
@@ -1988,7 +2166,7 @@ $reladdr\@:
* for use in position-independent code.
*/
.macro rldchan channelNum, label
- _wr_cmd_id rldchan, 0xA0,,,,,,,, \channelNum, 4
+ _wr_cmd_id rldchan, ASEQ_OP_SEQ_RLDCHAN,,,,,,,, \channelNum, 4
_wr_16_rel \label
.endm
@@ -1998,7 +2176,7 @@ $reladdr\@:
* Delay for `delay` ticks.
*/
.macro ldelay delay
- _wr_cmd_id ldelay, ,,0xC0,,,,,, 0, 0
+ _wr_cmd_id ldelay, ,,ASEQ_OP_LAYER_LDELAY,,,,,, 0, 0
_var \delay
.endm
@@ -2009,7 +2187,7 @@ $reladdr\@:
* Should never be used when not required for matching purposes.
*/
.macro lldelay delay
- _wr_cmd_id lldelay, ,0xFD,0xC0,,,,,, 0, 0
+ _wr_cmd_id lldelay, ,ASEQ_OP_DELAY,ASEQ_OP_LAYER_LDELAY,,,,,, 0, 0
_var_long \delay
.endm
@@ -2019,7 +2197,7 @@ $reladdr\@:
* Set velocity used by short notes.
*/
.macro shortvel velocity
- _wr_cmd_id shortvel, ,,0xC1,,,,,, 0, 0
+ _wr_cmd_id shortvel, ,,ASEQ_OP_LAYER_SHORTVEL,,,,,, 0, 0
_wr_u8 \velocity
.endm
@@ -2029,7 +2207,7 @@ $reladdr\@:
* Set delay used by short notes.
*/
.macro shortdelay delay
- _wr_cmd_id shortdelay, ,,0xC3,,,,,, 0, 0
+ _wr_cmd_id shortdelay, ,,ASEQ_OP_LAYER_SHORTDELAY,,,,,, 0, 0
_var \delay
.endm
@@ -2039,7 +2217,7 @@ $reladdr\@:
* Enables legato on the current layer.
*/
.macro legato
- _wr_cmd_id legato, ,,0xC4,,,,,, 0, 0
+ _wr_cmd_id legato, ,,ASEQ_OP_LAYER_LEGATO,,,,,, 0, 0
.endm
/**
@@ -2048,7 +2226,7 @@ $reladdr\@:
* Disables legato on the current layer.
*/
.macro nolegato
- _wr_cmd_id nolegato, ,,0xC5,,,,,, 0, 0
+ _wr_cmd_id nolegato, ,,ASEQ_OP_LAYER_NOLEGATO,,,,,, 0, 0
.endm
/**
@@ -2057,7 +2235,7 @@ $reladdr\@:
* The time argument is either a var or a u8 depending on mode
*/
.macro portamento mode, target, time
- _wr_cmd_id portamento, ,,0xC7,,,,,, 0, 0
+ _wr_cmd_id portamento, ,,ASEQ_OP_LAYER_PORTAMENTO,,,,,, 0, 0
_wr_u8 \mode
_wr_u8 \target
.if (\mode & 0x80) != 0
@@ -2073,7 +2251,7 @@ $reladdr\@:
* Disables portamento on the current layer.
*/
.macro noportamento
- _wr_cmd_id noportamento, ,,0xC8,,,,,, 0, 0
+ _wr_cmd_id noportamento, ,,ASEQ_OP_LAYER_NOPORTAMENTO,,,,,, 0, 0
.endm
/**
@@ -2082,7 +2260,7 @@ $reladdr\@:
* Sets gate time for short notes.
*/
.macro shortgate gateTime
- _wr_cmd_id shortgate, ,,0xC9,,,,,, 0, 0
+ _wr_cmd_id shortgate, ,,ASEQ_OP_LAYER_SHORTGATE,,,,,, 0, 0
_wr_u8 \gateTime
.endm
@@ -2094,7 +2272,7 @@ $reladdr\@:
.macro notepan pan
/* pan can only take values in 0..127 */
_check_arg_bitwidth_u \pan, 7
- _wr_cmd_id notepan, ,,0xCA,,,,,, 0, 0
+ _wr_cmd_id notepan, ,,ASEQ_OP_LAYER_NOTEPAN,,,,,, 0, 0
_wr_u8 \pan
.endm
@@ -2105,7 +2283,7 @@ $reladdr\@:
* use pan set in the layer.
*/
.macro nodrumpan
- _wr_cmd_id nodrumpan, ,,0xCC,,,,,, 0, 0
+ _wr_cmd_id nodrumpan, ,,ASEQ_OP_LAYER_NODRUMPAN,,,,,, 0, 0
.endm
/**
@@ -2113,7 +2291,6 @@ $reladdr\@:
*
* TODO DESCRIPTION
*/
-#define STEREO_OPCODE 0xCD
.macro stereo type, strongR, strongL, strongRvrbR, strongRvrbL
_check_arg_bitwidth_u \type, 2
_check_arg_bitwidth_u \strongR, 1
@@ -2121,7 +2298,7 @@ $reladdr\@:
_check_arg_bitwidth_u \strongRvrbR, 1
_check_arg_bitwidth_u \strongRvrbL, 1
- _wr_cmd_id stereo, ,,STEREO_OPCODE,,,,,, 0, 0
+ _wr_cmd_id stereo, ,,ASEQ_OP_LAYER_STEREO,,,,,, 0, 0
_wr_u8 (\type << 4) | (\strongR << 3) | (\strongL << 2) | (\strongRvrbR << 1) | (\strongRvrbL << 0)
.endm
@@ -2131,7 +2308,7 @@ $reladdr\@:
* Sets the velocity used in short notes by reading from SHORTVELTBL[velocity]
*/
.macro ldshortvel velocity
- _wr_cmd_id ldshortvel, ,,0xD0,,,,,, \velocity, 4
+ _wr_cmd_id ldshortvel, ,,ASEQ_OP_LAYER_LDSHORTVEL,,,,,, \velocity, 4
.endm
/**
@@ -2140,7 +2317,7 @@ $reladdr\@:
* Sets the gate time used in short notes by reading from SHORTGATETBL[gateTime]
*/
.macro ldshortgate gateTime
- _wr_cmd_id ldshortgate, ,,0xE0,,,,,, \gateTime, 4
+ _wr_cmd_id ldshortgate, ,,ASEQ_OP_LAYER_LDSHORTGATE,,,,,, \gateTime, 4
.endm
#if (MML_VERSION == MML_VERSION_MM)
@@ -2151,7 +2328,7 @@ $reladdr\@:
* TODO DESCRIPTION
*/
.macro unk_F0 arg
- _wr_cmd_id unk_F0, ,,0xF0,,,,,, 0, 0
+ _wr_cmd_id unk_F0, ,,ASEQ_OP_LAYER_F0,,,,,, 0, 0
_wr_s16 \arg
.endm
@@ -2160,9 +2337,8 @@ $reladdr\@:
*
* TODO DESCRIPTION
*/
- #define SURROUNDEFFECT_OPCODE 0xF1
.macro surroundeffect arg
- _wr_cmd_id surroundeffect, ,,SURROUNDEFFECT_OPCODE,,,,,, 0, 0
+ _wr_cmd_id surroundeffect, ,,ASEQ_OP_LAYER_F1,,,,,, 0, 0
_wr_u8 \arg
.endm
@@ -2181,9 +2357,8 @@ $reladdr\@:
*
* This instruction must only be used when long notes are enabled with the noshort instruction.
*/
-#define NOTEDVG_OPCODE 0x00
.macro notedvg pitch, delay, velocity, gateTime
- _wr_cmd_id notedvg, ,,0x00,,,,,, \pitch, 6
+ _wr_cmd_id notedvg, ,,ASEQ_OP_LAYER_NOTEDVG,,,,,, \pitch, 6
_var \delay
_wr_u8 \velocity
_wr_u8 \gateTime
@@ -2196,16 +2371,15 @@ $reladdr\@:
*
* This instruction must only be used when long notes are enabled with the noshort instruction.
*/
-#define NOTEDV_OPCODE 0x40
.macro notedv pitch, delay, velocity
- _wr_cmd_id notedv, ,,NOTEDV_OPCODE,,,,,, \pitch, 6
+ _wr_cmd_id notedv, ,,ASEQ_OP_LAYER_NOTEDV,,,,,, \pitch, 6
_var \delay
_wr_u8 \velocity
.endm
/* Workaround for bugs in vanilla sequences, force long encoding for delay. This should not typically be used. */
.macro noteldv pitch, delay, velocity
- _wr_cmd_id noteldv, ,,0x40,,,,,, \pitch, 6
+ _wr_cmd_id noteldv, ,,ASEQ_OP_LAYER_NOTEDV,,,,,, \pitch, 6
_var_long \delay
_wr_u8 \velocity
.endm
@@ -2218,7 +2392,7 @@ $reladdr\@:
* This instruction must only be used when long notes are enabled with the noshort instruction.
*/
.macro notevg pitch, velocity, gateTime
- _wr_cmd_id notevg, ,,0x80,,,,,, \pitch, 6
+ _wr_cmd_id notevg, ,,ASEQ_OP_LAYER_NOTEVG,,,,,, \pitch, 6
_wr_u8 \velocity
_wr_u8 \gateTime
.endm
@@ -2232,7 +2406,7 @@ $reladdr\@:
* This instruction must only be used when short notes are enabled with the short instruction.
*/
.macro shortdvg pitch, delay
- _wr_cmd_id shortdvg, ,,0x00,,,,,, \pitch, 6
+ _wr_cmd_id shortdvg, ,,ASEQ_OP_LAYER_NOTEDVG,,,,,, \pitch, 6
_var \delay
.endm
@@ -2245,7 +2419,7 @@ $reladdr\@:
* This instruction must only be used when short notes are enabled with the short instruction.
*/
.macro shortdv pitch
- _wr_cmd_id shortdv, ,,0x40,,,,,, \pitch, 6
+ _wr_cmd_id shortdv, ,,ASEQ_OP_LAYER_NOTEDV,,,,,, \pitch, 6
.endm
/**
@@ -2257,7 +2431,7 @@ $reladdr\@:
* This instruction must only be used when short notes are enabled with the short instruction.
*/
.macro shortvg pitch
- _wr_cmd_id shortvg, ,,0x80,,,,,, \pitch, 6
+ _wr_cmd_id shortvg, ,,ASEQ_OP_LAYER_NOTEVG,,,,,, \pitch, 6
.endm
/**
diff --git a/include/audio/soundfont_file.h b/include/audio/soundfont_file.h
index 3f320a6e56..9456429774 100644
--- a/include/audio/soundfont_file.h
+++ b/include/audio/soundfont_file.h
@@ -1,7 +1,7 @@
#ifndef SOUNDFONT_FILE_H
#define SOUNDFONT_FILE_H
-#include "libc/stdbool.h"
+#include "stdbool.h"
#include "alignment.h"
#include "attributes.h"
#include "z64audio.h"
diff --git a/include/audiothread_cmd.h b/include/audiothread_cmd.h
index c0576b82b3..c4a3436311 100644
--- a/include/audiothread_cmd.h
+++ b/include/audiothread_cmd.h
@@ -44,7 +44,7 @@ typedef enum AudioThreadCmdOp {
/* 0xE1 */ AUDIOCMD_OP_GLOBAL_SET_SFX_FONT,
/* 0xE2 */ AUDIOCMD_OP_GLOBAL_SET_INSTRUMENT_FONT,
/* 0xE3 */ AUDIOCMD_OP_GLOBAL_POP_PERSISTENT_CACHE,
- /* 0xF0 */ AUDIOCMD_OP_GLOBAL_SET_SOUND_MODE = 0xF0,
+ /* 0xF0 */ AUDIOCMD_OP_GLOBAL_SET_SOUND_OUTPUT_MODE = 0xF0,
/* 0xF1 */ AUDIOCMD_OP_GLOBAL_MUTE,
/* 0xF2 */ AUDIOCMD_OP_GLOBAL_UNMUTE,
/* 0xF3 */ AUDIOCMD_OP_GLOBAL_SYNC_LOAD_INSTRUMENT,
@@ -412,12 +412,12 @@ typedef enum AudioThreadCmdOp {
AudioThread_QueueCmdS32(AUDIO_MK_CMD(AUDIOCMD_OP_GLOBAL_POP_PERSISTENT_CACHE, 0, 0, 0), tableType)
/**
- * Change the sound mode of audio
+ * Change the sound output mode
*
- * @param soundMode (s32) see the `SoundMode` enum
+ * @param soundOutputMode (s32) see the `SoundOutputMode` enum
*/
-#define AUDIOCMD_GLOBAL_SET_SOUND_MODE(soundMode) \
- AudioThread_QueueCmdS32(AUDIO_MK_CMD(AUDIOCMD_OP_GLOBAL_SET_SOUND_MODE, 0, 0, 0), soundMode)
+#define AUDIOCMD_GLOBAL_SET_SOUND_OUTPUT_MODE(soundOutputMode) \
+ AudioThread_QueueCmdS32(AUDIO_MK_CMD(AUDIOCMD_OP_GLOBAL_SET_SOUND_OUTPUT_MODE, 0, 0, 0), soundOutputMode)
/**
* Mute all sequence players
diff --git a/include/avoid_ub.h b/include/avoid_ub.h
new file mode 100644
index 0000000000..4706f50ecf
--- /dev/null
+++ b/include/avoid_ub.h
@@ -0,0 +1,13 @@
+#ifndef AVOID_UB_H
+#define AVOID_UB_H
+
+/**
+ * This macro is used when the return type of a function is incorrect
+ */
+#ifndef AVOID_UB
+#define BAD_RETURN(type) type
+#else
+#define BAD_RETURN(type) void
+#endif
+
+#endif
diff --git a/include/buffers.h b/include/buffers.h
new file mode 100644
index 0000000000..2a690d2730
--- /dev/null
+++ b/include/buffers.h
@@ -0,0 +1,14 @@
+#ifndef BUFFERS_H
+#define BUFFERS_H
+
+#include "gfx.h"
+#include "ultra64.h"
+
+extern u16 gZBuffer[SCREEN_HEIGHT][SCREEN_WIDTH]; // 0x25800 bytes
+extern u64 gGfxSPTaskOutputBuffer[0x3000]; // 0x18000 bytes
+extern u64 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE / sizeof(u64)]; // 0xC00 bytes
+extern u64 gGfxSPTaskStack[SP_DRAM_STACK_SIZE64]; // 0x400 bytes
+extern GfxPool gGfxPools[2]; // 0x24820 bytes
+extern u8 gAudioHeap[0x38000]; // 0x38000 bytes
+
+#endif
diff --git a/include/build.h b/include/build.h
new file mode 100644
index 0000000000..25afaaa811
--- /dev/null
+++ b/include/build.h
@@ -0,0 +1,8 @@
+#ifndef BUILD_H
+#define BUILD_H
+
+extern const char gBuildCreator[];
+extern const char gBuildDate[];
+extern const char gBuildMakeOption[];
+
+#endif
diff --git a/include/carthandle.h b/include/carthandle.h
new file mode 100644
index 0000000000..72d0821e56
--- /dev/null
+++ b/include/carthandle.h
@@ -0,0 +1,8 @@
+#ifndef CARTHANDLE_H
+#define CARTHANDLE_H
+
+#include "ultra64.h"
+
+extern OSPiHandle* gCartHandle;
+
+#endif
diff --git a/include/cic6105.h b/include/cic6105.h
index 43ffcc4f98..c4983db8f5 100644
--- a/include/cic6105.h
+++ b/include/cic6105.h
@@ -3,7 +3,7 @@
#include "ultra64.h"
-extern s32 B_80008EE0;
+extern u32 B_80008EE0;
void func_800014E8(void);
void CIC6105_AddFaultClient(void);
diff --git a/include/color.h b/include/color.h
index 816d38349d..73fa5d63a0 100644
--- a/include/color.h
+++ b/include/color.h
@@ -33,4 +33,6 @@ typedef union Color_RGBA16 {
u16 rgba;
} Color_RGBA16;
+#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0))
+
#endif
diff --git a/include/console_logo_state.h b/include/console_logo_state.h
new file mode 100644
index 0000000000..09b7d66546
--- /dev/null
+++ b/include/console_logo_state.h
@@ -0,0 +1,28 @@
+#ifndef CONSOLE_LOGO_STATE_H
+#define CONSOLE_LOGO_STATE_H
+
+#include "ultra64.h"
+#include "z64game.h"
+#include "z64sram.h"
+#include "z64view.h"
+
+typedef struct ConsoleLogoState {
+ /* 0x0000 */ GameState state;
+ /* 0x00A4 */ u8* staticSegment;
+ /* 0x00A8 */ View view;
+ /* 0x01D0 */ SramContext sramCtx;
+ /* 0x01D4 */ s16 unk_1D4;
+ /* 0x01D6 */ s16 coverAlpha;
+ /* 0x01D8 */ s16 addAlpha;
+ /* 0x01DA */ s16 visibleDuration;
+ /* 0x01DC */ s16 ult;
+ /* 0x01DE */ s16 uls;
+ /* 0x01E0 */ u8 unk_1E0;
+ /* 0x01E1 */ u8 exit;
+ /* 0x01E2 */ char unk_1E2[0x06];
+} ConsoleLogoState; // size = 0x1E8
+
+void ConsoleLogo_Init(GameState* thisx);
+void ConsoleLogo_Destroy(GameState* thisx);
+
+#endif
diff --git a/include/db_camera.h b/include/db_camera.h
new file mode 100644
index 0000000000..81d8515d0b
--- /dev/null
+++ b/include/db_camera.h
@@ -0,0 +1,88 @@
+#ifndef DB_CAMERA_H
+#define DB_CAMERA_H
+
+#include "ultra64.h"
+#include "z64cutscene.h"
+#include "z64math.h"
+
+struct Camera;
+
+typedef struct DebugCamSub {
+ /* 0x0000 */ s16 mode;
+ /* 0x0002 */ s16 nFrames;
+ /* 0x0004 */ s16 nPoints;
+ /* 0x0006 */ s16 unkIdx;
+ /* 0x0008 */ s16 unk_08;
+ /* 0x000A */ s16 unk_0A;
+ /* 0x000C */ s32 unk_0C; // bool: indicates position vs lookAt?
+ /* 0x0010 */ char unk_10[0x14];
+ /* 0x0024 */ CutsceneCameraPoint position[129];
+ /* 0x0834 */ CutsceneCameraPoint lookAt[129];
+ /* 0x1044 */ s16 demoCtrlMenu;
+ /* 0x1046 */ s16 demoCtrlActionIdx; // e (?), s (save), l (load), c (clear)
+ /* 0x1048 */ s16 demoCtrlToggleSwitch;
+ /* 0x104A */ Vec3s unk_104A;
+} DebugCamSub; // size = 0x1050
+
+typedef struct DebugCam {
+ /* 0x00 */ s32 unk_00;
+ /* 0x04 */ Vec3f at;
+ /* 0x10 */ Vec3f eye;
+ /* 0x1C */ Vec3f unk_1C;
+ /* 0x28 */ char unk_28[0xC];
+ /* 0x34 */ s32 unk_34;
+ /* 0x38 */ s32 unk_38;
+ /* 0x3C */ s32 unk_3C; // bool
+ /* 0x40 */ s32 unk_40;
+ /* 0x44 */ s32 unk_44;
+ /* 0x48 */ f32 fov;
+ /* 0x4C */ s16 roll;
+ /* 0x4E */ char unk_4E[0x2];
+ /* 0x50 */ f32 rollDegrees;
+ /* 0x54 */ Vec3f unk_54;
+ /* 0x60 */ Vec3f unk_60;
+ /* 0x6C */ Vec3f unk_6C;
+ /* 0x78 */ s16 unk_78;
+ /* 0x7A */ s16 unk_7A;
+ /* 0x7C */ DebugCamSub sub;
+} DebugCam; // size = 0x10CC
+
+typedef struct DebugCamCut {
+ /* 0x00 */ char letter;
+ /* 0x01 */ u8 unk_01;
+ /* 0x02 */ s16 mode;
+ /* 0x04 */ CutsceneCameraPoint* position;
+ /* 0x08 */ CutsceneCameraPoint* lookAt;
+ /* 0x0C */ s16 nFrames;
+ /* 0x0E */ s16 nPoints;
+} DebugCamCut; // size = 0x10
+
+typedef struct DebugCamAnim {
+ /* 0x00 */ f32 curFrame;
+ /* 0x04 */ f32 unk_04; // frame count?
+ /* 0x08 */ s16 keyframe;
+ /* 0x0A */ s16 unk_0A;
+ /* 0x0C */ s16 unk_0C;
+ /* 0x10 */ Vec3f positionPos; // confusing name
+ /* 0x1C */ Vec3f lookAtPos;
+ /* 0x28 */ f32 roll;
+ /* 0x2C */ f32 fov;
+} DebugCamAnim; // size = 0x30
+
+typedef enum DebugCamTextColor {
+ /* 0 */ DEBUG_CAM_TEXT_YELLOW,
+ /* 1 */ DEBUG_CAM_TEXT_PEACH,
+ /* 2 */ DEBUG_CAM_TEXT_BROWN,
+ /* 3 */ DEBUG_CAM_TEXT_ORANGE,
+ /* 4 */ DEBUG_CAM_TEXT_GOLD,
+ /* 5 */ DEBUG_CAM_TEXT_WHITE,
+ /* 6 */ DEBUG_CAM_TEXT_BLUE,
+ /* 7 */ DEBUG_CAM_TEXT_GREEN
+} DebugCamTextColor;
+
+void DebugCamera_Init(DebugCam* debugCam, struct Camera* cameraPtr);
+void DebugCamera_Enable(DebugCam* debugCam, struct Camera* cam);
+void DebugCamera_Update(DebugCam* debugCam, struct Camera* cam);
+void DebugCamera_Reset(struct Camera* cam, DebugCam* debugCam);
+
+#endif
diff --git a/include/debug_arena.h b/include/debug_arena.h
new file mode 100644
index 0000000000..352a7f6dc6
--- /dev/null
+++ b/include/debug_arena.h
@@ -0,0 +1,38 @@
+#ifndef DEBUG_ARENA_H
+#define DEBUG_ARENA_H
+
+#include "ultra64/ultratypes.h"
+
+void* DebugArena_Malloc(u32 size);
+void* DebugArena_MallocR(u32 size);
+void* DebugArena_Realloc(void* ptr, u32 newSize);
+void DebugArena_Free(void* ptr);
+void* DebugArena_Calloc(u32 num, u32 size);
+void DebugArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
+void DebugArena_Check(void);
+void DebugArena_Init(void* start, u32 size);
+void DebugArena_Cleanup(void);
+s32 DebugArena_IsInitialized(void);
+
+#if DEBUG_FEATURES
+
+#define DEBUG_ARENA_MALLOC(size, file, line) DebugArena_MallocDebug(size, file, line)
+#define DEBUG_ARENA_MALLOC_R(size, file, line) DebugArena_MallocRDebug(size, file, line)
+#define DEBUG_ARENA_FREE(size, file, line) DebugArena_FreeDebug(size, file, line)
+
+void DebugArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
+void* DebugArena_MallocDebug(u32 size, const char* file, int line);
+void* DebugArena_MallocRDebug(u32 size, const char* file, int line);
+void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line);
+void DebugArena_FreeDebug(void* ptr, const char* file, int line);
+void DebugArena_Display(void);
+
+#else
+
+#define DEBUG_ARENA_MALLOC(size, file, line) DebugArena_Malloc(size)
+#define DEBUG_ARENA_MALLOC_R(size, file, line) DebugArena_MallocR(size)
+#define DEBUG_ARENA_FREE(size, file, line) DebugArena_Free(size)
+
+#endif
+
+#endif
diff --git a/include/face_change.h b/include/face_change.h
index 5a0c8d8566..b612641813 100644
--- a/include/face_change.h
+++ b/include/face_change.h
@@ -1,6 +1,8 @@
#ifndef FACE_CHANGE_H
#define FACE_CHANGE_H
+#include "ultra64.h"
+
typedef struct FaceChange {
/* 0x00 */ s16 face;
/* 0x02 */ s16 timer;
diff --git a/include/fault.h b/include/fault.h
index a95ae59064..af895927d0 100644
--- a/include/fault.h
+++ b/include/fault.h
@@ -1,11 +1,12 @@
#ifndef FAULT_H
#define FAULT_H
-#include "ultra64.h"
+#include "libu64/debug.h"
+#include "libu64/pad.h"
#include "attributes.h"
-#include "padmgr.h"
+#include "ultra64.h"
-#if PLATFORM_GC
+#if !PLATFORM_N64
// These are the same as the 3-bit ansi color codes
#define FAULT_COLOR_BLACK 0
#define FAULT_COLOR_RED 1
@@ -33,7 +34,7 @@ typedef struct FaultClient {
/* 0x0C */ void* arg1;
} FaultClient; // size = 0x10
-#if PLATFORM_GC
+#if !PLATFORM_N64
typedef struct FaultAddrConvClient {
/* 0x00 */ struct FaultAddrConvClient* next;
/* 0x04 */ void* callback;
@@ -50,6 +51,12 @@ void Fault_Init(void);
NORETURN void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2);
NORETURN void Fault_AddHungupAndCrash(const char* file, int line);
+#if PLATFORM_N64 || DEBUG_FEATURES
+#define HUNGUP_AND_CRASH(file, line) Fault_AddHungupAndCrash(file, line)
+#else
+#define HUNGUP_AND_CRASH(file, line) LogUtils_HungupThread(file, line)
+#endif
+
// Client Registration
void Fault_AddClient(FaultClient* client, void* callback, void* arg0, void* arg1);
@@ -78,7 +85,7 @@ void func_800AE1F8(void);
#define Fault_SetFontColor(color) (void)0
#define Fault_SetCharPad(padW, padH) (void)0
-#elif PLATFORM_GC
+#else
void Fault_InitDrawer(void);
void Fault_SetForeColor(u16 color);
@@ -98,7 +105,7 @@ extern volatile OSThread* gFaultFaultedThread;
#define FAULT_MSG_ID gFaultMsgId
-#elif PLATFORM_GC
+#else
typedef struct FaultMgr {
/* 0x000 */ OSThread thread;
diff --git a/include/file_select_state.h b/include/file_select_state.h
new file mode 100644
index 0000000000..0a831caa0f
--- /dev/null
+++ b/include/file_select_state.h
@@ -0,0 +1,97 @@
+#ifndef FILE_SELECT_STATE_H
+#define FILE_SELECT_STATE_H
+
+#include "ultra64.h"
+#include "z64environment.h"
+#include "z64game.h"
+#include "z64message.h"
+#include "z64skybox.h"
+#include "z64sram.h"
+#include "z64view.h"
+
+typedef struct FileSelectState {
+ /* 0x00000 */ GameState state;
+ /* 0x000A4 */ Vtx* windowVtx;
+ /* 0x000A8 */ u8* staticSegment;
+ /* 0x000AC */ u8* parameterSegment;
+#if OOT_PAL
+ /* 0x000B0 */ u8* objectMagSegment;
+#endif
+ /* 0x000B8 */ View view;
+ /* 0x001E0 */ SramContext sramCtx;
+ /* 0x001E4 */ char unk_1E4[0x4];
+ /* 0x001E8 */ SkyboxContext skyboxCtx;
+ /* 0x00348 */ MessageContext msgCtx;
+ /* 0x0E760 */ Font font;
+ /* 0x1C8E8 */ EnvironmentContext envCtx;
+ /* 0x1C9E4 */ char unk_1C9E4[0x4];
+ /* 0x1C9E8 */ Vtx* windowContentVtx;
+ /* 0x1C9EC */ Vtx* keyboardVtx;
+ /* 0x1C9F0 */ Vtx* nameEntryVtx;
+ /* 0x1C9F4 */ u8 n64ddFlag;
+ /* 0x1C9F6 */ u16 deaths[3];
+ /* 0x1C9FC */ u8 fileNames[3][8];
+ /* 0x1CA14 */ u16 healthCapacities[3];
+ /* 0x1CA1C */ u32 questItems[3];
+ /* 0x1CA28 */ s16 n64ddFlags[3];
+ /* 0x1CA2E */ s8 defense[3];
+#if OOT_PAL
+ /* 0x1CA32 */ u16 health[3];
+#endif
+ /* 0x1CA38 */ s16 buttonIndex;
+ /* 0x1CA3A */ s16 confirmButtonIndex; // 0: yes, 1: quit
+ /* 0x1CA3C */ s16 menuMode;
+ /* 0x1CA3E */ s16 configMode;
+ /* 0x1CA40 */ s16 prevConfigMode;
+ /* 0x1CA42 */ s16 nextConfigMode;
+ /* 0x1CA44 */ s16 selectMode;
+ /* 0x1CA46 */ s16 selectedFileIndex;
+ /* 0x1CA48 */ char unk_1CA48[0x2];
+ /* 0x1CA4A */ s16 fileNamesY[3];
+ /* 0x1CA50 */ s16 actionTimer;
+ /* 0x1CA52 */ s16 buttonYOffsets[6];
+ /* 0x1CA5E */ s16 copyDestFileIndex;
+ /* 0x1CA60 */ s16 warningLabel;
+ /* 0x1CA62 */ s16 warningButtonIndex;
+ /* 0x1CA64 */ s16 titleLabel;
+ /* 0x1CA66 */ s16 nextTitleLabel;
+ /* 0x1CA68 */ s16 windowColor[3];
+ /* 0x1CA6E */ s16 titleAlpha[2];
+ /* 0x1CA72 */ s16 windowAlpha;
+ /* 0x1CA74 */ s16 fileButtonAlpha[3];
+ /* 0x1CA7A */ s16 nameBoxAlpha[3];
+ /* 0x1CA80 */ s16 nameAlpha[3];
+ /* 0x1CA86 */ s16 connectorAlpha[3];
+ /* 0x1CA8C */ s16 fileInfoAlpha[3];
+ /* 0x1CA92 */ s16 actionButtonAlpha[4]; // also contains the alphas for the confirm buttons
+ /* 0x1CA9A */ s16 optionButtonAlpha;
+ /* 0x1CA9C */ s16 nameEntryBoxAlpha;
+ /* 0x1CA9E */ s16 controlsAlpha;
+ /* 0x1CAA0 */ s16 emptyFileTextAlpha;
+ /* 0x1CAA2 */ s16 highlightColor[4];
+ /* 0x1CAAA */ s16 highlightPulseDir; // 0 fade out, 1 fade in
+ /* 0x1CAAC */ s16 unk_1CAAC; // initialized but never used
+ /* 0x1CAAE */ s16 confirmButtonTexIndices[2];
+ /* 0x1CAB2 */ s16 inputTimerX;
+ /* 0x1CAB4 */ s16 inputTimerY;
+ /* 0x1CAB6 */ s16 stickXDir;
+ /* 0x1CAB8 */ s16 stickYDir;
+ /* 0x1CABA */ s16 stickAdjX;
+ /* 0x1CABC */ s16 stickAdjY;
+ /* 0x1CABE */ s16 nameEntryBoxPosX;
+ /* 0x1CAC0 */ s16 windowPosX;
+ /* 0x1CAC4 */ f32 windowRot;
+ /* 0x1CAC8 */ s16 kbdButton; // only for buttons, not characters
+ /* 0x1CACA */ s16 charPage; // 0: hiragana, 1: katakana, 2: alphabet
+ /* 0x1CACC */ s16 charBgAlpha; // square shape the letter sits in
+ /* 0x1CACE */ s16 charIndex; // 0 - 64, top left to bottom right
+ /* 0x1CAD0 */ s16 kbdX; // (0, 0) is top left character
+ /* 0x1CAD2 */ s16 kbdY;
+ /* 0x1CAD4 */ s16 newFileNameCharCount;
+ /* 0x1CAD6 */ s16 unk_1CAD6[5];
+} FileSelectState; // size = 0x1CAE0
+
+void FileSelect_Init(GameState* thisx);
+void FileSelect_Destroy(GameState* thisx);
+
+#endif
diff --git a/include/flag_set.h b/include/flag_set.h
new file mode 100644
index 0000000000..df9262ac7f
--- /dev/null
+++ b/include/flag_set.h
@@ -0,0 +1,8 @@
+#ifndef FLAG_SET_H
+#define FLAG_SET_H
+
+struct PlayState;
+
+void FlagSet_Update(struct PlayState* play);
+
+#endif
diff --git a/include/functions.h b/include/functions.h
deleted file mode 100644
index 903af90b6f..0000000000
--- a/include/functions.h
+++ /dev/null
@@ -1,1484 +0,0 @@
-#ifndef FUNCTIONS_H
-#define FUNCTIONS_H
-
-#include "z64.h"
-#include "macros.h"
-
-void bootproc(void);
-void Main_ThreadEntry(void* arg);
-void Idle_ThreadEntry(void* arg);
-void ViConfig_UpdateVi(u32 black);
-void ViConfig_UpdateBlack(void);
-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);
-void Locale_Init(void);
-void Locale_ResetRegion(void);
-#if OOT_DEBUG
-void isPrintfInit(void);
-#endif
-void rmonPrintf(const char* fmt, ...);
-#if OOT_DEBUG
-void* is_proutSyncPrintf(void* arg, const char* str, size_t count);
-NORETURN void func_80002384(const char* exp, const char* file, int line);
-#endif
-OSPiHandle* osDriveRomInit(void);
-void Mio0_Decompress(u8* src, u8* dst);
-#if OOT_DEBUG
-void LogUtils_LogHexDump(void* ptr, s32 size0);
-void LogUtils_CheckNullPointer(const char* exp, void* ptr, const char* file, int line);
-void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, int line);
-void LogUtils_LogThreadId(const char* name, int line);
-#endif
-void LogUtils_HungupThread(const char* name, int line);
-void LogUtils_ResetHungup(void);
-void __osPiCreateAccessQueue(void);
-void __osPiGetAccess(void);
-void __osPiRelAccess(void);
-s32 osSendMesg(OSMesgQueue* mq, OSMesg msg, s32 flag);
-void osStopThread(OSThread* thread);
-void osViExtendVStart(u32 value);
-s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag);
-#if PLATFORM_N64
-void osInitialize(void);
-#else
-#define osInitialize() \
-{ \
- __osInitialize_common(); \
- __osInitialize_autodetect(); \
-}
-#endif
-void __osInitialize_common(void);
-void __osInitialize_autodetect(void);
-void __osEnqueueAndYield(OSThread**);
-void __osEnqueueThread(OSThread**, OSThread*);
-OSThread* __osPopThread(OSThread**);
-void __osDispatchThread(void);
-void __osCleanupThread(void);
-void __osDequeueThread(OSThread** queue, OSThread* thread);
-void osDestroyThread(OSThread* thread);
-void osCreateThread(OSThread* thread, OSId id, void (*entry)(void*), void* arg, void* sp, OSPri pri);
-void __osSetSR(u32);
-u32 __osGetSR(void);
-void osWritebackDCache(void* vaddr, s32 nbytes);
-void* osViGetNextFramebuffer(void);
-void osCreatePiManager(OSPri pri, OSMesgQueue* cmdQueue, OSMesg* cmdBuf, s32 cmdMsgCnt);
-void __osDevMgrMain(void* arg);
-s32 __osPiRawStartDma(s32 dir, u32 cartAddr, void* dramAddr, size_t size);
-u32 osVirtualToPhysical(void* vaddr);
-void osViBlack(u8 active);
-s32 __osSiRawReadIo(void* devAddr, u32* dst);
-OSId osGetThreadId(OSThread* thread);
-void osViSetMode(OSViMode* mode);
-u32 __osProbeTLB(void*);
-u32 osGetMemSize(void);
-void osSetEventMesg(OSEvent e, OSMesgQueue* mq, OSMesg msg);
-void osUnmapTLBAll(void);
-s32 osEPiStartDma(OSPiHandle* handle, OSIoMesg* mb, s32 direction);
-void osInvalICache(void* vaddr, s32 nbytes);
-void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 count);
-void osInvalDCache(void* vaddr, s32 nbytes);
-s32 __osSiDeviceBusy(void);
-s32 osJamMesg(OSMesgQueue* mq, OSMesg msg, s32 flag);
-void osSetThreadPri(OSThread* thread, OSPri pri);
-OSPri osGetThreadPri(OSThread* thread);
-s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
-void osViSwapBuffer(void* frameBufPtr);
-s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size);
-OSTime osGetTime(void);
-void osSetTime(OSTime time);
-void __osTimerServicesInit(void);
-void __osTimerInterrupt(void);
-void __osSetTimerIntr(OSTime time);
-OSTime __osInsertTimer(OSTimer* timer);
-u32 osGetCount(void);
-void __osSetCompare(u32);
-s32 __osDisableInt(void);
-void __osRestoreInt(s32);
-void __osViInit(void);
-void __osViSwapContext(void);
-OSMesgQueue* osPiGetCmdQueue(void);
-s32 osEPiReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
-void osViSetSpecialFeatures(u32 func);
-OSPiHandle* osCartRomInit(void);
-void __osSetFpcCsr(u32);
-u32 __osGetFpcCsr(void);
-s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
-void osMapTLBRdb(void);
-void osYieldThread(void);
-u32 __osGetCause(void);
-s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
-s32 __osSiRawWriteIo(void* devAddr, u32 val);
-void osCreateViManager(OSPri pri);
-OSViContext* __osViGetCurrentContext(void);
-void osStartThread(OSThread* thread);
-void osViSetYScale(f32 scale);
-void osViSetXScale(f32 value);
-void __osSetWatchLo(u32);
-
-EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params);
-EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params);
-void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnPos, s16 params);
-void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2);
-void EffectBlure_AddSpace(EffectBlure* this);
-void EffectBlure_Init1(void* thisx, void* initParamsx);
-void EffectBlure_Init2(void* thisx, void* initParamsx);
-void EffectBlure_Destroy(void* thisx);
-s32 EffectBlure_Update(void* thisx);
-void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx);
-void EffectShieldParticle_Init(void* thisx, void* initParamsx);
-void EffectShieldParticle_Destroy(void* thisx);
-s32 EffectShieldParticle_Update(void* thisx);
-void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx);
-void EffectSpark_Init(void* thisx, void* initParamsx);
-void EffectSpark_Destroy(void* thisx);
-s32 EffectSpark_Update(void* thisx);
-void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx);
-void func_80026230(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
-void func_80026400(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
-void func_80026608(PlayState* play);
-void func_80026690(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
-void func_80026860(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
-void func_80026A6C(PlayState* play);
-PlayState* Effect_GetPlayState(void);
-void* Effect_GetByIndex(s32 index);
-void Effect_InitContext(PlayState* play);
-void Effect_Add(PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void* initParams);
-void Effect_DrawAll(GraphicsContext* gfxCtx);
-void Effect_UpdateAll(PlayState* play);
-void Effect_Delete(PlayState* play, s32 index);
-void Effect_DeleteAll(PlayState* play);
-void EffectSs_InitInfo(PlayState* play, s32 tableSize);
-void EffectSs_ClearAll(PlayState* play);
-void EffectSs_Delete(EffectSs* effectSs);
-void EffectSs_Reset(EffectSs* effectSs);
-void EffectSs_Insert(PlayState* play, EffectSs* effectSs);
-void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams);
-void EffectSs_UpdateAll(PlayState* play);
-void EffectSs_DrawAll(PlayState* play);
-s16 EffectSs_LerpInv(s16 a, s16 b, s32 weightInv);
-s16 EffectSs_LerpS16(s16 a, s16 b, f32 weight);
-u8 EffectSs_LerpU8(u8 a, u8 b, f32 weight);
-void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture);
-void EffectSsDust_Spawn(PlayState* play, u16 drawFlags, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life,
- u8 updateMode);
-void func_8002829C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
- Color_RGBA8* envColor, s16 scale, s16 scaleStep);
-void func_80028304(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
- Color_RGBA8* envColor, s16 scale, s16 scaleStep);
-void func_8002836C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
- Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
-void func_800283D4(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
- Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
-void func_8002843C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
- Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
-void func_800284A4(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
- Color_RGBA8* envColor, s16 scale, s16 scaleStep);
-void func_80028510(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
- Color_RGBA8* envColor, s16 scale, s16 scaleStep);
-void func_8002857C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
-void func_800285EC(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
-void func_8002865C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
-void func_800286CC(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
-void func_8002873C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
- s16 life);
-void func_800287AC(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
- s16 life);
-void func_8002881C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
- Color_RGBA8* envColor);
-void func_80028858(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
- Color_RGBA8* envColor);
-void func_80028990(PlayState* play, f32 randScale, Vec3f* srcPos);
-void func_80028A54(PlayState* play, f32 randScale, Vec3f* srcPos);
-void EffectSsKiraKira_SpawnSmallYellow(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
-void EffectSsKiraKira_SpawnSmall(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* primColor, Color_RGBA8* envColor);
-void EffectSsKiraKira_SpawnDispersed(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
-void EffectSsKiraKira_SpawnFocused(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
-void EffectSsBomb_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
-void EffectSsBomb2_SpawnFade(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
-void EffectSsBomb2_SpawnLayered(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
- s16 scaleStep);
-void EffectSsBlast_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* innerColor,
- Color_RGBA8* outerColor, s16 scale, s16 scaleStep, s16 scaleStepDecay, s16 life);
-void EffectSsBlast_SpawnWhiteShockwaveSetScale(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
- s16 scaleStep, s16 life);
-void EffectSsBlast_SpawnShockwaveSetColor(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* innerColor, Color_RGBA8* outerColor, s16 life);
-void EffectSsBlast_SpawnWhiteShockwave(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
-void EffectSsGSpk_SpawnAccel(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
-void EffectSsGSpk_SpawnNoAccel(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
-void EffectSsGSpk_SpawnFuse(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
-void EffectSsGSpk_SpawnRandColor(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- s16 scale, s16 scaleStep);
-void EffectSsGSpk_SpawnSmall(PlayState* play, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* primColor, Color_RGBA8* envColor);
-void EffectSsDFire_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
- s16 alpha, s16 fadeDelay, s32 life);
-void EffectSsDFire_SpawnFixedScale(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 alpha,
- s16 fadeDelay);
-void EffectSsBubble_Spawn(PlayState* play, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale,
- f32 scale);
-void EffectSsGRipple_Spawn(PlayState* play, Vec3f* pos, s16 radius, s16 radiusMax, s16 life);
-void EffectSsGSplash_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
- s16 type, s16 scale);
-void EffectSsGMagma_Spawn(PlayState* play, Vec3f* pos);
-void EffectSsGFire_Spawn(PlayState* play, Vec3f* pos);
-void EffectSsLightning_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
- s16 scale, s16 yaw, s16 life, s16 numBolts);
-void EffectSsDtBubble_SpawnColorProfile(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
- s16 life, s16 colorProfile, s16 randXZ);
-void EffectSsDtBubble_SpawnCustomColor(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
-void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale,
- s16 objId, s16 life, Gfx* dList);
-void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 unused, s16 scale,
- s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
-void EffectSsStick_Spawn(PlayState* play, Vec3f* pos, s16 yaw);
-void EffectSsSibuki_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 moveDelay,
- s16 direction, s16 scale);
-void EffectSsSibuki_SpawnBurst(PlayState* play, Vec3f* pos);
-void EffectSsSibuki2_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
-void EffectSsGMagma2_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
- s16 updateRate, s16 drawMode, s16 scale);
-void EffectSsStone1_Spawn(PlayState* play, Vec3f* pos, s32 arg2);
-void EffectSsHitMark_Spawn(PlayState* play, s32 type, s16 scale, Vec3f* pos);
-void EffectSsHitMark_SpawnFixedScale(PlayState* play, s32 type, Vec3f* pos);
-void EffectSsHitMark_SpawnCustomScale(PlayState* play, s32 type, s16 scale, Vec3f* pos);
-void EffectSsFhgFlash_SpawnLightBall(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
- u8 param);
-void EffectSsFhgFlash_SpawnShock(PlayState* play, Actor* actor, Vec3f* pos, s16 scale, u8 param);
-void EffectSsKFire_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scaleMax, u8 type);
-void EffectSsSolderSrchBall_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused,
- s16* linkDetected);
-void EffectSsKakera_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5,
- s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx,
- s16 objId, Gfx* dList);
-void EffectSsIcePiece_Spawn(PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, s32 life);
-void EffectSsIcePiece_SpawnBurst(PlayState* play, Vec3f* refPos, f32 scale);
-void EffectSsEnIce_SpawnFlyingVec3f(PlayState* play, Actor* actor, Vec3f* pos, s16 primR, s16 primG, s16 primB,
- s16 primA, s16 envR, s16 envG, s16 envB, f32 scale);
-void EffectSsEnIce_SpawnFlyingVec3s(PlayState* play, Actor* actor, Vec3s* pos, s16 primR, s16 primG, s16 primB,
- s16 primA, s16 envR, s16 envG, s16 envB, f32 scale);
-void EffectSsEnIce_Spawn(PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life);
-void EffectSsFireTail_Spawn(PlayState* play, Actor* actor, Vec3f* pos, f32 scale, Vec3f* arg4, s16 arg5,
- Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 bodyPart, s32 life);
-void EffectSsFireTail_SpawnFlame(PlayState* play, Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart,
- f32 colorIntensity);
-void EffectSsFireTail_SpawnFlameOnPlayer(PlayState* play, f32 scale, s16 bodyPart, f32 colorIntensity);
-void EffectSsEnFire_SpawnVec3f(PlayState* play, Actor* actor, Vec3f* pos, s16 scale, s16 arg4, s16 flags, s16 bodyPart);
-void EffectSsEnFire_SpawnVec3s(PlayState* play, Actor* actor, Vec3s* pos, s16 scale, s16 arg4, s16 flags, s16 bodyPart);
-void EffectSsExtra_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIdx);
-void EffectSsFCircle_Spawn(PlayState* play, Actor* actor, Vec3f* pos, s16 radius, s16 height);
-void EffectSsDeadDb_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
- s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, s16 unused,
- s32 arg14, s16 playSfx);
-void EffectSsDeadDd_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
- s16 primR, s16 primG, s16 primB, s16 alpha, s16 envR, s16 envG, s16 envB, s16 alphaStep,
- s32 life);
-void EffectSsDeadDd_SpawnRandYellow(PlayState* play, Vec3f* pos, s16 scale, s16 scaleStep, f32 randPosScale,
- s32 randIter, s32 life);
-void EffectSsDeadDs_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
- s16 alpha, s32 life);
-void EffectSsDeadDs_SpawnStationary(PlayState* play, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha,
- s32 life);
-void EffectSsDeadSound_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, u16 sfxId,
- s16 lowerPriority, s16 repeatMode, s32 life);
-void EffectSsDeadSound_SpawnStationary(PlayState* play, Vec3f* pos, u16 sfxId, s16 lowerPriority,
- s16 repeatMode, s32 life);
-void EffectSsIceSmoke_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
-void FlagSet_Update(PlayState* play);
-void Overlay_LoadGameState(GameStateOverlay* overlayEntry);
-void Overlay_FreeGameState(GameStateOverlay* overlayEntry);
-void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc shadowDraw, f32 shadowScale);
-void ActorShadow_DrawCircle(Actor* actor, Lights* lights, PlayState* play);
-void ActorShadow_DrawWhiteCircle(Actor* actor, Lights* lights, PlayState* play);
-void ActorShadow_DrawHorse(Actor* actor, Lights* lights, PlayState* play);
-void ActorShadow_DrawFeet(Actor* actor, Lights* lights, PlayState* play);
-void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* leftFootPos, s32 rightFootIndex,
- Vec3f* rightFootPos);
-void Actor_ProjectPos(PlayState* play, Vec3f* src, Vec3f* xyzDest, f32* cappedInvWDest);
-void Attention_Draw(Attention* attention, PlayState* play);
-s32 Flags_GetSwitch(PlayState* play, s32 flag);
-void Flags_SetSwitch(PlayState* play, s32 flag);
-void Flags_UnsetSwitch(PlayState* play, s32 flag);
-s32 Flags_GetUnknown(PlayState* play, s32 flag);
-void Flags_SetUnknown(PlayState* play, s32 flag);
-void Flags_UnsetUnknown(PlayState* play, s32 flag);
-s32 Flags_GetTreasure(PlayState* play, s32 flag);
-void Flags_SetTreasure(PlayState* play, s32 flag);
-s32 Flags_GetClear(PlayState* play, s32 flag);
-void Flags_SetClear(PlayState* play, s32 flag);
-void Flags_UnsetClear(PlayState* play, s32 flag);
-s32 Flags_GetTempClear(PlayState* play, s32 flag);
-void Flags_SetTempClear(PlayState* play, s32 flag);
-void Flags_UnsetTempClear(PlayState* play, s32 flag);
-s32 Flags_GetCollectible(PlayState* play, s32 flag);
-void Flags_SetCollectible(PlayState* play, s32 flag);
-void TitleCard_InitBossName(PlayState* play, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
- u8 height);
-void TitleCard_InitPlaceName(PlayState* play, TitleCardContext* titleCtx, void* texture, s32 x, s32 y,
- s32 width, s32 height, s32 delay);
-s32 TitleCard_Clear(PlayState* play, TitleCardContext* titleCtx);
-void Actor_Kill(Actor* actor);
-void Actor_SetFocus(Actor* actor, f32 yOffset);
-void Actor_SetScale(Actor* actor, f32 scale);
-void Actor_SetObjectDependency(PlayState* play, Actor* actor);
-void Actor_UpdatePos(Actor* actor);
-void Actor_UpdateVelocityXZGravity(Actor* actor);
-void Actor_MoveXZGravity(Actor* actor);
-void Actor_UpdateVelocityXYZ(Actor* actor);
-void Actor_MoveXYZ(Actor* actor);
-void Actor_SetProjectileSpeed(Actor* actor, f32 speedXYZ);
-s16 Actor_WorldYawTowardActor(Actor* origin, Actor* target);
-s16 Actor_FocusYawTowardActor(Actor* origin, Actor* target);
-s16 Actor_WorldYawTowardPoint(Actor* origin, Vec3f* point);
-f32 Actor_WorldDistXYZToActor(Actor* actorA, Actor* actorB);
-f32 Actor_WorldDistXYZToPoint(Actor* actor, Vec3f* refPoint);
-s16 Actor_WorldPitchTowardActor(Actor* actorA, Actor* actorB);
-s16 Actor_WorldPitchTowardPoint(Actor* actor, Vec3f* refPoint);
-f32 Actor_WorldDistXZToActor(Actor* actorA, Actor* actorB);
-f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint);
-void Actor_WorldToActorCoords(Actor* actor, Vec3f* dest, Vec3f* pos);
-f32 Actor_HeightDiff(Actor* actorA, Actor* actorB);
-f32 Player_GetHeight(Player* player);
-f32 func_8002DCE4(Player* player);
-int func_8002DD6C(Player* player);
-int func_8002DD78(Player* player);
-s32 func_8002DDE4(PlayState* play);
-s32 func_8002DDF4(PlayState* play);
-void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB);
-void func_8002DE74(PlayState* play, Player* player);
-void Actor_MountHorse(PlayState* play, Player* player, Actor* horse);
-int func_8002DEEC(Player* player);
-void func_8002DF18(PlayState* play, Player* player);
-s32 Player_SetCsAction(PlayState* play, Actor* csActor, u8 csAction);
-s32 Player_SetCsActionWithHaltedActors(PlayState* play, Actor* csActor, u8 csAction);
-void func_8002DF90(DynaPolyActor* dynaActor);
-void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2);
-s32 Player_IsFacingActor(Actor* actor, s16 maxAngle, PlayState* play);
-s32 Actor_ActorBIsFacingActorA(Actor* actorA, Actor* actorB, s16 maxAngle);
-s32 Actor_IsFacingPlayer(Actor* actor, s16 maxAngle);
-s32 Actor_ActorAIsFacingActorB(Actor* actorA, Actor* actorB, s16 maxAngle);
-s32 Actor_IsFacingAndNearPlayer(Actor* actor, f32 range, s16 maxAngle);
-s32 Actor_ActorAIsFacingAndNearActorB(Actor* actorA, Actor* actorB, f32 range, s16 maxAngle);
-void Actor_UpdateBgCheckInfo(PlayState* play, Actor* actor, f32 wallCheckHeight, f32 wallCheckRadius,
- f32 ceilingCheckHeight, s32 flags);
-Hilite* func_8002EABC(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
-Hilite* func_8002EB44(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext* gfxCtx);
-void func_8002EBCC(Actor* actor, PlayState* play, s32 flag);
-void func_8002ED80(Actor* actor, PlayState* play, s32 flag);
-PosRot Actor_GetFocus(Actor* actor);
-PosRot Actor_GetWorld(Actor* actor);
-PosRot Actor_GetWorldPosShapeRot(Actor* actor);
-s32 Attention_ShouldReleaseLockOn(Actor* actor, Player* player, s32 ignoreLeash);
-s32 Actor_TalkOfferAccepted(Actor* actor, PlayState* play);
-s32 Actor_OfferTalkExchange(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, u32 exchangeItemId);
-s32 Actor_OfferTalkExchangeEquiCylinder(Actor* actor, PlayState* play, f32 radius, u32 exchangeItemId);
-s32 Actor_OfferTalk(Actor* actor, PlayState* play, f32 radius);
-s32 Actor_OfferTalkNearColChkInfoCylinder(Actor* actor, PlayState* play);
-u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play);
-s8 func_8002F368(PlayState* play);
-void Actor_GetScreenPos(PlayState* play, Actor* actor, s16* x, s16* y);
-u32 Actor_HasParent(Actor* actor, PlayState* play);
-s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange);
-s32 Actor_OfferGetItemNearby(Actor* actor, PlayState* play, s32 getItemId);
-s32 Actor_OfferCarry(Actor* actor, PlayState* play);
-u32 Actor_HasNoParent(Actor* actor, PlayState* play);
-void func_8002F5C4(Actor* actorA, Actor* actorB, PlayState* play);
-void Actor_SetClosestSecretDistance(Actor* actor, PlayState* play);
-s32 Actor_IsMounted(PlayState* play, Actor* horse);
-u32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide);
-s32 Actor_NotMounted(PlayState* play, Actor* horse);
-void func_8002F698(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6);
-void func_8002F6D4(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
-void func_8002F71C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
-void func_8002F758(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
-void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
-void Player_PlaySfx(Player* player, u16 sfxId);
-void Actor_PlaySfx(Actor* actor, u16 sfxId);
-void Actor_PlaySfx_SurfaceBomb(PlayState* play, Actor* actor);
-void Actor_PlaySfx_Flagged2(Actor* actor, u16 sfxId);
-void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId);
-void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId);
-void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId);
-void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer);
-s32 func_8002F9EC(PlayState* play, Actor* actor, CollisionPoly* poly, s32 bgId, Vec3f* pos);
-void Actor_DisableLens(PlayState* play);
-void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* playerEntry);
-void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx);
-s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3);
-void func_800315AC(PlayState* play, ActorContext* actorCtx);
-void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx);
-void func_80031B14(PlayState* play, ActorContext* actorCtx);
-void func_80031C3C(ActorContext* actorCtx, PlayState* play);
-Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ,
- s16 rotX, s16 rotY, s16 rotZ, s16 params);
-Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play, s16 actorId, f32 posX,
- f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params);
-void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx);
-Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, PlayState* play);
-Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play);
-Actor* Attention_FindActor(PlayState* play, ActorContext* actorCtx, Actor** attentionActorP, Player* player);
-Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory);
-void Enemy_StartFinishingBlow(PlayState* play, Actor* actor);
-void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play);
-void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s32 maxLimbIndex, u32 count, Gfx** dList,
- s16 objectSlot);
-s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, PlayState* play, s16 type);
-void Actor_SpawnFloorDustRing(PlayState* play, Actor* actor, Vec3f* posXZ, f32 radius, s32 amountMinusOne,
- f32 randAccelWeight, s16 scale, s16 scaleStep, u8 useLighting);
-void func_80033480(PlayState* play, Vec3f* posBase, f32 randRangeDiameter, s32 amountMinusOne, s16 scaleBase,
- s16 scaleStep, u8 arg6);
-Actor* Actor_GetCollidedExplosive(PlayState* play, Collider* collider);
-Actor* func_80033684(PlayState* play, Actor* explosiveActor);
-Actor* Actor_GetProjectileActor(PlayState* play, Actor* refActor, f32 radius);
-void Actor_ChangeCategory(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 actorCategory);
-void Actor_SetTextWithPrefix(PlayState* play, Actor* actor, s16 baseTextId);
-s16 Actor_TestFloorInDirection(Actor* actor, PlayState* play, f32 distance, s16 angle);
-s32 Actor_IsLockedOn(PlayState* play, Actor* actor);
-s32 Actor_OtherIsLockedOn(PlayState* play, Actor* actor);
-f32 func_80033AEC(Vec3f* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
-void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play);
-void Actor_RequestQuake(PlayState* play, s16 y, s16 duration);
-void Actor_RequestQuakeWithSpeed(PlayState* play, s16 y, s16 duration, s16 speed);
-void Actor_RequestQuakeAndRumble(Actor* actor, PlayState* play, s16 quakeY, s16 quakeDuration);
-void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type);
-void func_8003424C(PlayState* play, Vec3f* arg1);
-void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 bufFlag, s16 duration);
-void func_800342EC(Vec3f* object, PlayState* play);
-void func_8003435C(Vec3f* object, PlayState* play);
-s32 Npc_UpdateTalking(PlayState* play, Actor* actor, s16* talkState, f32 interactRange,
- NpcGetTextIdFunc getTextId, NpcUpdateTalkStateFunc updateTalkState);
-s16 Npc_GetTrackingPresetMaxPlayerYaw(s16 presetIndex);
-void Npc_TrackPoint(Actor* actor, NpcInteractInfo* interactInfo, s16 presetIndex,
- s16 trackingMode);
-void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
- PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
-void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
- PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
-s16 func_80034DD4(Actor* actor, PlayState* play, s16 arg2, f32 arg3);
-void func_80034F54(PlayState* play, s16* arg1, s16* arg2, s32 arg3);
-void Actor_Noop(Actor* actor, PlayState* play);
-void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist);
-void Gfx_DrawDListXlu(PlayState* play, Gfx* dlist);
-Actor* Actor_FindNearby(PlayState* play, Actor* refActor, s16 actorId, u8 actorCategory, f32 range);
-s32 func_800354B4(PlayState* play, Actor* actor, f32 range, s16 arg3, s16 arg4, s16 arg5);
-void func_8003555C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
-void func_800355B8(PlayState* play, Vec3f* pos);
-u8 func_800355E4(PlayState* play, Collider* collider);
-u8 Actor_ApplyDamage(Actor* actor);
-void Actor_SetDropFlag(Actor* actor, ColliderElement* elem, s32 freezeFlag);
-void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph, s32 freezeFlag);
-void func_80035844(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3);
-Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused,
- PlayState* play, s16 params, Gfx* dList);
-void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2);
-s32 Flags_GetEventChkInf(s32 flag);
-void Flags_SetEventChkInf(s32 flag);
-s32 Flags_GetInfTable(s32 flag);
-void Flags_SetInfTable(s32 flag);
-u16 func_80037C30(PlayState* play, s16 arg1);
-s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3);
-s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos);
-void ActorOverlayTable_LogPrint(void);
-void ActorOverlayTable_Init(void);
-void ActorOverlayTable_Cleanup(void);
-void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest);
-f32 CollisionPoly_GetPointDistanceFromPlane(CollisionPoly* poly, Vec3f* point);
-void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionContext* colCtx, Vec3f* dest);
-void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader* colHeader);
-f32 BgCheck_EntityRaycastDown1(CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos);
-f32 BgCheck_EntityRaycastDown2(PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos);
-f32 BgCheck_EntityRaycastDown3(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Vec3f* pos);
-f32 BgCheck_EntityRaycastDown4(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Actor* actor,
- Vec3f* pos);
-f32 BgCheck_EntityRaycastDown5(PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId,
- Actor* actor, Vec3f* pos);
-f32 BgCheck_EntityRaycastDown6(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Actor* actor,
- Vec3f* pos, f32 chkDist);
-f32 BgCheck_EntityRaycastDown7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
-f32 BgCheck_AnyRaycastDown1(CollisionContext* colCtx, CollisionPoly* outGroundPoly, Vec3f* pos);
-f32 BgCheck_AnyRaycastDown2(CollisionContext* colCtx, CollisionPoly* outGroundPoly, s32* bgId, Vec3f* pos);
-f32 BgCheck_CameraRaycastDown2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
-f32 BgCheck_EntityRaycastDownWalls(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
-f32 BgCheck_EntityRaycastDown9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
-s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
- CollisionPoly** outPoly, f32 checkHeight);
-s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
- CollisionPoly** outPoly, s32* outBgId, f32 checkHeight);
-s32 BgCheck_EntitySphVsWall3(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
- CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight);
-s32 BgCheck_EntitySphVsWall4(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
- CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight);
-s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight);
-s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight,
- CollisionPoly** outPoly, s32* outBgId, Actor* actor);
-s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
- CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
-s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
- CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
-s32 BgCheck_EntityLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
- CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
-s32 BgCheck_EntityLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
- CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId,
- Actor* actor);
-s32 BgCheck_EntityLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
- CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId,
- Actor* actor, f32 chkDist);
-s32 BgCheck_ProjectileLineTest(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
- CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace,
- s32* bgId);
-s32 BgCheck_AnyLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
- s32 chkOneFace);
-s32 BgCheck_AnyLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
- s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace);
-s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
- s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
-s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius);
-s32 DynaPoly_IsBgIdBgActor(s32 bgId);
-void DynaPoly_DisableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
-void DynaPoly_EnableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
-void DynaPoly_DisableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
-s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* actor, CollisionHeader* colHeader);
-DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId);
-void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgId);
-void DynaPoly_InvalidateLookup(PlayState* play, DynaCollisionContext* dyna);
-void DynaPoly_UnsetAllInteractFlags(PlayState* play, DynaCollisionContext* dyna, Actor* actor);
-void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna);
-void DynaPoly_UpdateBgActorTransforms(PlayState* play, DynaCollisionContext* dyna);
-void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest);
-void func_800418D0(CollisionContext* colCtx, PlayState* play);
-u32 SurfaceType_GetBgCamIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u16 BgCheck_GetBgCamSettingImpl(CollisionContext* colCtx, u32 bgCamIndex, s32 bgId);
-u16 BgCheck_GetBgCamSetting(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u16 BgCheck_GetBgCamCount(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-Vec3s* BgCheck_GetBgCamFuncDataImpl(CollisionContext* colCtx, s32 bgCamIndex, s32 bgId);
-Vec3s* BgCheck_GetBgCamFuncData(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_GetExitIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_GetFloorType(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 func_80041D70(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-s32 SurfaceType_GetWallFlags(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-s32 SurfaceType_CheckWallFlag0(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-s32 SurfaceType_CheckWallFlag1(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-s32 SurfaceType_CheckWallFlag2(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_GetFloorProperty(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_IsSoft(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_IsHorseBlocked(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_GetMaterial(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u16 SurfaceType_GetSfxOffset(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_GetFloorEffect(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_GetLightSetting(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_CanHookshot(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-s32 SurfaceType_IsIgnoredByEntities(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-s32 SurfaceType_IsIgnoredByProjectiles(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-s32 SurfaceType_IsFloorConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_GetConveyorSpeed(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 SurfaceType_GetConveyorDirection(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-u32 func_80042108(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
-s32 WaterBox_GetSurface1(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
- WaterBox** outWaterBox);
-s32 WaterBox_GetSurface2(PlayState* play, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist,
- WaterBox** outWaterBox);
-s32 WaterBox_GetSurfaceImpl(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
- WaterBox** outWaterBox);
-u32 WaterBox_GetBgCamIndex(CollisionContext* colCtx, WaterBox* waterBox);
-u16 WaterBox_GetBgCamSetting(CollisionContext* colCtx, WaterBox* waterBox);
-u32 WaterBox_GetLightIndex(CollisionContext* colCtx, WaterBox* waterBox);
-s32 func_80042708(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* point, Vec3f* closestPoint);
-s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec3f* pointB, Vec3f* closestPoint);
-#if OOT_DEBUG
-void BgCheck_DrawDynaCollision(PlayState*, CollisionContext*);
-void BgCheck_DrawStaticCollision(PlayState*, CollisionContext*);
-#endif
-void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId);
-s32 DynaPolyActor_TransformCarriedActor(CollisionContext* colCtx, s32 bgId, Actor* carriedActor);
-void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 transformFlags);
-void DynaPolyActor_UnsetAllInteractFlags(DynaPolyActor* dynaActor);
-void DynaPolyActor_SetActorOnTop(DynaPolyActor* dynaActor);
-void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 floorBgId);
-void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 floorBgId);
-void func_80043538(DynaPolyActor* dynaActor);
-s32 DynaPolyActor_IsActorOnTop(DynaPolyActor* dynaActor);
-s32 DynaPolyActor_IsPlayerOnTop(DynaPolyActor* dynaActor);
-s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor);
-s32 func_800435B4(DynaPolyActor* dynaActor);
-s32 func_800435D8(PlayState* play, DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4);
-void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState* play);
-void Camera_InitDataUsingPlayer(Camera* camera, Player* player);
-s16 Camera_ChangeStatus(Camera* camera, s16 status);
-Vec3s Camera_Update(Camera* camera);
-void Camera_Finish(Camera* camera);
-s32 Camera_RequestMode(Camera* camera, s16 mode);
-s32 Camera_CheckValidMode(Camera* camera, s16 mode);
-s32 Camera_RequestSetting(Camera* camera, s16 setting);
-s32 Camera_RequestBgCam(Camera* camera, s32 requestedBgCamIndex);
-s16 Camera_GetInputDirYaw(Camera* camera);
-Vec3s Camera_GetCamDir(Camera* camera);
-s16 Camera_GetCamDirPitch(Camera* camera);
-s16 Camera_GetCamDirYaw(Camera* camera);
-s32 Camera_RequestQuake(Camera* camera, s32 unused, s16 y, s32 duration);
-s32 Camera_SetViewParam(Camera* camera, s32 viewFlag, void* param);
-s32 Camera_OverwriteStateFlags(Camera* camera, s16 stateFlags);
-s16 Camera_SetStateFlag(Camera* camera, s16 stateFlag);
-s16 Camera_UnsetStateFlag(Camera* camera, s16 stateFlag);
-s32 Camera_ResetAnim(Camera* camera);
-s32 Camera_SetCSParams(Camera* camera, CutsceneCameraPoint* atPoints, CutsceneCameraPoint* eyePoints, Player* player,
- s16 relativeToPlayer);
-s32 Camera_ChangeDoorCam(Camera* camera, Actor* doorActor, s16 bgCamIndex, f32 arg3, s16 timer1, s16 timer2,
- s16 timer3);
-s32 Camera_Copy(Camera* dstCamera, Camera* srcCamera);
-Vec3f Camera_GetQuakeOffset(Camera* camera);
-void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* data1, s16 data2, s16 data3,
- UNK_TYPE arg6);
-s32 func_8005B198(void);
-s16 Camera_SetFinishedFlag(Camera* camera);
-
-void SaveContext_Init(void);
-s32 func_800635D0(s32);
-void Regs_Init(void);
-void DebugCamera_ScreenText(u8 x, u8 y, const char* text);
-void DebugCamera_ScreenTextColored(u8 x, u8 y, u8 colorIndex, const char* text);
-#if OOT_DEBUG
-void Regs_UpdateEditor(Input* input);
-#endif
-void Debug_DrawText(GraphicsContext* gfxCtx);
-void DebugDisplay_Init(void);
-DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, f32 scaleX,
- f32 scaleY, f32 scaleZ, u8 red, u8 green, u8 blue, u8 alpha, s16 type,
- GraphicsContext* gfxCtx);
-void DebugDisplay_DrawObjects(PlayState* play);
-void Cutscene_InitContext(PlayState* play, CutsceneContext* csCtx);
-void Cutscene_StartManual(PlayState* play, CutsceneContext* csCtx);
-void Cutscene_StopManual(PlayState* play, CutsceneContext* csCtx);
-void Cutscene_UpdateManual(PlayState* play, CutsceneContext* csCtx);
-void Cutscene_UpdateScripted(PlayState* play, CutsceneContext* csCtx);
-void Cutscene_HandleEntranceTriggers(PlayState* play);
-void Cutscene_HandleConditionalTriggers(PlayState* play);
-void Cutscene_SetScript(PlayState* play, void* script);
-void* MemCpy(void* dest, const void* src, s32 len);
-void GetItem_Draw(PlayState* play, s16 drawId);
-
-u16 QuestHint_GetSariaTextId(PlayState* play);
-u16 QuestHint_GetNaviTextId(PlayState* play);
-u16 MaskReaction_GetTextId(PlayState* play, u32 maskReactionSet);
-void CutsceneFlags_UnsetAll(PlayState* play);
-void CutsceneFlags_Set(PlayState* play, s16 flag);
-void CutsceneFlags_Unset(PlayState* play, s16 flag);
-s32 CutsceneFlags_Get(PlayState* play, s16 flag);
-s32 func_8006CFC0(s32 sceneId);
-void func_8006D074(PlayState* play);
-void func_8006D0AC(PlayState* play);
-void func_8006D0EC(PlayState* play, Player* player);
-void func_8006D684(PlayState* play, Player* player);
-void func_8006DC68(PlayState* play, Player* player);
-void func_8006DD9C(Actor* actor, Vec3f* arg1, s16 arg2);
-
-s32 Kanji_OffsetFromShiftJIS(s32 character);
-void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex);
-void Font_LoadChar(Font* font, u8 character, u16 codePointIndex);
-void Font_LoadMessageBoxIcon(Font* font, u16 icon);
-void Font_LoadOrderedFont(Font* font);
-s32 Environment_ZBufValToFixedPoint(s32 zBufferVal);
-u16 Environment_GetPixelDepth(s32 x, s32 y);
-void Environment_GraphCallback(GraphicsContext* gfxCtx, void* param);
-void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused);
-u8 Environment_SmoothStepToU8(u8* pvalue, u8 target, u8 scale, u8 step, u8 minStep);
-u8 Environment_SmoothStepToS8(s8* pvalue, s8 target, u8 scale, u8 step, u8 minStep);
-f32 Environment_LerpWeight(u16 max, u16 min, u16 val);
-f32 Environment_LerpWeightAccelDecel(u16 endFrame, u16 startFrame, u16 curFrame, u16 accelDuration, u16 decelDuration);
-void Environment_EnableUnderwaterLights(PlayState* play, s32 waterLightsIndex);
-void Environment_DisableUnderwaterLights(PlayState* play);
-void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx,
- PauseContext* pauseCtx, MessageContext* msgCtx, GameOverContext* gameOverCtx,
- GraphicsContext* gfxCtx);
-void Environment_DrawSunAndMoon(PlayState* play);
-void Environment_DrawSunLensFlare(PlayState* play, EnvironmentContext* envCtx, View* view,
- GraphicsContext* gfxCtx, Vec3f pos, s32 unused);
-void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View* view,
- GraphicsContext* gfxCtx, Vec3f pos, s32 unused, s16 scale, f32 colorIntensity,
- s16 glareStrength, u8 isSun);
-void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx);
-void Environment_ChangeLightSetting(PlayState* play, u32 lightSetting);
-void Environment_UpdateLightningStrike(PlayState* play);
-void Environment_AddLightningBolts(PlayState* play, u8 num);
-void Environment_DrawLightning(PlayState* play, s32 unused);
-void Environment_PlaySceneSequence(PlayState* play);
-void Environment_DrawCustomLensFlare(PlayState* play);
-void Environment_InitGameOverLights(PlayState* play);
-void Environment_FadeInGameOverLights(PlayState* play);
-void Environment_FadeOutGameOverLights(PlayState* play);
-void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue, u8 alpha, u8 drawFlags);
-void Environment_DrawSandstorm(PlayState* play, u8 sandstormState);
-void Environment_AdjustLights(PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
-s32 Environment_GetBgsDayCount(void);
-void Environment_ClearBgsDayCount(void);
-s32 Environment_GetTotalDays(void);
-void Environment_ForcePlaySequence(u16 seqId);
-s32 Environment_IsForcedSequenceDisabled(void);
-void Environment_PlayStormNatureAmbience(PlayState* play);
-void Environment_StopStormNatureAmbience(PlayState* play);
-void Environment_WarpSongLeave(PlayState* play);
-void Health_InitMeter(PlayState* play);
-void Health_UpdateMeter(PlayState* play);
-void Health_DrawMeter(PlayState* play);
-void Health_UpdateBeatingHeart(PlayState* play);
-u32 Health_IsCritical(void);
-
-void* ZeldaArena_Malloc(u32 size);
-void* ZeldaArena_MallocR(u32 size);
-void* ZeldaArena_Realloc(void* ptr, u32 newSize);
-void ZeldaArena_Free(void* ptr);
-void* ZeldaArena_Calloc(u32 num, u32 size);
-void ZeldaArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
-void ZeldaArena_Check(void);
-void ZeldaArena_Init(void* start, u32 size);
-void ZeldaArena_Cleanup(void);
-s32 ZeldaArena_IsInitialized(void);
-#if OOT_DEBUG
-void ZeldaArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
-void* ZeldaArena_MallocDebug(u32 size, const char* file, int line);
-void* ZeldaArena_MallocRDebug(u32 size, const char* file, int line);
-void* ZeldaArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line);
-void ZeldaArena_FreeDebug(void* ptr, const char* file, int line);
-void ZeldaArena_Display(void);
-#endif
-void MapMark_Init(PlayState* play);
-void MapMark_ClearPointers(PlayState* play);
-void MapMark_Draw(PlayState* play);
-void PreNmiBuff_Init(PreNmiBuff* this);
-void PreNmiBuff_SetReset(PreNmiBuff* this);
-u32 PreNmiBuff_IsResetting(PreNmiBuff* this);
-void Sched_FlushTaskQueue(void);
-f32 OLib_Vec3fDist(Vec3f* a, Vec3f* b);
-f32 OLib_Vec3fDistXZ(Vec3f* a, Vec3f* b);
-f32 OLib_ClampMinDist(f32 val, f32 min);
-f32 OLib_ClampMaxDist(f32 val, f32 max);
-Vec3f OLib_Vec3fDistNormalize(Vec3f* a, Vec3f* b);
-Vec3f OLib_VecGeoToVec3f(VecGeo* geo);
-VecSph OLib_Vec3fToVecSph(Vec3f* vec);
-VecGeo OLib_Vec3fToVecGeo(Vec3f* vec);
-VecGeo OLib_Vec3fDiffToVecGeo(Vec3f* a, Vec3f* b);
-Vec3f OLib_Vec3fDiffRad(Vec3f* a, Vec3f* b);
-s16 OnePointCutscene_Init(PlayState* play, s16 csId, s16 timer, Actor* actor, s16 parentCamId);
-s16 OnePointCutscene_EndCutscene(PlayState* play, s16 subCamId);
-s32 OnePointCutscene_Attention(PlayState* play, Actor* actor);
-s32 OnePointCutscene_AttentionSetSfx(PlayState* play, Actor* actor, s32 sfxId);
-void OnePointCutscene_EnableAttention(void);
-void OnePointCutscene_DisableAttention(void);
-s32 OnePointCutscene_CheckForCategory(PlayState* play, s32 actorCategory);
-void OnePointCutscene_Noop(PlayState* play, s32 arg1);
-void Map_SavePlayerInitialInfo(PlayState* play);
-void Map_SetFloorPalettesData(PlayState* play, s16 floor);
-void Map_InitData(PlayState* play, s16 room);
-void Map_InitRoomData(PlayState* play, s16 room);
-void Map_Destroy(PlayState* play);
-void Map_Init(PlayState* play);
-void Minimap_Draw(PlayState* play);
-void Map_Update(PlayState* play);
-
-Path* Path_GetByIndex(PlayState* play, s16 index, s16 max);
-f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw);
-void Path_CopyLastPoint(Path* path, Vec3f* dest);
-
-void Player_SetBootData(PlayState* play, Player* this);
-int Player_InBlockingCsMode(PlayState* play, Player* this);
-int Player_InCsMode(PlayState* play);
-s32 Player_CheckHostileLockOn(Player* this);
-int Player_IsChildWithHylianShield(Player* this);
-s32 Player_ActionToModelGroup(Player* this, s32 itemAction);
-void Player_SetModelsForHoldingShield(Player* this);
-void Player_SetModels(Player* this, s32 modelGroup);
-void Player_SetModelGroup(Player* this, s32 modelGroup);
-void func_8008EC70(Player* this);
-void Player_SetEquipmentData(PlayState* play, Player* this);
-void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 itemAction);
-void func_8008EDF0(Player* this);
-void func_8008EE08(Player* this);
-void func_8008EEAC(PlayState* play, Actor* actor);
-s32 func_8008EF44(PlayState* play, s32 ammo);
-int Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange);
-s32 Player_GetStrength(void);
-u8 Player_GetMask(PlayState* play);
-Player* Player_UnsetMask(PlayState* play);
-s32 Player_HasMirrorShieldEquipped(PlayState* play);
-int Player_HasMirrorShieldSetToDraw(PlayState* play);
-s32 Player_ActionToMagicSpell(Player* this, s32 itemAction);
-int Player_HoldsHookshot(Player* this);
-int func_8008F128(Player* this);
-s32 Player_ActionToMeleeWeapon(s32 itemAction);
-s32 Player_GetMeleeWeaponHeld(Player* this);
-s32 Player_HoldsTwoHandedWeapon(Player* this);
-int Player_HoldsBrokenKnife(Player* this);
-s32 Player_ActionToBottle(Player* this, s32 itemAction);
-s32 Player_GetBottleHeld(Player* this);
-s32 Player_ActionToExplosive(Player* this, s32 itemAction);
-s32 Player_GetExplosiveHeld(Player* this);
-s32 func_8008F2BC(Player* this, s32 itemAction);
-s32 Player_GetEnvironmentalHazard(PlayState* play);
-void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic,
- s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw,
- void* data);
-s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
- void* thisx);
-s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
- void* thisx);
-s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
- void* thisx);
-s32 Player_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
- void* thisx);
-u8 func_80090480(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponInfo, Vec3f* newTip, Vec3f* newBase);
-void Player_DrawGetItem(PlayState* play, Player* this);
-void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx);
-u32 Player_InitPauseDrawData(PlayState* play, u8* segment, SkelAnime* skelAnime);
-void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale,
- s32 sword, s32 tunic, s32 shield, s32 boots);
-void PreNMI_Init(GameState* thisx);
-Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
-Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
-Gfx* Gfx_SetFog2(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
-Gfx* Gfx_SetupDL(Gfx* gfx, u32 i);
-Gfx* Gfx_SetupDL_57(Gfx* gfx);
-Gfx* Gfx_SetupDL_52NoCD(Gfx* gfx);
-void Gfx_SetupDL_57Opa(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_51Opa(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_54Opa(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_26Opa(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_25Xlu2(GraphicsContext* gfxCtx);
-void func_80093C80(PlayState* play);
-void Gfx_SetupDL_25Opa(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_25Xlu(GraphicsContext* gfxCtx);
-Gfx* Gfx_SetupDL_64(Gfx* gfx);
-Gfx* Gfx_SetupDL_34(Gfx* gfx);
-void Gfx_SetupDL_44Xlu(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_36Opa(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_28Opa(GraphicsContext* gfxCtx);
-Gfx* Gfx_SetupDL_28(Gfx* gfx);
-void Gfx_SetupDL_38Xlu(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_4Xlu(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_37Opa(GraphicsContext* gfxCtx);
-Gfx* Gfx_SetupDL_39(Gfx* gfx);
-void Gfx_SetupDL_39Opa(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_39Overlay(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_39Ptr(Gfx** gfxP);
-void Gfx_SetupDL_40Opa(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_41Opa(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_47Xlu(GraphicsContext* gfxCtx);
-Gfx* Gfx_SetupDL_20NoCD(Gfx* gfx);
-Gfx* Gfx_SetupDL_66(Gfx* gfx);
-Gfx* func_800947AC(Gfx* gfx);
-void Gfx_SetupDL_42Opa(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_42Overlay(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_27Xlu(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_60NoCDXlu(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_61Xlu(GraphicsContext* gfxCtx);
-void Gfx_SetupDL_56Ptr(Gfx** gfxP);
-Gfx* Gfx_BranchTexScroll(Gfx** gfxP, u32 x, u32 y, s32 width, s32 height);
-Gfx* func_80094E78(GraphicsContext* gfxCtx, u32 x, u32 y);
-Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height);
-Gfx* Gfx_TwoTexScroll(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, u32 x2,
- u32 y2, s32 width2, s32 height2);
-Gfx* Gfx_TwoTexScrollEnvColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2,
- u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a);
-Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a);
-void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b);
-void func_80095974(GraphicsContext* gfxCtx);
-void func_80095AA0(PlayState* play, Room* room, Input* input, s32 arg3);
-void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tlutMode,
- u16 tlutCount, f32 offsetX, f32 offsetY);
-void Room_Init(PlayState* play, Room* room);
-u32 Room_SetupFirstRoom(PlayState* play, RoomContext* roomCtx);
-s32 Room_RequestNewRoom(PlayState* play, RoomContext* roomCtx, s32 roomNum);
-s32 Room_ProcessRoomRequest(PlayState* play, RoomContext* roomCtx);
-void Room_Draw(PlayState* play, Room* room, u32 flags);
-void Room_FinishRoomChange(PlayState* play, RoomContext* roomCtx);
-void Sample_Destroy(GameState* thisx);
-void Sample_Init(GameState* thisx);
-void Inventory_ChangeEquipment(s16 equipment, u16 value);
-u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment);
-void Inventory_ChangeUpgrade(s16 upgrade, s16 value);
-void Object_InitContext(PlayState* play, ObjectContext* objectCtx);
-void Object_UpdateEntries(ObjectContext* objectCtx);
-s32 Object_GetSlot(ObjectContext* objectCtx, s16 objectId);
-s32 Object_IsLoaded(ObjectContext* objectCtx, s32 slot);
-void func_800981B8(ObjectContext* objectCtx);
-s32 Scene_ExecuteCommands(PlayState* play, SceneCmd* sceneCmd);
-void Scene_ResetTransitionActorList(GameState* state, TransitionActorList* transitionActors);
-void Scene_SetTransitionForNextEntrance(PlayState* play);
-void Scene_Draw(PlayState* play);
-
-void Skin_UpdateVertices(MtxF* mtx, SkinVertex* skinVertices, SkinLimbModif* modifEntry, Vtx* vtxBuf, Vec3f* pos);
-void Skin_DrawAnimatedLimb(GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, s32 arg3, s32 drawFlags);
-void Skin_DrawLimb(GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, Gfx* dlistOverride, s32 drawFlags);
-void func_800A6330(Actor* actor, PlayState* play, Skin* skin, SkinPostDraw postDraw, s32 setTranslation);
-void func_800A6360(Actor* actor, PlayState* play, Skin* skin, SkinPostDraw postDraw,
- SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation);
-void func_800A6394(Actor* actor, PlayState* play, Skin* skin, SkinPostDraw postDraw,
- SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation, s32 arg6);
-void func_800A63CC(Actor* actor, PlayState* play, Skin* skin, SkinPostDraw postDraw,
- SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation, s32 arg6, s32 drawFlags);
-void Skin_GetLimbPos(Skin* skin, s32 limbIndex, Vec3f* offset, Vec3f* dst);
-void Skin_Init(PlayState* play, Skin* skin, SkeletonHeader* skeletonHeader, AnimationHeader* animationHeader);
-void Skin_Free(PlayState* play, Skin* skin);
-s32 Skin_ApplyAnimTransformations(Skin* skin, MtxF* limbMatrices, Actor* actor, s32 setTranslation);
-
-void SkinMatrix_Vec3fMtxFMultXYZW(MtxF* mf, Vec3f* src, Vec3f* xyzDest, f32* wDest);
-void SkinMatrix_Vec3fMtxFMultXYZ(MtxF* mf, Vec3f* src, Vec3f* dest);
-void SkinMatrix_MtxFMtxFMult(MtxF* mfA, MtxF* mfB, MtxF* dest);
-void SkinMatrix_GetClear(MtxF** mfp);
-void SkinMatrix_MtxFCopy(MtxF* src, MtxF* dest);
-s32 SkinMatrix_Invert(MtxF* src, MtxF* dest);
-void SkinMatrix_SetScale(MtxF* mf, f32 x, f32 y, f32 z);
-void SkinMatrix_SetRotateZYX(MtxF* mf, s16 x, s16 y, s16 z);
-void SkinMatrix_SetTranslate(MtxF* mf, f32 x, f32 y, f32 z);
-void SkinMatrix_SetTranslateRotateYXZScale(MtxF* dest, f32 scaleX, f32 scaleY, f32 scaleZ, s16 rotX, s16 rotY, s16 rotZ,
- f32 translateX, f32 translateY, f32 translateZ);
-void SkinMatrix_SetTranslateRotateZYX(MtxF* dest, s16 rotX, s16 rotY, s16 rotZ, f32 translateX, f32 translateY,
- f32 translateZ);
-Mtx* SkinMatrix_MtxFToNewMtx(GraphicsContext* gfxCtx, MtxF* src);
-void SkinMatrix_SetRotateAxis(MtxF* mf, s16 angle, f32 axisX, f32 axisY, f32 axisZ);
-void Sram_InitNewSave(void);
-void Sram_InitDebugSave(void);
-void Sram_OpenSave(SramContext* sramCtx);
-void Sram_WriteSave(SramContext* sramCtx);
-void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCtx);
-void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx);
-void Sram_EraseSave(FileSelectState* fileSelect, SramContext* sramCtx);
-void Sram_CopySave(FileSelectState* fileSelect, SramContext* sramCtx);
-void Sram_WriteSramHeader(SramContext* sramCtx);
-void Sram_InitSram(GameState* gameState, SramContext* sramCtx);
-void Sram_Alloc(GameState* gameState, SramContext* sramCtx);
-void Sram_Init(PlayState* play, SramContext* sramCtx);
-void SsSram_Init(s32 addr, u8 handleType, u8 handleDomain, u8 handleLatency, u8 handlePageSize, u8 handleRelDuration,
- u8 handlePulse, u32 handleSpeed);
-void SsSram_Dma(void* dramAddr, size_t size, s32 direction);
-void SsSram_ReadWrite(s32 addr, void* dramAddr, size_t size, s32 direction);
-View* View_New(GraphicsContext* gfxCtx);
-void View_Free(View* view);
-void View_Init(View*, GraphicsContext*);
-void View_LookAt(View* view, Vec3f* eye, Vec3f* at, Vec3f* up);
-void View_LookAtUnsafe(View* view, Vec3f* eye, Vec3f* at, Vec3f* up);
-void View_SetScale(View* view, f32 scale);
-void View_GetScale(View* view, f32* scale);
-void View_SetPerspective(View* view, f32 fovy, f32 zNear, f32 zFar);
-void View_GetPerspective(View* view, f32* fovy, f32* zNear, f32* zFar);
-void View_SetOrtho(View* view, f32 fovy, f32 zNear, f32 zFar);
-void View_GetOrtho(View* view, f32* fovy, f32* zNear, f32* zFar);
-void View_SetViewport(View* view, Viewport* viewport);
-void View_GetViewport(View* view, Viewport* viewport);
-void View_SetDistortionOrientation(View* view, f32 rotX, f32 rotY, f32 rotZ);
-void View_SetDistortionScale(View* view, f32 scaleX, f32 scaleY, f32 scaleZ);
-s32 View_SetDistortionSpeed(View* view, f32 speed);
-void View_InitDistortion(View* view);
-void View_ClearDistortion(View* view);
-void View_SetDistortion(View* view, Vec3f orientation, Vec3f scale, f32 speed);
-s32 View_StepDistortion(View* view, Mtx* projectionMtx);
-s32 View_Apply(View* view, s32 mask);
-s32 View_ApplyOrthoToOverlay(View* view);
-s32 View_ApplyPerspectiveToOverlay(View* view);
-s32 View_UpdateViewingMatrix(View* view);
-s32 View_ApplyTo(View* view, s32 mask, Gfx** gfxP);
-#if OOT_DEBUG
-s32 View_ErrorCheckEyePosition(f32 eyeX, f32 eyeY, f32 eyeZ);
-#endif
-void ViMode_LogPrint(OSViMode* osViMode);
-void ViMode_Configure(ViMode* viMode, s32 type, s32 tvType, s32 loRes, s32 antialiasOff, s32 modeN, s32 fb16Bit,
- s32 width, s32 height, s32 leftAdjust, s32 rightAdjust, s32 upperAdjust, s32 lowerAdjust);
-void ViMode_Save(ViMode* viMode);
-void ViMode_Load(ViMode* viMode);
-void ViMode_Init(ViMode* viMode);
-void ViMode_Destroy(ViMode* viMode);
-void ViMode_ConfigureFeatures(ViMode* viMode, s32 viFeatures);
-void ViMode_Update(ViMode* viMode, Input* input);
-void PlayerCall_InitFuncPtrs(void);
-void TransitionTile_Destroy(TransitionTile* this);
-TransitionTile* TransitionTile_Init(TransitionTile* this, s32 cols, s32 rows);
-void TransitionTile_Draw(TransitionTile* this, Gfx** gfxP);
-void TransitionTile_Update(TransitionTile* this);
-void TransitionTriforce_Start(void* thisx);
-void* TransitionTriforce_Init(void* thisx);
-void TransitionTriforce_Destroy(void* thisx);
-void TransitionTriforce_Update(void* thisx, s32 updateRate);
-void TransitionTriforce_SetColor(void* thisx, u32 color);
-void TransitionTriforce_SetType(void* thisx, s32 type);
-void TransitionTriforce_Draw(void* thisx, Gfx** gfxP);
-s32 TransitionTriforce_IsDone(void* thisx);
-void TransitionWipe_Start(void* thisx);
-void* TransitionWipe_Init(void* thisx);
-void TransitionWipe_Destroy(void* thisx);
-void TransitionWipe_Update(void* thisx, s32 updateRate);
-void TransitionWipe_Draw(void* thisx, Gfx** gfxP);
-s32 TransitionWipe_IsDone(void* thisx);
-void TransitionWipe_SetType(void* thisx, s32 type);
-void TransitionWipe_SetColor(void* thisx, u32 color);
-void TransitionCircle_Start(void* thisx);
-void* TransitionCircle_Init(void* thisx);
-void TransitionCircle_Destroy(void* thisx);
-void TransitionCircle_Update(void* thisx, s32 updateRate);
-void TransitionCircle_Draw(void* thisx, Gfx** gfxP);
-s32 TransitionCircle_IsDone(void* thisx);
-void TransitionCircle_SetType(void* thisx, s32 type);
-void TransitionCircle_SetColor(void* thisx, u32 color);
-void TransitionCircle_SetUnkColor(void* thisx, u32 color);
-void TransitionFade_Start(void* thisx);
-void* TransitionFade_Init(void* thisx);
-void TransitionFade_Destroy(void* thisx);
-void TransitionFade_Update(void* thisx, s32 updateRate);
-void TransitionFade_Draw(void* thisx, Gfx** gfxP);
-s32 TransitionFade_IsDone(void* thisx);
-void TransitionFade_SetColor(void* thisx, u32 color);
-void TransitionFade_SetType(void* thisx, s32 type);
-void Letterbox_SetSizeTarget(s32 target);
-u32 Letterbox_GetSizeTarget(void);
-void Letterbox_SetSize(s32 size);
-u32 Letterbox_GetSize(void);
-void Letterbox_Init(void);
-void Letterbox_Destroy(void);
-void Letterbox_Update(s32 updateRate);
-void DebugCamera_Init(DebugCam* debugCam, Camera* cameraPtr);
-void DebugCamera_Enable(DebugCam* debugCam, Camera* cam);
-void DebugCamera_Update(DebugCam* debugCam, Camera* cam);
-void DebugCamera_Reset(Camera* cam, DebugCam* debugCam);
-void func_800BB0A0(f32 u, Vec3f* pos, f32* roll, f32* viewAngle, f32* point0, f32* point1, f32* point2, f32* point3);
-s32 func_800BB2B4(Vec3f* pos, f32* roll, f32* fov, CutsceneCameraPoint* point, s16* keyFrame, f32* curFrame);
-
-s32 func_800C0D34(PlayState* this, Actor* actor, s16* yaw);
-s32 func_800C0DB4(PlayState* this, Vec3f* pos);
-void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
-void PreRender_Init(PreRender* this);
-void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
-void PreRender_Destroy(PreRender* this);
-void func_800C170C(PreRender* this, Gfx** gfxP, void* buf, void* bufSave, u32 r, u32 g, u32 b, u32 a);
-void func_800C1AE8(PreRender* this, Gfx** gfxP, void* fbuf, void* fbufSave);
-void PreRender_SaveZBuffer(PreRender* this, Gfx** gfxP);
-void PreRender_SaveFramebuffer(PreRender* this, Gfx** gfxP);
-void PreRender_DrawCoverage(PreRender* this, Gfx** gfxP);
-void PreRender_RestoreZBuffer(PreRender* this, Gfx** gfxP);
-void func_800C213C(PreRender* this, Gfx** gfxP);
-void PreRender_RestoreFramebuffer(PreRender* this, Gfx** gfxP);
-void PreRender_CopyImageRegion(PreRender* this, Gfx** gfxP);
-void PreRender_ApplyFilters(PreRender* this);
-void GameState_SetFBFilter(Gfx** gfxP);
-void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx);
-void GameState_SetFrameBuffer(GraphicsContext* gfxCtx);
-void GameState_ReqPadData(GameState* gameState);
-void GameState_Update(GameState* gameState);
-void GameState_InitArena(GameState* gameState, size_t size);
-void GameState_Realloc(GameState* gameState, size_t size);
-void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx);
-void GameState_Destroy(GameState* gameState);
-GameStateFunc GameState_GetInit(GameState* gameState);
-u32 GameState_IsRunning(GameState* gameState);
-#if OOT_DEBUG
-void* GameState_Alloc(GameState* gameState, size_t size, const char* file, int line);
-void* GameAlloc_MallocDebug(GameAlloc* this, u32 size, const char* file, int line);
-#endif
-void* GameAlloc_Malloc(GameAlloc* this, u32 size);
-void GameAlloc_Free(GameAlloc* this, void* data);
-void GameAlloc_Cleanup(GameAlloc* this);
-void GameAlloc_Init(GameAlloc* this);
-void Graph_InitTHGA(GraphicsContext* gfxCtx);
-GameStateOverlay* Graph_GetNextGameState(GameState* gameState);
-void Graph_Init(GraphicsContext* gfxCtx);
-void Graph_Destroy(GraphicsContext* gfxCtx);
-void Graph_TaskSet00(GraphicsContext* gfxCtx);
-void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState);
-void Graph_ThreadEntry(void*);
-
-Gfx* Gfx_Open(Gfx* gfx);
-Gfx* Gfx_Close(Gfx* gfx, Gfx* dst);
-void* Gfx_Alloc(Gfx** gfxP, u32 size);
-ListAlloc* ListAlloc_Init(ListAlloc* this);
-void* ListAlloc_Alloc(ListAlloc* this, u32 size);
-void ListAlloc_Free(ListAlloc* this, void* data);
-void ListAlloc_FreeAll(ListAlloc* this);
-void Main(void* arg);
-void SysCfb_Init(s32 n64dd);
-void* SysCfb_GetFbPtr(s32 idx);
-void* SysCfb_GetFbEnd(void);
-
-void Math3D_DrawSphere(PlayState* play, Sphere16* sph);
-void Math3D_DrawCylinder(PlayState* play, Cylinder16* cyl);
-u64* SysUcode_GetUCodeBoot(void);
-size_t SysUcode_GetUCodeBootSize(void);
-u64* SysUcode_GetUCode(void);
-u64* SysUcode_GetUCodeData(void);
-NORETURN void func_800D31A0(void);
-void func_800D31F0(void);
-void func_800D3210(void);
-void* DebugArena_Malloc(u32 size);
-void* DebugArena_MallocR(u32 size);
-void* DebugArena_Realloc(void* ptr, u32 newSize);
-void DebugArena_Free(void* ptr);
-void* DebugArena_Calloc(u32 num, u32 size);
-void DebugArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
-void DebugArena_Check(void);
-void DebugArena_Init(void* start, u32 size);
-void DebugArena_Cleanup(void);
-s32 DebugArena_IsInitialized(void);
-#if OOT_DEBUG
-void DebugArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
-void* DebugArena_MallocDebug(u32 size, const char* file, int line);
-void* DebugArena_MallocRDebug(u32 size, const char* file, int line);
-void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line);
-void DebugArena_FreeDebug(void* ptr, const char* file, int line);
-void DebugArena_Display(void);
-#endif
-void UCodeDisas_Init(UCodeDisas*);
-void UCodeDisas_Destroy(UCodeDisas*);
-void UCodeDisas_Disassemble(UCodeDisas*, Gfx*);
-void UCodeDisas_RegisterUCode(UCodeDisas*, s32, UCodeInfo*);
-void UCodeDisas_SetCurUCode(UCodeDisas*, void*);
-Acmd* AudioSynth_Update(Acmd* cmdStart, s32* cmdCnt, s16* aiStart, s32 aiBufLen);
-void AudioHeap_DiscardFont(s32 fontId);
-void AudioHeap_ReleaseNotesForFont(s32 fontId);
-void AudioHeap_DiscardSequence(s32 seqId);
-void AudioHeap_WritebackDCache(void* ramAddr, u32 size);
-void* AudioHeap_AllocZeroedAttemptExternal(AudioAllocPool* pool, u32 size);
-void* AudioHeap_AllocAttemptExternal(AudioAllocPool* pool, u32 size);
-void* AudioHeap_AllocDmaMemory(AudioAllocPool* pool, u32 size);
-void* AudioHeap_AllocDmaMemoryZeroed(AudioAllocPool* pool, u32 size);
-void* AudioHeap_AllocZeroed(AudioAllocPool* pool, u32 size);
-void* AudioHeap_Alloc(AudioAllocPool* pool, u32 size);
-void AudioHeap_InitPool(AudioAllocPool* pool, void* ramAddr, u32 size);
-void AudioHeap_PopPersistentCache(s32 tableType);
-void AudioHeap_InitMainPools(s32 initPoolSize);
-void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id);
-void* AudioHeap_SearchCaches(s32 tableType, s32 cache, s32 id);
-void* AudioHeap_SearchRegularCaches(s32 tableType, s32 cache, s32 id);
-void AudioHeap_LoadFilter(s16* filter, s32 lowPassCutoff, s32 highPassCutoff);
-s32 AudioHeap_ResetStep(void);
-void AudioHeap_Init(void);
-void* AudioHeap_SearchPermanentCache(s32 tableType, s32 id);
-void* AudioHeap_AllocPermanent(s32 tableType, s32 id, u32 size);
-void* AudioHeap_AllocSampleCache(u32 size, s32 fontId, void* sampleAddr, s8 medium, s32 cache);
-void AudioHeap_ApplySampleBankCache(s32 sampleBankId);
-void AudioLoad_DecreaseSampleDmaTtls(void);
-void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, s32 arg2, u8* dmaIndexRef, s32 medium);
-void AudioLoad_InitSampleDmaBuffers(s32 numNotes);
-s32 AudioLoad_IsFontLoadComplete(s32 fontId);
-s32 AudioLoad_IsSeqLoadComplete(s32 seqId);
-void AudioLoad_SetFontLoadStatus(s32 fontId, s32 loadStatus);
-void AudioLoad_SetSeqLoadStatus(s32 seqId, s32 loadStatus);
-void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 arg1);
-s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId);
-void AudioLoad_AsyncLoadSeq(s32 seqId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
-void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
-void AudioLoad_AsyncLoadFont(s32 fontId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
-u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* outNumFonts);
-void AudioLoad_DiscardSeqFonts(s32 seqId);
-s32 AudioLoad_SyncInitSeqPlayer(s32 playerIdx, s32 seqId, s32 arg2);
-s32 AudioLoad_SyncInitSeqPlayerSkipTicks(s32 playerIdx, s32 seqId, s32 skipTicks);
-void AudioLoad_ProcessLoads(s32 resetStatus);
-void AudioLoad_SetDmaHandler(DmaHandler callback);
-void AudioLoad_Init(void* heap, u32 heapSize);
-void AudioLoad_InitSlowLoads(void);
-s32 AudioLoad_SlowLoadSample(s32 fontId, s32 instId, s8* status);
-s32 AudioLoad_SlowLoadSeq(s32 seqId, u8* ramAddr, s8* status);
-void AudioLoad_InitAsyncLoads(void);
-void AudioLoad_LoadPermanentSamples(void);
-void AudioLoad_ScriptLoad(s32 tableType, s32 id, s8* status);
-void AudioLoad_ProcessScriptLoads(void);
-void AudioLoad_InitScriptLoads(void);
-
-AudioTask* AudioThread_Update(void);
-void AudioThread_QueueCmdF32(u32 opArgs, f32 data);
-void AudioThread_QueueCmdS32(u32 opArgs, s32 data);
-void AudioThread_QueueCmdS8(u32 opArgs, s8 data);
-void AudioThread_QueueCmdU16(u32 opArgs, u16 data);
-s32 AudioThread_ScheduleProcessCmds(void);
-u32 func_800E5E20(u32* out);
-u8* AudioThread_GetFontsForSequence(s32 seqId, u32* outNumFonts);
-s32 func_800E5EDC(void);
-s32 AudioThread_ResetAudioHeap(s32 specId);
-void AudioThread_PreNMIInternal(void);
-s32 func_800E6680(void);
-u32 AudioThread_NextRandom(void);
-void AudioThread_InitMesgQueues(void);
-
-void Audio_InvalDCache(void* buf, s32 size);
-void Audio_WritebackDCache(void* buf, s32 size);
-s32 osAiSetNextBuffer(void*, u32);
-void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs);
-void Audio_NoteSetResamplingRate(NoteSubEu* noteSubEu, f32 resamplingRateInput);
-void Audio_NoteInit(Note* note);
-void Audio_NoteDisable(Note* note);
-void Audio_ProcessNotes(void);
-TunedSample* Audio_GetInstrumentTunedSample(Instrument* instrument, s32 semitone);
-Instrument* Audio_GetInstrumentInner(s32 fontId, s32 instId);
-Drum* Audio_GetDrum(s32 fontId, s32 drumId);
-SoundEffect* Audio_GetSoundEffect(s32 fontId, s32 sfxId);
-s32 Audio_SetFontInstrument(s32 instrumentType, s32 fontId, s32 index, void* value);
-void Audio_SeqLayerDecayRelease(SequenceLayer* layer, s32 target);
-void Audio_SeqLayerNoteDecay(SequenceLayer* layer);
-void Audio_SeqLayerNoteRelease(SequenceLayer* layer);
-s32 Audio_BuildSyntheticWave(Note* note, SequenceLayer* layer, s32 waveId);
-void Audio_InitSyntheticWave(Note* note, SequenceLayer* layer);
-void Audio_InitNoteList(AudioListItem* list);
-void Audio_InitNoteLists(NotePool* pool);
-void Audio_InitNoteFreeList(void);
-void Audio_NotePoolClear(NotePool* pool);
-void Audio_NotePoolFill(NotePool* pool, s32 count);
-void Audio_AudioListPushFront(AudioListItem* list, AudioListItem* item);
-void Audio_AudioListRemove(AudioListItem* item);
-Note* Audio_FindNodeWithPrioLessThan(AudioListItem* list, s32 limit);
-void Audio_NoteInitForLayer(Note* note, SequenceLayer* layer);
-void func_800E82C0(Note* note, SequenceLayer* layer);
-void Audio_NoteReleaseAndTakeOwnership(Note* note, SequenceLayer* layer);
-Note* Audio_AllocNoteFromDisabled(NotePool* pool, SequenceLayer* layer);
-Note* Audio_AllocNoteFromDecaying(NotePool* pool, SequenceLayer* layer);
-Note* Audio_AllocNoteFromActive(NotePool* pool, SequenceLayer* layer);
-Note* Audio_AllocNote(SequenceLayer* layer);
-void Audio_NoteInitAll(void);
-void Audio_SequenceChannelProcessSound(SequenceChannel* channel, s32 recalculateVolume, s32 applyBend);
-void Audio_SequencePlayerProcessSound(SequencePlayer* seqPlayer);
-f32 Audio_GetPortamentoFreqScale(Portamento* portamento);
-s16 Audio_GetVibratoPitchChange(VibratoState* vib);
-f32 Audio_GetVibratoFreqScale(VibratoState* vib);
-void Audio_NoteVibratoUpdate(Note* note);
-void Audio_NoteVibratoInit(Note* note);
-void Audio_NotePortamentoInit(Note* note);
-void Audio_AdsrInit(AdsrState* adsr, EnvelopePoint* envelope, s16* volOut);
-f32 Audio_AdsrUpdate(AdsrState* adsr);
-void AudioSeq_SequenceChannelDisable(SequenceChannel* channel);
-void AudioSeq_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer);
-void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer);
-void AudioSeq_AudioListPushBack(AudioListItem* list, AudioListItem* item);
-void* AudioSeq_AudioListPopBack(AudioListItem* list);
-void AudioSeq_ProcessSequences(s32 arg0);
-void AudioSeq_SkipForwardSequence(SequencePlayer* seqPlayer);
-void AudioSeq_ResetSequencePlayer(SequencePlayer* seqPlayer);
-void AudioSeq_InitSequencePlayerChannels(s32 playerIdx);
-void AudioSeq_InitSequencePlayers(void);
-void AudioOcarina_Start(u16 ocarinaFlags);
-void AudioOcarina_SetInstrument(u8 ocarinaInstrumentId);
-void AudioOcarina_SetPlaybackSong(s8 songIndexPlusOne, s8 playbackState);
-void AudioOcarina_SetRecordingState(u8 recordingState);
-OcarinaStaff* AudioOcarina_GetRecordingStaff(void);
-OcarinaStaff* AudioOcarina_GetPlayingStaff(void);
-OcarinaStaff* AudioOcarina_GetPlaybackStaff(void);
-void AudioOcarina_MemoryGameInit(u8 minigameRound);
-s32 AudioOcarina_MemoryGameNextNote(void);
-void AudioOcarina_PlayLongScarecrowSong(void);
-void AudioDebug_Draw(GfxPrint* printer);
-void AudioDebug_ScrPrt(const char* str, u16 num);
-void Audio_Update(void);
-void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex);
-void Audio_PlayCutsceneEffectsSequence(u8 csEffectType);
-void func_800F4010(Vec3f* pos, u16 sfxId, f32);
-void Audio_PlaySfxRandom(Vec3f* pos, u16 baseSfxId, u8 randLim);
-void func_800F4138(Vec3f* pos, u16 sfxId, f32);
-void func_800F4190(Vec3f* pos, u16 sfxId);
-void func_800F436C(Vec3f* pos, u16 sfxId, f32 arg2);
-void func_800F4414(Vec3f* pos, u16 sfxId, f32);
-void func_800F44EC(s8 arg0, s8 arg1);
-void func_800F4524(Vec3f* pos, u16 sfxId, s8 arg2);
-void func_800F4254(Vec3f* pos, u8 level);
-void Audio_PlaySfxRiver(Vec3f* pos, f32 freqScale);
-void Audio_PlaySfxWaterfall(Vec3f* pos, f32 freqScale);
-void Audio_SetBgmVolumeOffDuringFanfare(void);
-void Audio_SetBgmVolumeOnDuringFanfare(void);
-void Audio_SetMainBgmVolume(u8 targetVol, u8 volFadeTimer);
-void Audio_SetGanonsTowerBgmVolumeLevel(u8 ganonsTowerLevel);
-void Audio_LowerMainBgmVolume(u8 volume);
-void Audio_PlaySfxIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones);
-void Audio_ResetIncreasingTranspose(void);
-void Audio_PlaySfxTransposed(Vec3f* pos, u16 sfxId, s8 semitone);
-void func_800F4C58(Vec3f* pos, u16 sfxId, u8);
-void func_800F4E30(Vec3f* pos, f32);
-void Audio_ClearSariaBgm(void);
-void Audio_ClearSariaBgmAtPos(Vec3f* pos);
-void Audio_PlaySariaBgm(Vec3f* pos, u16 seqId, u16 distMax);
-void Audio_ClearSariaBgm2(void);
-void Audio_PlayMorningSceneSequence(u16 seqId);
-void Audio_PlaySceneSequence(u16 seqId);
-void Audio_SetMainBgmTempoFreqAfterFanfare(f32 scaleTempoAndFreq, u8 duration);
-void Audio_PlayWindmillBgm(void);
-void Audio_SetFastTempoForTimedMinigame(void);
-void Audio_PlaySequenceInCutscene(u16 seqId);
-void Audio_StopSequenceInCutscene(u16 seqId);
-s32 Audio_IsSequencePlaying(u16 seqId);
-void func_800F5ACC(u16 seqId);
-void func_800F5B58(void);
-void func_800F5BF0(u8 natureAmbienceId);
-void Audio_PlayFanfare(u16);
-void func_800F5C2C(void);
-void Audio_PlaySequenceWithSeqPlayerIO(u8 seqPlayerIndex, u16 seqId, u8 fadeInDuration, s8 ioPort, s8 ioData);
-void Audio_SetSequenceMode(u8 seqMode);
-void Audio_SetBgmEnemyVolume(f32 dist);
-void Audio_UpdateMalonSinging(f32 dist, u16 seqId);
-void func_800F64E0(u8 arg0);
-void Audio_ToggleMalonSinging(u8 malonSingingDisabled);
-void Audio_SetEnvReverb(s8 reverb);
-void Audio_SetCodeReverb(s8 reverb);
-void func_800F6700(s8 audioSetting);
-void Audio_SetBaseFilter(u8);
-void Audio_SetExtraFilter(u8);
-void Audio_SetCutsceneFlag(s8 flag);
-void Audio_PlaySfxIfNotInCutscene(u16 sfxId);
-void func_800F6964(u16);
-void Audio_StopBgmAndFanfare(u16 fadeOutDuration);
-void func_800F6B3C(void);
-void func_800F6BDC(void);
-void Audio_PreNMI(void);
-void Audio_SetNatureAmbienceChannelIO(u8 channelIdxRange, u8 ioPort, u8 ioData);
-void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId);
-void Audio_Init(void);
-void Audio_InitSound(void);
-void func_800F7170(void);
-void func_800F71BC(s32 arg0);
-
-void RcpUtils_PrintRegisterStatus(void);
-void RcpUtils_Reset(void);
-void* Overlay_AllocateAndLoad(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd);
-void MtxConv_F2L(Mtx* m1, MtxF* m2);
-void MtxConv_L2F(MtxF* m1, Mtx* m2);
-void Overlay_Relocate(void* allocatedRamAddr, OverlayRelocationSection* ovlRelocs, void* vramStart);
-size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd, void* allocatedRamAddr);
-// ? func_800FC800(?);
-// ? func_800FC83C(?);
-// ? func_800FCAB4(?);
-void SystemHeap_Init(void* start, u32 size);
-void PadUtils_Init(Input* input);
-void func_800FCB70(void);
-void PadUtils_ResetPressRel(Input* input);
-u32 PadUtils_CheckCurExact(Input* input, u16 value);
-u32 PadUtils_CheckCur(Input* input, u16 key);
-u32 PadUtils_CheckPressed(Input* input, u16 key);
-u32 PadUtils_CheckReleased(Input* input, u16 key);
-u16 PadUtils_GetCurButton(Input* input);
-u16 PadUtils_GetPressButton(Input* input);
-s8 PadUtils_GetCurX(Input* input);
-s8 PadUtils_GetCurY(Input* input);
-void PadUtils_SetRelXY(Input* input, s32 x, s32 y);
-s8 PadUtils_GetRelXImpl(Input* input);
-s8 PadUtils_GetRelYImpl(Input* input);
-s8 PadUtils_GetRelX(Input* input);
-s8 PadUtils_GetRelY(Input* input);
-void PadUtils_UpdateRelXY(Input* input);
-s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status);
-
-s32 osPfsFreeBlocks(OSPfs* pfs, s32* leftoverBytes);
-void guScale(Mtx* m, f32 x, f32 y, f32 z);
-OSTask* _VirtualToPhysicalTask(OSTask* intp);
-void osSpTaskLoad(OSTask* intp);
-void osSpTaskStartGo(OSTask* tp);
-void __osSiCreateAccessQueue(void);
-void __osSiGetAccess(void);
-void __osSiRelAccess(void);
-s32 osContInit(OSMesgQueue* mq, u8* ctlBitfield, OSContStatus* status);
-void __osContGetInitData(u8* ctlBitfield, OSContStatus* data);
-void __osPackRequestData(u8 poll);
-s32 osContStartReadData(OSMesgQueue* mq);
-void osContGetReadData(OSContPad* contData);
-void __osPackReadData(void);
-void guPerspectiveF(f32 mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
-void guPerspective(Mtx* m, u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
-s32 __osSpRawStartDma(s32 direction, void* devAddr, void* dramAddr, u32 size);
-s32 __osSiRawStartDma(s32 dir, void* addr);
-void osSpTaskYield(void);
-s32 __osPfsGetNextPage(OSPfs* pfs, u8* bank, __OSInode* inode, __OSInodeUnit* page);
-s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, s32 offset, s32 size, u8* data);
-s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel);
-void __osPfsRequestOneChannel(s32 channel, u8 cmd);
-void __osPfsGetOneChannelData(s32 channel, OSContStatus* contData);
-void guMtxIdentF(f32 mf[4][4]);
-void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
-void guLookAt(Mtx*, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
-s32 osPfsAllocateFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32 fileSize, s32* fileNo);
-s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared,
- s32* finalPage);
-s32 osStopTimer(OSTimer* timer);
-u16 __osSumcalc(u8* ptr, s32 length);
-s32 __osIdCheckSum(u16* ptr, u16* checkSum, u16* idSum);
-s32 __osRepairPackId(OSPfs* pfs, __OSPackId* badid, __OSPackId* newid);
-s32 __osCheckPackId(OSPfs* pfs, __OSPackId* check);
-s32 __osGetId(OSPfs* pfs);
-s32 __osCheckId(OSPfs* pfs);
-s32 __osPfsRWInode(OSPfs* pfs, __OSInode* inode, u8 flag, u8 bank);
-void guMtxL2F(f32 mf[4][4], Mtx* m);
-s32 osPfsFindFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32* fileNo);
-s32 osAfterPreNMI(void);
-s32 osContStartQuery(OSMesgQueue* mq);
-void osContGetQuery(OSContStatus* data);
-void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt,
- f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth,
- s32 hiliteHeight);
-void guLookAtHilite(Mtx* m, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp,
- f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth,
- s32 hiliteHeight);
-u32 __osSpDeviceBusy(void);
-void guMtxIdent(Mtx*);
-void guPositionF(f32 mf[4][4], f32 rot, f32 pitch, f32 yaw, f32 scale, f32 x, f32 y, f32 z);
-void guPosition(Mtx*, f32, f32, f32, f32, f32, f32, f32);
-OSYieldResult osSpTaskYielded(OSTask* task);
-void guRotateF(f32 m[4][4], f32 a, f32 x, f32 y, f32 z);
-void guRotate(Mtx*, f32 a, f32 x, f32 y, f32 z);
-s32 osAiSetFrequency(u32 frequency);
-OSThread* __osGetActiveQueue(void);
-void guNormalize(f32* x, f32* y, f32* z);
-u32 osDpGetStatus(void);
-void osDpSetStatus(u32 status);
-s32 osPfsDeleteFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName);
-s32 __osPfsReleasePages(OSPfs* pfs, __OSInode* inode, u8 initialPage, u8 bank, __OSInodeUnit* finalPage);
-void guOrthoF(f32[4][4], f32, f32, f32, f32, f32, f32, f32);
-void guOrtho(Mtx*, f32, f32, f32, f32, f32, f32, f32);
-void osViSetEvent(OSMesgQueue* mq, OSMesg msg, u32 retraceCount);
-s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern);
-void __osPfsRequestData(u8 cmd);
-void __osPfsGetInitData(u8* pattern, OSContStatus* contData);
-void guS2DInitBg(uObjBg* bg);
-s32 __osPfsSelectBank(OSPfs* pfs, u8 bank);
-s32 osContSetCh(u8 ch);
-s32 osPfsFileState(OSPfs* pfs, s32 fileNo, OSPfsState* state);
-s32 osPfsInitPak(OSMesgQueue* queue, OSPfs* pfs, s32 channel);
-s32 __osPfsCheckRamArea(OSPfs* pfs);
-s32 osPfsChecker(OSPfs* pfs);
-s32 func_80105788(OSPfs* pfs, __OSInodeCache* cache);
-s32 func_80105A60(OSPfs* pfs, __OSInodeUnit fpage, __OSInodeCache* cache);
-u32 osAiGetLength(void);
-void guTranslate(Mtx* m, f32 x, f32 y, f32 z);
-s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force);
-s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data);
-u8 __osContAddressCrc(u16 addr);
-u8 __osContDataCrc(u8* data);
-s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg);
-u32 __osSpGetStatus(void);
-void __osSpSetStatus(u32 status);
-void osWritebackDCacheAll(void);
-OSThread* __osGetCurrFaultedThread(void);
-void guMtxF2L(f32 mf[4][4], Mtx* m);
-// ? __d_to_ll(?);
-// ? __f_to_ll(?);
-// ? __d_to_ull(?);
-// ? __f_to_ull(?);
-// ? __ll_to_d(?);
-// ? __ll_to_f(?);
-// ? __ull_to_d(?);
-// ? __ull_to_f(?);
-void* osViGetCurrentFramebuffer(void);
-s32 __osSpSetPc(void* pc);
-f32 absf(f32);
-
-void Regs_InitData(PlayState* play);
-
-void Setup_Init(GameState* thisx);
-void Setup_Destroy(GameState* thisx);
-void ConsoleLogo_Init(GameState* thisx);
-void ConsoleLogo_Destroy(GameState* thisx);
-void MapSelect_Init(GameState* thisx);
-void MapSelect_Destroy(GameState* thisx);
-void TitleSetup_Init(GameState* thisx);
-void TitleSetup_Destroy(GameState* thisx);
-void FileSelect_Init(GameState* thisx);
-void FileSelect_Destroy(GameState* thisx);
-
-#endif
diff --git a/include/gamealloc.h b/include/gamealloc.h
new file mode 100644
index 0000000000..c69ea35749
--- /dev/null
+++ b/include/gamealloc.h
@@ -0,0 +1,31 @@
+#ifndef GAMEALLOC_H
+#define GAMEALLOC_H
+
+#include "ultra64/ultratypes.h"
+
+typedef struct GameAllocEntry {
+ /* 0x00 */ struct GameAllocEntry* next;
+ /* 0x04 */ struct GameAllocEntry* prev;
+ /* 0x08 */ u32 size;
+ /* 0x0C */ u32 unk_0C;
+} GameAllocEntry; // size = 0x10
+
+typedef struct GameAlloc {
+ /* 0x00 */ GameAllocEntry base;
+ /* 0x10 */ GameAllocEntry* head;
+} GameAlloc; // size = 0x14
+
+#if DEBUG_FEATURES
+
+#define GAME_ALLOC_MALLOC(alloc, size, file, line) GameAlloc_MallocDebug(alloc, size, file, line)
+void* GameAlloc_MallocDebug(GameAlloc* this, u32 size, const char* file, int line);
+#else
+#define GAME_ALLOC_MALLOC(alloc, size, file, line) GameAlloc_Malloc(alloc, size)
+#endif
+
+void* GameAlloc_Malloc(GameAlloc* this, u32 size);
+void GameAlloc_Free(GameAlloc* this, void* data);
+void GameAlloc_Cleanup(GameAlloc* this);
+void GameAlloc_Init(GameAlloc* this);
+
+#endif
diff --git a/include/gfx.h b/include/gfx.h
index 5414cd5ade..6e1fcabe17 100644
--- a/include/gfx.h
+++ b/include/gfx.h
@@ -3,8 +3,13 @@
#include "ultra64.h"
#include "ultra64/gbi.h"
+#include "alignment.h"
#include "sched.h"
#include "thga.h"
+#include "versions.h"
+
+#define SCREEN_WIDTH 320
+#define SCREEN_HEIGHT 240
// Texture memory size, 4 KiB
#define TMEM_SIZE 0x1000
@@ -46,120 +51,29 @@ typedef struct GraphicsContext {
/* 0x02E8 */ s32 fbIdx;
/* 0x02EC */ void (*callback)(struct GraphicsContext*, void*);
/* 0x02F0 */ void* callbackParam;
+#if OOT_VERSION >= PAL_1_0
/* 0x02F4 */ f32 xScale;
/* 0x02F8 */ f32 yScale;
+#endif
/* 0x02FC */ char unk_2FC[0x04];
} GraphicsContext; // size = 0x300
-typedef enum SetupDL {
- /* 0 */ SETUPDL_0,
- /* 1 */ SETUPDL_1,
- /* 2 */ SETUPDL_2,
- /* 3 */ SETUPDL_3,
- /* 4 */ SETUPDL_4,
- /* 5 */ SETUPDL_5,
- /* 6 */ SETUPDL_6,
- /* 7 */ SETUPDL_7,
- /* 8 */ SETUPDL_8,
- /* 9 */ SETUPDL_9,
- /* 10 */ SETUPDL_10,
- /* 11 */ SETUPDL_11,
- /* 12 */ SETUPDL_12,
- /* 13 */ SETUPDL_13,
- /* 14 */ SETUPDL_14,
- /* 15 */ SETUPDL_15,
- /* 16 */ SETUPDL_16,
- /* 17 */ SETUPDL_17,
- /* 18 */ SETUPDL_18,
- /* 19 */ SETUPDL_19,
- /* 20 */ SETUPDL_20,
- /* 21 */ SETUPDL_21,
- /* 22 */ SETUPDL_22,
- /* 23 */ SETUPDL_23,
- /* 24 */ SETUPDL_24,
- /* 25 */ SETUPDL_25,
- /* 26 */ SETUPDL_26,
- /* 27 */ SETUPDL_27,
- /* 28 */ SETUPDL_28,
- /* 29 */ SETUPDL_29,
- /* 30 */ SETUPDL_30,
- /* 31 */ SETUPDL_31,
- /* 32 */ SETUPDL_32,
- /* 33 */ SETUPDL_33,
- /* 34 */ SETUPDL_34,
- /* 35 */ SETUPDL_35,
- /* 36 */ SETUPDL_36,
- /* 37 */ SETUPDL_37,
- /* 38 */ SETUPDL_38,
- /* 39 */ SETUPDL_39,
- /* 40 */ SETUPDL_40,
- /* 41 */ SETUPDL_41,
- /* 42 */ SETUPDL_42,
- /* 43 */ SETUPDL_43,
- /* 44 */ SETUPDL_44,
- /* 45 */ SETUPDL_45,
- /* 46 */ SETUPDL_46,
- /* 47 */ SETUPDL_47,
- /* 48 */ SETUPDL_48,
- /* 49 */ SETUPDL_49,
- /* 50 */ SETUPDL_50,
- /* 51 */ SETUPDL_51,
- /* 52 */ SETUPDL_52,
- /* 53 */ SETUPDL_53,
- /* 54 */ SETUPDL_54,
- /* 55 */ SETUPDL_55,
- /* 56 */ SETUPDL_56,
- /* 57 */ SETUPDL_57,
- /* 58 */ SETUPDL_58,
- /* 59 */ SETUPDL_59,
- /* 60 */ SETUPDL_60,
- /* 61 */ SETUPDL_61,
- /* 62 */ SETUPDL_62,
- /* 63 */ SETUPDL_63,
- /* 64 */ SETUPDL_64,
- /* 65 */ SETUPDL_65,
- /* 66 */ SETUPDL_66,
- /* 67 */ SETUPDL_67,
- /* 68 */ SETUPDL_68,
- /* 69 */ SETUPDL_69,
- /* 70 */ SETUPDL_70,
- /* 71 */ SETUPDL_MAX
-} SetupDL;
+extern Gfx gEmptyDL[];
-#define UCODE_NULL 0
-#define UCODE_F3DZEX 1
-#define UCODE_UNK 2
-#define UCODE_S2DEX 3
+Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
+Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
+Gfx* Gfx_SetFog2(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
-typedef struct UCodeInfo {
- /* 0x00 */ u32 type;
- /* 0x04 */ void* ptr;
-} UCodeInfo; // size = 0x8
-
-typedef struct UCodeDisas {
- /* 0x00 */ uintptr_t segments[NUM_SEGMENTS];
- /* 0x40 */ Gfx* dlStack[18];
- /* 0x88 */ s32 dlDepth;
- /* 0x8C */ u32 dlCnt;
- /* 0x90 */ u32 vtxCnt;
- /* 0x94 */ u32 spvtxCnt;
- /* 0x98 */ u32 tri1Cnt;
- /* 0x9C */ u32 tri2Cnt;
- /* 0xA0 */ u32 quadCnt;
- /* 0xA4 */ u32 lineCnt;
- /* 0xA8 */ u32 loaducodeCnt;
- /* 0xAC */ u32 pipeSyncRequired;
- /* 0xB0 */ u32 tileSyncRequired;
- /* 0xB4 */ u32 loadSyncRequired;
- /* 0xB8 */ u32 syncErr;
- /* 0xBC */ s32 enableLog;
- /* 0xC0 */ s32 ucodeType;
- /* 0xC4 */ s32 ucodeInfoCount;
- /* 0xC8 */ UCodeInfo* ucodeInfo;
- /* 0xCC */ u32 modeH;
- /* 0xD0 */ u32 modeL;
- /* 0xD4 */ u32 geometryMode;
-} UCodeDisas; // size = 0xD8
+Gfx* Gfx_BranchTexScroll(Gfx** gfxP, u32 x, u32 y, s32 width, s32 height);
+Gfx* func_80094E78(GraphicsContext* gfxCtx, u32 x, u32 y);
+Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height);
+Gfx* Gfx_TwoTexScroll(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, u32 x2,
+ u32 y2, s32 width2, s32 height2);
+Gfx* Gfx_TwoTexScrollEnvColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2,
+ u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a);
+Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a);
+void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b);
+void func_80095974(GraphicsContext* gfxCtx);
void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size);
void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size);
@@ -169,7 +83,7 @@ void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size);
#define POLY_XLU_DISP __gfxCtx->polyXlu.p
#define OVERLAY_DISP __gfxCtx->overlay.p
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void Graph_OpenDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, int line);
void Graph_CloseDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, int line);
@@ -209,4 +123,44 @@ void Graph_CloseDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file,
#endif
+void Graph_ThreadEntry(void*);
+
+extern u64 gMojiFontTLUTs[4][4]; // original name: "moji_tlut"
+extern u64 gMojiFontTex[]; // original name: "font_ff"
+
+/**
+ * `x` vertex x
+ * `y` vertex y
+ * `z` vertex z
+ * `s` texture s coordinate
+ * `t` texture t coordinate
+ * `crnx` red component of color vertex, or x component of normal vertex
+ * `cgny` green component of color vertex, or y component of normal vertex
+ * `cbnz` blue component of color vertex, or z component of normal vertex
+ * `a` alpha
+ */
+#define VTX(x,y,z,s,t,crnx,cgny,cbnz,a) { { { x, y, z }, 0, { s, t }, { crnx, cgny, cbnz, a } } }
+
+#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }
+
+#define gDPSetTileCustom(pkt, fmt, siz, uls, ult, lrs, lrt, pal, \
+ cms, cmt, masks, maskt, shifts, shiftt) \
+_DW({ \
+ gDPPipeSync(pkt); \
+ gDPTileSync(pkt); \
+ gDPSetTile(pkt, fmt, siz, \
+ (((((lrs) - (uls) + 1) * siz##_TILE_BYTES) + 7) >> 3), 0, \
+ G_TX_LOADTILE, 0, cmt, maskt, shiftt, cms, masks, \
+ shifts); \
+ gDPTileSync(pkt); \
+ gDPSetTile(pkt, fmt, siz, \
+ (((((lrs) - (uls) + 1) * siz##_LINE_BYTES) + 7) >> 3), 0, \
+ G_TX_RENDERTILE, pal, cmt, maskt, shiftt, cms, masks, shifts); \
+ gDPSetTileSize(pkt, G_TX_RENDERTILE, \
+ (uls) << G_TEXTURE_IMAGE_FRAC, \
+ (ult) << G_TEXTURE_IMAGE_FRAC, \
+ (lrs) << G_TEXTURE_IMAGE_FRAC, \
+ (lrt) << G_TEXTURE_IMAGE_FRAC); \
+})
+
#endif
diff --git a/include/gfx_setupdl.h b/include/gfx_setupdl.h
new file mode 100644
index 0000000000..1ba9ba06f5
--- /dev/null
+++ b/include/gfx_setupdl.h
@@ -0,0 +1,122 @@
+#ifndef GFX_SETUPDL_H
+#define GFX_SETUPDL_H
+
+#include "ultra64.h"
+
+struct GraphicsContext;
+struct PlayState;
+
+typedef enum SetupDL {
+ /* 0 */ SETUPDL_0,
+ /* 1 */ SETUPDL_1,
+ /* 2 */ SETUPDL_2,
+ /* 3 */ SETUPDL_3,
+ /* 4 */ SETUPDL_4,
+ /* 5 */ SETUPDL_5,
+ /* 6 */ SETUPDL_6,
+ /* 7 */ SETUPDL_7,
+ /* 8 */ SETUPDL_8,
+ /* 9 */ SETUPDL_9,
+ /* 10 */ SETUPDL_10,
+ /* 11 */ SETUPDL_11,
+ /* 12 */ SETUPDL_12,
+ /* 13 */ SETUPDL_13,
+ /* 14 */ SETUPDL_14,
+ /* 15 */ SETUPDL_15,
+ /* 16 */ SETUPDL_16,
+ /* 17 */ SETUPDL_17,
+ /* 18 */ SETUPDL_18,
+ /* 19 */ SETUPDL_19,
+ /* 20 */ SETUPDL_20,
+ /* 21 */ SETUPDL_21,
+ /* 22 */ SETUPDL_22,
+ /* 23 */ SETUPDL_23,
+ /* 24 */ SETUPDL_24,
+ /* 25 */ SETUPDL_25,
+ /* 26 */ SETUPDL_26,
+ /* 27 */ SETUPDL_27,
+ /* 28 */ SETUPDL_28,
+ /* 29 */ SETUPDL_29,
+ /* 30 */ SETUPDL_30,
+ /* 31 */ SETUPDL_31,
+ /* 32 */ SETUPDL_32,
+ /* 33 */ SETUPDL_33,
+ /* 34 */ SETUPDL_34,
+ /* 35 */ SETUPDL_35,
+ /* 36 */ SETUPDL_36,
+ /* 37 */ SETUPDL_37,
+ /* 38 */ SETUPDL_38,
+ /* 39 */ SETUPDL_39,
+ /* 40 */ SETUPDL_40,
+ /* 41 */ SETUPDL_41,
+ /* 42 */ SETUPDL_42,
+ /* 43 */ SETUPDL_43,
+ /* 44 */ SETUPDL_44,
+ /* 45 */ SETUPDL_45,
+ /* 46 */ SETUPDL_46,
+ /* 47 */ SETUPDL_47,
+ /* 48 */ SETUPDL_48,
+ /* 49 */ SETUPDL_49,
+ /* 50 */ SETUPDL_50,
+ /* 51 */ SETUPDL_51,
+ /* 52 */ SETUPDL_52,
+ /* 53 */ SETUPDL_53,
+ /* 54 */ SETUPDL_54,
+ /* 55 */ SETUPDL_55,
+ /* 56 */ SETUPDL_56,
+ /* 57 */ SETUPDL_57,
+ /* 58 */ SETUPDL_58,
+ /* 59 */ SETUPDL_59,
+ /* 60 */ SETUPDL_60,
+ /* 61 */ SETUPDL_61,
+ /* 62 */ SETUPDL_62,
+ /* 63 */ SETUPDL_63,
+ /* 64 */ SETUPDL_64,
+ /* 65 */ SETUPDL_65,
+ /* 66 */ SETUPDL_66,
+ /* 67 */ SETUPDL_67,
+ /* 68 */ SETUPDL_68,
+ /* 69 */ SETUPDL_69,
+ /* 70 */ SETUPDL_70,
+ /* 71 */ SETUPDL_MAX
+} SetupDL;
+
+Gfx* Gfx_SetupDL(Gfx* gfx, u32 i);
+Gfx* Gfx_SetupDL_57(Gfx* gfx);
+Gfx* Gfx_SetupDL_52NoCD(Gfx* gfx);
+void Gfx_SetupDL_57Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_51Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_54Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_26Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_25Xlu2(struct GraphicsContext* gfxCtx);
+void func_80093C80(struct PlayState* play);
+void Gfx_SetupDL_25Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_25Xlu(struct GraphicsContext* gfxCtx);
+Gfx* Gfx_SetupDL_64(Gfx* gfx);
+Gfx* Gfx_SetupDL_34(Gfx* gfx);
+void Gfx_SetupDL_44Xlu(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_36Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_28Opa(struct GraphicsContext* gfxCtx);
+Gfx* Gfx_SetupDL_28(Gfx* gfx);
+void Gfx_SetupDL_38Xlu(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_4Xlu(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_37Opa(struct GraphicsContext* gfxCtx);
+Gfx* Gfx_SetupDL_39(Gfx* gfx);
+void Gfx_SetupDL_39Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_39Overlay(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_39Ptr(Gfx** gfxP);
+void Gfx_SetupDL_40Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_41Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_47Xlu(struct GraphicsContext* gfxCtx);
+Gfx* Gfx_SetupDL_20NoCD(Gfx* gfx);
+Gfx* Gfx_SetupDL_66(Gfx* gfx);
+Gfx* func_800947AC(Gfx* gfx);
+void Gfx_SetupDL_42Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_42Overlay(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_27Xlu(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_60NoCDXlu(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_61Xlu(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_56Opa(struct GraphicsContext* gfxCtx);
+void Gfx_SetupDL_56Ptr(Gfx** gfxP);
+
+#endif
diff --git a/include/gfxalloc.h b/include/gfxalloc.h
new file mode 100644
index 0000000000..158a2a9f58
--- /dev/null
+++ b/include/gfxalloc.h
@@ -0,0 +1,10 @@
+#ifndef GFXALLOC_H
+#define GFXALLOC_H
+
+#include "ultra64.h"
+
+Gfx* Gfx_Open(Gfx* gfx);
+Gfx* Gfx_Close(Gfx* gfx, Gfx* dst);
+void* Gfx_Alloc(Gfx** gfxP, u32 size);
+
+#endif
diff --git a/include/global.h b/include/global.h
deleted file mode 100644
index d2a081a5fb..0000000000
--- a/include/global.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef GLOBAL_H
-#define GLOBAL_H
-
-#include "functions.h"
-#include "variables.h"
-#include "macros.h"
-#include "versions.h"
-
-#endif
diff --git a/include/idle.h b/include/idle.h
new file mode 100644
index 0000000000..1317775d53
--- /dev/null
+++ b/include/idle.h
@@ -0,0 +1,12 @@
+#ifndef IDLE_H
+#define IDLE_H
+
+#include "ultra64.h"
+
+void Idle_ThreadEntry(void* arg);
+
+extern OSMesgQueue gPiMgrCmdQueue;
+extern OSViMode gViConfigMode;
+extern u8 gViConfigModeType;
+
+#endif
diff --git a/include/inflate.h b/include/inflate.h
new file mode 100644
index 0000000000..6da7255f55
--- /dev/null
+++ b/include/inflate.h
@@ -0,0 +1,10 @@
+#ifndef INFLATE_H
+#define INFLATE_H
+
+#include "stddef.h"
+#include "stdint.h"
+#include "ultra64.h"
+
+void gzip_decompress(uintptr_t romStart, u8* dst, size_t size);
+
+#endif
diff --git a/include/irqmgr.h b/include/irqmgr.h
index b931977ab0..b841fb141f 100644
--- a/include/irqmgr.h
+++ b/include/irqmgr.h
@@ -46,4 +46,6 @@ void IrqMgr_RemoveClient(IrqMgr* irqMgr, IrqMgrClient* client);
extern vu32 gIrqMgrResetStatus;
extern volatile OSTime gIrqMgrRetraceTime;
+extern IrqMgr gIrqMgr;
+
#endif
diff --git a/include/is_debug.h b/include/is_debug.h
new file mode 100644
index 0000000000..18125dc16c
--- /dev/null
+++ b/include/is_debug.h
@@ -0,0 +1,18 @@
+#ifndef IS_DEBUG_H
+#define IS_DEBUG_H
+
+#include "stddef.h"
+#include "attributes.h"
+
+#if DEBUG_FEATURES
+void isPrintfInit(void);
+#endif
+
+void rmonPrintf(const char* fmt, ...);
+
+#if DEBUG_FEATURES
+void* is_proutSyncPrintf(void* arg, const char* str, size_t count);
+NORETURN void func_80002384(const char* exp, const char* file, int line);
+#endif
+
+#endif
diff --git a/include/kanread.h b/include/kanread.h
new file mode 100644
index 0000000000..bea4831c81
--- /dev/null
+++ b/include/kanread.h
@@ -0,0 +1,8 @@
+#ifndef KANREAD_H
+#define KANREAD_H
+
+#include "ultra64/ultratypes.h"
+
+s32 Kanji_OffsetFromShiftJIS(s32 sjis);
+
+#endif
diff --git a/include/language_array.h b/include/language_array.h
new file mode 100644
index 0000000000..b93dbd4e0e
--- /dev/null
+++ b/include/language_array.h
@@ -0,0 +1,12 @@
+#ifndef LANGUAGE_ARRAY_H
+#define LANGUAGE_ARRAY_H
+
+#include "versions.h"
+
+#if OOT_NTSC
+#define LANGUAGE_ARRAY(jpn, eng, ger, fra) { jpn, eng }
+#else
+#define LANGUAGE_ARRAY(jpn, eng, ger, fra) { eng, ger, fra }
+#endif
+
+#endif
diff --git a/include/letterbox.h b/include/letterbox.h
new file mode 100644
index 0000000000..48d6ea7c13
--- /dev/null
+++ b/include/letterbox.h
@@ -0,0 +1,14 @@
+#ifndef LETTERBOX_H
+#define LETTERBOX_H
+
+#include "ultra64.h"
+
+void Letterbox_SetSizeTarget(s32 target);
+u32 Letterbox_GetSizeTarget(void);
+void Letterbox_SetSize(s32 size);
+u32 Letterbox_GetSize(void);
+void Letterbox_Init(void);
+void Letterbox_Destroy(void);
+void Letterbox_Update(s32 updateRate);
+
+#endif
diff --git a/include/libc/assert.h b/include/libc/assert.h
index 96393c0e7c..de54b8a79c 100644
--- a/include/libc/assert.h
+++ b/include/libc/assert.h
@@ -29,7 +29,7 @@ __attribute__((noreturn)) void __assert(const char* assertion, const char* file,
// Static/compile-time assertions
-#if defined(__GNUC__) || (__STDC_VERSION__ >= 201112L)
+#if !defined(__sgi) && (__GNUC__ >= 5 || __STDC_VERSION__ >= 201112L)
# define static_assert(cond, msg) _Static_assert(cond, msg)
#else
# ifndef GLUE
diff --git a/include/libc/math.h b/include/libc/math.h
index b46b6cd911..4389b576ef 100644
--- a/include/libc/math.h
+++ b/include/libc/math.h
@@ -61,6 +61,10 @@ f64 sqrt(f64 f);
#endif
#if !PLATFORM_N64
+extern float gPositiveInfinity;
+extern float gNegativeInfinity;
+extern float gPositiveZero;
+extern float gNegativeZero;
extern float qNaN0x3FFFFF;
extern float qNaN0x10000;
extern float sNaN0x3FFFFF;
diff --git a/include/libc/stdarg.h b/include/libc/stdarg.h
index 35ce4f944e..717299ccd6 100644
--- a/include/libc/stdarg.h
+++ b/include/libc/stdarg.h
@@ -1,16 +1,7 @@
#ifndef STDARG_H
#define STDARG_H
-// When building with GCC, use the official vaarg macros to avoid warnings and possibly bad codegen.
-
-#ifdef __GNUC__
-
-#define va_list __builtin_va_list
-#define va_start __builtin_va_start
-#define va_arg __builtin_va_arg
-#define va_end __builtin_va_end
-
-#else
+#if defined(__sgi) /* IDO */
#ifndef _VA_LIST_
# define _VA_LIST_
@@ -52,6 +43,37 @@ typedef char* va_list;
/* No cleanup processing is required for the end of a varargs list: */
#define va_end(__list)
-#endif /* __GNUC__ */
+#elif defined(EGCS) /* EGCS */
+
+typedef char * __gnuc_va_list;
+
+#define __va_rounded_size(__TYPE) \
+ (((sizeof (__TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
+
+#define va_start(__AP, __LASTARG) \
+ (__AP = (__gnuc_va_list) __builtin_next_arg (__LASTARG))
+
+#define va_end(__AP) ((void)0)
+
+/* We cast to void * and then to TYPE * because this avoids
+ a warning about increasing the alignment requirement. */
+#define va_arg(__AP, __type) \
+ ((__type *) (void *) (__AP = (char *) ((__alignof__(__type) > 4 \
+ ? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \
+ : ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \
+ + __va_rounded_size (__type))), \
+ *(__type *) (void *) (__AP - __va_rounded_size (__type)))
+
+typedef __gnuc_va_list va_list;
+
+#else /* Modern GCC */
+
+// When building with modern GCC, use the official vaarg macros to avoid warnings and possibly bad codegen.
+#define va_list __builtin_va_list
+#define va_start __builtin_va_start
+#define va_arg __builtin_va_arg
+#define va_end __builtin_va_end
+
+#endif
#endif
diff --git a/include/libc/stddef.h b/include/libc/stddef.h
index 45620895ee..0c0926ba6b 100644
--- a/include/libc/stddef.h
+++ b/include/libc/stddef.h
@@ -15,7 +15,7 @@ typedef unsigned long size_t;
#endif
-#ifdef __GNUC__
+#if __GNUC__ >= 4
#define offsetof(structure, member) __builtin_offsetof (structure, member)
#else
#define offsetof(structure, member) ((size_t)&(((structure*)0)->member))
diff --git a/include/libc64/malloc.h b/include/libc64/malloc.h
index b9ae324b96..02540e3530 100644
--- a/include/libc64/malloc.h
+++ b/include/libc64/malloc.h
@@ -15,14 +15,23 @@ void SystemArena_Init(void* start, u32 size);
void SystemArena_Cleanup(void);
s32 SystemArena_IsInitialized(void);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
+#define SYSTEM_ARENA_MALLOC(size, file, line) SystemArena_MallocDebug(size, file, line)
+#define SYSTEM_ARENA_MALLOC_R(size, file, line) SystemArena_MallocRDebug(size, file, line)
+#define SYSTEM_ARENA_FREE(size, file, line) SystemArena_FreeDebug(size, file, line)
+
void* SystemArena_MallocDebug(u32 size, const char* file, int line);
void* SystemArena_MallocRDebug(u32 size, const char* file, int line);
void* SystemArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line);
void SystemArena_FreeDebug(void* ptr, const char* file, int line);
void SystemArena_Display(void);
+#else
+#define SYSTEM_ARENA_MALLOC(size, file, line) SystemArena_Malloc(size)
+#define SYSTEM_ARENA_MALLOC_R(size, file, line) SystemArena_MallocR(size)
+#define SYSTEM_ARENA_FREE(size, file, line) SystemArena_Free(size)
#endif
extern Arena gSystemArena;
+extern s32 gSystemArenaLogSeverity;
#endif
diff --git a/include/libc64/os_malloc.h b/include/libc64/os_malloc.h
index e31a6f08fa..c4942573c4 100644
--- a/include/libc64/os_malloc.h
+++ b/include/libc64/os_malloc.h
@@ -11,7 +11,7 @@ typedef struct Arena {
#if PLATFORM_N64
/* 0x08 */ u32 size;
/* 0x0C */ u8 allocFailures;
-#elif PLATFORM_GC
+#else
/* 0x08 */ OSMesgQueue lockQueue;
/* 0x20 */ u8 allocFailures; // only used in non-debug builds
/* 0x21 */ u8 isInit;
@@ -25,7 +25,7 @@ typedef struct ArenaNode {
/* 0x04 */ u32 size;
/* 0x08 */ struct ArenaNode* next;
/* 0x0C */ struct ArenaNode* prev;
-#if PLATFORM_N64 || OOT_DEBUG
+#if PLATFORM_N64 || DEBUG_FEATURES
/* 0x10 */ const char* filename;
/* 0x14 */ int line;
/* 0x18 */ OSId threadId;
@@ -57,15 +57,19 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize);
void ArenaImpl_GetSizes(Arena* arena, u32* outMaxFree, u32* outFree, u32* outAlloc);
s32 __osCheckArena(Arena* arena);
-#if OOT_DEBUG
+#if PLATFORM_N64 || DEBUG_FEATURES
void* __osMallocDebug(Arena* arena, u32 size, const char* file, int line);
void* __osMallocRDebug(Arena* arena, u32 size, const char* file, int line);
void __osFreeDebug(Arena* arena, void* ptr, const char* file, int line);
void* __osReallocDebug(Arena* arena, void* ptr, u32 newSize, const char* file, int line);
-void __osDisplayArena(Arena* arena);
+#endif
+#if !PLATFORM_N64 && DEBUG_FEATURES
+void __osDisplayArena(Arena* arena);
extern u32 __osMalloc_FreeBlockTest_Enable;
-#else
+#endif
+
+#if PLATFORM_N64
extern u32 gTotalAllocFailures;
#endif
diff --git a/include/libc64/sprintf.h b/include/libc64/sprintf.h
index 485f938f58..55e10045ea 100644
--- a/include/libc64/sprintf.h
+++ b/include/libc64/sprintf.h
@@ -1,8 +1,6 @@
#ifndef LIBC64_SPRINTF_H
#define LIBC64_SPRINTF_H
-#include "ultra64.h"
-
#include "stdarg.h"
int vsprintf(char* dst, const char* fmt, va_list args);
diff --git a/include/libu64/debug.h b/include/libu64/debug.h
new file mode 100644
index 0000000000..87015afde8
--- /dev/null
+++ b/include/libu64/debug.h
@@ -0,0 +1,51 @@
+#ifndef LIBU64_DEBUG_H
+#define LIBU64_DEBUG_H
+
+#include "ultra64.h"
+
+#if DEBUG_FEATURES
+#define LOG(exp, value, format, file, line) \
+ do { \
+ LogUtils_LogThreadId(file, line); \
+ osSyncPrintf(exp " = " format "\n", value); \
+ } while (0)
+#else
+#define LOG(exp, value, format, file, line) (void)(value)
+#endif
+
+#define LOG_STRING(string, file, line) LOG(#string, string, "%s", file, line)
+#define LOG_ADDRESS(exp, value, file, line) LOG(exp, value, "%08x", file, line)
+#define LOG_TIME(exp, value, file, line) LOG(exp, value, "%lld", file, line)
+#define LOG_NUM(exp, value, file, line) LOG(exp, value, "%d", file, line)
+#define LOG_HEX(exp, value, file, line) LOG(exp, value, "%x", file, line)
+#define LOG_HEX32(exp, value, file, line) LOG(exp, value, "%08x", file, line)
+#define LOG_FLOAT(exp, value, file, line) LOG(exp, value, "%f", file, line)
+
+#if PLATFORM_N64 || DEBUG_FEATURES
+f32 LogUtils_CheckFloatRange(const char* exp, int line, const char* valueName, f32 value, const char* minName, f32 min,
+ const char* maxName, f32 max);
+#endif
+
+#if DEBUG_FEATURES
+#define LOG_UTILS_CHECK_NULL_POINTER(exp, ptr, file, line) LogUtils_CheckNullPointer(exp, ptr, file, line)
+#define LOG_UTILS_CHECK_VALID_POINTER(exp, ptr, file, line) LogUtils_CheckValidPointer(exp, ptr, file, line)
+
+s32 LogUtils_CheckIntRange(const char* exp, int line, const char* valueName, s32 value, const char* minName, s32 min,
+ const char* maxName, s32 max);
+void LogUtils_LogHexDump(void* ptr, s32 size0);
+void LogUtils_LogPointer(s32 value, u32 max, void* ptr, const char* name, const char* file, int line);
+void LogUtils_CheckBoundary(const char* name, s32 value, s32 unk, const char* file, int line);
+void LogUtils_CheckNullPointer(const char* exp, void* ptr, const char* file, int line);
+void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, int line);
+void LogUtils_LogThreadId(const char* name, int line);
+#else
+
+#define LOG_UTILS_CHECK_NULL_POINTER(exp, ptr, file, line) (void)0
+#define LOG_UTILS_CHECK_VALID_POINTER(exp, ptr, file, line) (void)0
+
+#endif
+
+void LogUtils_HungupThread(const char* name, int line);
+void LogUtils_ResetHungup(void);
+
+#endif
diff --git a/include/gfxprint.h b/include/libu64/gfxprint.h
similarity index 96%
rename from include/gfxprint.h
rename to include/libu64/gfxprint.h
index 039b564b4b..4106d9fd1c 100644
--- a/include/gfxprint.h
+++ b/include/libu64/gfxprint.h
@@ -1,5 +1,5 @@
-#ifndef GFXPRINT_H
-#define GFXPRINT_H
+#ifndef LIBU64_GFXPRINT_H
+#define LIBU64_GFXPRINT_H
#include "ultra64.h"
#include "color.h"
diff --git a/include/libu64/mtxuty-cvt.h b/include/libu64/mtxuty-cvt.h
new file mode 100644
index 0000000000..636978bb6f
--- /dev/null
+++ b/include/libu64/mtxuty-cvt.h
@@ -0,0 +1,9 @@
+#ifndef LIBU64_MTXUTY_CVT_H
+#define LIBU64_MTXUTY_CVT_H
+
+#include "ultra64.h"
+
+void MtxConv_F2L(Mtx* m1, MtxF* m2);
+void MtxConv_L2F(MtxF* m1, Mtx* m2);
+
+#endif
diff --git a/include/libu64/overlay.h b/include/libu64/overlay.h
new file mode 100644
index 0000000000..47f3276576
--- /dev/null
+++ b/include/libu64/overlay.h
@@ -0,0 +1,42 @@
+#ifndef LIBU64_OVERLAY_H
+#define LIBU64_OVERLAY_H
+
+#include "ultra64.h"
+
+/* Relocation entry field getters */
+#define RELOC_SECTION(reloc) ((reloc) >> 30)
+#define RELOC_OFFSET(reloc) ((reloc) & 0xFFFFFF)
+#define RELOC_TYPE_MASK(reloc) ((reloc) & 0x3F000000)
+#define RELOC_TYPE_SHIFT 24
+
+/* MIPS Relocation Types, matches the MIPS ELF spec */
+#define R_MIPS_32 2
+#define R_MIPS_26 4
+#define R_MIPS_HI16 5
+#define R_MIPS_LO16 6
+
+/* Reloc section id, must fit in 2 bits otherwise the relocation format must be modified */
+typedef enum RelocSectionId {
+ /* 0 */ RELOC_SECTION_NULL,
+ /* 1 */ RELOC_SECTION_TEXT,
+ /* 2 */ RELOC_SECTION_DATA,
+ /* 3 */ RELOC_SECTION_RODATA,
+ /* 4 */ RELOC_SECTION_MAX
+} RelocSectionId;
+
+typedef struct OverlayRelocationSection {
+ /* 0x00 */ u32 textSize;
+ /* 0x04 */ u32 dataSize;
+ /* 0x08 */ u32 rodataSize;
+ /* 0x0C */ u32 bssSize;
+ /* 0x10 */ u32 nRelocations;
+ /* 0x14 */ u32 relocations[1]; // size is nRelocations
+} OverlayRelocationSection; // size >= 0x18
+
+extern s32 gOverlayLogSeverity;
+
+void* Overlay_AllocateAndLoad(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd);
+void Overlay_Relocate(void* allocatedRamAddr, OverlayRelocationSection* ovlRelocs, void* vramStart);
+size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd, void* allocatedRamAddr);
+
+#endif
diff --git a/include/libu64/pad.h b/include/libu64/pad.h
new file mode 100644
index 0000000000..f5ab44d8c4
--- /dev/null
+++ b/include/libu64/pad.h
@@ -0,0 +1,31 @@
+#ifndef LIBU64_PAD_H
+#define LIBU64_PAD_H
+
+#include "ultra64.h"
+
+typedef struct Input {
+ /* 0x00 */ OSContPad cur;
+ /* 0x06 */ OSContPad prev;
+ /* 0x0C */ OSContPad press; // X/Y store delta from last frame
+ /* 0x12 */ OSContPad rel; // X/Y store adjusted
+} Input; // size = 0x18
+
+void PadUtils_Init(Input* input);
+void func_800FCB70(void);
+void PadUtils_ResetPressRel(Input* input);
+u32 PadUtils_CheckCurExact(Input* input, u16 value);
+u32 PadUtils_CheckCur(Input* input, u16 key);
+u32 PadUtils_CheckPressed(Input* input, u16 key);
+u32 PadUtils_CheckReleased(Input* input, u16 key);
+u16 PadUtils_GetCurButton(Input* input);
+u16 PadUtils_GetPressButton(Input* input);
+s8 PadUtils_GetCurX(Input* input);
+s8 PadUtils_GetCurY(Input* input);
+void PadUtils_SetRelXY(Input* input, s32 x, s32 y);
+s8 PadUtils_GetRelXImpl(Input* input);
+s8 PadUtils_GetRelYImpl(Input* input);
+s8 PadUtils_GetRelX(Input* input);
+s8 PadUtils_GetRelY(Input* input);
+void PadUtils_UpdateRelXY(Input* input);
+
+#endif
diff --git a/include/libu64/padsetup.h b/include/libu64/padsetup.h
new file mode 100644
index 0000000000..0aab4a729c
--- /dev/null
+++ b/include/libu64/padsetup.h
@@ -0,0 +1,8 @@
+#ifndef LIBU64_PADSETUP_H
+#define LIBU64_PADSETUP_H
+
+#include "ultra64.h"
+
+s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status);
+
+#endif
diff --git a/include/libu64/rcp_utils.h b/include/libu64/rcp_utils.h
new file mode 100644
index 0000000000..7582305142
--- /dev/null
+++ b/include/libu64/rcp_utils.h
@@ -0,0 +1,6 @@
+#ifndef LIBU64_RCP_UTILS_H
+#define LIBU64_RCP_UTILS_H
+
+void RcpUtils_Reset(void);
+
+#endif
diff --git a/include/libu64/runtime.h b/include/libu64/runtime.h
new file mode 100644
index 0000000000..7df947cef5
--- /dev/null
+++ b/include/libu64/runtime.h
@@ -0,0 +1,8 @@
+#ifndef LIBU64_RUNTIME_H
+#define LIBU64_RUNTIME_H
+
+#include "ultra64.h"
+
+void Runtime_Init(void* start, u32 size);
+
+#endif
diff --git a/include/line_numbers.h b/include/line_numbers.h
new file mode 100644
index 0000000000..adc2d654d5
--- /dev/null
+++ b/include/line_numbers.h
@@ -0,0 +1,69 @@
+#ifndef LINE_NUMBERS_H
+#define LINE_NUMBERS_H
+
+#include "versions.h"
+
+// The macros in this file serve to reduce clutter from version differences that are only due to line numbers being different.
+
+// The "LN" macros defined here are not meant to be used directly. See the wrapper macros below.
+#if OOT_VERSION == NTSC_1_0
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (ntsc_1_0)
+#elif OOT_VERSION == NTSC_1_1
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (ntsc_1_1)
+#elif OOT_VERSION == PAL_1_0
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (pal_1_0)
+#elif OOT_VERSION == NTSC_1_2
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (ntsc_1_2)
+#elif OOT_VERSION == PAL_1_1
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (pal_1_1)
+#elif OOT_VERSION == GC_JP
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (gc_jp)
+#elif OOT_VERSION == GC_JP_MQ
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (gc_jp_mq)
+#elif OOT_VERSION == GC_US
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (gc_us)
+#elif OOT_VERSION == GC_US_MQ
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (gc_us_mq)
+#elif OOT_VERSION == GC_EU_MQ_DBG
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (gc_eu_mq_dbg)
+#elif OOT_VERSION == GC_EU
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (gc_eu)
+#elif OOT_VERSION == GC_EU_MQ
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (gc_eu_mq)
+#elif OOT_VERSION == GC_JP_CE
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (gc_jp_ce)
+#elif OOT_VERSION == IQUE_CN
+#define LN(ntsc_1_0, ntsc_1_1, pal_1_0, ntsc_1_2, pal_1_1, gc_jp, gc_jp_mq, gc_us, gc_us_mq, gc_eu_mq_dbg, gc_eu, gc_eu_mq, gc_jp_ce, ique_cn) (ique_cn)
+#else
+#error "Unsupported OOT version"
+#endif
+
+/**
+ * These wrappers exist to remove duplication of line numbers being passed to LN.
+ * The wrappers have ambiguous names purposefully so they are short and don't add clutter.
+ *
+ * The groupings of different line numbers are difficult to name, as the exact grouping
+ * depends on which versions happen to have changes in a given file.
+ */
+
+// NTSC 1.0 and all the other versions
+#define LN1(ntsc_1_0, other) \
+ LN(ntsc_1_0, other, other, other, other, other, other, other, other, other, other, other, other, other)
+
+// NTSC 1.0, NTSC 1.1, and all the other versions
+#define LN2(ntsc_1_0, ntsc_1_1, other) \
+ LN(ntsc_1_0, ntsc_1_1, other, other, other, other, other, other, other, other, other, other, other, other)
+
+// NTSC 1.0, iQue, GameCube, and all the other versions
+#define LN3(ntsc_1_0, other, ique, gc) \
+ LN(ntsc_1_0, other, other, other, other, gc, gc, gc, gc, gc, gc, gc, gc, ique)
+
+// NTSC 1.0, NTSC 1.1, iQue, GameCube, and all the other versions
+#define LN4(ntsc_1_0, ntsc_1_1, other, ique, gc) \
+ LN(ntsc_1_0, ntsc_1_1, other, other, other, gc, gc, gc, gc, gc, gc, gc, gc, ique)
+
+// NTSC 1.0, NTSC 1.1, NTSC 1.2/PAL 1.0, iQue, Gamecube US/JP, Gamecube EU, and Gamecube CE
+#define LN5(ntsc_1_0, ntsc_1_1, other, pal_1_1, ique, gc_ntsc, gc_eu, gc_jp_ce) \
+ LN(ntsc_1_0, ntsc_1_1, other, other, pal_1_1, gc_ntsc, gc_ntsc, gc_ntsc, gc_ntsc, gc_eu, gc_eu, gc_eu, gc_jp_ce, ique)
+
+#endif
diff --git a/include/listalloc.h b/include/listalloc.h
new file mode 100644
index 0000000000..76321a3e87
--- /dev/null
+++ b/include/listalloc.h
@@ -0,0 +1,16 @@
+#ifndef LISTALLOC_H
+#define LISTALLOC_H
+
+#include "ultra64/ultratypes.h"
+
+typedef struct ListAlloc {
+ /* 0x00 */ struct ListAlloc* prev;
+ /* 0x04 */ struct ListAlloc* next;
+} ListAlloc; // size = 0x8
+
+ListAlloc* ListAlloc_Init(ListAlloc* this);
+void* ListAlloc_Alloc(ListAlloc* this, u32 size);
+void ListAlloc_Free(ListAlloc* this, void* data);
+void ListAlloc_FreeAll(ListAlloc* this);
+
+#endif
diff --git a/include/macros.h b/include/macros.h
deleted file mode 100644
index 5a34933c9d..0000000000
--- a/include/macros.h
+++ /dev/null
@@ -1,252 +0,0 @@
-#ifndef MACROS_H
-#define MACROS_H
-
-#include "versions.h"
-
-#ifndef AVOID_UB
-#define BAD_RETURN(type) type
-#else
-#define BAD_RETURN(type) void
-#endif
-
-/**
- * The T macro holds translations in English for original debug strings written in Japanese.
- * The translated strings match the original debug strings, they are only direct translations.
- * For example, any original name is left as is rather than being replaced with the name in the codebase.
- */
-#define T(jp, en) jp
-
-#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
-#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
-
-#define PHYSICAL_TO_VIRTUAL(addr) (void*)((uintptr_t)(addr) + 0x80000000)
-#define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - 0x80000000)
-
-#define ABS(x) ((x) >= 0 ? (x) : -(x))
-#define DECR(x) ((x) == 0 ? 0 : --(x))
-#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
-#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
-#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
-
-#define SWAP(type, a, b) \
- { \
- type _temp = (a); \
- (a) = (b); \
- (b) = _temp; \
- } \
- (void)0
-
-#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0))
-
-#define LINK_IS_ADULT (gSaveContext.save.linkAge == LINK_AGE_ADULT)
-#define LINK_IS_CHILD (gSaveContext.save.linkAge == LINK_AGE_CHILD)
-
-#define YEARS_CHILD 5
-#define YEARS_ADULT 17
-#define LINK_AGE_IN_YEARS (!LINK_IS_ADULT ? YEARS_CHILD : YEARS_ADULT)
-
-#define CLOCK_TIME(hr, min) ((s32)(((hr) * 60 + (min)) * (f32)0x10000 / (24 * 60) + 0.5f))
-
-#define IS_DAY (gSaveContext.save.nightFlag == 0)
-#define IS_NIGHT (gSaveContext.save.nightFlag == 1)
-
-#define SLOT(item) gItemSlots[item]
-#define INV_CONTENT(item) gSaveContext.save.info.inventory.items[SLOT(item)]
-#define AMMO(item) gSaveContext.save.info.inventory.ammo[SLOT(item)]
-#define BEANS_BOUGHT AMMO(ITEM_MAGIC_BEAN + 1)
-
-#define ALL_EQUIP_VALUE(equip) ((s32)(gSaveContext.save.info.inventory.equipment & gEquipMasks[equip]) >> gEquipShifts[equip])
-#define CUR_EQUIP_VALUE(equip) ((s32)(gSaveContext.save.info.equips.equipment & gEquipMasks[equip]) >> gEquipShifts[equip])
-#define OWNED_EQUIP_FLAG(equip, value) (gBitFlags[value] << gEquipShifts[equip])
-#define OWNED_EQUIP_FLAG_ALT(equip, value) ((1 << (value)) << gEquipShifts[equip])
-#define CHECK_OWNED_EQUIP(equip, value) (OWNED_EQUIP_FLAG(equip, value) & gSaveContext.save.info.inventory.equipment)
-#define CHECK_OWNED_EQUIP_ALT(equip, value) (gBitFlags[(value) + (equip) * 4] & gSaveContext.save.info.inventory.equipment)
-
-#define SWORD_EQUIP_TO_PLAYER(swordEquip) (swordEquip)
-#define SHIELD_EQUIP_TO_PLAYER(shieldEquip) (shieldEquip)
-#define TUNIC_EQUIP_TO_PLAYER(tunicEquip) ((tunicEquip) - 1)
-#define BOOTS_EQUIP_TO_PLAYER(bootsEquip) ((bootsEquip) - 1)
-
-#define CUR_UPG_VALUE(upg) ((s32)(gSaveContext.save.info.inventory.upgrades & gUpgradeMasks[upg]) >> gUpgradeShifts[upg])
-#define CAPACITY(upg, value) gUpgradeCapacities[upg][value]
-#define CUR_CAPACITY(upg) CAPACITY(upg, CUR_UPG_VALUE(upg))
-
-#define CHECK_QUEST_ITEM(item) (gBitFlags[item] & gSaveContext.save.info.inventory.questItems)
-#define CHECK_DUNGEON_ITEM(item, dungeonIndex) (gSaveContext.save.info.inventory.dungeonItems[dungeonIndex] & gBitFlags[item])
-
-#define GET_GS_FLAGS(index) \
- ((gSaveContext.save.info.gsFlags[(index) >> 2] & gGsFlagsMasks[(index) & 3]) >> gGsFlagsShifts[(index) & 3])
-#define SET_GS_FLAGS(index, value) \
- (gSaveContext.save.info.gsFlags[(index) >> 2] |= (value) << gGsFlagsShifts[(index) & 3])
-
-#define HIGH_SCORE(score) (gSaveContext.save.info.highScores[score])
-
-#define GET_EVENTCHKINF(flag) (gSaveContext.save.info.eventChkInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
-#define SET_EVENTCHKINF(flag) (gSaveContext.save.info.eventChkInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
-#define CLEAR_EVENTCHKINF(flag) (gSaveContext.save.info.eventChkInf[(flag) >> 4] &= ~(1 << ((flag) & 0xF)))
-
-#define GET_ITEMGETINF(flag) (gSaveContext.save.info.itemGetInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
-#define SET_ITEMGETINF(flag) (gSaveContext.save.info.itemGetInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
-
-#define GET_INFTABLE(flag) (gSaveContext.save.info.infTable[(flag) >> 4] & (1 << ((flag) & 0xF)))
-#define SET_INFTABLE(flag) (gSaveContext.save.info.infTable[(flag) >> 4] |= (1 << ((flag) & 0xF)))
-#define CLEAR_INFTABLE(flag) (gSaveContext.save.info.infTable[(flag) >> 4] &= ~(1 << ((flag) & 0xF)))
-
-#define GET_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
-#define SET_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
-#define CLEAR_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] &= ~(1 << ((flag) & 0xF)))
-
-#define B_BTN_ITEM ((gSaveContext.buttonStatus[0] == ITEM_NONE) \
- ? ITEM_NONE \
- : (gSaveContext.save.info.equips.buttonItems[0] == ITEM_GIANTS_KNIFE) \
- ? ITEM_SWORD_BIGGORON \
- : gSaveContext.save.info.equips.buttonItems[0])
-
-#define C_BTN_ITEM(button) ((gSaveContext.buttonStatus[(button) + 1] != BTN_DISABLED) \
- ? gSaveContext.save.info.equips.buttonItems[(button) + 1] \
- : ITEM_NONE)
-
-#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))
-
-// IDO doesn't support variadic macros, but it merely throws a warning for the
-// number of arguments not matching the definition (warning 609) instead of
-// throwing an error. We suppress this warning and rely on GCC to catch macro
-// argument errors instead.
-// Note some tools define __sgi but preprocess with a modern cpp implementation,
-// ensure that these do not use the IDO workaround to avoid errors.
-#define IDO_PRINTF_WORKAROUND (__sgi && !__GNUC__ && !M2CTX)
-
-#if OOT_DEBUG
-#define PRINTF osSyncPrintf
-#elif IDO_PRINTF_WORKAROUND
-#define PRINTF(args) (void)0
-#else
-#define PRINTF(format, ...) (void)0
-#endif
-
-#if OOT_DEBUG
-#define LOG(exp, value, format, file, line) \
- do { \
- LogUtils_LogThreadId(file, line); \
- osSyncPrintf(exp " = " format "\n", value); \
- } while (0)
-#else
-#define LOG(exp, value, format, file, line) (void)(value)
-#endif
-
-#define LOG_STRING(string, file, line) LOG(#string, string, "%s", file, line)
-#define LOG_ADDRESS(exp, value, file, line) LOG(exp, value, "%08x", file, line)
-#define LOG_TIME(exp, value, file, line) LOG(exp, value, "%lld", file, line)
-#define LOG_NUM(exp, value, file, line) LOG(exp, value, "%d", file, line)
-#define LOG_HEX(exp, value, file, line) LOG(exp, value, "%x", file, line)
-#define LOG_HEX32(exp, value, file, line) LOG(exp, value, "%08x", file, line)
-#define LOG_FLOAT(exp, value, file, line) LOG(exp, value, "%f", file, line)
-
-#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
- do { \
- GameState* state = curState; \
- \
- (state)->init = newInit; \
- (state)->size = sizeof(newStruct); \
- } while (0)
-
-#define SET_FULLSCREEN_VIEWPORT(view) \
- { \
- Viewport viewport; \
- viewport.bottomY = SCREEN_HEIGHT; \
- viewport.rightX = SCREEN_WIDTH; \
- viewport.topY = 0; \
- viewport.leftX = 0; \
- View_SetViewport(view, &viewport); \
- } \
- (void)0
-
-#if OOT_DEBUG
-
-#define DMA_REQUEST_SYNC(ram, vrom, size, file, line) DmaMgr_RequestSyncDebug(ram, vrom, size, file, line)
-#define DMA_REQUEST_ASYNC(req, ram, vrom, size, unk5, queue, msg, file, line) DmaMgr_RequestAsyncDebug(req, ram, vrom, size, unk5, queue, msg, file, line)
-#define GAME_STATE_ALLOC(gameState, size, file, line) GameState_Alloc(gameState, size, file, line)
-#define DEBUG_ARENA_MALLOC(size, file, line) DebugArena_MallocDebug(size, file, line)
-#define DEBUG_ARENA_MALLOC_R(size, file, line) DebugArena_MallocRDebug(size, file, line)
-#define DEBUG_ARENA_FREE(size, file, line) DebugArena_FreeDebug(size, file, line)
-#define SYSTEM_ARENA_MALLOC(size, file, line) SystemArena_MallocDebug(size, file, line)
-#define SYSTEM_ARENA_MALLOC_R(size, file, line) SystemArena_MallocRDebug(size, file, line)
-#define SYSTEM_ARENA_FREE(size, file, line) SystemArena_FreeDebug(size, file, line)
-#define ZELDA_ARENA_MALLOC(size, file, line) ZeldaArena_MallocDebug(size, file, line)
-#define ZELDA_ARENA_MALLOC_R(size, file, line) ZeldaArena_MallocRDebug(size, file, line)
-#define ZELDA_ARENA_FREE(size, file, line) ZeldaArena_FreeDebug(size, file, line)
-#define LOG_UTILS_CHECK_NULL_POINTER(exp, ptr, file, line) LogUtils_CheckNullPointer(exp, ptr, file, line)
-#define LOG_UTILS_CHECK_VALID_POINTER(exp, ptr, file, line) LogUtils_CheckValidPointer(exp, ptr, file, line)
-#define GAME_ALLOC_MALLOC(alloc, size, file, line) GameAlloc_MallocDebug(alloc, size, file, line)
-
-#else
-
-#define DMA_REQUEST_SYNC(ram, vrom, size, file, line) DmaMgr_RequestSync(ram, vrom, size)
-#define DMA_REQUEST_ASYNC(req, ram, vrom, size, unk5, queue, msg, file, line) DmaMgr_RequestAsync(req, ram, vrom, size, unk5, queue, msg)
-#define GAME_STATE_ALLOC(gameState, size, file, line) THA_AllocTailAlign16(&(gameState)->tha, size)
-#define DEBUG_ARENA_MALLOC(size, file, line) DebugArena_Malloc(size)
-#define DEBUG_ARENA_MALLOC_R(size, file, line) DebugArena_MallocR(size)
-#define DEBUG_ARENA_FREE(size, file, line) DebugArena_Free(size)
-#define SYSTEM_ARENA_MALLOC(size, file, line) SystemArena_Malloc(size)
-#define SYSTEM_ARENA_MALLOC_R(size, file, line) SystemArena_MallocR(size)
-#define SYSTEM_ARENA_FREE(size, file, line) SystemArena_Free(size)
-#define ZELDA_ARENA_MALLOC(size, file, line) ZeldaArena_Malloc(size)
-#define ZELDA_ARENA_MALLOC_R(size, file, line) ZeldaArena_MallocR(size)
-#define ZELDA_ARENA_FREE(size, file, line) ZeldaArena_Free(size)
-#define LOG_UTILS_CHECK_NULL_POINTER(exp, ptr, file, line) (void)0
-#define LOG_UTILS_CHECK_VALID_POINTER(exp, ptr, file, line) (void)0
-#define GAME_ALLOC_MALLOC(alloc, size, file, line) GameAlloc_Malloc(alloc, size)
-
-#endif
-
-#if PLATFORM_N64 || OOT_DEBUG
-#define HUNGUP_AND_CRASH(file, line) Fault_AddHungupAndCrash(file, line)
-#else
-#define HUNGUP_AND_CRASH(file, line) LogUtils_HungupThread(file, line)
-#endif
-
-#define MATRIX_FINALIZE_AND_LOAD(pkt, gfxCtx, file, line) \
- gSPMatrix(pkt, MATRIX_FINALIZE(gfxCtx, file, line), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW)
-
-#if OOT_NTSC
-#define LANGUAGE_ARRAY(jpn, eng, ger, fra) { jpn, eng }
-#else
-#define LANGUAGE_ARRAY(jpn, eng, ger, fra) { eng, ger, fra }
-#endif
-
-/**
- * `x` vertex x
- * `y` vertex y
- * `z` vertex z
- * `s` texture s coordinate
- * `t` texture t coordinate
- * `crnx` red component of color vertex, or x component of normal vertex
- * `cgny` green component of color vertex, or y component of normal vertex
- * `cbnz` blue component of color vertex, or z component of normal vertex
- * `a` alpha
- */
-#define VTX(x,y,z,s,t,crnx,cgny,cbnz,a) { { { x, y, z }, 0, { s, t }, { crnx, cgny, cbnz, a } } }
-
-#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }
-
-#define gDPSetTileCustom(pkt, fmt, siz, uls, ult, lrs, lrt, pal, \
- cms, cmt, masks, maskt, shifts, shiftt) \
-_DW({ \
- gDPPipeSync(pkt); \
- gDPTileSync(pkt); \
- gDPSetTile(pkt, fmt, siz, \
- (((((lrs) - (uls) + 1) * siz##_TILE_BYTES) + 7) >> 3), 0, \
- G_TX_LOADTILE, 0, cmt, maskt, shiftt, cms, masks, \
- shifts); \
- gDPTileSync(pkt); \
- gDPSetTile(pkt, fmt, siz, \
- (((((lrs) - (uls) + 1) * siz##_LINE_BYTES) + 7) >> 3), 0, \
- G_TX_RENDERTILE, pal, cmt, maskt, shiftt, cms, masks, shifts); \
- gDPSetTileSize(pkt, G_TX_RENDERTILE, \
- (uls) << G_TEXTURE_IMAGE_FRAC, \
- (ult) << G_TEXTURE_IMAGE_FRAC, \
- (lrs) << G_TEXTURE_IMAGE_FRAC, \
- (lrt) << G_TEXTURE_IMAGE_FRAC); \
-})
-
-#endif
diff --git a/include/map.h b/include/map.h
new file mode 100644
index 0000000000..ef82c03554
--- /dev/null
+++ b/include/map.h
@@ -0,0 +1,82 @@
+#ifndef MAP_H
+#define MAP_H
+
+#include "ultra64.h"
+
+struct PlayState;
+
+typedef enum FloorID {
+ /* 1 */ F_8F = 1,
+ /* 2 */ F_7F,
+ /* 3 */ F_6F,
+ /* 4 */ F_5F,
+ /* 5 */ F_4F,
+ /* 6 */ F_3F,
+ /* 7 */ F_2F,
+ /* 8 */ F_1F,
+ /* 9 */ F_B1,
+ /* 10 */ F_B2,
+ /* 11 */ F_B3,
+ /* 12 */ F_B4,
+ /* 13 */ F_B5,
+ /* 14 */ F_B6,
+ /* 15 */ F_B7,
+ /* 16 */ F_B8
+} FloorID;
+
+// All arrays pointed in this struct are indexed by "map indices"
+// In dungeons, the map index corresponds to the dungeon index (which also indexes keys, items, etc)
+// In overworld areas, the map index corresponds to the overworld area index (spot 00, 01, etc)
+typedef struct MapData {
+ /* 0x00 */ s16 (*floorTexIndexOffset)[8]; // dungeon texture index offset by floor
+ /* 0x04 */ s16* bossFloor; // floor the boss is on
+ /* 0x08 */ s16 (*roomPalette)[32]; // map palette by room
+ /* 0x0C */ s16* maxPaletteCount; // max number of palettes in a same floor
+ /* 0x10 */ s16 (*paletteRoom)[8][14]; // room by palette by floor
+ /* 0x14 */ s16 (*roomCompassOffsetX)[44]; // dungeon compass icon X offset by room
+ /* 0x18 */ s16 (*roomCompassOffsetY)[44]; // dungeon compass icon Y offset by room
+ /* 0x1C */ u8* dgnMinimapCount; // number of room minimaps
+ /* 0x20 */ u16* dgnMinimapTexIndexOffset; // dungeon minimap texture index offset
+ /* 0x24 */ u16* owMinimapTexSize;
+ /* 0x28 */ u16* owMinimapTexOffset;
+ /* 0x2C */ s16* owMinimapPosX;
+ /* 0x30 */ s16* owMinimapPosY;
+ /* 0x34 */ s16 (*owCompassInfo)[4]; // [X scale, Y scale, X offset, Y offset]
+ /* 0x38 */ s16* dgnTexIndexBase; // dungeon texture index base
+ /* 0x3C */ s16 (*dgnCompassInfo)[4]; // [X scale, Y scale, X offset, Y offset]
+ /* 0x40 */ s16* owMinimapWidth;
+ /* 0x44 */ s16* owMinimapHeight;
+ /* 0x48 */ s16* owEntranceIconPosX; // "dungeon entrance" icon X pos
+ /* 0x4C */ s16* owEntranceIconPosY; // "dungeon entrance" icon Y pos
+ /* 0x50 */ u16* owEntranceFlag; // flag in inf_table[26] based on which entrance icons are shown (0xFFFF = always shown)
+ /* 0x54 */ f32 (*floorCoordY)[8]; // Y coordinate of each floor
+ /* 0x58 */ u16* switchEntryCount; // number of "room switch" entries, which correspond to the next 3 arrays
+ /* 0x5C */ u8 (*switchFromRoom)[51]; // room to come from
+ /* 0x60 */ u8 (*switchFromFloor)[51]; // floor to come from
+ /* 0x64 */ u8 (*switchToRoom)[51]; // room to go to
+ /* 0x68 */ u8 (*floorID)[8];
+ /* 0x6C */ s16* skullFloorIconY; // dungeon big skull icon Y pos
+} MapData; // size = 0x70
+
+// TODO get these properties from the textures themselves
+#define MAP_I_TEX_WIDTH 96
+#define MAP_I_TEX_HEIGHT 85
+#define MAP_I_TEX_SIZE ((MAP_I_TEX_WIDTH * MAP_I_TEX_HEIGHT) / 2) // 96x85 I4 texture
+
+#define MAP_48x85_TEX_WIDTH 48
+#define MAP_48x85_TEX_HEIGHT 85
+#define MAP_48x85_TEX_SIZE ((MAP_48x85_TEX_WIDTH * MAP_48x85_TEX_HEIGHT) / 2) // 48x85 CI4 texture
+
+extern MapData gMapDataTable;
+extern MapData* gMapData;
+
+void Map_SavePlayerInitialInfo(struct PlayState* play);
+void Map_SetFloorPalettesData(struct PlayState* play, s16 floor);
+void Map_InitData(struct PlayState* play, s16 room);
+void Map_InitRoomData(struct PlayState* play, s16 room);
+void Map_Destroy(struct PlayState* play);
+void Map_Init(struct PlayState* play);
+void Minimap_Draw(struct PlayState* play);
+void Map_Update(struct PlayState* play);
+
+#endif
diff --git a/include/map_select_state.h b/include/map_select_state.h
new file mode 100644
index 0000000000..d2a6b43d19
--- /dev/null
+++ b/include/map_select_state.h
@@ -0,0 +1,41 @@
+#ifndef MAP_SELECT_STATE_H
+#define MAP_SELECT_STATE_H
+
+#include "ultra64.h"
+#include "z64game.h"
+#include "z64view.h"
+
+struct MapSelectState;
+
+typedef struct MapSelectEntry {
+ /* 0x00 */ char* name;
+ /* 0x04 */ void (*loadFunc)(struct MapSelectState*, s32);
+ /* 0x08 */ s32 entranceIndex;
+} MapSelectEntry; // size = 0xC
+
+typedef struct MapSelectState {
+ /* 0x0000 */ GameState state;
+ /* 0x00A8 */ View view;
+ /* 0x01D0 */ s32 count;
+ /* 0x01D4 */ MapSelectEntry* entries;
+ /* 0x01D8 */ s32 currentEntry;
+ /* 0x01DC */ s32 pageDownIndex; // Index of pageDownStops
+ /* 0x01E0 */ s32 pageDownStops[7];
+ /* 0x01FC */ char unk_1FC[0x0C];
+ /* 0x0208 */ s32 opt;
+ /* 0x020C */ s32 topDisplayedEntry; // The entry which is currently at the top of the screen
+ /* 0x0210 */ char unk_210[0x0C];
+ /* 0x021C */ s32 verticalInputAccumulator;
+ /* 0x0220 */ s32 verticalInput;
+ /* 0x0224 */ s32 timerUp;
+ /* 0x0228 */ s32 timerDown;
+ /* 0x022C */ s32 lockUp;
+ /* 0x0230 */ s32 lockDown;
+ /* 0x0234 */ s32 unk_234; // unused
+ /* 0x0238 */ u8* staticSegment;
+} MapSelectState; // size = 0x240
+
+void MapSelect_Init(GameState* thisx);
+void MapSelect_Destroy(GameState* thisx);
+
+#endif
diff --git a/include/memory_utils.h b/include/memory_utils.h
new file mode 100644
index 0000000000..7a8d9aca91
--- /dev/null
+++ b/include/memory_utils.h
@@ -0,0 +1,9 @@
+#ifndef MEMORY_UTILS_H
+#define MEMORY_UTILS_H
+
+#include "ultra64.h"
+
+void* MemCpy(void* dest, const void* src, s32 len);
+void* MemSet(void* dest, s32 val, s32 len);
+
+#endif
diff --git a/include/message_data_static.h b/include/message_data_static.h
index 2b08302731..15e93ec475 100644
--- a/include/message_data_static.h
+++ b/include/message_data_static.h
@@ -47,9 +47,6 @@ typedef struct MessageTableEntry {
#define DEFINE_MESSAGE_FFFC(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
DEFINE_MESSAGE_JPN(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage)
-
-#define FONT_MESSAGE_OFFSET (_message_0xFFFC_jpn - (const char*)_jpn_message_data_staticSegmentStart)
-#define FONT_MESSAGE_LENGTH (_message_0xFFFD_jpn - _message_0xFFFC_jpn)
#else
#define DEFINE_MESSAGE_NES(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
extern const char _message_##textId##_nes[]; \
@@ -61,9 +58,6 @@ typedef struct MessageTableEntry {
#define DEFINE_MESSAGE_FFFC(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
DEFINE_MESSAGE_NES(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage)
-
-#define FONT_MESSAGE_OFFSET (_message_0xFFFC_nes - (const char*)_nes_message_data_staticSegmentStart)
-#define FONT_MESSAGE_LENGTH (_message_0xFFFD_nes - _message_0xFFFC_nes)
#endif
#define DEFINE_MESSAGE(textId, type, yPos, jpnMessage, nesMessage, gerMessage, fraMessage) \
diff --git a/include/mio0.h b/include/mio0.h
new file mode 100644
index 0000000000..d350b45551
--- /dev/null
+++ b/include/mio0.h
@@ -0,0 +1,8 @@
+#ifndef MIO0_H
+#define MIO0_H
+
+#include "ultra64.h"
+
+void Mio0_Decompress(u8* src, u8* dst);
+
+#endif
diff --git a/include/n64dd.h b/include/n64dd.h
index 6931eac26c..6a353c3172 100644
--- a/include/n64dd.h
+++ b/include/n64dd.h
@@ -6,6 +6,7 @@
#include "z64pause.h"
#include "z64scene.h"
#include "z64map_mark.h"
+#include "versions.h"
struct Font;
struct GameState;
@@ -49,11 +50,18 @@ typedef struct n64ddStruct_80121220 {
struct SceneTableEntry* (*unk_48)(s32 sceneId, struct SceneTableEntry* sceneTable);
char unk_4C[0x08];
s32 (*unk_54)(struct PlayState*);
+#if OOT_NTSC
void (*unk_58)(struct MessageTableEntry**, struct MessageTableEntry**, struct MessageTableEntry**);
+#else
+ void (*unk_58)(struct MessageTableEntry**, const char***, const char***, struct MessageTableEntry**);
+#endif
char unk_5C[0x4];
s32 (*unk_60)(struct Font*);
s32 (*unk_64)(struct Font*);
s32 (*unk_68)(struct Font*);
+#if OOT_PAL
+ s32 (*unk_6C_PAL)(struct Font*);
+#endif
void (*unk_6C)(struct PlayState*, SceneDrawConfigFunc*);
s32 (*unk_70)(struct DmaRequest* req, void* ram, uintptr_t vrom, size_t size, u32 unk, OSMesgQueue* queue, OSMesg msg);
void (*unk_74)(struct GameState*);
diff --git a/include/one_point_cutscene.h b/include/one_point_cutscene.h
new file mode 100644
index 0000000000..2c829ba642
--- /dev/null
+++ b/include/one_point_cutscene.h
@@ -0,0 +1,18 @@
+#ifndef ONE_POINT_CUTSCENE_H
+#define ONE_POINT_CUTSCENE_H
+
+#include "ultra64.h"
+
+struct Actor;
+struct PlayState;
+
+s16 OnePointCutscene_Init(struct PlayState* play, s16 csId, s16 timer, struct Actor* actor, s16 parentCamId);
+s16 OnePointCutscene_EndCutscene(struct PlayState* play, s16 subCamId);
+s32 OnePointCutscene_Attention(struct PlayState* play, struct Actor* actor);
+s32 OnePointCutscene_AttentionSetSfx(struct PlayState* play, struct Actor* actor, s32 sfxId);
+void OnePointCutscene_EnableAttention(void);
+void OnePointCutscene_DisableAttention(void);
+s32 OnePointCutscene_CheckForCategory(struct PlayState* play, s32 actorCategory);
+void OnePointCutscene_Noop(struct PlayState* play, s32 arg1);
+
+#endif
diff --git a/include/padmgr.h b/include/padmgr.h
index d22762a2f4..9859b501a6 100644
--- a/include/padmgr.h
+++ b/include/padmgr.h
@@ -2,8 +2,8 @@
#define PADMGR_H
#include "ultra64.h"
+#include "libu64/pad.h"
#include "irqmgr.h"
-#include "versions.h"
typedef enum ControllerPakType {
CONT_PAK_NONE,
@@ -11,13 +11,6 @@ typedef enum ControllerPakType {
CONT_PAK_OTHER
} ControllerPakType;
-typedef struct Input {
- /* 0x00 */ OSContPad cur;
- /* 0x06 */ OSContPad prev;
- /* 0x0C */ OSContPad press; // X/Y store delta from last frame
- /* 0x12 */ OSContPad rel; // X/Y store adjusted
-} Input; // size = 0x18
-
typedef struct PadMgr {
/* 0x0000 */ OSContStatus padStatus[MAXCONTROLLERS];
/* 0x0010 */ OSMesg serialMsg;
@@ -76,7 +69,7 @@ void PadMgr_RumbleSet(PadMgr* padMgr, u8* enable);
* user-provided argument. The callback function should be `void (*)(PadMgr*, void*)`.
*
* @param callback callback to run before rumble state is updated for the current VI
- * @param arg the argument to pass to the calback
+ * @param arg the argument to pass to the callback
*
* @see PADMGR_UNSET_RETRACE_CALLACK
*/
diff --git a/include/prenmi_buff.h b/include/prenmi_buff.h
new file mode 100644
index 0000000000..b0a9e66f72
--- /dev/null
+++ b/include/prenmi_buff.h
@@ -0,0 +1,25 @@
+#ifndef PRENMI_BUFF_H
+#define PRENMI_BUFF_H
+
+#include "ultra64.h"
+#include "alignment.h"
+
+// This struct is used at osAppNMIBuffer which is not at an 8-byte aligned address. This causes an unaligned access
+// crash if the OSTime variables use 64-bit load/store instructions, which is the case in any MIPS ABI other than O32
+// where 64-bit load/store instructions are emulated with 2x 32-bit load/store instructions. The alignment attribute
+// conveys that this structure will not always be 8-bytes aligned, allowing a modern compiler to generate non-crashing
+// code for accessing these. This is not an issue in the original compiler as it only output O32 ABI code.
+ALIGNED(4) typedef struct PreNmiBuff {
+ /* 0x00 */ u32 resetting;
+ /* 0x04 */ u32 resetCount;
+ /* 0x08 */ OSTime duration;
+ /* 0x10 */ OSTime resetTime;
+} PreNmiBuff; // size = 0x18 (actually osAppNMIBuffer is 0x40 bytes large but the rest is unused)
+
+extern PreNmiBuff* gAppNmiBufferPtr;
+
+void PreNmiBuff_Init(PreNmiBuff* this);
+void PreNmiBuff_SetReset(PreNmiBuff* this);
+u32 PreNmiBuff_IsResetting(PreNmiBuff* this);
+
+#endif
diff --git a/include/prenmi_state.h b/include/prenmi_state.h
new file mode 100644
index 0000000000..3710425ca9
--- /dev/null
+++ b/include/prenmi_state.h
@@ -0,0 +1,16 @@
+#ifndef PRENMI_STATE_H
+#define PRENMI_STATE_H
+
+#include "ultra64.h"
+#include "z64game.h"
+
+typedef struct PreNMIState {
+ /* 0x00 */ GameState state;
+ /* 0xA4 */ u32 timer;
+ /* 0xA8 */ s32 unk_A8;
+} PreNMIState; // size = 0xAC
+
+void PreNMI_Init(GameState* thisx);
+void PreNMI_Destroy(GameState* thisx);
+
+#endif
diff --git a/include/prerender.h b/include/prerender.h
index ca16826341..0674fac020 100644
--- a/include/prerender.h
+++ b/include/prerender.h
@@ -2,11 +2,7 @@
#define PRERENDER_H
#include "ultra64/ultratypes.h"
-
-typedef struct ListAlloc {
- /* 0x00 */ struct ListAlloc* prev;
- /* 0x04 */ struct ListAlloc* next;
-} ListAlloc; // size = 0x8
+#include "listalloc.h"
typedef struct PreRender {
/* 0x00 */ s32 width;
@@ -30,4 +26,19 @@ typedef struct PreRender {
/* 0x4C */ u32 unk_4C;
} PreRender; // size = 0x50
+void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
+void PreRender_Init(PreRender* this);
+void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
+void PreRender_Destroy(PreRender* this);
+void func_800C170C(PreRender* this, Gfx** gfxP, void* buf, void* bufSave, u32 r, u32 g, u32 b, u32 a);
+void func_800C1AE8(PreRender* this, Gfx** gfxP, void* fbuf, void* fbufSave);
+void PreRender_SaveZBuffer(PreRender* this, Gfx** gfxP);
+void PreRender_SaveFramebuffer(PreRender* this, Gfx** gfxP);
+void PreRender_DrawCoverage(PreRender* this, Gfx** gfxP);
+void PreRender_RestoreZBuffer(PreRender* this, Gfx** gfxP);
+void func_800C213C(PreRender* this, Gfx** gfxP);
+void PreRender_RestoreFramebuffer(PreRender* this, Gfx** gfxP);
+void PreRender_CopyImageRegion(PreRender* this, Gfx** gfxP);
+void PreRender_ApplyFilters(PreRender* this);
+
#endif
diff --git a/include/printf.h b/include/printf.h
new file mode 100644
index 0000000000..a2a31a39e5
--- /dev/null
+++ b/include/printf.h
@@ -0,0 +1,51 @@
+#ifndef PRINTF_H
+#define PRINTF_H
+
+#include "terminal.h"
+#include "ultra64.h"
+
+// IDO doesn't support variadic macros, but it merely throws a warning for the
+// number of arguments not matching the definition (warning 609) instead of
+// throwing an error. We suppress this warning and rely on GCC to catch macro
+// argument errors instead.
+// Note some tools define __sgi but preprocess with a modern cpp implementation,
+// ensure that these do not use the IDO workaround to avoid errors.
+#define IDO_PRINTF_WORKAROUND (__sgi && !__GNUC__ && !M2CTX)
+
+#if DEBUG_FEATURES
+#define PRINTF osSyncPrintf
+#elif defined(EGCS)
+#define PRINTF(format, args...) while (0) osSyncPrintf(format, ##args)
+#elif IDO_PRINTF_WORKAROUND
+#define PRINTF(args) (void)0
+#else
+#define PRINTF(format, ...) (void)0
+#endif
+
+#if DEBUG_FEATURES
+#define PRINTF_COLOR_BLACK() PRINTF(VT_FGCOL(BLACK))
+#define PRINTF_COLOR_RED() PRINTF(VT_FGCOL(RED))
+#define PRINTF_COLOR_GREEN() PRINTF(VT_FGCOL(GREEN))
+#define PRINTF_COLOR_YELLOW() PRINTF(VT_FGCOL(YELLOW))
+#define PRINTF_COLOR_BLUE() PRINTF(VT_FGCOL(BLUE))
+#define PRINTF_COLOR_MAGENTA() PRINTF(VT_FGCOL(MAGENTA))
+#define PRINTF_COLOR_CYAN() PRINTF(VT_FGCOL(CYAN))
+#define PRINTF_COLOR_WHITE() PRINTF(VT_FGCOL(WHITE))
+#define PRINTF_COLOR_WARNING() PRINTF(VT_COL(YELLOW, BLACK))
+#define PRINTF_COLOR_ERROR() PRINTF(VT_COL(RED, WHITE))
+#define PRINTF_RST() PRINTF(VT_RST)
+#else
+#define PRINTF_COLOR_BLACK() (void)0
+#define PRINTF_COLOR_RED() (void)0
+#define PRINTF_COLOR_GREEN() (void)0
+#define PRINTF_COLOR_YELLOW() (void)0
+#define PRINTF_COLOR_BLUE() (void)0
+#define PRINTF_COLOR_MAGENTA() (void)0
+#define PRINTF_COLOR_CYAN() (void)0
+#define PRINTF_COLOR_WHITE() (void)0
+#define PRINTF_COLOR_WARNING() (void)0
+#define PRINTF_COLOR_ERROR() (void)0
+#define PRINTF_RST() (void)0
+#endif
+
+#endif
diff --git a/include/regs.h b/include/regs.h
index 8abc2e3f04..8ea4e058ec 100644
--- a/include/regs.h
+++ b/include/regs.h
@@ -1,8 +1,11 @@
#ifndef REGS_H
#define REGS_H
+#include "ultra64.h"
#include "versions.h"
+struct PlayState;
+
#define REG_GROUPS 29 // number of REG groups, i.e. REG, SREG, OREG, etc.
#define REG_PAGES 6
#define REGS_PER_PAGE 16
@@ -48,6 +51,7 @@
#define R_ENV_Z_FAR REG(13)
#define R_ENV_FOG_NEAR REG(14)
#define R_ENV_TIME_SPEED_OLD REG(15) // Most likely used during development. Unused in the final game.
+#define R_DECELERATE_RATE REG(43)
#define R_RUN_SPEED_LIMIT REG(45)
#define R_ENABLE_ARENA_DBG SREG(0)
#define R_AUDIOMGR_DEBUG_LEVEL SREG(20)
@@ -117,6 +121,8 @@
#define R_MESSAGE_DEBUGGER_TEXTID YREG(79)
#define R_C_UP_ICON_X YREG(88)
#define R_C_UP_ICON_Y YREG(89)
+#define R_EXITED_SCENE_RIDING_HORSE AREG(6) // Used to spawn the player on top of Epona in the next scene
+#define R_DEBUG_FORCE_EPONA_OBTAINED DREG(1) // If set, overrides EVENTCHKINF_EPONA_OBTAINED state giving Epona
#define R_EPONAS_SONG_PLAYED DREG(53)
#define R_MAGIC_FILL_COLOR(i) ZREG(0 + (i))
#define R_PAUSE_PAGE_SWITCH_FRAME_ADVANCE_ON ZREG(13)
@@ -134,6 +140,7 @@
#define R_START_LABEL_Y(i) ZREG(51 + (i))
#define R_START_LABEL_X(i) ZREG(54 + (i))
#endif
+#define R_PAUSE_QUEST_MEDALLION_SHINE_TIME(i) ZREG(61 + (i)) // i = 0..3 (clashes with ZREG(62) and ZREG(63))
#define R_C_UP_BTN_X ZREG(62)
#define R_C_UP_BTN_Y ZREG(63)
#define R_START_BTN_X ZREG(68)
@@ -183,6 +190,8 @@
#define R_ROOM_CULL_USED_ENTRIES iREG(88)
#define R_ROOM_CULL_DEBUG_TARGET iREG(89)
#define R_B_LABEL_DD WREG(0)
+#define R_PAUSE_PAGES_Y_ORIGIN_2 WREG(2) // Complements PauseContext.pagesYOrigin1
+#define R_PAUSE_DEPTH_OFFSET WREG(3) // Offset position of all pages away from the camera
#if OOT_NTSC
#define R_B_LABEL_SCALE(i) WREG(8 + (i))
#define R_B_LABEL_X(i) WREG(10 + (i))
@@ -218,6 +227,7 @@
#define R_COMPASS_OFFSET_X VREG(16)
#define R_COMPASS_OFFSET_Y VREG(17)
#define R_MINIMAP_COLOR(i) VREG(18 + (i))
+#define R_PAUSE_SONG_OCA_BTN_Y(ocarinaBtnIndex) VREG(21 + (ocarinaBtnIndex)) // VREG(21) to VREG(25)
#define R_OCARINA_BUTTONS_XPOS VREG(28)
#define R_OCARINA_BUTTONS_XPOS_OFFSET VREG(29)
#define R_TEXT_ADJUST_COLOR_1_R VREG(33)
@@ -227,6 +237,7 @@
#define R_TEXT_ADJUST_COLOR_2_G VREG(37)
#define R_TEXT_ADJUST_COLOR_2_B VREG(38)
#define R_OCARINA_BUTTONS_YPOS(note) VREG(45 + (note))
+#define R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP VREG(50)
#define R_OCARINA_BUTTONS_YPOS_OFFSET VREG(51)
#define R_KALEIDO_PROMPT_CURSOR_ALPHA_TIMER_BASE VREG(60)
#define R_KALEIDO_PROMPT_CURSOR_ALPHA VREG(61)
@@ -275,7 +286,7 @@ typedef enum HRegMode {
// HREG_MODE_UCODE_DISAS
#define R_UCODE_DISAS_TOGGLE HREG(81) // < 0 enables and prints some hardware reg info for 1 frame, > 0 enables constant disas
#define R_UCODE_DISAS_LOG_MODE HREG(82) // 1 and 2 print counts, 3 enables fault client, 4 disables open/close disps
-#define R_UCODE_DISAS_LOG_LEVEL HREG(83) // enables various logging within the dissasembler itself
+#define R_UCODE_DISAS_LOG_LEVEL HREG(83) // enables various logging within the dissassembler itself
#define R_UCODE_DISAS_TOTAL_COUNT HREG(84) // read-only
#define R_UCODE_DISAS_VTX_COUNT HREG(85) // read-only
#define R_UCODE_DISAS_SPVTX_COUNT HREG(86) // read-only
@@ -401,6 +412,8 @@ typedef struct RegEditor {
/* 0x14 */ s16 data[REG_GROUPS * REGS_PER_GROUP]; // Accessed through *REG macros, see regs.h
} RegEditor; // size = 0x15D4
+void Regs_InitData(struct PlayState* play);
+
extern RegEditor* gRegEditor;
#endif
diff --git a/include/romfile.h b/include/romfile.h
index 49b5f202dc..31edd72f33 100644
--- a/include/romfile.h
+++ b/include/romfile.h
@@ -1,7 +1,7 @@
#ifndef ROMFILE_H
#define ROMFILE_H
-#include "ultra64.h"
+#include "stdint.h"
typedef struct RomFile {
/* 0x00 */ uintptr_t vromStart;
diff --git a/include/sample_state.h b/include/sample_state.h
new file mode 100644
index 0000000000..b568a83f95
--- /dev/null
+++ b/include/sample_state.h
@@ -0,0 +1,17 @@
+#ifndef SAMPLE_STATE_H
+#define SAMPLE_STATE_H
+
+#include "ultra64.h"
+#include "z64game.h"
+#include "z64view.h"
+
+typedef struct SampleState {
+ /* 0x0000 */ GameState state;
+ /* 0x00A4 */ u8* staticSegment;
+ /* 0x00A8 */ View view;
+} SampleState; // size = 0x1D0
+
+void Sample_Init(GameState* thisx);
+void Sample_Destroy(GameState* thisx);
+
+#endif
diff --git a/include/sched.h b/include/sched.h
index e170817015..bf204bc6d9 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -3,6 +3,7 @@
#include "ultra64.h"
#include "irqmgr.h"
+#include "versions.h"
#define OS_SC_NEEDS_RDP 0x0001 // Task uses the RDP
#define OS_SC_NEEDS_RSP 0x0002 // Task uses the RSP
@@ -27,8 +28,10 @@ typedef struct CfbInfo {
/* 0x10 */ u8 unk_10; // set to 0, never read
/* 0x11 */ s8 updateRate; // how many VIs should elapse before next swap
/* 0x12 */ s8 updateTimer; // counts down (in VIs) from updateRate to 0, swaps the framebuffer at 0
+#if OOT_VERSION >= PAL_1_0
/* 0x14 */ f32 xScale;
/* 0x18 */ f32 yScale;
+#endif
} CfbInfo; // size = 0x1C
typedef struct OSScTask {
@@ -66,6 +69,7 @@ typedef struct Scheduler {
void Sched_Notify(Scheduler* sc);
void Sched_Init(Scheduler* sc, void* stack, OSPri priority, u8 viModeType, UNK_TYPE arg4, IrqMgr* irqMgr);
+void Sched_FlushTaskQueue(void);
extern Scheduler gScheduler;
diff --git a/include/segment_symbols.h b/include/segment_symbols.h
index 95e44a51b5..d036e7cec0 100644
--- a/include/segment_symbols.h
+++ b/include/segment_symbols.h
@@ -1,8 +1,8 @@
#ifndef SEGMENT_SYMBOLS_H
#define SEGMENT_SYMBOLS_H
+#include "ultra64/ultratypes.h"
#include "versions.h"
-#include "z64.h"
#define DECLARE_SEGMENT(name) \
extern u8 _##name##SegmentStart[]; \
@@ -85,7 +85,7 @@ DECLARE_SEGMENT(code)
DECLARE_ROM_SEGMENT(code)
DECLARE_BSS_SEGMENT(code)
-// N64-only, not wrapped in these are not wrapped in an `#if PLATFORM_N64`
+// N64-only, these are not wrapped in an `#if PLATFORM_N64`
// so that the N64DD code can always be built.
DECLARE_SEGMENT(n64dd)
DECLARE_ROM_SEGMENT(n64dd)
@@ -655,8 +655,9 @@ DECLARE_ROM_SEGMENT(spot20_room_0)
DECLARE_ROM_SEGMENT(ganon_tou_room_0)
-// Room symbols for compiling test scenes, these are not wrapped in an `#if OOT_DEBUG`
-// so that debug ROMs (including gc-eu-mq-dbg) can be built with OOT_DEBUG=0.
+// Room symbols for compiling test scenes.
+// These are not wrapped in an `#if DEBUG_ASSETS` so that debug ROMs
+// can be built with DEBUG_ASSETS=0 (e.g. when DEBUG_FEATURES=0)
DECLARE_ROM_SEGMENT(test01_room_0)
diff --git a/include/seqcmd.h b/include/seqcmd.h
index 5acce7c493..53fce27bfb 100644
--- a/include/seqcmd.h
+++ b/include/seqcmd.h
@@ -56,7 +56,7 @@ typedef enum SeqCmdSetupCmdOp {
// Subset of `SEQCMD_OP_GLOBAL_CMD`
typedef enum SeqCmdSubCmdOp {
- /* 0x0 */ SEQCMD_SUB_OP_GLOBAL_SET_SOUND_MODE,
+ /* 0x0 */ SEQCMD_SUB_OP_GLOBAL_SET_SOUND_OUTPUT_MODE,
/* 0x1 */ SEQCMD_SUB_OP_GLOBAL_DISABLE_NEW_SEQUENCES
} SeqCmdSubCmdOp;
@@ -479,12 +479,12 @@ typedef enum SeqCmdSubCmdOp {
*/
/**
- * Change the sound mode of audio
+ * Change the sound output mode
*
- * @param soundMode see the `SoundMode` enum
+ * @param soundOutputMode see the `SoundOutputMode` enum
*/
-#define SEQCMD_SET_SOUND_MODE(soundMode) \
- Audio_QueueSeqCmd((SEQCMD_OP_GLOBAL_CMD << 28) | (SEQCMD_SUB_OP_GLOBAL_SET_SOUND_MODE << 8) | (u8)(soundMode))
+#define SEQCMD_SET_SOUND_OUTPUT_MODE(soundOutputMode) \
+ Audio_QueueSeqCmd((SEQCMD_OP_GLOBAL_CMD << 28) | (SEQCMD_SUB_OP_GLOBAL_SET_SOUND_OUTPUT_MODE << 8) | (u8)(soundOutputMode))
/**
* Disable (or reenable) new sequences from starting
diff --git a/include/sequence.h b/include/sequence.h
index c895cd980e..d405e32362 100644
--- a/include/sequence.h
+++ b/include/sequence.h
@@ -2,6 +2,7 @@
#define SEQUENCE_H
#include "ultra64.h"
+#include "versions.h"
#define DEFINE_SEQUENCE(_0, seqId, _2, _3, _4) seqId,
#define DEFINE_SEQUENCE_PTR(_0, seqId, _2, _3, _4) seqId,
diff --git a/include/setup_state.h b/include/setup_state.h
new file mode 100644
index 0000000000..863b71401e
--- /dev/null
+++ b/include/setup_state.h
@@ -0,0 +1,13 @@
+#ifndef SETUP_STATE_H
+#define SETUP_STATE_H
+
+#include "z64game.h"
+
+typedef struct SetupState {
+ /* 0x00 */ GameState state;
+} SetupState; // size = 0xA4
+
+void Setup_Init(GameState* thisx);
+void Setup_Destroy(GameState* thisx);
+
+#endif
diff --git a/include/sfx.h b/include/sfx.h
index 0532109e9a..f7d86d87ac 100644
--- a/include/sfx.h
+++ b/include/sfx.h
@@ -1,6 +1,13 @@
#ifndef SFX_H
#define SFX_H
+#include "ultra64.h"
+#include "versions.h"
+#include "z64math.h"
+#include "assert.h"
+
+#define MAX_CHANNELS_PER_BANK 3
+
typedef enum SfxBankType {
/* 0 */ BANK_PLAYER,
/* 1 */ BANK_ITEM,
@@ -59,23 +66,48 @@ typedef struct SfxBankEntry {
typedef enum SfxId {
NA_SE_NONE, // Requesting a sfx with this id will play no sound
+
NA_SE_PL_BASE = 0x7FF,
#include "tables/sfx/playerbank_table.h"
+ NA_SE_PL_END,
+
NA_SE_IT_BASE = 0x17FF,
#include "tables/sfx/itembank_table.h"
+ NA_SE_IT_END,
+
NA_SE_EV_BASE = 0x27FF,
#include "tables/sfx/environmentbank_table.h"
+ NA_SE_EV_END,
+
NA_SE_EN_BASE = 0x37FF,
#include "tables/sfx/enemybank_table.h"
+ NA_SE_EN_END,
+
NA_SE_SY_BASE = 0x47FF,
#include "tables/sfx/systembank_table.h"
+ NA_SE_SY_END,
+
NA_SE_OC_BASE = 0x57FF,
#include "tables/sfx/ocarinabank_table.h"
+ NA_SE_OC_END,
+
NA_SE_VO_BASE = 0x67FF,
#include "tables/sfx/voicebank_table.h"
+ NA_SE_VO_END,
+
NA_SE_MAX
} SfxId;
+// These limits are due to the way Sequence 0 is programmed. There is also a global limit of 512 entries for every bank
+// enforced in Audio_PlayActiveSfx in sfx.c
+static_assert(NA_SE_PL_END - (NA_SE_PL_BASE + 1) <= 256, "Player Bank SFX Table is limited to 256 entries due to Sequence 0");
+static_assert(NA_SE_IT_END - (NA_SE_IT_BASE + 1) <= 128, "Item Bank SFX Table is limited to 128 entries due to Sequence 0");
+static_assert(NA_SE_EV_END - (NA_SE_EV_BASE + 1) <= 256, "Environment Bank SFX Table is limited to 256 entries due to Sequence 0");
+static_assert(NA_SE_EN_END - (NA_SE_EN_BASE + 1) <= 512, "Enemy Bank SFX Table is limited to 512 entries due to Sequence 0");
+static_assert(NA_SE_SY_END - (NA_SE_SY_BASE + 1) <= 128, "System Bank SFX Table is limited to 128 entries due to Sequence 0");
+static_assert(NA_SE_OC_END - (NA_SE_OC_BASE + 1) <= 128, "Ocarina Bank SFX Table is limited to 128 entries due to Sequence 0");
+static_assert(NA_SE_VO_END - (NA_SE_VO_BASE + 1) <= 256, "Voice Bank SFX Table is limited to 256 entries due to Sequence 0");
+
#undef DEFINE_SFX
#define SFX_BANK_SHIFT(sfxId) (((sfxId) >> 12) & 0xFF)
@@ -119,7 +151,7 @@ typedef struct SfxParams {
u16 params;
} SfxParams;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define SFX_DIST_SCALING 1.0f
#else
#define SFX_DIST_SCALING 10.0f
@@ -148,4 +180,36 @@ extern Vec3f gSfxDefaultPos;
extern f32 gSfxDefaultFreqAndVolScale;
extern s8 gSfxDefaultReverb;
+extern SfxParams* gSfxParams[7];
+extern char D_80133390[];
+extern char D_80133398[];
+extern u8 gSfxRequestWriteIndex;
+extern u8 gSfxRequestReadIndex;
+extern SfxBankEntry* gSfxBanks[7];
+extern u8 gSfxBankSizes[];
+extern u8 gSfxChannelLayout;
+extern u16 D_801333D0;
+extern Vec3f gSfxDefaultPos;
+extern f32 gSfxDefaultFreqAndVolScale;
+extern s8 gSfxDefaultReverb;
+
+#if DEBUG_FEATURES
+extern u8 D_801333F0;
+extern u8 gAudioSfxSwapOff;
+extern u8 D_801333F8;
+#endif
+
+extern SfxBankEntry D_8016BAD0[9];
+extern SfxBankEntry D_8016BC80[12];
+extern SfxBankEntry D_8016BEC0[22];
+extern SfxBankEntry D_8016C2E0[20];
+extern SfxBankEntry D_8016C6A0[8];
+extern SfxBankEntry D_8016C820[3];
+extern SfxBankEntry D_8016C8B0[5];
+extern ActiveSfx gActiveSfx[7][MAX_CHANNELS_PER_BANK]; // total size = 0xA8
+extern u8 gSfxBankMuted[];
+extern u16 gAudioSfxSwapSource[10];
+extern u16 gAudioSfxSwapTarget[10];
+extern u8 gAudioSfxSwapMode[10];
+
#endif
diff --git a/include/speed_meter.h b/include/speed_meter.h
new file mode 100644
index 0000000000..f8779902f9
--- /dev/null
+++ b/include/speed_meter.h
@@ -0,0 +1,34 @@
+#ifndef SPEEDMETER_H
+#define SPEEDMETER_H
+
+#include "ultra64.h"
+
+struct GraphicsContext;
+struct GameState;
+
+typedef struct SpeedMeter {
+ /* 0x00 */ char unk_00[0x18];
+ /* 0x18 */ s32 x; // Unused
+ /* 0x1C */ s32 y;
+} SpeedMeter; // size = 0x20
+
+extern volatile OSTime gAudioThreadUpdateTimeTotalPerGfxTask;
+extern volatile OSTime gGfxTaskSentToNextReadyMinusAudioThreadUpdateTime;
+extern volatile OSTime gRSPAudioTimeTotal;
+extern volatile OSTime gRSPGfxTimeTotal;
+extern volatile OSTime gRDPTimeTotal;
+extern volatile OSTime gGraphUpdatePeriod;
+extern volatile OSTime gAudioThreadUpdateTimeStart;
+extern volatile OSTime gAudioThreadUpdateTimeAcc;
+extern volatile OSTime gRSPAudioTimeAcc;
+extern volatile OSTime gRSPGfxTimeAcc;
+extern volatile OSTime gRSPOtherTimeAcc;
+extern volatile OSTime D_8016A578;
+extern volatile OSTime gRDPTimeAcc;
+
+void SpeedMeter_Init(SpeedMeter* this);
+void SpeedMeter_Destroy(SpeedMeter* this);
+void SpeedMeter_DrawTimeEntries(SpeedMeter* this, struct GraphicsContext* gfxCtx);
+void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, struct GraphicsContext* gfxCtx, struct GameState* state);
+
+#endif
diff --git a/include/speedmeter.h b/include/speedmeter.h
deleted file mode 100644
index 393c89de8d..0000000000
--- a/include/speedmeter.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef SPEEDMETER_H
-#define SPEEDMETER_H
-
-#include "ultra64/ultratypes.h"
-
-struct GraphicsContext;
-struct GameState;
-
-typedef struct SpeedMeter {
- /* 0x00 */ char unk_00[0x18];
- /* 0x18 */ s32 x; // Unused
- /* 0x1C */ s32 y;
-} SpeedMeter; // size = 0x20
-
-void SpeedMeter_Init(SpeedMeter* this);
-void SpeedMeter_Destroy(SpeedMeter* this);
-void SpeedMeter_DrawTimeEntries(SpeedMeter* this, struct GraphicsContext* gfxCtx);
-void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, struct GraphicsContext* gfxCtx, struct GameState* state);
-
-#endif
diff --git a/include/sys_cfb.h b/include/sys_cfb.h
new file mode 100644
index 0000000000..5b7039175d
--- /dev/null
+++ b/include/sys_cfb.h
@@ -0,0 +1,10 @@
+#ifndef SYS_CFB_H
+#define SYS_CFB_H
+
+#include "ultra64.h"
+
+void SysCfb_Init(s32 n64dd);
+void* SysCfb_GetFbPtr(s32 idx);
+void* SysCfb_GetFbEnd(void);
+
+#endif
diff --git a/include/sys_debug_controller.h b/include/sys_debug_controller.h
new file mode 100644
index 0000000000..0345d85aaf
--- /dev/null
+++ b/include/sys_debug_controller.h
@@ -0,0 +1,13 @@
+#ifndef SYS_DEBUG_CONTROLLER_H
+#define SYS_DEBUG_CONTROLLER_H
+
+#include "ultra64/ultratypes.h"
+
+#if DEBUG_FEATURES
+extern u32 gIsCtrlr2Valid;
+
+void func_800D31F0(void);
+void func_800D3210(void);
+#endif
+
+#endif
diff --git a/include/sys_freeze.h b/include/sys_freeze.h
new file mode 100644
index 0000000000..0e033cacd9
--- /dev/null
+++ b/include/sys_freeze.h
@@ -0,0 +1,8 @@
+#ifndef SYS_FREEZE_H
+#define SYS_FREEZE_H
+
+#include "attributes.h"
+
+NORETURN void func_800D31A0(void);
+
+#endif
diff --git a/include/sys_math3d.h b/include/sys_math3d.h
index b01063a9f0..deeb093f4e 100644
--- a/include/sys_math3d.h
+++ b/include/sys_math3d.h
@@ -4,6 +4,8 @@
#include "ultra64.h"
#include "z64math.h"
+struct PlayState;
+
s32 Math3D_PlaneVsLineSegClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB,
f32 planeBC, f32 planeBDist, Vec3f* linePointA, Vec3f* linePointB,
Vec3f* closestPoint);
@@ -70,4 +72,7 @@ s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z);
s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y);
s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z);
+void Math3D_DrawSphere(struct PlayState* play, Sphere16* sph);
+void Math3D_DrawCylinder(struct PlayState* play, Cylinder16* cyl);
+
#endif
diff --git a/include/sys_matrix.h b/include/sys_matrix.h
index daf3aa39ca..2708af81ee 100644
--- a/include/sys_matrix.h
+++ b/include/sys_matrix.h
@@ -11,8 +11,8 @@ typedef enum MatrixMode {
/* 1 */ MTXMODE_APPLY // applies transformation to the current matrix
} MatrixMode;
-extern Mtx gMtxClear;
-extern MtxF gMtxFClear;
+extern Mtx gIdentityMtx;
+extern MtxF gIdentityMtxF;
/* Stack operations */
@@ -43,7 +43,7 @@ void Matrix_SetTranslateScaleMtx2(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ,
Mtx* Matrix_MtxFToMtx(MtxF* src, Mtx* dest);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
Mtx* Matrix_ToMtx(Mtx* dest, const char* file, int line);
Mtx* Matrix_Finalize(struct GraphicsContext* gfxCtx, const char* file, int line);
@@ -64,6 +64,9 @@ Mtx* Matrix_Finalize(struct GraphicsContext* gfxCtx);
#endif
+#define MATRIX_FINALIZE_AND_LOAD(pkt, gfxCtx, file, line) \
+ gSPMatrix(pkt, MATRIX_FINALIZE(gfxCtx, file, line), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW)
+
/* Vector operations */
void Matrix_MultVec3f(Vec3f* src, Vec3f* dest);
diff --git a/include/sys_ucode.h b/include/sys_ucode.h
new file mode 100644
index 0000000000..fa690d4784
--- /dev/null
+++ b/include/sys_ucode.h
@@ -0,0 +1,11 @@
+#ifndef SYS_UCODE_H
+#define SYS_UCODE_H
+
+#include "ultra64.h"
+
+u64* SysUcode_GetUCodeBoot(void);
+size_t SysUcode_GetUCodeBootSize(void);
+u64* SysUcode_GetUCode(void);
+u64* SysUcode_GetUCodeData(void);
+
+#endif
diff --git a/include/tables/dmadata_table.h b/include/tables/dmadata_table.h
index 13c3d4bb5b..739d16e1e0 100644
--- a/include/tables/dmadata_table.h
+++ b/include/tables/dmadata_table.h
@@ -1,9 +1,11 @@
+#include "versions.h"
+
/**
* Select dmadata table for version
*/
-#if !OOT_DEBUG || NON_MATCHING
+#if OOT_VERSION == GC_EU_MQ_DBG && !NON_MATCHING
+#include "dmadata_table_mqdbg.h"
+#else
// For retail versions and non-matching builds, dmadata is generated from the specfile segments
#include "dmadata_table_spec.h"
-#else
-#include "dmadata_table_mqdbg.h"
#endif
diff --git a/include/tables/scene_table.h b/include/tables/scene_table.h
index 5c6dd595a2..f18faab35c 100644
--- a/include/tables/scene_table.h
+++ b/include/tables/scene_table.h
@@ -110,7 +110,7 @@
/* 0x62 */ DEFINE_SCENE(spot18_scene, g_pn_41, SCENE_GORON_CITY, SDC_GORON_CITY, 0, 0)
/* 0x63 */ DEFINE_SCENE(spot20_scene, g_pn_42, SCENE_LON_LON_RANCH, SDC_LON_LON_RANCH, 0, 0)
/* 0x64 */ DEFINE_SCENE(ganon_tou_scene, g_pn_43, SCENE_OUTSIDE_GANONS_CASTLE, SDC_OUTSIDE_GANONS_CASTLE, 0, 0)
-#if OOT_DEBUG
+#if DEBUG_ASSETS
/* 0x65 */ DEFINE_SCENE(test01_scene, none, SCENE_TEST01, SDC_CALM_WATER, 0, 0)
/* 0x66 */ DEFINE_SCENE(besitu_scene, none, SCENE_BESITU, SDC_BESITU, 0, 0)
/* 0x67 */ DEFINE_SCENE(depth_test_scene, none, SCENE_DEPTH_TEST, SDC_DEFAULT, 0, 0)
diff --git a/include/tables/sequence_table.h b/include/tables/sequence_table.h
index d813cfb0da..70ccfcbae1 100644
--- a/include/tables/sequence_table.h
+++ b/include/tables/sequence_table.h
@@ -15,10 +15,10 @@
* - Argument 3: Cache load policy for the sequence (AudioCacheLoadType)
* - Argument 4: Sequence flags
*/
-#if PLATFORM_N64
-#define SEQ_0_FLAGS SEQ_FLAG_FANFARE | SEQ_FLAG_ENEMY
-#else
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
#define SEQ_0_FLAGS SEQ_FLAG_FANFARE
+#else
+#define SEQ_0_FLAGS SEQ_FLAG_FANFARE | SEQ_FLAG_ENEMY
#endif
DEFINE_SEQUENCE (Sequence_0, NA_BGM_GENERAL_SFX, MEDIUM_CART, CACHE_LOAD_PERMANENT, SEQ_0_FLAGS ) // general_sfx
DEFINE_SEQUENCE (Sequence_1, NA_BGM_NATURE_AMBIENCE, MEDIUM_CART, CACHE_LOAD_TEMPORARY, SEQ_FLAG_ENEMY ) // nature_ambience
diff --git a/include/tables/sfx/enemybank_table.h b/include/tables/sfx/enemybank_table.h
index ae2c3b7148..7cae1d7881 100644
--- a/include/tables/sfx/enemybank_table.h
+++ b/include/tables/sfx/enemybank_table.h
@@ -334,10 +334,10 @@
/* 0x3942 */ DEFINE_SFX(CHAN_4EA8, NA_SE_EN_BALINADE_THUNDER, 0x34, 3, 0, 0)
/* 0x3943 */ DEFINE_SFX(CHAN_415D, NA_SE_EN_BALINADE_BL_SPARK, 0x20, 2, 0, 0)
/* 0x3944 */ DEFINE_SFX(CHAN_4184, NA_SE_EN_BALINADE_BL_DEAD, 0x34, 3, 0, 0)
-#if PLATFORM_N64
-/* 0x3945 */ DEFINE_SFX(CHAN_4E86, NA_SE_EN_BALINADE_BREAK2, 0x34, 3, 0, 0)
-#else
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
/* 0x3945 */ DEFINE_SFX(CHAN_4E86, NA_SE_EN_BALINADE_BREAK2, 0x30, 3, 0, 0)
+#else
+/* 0x3945 */ DEFINE_SFX(CHAN_4E86, NA_SE_EN_BALINADE_BREAK2, 0x34, 3, 0, 0)
#endif
/* 0x3946 */ DEFINE_SFX(CHAN_425D, NA_SE_EN_BALINADE_HIT_RINK, 0x38, 3, 0, 0)
/* 0x3947 */ DEFINE_SFX(CHAN_3AF4, NA_SE_EN_GANON_WAVE_GND, 0x20, 3, 0, 0)
diff --git a/include/tables/sfx/environmentbank_table.h b/include/tables/sfx/environmentbank_table.h
index 08bd08de7e..b0d0fb62f9 100644
--- a/include/tables/sfx/environmentbank_table.h
+++ b/include/tables/sfx/environmentbank_table.h
@@ -43,10 +43,10 @@
/* 0x281F */ DEFINE_SFX(CHAN_1B61, NA_SE_EV_TBOX_UNLOCK, 0x30, 0, 0, 0)
/* 0x2820 */ DEFINE_SFX(CHAN_1B7D, NA_SE_EV_TBOX_OPEN, 0x30, 0, 0, 0)
/* 0x2821 */ DEFINE_SFX(CHAN_1B93, NA_SE_SY_TIMER, 0xA0, 0, 0, SFX_FLAG_13 | SFX_FLAG_3)
-#if PLATFORM_N64
-/* 0x2822 */ DEFINE_SFX(CHAN_1BE9, NA_SE_EV_FLAME_IGNITION, 0x2D, 2, 0, 0)
-#else
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
/* 0x2822 */ DEFINE_SFX(CHAN_1BE9, NA_SE_EV_FLAME_IGNITION, 0x20, 2, 0, 0)
+#else
+/* 0x2822 */ DEFINE_SFX(CHAN_1BE9, NA_SE_EV_FLAME_IGNITION, 0x2D, 2, 0, 0)
#endif
/* 0x2823 */ DEFINE_SFX(CHAN_1BF9, NA_SE_EV_SPEAR_HIT, 0x30, 0, 0, 0)
/* 0x2824 */ DEFINE_SFX(CHAN_1C14, NA_SE_EV_ELEVATOR_MOVE, 0x30, 0, 0, SFX_FLAG_11)
@@ -108,10 +108,10 @@
/* 0x285C */ DEFINE_SFX(CHAN_2374, NA_SE_EV_BLOCKSINK, 0x30, 2, 0, 0)
/* 0x285D */ DEFINE_SFX(CHAN_2389, NA_SE_EV_CROWD, 0x30, 0, 0, SFX_FLAG_13 | SFX_FLAG_12 | SFX_FLAG_11)
/* 0x285E */ DEFINE_SFX(CHAN_23A6, NA_SE_EV_WATER_LEVEL_DOWN, 0x30, 0, 0, 0)
-#if PLATFORM_N64
-/* 0x285F */ DEFINE_SFX(CHAN_23D5, NA_SE_EV_NAVY_VANISH, 0x2C, 0, 0, 0)
-#else
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
/* 0x285F */ DEFINE_SFX(CHAN_23D5, NA_SE_EV_NAVY_VANISH, 0x30, 0, 0, 0)
+#else
+/* 0x285F */ DEFINE_SFX(CHAN_23D5, NA_SE_EV_NAVY_VANISH, 0x2C, 0, 0, 0)
#endif
/* 0x2860 */ DEFINE_SFX(CHAN_23EB, NA_SE_EV_LADDER_DOUND, 0x30, 3, 0, 0)
/* 0x2861 */ DEFINE_SFX(CHAN_2401, NA_SE_EV_WEB_VIBRATION, 0x30, 0, 0, 0)
diff --git a/include/tables/sfx/itembank_table.h b/include/tables/sfx/itembank_table.h
index 53f2ffadb2..e74469cfec 100644
--- a/include/tables/sfx/itembank_table.h
+++ b/include/tables/sfx/itembank_table.h
@@ -28,10 +28,10 @@
/* 0x1810 */ DEFINE_SFX(CHAN_10A2, NA_SE_IT_BOOMERANG_FLY, 0x30, 0, 0, SFX_FLAG_10)
/* 0x1811 */ DEFINE_SFX(CHAN_10D2, NA_SE_IT_SWORD_STRIKE, 0x40, 2, 0, 0)
/* 0x1812 */ DEFINE_SFX(CHAN_10E6, NA_SE_IT_HAMMER_SWING, 0x30, 0, 1, 0)
-#if PLATFORM_N64
-/* 0x1813 */ DEFINE_SFX(CHAN_10F4, NA_SE_IT_HOOKSHOT_REFLECT, 0x20, 0, 0, 0)
-#else
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
/* 0x1813 */ DEFINE_SFX(CHAN_10F4, NA_SE_IT_HOOKSHOT_REFLECT, 0x30, 0, 0, 0)
+#else
+/* 0x1813 */ DEFINE_SFX(CHAN_10F4, NA_SE_IT_HOOKSHOT_REFLECT, 0x20, 0, 0, 0)
#endif
/* 0x1814 */ DEFINE_SFX(CHAN_110B, NA_SE_IT_ARROW_STICK_CRE, 0x30, 0, 0, 0)
/* 0x1815 */ DEFINE_SFX(CHAN_1120, NA_SE_IT_ARROW_STICK_OBJ, 0x34, 0, 0, 0)
diff --git a/include/tex_len.h b/include/tex_len.h
new file mode 100644
index 0000000000..f6e54a82d1
--- /dev/null
+++ b/include/tex_len.h
@@ -0,0 +1,14 @@
+#ifndef TEX_LEN_H
+#define TEX_LEN_H
+
+/**
+ * Compute a length for an array holding a texture.
+ * `type` is the array's element type.
+ * `width`, `height` are the texture dimensions.
+ * `bpp` is the texture's pixel size, in bits per pixels.
+ * The calculation computes the size of the texture in bits `width * height * bpp`,
+ * then divides by 8 to get the size in bytes, then divides by the element type size.
+ */
+#define TEX_LEN(type, width, height, bpp) ((width) * (height) * (bpp) / 8 / sizeof(type))
+
+#endif
diff --git a/include/tha.h b/include/tha.h
index 941321b820..6a40db54cd 100644
--- a/include/tha.h
+++ b/include/tha.h
@@ -2,7 +2,6 @@
#define THA_H
#include "ultra64.h"
-#include "alignment.h"
typedef struct TwoHeadArena {
/* 0x00 */ size_t size;
diff --git a/include/title_setup_state.h b/include/title_setup_state.h
new file mode 100644
index 0000000000..30219872a8
--- /dev/null
+++ b/include/title_setup_state.h
@@ -0,0 +1,15 @@
+#ifndef TITLE_SETUP_STATE_H
+#define TITLE_SETUP_STATE_H
+
+#include "z64game.h"
+#include "z64view.h"
+
+typedef struct TitleSetupState {
+ /* 0x0000 */ GameState state;
+ /* 0x00A8 */ View view;
+} TitleSetupState; // size = 0x1D0
+
+void TitleSetup_Init(GameState* thisx);
+void TitleSetup_Destroy(GameState* thisx);
+
+#endif
diff --git a/include/transition_circle.h b/include/transition_circle.h
new file mode 100644
index 0000000000..23dec1d9d5
--- /dev/null
+++ b/include/transition_circle.h
@@ -0,0 +1,55 @@
+#ifndef TRANSITION_CIRCLE_H
+#define TRANSITION_CIRCLE_H
+
+#include "ultra64.h"
+#include "color.h"
+
+typedef enum TransitionCircleAppearance {
+ /* 0 */ TCA_NORMAL,
+ /* 1 */ TCA_WAVE,
+ /* 2 */ TCA_RIPPLE,
+ /* 3 */ TCA_STARBURST
+} TransitionCircleAppearance;
+
+typedef enum TransitionCircleColor {
+ /* 0 */ TCC_BLACK,
+ /* 1 */ TCC_WHITE,
+ /* 2 */ TCC_GRAY,
+ /* 3 */ TCC_SPECIAL // color varies depending on appearance. unused and appears broken
+} TransitionCircleColor;
+
+typedef enum TransitionCircleSpeed {
+ /* 0 */ TCS_FAST,
+ /* 1 */ TCS_SLOW
+} TransitionCircleSpeed;
+
+typedef struct TransitionCircle {
+ /* 0x000 */ Color_RGBA8_u32 color;
+ /* 0x004 */ Color_RGBA8_u32 unkColor;
+ /* 0x008 */ s32 texX;
+ /* 0x00C */ s32 texY;
+ /* 0x010 */ s32 speed;
+ /* 0x014 */ u8 direction;
+ /* 0x015 */ u8 colorType;
+ /* 0x016 */ u8 speedType;
+ /* 0x017 */ u8 appearanceType;
+ /* 0x018 */ u8 isDone;
+ /* 0x019 */ u8 frame;
+ /* 0x01A */ u16 normal;
+ /* 0x020 */ Mtx projection;
+ /* 0x060 */ Mtx lookAt;
+ /* 0x0A0 */ void* texture;
+ /* 0x0A8 */ Mtx modelView[2][3];
+} TransitionCircle; // size = 0x228
+
+void TransitionCircle_Start(void* thisx);
+void* TransitionCircle_Init(void* thisx);
+void TransitionCircle_Destroy(void* thisx);
+void TransitionCircle_Update(void* thisx, s32 updateRate);
+void TransitionCircle_Draw(void* thisx, Gfx** gfxP);
+s32 TransitionCircle_IsDone(void* thisx);
+void TransitionCircle_SetType(void* thisx, s32 type);
+void TransitionCircle_SetColor(void* thisx, u32 color);
+void TransitionCircle_SetUnkColor(void* thisx, u32 color);
+
+#endif
diff --git a/include/transition_fade.h b/include/transition_fade.h
new file mode 100644
index 0000000000..be4e575e0c
--- /dev/null
+++ b/include/transition_fade.h
@@ -0,0 +1,24 @@
+#ifndef TRANSITION_FADE_H
+#define TRANSITION_FADE_H
+
+#include "ultra64.h"
+#include "color.h"
+
+typedef struct TransitionFade {
+ /* 0x000 */ u8 type;
+ /* 0x001 */ u8 isDone;
+ /* 0x002 */ u8 direction;
+ /* 0x004 */ Color_RGBA8_u32 color;
+ /* 0x008 */ u16 timer;
+} TransitionFade; // size = 0xC
+
+void TransitionFade_Start(void* thisx);
+void* TransitionFade_Init(void* thisx);
+void TransitionFade_Destroy(void* thisx);
+void TransitionFade_Update(void* thisx, s32 updateRate);
+void TransitionFade_Draw(void* thisx, Gfx** gfxP);
+s32 TransitionFade_IsDone(void* thisx);
+void TransitionFade_SetColor(void* thisx, u32 color);
+void TransitionFade_SetType(void* thisx, s32 type);
+
+#endif
diff --git a/include/transition_tile.h b/include/transition_tile.h
new file mode 100644
index 0000000000..14191f3fe7
--- /dev/null
+++ b/include/transition_tile.h
@@ -0,0 +1,30 @@
+#ifndef TRANSITION_TILE_H
+#define TRANSITION_TILE_H
+
+#include "ultra64.h"
+
+typedef struct TransitionTileVtxData {
+ /* 0x0 */ f32 x;
+ /* 0x4 */ f32 y;
+} TransitionTileVtxData; // size = 0x8
+
+typedef struct TransitionTile {
+ /* 0x00 */ s32 cols;
+ /* 0x04 */ s32 rows;
+ /* 0x08 */ s32 frame;
+ /* 0x0C */ TransitionTileVtxData* vtxData;
+ /* 0x10 */ Vtx* vtxFrame1;
+ /* 0x14 */ Vtx* vtxFrame2;
+ /* 0x18 */ Mtx projection;
+ /* 0x58 */ Mtx modelView;
+ /* 0x98 */ Mtx unk_98;
+ /* 0xD8 */ Gfx* gfx; // "gfxtbl"
+ /* 0xDC */ u16* zBuffer;
+} TransitionTile; // size = 0xE0
+
+TransitionTile* TransitionTile_Init(TransitionTile* this, s32 cols, s32 rows);
+void TransitionTile_Destroy(TransitionTile* this);
+void TransitionTile_Update(TransitionTile* this);
+void TransitionTile_Draw(TransitionTile* this, Gfx** gfxP);
+
+#endif
diff --git a/include/transition_triforce.h b/include/transition_triforce.h
new file mode 100644
index 0000000000..85eb1597ea
--- /dev/null
+++ b/include/transition_triforce.h
@@ -0,0 +1,27 @@
+#ifndef TRANSITION_TRIFORCE_H
+#define TRANSITION_TRIFORCE_H
+
+#include "ultra64.h"
+#include "color.h"
+
+typedef struct TransitionTriforce {
+ /* 0x000 */ Color_RGBA8_u32 color;
+ /* 0x004 */ f32 transPos;
+ /* 0x008 */ f32 step;
+ /* 0x00C */ s32 state;
+ /* 0x010 */ s32 type;
+ /* 0x018 */ Mtx projection;
+ /* 0x058 */ s32 frame;
+ /* 0x060 */ Mtx modelView[2][3];
+} TransitionTriforce; // size = 0x1E0
+
+void TransitionTriforce_Start(void* thisx);
+void* TransitionTriforce_Init(void* thisx);
+void TransitionTriforce_Destroy(void* thisx);
+void TransitionTriforce_Update(void* thisx, s32 updateRate);
+void TransitionTriforce_SetColor(void* thisx, u32 color);
+void TransitionTriforce_SetType(void* thisx, s32 type);
+void TransitionTriforce_Draw(void* thisx, Gfx** gfxP);
+s32 TransitionTriforce_IsDone(void* thisx);
+
+#endif
diff --git a/include/transition_wipe.h b/include/transition_wipe.h
new file mode 100644
index 0000000000..654e9b6230
--- /dev/null
+++ b/include/transition_wipe.h
@@ -0,0 +1,30 @@
+#ifndef TRANSITION_WIPE_H
+#define TRANSITION_WIPE_H
+
+#include "ultra64.h"
+#include "color.h"
+
+typedef struct TransitionWipe {
+ /* 0x000 */ Color_RGBA8_u32 color;
+ /* 0x004 */ Color_RGBA8_u32 unkColor;
+ /* 0x008 */ u8 direction;
+ /* 0x009 */ u8 frame;
+ /* 0x00A */ u8 isDone;
+ /* 0x00C */ u16 texX;
+ /* 0x00E */ u16 texY;
+ /* 0x010 */ u16 normal;
+ /* 0x018 */ Mtx projection;
+ /* 0x058 */ Mtx lookAt;
+ /* 0x098 */ Mtx modelView[2][3];
+} TransitionWipe; // size = 0x218
+
+void TransitionWipe_Start(void* thisx);
+void* TransitionWipe_Init(void* thisx);
+void TransitionWipe_Destroy(void* thisx);
+void TransitionWipe_Update(void* thisx, s32 updateRate);
+void TransitionWipe_Draw(void* thisx, Gfx** gfxP);
+s32 TransitionWipe_IsDone(void* thisx);
+void TransitionWipe_SetType(void* thisx, s32 type);
+void TransitionWipe_SetColor(void* thisx, u32 color);
+
+#endif
diff --git a/include/translation.h b/include/translation.h
new file mode 100644
index 0000000000..6583326701
--- /dev/null
+++ b/include/translation.h
@@ -0,0 +1,16 @@
+#ifndef TRANSLATION_H
+#define TRANSLATION_H
+
+/**
+ * The "T" macro holds translations in English for original debug strings written in Japanese.
+ * The translated strings are only direct translations. Certain names or terms may not reflect
+ * their in-game localized counterparts.
+ *
+ * To use translated English strings in the build, change the definition below to "en".
+ *
+ * Note: This translation macro exists for quality of life purposes.
+ * The original game would not have had a macro like this.
+ */
+#define T(jp, en) jp
+
+#endif
diff --git a/include/ucode_disas.h b/include/ucode_disas.h
new file mode 100644
index 0000000000..d1fc901335
--- /dev/null
+++ b/include/ucode_disas.h
@@ -0,0 +1,49 @@
+#ifndef UCODE_DISAS_H
+#define UCODE_DISAS_H
+
+#include "ultra64.h"
+
+typedef enum UcodeType {
+ /* 0 */ UCODE_TYPE_NULL,
+ /* 1 */ UCODE_TYPE_F3DZEX,
+ /* 2 */ UCODE_TYPE_UNK, // Likely F3DEX2 or a similar variant
+ /* 3 */ UCODE_TYPE_S2DEX
+} UcodeType;
+
+typedef struct UCodeInfo {
+ /* 0x00 */ u32 type;
+ /* 0x04 */ void* ptr;
+} UCodeInfo; // size = 0x8
+
+typedef struct UCodeDisas {
+ /* 0x00 */ uintptr_t segments[NUM_SEGMENTS];
+ /* 0x40 */ Gfx* dlStack[18];
+ /* 0x88 */ s32 dlDepth;
+ /* 0x8C */ u32 dlCnt;
+ /* 0x90 */ u32 vtxCnt;
+ /* 0x94 */ u32 spvtxCnt;
+ /* 0x98 */ u32 tri1Cnt;
+ /* 0x9C */ u32 tri2Cnt;
+ /* 0xA0 */ u32 quadCnt;
+ /* 0xA4 */ u32 lineCnt;
+ /* 0xA8 */ u32 loaducodeCnt;
+ /* 0xAC */ u32 pipeSyncRequired;
+ /* 0xB0 */ u32 tileSyncRequired;
+ /* 0xB4 */ u32 loadSyncRequired;
+ /* 0xB8 */ u32 syncErr;
+ /* 0xBC */ s32 enableLog;
+ /* 0xC0 */ s32 ucodeType;
+ /* 0xC4 */ s32 ucodeInfoCount;
+ /* 0xC8 */ UCodeInfo* ucodeInfo;
+ /* 0xCC */ u32 modeH;
+ /* 0xD0 */ u32 modeL;
+ /* 0xD4 */ u32 geometryMode;
+} UCodeDisas; // size = 0xD8
+
+void UCodeDisas_Init(UCodeDisas*);
+void UCodeDisas_Destroy(UCodeDisas*);
+void UCodeDisas_Disassemble(UCodeDisas*, Gfx*);
+void UCodeDisas_RegisterUCode(UCodeDisas*, s32, UCodeInfo*);
+void UCodeDisas_SetCurUCode(UCodeDisas*, void*);
+
+#endif
diff --git a/include/ultra64.h b/include/ultra64.h
index ed88bcb0f6..c7607ac921 100644
--- a/include/ultra64.h
+++ b/include/ultra64.h
@@ -1,14 +1,14 @@
#ifndef ULTRA64_H
#define ULTRA64_H
-#include "libc/assert.h"
-#include "libc/math.h"
-#include "libc/stdarg.h"
-#include "libc/stdbool.h"
-#include "libc/stddef.h"
-#include "libc/stdint.h"
-#include "libc/stdlib.h"
-#include "libc/string.h"
+#include "assert.h"
+#include "math.h"
+#include "stdarg.h"
+#include "stdbool.h"
+#include "stddef.h"
+#include "stdint.h"
+#include "stdlib.h"
+#include "string.h"
#include "ultra64/ultratypes.h"
#include "unk.h"
@@ -24,12 +24,200 @@
#include "ultra64/sptask.h"
#include "ultra64/gu.h"
#include "ultra64/vi.h"
+#include "ultra64/viint.h"
#include "ultra64/pi.h"
#include "ultra64/controller.h"
#include "ultra64/mbi.h"
#include "ultra64/pfs.h"
#include "ultra64/motor.h"
+#include "ultra64/os_pi.h"
+#include "ultra64/os_system.h"
+#include "ultra64/os_vi.h"
+#include "ultra64/osint.h"
+#include "ultra64/piint.h"
#include "ultra64/R4300.h"
+#include "ultra64/siint.h"
#include "ultra64/ucode.h"
+#include "ultra64/version.h"
+
+union uObjBg;
+
+void __osPiCreateAccessQueue(void);
+void __osPiGetAccess(void);
+void __osPiRelAccess(void);
+s32 osSendMesg(OSMesgQueue* mq, OSMesg msg, s32 flag);
+void osStopThread(OSThread* thread);
+void osViExtendVStart(u32 value);
+s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag);
+
+#if LIBULTRA_VERSION < LIBULTRA_VERSION_K
+void osInitialize(void);
+#else
+#define osInitialize() \
+ { \
+ __osInitialize_common(); \
+ __osInitialize_autodetect(); \
+ }
+#endif
+
+void __osInitialize_common(void);
+void __osInitialize_autodetect(void);
+void __osEnqueueAndYield(OSThread**);
+void __osEnqueueThread(OSThread**, OSThread*);
+OSThread* __osPopThread(OSThread**);
+void __osDispatchThread(void);
+void __osCleanupThread(void);
+void __osDequeueThread(OSThread** queue, OSThread* thread);
+void osDestroyThread(OSThread* thread);
+void osCreateThread(OSThread* thread, OSId id, void (*entry)(void*), void* arg, void* sp, OSPri pri);
+void __osSetSR(u32);
+u32 __osGetSR(void);
+void osWritebackDCache(void* vaddr, s32 nbytes);
+void* osViGetNextFramebuffer(void);
+void osCreatePiManager(OSPri pri, OSMesgQueue* cmdQueue, OSMesg* cmdBuf, s32 cmdMsgCnt);
+void __osDevMgrMain(void* arg);
+s32 __osPiRawStartDma(s32 dir, u32 cartAddr, void* dramAddr, size_t size);
+void osViBlack(u8 active);
+s32 __osSiRawReadIo(void* devAddr, u32* dst);
+OSId osGetThreadId(OSThread* thread);
+void osViSetMode(OSViMode* mode);
+u32 __osProbeTLB(void*);
+u32 osGetMemSize(void);
+void osSetEventMesg(OSEvent e, OSMesgQueue* mq, OSMesg msg);
+void osUnmapTLBAll(void);
+s32 osEPiStartDma(OSPiHandle* handle, OSIoMesg* mb, s32 direction);
+void osInvalICache(void* vaddr, s32 nbytes);
+void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 count);
+void osInvalDCache(void* vaddr, s32 nbytes);
+s32 __osSiDeviceBusy(void);
+s32 osJamMesg(OSMesgQueue* mq, OSMesg msg, s32 flag);
+void osSetThreadPri(OSThread* thread, OSPri pri);
+OSPri osGetThreadPri(OSThread* thread);
+s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
+void osViSwapBuffer(void* frameBufPtr);
+s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size);
+OSTime osGetTime(void);
+void osSetTime(OSTime time);
+void __osTimerServicesInit(void);
+void __osTimerInterrupt(void);
+void __osSetTimerIntr(OSTime time);
+OSTime __osInsertTimer(OSTimer* timer);
+u32 osGetCount(void);
+void __osSetCompare(u32);
+s32 __osDisableInt(void);
+void __osRestoreInt(s32);
+void __osViInit(void);
+void __osViSwapContext(void);
+OSMesgQueue* osPiGetCmdQueue(void);
+s32 osEPiReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
+void osViSetSpecialFeatures(u32 func);
+OSPiHandle* osCartRomInit(void);
+OSPiHandle* osDriveRomInit(void);
+void __osSetFpcCsr(u32);
+u32 __osGetFpcCsr(void);
+s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
+void osMapTLBRdb(void);
+void osYieldThread(void);
+u32 __osGetCause(void);
+s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
+s32 __osSiRawWriteIo(void* devAddr, u32 val);
+void osCreateViManager(OSPri pri);
+OSViContext* __osViGetCurrentContext(void);
+void osStartThread(OSThread* thread);
+void osViSetYScale(f32 scale);
+void osViSetXScale(f32 value);
+void __osSetWatchLo(u32);
+
+s32 osPfsFreeBlocks(OSPfs* pfs, s32* leftoverBytes);
+void guScale(Mtx* m, f32 x, f32 y, f32 z);
+OSTask* _VirtualToPhysicalTask(OSTask* intp);
+void osSpTaskLoad(OSTask* intp);
+void osSpTaskStartGo(OSTask* tp);
+void __osSiCreateAccessQueue(void);
+void __osSiGetAccess(void);
+void __osSiRelAccess(void);
+s32 osContInit(OSMesgQueue* mq, u8* ctlBitfield, OSContStatus* status);
+void __osContGetInitData(u8* ctlBitfield, OSContStatus* data);
+void __osPackRequestData(u8 poll);
+s32 osContStartReadData(OSMesgQueue* mq);
+void osContGetReadData(OSContPad* contData);
+void __osPackReadData(void);
+void guPerspectiveF(f32 mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
+void guPerspective(Mtx* m, u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
+s32 __osSpRawStartDma(s32 direction, void* devAddr, void* dramAddr, u32 size);
+s32 __osSiRawStartDma(s32 dir, void* addr);
+void osSpTaskYield(void);
+s32 __osPfsGetNextPage(OSPfs* pfs, u8* bank, __OSInode* inode, __OSInodeUnit* page);
+s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, s32 offset, s32 size, u8* data);
+s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel);
+void __osPfsRequestOneChannel(s32 channel, u8 cmd);
+void __osPfsGetOneChannelData(s32 channel, OSContStatus* contData);
+void guMtxIdentF(f32 mf[4][4]);
+void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
+void guLookAt(Mtx*, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
+s32 osPfsAllocateFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32 fileSize, s32* fileNo);
+s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared,
+ s32* finalPage);
+s32 osStopTimer(OSTimer* timer);
+u16 __osSumcalc(u8* ptr, s32 length);
+s32 __osIdCheckSum(u16* ptr, u16* checkSum, u16* idSum);
+s32 __osRepairPackId(OSPfs* pfs, __OSPackId* badid, __OSPackId* newid);
+s32 __osCheckPackId(OSPfs* pfs, __OSPackId* check);
+s32 __osGetId(OSPfs* pfs);
+s32 __osCheckId(OSPfs* pfs);
+s32 __osPfsRWInode(OSPfs* pfs, __OSInode* inode, u8 flag, u8 bank);
+void guMtxL2F(f32 mf[4][4], Mtx* m);
+s32 osPfsFindFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32* fileNo);
+s32 osAfterPreNMI(void);
+s32 osContStartQuery(OSMesgQueue* mq);
+void osContGetQuery(OSContStatus* data);
+void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt,
+ f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth,
+ s32 hiliteHeight);
+void guLookAtHilite(Mtx* m, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp,
+ f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth,
+ s32 hiliteHeight);
+u32 __osSpDeviceBusy(void);
+void guMtxIdent(Mtx*);
+void guPositionF(f32 mf[4][4], f32 rot, f32 pitch, f32 yaw, f32 scale, f32 x, f32 y, f32 z);
+void guPosition(Mtx*, f32, f32, f32, f32, f32, f32, f32);
+OSYieldResult osSpTaskYielded(OSTask* task);
+void guRotateF(f32 m[4][4], f32 a, f32 x, f32 y, f32 z);
+void guRotate(Mtx*, f32 a, f32 x, f32 y, f32 z);
+s32 osAiSetFrequency(u32 frequency);
+OSThread* __osGetActiveQueue(void);
+void guNormalize(f32* x, f32* y, f32* z);
+u32 osDpGetStatus(void);
+void osDpSetStatus(u32 status);
+s32 osPfsDeleteFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName);
+s32 __osPfsReleasePages(OSPfs* pfs, __OSInode* inode, u8 initialPage, u8 bank, __OSInodeUnit* finalPage);
+void guOrthoF(f32[4][4], f32, f32, f32, f32, f32, f32, f32);
+void guOrtho(Mtx*, f32, f32, f32, f32, f32, f32, f32);
+void osViSetEvent(OSMesgQueue* mq, OSMesg msg, u32 retraceCount);
+s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern);
+void __osPfsRequestData(u8 cmd);
+void __osPfsGetInitData(u8* pattern, OSContStatus* contData);
+s32 __osPfsSelectBank(OSPfs* pfs, u8 bank);
+s32 osContSetCh(u8 ch);
+s32 osPfsFileState(OSPfs* pfs, s32 fileNo, OSPfsState* state);
+s32 osPfsInitPak(OSMesgQueue* queue, OSPfs* pfs, s32 channel);
+s32 __osPfsCheckRamArea(OSPfs* pfs);
+s32 osPfsChecker(OSPfs* pfs);
+s32 func_80105788(OSPfs* pfs, __OSInodeCache* cache);
+s32 func_80105A60(OSPfs* pfs, __OSInodeUnit fpage, __OSInodeCache* cache);
+u32 osAiGetLength(void);
+void guTranslate(Mtx* m, f32 x, f32 y, f32 z);
+s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force);
+s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data);
+u8 __osContAddressCrc(u16 addr);
+u8 __osContDataCrc(u8* data);
+s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg);
+u32 __osSpGetStatus(void);
+void __osSpSetStatus(u32 status);
+void osWritebackDCacheAll(void);
+OSThread* __osGetCurrFaultedThread(void);
+void guMtxF2L(f32 mf[4][4], Mtx* m);
+void* osViGetCurrentFramebuffer(void);
+s32 __osSpSetPc(void* pc);
#endif
diff --git a/include/ultra64/R4300.h b/include/ultra64/R4300.h
index 6398ea17c4..1c2da84f12 100644
--- a/include/ultra64/R4300.h
+++ b/include/ultra64/R4300.h
@@ -4,13 +4,11 @@
#ifdef _LANGUAGE_C
#include "ultratypes.h"
#define U32(x) ((u32)x)
-#define C_REG(x) (x)
#else
#define U32(x) (x)
-#define C_REG(x) $x
#endif
-// Segment base addresses and sizes
+/* Segment base addresses and sizes */
#define KUBASE 0
#define KUSIZE 0x80000000
#define K0BASE 0x80000000
@@ -20,24 +18,24 @@
#define K2BASE 0xC0000000
#define K2SIZE 0x20000000
-// Exception vectors
-#define SIZE_EXCVEC 0x80 // Size of an exc. vec
-#define UT_VEC K0BASE // utlbmiss vector
-#define R_VEC (K1BASE + 0x1FC00000) // reset vector
-#define XUT_VEC (K0BASE + 0x80) // extended address tlbmiss
-#define ECC_VEC (K0BASE + 0x100) // Ecc exception vector
-#define E_VEC (K0BASE + 0x180) // Gen. exception vector
+/* Exception vectors */
+#define SIZE_EXCVEC 0x80 /* Size of an exc. vec */
+#define UT_VEC K0BASE /* utlbmiss vector */
+#define R_VEC (K1BASE + 0x1FC00000) /* reset vector */
+#define XUT_VEC (K0BASE + 0x80) /* extended address tlbmiss */
+#define ECC_VEC (K0BASE + 0x100) /* Ecc exception vector */
+#define E_VEC (K0BASE + 0x180) /* Gen. exception vector */
-// Address conversion macros
-#define K0_TO_K1(x) (U32(x) | 0xA0000000) // kseg0 to kseg1
-#define K1_TO_K0(x) (U32(x) & 0x9FFFFFFF) // kseg1 to kseg0
-#define K0_TO_PHYS(x) (U32(x) & 0x1FFFFFFF) // kseg0 to physical
-#define K1_TO_PHYS(x) (U32(x) & 0x1FFFFFFF) // kseg1 to physical
-#define KDM_TO_PHYS(x) (U32(x) & 0x1FFFFFFF) // direct mapped to physical
-#define PHYS_TO_K0(x) (U32(x) | 0x80000000) // physical to kseg0
-#define PHYS_TO_K1(x) (U32(x) | 0xA0000000) // physical to kseg1
+/* Address conversion macros */
+#define K0_TO_K1(x) (U32(x) | 0xA0000000) /* kseg0 to kseg1 */
+#define K1_TO_K0(x) (U32(x) & 0x9FFFFFFF) /* kseg1 to kseg0 */
+#define K0_TO_PHYS(x) (U32(x) & 0x1FFFFFFF) /* kseg0 to physical */
+#define K1_TO_PHYS(x) (U32(x) & 0x1FFFFFFF) /* kseg1 to physical */
+#define KDM_TO_PHYS(x) (U32(x) & 0x1FFFFFFF) /* direct mapped to physical */
+#define PHYS_TO_K0(x) (U32(x) | 0x80000000) /* physical to kseg0 */
+#define PHYS_TO_K1(x) (U32(x) | 0xA0000000) /* physical to kseg1 */
-// Address predicates
+/* Address predicates */
#define IS_KSEG0(x) (U32(x) >= K0BASE && U32(x) < K1BASE)
#define IS_KSEG1(x) (U32(x) >= K1BASE && U32(x) < K2BASE)
#define IS_KSEGDM(x) (U32(x) >= K0BASE && U32(x) < K2BASE)
@@ -45,25 +43,25 @@
#define IS_KPTESEG(x) (U32(x) >= KPTE_SHDUBASE)
#define IS_KUSEG(x) (U32(x) < K0BASE)
-// TLB size constants
+/* TLB size constants */
#define NTLBENTRIES 31 /* entry 31 is reserved by rdb */
#define TLBHI_VPN2MASK 0xFFFFE000
#define TLBHI_VPN2SHIFT 13
#define TLBHI_PIDMASK 0xFF
#define TLBHI_PIDSHIFT 0
-#define TLBHI_NPID 255 // 255 to fit in 8 bits
+#define TLBHI_NPID 255 /* 255 to fit in 8 bits */
#define TLBLO_PFNMASK 0x3FFFFFC0
#define TLBLO_PFNSHIFT 6
-#define TLBLO_CACHMASK 0x38 // cache coherency algorithm
+#define TLBLO_CACHMASK 0x38 /* cache coherency algorithm */
#define TLBLO_CACHSHIFT 3
-#define TLBLO_UNCACHED 0x10 // not cached
-#define TLBLO_NONCOHRNT 0x18 // Cacheable non-coherent
-#define TLBLO_EXLWR 0x28 // Exclusive write
-#define TLBLO_D 0x4 // writeable
-#define TLBLO_V 0x2 // valid bit
-#define TLBLO_G 0x1 // global access bit
+#define TLBLO_UNCACHED 0x10 /* not cached */
+#define TLBLO_NONCOHRNT 0x18 /* Cacheable non-coherent */
+#define TLBLO_EXLWR 0x28 /* Exclusive write */
+#define TLBLO_D 0x4 /* writeable */
+#define TLBLO_V 0x2 /* valid bit */
+#define TLBLO_G 0x1 /* global access bit */
#define TLBINX_PROBE 0x80000000
#define TLBINX_INXMASK 0x3F
@@ -88,104 +86,104 @@
/*
* Status register
*/
-#define SR_CUMASK 0xF0000000 // coproc usable bits
+#define SR_CUMASK 0xF0000000 /* coproc usable bits */
-#define SR_CU3 0x80000000 // Coprocessor 3 usable
-#define SR_CU2 0x40000000 // Coprocessor 2 usable
-#define SR_CU1 0x20000000 // Coprocessor 1 usable
-#define SR_CU0 0x10000000 // Coprocessor 0 usable
-#define SR_RP 0x08000000 // Reduced power (quarter speed)
-#define SR_FR 0x04000000 // MIPS III FP register mode
-#define SR_RE 0x02000000 // Reverse endian
-#define SR_ITS 0x01000000 // Instruction trace support
-#define SR_BEV 0x00400000 // Use boot exception vectors
-#define SR_TS 0x00200000 // TLB shutdown
-#define SR_SR 0x00100000 // Soft reset occured
-#define SR_CH 0x00040000 // Cache hit for last 'cache' op
-#define SR_CE 0x00020000 // Create ECC
-#define SR_DE 0x00010000 // ECC of parity does not cause error
+#define SR_CU3 0x80000000 /* Coprocessor 3 usable */
+#define SR_CU2 0x40000000 /* Coprocessor 2 usable */
+#define SR_CU1 0x20000000 /* Coprocessor 1 usable */
+#define SR_CU0 0x10000000 /* Coprocessor 0 usable */
+#define SR_RP 0x08000000 /* Reduced power (quarter speed) */
+#define SR_FR 0x04000000 /* MIPS III FP register mode */
+#define SR_RE 0x02000000 /* Reverse endian */
+#define SR_ITS 0x01000000 /* Instruction trace support */
+#define SR_BEV 0x00400000 /* Use boot exception vectors */
+#define SR_TS 0x00200000 /* TLB shutdown */
+#define SR_SR 0x00100000 /* Soft reset occured */
+#define SR_CH 0x00040000 /* Cache hit for last 'cache' op */
+#define SR_CE 0x00020000 /* Create ECC */
+#define SR_DE 0x00010000 /* ECC of parity does not cause error */
-// Interrupt enable bits
-// (NOTE: bits set to 1 enable the corresponding level interrupt)
-#define SR_IMASK 0x0000FF00 // Interrupt mask
-#define SR_IMASK8 0x00000000 // mask level 8
-#define SR_IMASK7 0x00008000 // mask level 7
-#define SR_IMASK6 0x0000C000 // mask level 6
-#define SR_IMASK5 0x0000E000 // mask level 5
-#define SR_IMASK4 0x0000F000 // mask level 4
-#define SR_IMASK3 0x0000F800 // mask level 3
-#define SR_IMASK2 0x0000FC00 // mask level 2
-#define SR_IMASK1 0x0000FE00 // mask level 1
-#define SR_IMASK0 0x0000FF00 // mask level 0
+/* Interrupt enable bits */
+/* (NOTE: bits set to 1 enable the corresponding level interrupt) */
+#define SR_IMASK 0x0000FF00 /* Interrupt mask */
+#define SR_IMASK8 0x00000000 /* mask level 8 */
+#define SR_IMASK7 0x00008000 /* mask level 7 */
+#define SR_IMASK6 0x0000C000 /* mask level 6 */
+#define SR_IMASK5 0x0000E000 /* mask level 5 */
+#define SR_IMASK4 0x0000F000 /* mask level 4 */
+#define SR_IMASK3 0x0000F800 /* mask level 3 */
+#define SR_IMASK2 0x0000FC00 /* mask level 2 */
+#define SR_IMASK1 0x0000FE00 /* mask level 1 */
+#define SR_IMASK0 0x0000FF00 /* mask level 0 */
-#define SR_IBIT8 0x00008000 // bit level 8
-#define SR_IBIT7 0x00004000 // bit level 7
-#define SR_IBIT6 0x00002000 // bit level 6
-#define SR_IBIT5 0x00001000 // bit level 5
-#define SR_IBIT4 0x00000800 // bit level 4
-#define SR_IBIT3 0x00000400 // bit level 3
-#define SR_IBIT2 0x00000200 // bit level 2
-#define SR_IBIT1 0x00000100 // bit level 1
+#define SR_IBIT8 0x00008000 /* bit level 8 */
+#define SR_IBIT7 0x00004000 /* bit level 7 */
+#define SR_IBIT6 0x00002000 /* bit level 6 */
+#define SR_IBIT5 0x00001000 /* bit level 5 */
+#define SR_IBIT4 0x00000800 /* bit level 4 */
+#define SR_IBIT3 0x00000400 /* bit level 3 */
+#define SR_IBIT2 0x00000200 /* bit level 2 */
+#define SR_IBIT1 0x00000100 /* bit level 1 */
#define SR_IMASKSHIFT 8
-#define SR_KX 0x00000080 // extended-addr TLB vec in kernel
-#define SR_SX 0x00000040 // xtended-addr TLB vec supervisor
-#define SR_UX 0x00000020 // xtended-addr TLB vec in user mode
-#define SR_KSU_MASK 0x00000018 // mode mask
-#define SR_KSU_USR 0x00000010 // user mode
-#define SR_KSU_SUP 0x00000008 // supervisor mode
-#define SR_KSU_KER 0x00000000 // kernel mode
-#define SR_ERL 0x00000004 // Error level, 1=>cache error
-#define SR_EXL 0x00000002 // Exception level, 1=>exception
-#define SR_IE 0x00000001 // interrupt enable, 1=>enable
+#define SR_KX 0x00000080 /* extended-addr TLB vec in kernel */
+#define SR_SX 0x00000040 /* xtended-addr TLB vec supervisor */
+#define SR_UX 0x00000020 /* xtended-addr TLB vec in user mode */
+#define SR_KSU_MASK 0x00000018 /* mode mask */
+#define SR_KSU_USR 0x00000010 /* user mode */
+#define SR_KSU_SUP 0x00000008 /* supervisor mode */
+#define SR_KSU_KER 0x00000000 /* kernel mode */
+#define SR_ERL 0x00000004 /* Error level, 1=>cache error */
+#define SR_EXL 0x00000002 /* Exception level, 1=>exception */
+#define SR_IE 0x00000001 /* interrupt enable, 1=>enable */
-// Cause Register
-#define CAUSE_BD 0x80000000 // Branch delay slot
-#define CAUSE_CEMASK 0x30000000 // coprocessor error
+/* Cause Register */
+#define CAUSE_BD 0x80000000 /* Branch delay slot */
+#define CAUSE_CEMASK 0x30000000 /* coprocessor error */
#define CAUSE_CESHIFT 28
-// Interrupt pending bits
-#define CAUSE_IP8 0x00008000 // External level 8 pending - COMPARE
-#define CAUSE_IP7 0x00004000 // External level 7 pending - INT4
-#define CAUSE_IP6 0x00002000 // External level 6 pending - INT3
-#define CAUSE_IP5 0x00001000 // External level 5 pending - INT2
-#define CAUSE_IP4 0x00000800 // External level 4 pending - INT1
-#define CAUSE_IP3 0x00000400 // External level 3 pending - INT0
-#define CAUSE_SW2 0x00000200 // Software level 2 pending
-#define CAUSE_SW1 0x00000100 // Software level 1 pending
+/* Interrupt pending bits */
+#define CAUSE_IP8 0x00008000 /* External level 8 pending - COMPARE */
+#define CAUSE_IP7 0x00004000 /* External level 7 pending - INT4 */
+#define CAUSE_IP6 0x00002000 /* External level 6 pending - INT3 */
+#define CAUSE_IP5 0x00001000 /* External level 5 pending - INT2 */
+#define CAUSE_IP4 0x00000800 /* External level 4 pending - INT1 */
+#define CAUSE_IP3 0x00000400 /* External level 3 pending - INT0 */
+#define CAUSE_SW2 0x00000200 /* Software level 2 pending */
+#define CAUSE_SW1 0x00000100 /* Software level 1 pending */
-#define CAUSE_IPMASK 0x0000FF00 // Pending interrupt mask
+#define CAUSE_IPMASK 0x0000FF00 /* Pending interrupt mask */
#define CAUSE_IPSHIFT 8
-#define CAUSE_EXCMASK 0x0000007C // Cause code bits
+#define CAUSE_EXCMASK 0x0000007C /* Cause code bits */
#define CAUSE_EXCSHIFT 2
-// Cause register exception codes
+/* Cause register exception codes */
#define EXC_CODE(x) ((x) << 2)
-// Hardware exception codes
-#define EXC_INT EXC_CODE(0) // interrupt
-#define EXC_MOD EXC_CODE(1) // TLB mod
-#define EXC_RMISS EXC_CODE(2) // Read TLB Miss
-#define EXC_WMISS EXC_CODE(3) // Write TLB Miss
-#define EXC_RADE EXC_CODE(4) // Read Address Error
-#define EXC_WADE EXC_CODE(5) // Write Address Error
-#define EXC_IBE EXC_CODE(6) // Instruction Bus Error
-#define EXC_DBE EXC_CODE(7) // Data Bus Error
-#define EXC_SYSCALL EXC_CODE(8) // SYSCALL
-#define EXC_BREAK EXC_CODE(9) // BREAKpoint
-#define EXC_II EXC_CODE(10) // Illegal Instruction
-#define EXC_CPU EXC_CODE(11) // CoProcessor Unusable
-#define EXC_OV EXC_CODE(12) // OVerflow
-#define EXC_TRAP EXC_CODE(13) // Trap exception
-#define EXC_VCEI EXC_CODE(14) // Virt. Coherency on Inst. fetch
-#define EXC_FPE EXC_CODE(15) // Floating Point Exception
-#define EXC_WATCH EXC_CODE(23) // Watchpoint reference
-#define EXC_VCED EXC_CODE(31) // Virt. Coherency on data read
+/* Hardware exception codes */
+#define EXC_INT EXC_CODE(0) /* interrupt */
+#define EXC_MOD EXC_CODE(1) /* TLB mod */
+#define EXC_RMISS EXC_CODE(2) /* Read TLB Miss */
+#define EXC_WMISS EXC_CODE(3) /* Write TLB Miss */
+#define EXC_RADE EXC_CODE(4) /* Read Address Error */
+#define EXC_WADE EXC_CODE(5) /* Write Address Error */
+#define EXC_IBE EXC_CODE(6) /* Instruction Bus Error */
+#define EXC_DBE EXC_CODE(7) /* Data Bus Error */
+#define EXC_SYSCALL EXC_CODE(8) /* SYSCALL */
+#define EXC_BREAK EXC_CODE(9) /* BREAKpoint */
+#define EXC_II EXC_CODE(10) /* Illegal Instruction */
+#define EXC_CPU EXC_CODE(11) /* CoProcessor Unusable */
+#define EXC_OV EXC_CODE(12) /* OVerflow */
+#define EXC_TRAP EXC_CODE(13) /* Trap exception */
+#define EXC_VCEI EXC_CODE(14) /* Virt. Coherency on Inst. fetch */
+#define EXC_FPE EXC_CODE(15) /* Floating Point Exception */
+#define EXC_WATCH EXC_CODE(23) /* Watchpoint reference */
+#define EXC_VCED EXC_CODE(31) /* Virt. Coherency on data read */
-// C0_PRID Defines
+/* C0_PRID Defines */
#define C0_IMPMASK 0xFF00
#define C0_IMPSHIFT 8
#define C0_REVMASK 0xFF
@@ -193,106 +191,106 @@
#define C0_MAJREVSHIFT 4
#define C0_MINREVMASK 0xF
-// Coprocessor 0 operations
-#define C0_READI 0x1 // read ITLB entry addressed by C0_INDEX
-#define C0_WRITEI 0x2 // write ITLB entry addressed by C0_INDEX
-#define C0_WRITER 0x6 // write ITLB entry addressed by C0_RAND
-#define C0_PROBE 0x8 // probe for ITLB entry addressed by TLBHI
-#define C0_RFE 0x10 // restore for exception
+/* Coprocessor 0 operations */
+#define C0_READI 0x1 /* read ITLB entry addressed by C0_INDEX */
+#define C0_WRITEI 0x2 /* write ITLB entry addressed by C0_INDEX */
+#define C0_WRITER 0x6 /* write ITLB entry addressed by C0_RAND */
+#define C0_PROBE 0x8 /* probe for ITLB entry addressed by TLBHI */
+#define C0_RFE 0x10 /* restore for exception */
-// 'cache' instruction definitions
+/* 'cache' instruction definitions */
-// Target cache
-#define CACH_PI 0x0 // specifies primary inst. cache
-#define CACH_PD 0x1 // primary data cache
-#define CACH_SI 0x2 // secondary instruction cache
-#define CACH_SD 0x3 // secondary data cache
+/* Target cache */
+#define CACH_PI 0x0 /* specifies primary inst. cache */
+#define CACH_PD 0x1 /* primary data cache */
+#define CACH_SI 0x2 /* secondary instruction cache */
+#define CACH_SD 0x3 /* secondary data cache */
-// Cache operations
-#define C_IINV 0x0 // index invalidate (inst, 2nd inst)
-#define C_IWBINV 0x0 // index writeback inval (d, sd)
-#define C_ILT 0x4 // index load tag (all)
-#define C_IST 0x8 // index store tag (all)
-#define C_CDX 0xC // create dirty exclusive (d, sd)
-#define C_HINV 0x10 // hit invalidate (all)
-#define C_HWBINV 0x14 // hit writeback inv. (d, sd)
-#define C_FILL 0x14 // fill (i)
-#define C_HWB 0x18 // hit writeback (i, d, sd)
-#define C_HSV 0x1C // hit set virt. (si, sd)
+/* Cache operations */
+#define C_IINV 0x0 /* index invalidate (inst, 2nd inst) */
+#define C_IWBINV 0x0 /* index writeback inval (d, sd) */
+#define C_ILT 0x4 /* index load tag (all) */
+#define C_IST 0x8 /* index store tag (all) */
+#define C_CDX 0xC /* create dirty exclusive (d, sd) */
+#define C_HINV 0x10 /* hit invalidate (all) */
+#define C_HWBINV 0x14 /* hit writeback inv. (d, sd) */
+#define C_FILL 0x14 /* fill (i) */
+#define C_HWB 0x18 /* hit writeback (i, d, sd) */
+#define C_HSV 0x1C /* hit set virt. (si, sd) */
-// Cache size definitions
-#define ICACHE_SIZE 0x4000 // 16K
-#define ICACHE_LINESIZE 32 // 8 words
+/* Cache size definitions */
+#define ICACHE_SIZE 0x4000 /* 16K */
+#define ICACHE_LINESIZE 32 /* 8 words */
#define ICACHE_LINEMASK (ICACHE_LINESIZE - 1)
-#define DCACHE_SIZE 0x2000 // 8K
-#define DCACHE_LINESIZE 16 // 4 words
+#define DCACHE_SIZE 0x2000 /* 8K */
+#define DCACHE_LINESIZE 16 /* 4 words */
#define DCACHE_LINEMASK (DCACHE_LINESIZE - 1)
-// C0_CONFIG register definitions
-#define CONFIG_CM 0x80000000 // 1 == Master-Checker enabled
-#define CONFIG_EC 0x70000000 // System Clock ratio
-#define CONFIG_EC_1_1 0x6 // System Clock ratio 1 :1
-#define CONFIG_EC_3_2 0x7 // System Clock ratio 1.5 :1
-#define CONFIG_EC_2_1 0x0 // System Clock ratio 2 :1
-#define CONFIG_EC_3_1 0x1 // System Clock ratio 3 :1
-#define CONFIG_EP 0x0F000000 // Transmit Data Pattern
-#define CONFIG_SB 0x00C00000 // Secondary cache block size
+/* C0_CONFIG register definitions */
+#define CONFIG_CM 0x80000000 /* 1 == Master-Checker enabled */
+#define CONFIG_EC 0x70000000 /* System Clock ratio */
+#define CONFIG_EC_1_1 0x6 /* System Clock ratio 1 :1 */
+#define CONFIG_EC_3_2 0x7 /* System Clock ratio 1.5 :1 */
+#define CONFIG_EC_2_1 0x0 /* System Clock ratio 2 :1 */
+#define CONFIG_EC_3_1 0x1 /* System Clock ratio 3 :1 */
+#define CONFIG_EP 0x0F000000 /* Transmit Data Pattern */
+#define CONFIG_SB 0x00C00000 /* Secondary cache block size */
-#define CONFIG_SS 0x00200000 // Split scache: 0 == I&D combined
-#define CONFIG_SW 0x00100000 // scache port: 0==128, 1==64
-#define CONFIG_EW 0x000C0000 // System Port width: 0==64, 1==32
-#define CONFIG_SC 0x00020000 // 0 -> 2nd cache present
-#define CONFIG_SM 0x00010000 // 0 -> Dirty Shared Coherency enable
-#define CONFIG_BE 0x00008000 // Endian-ness: 1 --> BE
-#define CONFIG_EM 0x00004000 // 1 -> ECC mode, 0 -> parity
-#define CONFIG_EB 0x00002000 // Block order:1->sequent,0->subblock
+#define CONFIG_SS 0x00200000 /* Split scache: 0 == I&D combined */
+#define CONFIG_SW 0x00100000 /* scache port: 0==128, 1==64 */
+#define CONFIG_EW 0x000C0000 /* System Port width: 0==64, 1==32 */
+#define CONFIG_SC 0x00020000 /* 0 -> 2nd cache present */
+#define CONFIG_SM 0x00010000 /* 0 -> Dirty Shared Coherency enable */
+#define CONFIG_BE 0x00008000 /* Endian-ness: 1 --> BE */
+#define CONFIG_EM 0x00004000 /* 1 -> ECC mode, 0 -> parity */
+#define CONFIG_EB 0x00002000 /* Block order:1->sequent,0->subblock */
-#define CONFIG_IC 0x00000E00 // Primary Icache size
-#define CONFIG_DC 0x000001C0 // Primary Dcache size
-#define CONFIG_IB 0x00000020 // Icache block size
-#define CONFIG_DB 0x00000010 // Dcache block size
-#define CONFIG_CU 0x00000008 // Update on Store-conditional
-#define CONFIG_K0 0x00000007 // K0SEG Coherency algorithm
+#define CONFIG_IC 0x00000E00 /* Primary Icache size */
+#define CONFIG_DC 0x000001C0 /* Primary Dcache size */
+#define CONFIG_IB 0x00000020 /* Icache block size */
+#define CONFIG_DB 0x00000010 /* Dcache block size */
+#define CONFIG_CU 0x00000008 /* Update on Store-conditional */
+#define CONFIG_K0 0x00000007 /* K0SEG Coherency algorithm */
-#define CONFIG_UNCACHED 0x00000002 // K0 is uncached
+#define CONFIG_UNCACHED 0x00000002 /* K0 is uncached */
#define CONFIG_NONCOHRNT 0x00000003
#define CONFIG_COHRNT_EXLWR 0x00000005
-#define CONFIG_SB_SHFT 22 // shift SB to bit position 0
-#define CONFIG_IC_SHFT 9 // shift IC to bit position 0
-#define CONFIG_DC_SHFT 6 // shift DC to bit position 0
-#define CONFIG_BE_SHFT 15 // shift BE to bit position 0
+#define CONFIG_SB_SHFT 22 /* shift SB to bit position 0 */
+#define CONFIG_IC_SHFT 9 /* shift IC to bit position 0 */
+#define CONFIG_DC_SHFT 6 /* shift DC to bit position 0 */
+#define CONFIG_BE_SHFT 15 /* shift BE to bit position 0 */
-// C0_TAGLO definitions for setting/getting cache states and physaddr bits
-#define SADDRMASK 0xFFFFE000 // 31..13 -> scache paddr bits 35..17
-#define SVINDEXMASK 0x00000380 // 9..7: prim virt index bits 14..12
-#define SSTATEMASK 0x00001C00 // bits 12..10 hold scache line state
-#define SINVALID 0x00000000 // invalid --> 000 == state 0
-#define SCLEANEXCL 0x00001000 // clean exclusive --> 100 == state 4
-#define SDIRTYEXCL 0x00001400 // dirty exclusive --> 101 == state 5
-#define SECC_MASK 0x0000007F // low 7 bits are ecc for the tag
-#define SADDR_SHIFT 4 // shift STagLo (31..13) to 35..17
+/* C0_TAGLO definitions for setting/getting cache states and physaddr bits */
+#define SADDRMASK 0xFFFFE000 /* 31..13 -> scache paddr bits 35..17 */
+#define SVINDEXMASK 0x00000380 /* 9..7: prim virt index bits 14..12 */
+#define SSTATEMASK 0x00001C00 /* bits 12..10 hold scache line state */
+#define SINVALID 0x00000000 /* invalid --> 000 == state 0 */
+#define SCLEANEXCL 0x00001000 /* clean exclusive --> 100 == state 4 */
+#define SDIRTYEXCL 0x00001400 /* dirty exclusive --> 101 == state 5 */
+#define SECC_MASK 0x0000007F /* low 7 bits are ecc for the tag */
+#define SADDR_SHIFT 4 /* shift STagLo (31..13) to 35..17 */
-#define PADDRMASK 0xFFFFFF00 // PTagLo31..8->prim paddr bits35..12
-#define PADDR_SHIFT 4 // roll bits 35..12 down to 31..8
-#define PSTATEMASK 0x00C0 // bits 7..6 hold primary line state
-#define PINVALID 0x0000 // invalid --> 000 == state 0
-#define PCLEANEXCL 0x0080 // clean exclusive --> 10 == state 2
-#define PDIRTYEXCL 0x00C0 // dirty exclusive --> 11 == state 3
-#define PPARITY_MASK 0x0001 // low bit is parity bit (even).
+#define PADDRMASK 0xFFFFFF00 /* PTagLo31..8->prim paddr bits35..12 */
+#define PADDR_SHIFT 4 /* roll bits 35..12 down to 31..8 */
+#define PSTATEMASK 0x00C0 /* bits 7..6 hold primary line state */
+#define PINVALID 0x0000 /* invalid --> 000 == state 0 */
+#define PCLEANEXCL 0x0080 /* clean exclusive --> 10 == state 2 */
+#define PDIRTYEXCL 0x00C0 /* dirty exclusive --> 11 == state 3 */
+#define PPARITY_MASK 0x0001 /* low bit is parity bit (even). */
-// C0_CACHE_ERR definitions.
-#define CACHERR_ER 0x80000000 // 0: inst ref, 1: data ref
-#define CACHERR_EC 0x40000000 // 0: primary, 1: secondary
-#define CACHERR_ED 0x20000000 // 1: data error
-#define CACHERR_ET 0x10000000 // 1: tag error
-#define CACHERR_ES 0x08000000 // 1: external ref, e.g. snoo
-#define CACHERR_EE 0x04000000 // error on SysAD bus
-#define CACHERR_EB 0x02000000 // complicated, see spec.
-#define CACHERR_EI 0x01000000 // complicated, see spec.
-#define CACHERR_SIDX_MASK 0x003FFFF8 // secondary cache index
-#define CACHERR_PIDX_MASK 0x00000007 // primary cache index
-#define CACHERR_PIDX_SHIFT 12 // bits 2..0 are paddr14..12
+/* C0_CACHE_ERR definitions. */
+#define CACHERR_ER 0x80000000 /* 0: inst ref, 1: data ref */
+#define CACHERR_EC 0x40000000 /* 0: primary, 1: secondary */
+#define CACHERR_ED 0x20000000 /* 1: data error */
+#define CACHERR_ET 0x10000000 /* 1: tag error */
+#define CACHERR_ES 0x08000000 /* 1: external ref, e.g. snoo */
+#define CACHERR_EE 0x04000000 /* error on SysAD bus */
+#define CACHERR_EB 0x02000000 /* complicated, see spec. */
+#define CACHERR_EI 0x01000000 /* complicated, see spec. */
+#define CACHERR_SIDX_MASK 0x003FFFF8 /* secondary cache index */
+#define CACHERR_PIDX_MASK 0x00000007 /* primary cache index */
+#define CACHERR_PIDX_SHIFT 12 /* bits 2..0 are paddr14..12 */
/*
* R4000 family supports hardware watchpoints:
@@ -311,57 +309,88 @@
#define WATCHLO_VALIDMASK 0xFFFFFFFB
#define WATCHHI_VALIDMASK 0x0000000F
-// Coprocessor 0 registers
-#define C0_INX C_REG(0)
-#define C0_RAND C_REG(1)
-#define C0_ENTRYLO0 C_REG(2)
-#define C0_ENTRYLO1 C_REG(3)
-#define C0_CONTEXT C_REG(4)
-#define C0_PAGEMASK C_REG(5) // page mask
-#define C0_WIRED C_REG(6) // # wired entries in tlb
-#define C0_BADVADDR C_REG(8)
-#define C0_COUNT C_REG(9) // free-running counter
-#define C0_ENTRYHI C_REG(10)
-#define C0_COMPARE C_REG(11) // counter comparison reg.
-#define C0_SR C_REG(12)
-#define C0_CAUSE C_REG(13)
-#define C0_EPC C_REG(14)
-#define C0_PRID C_REG(15) // revision identifier
-#define C0_CONFIG C_REG(16) // hardware configuration
-#define C0_LLADDR C_REG(17) // load linked address
-#define C0_WATCHLO C_REG(18) // watchpoint
-#define C0_WATCHHI C_REG(19) // watchpoint
-#define C0_ECC C_REG(26) // S-cache ECC and primary parity
-#define C0_CACHE_ERR C_REG(27) // cache error status
-#define C0_TAGLO C_REG(28) // cache operations
-#define C0_TAGHI C_REG(29) // cache operations
-#define C0_ERROR_EPC C_REG(30) // ECC error prg. counter
+/* Coprocessor 0 registers */
+#ifdef _LANGUAGE_C
+#define C0_INX 0
+#define C0_RAND 1
+#define C0_ENTRYLO0 2
+#define C0_ENTRYLO1 3
+#define C0_CONTEXT 4
+#define C0_PAGEMASK 5 /* page mask */
+#define C0_WIRED 6 /* # wired entries in tlb */
+#define C0_BADVADDR 8
+#define C0_COUNT 9 /* free-running counter */
+#define C0_ENTRYHI 10
+#define C0_COMPARE 11 /* counter comparison reg. */
+#define C0_SR 12
+#define C0_CAUSE 13
+#define C0_EPC 14
+#define C0_PRID 15 /* revision identifier */
+#define C0_CONFIG 16 /* hardware configuration */
+#define C0_LLADDR 17 /* load linked address */
+#define C0_WATCHLO 18 /* watchpoint */
+#define C0_WATCHHI 19 /* watchpoint */
+#define C0_ECC 26 /* S-cache ECC and primary parity */
+#define C0_CACHE_ERR 27 /* cache error status */
+#define C0_TAGLO 28 /* cache operations */
+#define C0_TAGHI 29 /* cache operations */
+#define C0_ERROR_EPC 30 /* ECC error prg. counter */
+#else
+#define C0_INX $0
+#define C0_RAND $1
+#define C0_ENTRYLO0 $2
+#define C0_ENTRYLO1 $3
+#define C0_CONTEXT $4
+#define C0_PAGEMASK $5 /* page mask */
+#define C0_WIRED $6 /* # wired entries in tlb */
+#define C0_BADVADDR $8
+#define C0_COUNT $9 /* free-running counter */
+#define C0_ENTRYHI $10
+#define C0_COMPARE $11 /* counter comparison reg. */
+#define C0_SR $12
+#define C0_CAUSE $13
+#define C0_EPC $14
+#define C0_PRID $15 /* revision identifier */
+#define C0_CONFIG $16 /* hardware configuration */
+#define C0_LLADDR $17 /* load linked address */
+#define C0_WATCHLO $18 /* watchpoint */
+#define C0_WATCHHI $19 /* watchpoint */
+#define C0_ECC $26 /* S-cache ECC and primary parity */
+#define C0_CACHE_ERR $27 /* cache error status */
+#define C0_TAGLO $28 /* cache operations */
+#define C0_TAGHI $29 /* cache operations */
+#define C0_ERROR_EPC $30 /* ECC error prg. counter */
+#endif
-// floating-point status register
-#define C1_FPCSR C_REG(31)
+/* floating-point status register */
+#ifdef _LANGUAGE_C
+#define C1_FPCSR 31
+#else
+#define C1_FPCSR $31
+#endif
-#define FPCSR_FS 0x01000000 // flush denorm to zero
-#define FPCSR_C 0x00800000 // condition bit
-#define FPCSR_CE 0x00020000 // cause: unimplemented operation
-#define FPCSR_CV 0x00010000 // cause: invalid operation
-#define FPCSR_CZ 0x00008000 // cause: division by zero
-#define FPCSR_CO 0x00004000 // cause: overflow
-#define FPCSR_CU 0x00002000 // cause: underflow
-#define FPCSR_CI 0x00001000 // cause: inexact operation
-#define FPCSR_EV 0x00000800 // enable: invalid operation
-#define FPCSR_EZ 0x00000400 // enable: division by zero
-#define FPCSR_EO 0x00000200 // enable: overflow
-#define FPCSR_EU 0x00000100 // enable: underflow
-#define FPCSR_EI 0x00000080 // enable: inexact operation
-#define FPCSR_FV 0x00000040 // flag: invalid operation
-#define FPCSR_FZ 0x00000020 // flag: division by zero
-#define FPCSR_FO 0x00000010 // flag: overflow
-#define FPCSR_FU 0x00000008 // flag: underflow
-#define FPCSR_FI 0x00000004 // flag: inexact operation
-#define FPCSR_RM_MASK 0x00000003 // rounding mode mask
-#define FPCSR_RM_RN 0x00000000 // round to nearest
-#define FPCSR_RM_RZ 0x00000001 // round to zero
-#define FPCSR_RM_RP 0x00000002 // round to positive infinity
-#define FPCSR_RM_RM 0x00000003 // round to negative infinity
+#define FPCSR_FS 0x01000000 /* flush denorm to zero */
+#define FPCSR_C 0x00800000 /* condition bit */
+#define FPCSR_CE 0x00020000 /* cause: unimplemented operation */
+#define FPCSR_CV 0x00010000 /* cause: invalid operation */
+#define FPCSR_CZ 0x00008000 /* cause: division by zero */
+#define FPCSR_CO 0x00004000 /* cause: overflow */
+#define FPCSR_CU 0x00002000 /* cause: underflow */
+#define FPCSR_CI 0x00001000 /* cause: inexact operation */
+#define FPCSR_EV 0x00000800 /* enable: invalid operation */
+#define FPCSR_EZ 0x00000400 /* enable: division by zero */
+#define FPCSR_EO 0x00000200 /* enable: overflow */
+#define FPCSR_EU 0x00000100 /* enable: underflow */
+#define FPCSR_EI 0x00000080 /* enable: inexact operation */
+#define FPCSR_FV 0x00000040 /* flag: invalid operation */
+#define FPCSR_FZ 0x00000020 /* flag: division by zero */
+#define FPCSR_FO 0x00000010 /* flag: overflow */
+#define FPCSR_FU 0x00000008 /* flag: underflow */
+#define FPCSR_FI 0x00000004 /* flag: inexact operation */
+#define FPCSR_RM_MASK 0x00000003 /* rounding mode mask */
+#define FPCSR_RM_RN 0x00000000 /* round to nearest */
+#define FPCSR_RM_RZ 0x00000001 /* round to zero */
+#define FPCSR_RM_RP 0x00000002 /* round to positive infinity */
+#define FPCSR_RM_RM 0x00000003 /* round to negative infinity */
#endif
diff --git a/include/ultra64/asm.h b/include/ultra64/asm.h
index 2a2536bdaa..d887673fa6 100644
--- a/include/ultra64/asm.h
+++ b/include/ultra64/asm.h
@@ -6,55 +6,107 @@
#define _MIPS_ISA_MIPS2 2
#define _MIPS_ISA_MIPS3 3
#define _MIPS_ISA_MIPS4 4
+
+#define _MIPS_SIM_ABI32 1 /* MIPS MSIG calling convention */
+#define _MIPS_SIM_NABI32 2 /* MIPS new 32-bit abi */
+ /* NABI32 is 64bit calling convention but 32bit type sizes) */
+#define _MIPS_SIM_ABI64 3 /* MIPS 64 calling convention */
#endif
#ifndef _LANGUAGE_C
+#ifdef __GNUC__
+#define TYPE(x, t) .type x, @t
+#define SIZE(x) .size x, . - x
+#else
+#define TYPE(x, t)
+#define SIZE(x)
+#endif
+
#define LEAF(x) \
- .balign 4 ;\
+ .align 2 ;\
.globl x ;\
- .type x, @function ;\
+ TYPE(x, function) ;\
+ .ent x, 0 ;\
x: ;\
- .ent x, 0 ;\
- .frame $sp, 0, $ra
+ .frame sp, 0, ra
#define XLEAF(x) \
- .balign 4 ;\
+ .align 2 ;\
.globl x ;\
- .type x, @function ;\
- x: ;\
- .aent x, 0
+ TYPE(x, function) ;\
+ .aent x, 0 ;\
+ x:
#define NESTED(x, fsize, ra) \
.globl x ;\
+ .ent x, 0 ;\
x: ;\
- .ent x, 0 ;\
- .frame $sp, fsize, ra
+ .frame sp, fsize, ra
#define XNESTED(x) \
.globl x ;\
- x: ;\
- .aent x, 0
+ .aent x, 0 ;\
+ x:
#define END(x) \
- .size x, . - x ;\
+ SIZE(x) ;\
.end x
-#define IMPORT(x, size) \
- .extern x, size
-
#define EXPORT(x) \
.globl x ;\
x:
+#ifdef __sgi
+#define IMPORT(sym, size) \
+ .extern sym, size
+#else
+#define IMPORT(sym, size)
+#endif
+
#define DATA(x) \
- .balign 4 ;\
+ .align 2 ;\
.globl x ;\
- .type x, @object ;\
+ TYPE(x, object) ;\
x:
#define ENDDATA(x) \
- .size x, . - x
+ SIZE(x)
+
+#define MFC0(dst, src) \
+ .set noreorder; mfc0 dst, src; .set reorder
+#define MTC0(dst, src) \
+ .set noreorder; mtc0 dst, src; .set reorder
+
+#define CACHE(op, base) \
+ .set noreorder; cache op, base; .set reorder
+
+#define CFC1(dst, src) \
+ .set noreorder; cfc1 dst, src; .set reorder
+#define CTC1(src, dst) \
+ .set noreorder; ctc1 src, dst; .set reorder
+
+#define NOP \
+ .set noreorder; nop; .set reorder
+
+#define TLBWI \
+ .set noreorder; tlbwi; .set reorder
+
+#define TLBR \
+ .set noreorder; tlbr; .set reorder
+
+#define TLBP \
+ .set noreorder; tlbp; .set reorder
+
+#ifndef __GNUC__
+#define ABS(x, y) \
+ .globl x; \
+ x = y
+#else
+#define ABS(x, y) \
+ .globl x; \
+ .set x, y
+#endif
#endif
@@ -62,11 +114,11 @@
* Stack Alignment
*/
#if (_MIPS_SIM == _ABIO32)
-#define NARGSAVE 4 // space for 4 args must be allocated
+#define NARGSAVE 4 /* space for 4 args must be allocated */
#define ALSZ (8-1)
#define ALMASK ~(8-1)
#elif (_MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64)
-#define NARGSAVE 0 // no caller responsibilities
+#define NARGSAVE 0 /* no caller responsibilities */
#define ALSZ (16-1)
#define ALMASK ~(16-1)
#endif
diff --git a/include/ultra64/bbskapi.h b/include/ultra64/bbskapi.h
new file mode 100644
index 0000000000..7918975475
--- /dev/null
+++ b/include/ultra64/bbskapi.h
@@ -0,0 +1,272 @@
+/**
+ * @file bbskapi.h
+ *
+ * This file contains the external API for the iQue Player's Secure Kernel Calls.
+ *
+ * Applications require permission to call particular Secure Kernel Calls, defined in the associated Ticket.
+ * Most are not callable by games.
+ */
+#ifndef BB_SKAPI_H
+#define BB_SKAPI_H
+
+#include "ultratypes.h"
+
+#define SKC_OK 0
+#define SKC_RECRYPT_INVALID 1
+#define SKC_RECRYPT_2 2 // Complete?
+#define SKC_RECRYPT_3 3 // Partial?
+#define SKC_RECRYPT_4 4 // Beginning?
+#define SKC_INVALID_ARGS -1
+#define SKC_INVALID_TSRL -2
+#define SKC_INVALID_CARL -3
+#define SKC_INVALID_CPRL -4
+#define SKC_INVALID_CERT -9
+#define SKC_NO_PERMISSION -11
+
+typedef struct BbAppLaunchCrls BbAppLaunchCrls;
+typedef struct BbCertBase BbCertBase;
+typedef struct BbEccSig BbEccSig;
+typedef struct BbRecryptList BbRecryptList;
+typedef struct BbShaHash BbShaHash;
+typedef struct BbTicketBundle BbTicketBundle;
+
+/**
+ * Retrieves the console's unique BBID.
+ *
+ * @param bbId Location to write the BBID to. Must be a pointer to cached DRAM with 4-byte alignment.
+ * @return
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * SKC_INVALID_ARGS If the supplied pointer is not valid.
+ * SKC_OK Otherwise.
+ */
+s32 skGetId(u32* bbId);
+
+/**
+ * Prepares to launch an application.
+ * The provided ticket bundle is verified and made the active ticket bundle.
+ * The AES decryption hardware is prepared.
+ *
+ * @param bundle Ticket Bundle associated with this application.
+ * @param crls Application Certificate Revocation Lists to check when verifying the ticket bundle.
+ * The ticket bundle must be signed by the Root signature without going through any
+ * revoked certificates.
+ * @param recryptList System Recrypt List (encrypted and digitally signed)
+ * @return
+ * SKC_INVALID_ARGS If any inputs are or contain invalid pointers,
+ * or the ticket is not for this console,
+ * or the ticket is for a trial that has expired.
+ * SKC_INVALID_TSRL If the provided TSRL revocation list is invalid.
+ * SKC_INVALID_CARL If the provided CARL revocation list is invalid.
+ * SKC_INVALID_CPRL If the provided CPRL revocation list is invalid.
+ * SKC_INVALID_CERT If a digital certificate was revoked by one of the revocation lists.
+ * SKC_RECRYPT_3 If the recrypt state for this app is not in an acceptable state to be launched.
+ * SKC_RECRYPT_4 If the recrypt state for this app is not in an acceptable state to be launched.
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * SKC_OK Otherwise.
+ */
+s32 skLaunchSetup(BbTicketBundle* bundle, BbAppLaunchCrls* crls, BbRecryptList* recryptList);
+
+/**
+ * Launches a prepared application that is assumed to have been loaded into memory at the entrypoint between calling
+ * skLaunchSetup and calling this. skLaunchSetup must have been called prior to set the active ticket bundle.
+ *
+ * @param entrypoint The entrypoint address of the app to launch.
+ *
+ * @return
+ * SKC_INVALID_ARGS If the entrypoint is an invalid pointer,
+ * or if content failed a hash check for non-recrypted apps,
+ * or if the content is an expired trial.
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * @note Does not return if the call is successful.
+ */
+s32 skLaunch(void* entrypoint);
+
+/**
+ * Verifies whether a provided Recrypt List is valid.
+ *
+ * @param recryptList Pointer to the (encrypted and digitally signed) recrypt list to verify.
+ * @return
+ * SKC_OK If the recrypt list is valid
+ * SKC_INVALID_ARGS If the recrypt list is invalid
+ * (e.g. contains invalid pointers or its ECDSA signature fails to verify)
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ */
+s32 skRecryptListValid(BbRecryptList* recryptList);
+
+/**
+ * Begins a new recryption task. Content downloaded is initially encrypted with the Common Key but may be re-encrypted
+ * with a new randomly generated AES key if the recrypt flag is set in the content metadata. Like with skLaunchSetup,
+ * the provided ticket bundle is first verified before being made the active ticket bundle.
+ *
+ * @param bundle The ticket bundle associated with the content that will be recrypted.
+ * @param crls Application Certificate Revocation Lists to check when verifying the ticket bundle.
+ * The ticket bundle must be signed by the Root signature without going through any
+ * revoked certificates.
+ * @param recryptList The recrypt list that the AES key will be saved to, after being encrypted with the
+ * console-specific recrypt list key.
+ * @return
+ * SKC_RECRYPT_INVALID If called on a ticket bundle that does not have the recrypt flag set.
+ * SKC_INVALID_ARGS If any inputs are or contain invalid pointers,
+ * or the ticket is not for this console,
+ * or the ticket is for a trial that has expired.
+ * SKC_INVALID_TSRL If the provided TSRL revocation list is invalid.
+ * SKC_INVALID_CARL If the provided CARL revocation list is invalid.
+ * SKC_INVALID_CPRL If the provided CPRL revocation list is invalid.
+ * SKC_INVALID_CERT If a digital certificate was revoked by one of the revocation lists.
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * Otherwise, one of SKC_RECRYPT_* will be returned communicating the initial state of the recryption process.
+ */
+s32 skRecryptBegin(BbTicketBundle* bundle, BbAppLaunchCrls* crls, BbRecryptList* recryptList);
+
+/**
+ * Recrypts the provided data, using the previously set context.
+ * Must be called following skRecryptBegin.
+ *
+ * @param buf Pointer to app content to encrypt and hash.
+ * @param size Amount of data to process in this buffer.
+ * @return
+ * SKC_INVALID_ARGS If the provided buffer is not fully contained in RAM or is otherwise invalid.
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * SKC_OK Otherwise.
+ */
+s32 skRecryptData(u8* buf, u32 size);
+
+/**
+ * Resumes a partially-complete recryption. The last chunk of successfully-recrypted data must be provided in order to
+ * set the AES-128-CBC Initialization Vector to continue recryption of the next chunk.
+ * Must be called following skRecryptBegin.
+ *
+ * @param buf Pointer to last chunk of successfully-recrypted content.
+ * @param size Amount of data available.
+ * @return
+ * SKC_INVALID_ARGS If the provided buffer is not fully contained in RAM or is otherwise invalid.
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * SKC_OK Otherwise.
+ */
+s32 skRecryptComputeState(u8* buf, u32 size);
+
+/**
+ * Concludes the recryption process. The SHA-1 hash of the content, computed during recryption, is checked against the
+ * hash in the active ticket bundle; if it passes, the recrypt list entry for the active content is updated to indicate
+ * that recryption is complete and was successful.
+ *
+ * @param recryptList The (encrypted and digitally signed) recrypt list to update.
+ * @return
+ * SKC_OK If recryption succeeded.
+ * SKC_INVALID_ARGS If recryption failed (e.g. if the hash of the content did not match the hash in the ticket bundle)
+ * or if the provided recrypt list is invalid or cannot find the entry for the content.
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ */
+s32 skRecryptEnd(BbRecryptList* recryptList);
+
+/**
+ * Generates a digital signature for the provided SHA-1 hash (treated as a message) using the Elliptic Curve Digital
+ * Signature Algorithm (ECDSA) on the curve sect233r1 with the console's ECDSA Private Key. Appends an identity of 1 to
+ * the end of the message prior to signing.
+ *
+ * @param hash The SHA-1 hash to sign.
+ * @param outSignature The resulting ECDSA digital signature.
+ * @return
+ * SKC_INVALID_ARGS If either of the arguments is an invalid pointer.
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * SKC_OK Otherwise.
+ */
+s32 skSignHash(BbShaHash* hash, BbEccSig* outSignature);
+
+/**
+ * Verifies a SHA-1 hash (treated as a message) against a digital signature using either the Elliptic Curve Digital
+ * Signature Algorithm (ECDSA) or the RSA Digital Signature Algorithm. For RSA, either 2048-bit or 4096-bit signatures
+ * can be recognized.
+ *
+ * For verifying self-signed (e.g. via skSignHash) ECDSA signatures the certificate chain and revocation lists are not
+ * required and may be passed as NULL, the public key is the console's own ECDSA public key. For verifying other types
+ * of signatures, a valid certificate chain and certificate revocation lists must be provided, in which case the
+ * signature must be signed by the Root certificate without going through any revoked certificates.
+ *
+ * This can only verify hashes signed with an identity of 1, such as those signed via skSignHash.
+ *
+ * @param hash The SHA-1 hash to check the signature of.
+ * @param signature The signature to compare against. May be an ECDSA, RSA2048 or RSA4096 signature.
+ * @param certChain Certificate Chain, NULL-terminated list of certificate pointers.
+ * Not required for self-signed ECDSA signatures and must be NULL in that case.
+ * Should not be more than 5 certificates long.
+ * Should end on the Root signature.
+ * @param crls Certificate Revocation Lists to check certificates against. Not required for self-signed ECDSA signatures.
+ * @return
+ * SKC_OK If the hash was successfully verified against the signature.
+ * SKC_INVALID_ARGS If any arguments are invalid pointers,
+ * or the hash could not be verified against the digital signature,
+ * or the certificate chain was invalid,
+ * or if any certificate revocation lists were invalid.
+ * SKC_INVALID_CERT If a digital certificate was revoked by one of the revocation lists.
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ */
+s32 skVerifyHash(BbShaHash* hash, u32* signature, BbCertBase** certChain, BbAppLaunchCrls* crls);
+
+/**
+ * Retrieves the consumption counters for all currently-tracked applications and the Ticket ID (TID) Window.
+ *
+ * The TID Window determines the TID for the first counter (cc[0]), the other counters (cc[i]) are associated with
+ * tidWindow + i.
+ *
+ * The consumption counters track either the number of minutes that a trial app has been played for, or the number of
+ * times a trial app has been launched.
+ *
+ * @param tidWindow The location to save the TID window to.
+ * @param cc An array of 26 u16s to save the consumption counters into.
+ * @return
+ * SKC_INVALID_ARGS If either pointer is invalid or there is not enough room to save all the consumption counters.
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * SKC_OK Otherwise.
+ */
+s32 skGetConsumption(u16* tidWindow, u16 cc[26]);
+
+/**
+ * Increments the Ticket ID Window by 1 and moves all consumption counters down by 1 slot to match the new window. The
+ * counter previously at position 0 is forgotten.
+ *
+ * @return
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * SKC_INVALID_ARGS If the resulting state could not be saved internally.
+ * SKC_OK If success.
+ */
+s32 skAdvanceTicketWindow(void);
+
+/**
+ * Overrides the trial limit and trial type stored in the currently loaded ticket.
+ *
+ * @param limit The new trial limit. Either a length of time or the number of allowed launches, depending on trial type.
+ * @param code The new trial type
+ * 0 = Time-limited in minutes, call skKeepAlive periodically
+ * 1 = Limited by number of launches
+ * 2 = Time-limited in minutes, no need to call skKeepAlive (TOVERIFY)
+ * @return
+ * SKC_OK If success.
+ * SKC_INVALID_ARGS If no ticket is currently loaded.
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ */
+s32 skSetLimit(u16 limit, u16 code);
+
+/**
+ * Returns to the system menu.
+ *
+ * @return
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * @note Does not return if called with permission.
+ */
+s32 skExit(void);
+
+/**
+ * Keeps trial applications alive.
+ *
+ * The hardware trial timer does not have a very long period so must be refreshed periodically by calling this function.
+ * This function updates the timer and checks for an expiry.
+ *
+ * @return
+ * SKC_NO_PERMISSION If called with insufficient permission.
+ * SKC_OK Otherwise.
+ * @note This function may not return if it detects the trial has expired.
+ */
+s32 skKeepAlive(void);
+
+#endif
diff --git a/include/ultra64/bcp.h b/include/ultra64/bcp.h
new file mode 100644
index 0000000000..f66fee2f02
--- /dev/null
+++ b/include/ultra64/bcp.h
@@ -0,0 +1,275 @@
+#ifndef BCP_H
+#define BCP_H
+
+#include "rcp.h"
+
+/******************************************************************************
+ * Additional MIPS Interface (MI) Registers
+ */
+
+/**
+ * Accesses to this register outside of Secure Mode cause an NMI to transfer control
+ * to the Secure Kernel.
+ *
+ * [25] ?: System software writes to this bit when launching an app or game
+ * [24] SK RAM Access: Set to 1 to enable access to 0x8000 bytes at 0x1FC40000
+ * [7] Secure Trap Cause: Memory card removed
+ * [6] Secure Trap Cause: Power button pressed
+ * [5] Secure Trap Cause: MI Error
+ * [4] Secure Trap Cause: PI Error
+ * [3] Secure Trap Cause: Timer expired
+ * [2] Secure Trap Cause: Syscall via read of this register outside of secure mode
+ * [1] Boot ROM Swap: 0 = SK mapped at 0x1FC00000, Boot ROM mapped at 0x1FC20000
+ * 1 = Boot ROM mapped at 0x1FC00000, SK mapped at 0x1FC20000
+ * [0] Secure Mode: 0 = not in secure mode
+ * 1 = in secure mode
+ */
+#define MI_SECURE_EXCEPTION_REG (MI_BASE_REG + 0x14)
+
+/**
+ * Read:
+ * [25] MD (active, 1 if card is currently disconnected else 0)
+ * [24] Power Button (active, 1 if button is currently pressed else 0)
+ * [13] MD (pending interrupt)
+ * [12] Power Button (pending interrupt)
+ * [11] USB1
+ * [10] USB0
+ * [ 9] PI_ERR
+ * [ 8] IDE
+ * [ 7] AES
+ * [ 6] FLASH
+ * [ 5] DP
+ * [ 4] PI
+ * [ 3] VI
+ * [ 2] AI
+ * [ 1] SI
+ * [ 0] SP
+ *
+ * Write:
+ * [13] Clear MD Interrupt
+ */
+#define MI_EX_INTR_REG (MI_BASE_REG + 0x38)
+
+/*
+ * MI_EX_INTR_REG: read bits
+ */
+#define MI_EX_INTR_SP (1 << 0)
+#define MI_EX_INTR_SI (1 << 1)
+#define MI_EX_INTR_AI (1 << 2)
+#define MI_EX_INTR_VI (1 << 3)
+#define MI_EX_INTR_PI (1 << 4)
+#define MI_EX_INTR_DP (1 << 5)
+#define MI_EX_INTR_FLASH (1 << 6)
+#define MI_EX_INTR_AES (1 << 7)
+#define MI_EX_INTR_IDE (1 << 8)
+#define MI_EX_INTR_PI_ERR (1 << 9)
+#define MI_EX_INTR_USB0 (1 << 10)
+#define MI_EX_INTR_USB1 (1 << 11)
+#define MI_EX_INTR_PWR_BTN (1 << 12)
+#define MI_EX_INTR_MD (1 << 13)
+#define MI_EX_INTR_PWR_BTN_PRESSED (1 << 24) /* updated in real-time, unrelated to interrupt */
+#define MI_EX_INTR_CARD_NOT_PRESENT (1 << 25) /* updated in real-time, unrelated to interrupt */
+
+#define MI_EX_INTR_ALL \
+ (MI_EX_INTR_FLASH | MI_EX_INTR_AES | MI_EX_INTR_IDE | MI_EX_INTR_PI_ERR | \
+ MI_EX_INTR_USB0 | MI_EX_INTR_USB1 | MI_EX_INTR_PWR_BTN | MI_EX_INTR_MD)
+
+/*
+ * MI_EX_INTR_REG: write bits
+ */
+#define MI_EX_INTR_CLR_MD (1 << 13)
+
+/**
+ * Write:
+ * [27:26] Set/Clear MD
+ * [25:24] Set/Clear BUTTON
+ * [23:22] Set/Clear USB1
+ * [21:20] Set/Clear USB0
+ * [19:18] Set/Clear PI_ERR
+ * [17:16] Set/Clear IDE
+ * [15:14] Set/Clear AES
+ * [13:12] Set/Clear FLASH
+ * [11:10] Set/Clear DP
+ * [ 9: 8] Set/Clear PI
+ * [ 7: 6] Set/Clear VI
+ * [ 5: 4] Set/Clear AI
+ * [ 3: 2] Set/Clear SI
+ * [ 1: 0] Set/Clear SP
+ *
+ * Read:
+ * [13] MD
+ * [12] BUTTON
+ * [11] USB1
+ * [10] USB0
+ * [ 9] PI_ERR
+ * [ 8] IDE
+ * [ 7] AES
+ * [ 6] FLASH
+ * [ 5] DP
+ * [ 4] PI
+ * [ 3] VI
+ * [ 2] AI
+ * [ 1] SI
+ * [ 0] SP
+ */
+#define MI_EX_INTR_MASK_REG (MI_BASE_REG + 0x3C)
+
+/*
+ * MI_EX_INTR_MASK_REG: write bits
+ */
+#define MI_EX_INTR_MASK_CLR_SP (1 << 0) /* clear SP mask */
+#define MI_EX_INTR_MASK_SET_SP (1 << 1) /* set SP mask */
+#define MI_EX_INTR_MASK_CLR_SI (1 << 2) /* clear SI mask */
+#define MI_EX_INTR_MASK_SET_SI (1 << 3) /* set SI mask */
+#define MI_EX_INTR_MASK_CLR_AI (1 << 4) /* clear AI mask */
+#define MI_EX_INTR_MASK_SET_AI (1 << 5) /* set AI mask */
+#define MI_EX_INTR_MASK_CLR_VI (1 << 6) /* clear VI mask */
+#define MI_EX_INTR_MASK_SET_VI (1 << 7) /* set VI mask */
+#define MI_EX_INTR_MASK_CLR_PI (1 << 8) /* clear PI mask */
+#define MI_EX_INTR_MASK_SET_PI (1 << 9) /* set PI mask */
+#define MI_EX_INTR_MASK_CLR_DP (1 << 10) /* clear DP mask */
+#define MI_EX_INTR_MASK_SET_DP (1 << 11) /* set DP mask */
+#define MI_EX_INTR_MASK_CLR_FLASH (1 << 12) /* clear FLASH mask */
+#define MI_EX_INTR_MASK_SET_FLASH (1 << 13) /* set FLASH mask */
+#define MI_EX_INTR_MASK_CLR_AES (1 << 14) /* clear AES mask */
+#define MI_EX_INTR_MASK_SET_AES (1 << 15) /* set AES mask */
+#define MI_EX_INTR_MASK_CLR_IDE (1 << 16) /* clear IDE mask */
+#define MI_EX_INTR_MASK_SET_IDE (1 << 17) /* set IDE mask */
+#define MI_EX_INTR_MASK_CLR_PI_ERR (1 << 18) /* clear PI_ERR mask */
+#define MI_EX_INTR_MASK_SET_PI_ERR (1 << 19) /* set PI_ERR mask */
+#define MI_EX_INTR_MASK_CLR_USB0 (1 << 20) /* clear USB0 mask */
+#define MI_EX_INTR_MASK_SET_USB0 (1 << 21) /* set USB0 mask */
+#define MI_EX_INTR_MASK_CLR_USB1 (1 << 22) /* clear USB1 mask */
+#define MI_EX_INTR_MASK_SET_USB1 (1 << 23) /* set USB1 mask */
+#define MI_EX_INTR_MASK_CLR_PWR_BTN (1 << 24) /* clear PWR_BTN mask */
+#define MI_EX_INTR_MASK_SET_PWR_BTN (1 << 25) /* set PWR_BTN mask */
+#define MI_EX_INTR_MASK_CLR_MD (1 << 26) /* clear MD mask */
+#define MI_EX_INTR_MASK_SET_MD (1 << 27) /* set MD mask */
+
+/*
+ * MI_EX_INTR_MASK_REG: read bits
+ */
+#define MI_EX_INTR_MASK_SP (1 << 0) /* SP intr mask */
+#define MI_EX_INTR_MASK_SI (1 << 1) /* SI intr mask */
+#define MI_EX_INTR_MASK_AI (1 << 2) /* AI intr mask */
+#define MI_EX_INTR_MASK_VI (1 << 3) /* VI intr mask */
+#define MI_EX_INTR_MASK_PI (1 << 4) /* PI intr mask */
+#define MI_EX_INTR_MASK_DP (1 << 5) /* DP intr mask */
+#define MI_EX_INTR_MASK_FLASH (1 << 6) /* FLASH intr mask */
+#define MI_EX_INTR_MASK_AES (1 << 7) /* AES intr mask */
+#define MI_EX_INTR_MASK_IDE (1 << 8) /* IDE intr mask */
+#define MI_EX_INTR_MASK_PI_ERR (1 << 9) /* PI_ERR intr mask */
+#define MI_EX_INTR_MASK_USB0 (1 << 10) /* USB0 intr mask */
+#define MI_EX_INTR_MASK_USB1 (1 << 11) /* USB1 intr mask */
+#define MI_EX_INTR_MASK_PWR_BTN (1 << 12) /* PWR_BTN intr mask */
+#define MI_EX_INTR_MASK_MD (1 << 13) /* MD intr mask */
+
+/******************************************************************************
+ * Additional Parallel Interface (PI) Registers
+ */
+
+/**
+ * Write:
+ * [31] Execute command after write
+ * [30] Interrupt when done
+ * [29:24] ?
+ * [23:16] NAND Command
+ * [15] ?
+ * [14] Buffer Select
+ * [13:12] Device Select
+ * [11] Do Error Correction
+ * [10] NAND Command is Multi-Cycle
+ * [ 9: 0] Data Transfer Length in Bytes
+ *
+ * Writing 0 to this register clears the interrupt
+ *
+ * Read:
+ * [31] Busy
+ * [11] Single-Bit Error Corrected
+ * [10] Double-Bit Error Uncorrectable
+ */
+#define PI_NAND_CTRL_REG (PI_BASE_REG + 0x48)
+
+/**
+ * PI internal buffer DMA read length. Writes initiate a DMA from RDRAM to the PI buffer.
+ */
+#define PI_EX_RD_LEN_REG (PI_BASE_REG + 0x58)
+
+/**
+ * PI internal buffer DMA write length. Writes initiate a DMA from the PI buffer to RDRAM.
+ */
+#define PI_EX_WR_LEN_REG (PI_BASE_REG + 0x5C)
+
+/**
+ * [31:16] Box ID
+ * [31:30] Hardware Revision? (osInitialize checks this and sets __osBbIsBb to 2 if != 0)
+ * [29:27] ?? (not seen)
+ * [26:25] ?? (system clock speed identifier?)
+ * [24:22] ?? (bootrom, checked against MI_10_REG and copied there if mismatch)
+ * [21:16] ?? (not seen)
+ * [ 7: 4] GPIO direction control
+ * [7] RTC Data output enable
+ * [6] RTC Clock output enable
+ * [5] Error LED output enable
+ * [4] Power Control output enable
+ * [ 3: 0] GPIO in/out value
+ * [3] RTC Data output value (0=low, 1=high)
+ * [2] RTC Clock output value (0=low, 1=high)
+ * [1] Error LED (0=on, 1=off)
+ * [0] Power Control (0=off, 1=on)
+ */
+#define PI_GPIO_REG (PI_BASE_REG + 0x60)
+
+/* Box ID */
+#define PI_GPIO_GET_BOXID(reg) ((reg) >> 16)
+#define PI_GPIO_IS_HW_V2(reg) ((reg) & (3 << 30))
+
+/* GPIO: Input/Output enables */
+#define PI_GPIO_I_PWR ((0 << 0) << 4)
+#define PI_GPIO_O_PWR ((1 << 0) << 4)
+#define PI_GPIO_I_LED ((0 << 1) << 4)
+#define PI_GPIO_O_LED ((1 << 1) << 4)
+#define PI_GPIO_I_RTC_CLK ((0 << 2) << 4)
+#define PI_GPIO_O_RTC_CLK ((1 << 2) << 4)
+#define PI_GPIO_I_RTC_DAT ((0 << 3) << 4)
+#define PI_GPIO_O_RTC_DAT ((1 << 3) << 4)
+
+/* GPIO: Output controls */
+/* Power */
+#define PI_GPIO_PWR_OFF (0 << 0)
+#define PI_GPIO_PWR_ON (1 << 0)
+/* LED */
+#define PI_GPIO_LED_ON (0 << 1)
+#define PI_GPIO_LED_OFF (1 << 1)
+/* RTC */
+#define PI_GPIO_RTC_CLK_LO (0 << 2)
+#define PI_GPIO_RTC_CLK_HI (1 << 2)
+#define PI_GPIO_RTC_DAT_LO (0 << 3)
+#define PI_GPIO_RTC_DAT_HI (1 << 3)
+
+/* GPIO: Input getters */
+#define PI_GPIO_GET_PWR(reg) (((reg) >> 0) & 1)
+#define PI_GPIO_GET_LED(reg) (((reg) >> 1) & 1)
+#define PI_GPIO_GET_RTC_CLK(reg) (((reg) >> 2) & 1)
+#define PI_GPIO_GET_RTC_DAT(reg) (((reg) >> 3) & 1)
+
+/**
+ * [31] ?
+ */
+#define PI_64_REG (PI_BASE_REG + 0x64)
+
+/******************************************************************************
+ * Additional Serial Interface (SI) Registers
+ */
+
+/**
+ * ?
+ */
+#define SI_0C_REG (SI_BASE_REG + 0x0C)
+
+/**
+ * ?
+ */
+#define SI_1C_REG (SI_BASE_REG + 0x1C)
+
+#endif
diff --git a/include/ultra64/controller.h b/include/ultra64/controller.h
index 4ce047a201..e233f00484 100644
--- a/include/ultra64/controller.h
+++ b/include/ultra64/controller.h
@@ -17,6 +17,7 @@
#define CONT_CMD_WRITE_MEMPACK 3
#define CONT_CMD_READ_EEPROM 4
#define CONT_CMD_WRITE_EEPROM 5
+#define CONT_CMD_CHANNEL_RESET 0xFD
#define CONT_CMD_RESET 0xFF
#define CONT_CMD_REQUEST_STATUS_TX 1
@@ -181,4 +182,9 @@ typedef struct __OSContReadFormat {
/* 0x07 */ s8 joyY;
} __OSContReadFormat; // size = 0x8
+extern u8 __osContLastCmd;
+extern OSPifRam __osContPifRam;
+extern OSPifRam __osPfsPifRam;
+extern u8 __osMaxControllers;
+
#endif
diff --git a/include/ultra64/convert.h b/include/ultra64/convert.h
index 13679fc5b0..771fad19cd 100644
--- a/include/ultra64/convert.h
+++ b/include/ultra64/convert.h
@@ -15,4 +15,6 @@
#define OS_PHYSICAL_TO_K0(x) (void*)(((u32)(x)+0x80000000))
#define OS_PHYSICAL_TO_K1(x) (void*)(((u32)(x)+0xA0000000))
+u32 osVirtualToPhysical(void* vaddr);
+
#endif
diff --git a/include/ultra64/exception.h b/include/ultra64/exception.h
index 886a3b9096..d4368da166 100644
--- a/include/ultra64/exception.h
+++ b/include/ultra64/exception.h
@@ -1,7 +1,7 @@
#ifndef ULTRA64_EXCEPTION_H
#define ULTRA64_EXCEPTION_H
-// Interrupt masks
+/* Interrupt masks */
#define OS_IM_NONE 0x00000001
#define OS_IM_RCP 0x00000401
#define OS_IM_SW1 0x00000501
@@ -23,7 +23,7 @@
#define RCP_IMASK 0x003F0000
#define RCP_IMASKSHIFT 16
-// OSHWIntr values
+/* OSHWIntr values */
#define OS_INTR_CART 1
#ifdef _LANGUAGE_C
@@ -51,11 +51,11 @@ extern __osHwInt __osHwIntTable[];
#else
-// __osHwInt struct member offsets
+/* __osHwInt struct member offsets */
#define HWINT_CALLBACK 0x00
#define HWINT_SP 0x04
-// __osHwInt struct size
+/* __osHwInt struct size */
#define HWINT_SIZE 0x8
#endif
diff --git a/include/ultra64/gbi.h b/include/ultra64/gbi.h
index 55171076d6..fe248cdf69 100644
--- a/include/ultra64/gbi.h
+++ b/include/ultra64/gbi.h
@@ -1,8 +1,10 @@
-#include "mbi.h"
#ifndef ULTRA64_GBI_H
#define ULTRA64_GBI_H
+#include "mbi.h"
+#include "ultratypes.h"
+
#ifdef GBI_DOWHILE
/* Private macro to wrap other macros in do {...} while (0) */
#define _DW(macro) do { macro } while (0)
diff --git a/include/ultra64/gs2dex.h b/include/ultra64/gs2dex.h
index 031dcb9f7d..3e15c49d14 100644
--- a/include/ultra64/gs2dex.h
+++ b/include/ultra64/gs2dex.h
@@ -1,6 +1,8 @@
#ifndef GS2DEX_H
#define GS2DEX_H
+#include "ultratypes.h"
+
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
diff --git a/include/ultra64/libc.h b/include/ultra64/libc.h
index e71cb879d7..3480f101ad 100644
--- a/include/ultra64/libc.h
+++ b/include/ultra64/libc.h
@@ -5,7 +5,7 @@
void osSyncPrintf(const char* fmt, ...);
-#ifdef __GNUC__
+#if defined(__GNUC__) && defined(NON_MATCHING)
void bzero(void* __s, unsigned int __n);
int bcmp(const void* __sl, const void* __s2, unsigned int __n);
void bcopy(const void* __src, void* __dest, unsigned int __n);
diff --git a/include/ultra64/message.h b/include/ultra64/message.h
index bf93c524c9..9b02d4f9cd 100644
--- a/include/ultra64/message.h
+++ b/include/ultra64/message.h
@@ -4,7 +4,11 @@
#define OS_MESG_NOBLOCK 0
#define OS_MESG_BLOCK 1
+#ifndef BBPLAYER
#define OS_NUM_EVENTS 15
+#else
+#define OS_NUM_EVENTS 31
+#endif
#define OS_EVENT_SW1 0 /* CPU SW1 interrupt */
#define OS_EVENT_SW2 1 /* CPU SW2 interrupt */
@@ -21,6 +25,16 @@
#define OS_EVENT_FAULT 12 /* CPU fault event: used by rmon */
#define OS_EVENT_THREADSTATUS 13 /* CPU thread status: used by rmon */
#define OS_EVENT_PRENMI 14 /* Pre NMI interrupt */
+#ifdef BBPLAYER
+#define OS_EVENT_FLASH 23 /* NAND flash operation complete */
+#define OS_EVENT_AES 24 /* AES decryption complete */
+#define OS_EVENT_IDE 25 /* IDE transfer complete */
+#define OS_EVENT_PI_ERR 26 /* PI Error? */
+#define OS_EVENT_USB0 27 /* USB Controller 0 */
+#define OS_EVENT_USB1 28 /* USB Controller 1 */
+#define OS_EVENT_UNK_29 29 /* ? */
+#define OS_EVENT_MD 30 /* Memory card removed */
+#endif
#ifdef _LANGUAGE_C
@@ -47,7 +61,7 @@ typedef struct OSMesgQueue {
#else
-// OSMesgQueue struct member offsets
+/* OSMesgQueue struct member offsets */
#define MQ_MTQUEUE 0x00
#define MQ_FULLQUEUE 0x04
diff --git a/include/ultra64/os_pi.h b/include/ultra64/os_pi.h
new file mode 100644
index 0000000000..5a13f05fd9
--- /dev/null
+++ b/include/ultra64/os_pi.h
@@ -0,0 +1,8 @@
+#ifndef ULTRA64_OS_PI_H
+#define ULTRA64_OS_PI_H
+
+#include "pi.h"
+
+extern OSPiHandle* __osPiTable;
+
+#endif
diff --git a/include/ultra64/os_system.h b/include/ultra64/os_system.h
new file mode 100644
index 0000000000..19558c3103
--- /dev/null
+++ b/include/ultra64/os_system.h
@@ -0,0 +1,31 @@
+#ifndef ULTRA64_OS_SYSTEM_H
+#define ULTRA64_OS_SYSTEM_H
+
+#include "exception.h"
+#include "ultratypes.h"
+
+extern s32 osRomType; /* Bulk or cartridge ROM. 0=cartridge 1=bulk */
+extern void* osRomBase; /* Rom base address of the game image */
+extern s32 osTvType; /* 0 = PAL, 1 = NTSC, 2 = MPAL */
+extern s32 osResetType; /* 0 = cold reset, 1 = NMI */
+extern s32 osCicId;
+extern s32 osVersion;
+extern u32 osMemSize; /* Memory Size */
+extern s32 osAppNMIBuffer[0x10];
+
+extern OSIntMask __OSGlobalIntMask;
+
+#ifdef BBPLAYER
+extern u32 __osBbIsBb;
+extern u32 __osBbEepromSize;
+extern u32 __osBbPakSize;
+extern u32 __osBbFlashSize;
+extern u32 __osBbEepromAddress;
+extern u32 __osBbPakAddress[4];
+extern u32 __osBbFlashAddress;
+extern u32 __osBbSramSize;
+extern u32 __osBbSramAddress;
+extern u32 __osBbHackFlags;
+#endif
+
+#endif
diff --git a/include/ultra64/os_vi.h b/include/ultra64/os_vi.h
new file mode 100644
index 0000000000..3b38b60fe4
--- /dev/null
+++ b/include/ultra64/os_vi.h
@@ -0,0 +1,11 @@
+#ifndef ULTRA64_OS_VI_H
+#define ULTRA64_OS_VI_H
+
+#include "vi.h"
+
+extern OSViMode osViModeNtscLan1;
+extern OSViMode osViModePalLan1;
+extern OSViMode osViModeMpalLan1;
+extern OSViMode osViModeFpalLan1;
+
+#endif
diff --git a/include/ultra64/osint.h b/include/ultra64/osint.h
new file mode 100644
index 0000000000..ec254d4163
--- /dev/null
+++ b/include/ultra64/osint.h
@@ -0,0 +1,22 @@
+#ifndef ULTRA64_OSINT_H
+#define ULTRA64_OSINT_H
+
+#include "time.h"
+#include "thread.h"
+#include "ultratypes.h"
+
+extern __OSThreadTail __osThreadTail;
+
+extern OSThread* __osRunningThread;
+extern OSThread* __osActiveQueue;
+extern OSThread* __osFaultedThread;
+extern OSThread* __osRunQueue;
+
+extern OSTimer* __osTimerList;
+extern u32 __osBaseCounter;
+extern OSTime __osCurrentTime;
+extern u32 __osViIntrCount;
+extern u32 __osTimerCounter;
+extern u32 __osShutdown;
+
+#endif
diff --git a/include/ultra64/pi.h b/include/ultra64/pi.h
index af18c407ea..42a90d7609 100644
--- a/include/ultra64/pi.h
+++ b/include/ultra64/pi.h
@@ -1,6 +1,7 @@
#ifndef ULTRA64_PI_H
#define ULTRA64_PI_H
+#include "stddef.h"
#include "message.h"
typedef struct __OSBlockInfo {
diff --git a/include/ultra64/piint.h b/include/ultra64/piint.h
new file mode 100644
index 0000000000..59b200a6cf
--- /dev/null
+++ b/include/ultra64/piint.h
@@ -0,0 +1,11 @@
+#ifndef ULTRA64_PIINT_H
+#define ULTRA64_PIINT_H
+
+#include "ultratypes.h"
+#include "pi.h"
+
+extern OSPiHandle* __osCurrentHandle[];
+extern OSMesgQueue __osPiAccessQueue;
+extern u32 __osPiAccessQueueEnabled;
+
+#endif
diff --git a/include/ultra64/rcp.h b/include/ultra64/rcp.h
index 9c97e8bd9f..8fb8a523e9 100644
--- a/include/ultra64/rcp.h
+++ b/include/ultra64/rcp.h
@@ -114,13 +114,13 @@
/**
* External device info
*/
-#define DEVICE_TYPE_CART 0 // ROM cartridge
-#define DEVICE_TYPE_BULK 1 // ROM bulk
-#define DEVICE_TYPE_64DD 2 // 64 Disk Drive
-#define DEVICE_TYPE_SRAM 3 // SRAM
-// 4-6 are reserved
-#define DEVICE_TYPE_INIT 7 // initial value
-// 8-14 are reserved
+#define DEVICE_TYPE_CART 0 /* ROM cartridge */
+#define DEVICE_TYPE_BULK 1 /* ROM bulk */
+#define DEVICE_TYPE_64DD 2 /* 64 Disk Drive */
+#define DEVICE_TYPE_SRAM 3 /* SRAM */
+/* 4-6 are reserved */
+#define DEVICE_TYPE_INIT 7 /* initial value */
+/* 8-14 are reserved */
/**
@@ -138,31 +138,31 @@
#define SP_BASE_REG 0x04040000
-// SP memory address (R/W): [12] 0=DMEM,1=IMEM, [11:0] DMEM/IMEM address
+/* SP memory address (R/W): [12] 0=DMEM,1=IMEM, [11:0] DMEM/IMEM address */
#define SP_MEM_ADDR_REG (SP_BASE_REG + 0x00)
-// SP DRAM DMA address (R/W): [23:0] RDRAM address
+/* SP DRAM DMA address (R/W): [23:0] RDRAM address */
#define SP_DRAM_ADDR_REG (SP_BASE_REG + 0x04)
-// SP read DMA length (R/W): [31:20] skip, [19:12] count, [11:0] length; RDRAM -> I/DMEM
+/* SP read DMA length (R/W): [31:20] skip, [19:12] count, [11:0] length; RDRAM -> I/DMEM */
#define SP_RD_LEN_REG (SP_BASE_REG + 0x08)
-// SP write DMA length (R/W): [31:20] skip, [19:12] count, [11:0] length; I/DMEM -> RDRAM
+/* SP write DMA length (R/W): [31:20] skip, [19:12] count, [11:0] length; I/DMEM -> RDRAM */
#define SP_WR_LEN_REG (SP_BASE_REG + 0x0C)
-// SP status (R/W): [14:0] valid bits; see below for write/read mode
+/* SP status (R/W): [14:0] valid bits; see below for write/read mode */
#define SP_STATUS_REG (SP_BASE_REG + 0x10)
-// SP DMA full (R): [0] dma full
+/* SP DMA full (R): [0] dma full */
#define SP_DMA_FULL_REG (SP_BASE_REG + 0x14)
-// SP DMA busy (R): [0] dma busy
+/* SP DMA busy (R): [0] dma busy */
#define SP_DMA_BUSY_REG (SP_BASE_REG + 0x18)
-// SP semaphore (R/W): Read: [0] acquire semaphore; Write: [] release semaphore
+/* SP semaphore (R/W): Read: [0] acquire semaphore; Write: [] release semaphore */
#define SP_SEMAPHORE_REG (SP_BASE_REG + 0x1C)
-// SP PC (R/W): [11:0] program counter
+/* SP PC (R/W): [11:0] program counter */
#define SP_PC_REG 0x04080000
/*
@@ -174,31 +174,31 @@
/*
* SP_STATUS_REG: write bits
*/
-#define SP_CLR_HALT (1 << 0) // clear halt
-#define SP_SET_HALT (1 << 1) // set halt
-#define SP_CLR_BROKE (1 << 2) // clear broke
-#define SP_CLR_INTR (1 << 3) // clear interrupt
-#define SP_SET_INTR (1 << 4) // set interrupt
-#define SP_CLR_SSTEP (1 << 5) // clear sstep
-#define SP_SET_SSTEP (1 << 6) // set sstep
-#define SP_CLR_INTR_BREAK (1 << 7) // clear interrupt on break
-#define SP_SET_INTR_BREAK (1 << 8) // set interrupt on break
-#define SP_CLR_SIG0 (1 << 9) // clear signal 0
-#define SP_SET_SIG0 (1 << 10) // set signal 0
-#define SP_CLR_SIG1 (1 << 11) // clear signal 1
-#define SP_SET_SIG1 (1 << 12) // set signal 1
-#define SP_CLR_SIG2 (1 << 13) // clear signal 2
-#define SP_SET_SIG2 (1 << 14) // set signal 2
-#define SP_CLR_SIG3 (1 << 15) // clear signal 3
-#define SP_SET_SIG3 (1 << 16) // set signal 3
-#define SP_CLR_SIG4 (1 << 17) // clear signal 4
-#define SP_SET_SIG4 (1 << 18) // set signal 4
-#define SP_CLR_SIG5 (1 << 19) // clear signal 5
-#define SP_SET_SIG5 (1 << 20) // set signal 5
-#define SP_CLR_SIG6 (1 << 21) // clear signal 6
-#define SP_SET_SIG6 (1 << 22) // set signal 6
-#define SP_CLR_SIG7 (1 << 23) // clear signal 7
-#define SP_SET_SIG7 (1 << 24) // set signal 7
+#define SP_CLR_HALT (1 << 0) /* clear halt */
+#define SP_SET_HALT (1 << 1) /* set halt */
+#define SP_CLR_BROKE (1 << 2) /* clear broke */
+#define SP_CLR_INTR (1 << 3) /* clear interrupt */
+#define SP_SET_INTR (1 << 4) /* set interrupt */
+#define SP_CLR_SSTEP (1 << 5) /* clear sstep */
+#define SP_SET_SSTEP (1 << 6) /* set sstep */
+#define SP_CLR_INTR_BREAK (1 << 7) /* clear interrupt on break */
+#define SP_SET_INTR_BREAK (1 << 8) /* set interrupt on break */
+#define SP_CLR_SIG0 (1 << 9) /* clear signal 0 */
+#define SP_SET_SIG0 (1 << 10) /* set signal 0 */
+#define SP_CLR_SIG1 (1 << 11) /* clear signal 1 */
+#define SP_SET_SIG1 (1 << 12) /* set signal 1 */
+#define SP_CLR_SIG2 (1 << 13) /* clear signal 2 */
+#define SP_SET_SIG2 (1 << 14) /* set signal 2 */
+#define SP_CLR_SIG3 (1 << 15) /* clear signal 3 */
+#define SP_SET_SIG3 (1 << 16) /* set signal 3 */
+#define SP_CLR_SIG4 (1 << 17) /* clear signal 4 */
+#define SP_SET_SIG4 (1 << 18) /* set signal 4 */
+#define SP_CLR_SIG5 (1 << 19) /* clear signal 5 */
+#define SP_SET_SIG5 (1 << 20) /* set signal 5 */
+#define SP_CLR_SIG6 (1 << 21) /* clear signal 6 */
+#define SP_SET_SIG6 (1 << 22) /* set signal 6 */
+#define SP_CLR_SIG7 (1 << 23) /* clear signal 7 */
+#define SP_SET_SIG7 (1 << 24) /* set signal 7 */
/*
* SP_STATUS_REG: read bits
@@ -238,22 +238,22 @@
#define SP_SET_CPUSIGNAL SP_SET_SIG4
#define SP_STATUS_CPUSIGNAL SP_STATUS_SIG4
-// SP IMEM BIST REG (R/W): [6:0] BIST status bits; see below for detail
+/* SP IMEM BIST REG (R/W): [6:0] BIST status bits; see below for detail */
#define SP_IBIST_REG 0x04080004
/*
* SP_IBIST_REG: write bits
*/
-#define SP_IBIST_CHECK (1 << 0) // BIST check
-#define SP_IBIST_GO (1 << 1) // BIST go
-#define SP_IBIST_CLEAR (1 << 2) // BIST clear
+#define SP_IBIST_CHECK (1 << 0) /* BIST check */
+#define SP_IBIST_GO (1 << 1) /* BIST go */
+#define SP_IBIST_CLEAR (1 << 2) /* BIST clear */
/*
* SP_BIST_REG: read bits
* First 2 bits are same as in write mode
*/
#define SP_IBIST_DONE (1 << 2)
-#define SP_IBIST_FAILED 0x78 // bits [6:3], BIST fail
+#define SP_IBIST_FAILED 0x78 /* bits [6:3], BIST fail */
/**
@@ -261,28 +261,28 @@
*/
#define DPC_BASE_REG 0x04100000
-// DP CMD DMA start (R/W): [23:0] DMEM/RDRAM start address
+/* DP CMD DMA start (R/W): [23:0] DMEM/RDRAM start address */
#define DPC_START_REG (DPC_BASE_REG + 0x00)
-// DP CMD DMA end (R/W): [23:0] DMEM/RDRAM end address
+/* DP CMD DMA end (R/W): [23:0] DMEM/RDRAM end address */
#define DPC_END_REG (DPC_BASE_REG + 0x04)
-// DP CMD DMA end (R): [23:0] DMEM/RDRAM current address
+/* DP CMD DMA end (R): [23:0] DMEM/RDRAM current address */
#define DPC_CURRENT_REG (DPC_BASE_REG + 0x08)
-// DP CMD status (R/W): [9:0] valid bits - see below for definitions
+/* DP CMD status (R/W): [9:0] valid bits - see below for definitions */
#define DPC_STATUS_REG (DPC_BASE_REG + 0x0C)
-// DP clock counter (R): [23:0] clock counter
+/* DP clock counter (R): [23:0] clock counter */
#define DPC_CLOCK_REG (DPC_BASE_REG + 0x10)
-// DP buffer busy counter (R): [23:0] clock counter
+/* DP buffer busy counter (R): [23:0] clock counter */
#define DPC_BUFBUSY_REG (DPC_BASE_REG + 0x14)
-// DP pipe busy counter (R): [23:0] clock counter
+/* DP pipe busy counter (R): [23:0] clock counter */
#define DPC_PIPEBUSY_REG (DPC_BASE_REG + 0x18)
-// DP TMEM load counter (R): [23:0] clock counter
+/* DP TMEM load counter (R): [23:0] clock counter */
#define DPC_TMEM_REG (DPC_BASE_REG + 0x1C)
/*
@@ -320,16 +320,16 @@
*/
#define DPS_BASE_REG 0x04200000
-// DP tmem built-in self-test (R/W): [10:0] BIST status bits
+/* DP tmem built-in self-test (R/W): [10:0] BIST status bits */
#define DPS_TBIST_REG (DPS_BASE_REG + 0x00)
-// DP span test mode (R/W): [0] Span buffer test access enable
+/* DP span test mode (R/W): [0] Span buffer test access enable */
#define DPS_TEST_MODE_REG (DPS_BASE_REG + 0x04)
-// DP span buffer test address (R/W): [6:0] bits
+/* DP span buffer test address (R/W): [6:0] bits */
#define DPS_BUFTEST_ADDR_REG (DPS_BASE_REG + 0x08)
-// DP span buffer test data (R/W): [31:0] span buffer data
+/* DP span buffer test data (R/W): [31:0] span buffer data */
#define DPS_BUFTEST_DATA_REG (DPS_BASE_REG + 0x0C)
/*
@@ -344,7 +344,7 @@
* First 2 bits are same as in write mode
*/
#define DPS_TBIST_DONE (1 << 2)
-#define DPS_TBIST_FAILED 0x7F8 // bits [10:3], BIST fail
+#define DPS_TBIST_FAILED 0x7F8 /* bits [10:3], BIST fail */
/**
@@ -352,22 +352,22 @@
*/
#define MI_BASE_REG 0x04300000
-// MI init mode (W): [11] clear DP interrupt, [9/10] clear/set ebus test mode
-// [8] set init mode, [7] clear init mode, [6:0] init length
-// (R): [8] ebus test mode, [7] init mode, [6:0] init length
+/* MI init mode (W): [11] clear DP interrupt, [9/10] clear/set ebus test mode */
+/* [8] set init mode, [7] clear init mode, [6:0] init length */
+/* (R): [8] ebus test mode, [7] init mode, [6:0] init length */
#define MI_INIT_MODE_REG (MI_BASE_REG + 0x00)
#define MI_MODE_REG MI_INIT_MODE_REG
/*
* MI_MODE_REG: write bits
*/
-#define MI_CLR_INIT (1 << 7) // clear init mode
-#define MI_SET_INIT (1 << 8) // set init mode
-#define MI_CLR_EBUS (1 << 9) // clear ebus test
-#define MI_SET_EBUS (1 << 10) // set ebus test mode
-#define MI_CLR_DP_INTR (1 << 11) // clear dp interrupt
-#define MI_CLR_RDRAM (1 << 12) // clear RDRAM reg
-#define MI_SET_RDRAM (1 << 13) // set RDRAM reg mode
+#define MI_CLR_INIT (1 << 7) /* clear init mode */
+#define MI_SET_INIT (1 << 8) /* set init mode */
+#define MI_CLR_EBUS (1 << 9) /* clear ebus test */
+#define MI_SET_EBUS (1 << 10) /* set ebus test mode */
+#define MI_CLR_DP_INTR (1 << 11) /* clear dp interrupt */
+#define MI_CLR_RDRAM (1 << 12) /* clear RDRAM reg */
+#define MI_SET_RDRAM (1 << 13) /* set RDRAM reg mode */
/*
* MI_MODE_REG: read bits
@@ -376,52 +376,52 @@
#define MI_MODE_EBUS (1 << 8) /* ebus test mode */
#define MI_MODE_RDRAM (1 << 9) /* RDRAM reg mode */
-// MI version (R): [31:24] rsp, [23:16] rdp, [15:8] rac, [7:0] io
+/* MI version (R): [31:24] rsp, [23:16] rdp, [15:8] rac, [7:0] io */
#define MI_VERSION_REG (MI_BASE_REG + 0x04)
#define MI_NOOP_REG MI_VERSION_REG
-// MI interrupt (R): [5:0] valid bits - see below for bit patterns
+/* MI interrupt (R): [5:0] valid bits - see below for bit patterns */
#define MI_INTR_REG (MI_BASE_REG + 0x08)
-// MI interrupt mask (R): [5:0] valid bits - see below for bit patterns
-// (W): [11:0] valid bits - see below for bit patterns
+/* MI interrupt mask (R): [5:0] valid bits - see below for bit patterns */
+/* (W): [11:0] valid bits - see below for bit patterns */
#define MI_INTR_MASK_REG (MI_BASE_REG + 0x0C)
/*
* MI_INTR_REG: read bits
*/
-#define MI_INTR_SP (1 << 0) // SP intr
-#define MI_INTR_SI (1 << 1) // SI intr
-#define MI_INTR_AI (1 << 2) // AI intr
-#define MI_INTR_VI (1 << 3) // VI intr
-#define MI_INTR_PI (1 << 4) // PI intr
-#define MI_INTR_DP (1 << 5) // DP intr
+#define MI_INTR_SP (1 << 0) /* SP intr */
+#define MI_INTR_SI (1 << 1) /* SI intr */
+#define MI_INTR_AI (1 << 2) /* AI intr */
+#define MI_INTR_VI (1 << 3) /* VI intr */
+#define MI_INTR_PI (1 << 4) /* PI intr */
+#define MI_INTR_DP (1 << 5) /* DP intr */
/*
* MI_INTR_MASK_REG: write bits
*/
-#define MI_INTR_MASK_CLR_SP (1 << 0) // clear SP mask
-#define MI_INTR_MASK_SET_SP (1 << 1) // set SP mask
-#define MI_INTR_MASK_CLR_SI (1 << 2) // clear SI mask
-#define MI_INTR_MASK_SET_SI (1 << 3) // set SI mask
-#define MI_INTR_MASK_CLR_AI (1 << 4) // clear AI mask
-#define MI_INTR_MASK_SET_AI (1 << 5) // set AI mask
-#define MI_INTR_MASK_CLR_VI (1 << 6) // clear VI mask
-#define MI_INTR_MASK_SET_VI (1 << 7) // set VI mask
-#define MI_INTR_MASK_CLR_PI (1 << 8) // clear PI mask
-#define MI_INTR_MASK_SET_PI (1 << 9) // set PI mask
-#define MI_INTR_MASK_CLR_DP (1 << 10) // clear DP mask
-#define MI_INTR_MASK_SET_DP (1 << 11) // set DP mask
+#define MI_INTR_MASK_CLR_SP (1 << 0) /* clear SP mask */
+#define MI_INTR_MASK_SET_SP (1 << 1) /* set SP mask */
+#define MI_INTR_MASK_CLR_SI (1 << 2) /* clear SI mask */
+#define MI_INTR_MASK_SET_SI (1 << 3) /* set SI mask */
+#define MI_INTR_MASK_CLR_AI (1 << 4) /* clear AI mask */
+#define MI_INTR_MASK_SET_AI (1 << 5) /* set AI mask */
+#define MI_INTR_MASK_CLR_VI (1 << 6) /* clear VI mask */
+#define MI_INTR_MASK_SET_VI (1 << 7) /* set VI mask */
+#define MI_INTR_MASK_CLR_PI (1 << 8) /* clear PI mask */
+#define MI_INTR_MASK_SET_PI (1 << 9) /* set PI mask */
+#define MI_INTR_MASK_CLR_DP (1 << 10) /* clear DP mask */
+#define MI_INTR_MASK_SET_DP (1 << 11) /* set DP mask */
/*
* MI_INTR_MASK_REG: read bits
*/
-#define MI_INTR_MASK_SP (1 << 0) // SP intr mask
-#define MI_INTR_MASK_SI (1 << 1) // SI intr mask
-#define MI_INTR_MASK_AI (1 << 2) // AI intr mask
-#define MI_INTR_MASK_VI (1 << 3) // VI intr mask
-#define MI_INTR_MASK_PI (1 << 4) // PI intr mask
-#define MI_INTR_MASK_DP (1 << 5) // DP intr mask
+#define MI_INTR_MASK_SP (1 << 0) /* SP intr mask */
+#define MI_INTR_MASK_SI (1 << 1) /* SI intr mask */
+#define MI_INTR_MASK_AI (1 << 2) /* AI intr mask */
+#define MI_INTR_MASK_VI (1 << 3) /* VI intr mask */
+#define MI_INTR_MASK_PI (1 << 4) /* PI intr mask */
+#define MI_INTR_MASK_DP (1 << 5) /* DP intr mask */
/**
@@ -454,90 +454,90 @@
#define VI_CONTROL_REG (VI_BASE_REG + 0x00)
#define VI_STATUS_REG VI_CONTROL_REG
-// VI origin (R/W): [23:0] frame buffer origin in bytes
+/* VI origin (R/W): [23:0] frame buffer origin in bytes */
#define VI_ORIGIN_REG (VI_BASE_REG + 0x04)
#define VI_DRAM_ADDR_REG VI_ORIGIN_REG
-// VI width (R/W): [11:0] frame buffer line width in pixels
+/* VI width (R/W): [11:0] frame buffer line width in pixels */
#define VI_WIDTH_REG (VI_BASE_REG + 0x08)
#define VI_H_WIDTH_REG VI_WIDTH_REG
-// VI vertical intr (R/W): [9:0] interrupt when current half-line = V_INTR
+/* VI vertical intr (R/W): [9:0] interrupt when current half-line = V_INTR */
#define VI_INTR_REG (VI_BASE_REG + 0x0C)
#define VI_V_INTR_REG VI_INTR_REG
-// VI current vertical line (R/W): [9:0] current half line, sampled once per
-// line (the lsb of V_CURRENT is constant within a field, and in interlaced
-// modes gives the field number - which is constant for non-interlaced modes)
-// - Any write to this register will clear interrupt line
+/* VI current vertical line (R/W): [9:0] current half line, sampled once per */
+/* line (the lsb of V_CURRENT is constant within a field, and in interlaced */
+/* modes gives the field number - which is constant for non-interlaced modes) */
+/* - Any write to this register will clear interrupt line */
#define VI_CURRENT_REG (VI_BASE_REG + 0x10)
#define VI_V_CURRENT_LINE_REG VI_CURRENT_REG
-// VI video timing (R/W): [29:20] start of color burst in pixels from h-sync
-// [19:16] vertical sync width in half lines,
-// [15: 8] color burst width in pixels,
-// [ 7: 0] horizontal sync width in pixels,
+/* VI video timing (R/W): [29:20] start of color burst in pixels from h-sync */
+/* [19:16] vertical sync width in half lines, */
+/* [15: 8] color burst width in pixels, */
+/* [ 7: 0] horizontal sync width in pixels, */
#define VI_BURST_REG (VI_BASE_REG + 0x14)
#define VI_TIMING_REG VI_BURST_REG
-// VI vertical sync (R/W): [9:0] number of half-lines per field
+/* VI vertical sync (R/W): [9:0] number of half-lines per field */
#define VI_V_SYNC_REG (VI_BASE_REG + 0x18)
-// VI horizontal sync (R/W): [20:16] a 5-bit leap pattern used for PAL only (h_sync_period)
-// [11: 0] total duration of a line in 1/4 pixel
+/* VI horizontal sync (R/W): [20:16] a 5-bit leap pattern used for PAL only (h_sync_period) */
+/* [11: 0] total duration of a line in 1/4 pixel */
#define VI_H_SYNC_REG (VI_BASE_REG + 0x1C)
-// VI horizontal sync leap (R/W): [27:16] identical to h_sync_period
-// [11: 0] identical to h_sync_period
+/* VI horizontal sync leap (R/W): [27:16] identical to h_sync_period */
+/* [11: 0] identical to h_sync_period */
#define VI_LEAP_REG (VI_BASE_REG + 0x20)
#define VI_H_SYNC_LEAP_REG VI_LEAP_REG
-// VI horizontal video (R/W): [25:16] start of active video in screen pixels
-// [ 9: 0] end of active video in screen pixels
+/* VI horizontal video (R/W): [25:16] start of active video in screen pixels */
+/* [ 9: 0] end of active video in screen pixels */
#define VI_H_START_REG (VI_BASE_REG + 0x24)
#define VI_H_VIDEO_REG VI_H_START_REG
-// VI vertical video (R/W): [25:16] start of active video in screen half-lines
-// [ 9: 0] end of active video in screen half-lines
+/* VI vertical video (R/W): [25:16] start of active video in screen half-lines */
+/* [ 9: 0] end of active video in screen half-lines */
#define VI_V_START_REG (VI_BASE_REG + 0x28)
#define VI_V_VIDEO_REG VI_V_START_REG
-// VI vertical burst (R/W): [25:16] start of color burst enable in half-lines
-// [ 9: 0] end of color burst enable in half-lines
+/* VI vertical burst (R/W): [25:16] start of color burst enable in half-lines */
+/* [ 9: 0] end of color burst enable in half-lines */
#define VI_V_BURST_REG (VI_BASE_REG + 0x2C)
-// VI x-scale (R/W): [27:16] horizontal subpixel offset (2.10 format)
-// [11: 0] 1/horizontal scale up factor (2.10 format)
+/* VI x-scale (R/W): [27:16] horizontal subpixel offset (2.10 format) */
+/* [11: 0] 1/horizontal scale up factor (2.10 format) */
#define VI_X_SCALE_REG (VI_BASE_REG + 0x30)
-// VI y-scale (R/W): [27:16] vertical subpixel offset (2.10 format)
-// [11: 0] 1/vertical scale up factor (2.10 format)
+/* VI y-scale (R/W): [27:16] vertical subpixel offset (2.10 format) */
+/* [11: 0] 1/vertical scale up factor (2.10 format) */
#define VI_Y_SCALE_REG (VI_BASE_REG + 0x34)
/*
* VI_CONTROL_REG: read bits
*/
-#define VI_CTRL_TYPE_16 0x00002 // [1:0] pixel size: 16 bit
-#define VI_CTRL_TYPE_32 0x00003 // [1:0] pixel size: 32 bit
-#define VI_CTRL_GAMMA_DITHER_ON 0x00004 // 2: default = on
-#define VI_CTRL_GAMMA_ON 0x00008 // 3: default = on
-#define VI_CTRL_DIVOT_ON 0x00010 // 4: default = on
-#define VI_CTRL_SERRATE_ON 0x00040 // 6: on if interlaced
-#define VI_CTRL_ANTIALIAS_MASK 0x00300 // [9:8] anti-alias mode
-#define VI_CTRL_ANTIALIAS_MODE_0 0x00000 // Bit [9:8] anti-alias mode: AA enabled, resampling enabled, always fetch extra lines
-#define VI_CTRL_ANTIALIAS_MODE_1 0x00100 // Bit [9:8] anti-alias mode: AA enabled, resampling enabled, fetch extra lines as-needed
-#define VI_CTRL_ANTIALIAS_MODE_2 0x00200 // Bit [9:8] anti-alias mode: AA disabled, resampling enabled, operate as if everything is covered
-#define VI_CTRL_ANTIALIAS_MODE_3 0x00300 // Bit [9:8] anti-alias mode: AA disabled, resampling disabled, replicate pixels
-#define VI_CTRL_PIXEL_ADV_MASK 0x0F000 // [15:12] pixel advance mode
-#define VI_CTRL_PIXEL_ADV_3 0x03000 // Bit [15:12] pixel advance mode: Always 3 on N64
-#define VI_CTRL_DITHER_FILTER_ON 0x10000 // 16: dither-filter mode
+#define VI_CTRL_TYPE_16 0x00002 /* [1:0] pixel size: 16 bit */
+#define VI_CTRL_TYPE_32 0x00003 /* [1:0] pixel size: 32 bit */
+#define VI_CTRL_GAMMA_DITHER_ON 0x00004 /* 2: default = on */
+#define VI_CTRL_GAMMA_ON 0x00008 /* 3: default = on */
+#define VI_CTRL_DIVOT_ON 0x00010 /* 4: default = on */
+#define VI_CTRL_SERRATE_ON 0x00040 /* 6: on if interlaced */
+#define VI_CTRL_ANTIALIAS_MASK 0x00300 /* [9:8] anti-alias mode */
+#define VI_CTRL_ANTIALIAS_MODE_0 0x00000 /* Bit [9:8] anti-alias mode: AA enabled, resampling enabled, always fetch extra lines */
+#define VI_CTRL_ANTIALIAS_MODE_1 0x00100 /* Bit [9:8] anti-alias mode: AA enabled, resampling enabled, fetch extra lines as-needed */
+#define VI_CTRL_ANTIALIAS_MODE_2 0x00200 /* Bit [9:8] anti-alias mode: AA disabled, resampling enabled, operate as if everything is covered */
+#define VI_CTRL_ANTIALIAS_MODE_3 0x00300 /* Bit [9:8] anti-alias mode: AA disabled, resampling disabled, replicate pixels */
+#define VI_CTRL_PIXEL_ADV_MASK 0x0F000 /* [15:12] pixel advance mode */
+#define VI_CTRL_PIXEL_ADV(n) (((n) << 12) & VI_CTRL_PIXEL_ADV_MASK) /* Bit [15:12] pixel advance mode: Always 3 on N64 */
+#define VI_CTRL_DITHER_FILTER_ON 0x10000 /* 16: dither-filter mode */
/*
* Possible video clocks (NTSC or PAL)
*/
-#define VI_NTSC_CLOCK 48681812 // Hz = 48.681812 MHz
-#define VI_PAL_CLOCK 49656530 // Hz = 49.656530 MHz
-#define VI_MPAL_CLOCK 48628316 // Hz = 48.628316 MHz
+#define VI_NTSC_CLOCK 48681812 /* Hz = 48.681812 MHz */
+#define VI_PAL_CLOCK 49656530 /* Hz = 49.656530 MHz */
+#define VI_MPAL_CLOCK 48628316 /* Hz = 48.628316 MHz */
/**
@@ -549,25 +549,25 @@
*/
#define AI_BASE_REG 0x04500000
-// AI DRAM address (W): [23:0] starting RDRAM address (8B-aligned)
+/* AI DRAM address (W): [23:0] starting RDRAM address (8B-aligned) */
#define AI_DRAM_ADDR_REG (AI_BASE_REG + 0x00)
-// AI length (R/W): [14:0] transfer length (v1.0) - Bottom 3 bits are ignored
-// [17:0] transfer length (v2.0) - Bottom 3 bits are ignored
+/* AI length (R/W): [14:0] transfer length (v1.0) - Bottom 3 bits are ignored */
+/* [17:0] transfer length (v2.0) - Bottom 3 bits are ignored */
#define AI_LEN_REG (AI_BASE_REG + 0x04)
-// AI control (W): [0] DMA enable - if LSB == 1, DMA is enabled
+/* AI control (W): [0] DMA enable - if LSB == 1, DMA is enabled */
#define AI_CONTROL_REG (AI_BASE_REG + 0x08)
/*
* AI_CONTROL_REG: write bits
*/
-#define AI_CONTROL_DMA_ON 1 // LSB = 1: DMA enable
-#define AI_CONTROL_DMA_OFF 0 // LSB = 1: DMA enable
+#define AI_CONTROL_DMA_ON 1 /* LSB = 1: DMA enable */
+#define AI_CONTROL_DMA_OFF 0 /* LSB = 1: DMA enable */
-// AI status (R): [31]/[0] ai_full (addr & len buffer full), [30] ai_busy
-// Note that a 1->0 transition in ai_full will set interrupt
-// (W): clear audio interrupt
+/* AI status (R): [31]/[0] ai_full (addr & len buffer full), [30] ai_busy */
+/* Note that a 1->0 transition in ai_full will set interrupt */
+/* (W): clear audio interrupt */
#define AI_STATUS_REG (AI_BASE_REG + 0x0C)
/*
@@ -576,23 +576,23 @@
#define AI_STATUS_FIFO_FULL (1 << 31)
#define AI_STATUS_DMA_BUSY (1 << 30)
-// AI DAC sample period register (W): [13:0] dac rate
-// - vid_clock/(dperiod + 1) is the DAC sample rate
-// - (dperiod + 1) >= 66 * (aclockhp + 1) must be true
+/* AI DAC sample period register (W): [13:0] dac rate */
+/* - vid_clock/(dperiod + 1) is the DAC sample rate */
+/* - (dperiod + 1) >= 66 * (aclockhp + 1) must be true */
#define AI_DACRATE_REG (AI_BASE_REG + 0x10)
-// DAC rate = video clock / audio frequency
-// - DAC rate >= (66 * Bit rate) must be true
-#define AI_MAX_DAC_RATE 16384 // 14-bit+1
+/* DAC rate = video clock / audio frequency */
+/* - DAC rate >= (66 * Bit rate) must be true */
+#define AI_MAX_DAC_RATE 16384 /* 14-bit+1 */
#define AI_MIN_DAC_RATE 132
-// AI bit rate (W): [3:0] bit rate (abus clock half period register - aclockhp)
-// - vid_clock/(2 * (aclockhp + 1)) is the DAC clock rate
-// - The abus clock stops if aclockhp is zero
+/* AI bit rate (W): [3:0] bit rate (abus clock half period register - aclockhp) */
+/* - vid_clock/(2 * (aclockhp + 1)) is the DAC clock rate */
+/* - The abus clock stops if aclockhp is zero */
#define AI_BITRATE_REG (AI_BASE_REG + 0x14)
-// Bit rate <= (DAC rate / 66)
-#define AI_MAX_BIT_RATE 16 // 4-bit+1
+/* Bit rate <= (DAC rate / 66) */
+#define AI_MAX_BIT_RATE 16 /* 4-bit+1 */
#define AI_MIN_BIT_RATE 2
/*
@@ -600,14 +600,14 @@
* max frequency = (video clock / min dac rate)
* min frequency = (video clock / max dac rate)
*/
-#define AI_NTSC_MAX_FREQ 368000 // 368 KHz
-#define AI_NTSC_MIN_FREQ 3000 // 3 KHz ~ 2971 Hz
+#define AI_NTSC_MAX_FREQ 368000 /* 368 KHz */
+#define AI_NTSC_MIN_FREQ 3000 /* 3 KHz ~ 2971 Hz */
-#define AI_PAL_MAX_FREQ 376000 // 376 KHz
-#define AI_PAL_MIN_FREQ 3050 // 3 KHz ~ 3031 Hz
+#define AI_PAL_MAX_FREQ 376000 /* 376 KHz */
+#define AI_PAL_MIN_FREQ 3050 /* 3 KHz ~ 3031 Hz */
-#define AI_MPAL_MAX_FREQ 368000 // 368 KHz
-#define AI_MPAL_MIN_FREQ 3000 // 3 KHz ~ 2968 Hz
+#define AI_MPAL_MAX_FREQ 368000 /* 368 KHz */
+#define AI_MPAL_MIN_FREQ 3000 /* 3 KHz ~ 2968 Hz */
/**
@@ -615,44 +615,44 @@
*/
#define PI_BASE_REG 0x04600000
-// PI DRAM address (R/W): [23:0] starting RDRAM address
+/* PI DRAM address (R/W): [23:0] starting RDRAM address */
#define PI_DRAM_ADDR_REG (PI_BASE_REG + 0x00)
-// PI pbus (cartridge) address (R/W): [31:0] starting AD16 address
+/* PI pbus (cartridge) address (R/W): [31:0] starting AD16 address */
#define PI_CART_ADDR_REG (PI_BASE_REG + 0x04)
-// PI read length (R/W): [23:0] read data length
+/* PI read length (R/W): [23:0] read data length */
#define PI_RD_LEN_REG (PI_BASE_REG + 0x08)
-// PI write length (R/W): [23:0] write data length
+/* PI write length (R/W): [23:0] write data length */
#define PI_WR_LEN_REG (PI_BASE_REG + 0x0C)
-// PI status (R): [3] interrupt flag, [2] error, [1] IO busy, [0] DMA busy
-// (W): [1] clear intr, [0] reset controller (and abort current op)
+/* PI status (R): [3] interrupt flag, [2] error, [1] IO busy, [0] DMA busy */
+/* (W): [1] clear intr, [0] reset controller (and abort current op) */
#define PI_STATUS_REG (PI_BASE_REG + 0x10)
-// PI dom1 latency (R/W): [7:0] domain 1 device latency
+/* PI dom1 latency (R/W): [7:0] domain 1 device latency */
#define PI_BSD_DOM1_LAT_REG (PI_BASE_REG + 0x14)
-// PI dom1 pulse width (R/W): [7:0] domain 1 device R/W strobe pulse width
+/* PI dom1 pulse width (R/W): [7:0] domain 1 device R/W strobe pulse width */
#define PI_BSD_DOM1_PWD_REG (PI_BASE_REG + 0x18)
-// PI dom1 page size (R/W): [3:0] domain 1 device page size
+/* PI dom1 page size (R/W): [3:0] domain 1 device page size */
#define PI_BSD_DOM1_PGS_REG (PI_BASE_REG + 0x1C)
-// PI dom1 release (R/W): [1:0] domain 1 device R/W release duration
+/* PI dom1 release (R/W): [1:0] domain 1 device R/W release duration */
#define PI_BSD_DOM1_RLS_REG (PI_BASE_REG + 0x20)
-// PI dom2 latency (R/W): [7:0] domain 2 device latency
+/* PI dom2 latency (R/W): [7:0] domain 2 device latency */
#define PI_BSD_DOM2_LAT_REG (PI_BASE_REG + 0x24)
-// PI dom2 pulse width (R/W): [7:0] domain 2 device R/W strobe pulse width
+/* PI dom2 pulse width (R/W): [7:0] domain 2 device R/W strobe pulse width */
#define PI_BSD_DOM2_PWD_REG (PI_BASE_REG + 0x28)
-// PI dom2 page size (R/W): [3:0] domain 2 device page size
+/* PI dom2 page size (R/W): [3:0] domain 2 device page size */
#define PI_BSD_DOM2_PGS_REG (PI_BASE_REG + 0x2C)
-// PI dom2 release (R/W): [1:0] domain 2 device R/W release duration
+/* PI dom2 release (R/W): [1:0] domain 2 device R/W release duration */
#define PI_BSD_DOM2_RLS_REG (PI_BASE_REG + 0x30)
#define PI_DOMAIN1_REG PI_BSD_DOM1_LAT_REG
@@ -719,30 +719,30 @@
*/
#define RI_BASE_REG 0x04700000
-// RI mode (R/W): [3] stop R active, [2] stop T active, [1:0] operating mode
+/* RI mode (R/W): [3] stop R active, [2] stop T active, [1:0] operating mode */
#define RI_MODE_REG (RI_BASE_REG + 0x00)
-// RI config (R/W): [6] current control enable, [5:0] current control input
+/* RI config (R/W): [6] current control enable, [5:0] current control input */
#define RI_CONFIG_REG (RI_BASE_REG + 0x04)
-// RI current load (W): [] any write updates current control register
+/* RI current load (W): [] any write updates current control register */
#define RI_CURRENT_LOAD_REG (RI_BASE_REG + 0x08)
-// RI select (R/W): [3:2] receive select, [1:0] transmit select
+/* RI select (R/W): [3:2] receive select, [1:0] transmit select */
#define RI_SELECT_REG (RI_BASE_REG + 0x0C)
-// RI refresh (R/W): [16] refresh bank, [17] refresh enable, [18] refresh optimize
-// [7:0] clean refresh delay, [15:8] dirty refresh dela
+/* RI refresh (R/W): [16] refresh bank, [17] refresh enable, [18] refresh optimize */
+/* [7:0] clean refresh delay, [15:8] dirty refresh dela */
#define RI_REFRESH_REG (RI_BASE_REG + 0x10)
#define RI_COUNT_REG RI_REFRESH_REG
-// RI latency (R/W): [3:0] DMA latency/overlap
+/* RI latency (R/W): [3:0] DMA latency/overlap */
#define RI_LATENCY_REG (RI_BASE_REG + 0x14)
-// RI error (R): [1] ack error, [0] nack error
+/* RI error (R): [1] ack error, [0] nack error */
#define RI_RERROR_REG (RI_BASE_REG + 0x18)
-// RI error (W): [] any write clears all error bits
+/* RI error (W): [] any write clears all error bits */
#define RI_WERROR_REG (RI_BASE_REG + 0x1C)
@@ -751,27 +751,27 @@
*/
#define SI_BASE_REG 0x04800000
-// SI DRAM address (R/W): [23:0] starting RDRAM address
+/* SI DRAM address (R/W): [23:0] starting RDRAM address */
#define SI_DRAM_ADDR_REG (SI_BASE_REG + 0x00)
-// SI address read 64B (W): [] write begins a 64B DMA write PIF RAM -> RDRAM
+/* SI address read 64B (W): [] write begins a 64B DMA write PIF RAM -> RDRAM */
#define SI_PIF_ADDR_RD64B_REG (SI_BASE_REG + 0x04)
-// Address SI_BASE_REG + (0x08, 0x0C, 0x14) are reserved
+/* Address SI_BASE_REG + (0x08, 0x0C, 0x14) are reserved */
-// SI address write 64B (W): [] write begins a 64B DMA read RDRAM -> PIF RAM */
+/* SI address write 64B (W): [] write begins a 64B DMA read RDRAM -> PIF RAM */
#define SI_PIF_ADDR_WR64B_REG (SI_BASE_REG + 0x10)
-// SI status (R/W): [] any write clears interrupt
+/* SI status (R/W): [] any write clears interrupt */
#define SI_STATUS_REG (SI_BASE_REG + 0x18)
/*
* SI_STATUS_REG: read bits
*/
-#define SI_STATUS_DMA_BUSY (1 << 0) // DMA in progress
-#define SI_STATUS_RD_BUSY (1 << 1) // IO access in progress
-#define SI_STATUS_DMA_ERROR (1 << 3) // Overlapping DMA requests
-#define SI_STATUS_INTERRUPT (1 << 12) // Interrupt is set
+#define SI_STATUS_DMA_BUSY (1 << 0) /* DMA in progress */
+#define SI_STATUS_RD_BUSY (1 << 1) /* IO access in progress */
+#define SI_STATUS_DMA_ERROR (1 << 3) /* Overlapping DMA requests */
+#define SI_STATUS_INTERRUPT (1 << 12) /* Interrupt is set */
/**
@@ -780,13 +780,13 @@
#define GIO_BASE_REG 0x18000000
-// Game to Host Interrupt
+/* Game to Host Interrupt */
#define GIO_GIO_INTR_REG (GIO_BASE_REG+0x000)
-// Game to Host SYNC
+/* Game to Host SYNC */
#define GIO_GIO_SYNC_REG (GIO_BASE_REG+0x400)
-// Host to Game Interrupt
+/* Host to Game Interrupt */
#define GIO_CART_INTR_REG (GIO_BASE_REG+0x800)
diff --git a/include/ultra64/regdef.h b/include/ultra64/regdef.h
new file mode 100644
index 0000000000..a3b2832180
--- /dev/null
+++ b/include/ultra64/regdef.h
@@ -0,0 +1,164 @@
+#ifndef REGDEF_H
+#define REGDEF_H
+
+#ifdef __GNUC__
+#define _MIPS_SIM_ABI32 _ABIO32
+#define _MIPS_SIM_NABI32 _ABIN32
+#define _MIPS_SIM_ABI64 _ABI64
+#endif
+
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
+#define zero $0
+#define AT $at
+#define v0 $2
+#define v1 $3
+#define a0 $4
+#define a1 $5
+#define a2 $6
+#define a3 $7
+#define t0 $8
+#define t1 $9
+#define t2 $10
+#define t3 $11
+#define t4 $12
+#define ta0 $12
+#define t5 $13
+#define ta1 $13
+#define t6 $14
+#define ta2 $14
+#define t7 $15
+#define ta3 $15
+#define s0 $16
+#define s1 $17
+#define s2 $18
+#define s3 $19
+#define s4 $20
+#define s5 $21
+#define s6 $22
+#define s7 $23
+#define t8 $24
+#define t9 $25
+#define jp $25
+#define k0 $26
+#define k1 $27
+#define gp $28
+#define sp $29
+#define fp $30
+#define s8 $30
+#define ra $31
+#endif
+
+#if (_MIPS_SIM == _MIPS_SIM_ABI64)
+#define zero $0
+#define AT $at
+#define v0 $2
+#define v1 $3
+#define a0 $4
+#define a1 $5
+#define a2 $6
+#define a3 $7
+#define a4 $8
+#define ta0 $8
+#define a5 $9
+#define ta1 $9
+#define a6 $10
+#define ta2 $10
+#define a7 $11
+#define ta3 $11
+#define t0 $12
+#define t1 $13
+#define t2 $14
+#define t3 $15
+#define s0 $16
+#define s1 $17
+#define s2 $18
+#define s3 $19
+#define s4 $20
+#define s5 $21
+#define s6 $22
+#define s7 $23
+#define t8 $24
+#define t9 $25
+#define jp $25
+#define k0 $26
+#define k1 $27
+#define gp $28
+#define sp $29
+#define fp $30
+#define s8 $30
+#define ra $31
+#endif
+
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
+#define fv0 $f0
+#define fv0f $f1
+#define fv1 $f2
+#define fv1f $f3
+#define fa0 $f12
+#define fa0f $f13
+#define fa1 $f14
+#define fa1f $f15
+#define ft0 $f4
+#define ft0f $f5
+#define ft1 $f6
+#define ft1f $f7
+#define ft2 $f8
+#define ft2f $f9
+#define ft3 $f10
+#define ft3f $f11
+#define ft4 $f16
+#define ft4f $f17
+#define ft5 $f18
+#define ft5f $f19
+#define fs0 $f20
+#define fs0f $f21
+#define fs1 $f22
+#define fs1f $f23
+#define fs2 $f24
+#define fs2f $f25
+#define fs3 $f26
+#define fs3f $f27
+#define fs4 $f28
+#define fs4f $f29
+#define fs5 $f30
+#define fs5f $f31
+#endif
+
+#if (_MIPS_SIM == _MIPS_SIM_ABI64)
+#define fv0 $f0
+#define fv1 $f2
+#define fa0 $f12
+#define fa1 $f13
+#define fa2 $f14
+#define fa3 $f15
+#define fa4 $f16
+#define fa5 $f17
+#define fa6 $f18
+#define fa7 $f19
+#define ft0 $f4
+#define ft1 $f5
+#define ft2 $f6
+#define ft3 $f7
+#define ft4 $f8
+#define ft5 $f9
+#define ft6 $f10
+#define ft7 $f11
+#define ft8 $f20
+#define ft9 $f21
+#define ft10 $f22
+#define ft11 $f23
+#define ft12 $f1
+#define ft13 $f3
+#define fs0 $f24
+#define fs1 $f25
+#define fs2 $f26
+#define fs3 $f27
+#define fs4 $f28
+#define fs5 $f29
+#define fs6 $f30
+#define fs7 $f31
+#endif
+
+#define fcr31 $31
+
+#endif
diff --git a/include/ultra64/siint.h b/include/ultra64/siint.h
new file mode 100644
index 0000000000..d43489b657
--- /dev/null
+++ b/include/ultra64/siint.h
@@ -0,0 +1,8 @@
+#ifndef ULTRA64_SIINT_H
+#define ULTRA64_SIINT_H
+
+#include "pfs.h"
+
+extern u8 __osPfsInodeCacheBank;
+
+#endif
diff --git a/include/ultra64/thread.h b/include/ultra64/thread.h
index 813fefaa97..3c2733f150 100644
--- a/include/ultra64/thread.h
+++ b/include/ultra64/thread.h
@@ -73,7 +73,7 @@ typedef struct __OSThreadTail {
#else
-// OSThread struct member offsets
+/* OSThread struct member offsets */
#define THREAD_NEXT 0x00
#define THREAD_PRI 0x04
diff --git a/include/ultra64/version.h b/include/ultra64/version.h
new file mode 100644
index 0000000000..00d772845e
--- /dev/null
+++ b/include/ultra64/version.h
@@ -0,0 +1,14 @@
+#ifndef ULTRA64_VERSION_H
+#define ULTRA64_VERSION_H
+
+#define LIBULTRA_VERSION_D 'D'
+#define LIBULTRA_VERSION_E 'E'
+#define LIBULTRA_VERSION_F 'F'
+#define LIBULTRA_VERSION_G 'G'
+#define LIBULTRA_VERSION_H 'H'
+#define LIBULTRA_VERSION_I 'I'
+#define LIBULTRA_VERSION_J 'J'
+#define LIBULTRA_VERSION_K 'K'
+#define LIBULTRA_VERSION_L 'L'
+
+#endif
diff --git a/include/ultra64/viint.h b/include/ultra64/viint.h
index 4fea2259a2..25a6ceb041 100644
--- a/include/ultra64/viint.h
+++ b/include/ultra64/viint.h
@@ -1,6 +1,9 @@
#ifndef ULTRA64_VIINT_H
#define ULTRA64_VIINT_H
+#include "vi.h"
+#include "ultratypes.h"
+
#define VI_STATE_MODE_SET (1 << 0)
#define VI_STATE_XSCALE_SET (1 << 1)
#define VI_STATE_YSCALE_FACTOR_SET (1 << 2)
@@ -17,21 +20,34 @@
// For use in initializing OSViMode structures
#define BURST(hsync_width, color_width, vsync_width, color_start) \
- (hsync_width | (color_width << 8) | (vsync_width << 16) | (color_start << 20))
-#define WIDTH(v) v
-#define VSYNC(v) v
-#define HSYNC(duration, leap) (duration | (leap << 16))
-#define LEAP(upper, lower) ((upper << 16) | lower)
-#define START(start, end) ((start << 16) | end)
-
-#define FTOFIX(val, i, f) ((u32)(val * (f32)(1 << f)) & ((1 << (i + f)) - 1))
+ ((((u8)(hsync_width) & 0xFF) << 0) | \
+ (((u8)(color_width) & 0xFF) << 8) | \
+ (((u8)(vsync_width) & 0xF) << 16) | \
+ (((u16)(color_start) & 0xFFF) << 20))
+#define WIDTH(v) (v)
+#define VSYNC(v) (v)
+#define HSYNC(duration, leap) (((u16)(leap) << 16) | (u16)(duration))
+#define LEAP(upper, lower) (((u16)(upper) << 16) | (u16)(lower))
+#define START(start, end) (((u16)(start) << 16) | (u16)(end))
+#define FTOFIX(val, i, f) ((u32)((val) * (f32)(1 << (f))) & ((1 << ((i) + (f))) - 1))
#define F210(val) FTOFIX(val, 2, 10)
-#define SCALE(scaleup, off) (F210((1.0f / (f32)scaleup)) | (F210((f32)off) << 16))
+#define SCALE(scaleup, off) (F210(1.0f / (f32)(scaleup)) | (F210((f32)(off)) << 16))
-#define VCURRENT(v) v
-#define ORIGIN(v) v
-#define VINTR(v) v
-#define HSTART START
+#define VCURRENT(v) (v)
+#define ORIGIN(v) (v)
+#define VINTR(v) (v)
+#define HSTART(start, end) START(start, end)
+#define VSTART(start, end) START(start, end)
+
+#ifdef BBPLAYER
+#define VI_CTRL_PIXEL_ADV_DEFAULT VI_CTRL_PIXEL_ADV(1)
+#else
+#define VI_CTRL_PIXEL_ADV_DEFAULT VI_CTRL_PIXEL_ADV(3)
+#endif
+
+extern OSViContext* __osViCurr;
+extern OSViContext* __osViNext;
+extern u32 __additional_scanline;
#endif
diff --git a/include/unk.h b/include/unk.h
index e28f2bd8cd..f8498b72dd 100644
--- a/include/unk.h
+++ b/include/unk.h
@@ -11,6 +11,9 @@
#define UNK_FUN_PTR(name) void(*name)(void)
#define UNK_ARGS
#define UNK_SIZE 1
-#define UNK_LINE 1
+
+// Unknown filename and line number for debug macros
+#define UNK_FILE ""
+#define UNK_LINE 0
#endif
diff --git a/include/variables.h b/include/variables.h
deleted file mode 100644
index 2f96222d58..0000000000
--- a/include/variables.h
+++ /dev/null
@@ -1,238 +0,0 @@
-#ifndef VARIABLES_H
-#define VARIABLES_H
-
-#include "z64.h"
-#include "libc64/os_malloc.h"
-#include "segment_symbols.h"
-
-extern Mtx D_01000000;
-
-extern void* osRomBase;
-extern s32 osTvType;
-extern s32 osResetType;
-extern s32 osCicId;
-extern u32 osMemSize;
-extern u8 osAppNMIBuffer[0x40];
-
-extern s8 D_80009430;
-extern vu8 gViConfigBlack;
-extern u8 gViConfigAdditionalScanLines;
-extern u32 gViConfigFeatures;
-extern f32 gViConfigXScale;
-extern f32 gViConfigYScale;
-extern OSPiHandle* gCartHandle;
-extern s32 gCurrentRegion;
-extern u32 __osPiAccessQueueEnabled;
-extern OSViMode osViModePalLan1;
-extern s32 osViClock;
-extern u32 __osShutdown;
-extern OSHWIntr __OSGlobalIntMask;
-extern __OSThreadTail __osThreadTail;
-extern OSThread* __osRunQueue;
-extern OSThread* __osActiveQueue;
-extern OSThread* __osRunningThread;
-extern OSThread* __osFaultedThread;
-extern OSPiHandle* __osPiTable;
-extern OSPiHandle* __osCurrentHandle[];
-extern OSTimer* __osTimerList;
-extern OSViMode osViModeNtscLan1;
-extern OSViMode osViModeMpalLan1;
-extern OSViContext* __osViCurr;
-extern OSViContext* __osViNext;
-extern OSViMode osViModeFpalLan1;
-extern u32 __additional_scanline;
-extern const char gBuildCreator[];
-extern const char gBuildDate[];
-extern const char gBuildMakeOption[];
-extern OSMesgQueue gPiMgrCmdQueue;
-extern OSViMode gViConfigMode;
-extern u8 gViConfigModeType;
-extern OSMesgQueue __osPiAccessQueue;
-extern OSPiHandle __Dom1SpeedParam;
-extern OSPiHandle __Dom2SpeedParam;
-extern OSTime __osCurrentTime;
-extern u32 __osBaseCounter;
-extern u32 __osViIntrCount;
-extern u32 __osTimerCounter;
-extern EffectSsOverlay gEffectSsOverlayTable[EFFECT_SS_TYPE_MAX];
-extern Gfx D_80116280[];
-extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0
-extern s32 gMaxActorId; // original name: "MaxProfile"
-extern s32 gDebugCamEnabled;
-extern GameStateOverlay gGameStateOverlayTable[GAMESTATE_ID_MAX];
-extern s32 gZeldaArenaLogSeverity;
-extern MapData gMapDataTable;
-extern s16 gSpoilingItems[3];
-extern s16 gSpoilingItemReverts[3];
-extern FlexSkeletonHeader* gPlayerSkelHeaders[2];
-extern u8 gPlayerModelTypes[PLAYER_MODELGROUP_MAX][PLAYER_MODELGROUPENTRY_MAX];
-extern Gfx* gPlayerLeftHandBgsDLs[];
-extern Gfx* gPlayerLeftHandOpenDLs[];
-extern Gfx* gPlayerLeftHandClosedDLs[];
-extern Gfx* gPlayerLeftHandBoomerangDLs[];
-extern Gfx gCullBackDList[];
-extern Gfx gCullFrontDList[];
-extern Gfx gEmptyDL[];
-extern u32 gBitFlags[32];
-extern u16 gEquipMasks[EQUIP_TYPE_MAX];
-extern u16 gEquipNegMasks[EQUIP_TYPE_MAX];
-extern u32 gUpgradeMasks[UPG_MAX];
-extern u8 gEquipShifts[EQUIP_TYPE_MAX];
-extern u8 gUpgradeShifts[UPG_MAX];
-extern u16 gUpgradeCapacities[UPG_MAX][4];
-extern u32 gGsFlagsMasks[4];
-extern u32 gGsFlagsShifts[4];
-extern void* gItemIcons[0x82];
-extern u8 gItemSlots[56];
-extern SceneCmdHandlerFunc gSceneCmdHandlers[SCENE_CMD_ID_MAX];
-extern s16 gLinkObjectIds[2];
-extern u32 gObjectTableSize;
-extern RomFile gObjectTable[OBJECT_ID_MAX];
-extern EntranceInfo gEntranceTable[ENTR_MAX];
-extern SceneTableEntry gSceneTable[SCENE_ID_MAX];
-extern u16 gSramSlotOffsets[];
-// 4 16-colors palettes
-extern u64 gMojiFontTLUTs[4][4]; // original name: "moji_tlut"
-extern u64 gMojiFontTex[]; // original name: "font_ff"
-extern u8 gBossMarkState;
-
-#if OOT_DEBUG
-extern u32 gIsCtrlr2Valid;
-#endif
-extern s16* gWaveSamples[9];
-extern f32 gBendPitchOneOctaveFrequencies[256];
-extern f32 gBendPitchTwoSemitonesFrequencies[256];
-extern f32 gPitchFrequencies[];
-extern u8 gDefaultShortNoteVelocityTable[16];
-extern u8 gDefaultShortNoteGateTimeTable[16];
-extern EnvelopePoint gDefaultEnvelope[4];
-extern NoteSubEu gZeroNoteSub;
-extern NoteSubEu gDefaultNoteSub;
-extern u16 gHaasEffectDelaySizes[64];
-extern s16 D_8012FBA8[];
-extern f32 gHeadsetPanVolume[128];
-extern f32 gStereoPanVolume[128];
-extern f32 gDefaultPanVolume[128];
-extern s16 gLowPassFilterData[16 * 8];
-extern s16 gHighPassFilterData[15 * 8];
-extern s32 gAudioContextInitialized;
-extern u8 gIsLargeSfxBank[7];
-extern u8 gChannelsPerBank[4][7];
-extern u8 gUsedChannelsPerBank[4][7];
-extern u8 gMorphaTransposeTable[16];
-extern u8* gFrogsSongPtr;
-extern OcarinaNote* gScarecrowLongSongPtr;
-extern u8* gScarecrowSpawnSongPtr;
-extern OcarinaSongButtons gOcarinaSongButtons[];
-extern SfxParams* gSfxParams[7];
-extern char D_80133390[];
-extern char D_80133398[];
-extern u8 gSfxRequestWriteIndex;
-extern u8 gSfxRequestReadIndex;
-extern SfxBankEntry* gSfxBanks[7];
-extern u8 gSfxBankSizes[];
-extern u8 gSfxChannelLayout;
-extern u16 D_801333D0;
-extern Vec3f gSfxDefaultPos;
-extern f32 gSfxDefaultFreqAndVolScale;
-extern s8 gSfxDefaultReverb;
-#if OOT_DEBUG
-extern u8 D_801333F0;
-extern u8 gAudioSfxSwapOff;
-extern u8 D_801333F8;
-#endif
-extern u8 gSeqCmdWritePos;
-extern u8 gSeqCmdReadPos;
-extern u8 gStartSeqDisabled;
-#if OOT_DEBUG
-extern u8 gAudioDebugPrintSeqCmd;
-#endif
-extern u8 gSoundModeList[];
-extern u8 gAudioSpecId;
-extern u8 D_80133418;
-extern AudioSpec gAudioSpecs[18];
-extern s32 gOverlayLogSeverity;
-extern s32 gSystemArenaLogSeverity;
-extern u8 __osPfsInodeCacheBank;
-extern s32 __osPfsLastChannel;
-
-extern const TempoData gTempoData;
-extern const AudioHeapInitSizes gAudioHeapInitSizes;
-extern s16 gOcarinaSongItemMap[];
-extern AudioTable gSoundFontTable;
-extern u8 gSequenceFontTable[];
-extern u8 gSequenceTable[];
-extern AudioTable gSampleBankTable;
-
-extern u8 gUseCutsceneCam;
-extern u16 D_8015FCCC;
-extern char D_8015FCD0[20];
-extern u8 D_8015FCE4;
-extern u16 gCamAtSplinePointsAppliedFrame;
-extern u16 gCamEyePointAppliedFrame;
-extern u16 gCamAtPointAppliedFrame;
-
-extern LightningStrike gLightningStrike;
-// TODO: These variables are here for BSS ordering but ideally they should not
-// be extern. This could be fixed by putting more stuff (e.g. struct definitions)
-// between gLightningStrike and gCustomLensFlareOn.
-extern s16 sLightningFlashAlpha;
-extern s16 sSunDepthTestX;
-extern s16 sSunDepthTestY;
-extern u8 gCustomLensFlareOn;
-extern Vec3f gCustomLensFlarePos;
-extern s16 gLensFlareScale;
-extern f32 gLensFlareColorIntensity;
-extern s16 gLensFlareGlareStrength;
-extern MapData* gMapData;
-extern f32 gBossMarkScale;
-extern u32 D_8016139C;
-extern PauseMapMarksData* gLoadedPauseMarkDataTable;
-
-extern PreNmiBuff* gAppNmiBufferPtr;
-extern Scheduler gScheduler;
-extern PadMgr gPadMgr;
-extern IrqMgr gIrqMgr;
-extern volatile OSTime gAudioThreadUpdateTimeTotalPerGfxTask;
-extern volatile OSTime gGfxTaskSentToNextReadyMinusAudioThreadUpdateTime;
-extern volatile OSTime gRSPAudioTimeTotal;
-extern volatile OSTime gRSPGfxTimeTotal;
-extern volatile OSTime gRDPTimeTotal;
-extern volatile OSTime gGraphUpdatePeriod;
-extern volatile OSTime gAudioThreadUpdateTimeStart;
-extern volatile OSTime gAudioThreadUpdateTimeAcc;
-extern volatile OSTime gRSPAudioTimeAcc;
-extern volatile OSTime gRSPGfxTimeAcc;
-extern volatile OSTime gRSPOtherTimeAcc;
-extern volatile OSTime D_8016A578;
-extern volatile OSTime gRDPTimeAcc;
-
-extern SfxBankEntry D_8016BAD0[9];
-extern SfxBankEntry D_8016BC80[12];
-extern SfxBankEntry D_8016BEC0[22];
-extern SfxBankEntry D_8016C2E0[20];
-extern SfxBankEntry D_8016C6A0[8];
-extern SfxBankEntry D_8016C820[3];
-extern SfxBankEntry D_8016C8B0[5];
-extern ActiveSfx gActiveSfx[7][MAX_CHANNELS_PER_BANK]; // total size = 0xA8
-extern u8 gSfxBankMuted[];
-extern u16 gAudioSfxSwapSource[10];
-extern u16 gAudioSfxSwapTarget[10];
-extern u8 gAudioSfxSwapMode[10];
-extern ActiveSequence gActiveSeqs[4];
-extern AudioContext gAudioCtx;
-extern AudioCustomUpdateFunction gAudioCustomUpdateFunction;
-
-extern OSPifRam __osContPifRam;
-extern u8 __osContLastCmd;
-extern u8 __osMaxControllers;
-extern __OSInode __osPfsInodeCache;
-extern OSPifRam __osPfsPifRam;
-extern u16 gZBuffer[SCREEN_HEIGHT][SCREEN_WIDTH]; // 0x25800 bytes
-extern u64 gGfxSPTaskOutputBuffer[0x3000]; // 0x18000 bytes
-extern u64 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE / sizeof(u64)]; // 0xC00 bytes
-extern u64 gGfxSPTaskStack[SP_DRAM_STACK_SIZE64]; // 0x400 bytes
-extern GfxPool gGfxPools[2]; // 0x24820 bytes
-extern u8 gAudioHeap[0x38000]; // 0x38000 bytes
-
-#endif
diff --git a/include/versions.h b/include/versions.h
index 6362545b96..620b27999e 100644
--- a/include/versions.h
+++ b/include/versions.h
@@ -15,6 +15,7 @@
#define GC_EU 11
#define GC_EU_MQ 12
#define GC_JP_CE 13
+#define IQUE_CN 14
// NTSC/PAL
#if OOT_VERSION == PAL_1_0 || OOT_VERSION == PAL_1_1 || OOT_VERSION == GC_EU || OOT_VERSION == GC_EU_MQ || OOT_VERSION == GC_EU_MQ_DBG
@@ -39,4 +40,20 @@
#define OOT_MQ 0
#endif
+// Macro for constants that change in 50 Hz N64 PAL versions.
+#if !OOT_PAL_N64
+#define FRAMERATE_CONST(value60Hz, value50Hz) (value60Hz)
+#else
+#define FRAMERATE_CONST(value60Hz, value50Hz) (value50Hz)
+#endif
+
+// Debug Assets
+// Due to asset extraction limitations, all versions will not have access to some assets present in debug ROMs
+// To allow the inclusion of debug features in any version there is a separation between DEBUG_FEATURES and DEBUG_ASSETS
+#if OOT_VERSION == GC_EU_MQ_DBG && DEBUG_FEATURES
+#define DEBUG_ASSETS 1
+#else
+#define DEBUG_ASSETS 0
+#endif
+
#endif
diff --git a/include/vi_mode.h b/include/vi_mode.h
new file mode 100644
index 0000000000..5c2f1bace2
--- /dev/null
+++ b/include/vi_mode.h
@@ -0,0 +1,55 @@
+#ifndef VI_MODE_H
+#define VI_MODE_H
+
+#include "ultra64.h"
+#include "libu64/pad.h"
+#include "versions.h"
+
+typedef enum ViModeEditState {
+#if OOT_VERSION < PAL_1_0
+ /* -2 */ VI_MODE_EDIT_STATE_NEGATIVE_2 = -2,
+ /* -1 */ VI_MODE_EDIT_STATE_NEGATIVE_1,
+ /* 0 */ VI_MODE_EDIT_STATE_INACTIVE,
+ /* 1 */ VI_MODE_EDIT_STATE_2, // active, more adjustments
+ /* 2 */ VI_MODE_EDIT_STATE_3 // active, more adjustments, print comparison with NTSC LAN1 mode
+#else
+ /* 0 */ VI_MODE_EDIT_STATE_INACTIVE,
+ /* 1 */ VI_MODE_EDIT_STATE_ACTIVE,
+ /* 2 */ VI_MODE_EDIT_STATE_2, // active, more adjustments
+ /* 3 */ VI_MODE_EDIT_STATE_3 // active, more adjustments, print comparison with NTSC LAN1 mode
+#endif
+} ViModeEditState;
+
+typedef struct ViMode {
+ /* 0x00 */ OSViMode customViMode;
+ /* 0x50 */ s32 viHeight;
+ /* 0x54 */ s32 viWidth;
+ /* 0x58 */ s32 rightAdjust;
+ /* 0x5C */ s32 leftAdjust;
+ /* 0x60 */ s32 lowerAdjust;
+ /* 0x64 */ s32 upperAdjust;
+ /* 0x68 */ s32 editState;
+ /* 0x6C */ s32 tvType;
+ /* 0x70 */ u32 loRes;
+ /* 0x74 */ u32 antialiasOff;
+ /* 0x78 */ u32 modeN; // Controls interlacing, the meaning of this mode is different based on choice of resolution
+ /* 0x7C */ u32 fb16Bit;
+ /* 0x80 */ u32 viFeatures;
+ /* 0x84 */ u32 unk_84;
+} ViMode; // size = 0x88
+
+void ViMode_Init(ViMode* viMode);
+void ViMode_Destroy(ViMode* viMode);
+void ViMode_Update(ViMode* viMode, Input* input);
+
+void ViConfig_UpdateVi(u32 black);
+void ViConfig_UpdateBlack(void);
+
+extern s8 D_80009430;
+extern vu8 gViConfigBlack;
+extern u8 gViConfigAdditionalScanLines;
+extern u32 gViConfigFeatures;
+extern f32 gViConfigXScale;
+extern f32 gViConfigYScale;
+
+#endif
diff --git a/include/yaz0.h b/include/yaz0.h
new file mode 100644
index 0000000000..b42c8e3ff8
--- /dev/null
+++ b/include/yaz0.h
@@ -0,0 +1,10 @@
+#ifndef YAZ0_H
+#define YAZ0_H
+
+#include "stddef.h"
+#include "stdint.h"
+#include "ultra64.h"
+
+void Yaz0_Decompress(uintptr_t romStart, u8* dst, size_t size);
+
+#endif
diff --git a/include/z64.h b/include/z64.h
deleted file mode 100644
index 2d36ccd436..0000000000
--- a/include/z64.h
+++ /dev/null
@@ -1,489 +0,0 @@
-#ifndef Z64_H
-#define Z64_H
-
-#include "ultra64.h"
-#include "ultra64/gs2dex.h"
-#include "attributes.h"
-#include "audiomgr.h"
-#include "controller.h"
-#include "versions.h"
-#include "z64save.h"
-#include "z64light.h"
-#include "z64bgcheck.h"
-#include "z64actor.h"
-#include "z64player.h"
-#include "z64audio.h"
-#include "z64object.h"
-#include "z64ocarina.h"
-#include "z64camera.h"
-#include "z64environment.h"
-#include "z64cutscene.h"
-#include "z64collision_check.h"
-#include "z64curve.h"
-#include "z64scene.h"
-#include "z64effect.h"
-#include "z64game_over.h"
-#include "z64item.h"
-#include "z64animation.h"
-#include "z64animation_legacy.h"
-#include "z64dma.h"
-#include "z64math.h"
-#include "z64map_mark.h"
-#include "z64message.h"
-#include "z64pause.h"
-#include "z64play.h"
-#include "z64skin.h"
-#include "z64game.h"
-#include "z64transition.h"
-#include "z64transition_instances.h"
-#include "z64interface.h"
-#include "z64sfx_source.h"
-#include "z64skybox.h"
-#include "z64sram.h"
-#include "z64view.h"
-#include "z64vis.h"
-#include "alignment.h"
-#include "audiothread_cmd.h"
-#include "seqcmd.h"
-#include "sequence.h"
-#include "sfx.h"
-#include "color.h"
-#include "gfxprint.h"
-#include "z_lib.h"
-#include "ichain.h"
-#include "regs.h"
-#include "irqmgr.h"
-#include "padmgr.h"
-#include "sched.h"
-#include "rumble.h"
-#include "mempak.h"
-#include "tha.h"
-#include "thga.h"
-#include "speedmeter.h"
-#include "gfx.h"
-#include "jpeg.h"
-#include "prerender.h"
-#include "rand.h"
-#include "libc64/qrand.h"
-#include "sys_math.h"
-#include "sys_math3d.h"
-#include "libc64/math64.h"
-#include "sys_matrix.h"
-#include "main.h"
-#include "segmented_address.h"
-#include "stackcheck.h"
-#include "kaleido_manager.h"
-#include "libc64/aprintf.h"
-#include "libc64/malloc.h"
-#include "libc64/sleep.h"
-#include "libc64/sprintf.h"
-
-#define SCREEN_WIDTH 320
-#define SCREEN_HEIGHT 240
-
-#define THREAD_PRI_IDLE_INIT 10
-#define THREAD_PRI_MAIN_INIT 10
-#define THREAD_PRI_DMAMGR_LOW 10 // Used when decompressing files
-#define THREAD_PRI_GRAPH 11
-#define THREAD_PRI_AUDIOMGR 12
-#define THREAD_PRI_N64DD 13
-#define THREAD_PRI_DDMSG 13
-#define THREAD_PRI_PADMGR 14
-#define THREAD_PRI_MAIN 15
-#define THREAD_PRI_SCHED 15
-#define THREAD_PRI_DMAMGR 16
-#define THREAD_PRI_IRQMGR 17
-#define THREAD_PRI_FAULT_CLIENT (OS_PRIORITY_APPMAX - 1)
-#define THREAD_PRI_FAULT OS_PRIORITY_APPMAX
-
-#define THREAD_ID_IDLE 1
-#define THREAD_ID_FAULT 2
-#define THREAD_ID_MAIN 3
-#define THREAD_ID_GRAPH 4
-#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
-#define THREAD_ID_DMAMGR 18
-#define THREAD_ID_IRQMGR 19
-
-typedef enum LensMode {
- /* 0 */ LENS_MODE_SHOW_ACTORS, // lens actors are invisible by default, and shown by using lens (for example, invisible enemies)
- /* 1 */ LENS_MODE_HIDE_ACTORS // lens actors are visible by default, and hidden by using lens (for example, fake walls)
-} LensMode;
-
-typedef struct SetupState {
- /* 0x00 */ GameState state;
-} SetupState; // size = 0xA4
-
-typedef struct ConsoleLogoState {
- /* 0x0000 */ GameState state;
- /* 0x00A4 */ u8* staticSegment;
- /* 0x00A8 */ View view;
- /* 0x01D0 */ SramContext sramCtx;
- /* 0x01D4 */ s16 unk_1D4;
- /* 0x01D6 */ s16 coverAlpha;
- /* 0x01D8 */ s16 addAlpha;
- /* 0x01DA */ s16 visibleDuration;
- /* 0x01DC */ s16 ult;
- /* 0x01DE */ s16 uls;
- /* 0x01E0 */ u8 unk_1E0;
- /* 0x01E1 */ u8 exit;
- /* 0x01E2 */ char unk_1E2[0x06];
-} ConsoleLogoState; // size = 0x1E8
-
-struct MapSelectState;
-
-typedef struct SceneSelectEntry {
- /* 0x00 */ char* name;
- /* 0x04 */ void (*loadFunc)(struct MapSelectState*, s32);
- /* 0x08 */ s32 entranceIndex;
-} SceneSelectEntry; // size = 0xC
-
-typedef struct MapSelectState {
- /* 0x0000 */ GameState state;
- /* 0x00A8 */ View view;
- /* 0x01D0 */ s32 count;
- /* 0x01D4 */ SceneSelectEntry* scenes;
- /* 0x01D8 */ s32 currentScene;
- /* 0x01DC */ s32 pageDownIndex; // Index of pageDownStops
- /* 0x01E0 */ s32 pageDownStops[7];
- /* 0x01FC */ char unk_1FC[0x0C];
- /* 0x0208 */ s32 opt;
- /* 0x020C */ s32 topDisplayedScene; // The scene which is currently at the top of the screen
- /* 0x0210 */ char unk_210[0x0C];
- /* 0x021C */ s32 verticalInputAccumulator;
- /* 0x0220 */ s32 verticalInput;
- /* 0x0224 */ s32 timerUp;
- /* 0x0228 */ s32 timerDown;
- /* 0x022C */ s32 lockUp;
- /* 0x0230 */ s32 lockDown;
- /* 0x0234 */ s32 unk_234; // unused
- /* 0x0238 */ u8* staticSegment;
-} MapSelectState; // size = 0x240
-
-typedef struct SampleState {
- /* 0x0000 */ GameState state;
- /* 0x00A4 */ u8* staticSegment;
- /* 0x00A8 */ View view;
-} SampleState; // size = 0x1D0
-
-typedef struct QuestHintCmd {
- /* 0x00 */ u8 byte0;
- /* 0x01 */ u8 byte1;
- /* 0x02 */ u8 byte2;
- /* 0x03 */ u8 byte3;
-} QuestHintCmd; // size = 0x4
-
-typedef enum PauseBgPreRenderState {
- /* 0 */ PAUSE_BG_PRERENDER_OFF, // Inactive, do nothing.
- /* 1 */ PAUSE_BG_PRERENDER_SETUP, // The current frame is only drawn for the purpose of serving as the pause background.
- /* 2 */ PAUSE_BG_PRERENDER_PROCESS, // The previous frame was PAUSE_BG_PRERENDER_SETUP, now apply prerender filters.
- /* 3 */ PAUSE_BG_PRERENDER_READY, // The pause background is ready to be used.
- /* 4 */ PAUSE_BG_PRERENDER_MAX
-} PauseBgPreRenderState;
-
-typedef enum TransitionTileState {
- /* 0 */ TRANS_TILE_OFF, // Inactive, do nothing
- /* 1 */ TRANS_TILE_SETUP, // Save the necessary buffers
- /* 2 */ TRANS_TILE_PROCESS, // Initialize the transition
- /* 3 */ TRANS_TILE_READY // The transition is ready, so will update and draw each frame
-} TransitionTileState;
-
-typedef struct TitleSetupState {
- /* 0x0000 */ GameState state;
- /* 0x00A8 */ View view;
-} TitleSetupState; // size = 0x1D0
-
-typedef struct FileSelectState {
- /* 0x00000 */ GameState state;
- /* 0x000A4 */ Vtx* windowVtx;
- /* 0x000A8 */ u8* staticSegment;
- /* 0x000AC */ u8* parameterSegment;
-#if OOT_PAL
- /* 0x000B0 */ char unk_B0[0x8];
-#endif
- /* 0x000B8 */ View view;
- /* 0x001E0 */ SramContext sramCtx;
- /* 0x001E4 */ char unk_1E4[0x4];
- /* 0x001E8 */ SkyboxContext skyboxCtx;
- /* 0x00348 */ MessageContext msgCtx;
- /* 0x0E760 */ Font font;
- /* 0x1C8E8 */ EnvironmentContext envCtx;
- /* 0x1C9E4 */ char unk_1C9E4[0x4];
- /* 0x1C9E8 */ Vtx* windowContentVtx;
- /* 0x1C9EC */ Vtx* keyboardVtx;
- /* 0x1C9F0 */ Vtx* nameEntryVtx;
- /* 0x1C9F4 */ u8 n64ddFlag;
- /* 0x1C9F6 */ u16 deaths[3];
- /* 0x1C9FC */ u8 fileNames[3][8];
- /* 0x1CA14 */ u16 healthCapacities[3];
- /* 0x1CA1C */ u32 questItems[3];
- /* 0x1CA28 */ s16 n64ddFlags[3];
- /* 0x1CA2E */ s8 defense[3];
-#if OOT_PAL
- /* 0x1CA32 */ u16 health[3];
-#endif
- /* 0x1CA38 */ s16 buttonIndex;
- /* 0x1CA3A */ s16 confirmButtonIndex; // 0: yes, 1: quit
- /* 0x1CA3C */ s16 menuMode;
- /* 0x1CA3E */ s16 configMode;
- /* 0x1CA40 */ s16 prevConfigMode;
- /* 0x1CA42 */ s16 nextConfigMode;
- /* 0x1CA44 */ s16 selectMode;
- /* 0x1CA46 */ s16 selectedFileIndex;
- /* 0x1CA48 */ char unk_1CA48[0x2];
- /* 0x1CA4A */ s16 fileNamesY[3];
- /* 0x1CA50 */ s16 actionTimer;
- /* 0x1CA52 */ s16 buttonYOffsets[6];
- /* 0x1CA5E */ s16 copyDestFileIndex;
- /* 0x1CA60 */ s16 warningLabel;
- /* 0x1CA62 */ s16 warningButtonIndex;
- /* 0x1CA64 */ s16 titleLabel;
- /* 0x1CA66 */ s16 nextTitleLabel;
- /* 0x1CA68 */ s16 windowColor[3];
- /* 0x1CA6E */ s16 titleAlpha[2];
- /* 0x1CA72 */ s16 windowAlpha;
- /* 0x1CA74 */ s16 fileButtonAlpha[3];
- /* 0x1CA7A */ s16 nameBoxAlpha[3];
- /* 0x1CA80 */ s16 nameAlpha[3];
- /* 0x1CA86 */ s16 connectorAlpha[3];
- /* 0x1CA8C */ s16 fileInfoAlpha[3];
- /* 0x1CA92 */ s16 actionButtonAlpha[2];
- /* 0x1CA96 */ s16 confirmButtonAlpha[2];
- /* 0x1CA9A */ s16 optionButtonAlpha;
- /* 0x1CA9C */ s16 nameEntryBoxAlpha;
- /* 0x1CA9E */ s16 controlsAlpha;
- /* 0x1CAA0 */ s16 emptyFileTextAlpha;
- /* 0x1CAA2 */ s16 highlightColor[4];
- /* 0x1CAAA */ s16 highlightPulseDir; // 0 fade out, 1 fade in
- /* 0x1CAAC */ s16 unk_1CAAC; // initialized but never used
- /* 0x1CAAE */ s16 confirmButtonTexIndices[2];
- /* 0x1CAB2 */ s16 inputTimerX;
- /* 0x1CAB4 */ s16 inputTimerY;
- /* 0x1CAB6 */ s16 stickXDir;
- /* 0x1CAB8 */ s16 stickYDir;
- /* 0x1CABA */ s16 stickAdjX;
- /* 0x1CABC */ s16 stickAdjY;
- /* 0x1CABE */ s16 nameEntryBoxPosX;
- /* 0x1CAC0 */ s16 windowPosX;
- /* 0x1CAC4 */ f32 windowRot;
- /* 0x1CAC8 */ s16 kbdButton; // only for buttons, not characters
- /* 0x1CACA */ s16 charPage; // 0: hiragana, 1: katakana, 2: alphabet
- /* 0x1CACC */ s16 charBgAlpha; // square shape the letter sits in
- /* 0x1CACE */ s16 charIndex; // 0 - 64, top left to bottom right
- /* 0x1CAD0 */ s16 kbdX; // (0, 0) is top left character
- /* 0x1CAD2 */ s16 kbdY;
- /* 0x1CAD4 */ s16 newFileNameCharCount;
- /* 0x1CAD6 */ s16 unk_1CAD6[5];
-} FileSelectState; // size = 0x1CAE0
-
-// Macros for `EntranceInfo.field`
-#define ENTRANCE_INFO_CONTINUE_BGM_FLAG (1 << 15)
-#define ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG (1 << 14)
-#define ENTRANCE_INFO_END_TRANS_TYPE_MASK 0x3F80
-#define ENTRANCE_INFO_END_TRANS_TYPE_SHIFT 7
-#define ENTRANCE_INFO_END_TRANS_TYPE(field) \
- (((field) >> ENTRANCE_INFO_END_TRANS_TYPE_SHIFT) \
- & (ENTRANCE_INFO_END_TRANS_TYPE_MASK >> ENTRANCE_INFO_END_TRANS_TYPE_SHIFT))
-#define ENTRANCE_INFO_START_TRANS_TYPE_MASK 0x7F
-#define ENTRANCE_INFO_START_TRANS_TYPE_SHIFT 0
-#define ENTRANCE_INFO_START_TRANS_TYPE(field) \
- (((field) >> ENTRANCE_INFO_START_TRANS_TYPE_SHIFT) \
- & (ENTRANCE_INFO_START_TRANS_TYPE_MASK >> ENTRANCE_INFO_START_TRANS_TYPE_SHIFT))
-
-typedef struct EntranceInfo {
- /* 0x00 */ s8 sceneId;
- /* 0x01 */ s8 spawn;
- /* 0x02 */ u16 field;
-} EntranceInfo; // size = 0x4
-
-typedef struct GameStateOverlay {
- /* 0x00 */ void* loadedRamAddr;
- /* 0x04 */ RomFile file; // if applicable
- /* 0x0C */ void* vramStart; // if applicable
- /* 0x10 */ void* vramEnd; // if applicable
- /* 0x14 */ void* unk_14;
- /* 0x18 */ void* init; // initializes and executes the given context
- /* 0x1C */ void* destroy; // deconstructs the context, and sets the next context to load
- /* 0x20 */ void* unk_20;
- /* 0x24 */ void* unk_24;
- /* 0x28 */ UNK_TYPE4 unk_28;
- /* 0x2C */ u32 instanceSize;
-} GameStateOverlay; // size = 0x30
-
-typedef struct PreNMIState {
- /* 0x00 */ GameState state;
- /* 0xA4 */ u32 timer;
- /* 0xA8 */ UNK_TYPE4 unk_A8;
-} PreNMIState; // size = 0xAC
-
-typedef enum FloorID {
- /* 1 */ F_8F = 1,
- /* 2 */ F_7F,
- /* 3 */ F_6F,
- /* 4 */ F_5F,
- /* 5 */ F_4F,
- /* 6 */ F_3F,
- /* 7 */ F_2F,
- /* 8 */ F_1F,
- /* 9 */ F_B1,
- /* 10 */ F_B2,
- /* 11 */ F_B3,
- /* 12 */ F_B4,
- /* 13 */ F_B5,
- /* 14 */ F_B6,
- /* 15 */ F_B7,
- /* 16 */ F_B8
-} FloorID;
-
-// All arrays pointed in this struct are indexed by "map indices"
-// In dungeons, the map index corresponds to the dungeon index (which also indexes keys, items, etc)
-// In overworld areas, the map index corresponds to the overworld area index (spot 00, 01, etc)
-typedef struct MapData {
- /* 0x00 */ s16 (*floorTexIndexOffset)[8]; // dungeon texture index offset by floor
- /* 0x04 */ s16* bossFloor; // floor the boss is on
- /* 0x08 */ s16 (*roomPalette)[32]; // map palette by room
- /* 0x0C */ s16* maxPaletteCount; // max number of palettes in a same floor
- /* 0x10 */ s16 (*paletteRoom)[8][14]; // room by palette by floor
- /* 0x14 */ s16 (*roomCompassOffsetX)[44]; // dungeon compass icon X offset by room
- /* 0x18 */ s16 (*roomCompassOffsetY)[44]; // dungeon compass icon Y offset by room
- /* 0x1C */ u8* dgnMinimapCount; // number of room minimaps
- /* 0x20 */ u16* dgnMinimapTexIndexOffset; // dungeon minimap texture index offset
- /* 0x24 */ u16* owMinimapTexSize;
- /* 0x28 */ u16* owMinimapTexOffset;
- /* 0x2C */ s16* owMinimapPosX;
- /* 0x30 */ s16* owMinimapPosY;
- /* 0x34 */ s16 (*owCompassInfo)[4]; // [X scale, Y scale, X offset, Y offset]
- /* 0x38 */ s16* dgnTexIndexBase; // dungeon texture index base
- /* 0x3C */ s16 (*dgnCompassInfo)[4]; // [X scale, Y scale, X offset, Y offset]
- /* 0x40 */ s16* owMinimapWidth;
- /* 0x44 */ s16* owMinimapHeight;
- /* 0x48 */ s16* owEntranceIconPosX; // "dungeon entrance" icon X pos
- /* 0x4C */ s16* owEntranceIconPosY; // "dungeon entrance" icon Y pos
- /* 0x50 */ u16* owEntranceFlag; // flag in inf_table[26] based on which entrance icons are shown (0xFFFF = always shown)
- /* 0x54 */ f32 (*floorCoordY)[8]; // Y coordinate of each floor
- /* 0x58 */ u16* switchEntryCount; // number of "room switch" entries, which correspond to the next 3 arrays
- /* 0x5C */ u8 (*switchFromRoom)[51]; // room to come from
- /* 0x60 */ u8 (*switchFromFloor)[51]; // floor to come from
- /* 0x64 */ u8 (*switchToRoom)[51]; // room to go to
- /* 0x68 */ u8 (*floorID)[8];
- /* 0x6C */ s16* skullFloorIconY; // dungeon big skull icon Y pos
-} MapData; // size = 0x70
-
-// TODO get these properties from the textures themselves
-#define MAP_I_TEX_WIDTH 96
-#define MAP_I_TEX_HEIGHT 85
-#define MAP_I_TEX_SIZE ((MAP_I_TEX_WIDTH * MAP_I_TEX_HEIGHT) / 2) // 96x85 I4 texture
-
-#define MAP_48x85_TEX_WIDTH 48
-#define MAP_48x85_TEX_HEIGHT 85
-#define MAP_48x85_TEX_SIZE ((MAP_48x85_TEX_WIDTH * MAP_48x85_TEX_HEIGHT) / 2) // 48x85 CI4 texture
-
-typedef struct DebugDispObject {
- /* 0x00 */ Vec3f pos;
- /* 0x0C */ Vec3s rot;
- /* 0x14 */ Vec3f scale;
- /* 0x20 */ Color_RGBA8 color;
- /* 0x24 */ s16 type;
- /* 0x28 */ struct DebugDispObject* next;
-} DebugDispObject; // size = 0x2C
-
-typedef struct ISVDbg {
- /* 0x00 */ u32 magic; // IS64
- /* 0x04 */ u32 get;
- /* 0x08 */ u8 unk_08[0x14-0x08];
- /* 0x14 */ u32 put;
- /* 0x18 */ u8 unk_18[0x20-0x18];
- /* 0x20 */ u8 data[0x10000-0x20];
-} ISVDbg;
-
-typedef struct LocaleCartInfo {
- /* 0x00 */ char name[0x18];
- /* 0x18 */ u32 mediaFormat;
- /* 0x1C */ union {
- struct {
- u16 cartId;
- u8 countryCode;
- u8 version;
- };
- u32 regionInfo;
- };
-} LocaleCartInfo; // size = 0x20
-
-typedef struct Yaz0Header {
- /* 0x00 */ char magic[4]; // Yaz0
- /* 0x04 */ u32 decSize;
- /* 0x08 */ u32 compInfoOffset; // only used in mio0
- /* 0x0C */ u32 uncompDataOffset; // only used in mio0
-} Yaz0Header; // size = 0x10
-
-/* Relocation entry field getters */
-#define RELOC_SECTION(reloc) ((reloc) >> 30)
-#define RELOC_OFFSET(reloc) ((reloc) & 0xFFFFFF)
-#define RELOC_TYPE_MASK(reloc) ((reloc) & 0x3F000000)
-#define RELOC_TYPE_SHIFT 24
-
-/* MIPS Relocation Types, matches the MIPS ELF spec */
-#define R_MIPS_32 2
-#define R_MIPS_26 4
-#define R_MIPS_HI16 5
-#define R_MIPS_LO16 6
-
-/* Reloc section id, must fit in 2 bits otherwise the relocation format must be modified */
-typedef enum RelocSectionId {
- /* 0 */ RELOC_SECTION_NULL,
- /* 1 */ RELOC_SECTION_TEXT,
- /* 2 */ RELOC_SECTION_DATA,
- /* 3 */ RELOC_SECTION_RODATA,
- /* 4 */ RELOC_SECTION_MAX
-} RelocSectionId;
-
-typedef struct OverlayRelocationSection {
- /* 0x00 */ u32 textSize;
- /* 0x04 */ u32 dataSize;
- /* 0x08 */ u32 rodataSize;
- /* 0x0C */ u32 bssSize;
- /* 0x10 */ u32 nRelocations;
- /* 0x14 */ u32 relocations[1]; // size is nRelocations
-} OverlayRelocationSection; // size >= 0x18
-
-// This struct is used at osAppNMIBuffer which is not at an 8-byte aligned address. This causes an unaligned access
-// crash if the OSTime variables use 64-bit load/store instructions, which is the case in any MIPS ABI other than O32
-// where 64-bit load/store instructions are emulated with 2x 32-bit load/store instructions. The alignment attribute
-// conveys that this structure will not always be 8-bytes aligned, allowing a modern compiler to generate non-crashing
-// code for accessing these. This is not an issue in the original compiler as it only output O32 ABI code.
-ALIGNED(4) typedef struct PreNmiBuff {
- /* 0x00 */ u32 resetting;
- /* 0x04 */ u32 resetCount;
- /* 0x08 */ OSTime duration;
- /* 0x10 */ OSTime resetTime;
-} PreNmiBuff; // size = 0x18 (actually osAppNMIBuffer is 0x40 bytes large but the rest is unused)
-
-typedef enum ViModeEditState {
- /* 0 */ VI_MODE_EDIT_STATE_INACTIVE,
- /* 1 */ VI_MODE_EDIT_STATE_ACTIVE,
- /* 2 */ VI_MODE_EDIT_STATE_2, // active, more adjustments
- /* 3 */ VI_MODE_EDIT_STATE_3 // active, more adjustments, print comparison with NTSC LAN1 mode
-} ViModeEditState;
-
-typedef struct ViMode {
- /* 0x00 */ OSViMode customViMode;
- /* 0x50 */ s32 viHeight;
- /* 0x54 */ s32 viWidth;
- /* 0x58 */ s32 rightAdjust;
- /* 0x5C */ s32 leftAdjust;
- /* 0x60 */ s32 lowerAdjust;
- /* 0x64 */ s32 upperAdjust;
- /* 0x68 */ s32 editState;
- /* 0x6C */ s32 tvType;
- /* 0x70 */ u32 loRes;
- /* 0x74 */ u32 antialiasOff;
- /* 0x78 */ u32 modeN; // Controls interlacing, the meaning of this mode is different based on choice of resolution
- /* 0x7C */ u32 fb16Bit;
- /* 0x80 */ u32 viFeatures;
- /* 0x84 */ u32 unk_84;
-} ViMode; // size = 0x88
-
-#endif
diff --git a/include/z64actor.h b/include/z64actor.h
index 1cc67ffec2..30869fde47 100644
--- a/include/z64actor.h
+++ b/include/z64actor.h
@@ -2,7 +2,7 @@
#define Z64ACTOR_H
#include "color.h"
-#include "z64dma.h"
+#include "z64actor_profile.h"
#include "z64animation.h"
#include "z64math.h"
#include "z64collision_check.h"
@@ -14,88 +14,25 @@
#define MASS_IMMOVABLE 0xFF // Cannot be pushed by OC colliders
#define MASS_HEAVY 0xFE // Can only be pushed by OC colliders from actors with IMMOVABLE or HEAVY mass.
+// These are default parameters used for "animation fidgeting", which procedurally generate actor idle animations.
+// These calculations may be performed within individual actors, or by using fidget tables with `Actor_UpdateFidgetTables`.
+#define FIDGET_FREQ_Y 0x814
+#define FIDGET_FREQ_Z 0x940
+#define FIDGET_FREQ_LIMB 0x32
+#define FIDGET_AMPLITUDE 200.0f
+
struct Actor;
+struct ActorEntry;
+struct ActorOverlay;
struct CollisionPoly;
struct Lights;
+struct Player;
struct PlayState;
-typedef void (*ActorFunc)(struct Actor*, struct PlayState*);
typedef void (*ActorShadowFunc)(struct Actor*, struct Lights*, struct PlayState*);
typedef u16 (*NpcGetTextIdFunc)(struct PlayState*, struct Actor*);
typedef s16 (*NpcUpdateTalkStateFunc)(struct PlayState*, struct Actor*);
-typedef struct ActorProfile {
- /* 0x00 */ s16 id;
- /* 0x02 */ u8 category; // Classifies actor and determines when it will update or draw
- /* 0x04 */ u32 flags;
- /* 0x08 */ s16 objectId;
- /* 0x0C */ u32 instanceSize;
- /* 0x10 */ ActorFunc init; // Constructor
- /* 0x14 */ ActorFunc destroy; // Destructor
- /* 0x18 */ ActorFunc update; // Update Function
- /* 0x1C */ ActorFunc draw; // Draw function
-} ActorProfile; // size = 0x20
-
-/**
- * @see ACTOROVL_ALLOC_ABSOLUTE
- */
-#if OOT_DEBUG
-#define ACTOROVL_ABSOLUTE_SPACE_SIZE 0x27A0
-#else
-#define ACTOROVL_ABSOLUTE_SPACE_SIZE 0x24E0
-#endif
-
-/**
- * The actor overlay should be allocated memory for when loading,
- * and the memory deallocated when there is no more actor using the overlay.
- *
- * `ACTOROVL_ALLOC_` defines indicate how an actor overlay should be loaded.
- *
- * @note Bitwise or-ing `ACTOROVL_ALLOC_` types is not meaningful.
- * The `ACTOROVL_ALLOC_` types are 0, 1, 2 but checked against with a bitwise and.
- *
- * @see ACTOROVL_ALLOC_ABSOLUTE
- * @see ACTOROVL_ALLOC_PERSISTENT
- * @see actor_table.h
- */
-#define ACTOROVL_ALLOC_NORMAL 0
-
-/**
- * The actor overlay should be loaded to "absolute space".
- *
- * Absolute space is a fixed amount of memory allocated once.
- * The overlay will still need to be loaded again if at some point there is no more actor using the overlay.
- *
- * @note Only one such overlay may be loaded at a time.
- * This is not checked: a newly loaded overlay will overwrite the previous one in absolute space,
- * even if actors are still relying on the previous one. Actors using absolute-allocated overlays should be deleted
- * when another absolute-allocated overlay is about to be used.
- *
- * @see ACTOROVL_ABSOLUTE_SPACE_SIZE
- * @see ActorContext.absoluteSpace
- * @see ACTOROVL_ALLOC_NORMAL
- */
-#define ACTOROVL_ALLOC_ABSOLUTE (1 << 0)
-
-/**
- * The actor overlay should be loaded persistently.
- * It will stay loaded until the current game state instance ends.
- *
- * @see ACTOROVL_ALLOC_NORMAL
- */
-#define ACTOROVL_ALLOC_PERSISTENT (1 << 1)
-
-typedef struct ActorOverlay {
- /* 0x00 */ RomFile file;
- /* 0x08 */ void* vramStart;
- /* 0x0C */ void* vramEnd;
- /* 0x10 */ void* loadedRamAddr; // original name: "allocp"
- /* 0x14 */ ActorProfile* profile;
- /* 0x18 */ char* name;
- /* 0x1C */ u16 allocType; // See `ACTOROVL_ALLOC_` defines
- /* 0x1E */ s8 numLoaded; // original name: "clients"
-} ActorOverlay; // size = 0x20
-
typedef struct ActorShape {
/* 0x00 */ Vec3s rot; // Current actor shape rotation
/* 0x06 */ s16 face; // Used to index eyes and mouth textures. Only used by player
@@ -117,18 +54,29 @@ typedef struct ActorShape {
#define ACTOR_FLAG_HOSTILE (1 << 2)
// Actor is considered "friendly"; Opposite flag of `ACTOR_FLAG_HOSTILE`.
-// Note that this flag doesn't have any effect on either the actor, or Player's behvaior.
+// Note that this flag doesn't have any effect on either the actor, or Player's behavior.
// What actually matters is the presence or lack of `ACTOR_FLAG_HOSTILE`.
#define ACTOR_FLAG_FRIENDLY (1 << 3)
-//
-#define ACTOR_FLAG_4 (1 << 4)
+// Culling of the actor's update process is disabled.
+// In other words, the actor will keep updating even if the actor is outside its own culling volume.
+// See `Actor_CullingCheck` for more information about culling.
+// See `Actor_CullingVolumeTest` for more information on the test used to determine if an actor should be culled.
+#define ACTOR_FLAG_UPDATE_CULLING_DISABLED (1 << 4)
-//
-#define ACTOR_FLAG_5 (1 << 5)
+// Culling of the actor's draw process is disabled.
+// In other words, the actor will keep drawing even if the actor is outside its own culling volume.
+// See `Actor_CullingCheck` for more information about culling.
+// See `Actor_CullingVolumeTest` for more information on the test used to determine if an actor should be culled.
+// (The original name for this flag is `NO_CULL_DRAW`, known from the Majora's Mask Debug ROM)
+#define ACTOR_FLAG_DRAW_CULLING_DISABLED (1 << 5)
-//
-#define ACTOR_FLAG_6 (1 << 6)
+// Set if the actor is currently within the bounds of its culling volume.
+// In most cases, this flag can be used to determine whether or not an actor is currently culled.
+// However this flag still updates even if `ACTOR_FLAG_UPDATE_CULLING_DISABLED` or `ACTOR_FLAG_DRAW_CULLING_DISABLED`
+// are set. Meaning, the flag can still have a value of "false" even if it is not actually culled.
+// (The original name for this flag is `NO_CULL_FLAG`, known from the Majora's Mask Debug ROM)
+#define ACTOR_FLAG_INSIDE_CULLING_VOLUME (1 << 6)
// hidden or revealed by Lens of Truth (depending on room lensMode)
#define ACTOR_FLAG_REACT_TO_LENS (1 << 7)
@@ -138,35 +86,47 @@ typedef struct ActorShape {
// Actor will retain this flag until `Actor_TalkOfferAccepted` is called or manually turned off by the actor
#define ACTOR_FLAG_TALK (1 << 8)
-//
-#define ACTOR_FLAG_9 (1 << 9)
+// When the hookshot attaches to this actor, the actor will be pulled back as the hookshot retracts.
+#define ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR (1 << 9)
-//
-#define ACTOR_FLAG_10 (1 << 10)
+// When the hookshot attaches to this actor, Player will be pulled by the hookshot and fly to the actor.
+#define ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER (1 << 10)
-//
-#define ACTOR_FLAG_ENKUSA_CUT (1 << 11)
+// A clump of grass (EN_KUSA) has been destroyed.
+// This flag is used to communicate with the spawner actor (OBJ_MURE).
+#define ACTOR_FLAG_GRASS_DESTROYED (1 << 11)
// Actor will not shake when a quake occurs
#define ACTOR_FLAG_IGNORE_QUAKE (1 << 12)
+// The hookshot is currently attached to this actor.
+// The behavior that occurs after attachment is determined by `ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR` and `ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER`.
+// If neither of those flags are set attachment cannot occur, and the hookshot will simply act as a damage source.
//
-#define ACTOR_FLAG_13 (1 << 13)
+// This flag is also reused to indicate that an actor is attached to the boomerang.
+// This only has an effect for Gold Skulltula Tokens (EN_SI) which has overlapping behavior for hookshot and boomerang.
+#define ACTOR_FLAG_HOOKSHOT_ATTACHED (1 << 13)
-//
-#define ACTOR_FLAG_14 (1 << 14)
+// When hit by an arrow, the actor will be able to attach to the arrow and fly with it in the air
+#define ACTOR_FLAG_CAN_ATTACH_TO_ARROW (1 << 14)
-//
-#define ACTOR_FLAG_15 (1 << 15)
+// Actor is currently attached to an arrow and flying with it in the air
+#define ACTOR_FLAG_ATTACHED_TO_ARROW (1 << 15)
-//
-#define ACTOR_FLAG_16 (1 << 16)
+// Player automatically accepts a Talk Offer without needing to press the A button.
+// Player still has to meet all conditions to be able to receive a talk offer (for example, being in range).
+#define ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED (1 << 16)
-//
-#define ACTOR_FLAG_17 (1 << 17)
+// Actor will be influenced by the pitch (x rot) of Player's left hand when being carried,
+// instead of Player's yaw which is the default actor carry behavior.
+// This flag is helpful for something like the `BG_HEAVY_BLOCK` actor which Player carries underhanded.
+#define ACTOR_FLAG_CARRY_X_ROT_INFLUENCE (1 << 17)
-//
-#define ACTOR_FLAG_18 (1 << 18)
+// When locked onto an actor with this flag set, the C-Up button can be used to talk to this actor.
+// A C-Up button labeled "Navi" will appear on the HUD when locked on which indicates the actor can be checked with Navi.
+// With this flag Player talks directly to the actor with C-Up. It is expected that the resulting dialog should appear
+// to be coming from Navi, even though she is not involved at all with this interaction.
+#define ACTOR_FLAG_TALK_WITH_C_UP (1 << 18)
// Flags controlling the use of `Actor.sfx`. Do not use directly.
#define ACTOR_FLAG_SFX_ACTOR_POS_2 (1 << 19) // see Actor_PlaySfx_Flagged2
@@ -176,17 +136,21 @@ typedef struct ActorShape {
// ignores point lights but not directional lights (such as environment lights)
#define ACTOR_FLAG_IGNORE_POINT_LIGHTS (1 << 22)
-//
-#define ACTOR_FLAG_23 (1 << 23)
+// When Player is carrying this actor, it can only be thrown, not dropped/placed.
+// Typically an actor can only be thrown when moving, but this allows an actor to be thrown when standing still.
+#define ACTOR_FLAG_THROW_ONLY (1 << 23)
-//
-#define ACTOR_FLAG_24 (1 << 24)
+// When colliding with Player's body AC collider, a "thump" sound will play indicating his body has been hit
+#define ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT (1 << 24)
-//
-#define ACTOR_FLAG_25 (1 << 25)
+// Actor can update even if Player is currently using the ocarina.
+// Typically an actor will halt while the ocarina is active (depending on category).
+// This flag allows a given actor to be an exception.
+#define ACTOR_FLAG_UPDATE_DURING_OCARINA (1 << 25)
-//
-#define ACTOR_FLAG_26 (1 << 26)
+// Actor can press and hold down switches.
+// See usages of `DynaPolyActor_SetSwitchPressed` and `DynaPolyActor_IsSwitchPressed` for more context on how switches work.
+#define ACTOR_FLAG_CAN_PRESS_SWITCHES (1 << 26)
// Player is not able to lock onto the actor.
// Navi will still be able to hover over the actor, assuming `ACTOR_FLAG_ATTENTION_ENABLED` is set.
@@ -195,6 +159,8 @@ typedef struct ActorShape {
// Flag controlling the use of `Actor.sfx`. Do not use directly. See Actor_PlaySfx_FlaggedTimer
#define ACTOR_FLAG_SFX_TIMER (1 << 28)
+#define ACTOR_FLAGS_CHECK_ALL(thisx, mask) (((thisx)->flags & (mask)) == (mask))
+
#define COLORFILTER_GET_COLORINTENSITY(colorFilterParams) (((colorFilterParams) & 0x1F00) >> 5)
#define COLORFILTER_GET_DURATION(colorFilterParams) ((colorFilterParams) & 0xFF)
@@ -252,9 +218,9 @@ typedef struct Actor {
/* 0x0B4 */ ActorShape shape; // Variables related to the physical shape of the actor
/* 0x0E4 */ Vec3f projectedPos; // Position of the actor in projected space
/* 0x0F0 */ f32 projectedW; // w component of the projected actor position
- /* 0x0F4 */ f32 uncullZoneForward; // Amount to increase the uncull zone forward by (in projected space)
- /* 0x0F8 */ f32 uncullZoneScale; // Amount to increase the uncull zone scale by (in projected space)
- /* 0x0FC */ f32 uncullZoneDownward; // Amount to increase uncull zone downward by (in projected space)
+ /* 0x0F4 */ f32 cullingVolumeDistance; // Forward distance of the culling volume (in projected space). See `Actor_CullingCheck` and `Actor_CullingVolumeTest` for more information.
+ /* 0x0F8 */ f32 cullingVolumeScale; // Scale of the culling volume (in projected space). See `Actor_CullingCheck` and `Actor_CullingVolumeTest` for more information.
+ /* 0x0FC */ f32 cullingVolumeDownward; // Downward height of the culling volume (in projected space). See `Actor_CullingCheck` and `Actor_CullingVolumeTest` for more information.
/* 0x100 */ Vec3f prevPos; // World position from the previous update cycle
/* 0x10C */ u8 isLockedOn; // Set to true if the actor is currently locked-on by Player
/* 0x10D */ u8 attentionPriority; // Lower values have higher priority. Resets to 0 when lock-on is released.
@@ -273,8 +239,8 @@ typedef struct Actor {
/* 0x12C */ ActorFunc destroy; // Destruction Routine. Called by `Actor_Destroy`
/* 0x130 */ ActorFunc update; // Update Routine. Called by `Actor_UpdateAll`
/* 0x134 */ ActorFunc draw; // Draw Routine. Called by `Actor_Draw`
- /* 0x138 */ ActorOverlay* overlayEntry; // Pointer to the overlay table entry for this actor
-#if OOT_DEBUG
+ /* 0x138 */ struct ActorOverlay* overlayEntry; // Pointer to the overlay table entry for this actor
+#if DEBUG_FEATURES
/* 0x13C */ char dbgPad[0x10];
#endif
} Actor; // size = 0x14C
@@ -300,7 +266,7 @@ if neither of the above are set : blue
#define DYNA_INTERACT_ACTOR_ON_TOP (1 << 0) // There is an actor standing on the collision of the dynapoly actor
#define DYNA_INTERACT_PLAYER_ON_TOP (1 << 1) // The player actor is standing on the collision of the dynapoly actor
#define DYNA_INTERACT_PLAYER_ABOVE (1 << 2) // The player is directly above the collision of the dynapoly actor (any distance above)
-#define DYNA_INTERACT_3 (1 << 3) // Like the ACTOR_ON_TOP flag but only actors with ACTOR_FLAG_26
+#define DYNA_INTERACT_ACTOR_SWITCH_PRESSED (1 << 3) // An actor that is capable of pressing switches is on top of the dynapoly actor
typedef struct DynaPolyActor {
/* 0x000 */ struct Actor actor;
@@ -326,117 +292,6 @@ typedef struct BodyBreak {
#define BODYBREAK_STATUS_READY -1
#define BODYBREAK_STATUS_FINISHED 0
-typedef enum Item00Type {
- /* 0x00 */ ITEM00_RUPEE_GREEN,
- /* 0x01 */ ITEM00_RUPEE_BLUE,
- /* 0x02 */ ITEM00_RUPEE_RED,
- /* 0x03 */ ITEM00_RECOVERY_HEART,
- /* 0x04 */ ITEM00_BOMBS_A,
- /* 0x05 */ ITEM00_ARROWS_SINGLE,
- /* 0x06 */ ITEM00_HEART_PIECE,
- /* 0x07 */ ITEM00_HEART_CONTAINER,
- /* 0x08 */ ITEM00_ARROWS_SMALL,
- /* 0x09 */ ITEM00_ARROWS_MEDIUM,
- /* 0x0A */ ITEM00_ARROWS_LARGE,
- /* 0x0B */ ITEM00_BOMBS_B,
- /* 0x0C */ ITEM00_NUTS,
- /* 0x0D */ ITEM00_STICK,
- /* 0x0E */ ITEM00_MAGIC_LARGE,
- /* 0x0F */ ITEM00_MAGIC_SMALL,
- /* 0x10 */ ITEM00_SEEDS,
- /* 0x11 */ ITEM00_SMALL_KEY,
- /* 0x12 */ ITEM00_FLEXIBLE,
- /* 0x13 */ ITEM00_RUPEE_ORANGE,
- /* 0x14 */ ITEM00_RUPEE_PURPLE,
- /* 0x15 */ ITEM00_SHIELD_DEKU,
- /* 0x16 */ ITEM00_SHIELD_HYLIAN,
- /* 0x17 */ ITEM00_TUNIC_ZORA,
- /* 0x18 */ ITEM00_TUNIC_GORON,
- /* 0x19 */ ITEM00_BOMBS_SPECIAL,
- /* 0x1A */ ITEM00_MAX,
- /* 0xFF */ ITEM00_NONE = 0xFF
-} Item00Type;
-
-struct EnItem00;
-
-typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct PlayState*);
-
-typedef struct EnItem00 {
- /* 0x000 */ Actor actor;
- /* 0x14C */ EnItem00ActionFunc actionFunc;
- /* 0x150 */ s16 collectibleFlag;
- /* 0x152 */ s16 getItemId;
- /* 0x154 */ s16 unk_154;
- /* 0x156 */ s16 unk_156;
- /* 0x158 */ s16 unk_158;
- /* 0x15A */ s16 despawnTimer;
- /* 0x15C */ f32 scale;
- /* 0x160 */ ColliderCylinder collider;
-} EnItem00; // size = 0x1AC
-
-// Only A_OBJ_SIGNPOST_OBLONG and A_OBJ_SIGNPOST_ARROW are used in room files.
-typedef enum AObjType {
- /* 0x00 */ A_OBJ_BLOCK_SMALL,
- /* 0x01 */ A_OBJ_BLOCK_LARGE,
- /* 0x02 */ A_OBJ_BLOCK_HUGE,
- /* 0x03 */ A_OBJ_BLOCK_SMALL_ROT,
- /* 0x04 */ A_OBJ_BLOCK_LARGE_ROT,
- /* 0x05 */ A_OBJ_CUBE_SMALL,
- /* 0x06 */ A_OBJ_UNKNOWN_6,
- /* 0x07 */ A_OBJ_GRASS_CLUMP,
- /* 0x08 */ A_OBJ_TREE_STUMP,
- /* 0x09 */ A_OBJ_SIGNPOST_OBLONG,
- /* 0x0A */ A_OBJ_SIGNPOST_ARROW,
- /* 0x0B */ A_OBJ_BOULDER_FRAGMENT,
- /* 0x0C */ A_OBJ_MAX
-} AObjType;
-
-struct EnAObj;
-
-typedef void (*EnAObjActionFunc)(struct EnAObj*, struct PlayState*);
-
-typedef struct EnAObj {
- /* 0x000 */ DynaPolyActor dyna;
- /* 0x164 */ EnAObjActionFunc actionFunc;
- /* 0x168 */ s32 rotateWaitTimer;
- /* 0x16C */ s16 textId;
- /* 0x16E */ s16 rotateState;
- /* 0x170 */ s16 rotateForTimer;
- /* 0x172 */ s16 rotSpeedY;
- /* 0x174 */ s16 rotSpeedX;
- /* 0x178 */ f32 focusYoffset;
- /* 0x17C */ ColliderCylinder collider;
-} EnAObj; // size = 0x1C8
-
-typedef enum ActorCategory {
- /* 0x00 */ ACTORCAT_SWITCH,
- /* 0x01 */ ACTORCAT_BG,
- /* 0x02 */ ACTORCAT_PLAYER,
- /* 0x03 */ ACTORCAT_EXPLOSIVE,
- /* 0x04 */ ACTORCAT_NPC,
- /* 0x05 */ ACTORCAT_ENEMY,
- /* 0x06 */ ACTORCAT_PROP,
- /* 0x07 */ ACTORCAT_ITEMACTION,
- /* 0x08 */ ACTORCAT_MISC,
- /* 0x09 */ ACTORCAT_BOSS,
- /* 0x0A */ ACTORCAT_DOOR,
- /* 0x0B */ ACTORCAT_CHEST,
- /* 0x0C */ ACTORCAT_MAX
-} ActorCategory;
-
-#define DEFINE_ACTOR(_0, enum, _2, _3) enum,
-#define DEFINE_ACTOR_INTERNAL(_0, enum, _2, _3) enum,
-#define DEFINE_ACTOR_UNSET(enum) enum,
-
-typedef enum ActorID {
- #include "tables/actor_table.h"
- /* 0x0192 */ ACTOR_ID_MAX // originally "ACTOR_DLF_MAX"
-} ActorID;
-
-#undef DEFINE_ACTOR
-#undef DEFINE_ACTOR_INTERNAL
-#undef DEFINE_ACTOR_UNSET
-
typedef enum DoorLockType {
DOORLOCK_NORMAL,
DOORLOCK_BOSS,
@@ -730,10 +585,214 @@ typedef struct NpcInteractInfo {
#define PARAMS_GET_NOSHIFT(p, s, n) \
((p) & (NBITS_TO_MASK(n) << (s)))
+// Moves the `n`-bit value `p` to bit position `s` for building actor parameters by OR-ing these together
+#define PARAMS_PACK(p, s, n) \
+ (((p) & NBITS_TO_MASK(n)) << (s))
+
+// Moves the value `p` to bit position `s` for building actor parameters by OR-ing these together.
+#define PARAMS_PACK_NOMASK(p, s) \
+ ((p) << (s))
+
// Generates a bitmask for bit position `s` of length `n`
#define PARAMS_MAKE_MASK(s, n) PARAMS_GET_NOSHIFT(~0, s, n)
#define TRANSITION_ACTOR_PARAMS_INDEX_SHIFT 10
#define GET_TRANSITION_ACTOR_INDEX(actor) PARAMS_GET_NOMASK((u16)(actor)->params, 10)
+extern Gfx D_80116280[];
+
+void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc shadowDraw, f32 shadowScale);
+void ActorShadow_DrawCircle(Actor* actor, struct Lights* lights, struct PlayState* play);
+void ActorShadow_DrawWhiteCircle(Actor* actor, struct Lights* lights, struct PlayState* play);
+void ActorShadow_DrawHorse(Actor* actor, struct Lights* lights, struct PlayState* play);
+void ActorShadow_DrawFeet(Actor* actor, struct Lights* lights, struct PlayState* play);
+void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* leftFootPos, s32 rightFootIndex,
+ Vec3f* rightFootPos);
+void Actor_ProjectPos(struct PlayState* play, Vec3f* src, Vec3f* xyzDest, f32* cappedInvWDest);
+void Attention_Draw(Attention* attention, struct PlayState* play);
+s32 Flags_GetSwitch(struct PlayState* play, s32 flag);
+void Flags_SetSwitch(struct PlayState* play, s32 flag);
+void Flags_UnsetSwitch(struct PlayState* play, s32 flag);
+s32 Flags_GetUnknown(struct PlayState* play, s32 flag);
+void Flags_SetUnknown(struct PlayState* play, s32 flag);
+void Flags_UnsetUnknown(struct PlayState* play, s32 flag);
+s32 Flags_GetTreasure(struct PlayState* play, s32 flag);
+void Flags_SetTreasure(struct PlayState* play, s32 flag);
+s32 Flags_GetClear(struct PlayState* play, s32 flag);
+void Flags_SetClear(struct PlayState* play, s32 flag);
+void Flags_UnsetClear(struct PlayState* play, s32 flag);
+s32 Flags_GetTempClear(struct PlayState* play, s32 flag);
+void Flags_SetTempClear(struct PlayState* play, s32 flag);
+void Flags_UnsetTempClear(struct PlayState* play, s32 flag);
+s32 Flags_GetCollectible(struct PlayState* play, s32 flag);
+void Flags_SetCollectible(struct PlayState* play, s32 flag);
+void TitleCard_InitBossName(struct PlayState* play, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
+ u8 height);
+void TitleCard_InitPlaceName(struct PlayState* play, TitleCardContext* titleCtx, void* texture, s32 x, s32 y, s32 width,
+ s32 height, s32 delay);
+s32 TitleCard_Clear(struct PlayState* play, TitleCardContext* titleCtx);
+void Actor_Kill(Actor* actor);
+void Actor_SetFocus(Actor* actor, f32 yOffset);
+void Actor_SetScale(Actor* actor, f32 scale);
+void Actor_SetObjectDependency(struct PlayState* play, Actor* actor);
+void Actor_UpdatePos(Actor* actor);
+void Actor_UpdateVelocityXZGravity(Actor* actor);
+void Actor_MoveXZGravity(Actor* actor);
+void Actor_UpdateVelocityXYZ(Actor* actor);
+void Actor_MoveXYZ(Actor* actor);
+void Actor_SetProjectileSpeed(Actor* actor, f32 speedXYZ);
+s16 Actor_WorldYawTowardActor(Actor* origin, Actor* target);
+s16 Actor_FocusYawTowardActor(Actor* origin, Actor* target);
+s16 Actor_WorldYawTowardPoint(Actor* origin, Vec3f* point);
+f32 Actor_WorldDistXYZToActor(Actor* actorA, Actor* actorB);
+f32 Actor_WorldDistXYZToPoint(Actor* actor, Vec3f* refPoint);
+s16 Actor_WorldPitchTowardActor(Actor* actorA, Actor* actorB);
+s16 Actor_WorldPitchTowardPoint(Actor* actor, Vec3f* refPoint);
+f32 Actor_WorldDistXZToActor(Actor* actorA, Actor* actorB);
+f32 Actor_WorldDistXZToPoint(Actor* actor, Vec3f* refPoint);
+void Actor_WorldToActorCoords(Actor* actor, Vec3f* dest, Vec3f* pos);
+f32 Actor_HeightDiff(Actor* actorA, Actor* actorB);
+f32 Player_GetHeight(struct Player* player);
+f32 func_8002DCE4(struct Player* player);
+int func_8002DD6C(struct Player* player);
+int func_8002DD78(struct Player* player);
+s32 func_8002DDE4(struct PlayState* play);
+s32 func_8002DDF4(struct PlayState* play);
+void Actor_SwapHookshotAttachment(struct PlayState* play, Actor* srcActor, Actor* destActor);
+void Actor_RequestHorseCameraSetting(struct PlayState* play, struct Player* player);
+void Actor_MountHorse(struct PlayState* play, struct Player* player, Actor* horse);
+int func_8002DEEC(struct Player* player);
+void Actor_InitPlayerHorse(struct PlayState* play, struct Player* player);
+s32 Player_SetCsAction(struct PlayState* play, Actor* csActor, u8 csAction);
+s32 Player_SetCsActionWithHaltedActors(struct PlayState* play, Actor* csActor, u8 csAction);
+void func_8002DF90(DynaPolyActor* dynaActor);
+void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2);
+s32 Player_IsFacingActor(Actor* actor, s16 maxAngle, struct PlayState* play);
+s32 Actor_ActorBIsFacingActorA(Actor* actorA, Actor* actorB, s16 maxAngle);
+s32 Actor_IsFacingPlayer(Actor* actor, s16 maxAngle);
+s32 Actor_ActorAIsFacingActorB(Actor* actorA, Actor* actorB, s16 maxAngle);
+s32 Actor_IsFacingAndNearPlayer(Actor* actor, f32 range, s16 maxAngle);
+s32 Actor_ActorAIsFacingAndNearActorB(Actor* actorA, Actor* actorB, f32 range, s16 maxAngle);
+void Actor_UpdateBgCheckInfo(struct PlayState* play, Actor* actor, f32 wallCheckHeight, f32 wallCheckRadius,
+ f32 ceilingCheckHeight, s32 flags);
+Hilite* func_8002EABC(Vec3f* object, Vec3f* eye, Vec3f* lightDir, struct GraphicsContext* gfxCtx);
+Hilite* func_8002EB44(Vec3f* object, Vec3f* eye, Vec3f* lightDir, struct GraphicsContext* gfxCtx);
+void func_8002EBCC(Actor* actor, struct PlayState* play, s32 flag);
+void func_8002ED80(Actor* actor, struct PlayState* play, s32 flag);
+PosRot Actor_GetFocus(Actor* actor);
+PosRot Actor_GetWorld(Actor* actor);
+PosRot Actor_GetWorldPosShapeRot(Actor* actor);
+s32 Attention_ShouldReleaseLockOn(Actor* actor, struct Player* player, s32 ignoreLeash);
+s32 Actor_TalkOfferAccepted(Actor* actor, struct PlayState* play);
+s32 Actor_OfferTalkExchange(Actor* actor, struct PlayState* play, f32 xzRange, f32 yRange, u32 exchangeItemId);
+s32 Actor_OfferTalkExchangeEquiCylinder(Actor* actor, struct PlayState* play, f32 radius, u32 exchangeItemId);
+s32 Actor_OfferTalk(Actor* actor, struct PlayState* play, f32 radius);
+s32 Actor_OfferTalkNearColChkInfoCylinder(Actor* actor, struct PlayState* play);
+u32 Actor_TextboxIsClosing(Actor* actor, struct PlayState* play);
+s8 Actor_GetPlayerExchangeItemId(struct PlayState* play);
+void Actor_GetScreenPos(struct PlayState* play, Actor* actor, s16* x, s16* y);
+u32 Actor_HasParent(Actor* actor, struct PlayState* play);
+s32 Actor_OfferGetItem(Actor* actor, struct PlayState* play, s32 getItemId, f32 xzRange, f32 yRange);
+s32 Actor_OfferGetItemNearby(Actor* actor, struct PlayState* play, s32 getItemId);
+s32 Actor_OfferCarry(Actor* actor, struct PlayState* play);
+u32 Actor_HasNoParent(Actor* actor, struct PlayState* play);
+void func_8002F5C4(Actor* actorA, Actor* actorB, struct PlayState* play);
+void Actor_SetClosestSecretDistance(Actor* actor, struct PlayState* play);
+s32 Actor_IsMounted(struct PlayState* play, Actor* horse);
+u32 Actor_SetRideActor(struct PlayState* play, Actor* horse, s32 mountSide);
+s32 Actor_NotMounted(struct PlayState* play, Actor* horse);
+void Actor_SetPlayerKnockback(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 type, u32 damage);
+void Actor_SetPlayerKnockbackLarge(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage);
+void Actor_SetPlayerKnockbackLargeNoDamage(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity);
+void Actor_SetPlayerKnockbackSmall(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage);
+void Actor_SetPlayerKnockbackSmallNoDamage(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity);
+void Player_PlaySfx(struct Player* player, u16 sfxId);
+void Actor_PlaySfx(Actor* actor, u16 sfxId);
+void Actor_PlaySfx_SurfaceBomb(struct PlayState* play, Actor* actor);
+void Actor_PlaySfx_Flagged2(Actor* actor, u16 sfxId);
+void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId);
+void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId);
+void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId);
+void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer);
+s32 func_8002F9EC(struct PlayState* play, Actor* actor, struct CollisionPoly* poly, s32 bgId, Vec3f* pos);
+void Actor_DisableLens(struct PlayState* play);
+void Actor_InitContext(struct PlayState* play, ActorContext* actorCtx, struct ActorEntry* playerEntry);
+void Actor_UpdateAll(struct PlayState* play, ActorContext* actorCtx);
+s32 Actor_CullingVolumeTest(struct PlayState* play, Actor* actor, Vec3f* projPos, f32 projW);
+void Actor_DrawAll(struct PlayState* play, ActorContext* actorCtx);
+void Actor_KillAllWithMissingObject(struct PlayState* play, ActorContext* actorCtx);
+void func_80031B14(struct PlayState* play, ActorContext* actorCtx);
+void func_80031C3C(ActorContext* actorCtx, struct PlayState* play);
+Actor* Actor_Spawn(ActorContext* actorCtx, struct PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX,
+ s16 rotY, s16 rotZ, s16 params);
+Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, struct PlayState* play, s16 actorId, f32 posX,
+ f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s16 params);
+void Actor_SpawnTransitionActors(struct PlayState* play, ActorContext* actorCtx);
+Actor* Actor_SpawnEntry(ActorContext* actorCtx, struct ActorEntry* actorEntry, struct PlayState* play);
+Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, struct PlayState* play);
+Actor* Attention_FindActor(struct PlayState* play, ActorContext* actorCtx, Actor** attentionActorP,
+ struct Player* player);
+Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory);
+void Enemy_StartFinishingBlow(struct PlayState* play, Actor* actor);
+void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, struct PlayState* play);
+void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s32 maxLimbIndex, u32 count, Gfx** dList,
+ s16 objectSlot);
+s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, struct PlayState* play, s16 type);
+void Actor_SpawnFloorDustRing(struct PlayState* play, Actor* actor, Vec3f* posXZ, f32 radius, s32 amountMinusOne,
+ f32 randAccelWeight, s16 scale, s16 scaleStep, u8 useLighting);
+void func_80033480(struct PlayState* play, Vec3f* posBase, f32 randRangeDiameter, s32 amountMinusOne, s16 scaleBase,
+ s16 scaleStep, u8 arg6);
+Actor* Actor_GetCollidedExplosive(struct PlayState* play, Collider* collider);
+Actor* func_80033684(struct PlayState* play, Actor* explosiveActor);
+Actor* Actor_GetProjectileActor(struct PlayState* play, Actor* refActor, f32 radius);
+void Actor_ChangeCategory(struct PlayState* play, ActorContext* actorCtx, Actor* actor, u8 actorCategory);
+void Actor_SetTextWithPrefix(struct PlayState* play, Actor* actor, s16 baseTextId);
+s16 Actor_TestFloorInDirection(Actor* actor, struct PlayState* play, f32 distance, s16 angle);
+s32 Actor_IsLockedOn(struct PlayState* play, Actor* actor);
+s32 Actor_OtherIsLockedOn(struct PlayState* play, Actor* actor);
+f32 func_80033AEC(Vec3f* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
+void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, struct PlayState* play);
+void Actor_RequestQuake(struct PlayState* play, s16 y, s16 duration);
+void Actor_RequestQuakeWithSpeed(struct PlayState* play, s16 y, s16 duration, s16 speed);
+void Actor_RequestQuakeAndRumble(Actor* actor, struct PlayState* play, s16 quakeY, s16 quakeDuration);
+void Actor_DrawDoorLock(struct PlayState* play, s32 frame, s32 type);
+void func_8003424C(struct PlayState* play, Vec3f* arg1);
+void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 bufFlag, s16 duration);
+void func_800342EC(Vec3f* object, struct PlayState* play);
+void func_8003435C(Vec3f* object, struct PlayState* play);
+s32 Npc_UpdateTalking(struct PlayState* play, Actor* actor, s16* talkState, f32 interactRange,
+ NpcGetTextIdFunc getTextId, NpcUpdateTalkStateFunc updateTalkState);
+s16 Npc_GetTrackingPresetMaxPlayerYaw(s16 presetIndex);
+void Npc_TrackPoint(Actor* actor, NpcInteractInfo* interactInfo, s16 presetIndex, s16 trackingMode);
+void func_80034BA0(struct PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
+ PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
+void func_80034CC4(struct PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
+ PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
+s16 Actor_UpdateAlphaByDistance(Actor* actor, struct PlayState* play, s16 alpha, f32 radius);
+void Actor_UpdateFidgetTables(struct PlayState* play, s16* fidgetTableY, s16* fidgetTableZ, s32 tableLen);
+void Actor_Noop(Actor* actor, struct PlayState* play);
+
+void Gfx_DrawDListOpa(struct PlayState* play, Gfx* dlist);
+void Gfx_DrawDListXlu(struct PlayState* play, Gfx* dlist);
+
+Actor* Actor_FindNearby(struct PlayState* play, Actor* refActor, s16 actorId, u8 actorCategory, f32 range);
+s32 func_800354B4(struct PlayState* play, Actor* actor, f32 range, s16 arg3, s16 arg4, s16 arg5);
+void func_8003555C(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
+void func_800355B8(struct PlayState* play, Vec3f* pos);
+u8 func_800355E4(struct PlayState* play, Collider* collider);
+u8 Actor_ApplyDamage(Actor* actor);
+void Actor_SetDropFlag(Actor* actor, ColliderElement* elem, s32 freezeFlag);
+void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph, s32 freezeFlag);
+void func_80035844(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3);
+Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused,
+ struct PlayState* play, s16 params, Gfx* dList);
+void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2);
+s32 Flags_GetEventChkInf(s32 flag);
+void Flags_SetEventChkInf(s32 flag);
+s32 Flags_GetInfTable(s32 flag);
+void Flags_SetInfTable(s32 flag);
+u16 func_80037C30(struct PlayState* play, s16 arg1);
+s32 func_80037D98(struct PlayState* play, Actor* actor, s32 arg2, s32* arg3);
+s32 Actor_TrackPlayer(struct PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos);
+
#endif
diff --git a/include/z64actor_profile.h b/include/z64actor_profile.h
new file mode 100644
index 0000000000..82ec9f957b
--- /dev/null
+++ b/include/z64actor_profile.h
@@ -0,0 +1,52 @@
+#ifndef Z64ACTOR_PROFILE_H
+#define Z64ACTOR_PROFILE_H
+
+#include "ultra64.h"
+
+struct Actor;
+struct PlayState;
+
+#define DEFINE_ACTOR(_0, enum, _2, _3) enum,
+#define DEFINE_ACTOR_INTERNAL(_0, enum, _2, _3) enum,
+#define DEFINE_ACTOR_UNSET(enum) enum,
+
+typedef enum ActorID {
+ #include "tables/actor_table.h"
+ /* 0x0192 */ ACTOR_ID_MAX // originally "ACTOR_DLF_MAX"
+} ActorID;
+
+#undef DEFINE_ACTOR
+#undef DEFINE_ACTOR_INTERNAL
+#undef DEFINE_ACTOR_UNSET
+
+typedef enum ActorCategory {
+ /* 0x00 */ ACTORCAT_SWITCH,
+ /* 0x01 */ ACTORCAT_BG,
+ /* 0x02 */ ACTORCAT_PLAYER,
+ /* 0x03 */ ACTORCAT_EXPLOSIVE,
+ /* 0x04 */ ACTORCAT_NPC,
+ /* 0x05 */ ACTORCAT_ENEMY,
+ /* 0x06 */ ACTORCAT_PROP,
+ /* 0x07 */ ACTORCAT_ITEMACTION,
+ /* 0x08 */ ACTORCAT_MISC,
+ /* 0x09 */ ACTORCAT_BOSS,
+ /* 0x0A */ ACTORCAT_DOOR,
+ /* 0x0B */ ACTORCAT_CHEST,
+ /* 0x0C */ ACTORCAT_MAX
+} ActorCategory;
+
+typedef void (*ActorFunc)(struct Actor*, struct PlayState*);
+
+typedef struct ActorProfile {
+ /* 0x00 */ s16 id;
+ /* 0x02 */ u8 category; // Classifies actor and determines when it will update or draw
+ /* 0x04 */ u32 flags;
+ /* 0x08 */ s16 objectId;
+ /* 0x0C */ u32 instanceSize;
+ /* 0x10 */ ActorFunc init; // Constructor
+ /* 0x14 */ ActorFunc destroy; // Destructor
+ /* 0x18 */ ActorFunc update; // Update Function
+ /* 0x1C */ ActorFunc draw; // Draw function
+} ActorProfile; // size = 0x20
+
+#endif
diff --git a/include/z64animation.h b/include/z64animation.h
index 5a561cad97..a085da5ddd 100644
--- a/include/z64animation.h
+++ b/include/z64animation.h
@@ -1,10 +1,10 @@
#ifndef Z64_ANIMATION_H
#define Z64_ANIMATION_H
+#include "avoid_ub.h"
#include "ultra64.h"
#include "z64dma.h"
#include "z64math.h"
-#include "macros.h"
struct PlayState;
struct Actor;
@@ -91,14 +91,14 @@ typedef enum AnimationTapers {
// This flag seems like it was intended to be paired with `ANIM_FLAG_UPDATE_Y` to control
// XZ movement based on the current animation.
// However, this flag is not checked by the Skelanime system. XZ movement will always occur
-// regardless of the current state of this flag, as long as the "Actor Move" Anim Task is in use.
+// regardless of the current state of this flag, as long as the ActorMovement Anim Task is in use.
// The name of this flag is speculative based on its usage in Player and in other actors.
//
// In practice, this flag only affects the scaling of Player's XZ position based on age.
#define ANIM_FLAG_UPDATE_XZ (1 << 0)
// Enables the movement of an actor in the Y-axis based on the current animation.
-// This only has an effect if the "Actor Move" Anim Task is in use.
+// This only has an effect if the ActorMovement Anim Task is in use.
//
// This animation-driven movement does not replace "normal" movement from other sources
// such as speed/velocity and collisions. The actor should stop updating other sources of movement
@@ -116,8 +116,13 @@ typedef enum AnimationTapers {
// set. The adjustment will be applied in this case regardless of this flag being enabled.
#define ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT (1 << 2)
-// (player-only) Call AnimTaskQueue_AddActorMove
-#define ANIM_FLAG_PLAYER_SETMOVE (1 << 3)
+// When this flag is set, ActorMovement tasks will be queued.
+//
+// Note that individual actors are responsible for implementing the functionality of this flag.
+// In practice, Player is the only actor who implements this flag.
+// It is possible to bypass the need for this flag by manually calling `AnimTaskQueue_AddActorMovement`
+// when it is needed.
+#define ANIM_FLAG_ENABLE_MOVEMENT (1 << 3)
// When this flag is set, movement in all axes will not be applied for one frame. The flag
// is unset automatically after one use, so movement can resume. The intent is for this flag to be used
@@ -128,18 +133,18 @@ typedef enum AnimationTapers {
// starting a new animation. This is helpful when an animation's translation data starts at the "origin"
// (in this case, the origin refers to `baseTransl`, in model space).
// Some animations have translation data that does not begin at the "origin". This is common when a
-// longer sequence of animation is broken up into different parts as seperate animations.
+// longer sequence of animation is broken up into different parts as separate animations.
// In this case, when one animation starts its translation at the same position where a different animation
// left off, resetting `prevTransl` is not desirable. This will cause the actor's position to noticeably change
// when the translation data from the first frame of the new animation is applied.
//
// When this flag is used during a transition between two animations, the first frame of movement is not applied.
-// This allows the actor's world postiion to stay at the same location as where the previous animation ended.
+// This allows the actor's world position to stay at the same location as where the previous animation ended.
// Because translations are calculated as a difference from the current and previous frame, all subsequent
// frames have their translation occur relative to this new starting point.
//
// Note that for Player, this flag is only relevant when transitioning from an animation that was also using
-// animation translation. This is because of how `prevTransl` gets reset in `Player_AnimReplaceApplyFlags`.
+// ActorMovement. This is because of how `prevTransl` gets reset in `Player_StartAnimMovement`.
#define ANIM_FLAG_ADJUST_STARTING_POS (1 << 4)
// Disables "normal" movement from sources like speed/velocity and collisions, which allows the
@@ -170,7 +175,7 @@ typedef struct SkelAnime {
s32 (*link)(struct PlayState*, struct SkelAnime*); // Can be Loop, Play once, or Morph
} update;
/* 0x34 */ s8 initFlags; // Flags used when initializing Link's skeleton
- /* 0x35 */ u8 moveFlags; // Flags used for animations that move the actor in worldspace.
+ /* 0x35 */ u8 movementFlags; // Flags used for animations that move the actor in worldspace.
/* 0x36 */ s16 prevRot; // Previous rotation in worldspace.
/* 0x38 */ Vec3s prevTransl; // Previous modelspace translation.
/* 0x3E */ Vec3s baseTransl; // Base modelspace translation.
@@ -342,11 +347,11 @@ typedef struct AnimTaskCopyUsingMapInverted {
/* 0x0C */ u8* limbCopyMap;
} AnimTaskCopyUsingMapInverted; // size = 0x10
-typedef struct AnimTaskActorMove {
+typedef struct AnimTaskActorMovement {
/* 0x00 */ struct Actor* actor;
/* 0x04 */ struct SkelAnime* skelAnime;
/* 0x08 */ f32 diffScaleY;
-} AnimTaskActorMove; // size = 0xC
+} AnimTaskActorMovement; // size = 0xC
typedef union AnimTaskData {
AnimTaskLoadPlayerFrame loadPlayerFrame;
@@ -354,7 +359,7 @@ typedef union AnimTaskData {
AnimTaskInterp interp;
AnimTaskCopyUsingMap copyUsingMap;
AnimTaskCopyUsingMapInverted copyUsingMapInverted;
- AnimTaskActorMove actorMove;
+ AnimTaskActorMovement actorMovement;
} AnimTaskData; // size = 0x3C
typedef struct AnimTask {
@@ -375,7 +380,7 @@ void AnimTaskQueue_AddCopy(struct PlayState* play, s32 vecCount, Vec3s* dest, Ve
void AnimTaskQueue_AddInterp(struct PlayState* play, s32 vecCount, Vec3s* base, Vec3s* mod, f32 weight);
void AnimTaskQueue_AddCopyUsingMap(struct PlayState* play, s32 vecCount, Vec3s* dest, Vec3s* src, u8* limbCopyMap);
void AnimTaskQueue_AddCopyUsingMapInverted(struct PlayState* play, s32 vecCount, Vec3s* dest, Vec3s* src, u8* limbCopyMap);
-void AnimTaskQueue_AddActorMove(struct PlayState* play, struct Actor* actor, SkelAnime* skelAnime, f32 moveDiffScaleY);
+void AnimTaskQueue_AddActorMovement(struct PlayState* play, struct Actor* actor, SkelAnime* skelAnime, f32 moveDiffScaleY);
void AnimTaskQueue_SetNextGroup(struct PlayState* play);
void AnimTaskQueue_DisableTransformTasksForGroup(struct PlayState* play);
diff --git a/include/z64audio.h b/include/z64audio.h
index a86c805d0e..308c220d7a 100644
--- a/include/z64audio.h
+++ b/include/z64audio.h
@@ -3,6 +3,9 @@
#include "ultra64.h"
#include "sequence.h"
+#include "z64math.h"
+
+struct GfxPrint;
typedef void (*AudioCustomUpdateFunction)(void);
@@ -28,8 +31,6 @@ typedef void (*AudioCustomUpdateFunction)(void);
#define SEQ_NUM_CHANNELS 16
#define SEQ_IO_VAL_NONE -1
-#define MAX_CHANNELS_PER_BANK 3
-
#define MUTE_BEHAVIOR_3 (1 << 3) // prevent further noteSubEus from playing
#define MUTE_BEHAVIOR_4 (1 << 4) // stop something in seqLayer scripts
#define MUTE_BEHAVIOR_SOFTEN (1 << 5) // lower volume, by default to half
@@ -65,12 +66,19 @@ typedef void (*AudioCustomUpdateFunction)(void);
#define AUDIO_RELOCATED_ADDRESS_START K0BASE
-typedef enum SoundMode {
- /* 0 */ SOUNDMODE_STEREO,
- /* 1 */ SOUNDMODE_HEADSET,
- /* 2 */ SOUNDMODE_SURROUND,
- /* 3 */ SOUNDMODE_MONO
-} SoundMode;
+typedef enum SoundSetting {
+ /* 0 */ SOUND_SETTING_STEREO,
+ /* 1 */ SOUND_SETTING_MONO,
+ /* 2 */ SOUND_SETTING_HEADSET,
+ /* 3 */ SOUND_SETTING_SURROUND
+} SoundSetting;
+
+typedef enum SoundOutputMode {
+ /* 0 */ SOUND_OUTPUT_STEREO,
+ /* 1 */ SOUND_OUTPUT_HEADSET,
+ /* 2 */ SOUND_OUTPUT_SURROUND,
+ /* 3 */ SOUND_OUTPUT_MONO
+} SoundOutputMode;
typedef enum AdsrStatus {
/* 0 */ ADSR_STATE_DISABLED,
@@ -198,11 +206,9 @@ typedef struct AdpcmBookHeader {
* The procedure used to design the codeBook is based on an adaptive clustering algorithm.
* The size of the codeBook is (8 * order * numPredictors) and is 8-byte aligned
*/
-typedef s16 AdpcmBookData[];
-
typedef struct AdpcmBook {
/* 0x00 */ AdpcmBookHeader header;
- /* 0x08 */ AdpcmBookData book; // size 8 * order * numPredictors. 8-byte aligned
+ /* 0x08 */ s16 book[1]; // size 8 * order * numPredictors. 8-byte aligned
} AdpcmBook; // size >= 0x8
typedef struct Sample {
@@ -928,7 +934,7 @@ typedef struct AudioContext {
/* 0x2890 */ s32 maxAudioCmds;
/* 0x2894 */ s32 numNotes;
/* 0x2898 */ s16 maxTempo; // Maximum possible tempo (seqTicks per minute), using every tick as a seqTick to process a .seq file
- /* 0x289A */ s8 soundMode;
+ /* 0x289A */ s8 soundOutputMode;
/* 0x289C */ s32 totalTaskCount; // The total number of times the top-level function on the audio thread has run since audio was initialized
/* 0x28A0 */ s32 curAudioFrameDmaCount;
/* 0x28A4 */ s32 rspTaskIndex;
@@ -1021,4 +1027,243 @@ typedef struct AudioHeapInitSizes {
/* 0x08 */ u32 permanentPoolSize;
} AudioHeapInitSizes; // size = 0xC
+// TODO these prototypes should be sorted into the relevant audio header files
+
+Acmd* AudioSynth_Update(Acmd* cmdStart, s32* cmdCnt, s16* aiStart, s32 aiBufLen);
+void AudioHeap_DiscardFont(s32 fontId);
+void AudioHeap_ReleaseNotesForFont(s32 fontId);
+void AudioHeap_DiscardSequence(s32 seqId);
+void AudioHeap_WritebackDCache(void* ramAddr, u32 size);
+void* AudioHeap_AllocZeroedAttemptExternal(AudioAllocPool* pool, u32 size);
+void* AudioHeap_AllocAttemptExternal(AudioAllocPool* pool, u32 size);
+void* AudioHeap_AllocDmaMemory(AudioAllocPool* pool, u32 size);
+void* AudioHeap_AllocDmaMemoryZeroed(AudioAllocPool* pool, u32 size);
+void* AudioHeap_AllocZeroed(AudioAllocPool* pool, u32 size);
+void* AudioHeap_Alloc(AudioAllocPool* pool, u32 size);
+void AudioHeap_InitPool(AudioAllocPool* pool, void* ramAddr, u32 size);
+void AudioHeap_PopPersistentCache(s32 tableType);
+void AudioHeap_InitMainPools(s32 initPoolSize);
+void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id);
+void* AudioHeap_SearchCaches(s32 tableType, s32 cache, s32 id);
+void* AudioHeap_SearchRegularCaches(s32 tableType, s32 cache, s32 id);
+void AudioHeap_LoadFilter(s16* filter, s32 lowPassCutoff, s32 highPassCutoff);
+s32 AudioHeap_ResetStep(void);
+void AudioHeap_Init(void);
+void* AudioHeap_SearchPermanentCache(s32 tableType, s32 id);
+void* AudioHeap_AllocPermanent(s32 tableType, s32 id, u32 size);
+void* AudioHeap_AllocSampleCache(u32 size, s32 fontId, void* sampleAddr, s8 medium, s32 cache);
+void AudioHeap_ApplySampleBankCache(s32 sampleBankId);
+void AudioLoad_DecreaseSampleDmaTtls(void);
+void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, s32 arg2, u8* dmaIndexRef, s32 medium);
+void AudioLoad_InitSampleDmaBuffers(s32 numNotes);
+s32 AudioLoad_IsFontLoadComplete(s32 fontId);
+s32 AudioLoad_IsSeqLoadComplete(s32 seqId);
+void AudioLoad_SetFontLoadStatus(s32 fontId, s32 loadStatus);
+void AudioLoad_SetSeqLoadStatus(s32 seqId, s32 loadStatus);
+void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 arg1);
+s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId);
+void AudioLoad_AsyncLoadSeq(s32 seqId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
+void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
+void AudioLoad_AsyncLoadFont(s32 fontId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
+u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* outNumFonts);
+void AudioLoad_DiscardSeqFonts(s32 seqId);
+s32 AudioLoad_SyncInitSeqPlayer(s32 playerIdx, s32 seqId, s32 arg2);
+s32 AudioLoad_SyncInitSeqPlayerSkipTicks(s32 playerIdx, s32 seqId, s32 skipTicks);
+void AudioLoad_ProcessLoads(s32 resetStatus);
+void AudioLoad_SetDmaHandler(DmaHandler callback);
+void AudioLoad_Init(void* heap, u32 heapSize);
+void AudioLoad_InitSlowLoads(void);
+s32 AudioLoad_SlowLoadSample(s32 fontId, s32 instId, s8* status);
+s32 AudioLoad_SlowLoadSeq(s32 seqId, u8* ramAddr, s8* status);
+void AudioLoad_InitAsyncLoads(void);
+void AudioLoad_LoadPermanentSamples(void);
+void AudioLoad_ScriptLoad(s32 tableType, s32 id, s8* status);
+void AudioLoad_ProcessScriptLoads(void);
+void AudioLoad_InitScriptLoads(void);
+
+AudioTask* AudioThread_Update(void);
+void AudioThread_QueueCmdF32(u32 opArgs, f32 data);
+void AudioThread_QueueCmdS32(u32 opArgs, s32 data);
+void AudioThread_QueueCmdS8(u32 opArgs, s8 data);
+void AudioThread_QueueCmdU16(u32 opArgs, u16 data);
+s32 AudioThread_ScheduleProcessCmds(void);
+u32 func_800E5E20(u32* out);
+u8* AudioThread_GetFontsForSequence(s32 seqId, u32* outNumFonts);
+s32 func_800E5EDC(void);
+s32 AudioThread_ResetAudioHeap(s32 specId);
+void AudioThread_PreNMIInternal(void);
+s32 func_800E6680(void);
+u32 AudioThread_NextRandom(void);
+void AudioThread_InitMesgQueues(void);
+
+void Audio_InvalDCache(void* buf, s32 size);
+void Audio_WritebackDCache(void* buf, s32 size);
+s32 osAiSetNextBuffer(void*, u32);
+void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs);
+void Audio_NoteSetResamplingRate(NoteSubEu* noteSubEu, f32 resamplingRateInput);
+void Audio_NoteInit(Note* note);
+void Audio_NoteDisable(Note* note);
+void Audio_ProcessNotes(void);
+TunedSample* Audio_GetInstrumentTunedSample(Instrument* instrument, s32 semitone);
+Instrument* Audio_GetInstrumentInner(s32 fontId, s32 instId);
+Drum* Audio_GetDrum(s32 fontId, s32 drumId);
+SoundEffect* Audio_GetSoundEffect(s32 fontId, s32 sfxId);
+s32 Audio_SetFontInstrument(s32 instrumentType, s32 fontId, s32 index, void* value);
+void Audio_SeqLayerDecayRelease(SequenceLayer* layer, s32 target);
+void Audio_SeqLayerNoteDecay(SequenceLayer* layer);
+void Audio_SeqLayerNoteRelease(SequenceLayer* layer);
+s32 Audio_BuildSyntheticWave(Note* note, SequenceLayer* layer, s32 waveId);
+void Audio_InitSyntheticWave(Note* note, SequenceLayer* layer);
+void Audio_InitNoteList(AudioListItem* list);
+void Audio_InitNoteLists(NotePool* pool);
+void Audio_InitNoteFreeList(void);
+void Audio_NotePoolClear(NotePool* pool);
+void Audio_NotePoolFill(NotePool* pool, s32 count);
+void Audio_AudioListPushFront(AudioListItem* list, AudioListItem* item);
+void Audio_AudioListRemove(AudioListItem* item);
+Note* Audio_FindNodeWithPrioLessThan(AudioListItem* list, s32 limit);
+void Audio_NoteInitForLayer(Note* note, SequenceLayer* layer);
+void func_800E82C0(Note* note, SequenceLayer* layer);
+void Audio_NoteReleaseAndTakeOwnership(Note* note, SequenceLayer* layer);
+Note* Audio_AllocNoteFromDisabled(NotePool* pool, SequenceLayer* layer);
+Note* Audio_AllocNoteFromDecaying(NotePool* pool, SequenceLayer* layer);
+Note* Audio_AllocNoteFromActive(NotePool* pool, SequenceLayer* layer);
+Note* Audio_AllocNote(SequenceLayer* layer);
+void Audio_NoteInitAll(void);
+void Audio_SequenceChannelProcessSound(SequenceChannel* channel, s32 recalculateVolume, s32 applyBend);
+void Audio_SequencePlayerProcessSound(SequencePlayer* seqPlayer);
+f32 Audio_GetPortamentoFreqScale(Portamento* portamento);
+s16 Audio_GetVibratoPitchChange(VibratoState* vib);
+f32 Audio_GetVibratoFreqScale(VibratoState* vib);
+void Audio_NoteVibratoUpdate(Note* note);
+void Audio_NoteVibratoInit(Note* note);
+void Audio_NotePortamentoInit(Note* note);
+void Audio_AdsrInit(AdsrState* adsr, EnvelopePoint* envelope, s16* volOut);
+f32 Audio_AdsrUpdate(AdsrState* adsr);
+void AudioSeq_SequenceChannelDisable(SequenceChannel* channel);
+void AudioSeq_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer);
+void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer);
+void AudioSeq_AudioListPushBack(AudioListItem* list, AudioListItem* item);
+void* AudioSeq_AudioListPopBack(AudioListItem* list);
+void AudioSeq_ProcessSequences(s32 arg0);
+void AudioSeq_SkipForwardSequence(SequencePlayer* seqPlayer);
+void AudioSeq_ResetSequencePlayer(SequencePlayer* seqPlayer);
+void AudioSeq_InitSequencePlayerChannels(s32 playerIdx);
+void AudioSeq_InitSequencePlayers(void);
+
+void AudioDebug_Draw(struct GfxPrint* printer);
+void AudioDebug_ScrPrt(const char* str, u16 num);
+void Audio_Update(void);
+void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex);
+void Audio_PlayCutsceneEffectsSequence(u8 csEffectType);
+void func_800F4010(Vec3f* pos, u16 sfxId, f32);
+void Audio_PlaySfxRandom(Vec3f* pos, u16 baseSfxId, u8 randLim);
+void func_800F4138(Vec3f* pos, u16 sfxId, f32);
+void func_800F4190(Vec3f* pos, u16 sfxId);
+void func_800F436C(Vec3f* pos, u16 sfxId, f32 arg2);
+void func_800F4414(Vec3f* pos, u16 sfxId, f32);
+void func_800F44EC(s8 arg0, s8 arg1);
+void func_800F4524(Vec3f* pos, u16 sfxId, s8 arg2);
+void func_800F4254(Vec3f* pos, u8 level);
+void Audio_PlaySfxRiver(Vec3f* pos, f32 freqScale);
+void Audio_PlaySfxWaterfall(Vec3f* pos, f32 freqScale);
+void Audio_SetBgmVolumeOffDuringFanfare(void);
+void Audio_SetBgmVolumeOnDuringFanfare(void);
+void Audio_SetMainBgmVolume(u8 targetVol, u8 volFadeTimer);
+void Audio_SetGanonsTowerBgmVolumeLevel(u8 ganonsTowerLevel);
+void Audio_LowerMainBgmVolume(u8 volume);
+void Audio_PlaySfxIncreasinglyTransposed(Vec3f* pos, s16 sfxId, u8* semitones);
+void Audio_ResetIncreasingTranspose(void);
+void Audio_PlaySfxTransposed(Vec3f* pos, u16 sfxId, s8 semitone);
+void func_800F4C58(Vec3f* pos, u16 sfxId, u8);
+void func_800F4E30(Vec3f* pos, f32);
+void Audio_ClearSariaBgm(void);
+void Audio_ClearSariaBgmAtPos(Vec3f* pos);
+void Audio_PlaySariaBgm(Vec3f* pos, u16 seqId, u16 distMax);
+void Audio_ClearSariaBgm2(void);
+void Audio_PlayMorningSceneSequence(u16 seqId);
+void Audio_PlaySceneSequence(u16 seqId);
+void Audio_SetMainBgmTempoFreqAfterFanfare(f32 scaleTempoAndFreq, u8 duration);
+void Audio_PlayWindmillBgm(void);
+void Audio_SetFastTempoForTimedMinigame(void);
+void Audio_PlaySequenceInCutscene(u16 seqId);
+void Audio_StopSequenceInCutscene(u16 seqId);
+s32 Audio_IsSequencePlaying(u16 seqId);
+void func_800F5ACC(u16 seqId);
+void func_800F5B58(void);
+void func_800F5BF0(u8 natureAmbienceId);
+void Audio_PlayFanfare(u16);
+void func_800F5C2C(void);
+void Audio_PlaySequenceWithSeqPlayerIO(u8 seqPlayerIndex, u16 seqId, u8 fadeInDuration, s8 ioPort, s8 ioData);
+void Audio_SetSequenceMode(u8 seqMode);
+void Audio_SetBgmEnemyVolume(f32 dist);
+void Audio_UpdateMalonSinging(f32 dist, u16 seqId);
+void func_800F64E0(u8 arg0);
+void Audio_ToggleMalonSinging(u8 malonSingingDisabled);
+void Audio_SetEnvReverb(s8 reverb);
+void Audio_SetCodeReverb(s8 reverb);
+void Audio_SetSoundOutputMode(s8 soundSetting);
+void Audio_SetBaseFilter(u8);
+void Audio_SetExtraFilter(u8);
+void Audio_SetCutsceneFlag(s8 flag);
+void Audio_PlaySfxIfNotInCutscene(u16 sfxId);
+void func_800F6964(u16);
+void Audio_StopBgmAndFanfare(u16 fadeOutDuration);
+void func_800F6B3C(void);
+void func_800F6BDC(void);
+void Audio_PreNMI(void);
+void Audio_SetNatureAmbienceChannelIO(u8 channelIdxRange, u8 ioPort, u8 ioData);
+void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId);
+void Audio_Init(void);
+void Audio_InitSound(void);
+void func_800F7170(void);
+void func_800F71BC(s32 arg0);
+
+extern s16* gWaveSamples[9];
+extern f32 gBendPitchOneOctaveFrequencies[256];
+extern f32 gBendPitchTwoSemitonesFrequencies[256];
+extern f32 gPitchFrequencies[];
+extern u8 gDefaultShortNoteVelocityTable[16];
+extern u8 gDefaultShortNoteGateTimeTable[16];
+extern EnvelopePoint gDefaultEnvelope[4];
+extern NoteSubEu gZeroNoteSub;
+extern NoteSubEu gDefaultNoteSub;
+extern u16 gHaasEffectDelaySizes[64];
+extern s16 D_8012FBA8[];
+extern f32 gHeadsetPanVolume[128];
+extern f32 gStereoPanVolume[128];
+extern f32 gDefaultPanVolume[128];
+extern s16 gLowPassFilterData[16 * 8];
+extern s16 gHighPassFilterData[15 * 8];
+extern s32 gAudioContextInitialized;
+extern u8 gIsLargeSfxBank[7];
+extern u8 gChannelsPerBank[4][7];
+extern u8 gUsedChannelsPerBank[4][7];
+extern u8 gMorphaTransposeTable[16];
+
+extern u8 gSeqCmdWritePos;
+extern u8 gSeqCmdReadPos;
+extern u8 gStartSeqDisabled;
+
+#if DEBUG_FEATURES
+extern u8 gAudioDebugPrintSeqCmd;
+#endif
+
+extern u8 gSoundOutputModes[];
+extern u8 gAudioSpecId;
+extern u8 D_80133418;
+extern AudioSpec gAudioSpecs[18];
+
+extern TempoData gTempoData;
+extern AudioHeapInitSizes gAudioHeapInitSizes;
+
+extern AudioTable gSequenceTable;
+extern AudioTable gSoundFontTable;
+extern u8 gSequenceFontTable[];
+extern AudioTable gSampleBankTable;
+
+extern ActiveSequence gActiveSeqs[4];
+extern AudioContext gAudioCtx;
+extern AudioCustomUpdateFunction gAudioCustomUpdateFunction;
+
#endif
diff --git a/include/z64bgcheck.h b/include/z64bgcheck.h
index d5364a24b3..eb7e9155d0 100644
--- a/include/z64bgcheck.h
+++ b/include/z64bgcheck.h
@@ -215,7 +215,7 @@ typedef enum ConveyorSpeed {
} ConveyorSpeed;
#define CONVEYOR_DIRECTION_TO_BINANG(conveyorDirection) ((conveyorDirection) * (0x10000 / 64))
-#define CONVEYOR_DIRECTION_FROM_BINANG(conveyorDirectionBinang) ((conveyorDirectionBinang) * (64 / 0x10000))
+#define CONVEYOR_DIRECTION_FROM_BINANG(conveyorDirectionBinang) ((conveyorDirectionBinang) / (0x10000 / 64))
#define SURFACETYPE0(bgCamIndex, exitIndex, floorType, unk18, wallType, floorProperty, isSoft, isHorseBlocked) \
((((bgCamIndex) & 0xFF) << 0) | \
@@ -361,4 +361,131 @@ typedef struct DynaLineTest {
/* 0x28 */ f32 chkDist; // distance from poly
} DynaLineTest;
+void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest);
+f32 CollisionPoly_GetPointDistanceFromPlane(CollisionPoly* poly, Vec3f* point);
+void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionContext* colCtx, Vec3f* dest);
+void BgCheck_Allocate(CollisionContext* colCtx, struct PlayState* play, CollisionHeader* colHeader);
+f32 BgCheck_EntityRaycastDown1(CollisionContext* colCtx, CollisionPoly** outGroundPoly, Vec3f* pos);
+f32 BgCheck_EntityRaycastDown2(struct PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly,
+ Vec3f* pos);
+f32 BgCheck_EntityRaycastDown3(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, Vec3f* pos);
+f32 BgCheck_EntityRaycastDown4(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, struct Actor* actor,
+ Vec3f* pos);
+f32 BgCheck_EntityRaycastDown5(struct PlayState* play, CollisionContext* colCtx, CollisionPoly** outGroundPoly,
+ s32* bgId, struct Actor* actor, Vec3f* pos);
+f32 BgCheck_EntityRaycastDown6(CollisionContext* colCtx, CollisionPoly** outGroundPoly, s32* bgId, struct Actor* actor,
+ Vec3f* pos, f32 chkDist);
+f32 BgCheck_EntityRaycastDown7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, struct Actor* actor,
+ Vec3f* pos);
+f32 BgCheck_AnyRaycastDown1(CollisionContext* colCtx, CollisionPoly* outGroundPoly, Vec3f* pos);
+f32 BgCheck_AnyRaycastDown2(CollisionContext* colCtx, CollisionPoly* outGroundPoly, s32* bgId, Vec3f* pos);
+f32 BgCheck_CameraRaycastDown2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
+f32 BgCheck_EntityRaycastDownWalls(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, struct Actor* actor,
+ Vec3f* pos);
+f32 BgCheck_EntityRaycastDown9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
+s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
+ CollisionPoly** outPoly, f32 checkHeight);
+s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
+ CollisionPoly** outPoly, s32* outBgId, f32 checkHeight);
+s32 BgCheck_EntitySphVsWall3(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
+ CollisionPoly** outPoly, s32* outBgId, struct Actor* actor, f32 checkHeight);
+s32 BgCheck_EntitySphVsWall4(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
+ CollisionPoly** outPoly, s32* outBgId, struct Actor* actor, f32 checkHeight);
+s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight);
+s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight,
+ CollisionPoly** outPoly, s32* outBgId, struct Actor* actor);
+s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
+ CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
+s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
+ CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
+s32 BgCheck_EntityLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
+ CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
+s32 BgCheck_EntityLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
+ CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId,
+ struct Actor* actor);
+s32 BgCheck_EntityLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
+ CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId,
+ struct Actor* actor, f32 chkDist);
+s32 BgCheck_ProjectileLineTest(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
+ CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace,
+ s32* bgId);
+s32 BgCheck_AnyLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
+ s32 chkOneFace);
+s32 BgCheck_AnyLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
+ s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace);
+s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
+ s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
+s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius);
+s32 DynaPoly_IsBgIdBgActor(s32 bgId);
+void DynaPoly_DisableCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
+void DynaPoly_EnableCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
+void DynaPoly_DisableCeilingCollision(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
+s32 DynaPoly_SetBgActor(struct PlayState* play, DynaCollisionContext* dyna, struct Actor* actor,
+ CollisionHeader* colHeader);
+struct DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId);
+void DynaPoly_DeleteBgActor(struct PlayState* play, DynaCollisionContext* dyna, s32 bgId);
+void DynaPoly_InvalidateLookup(struct PlayState* play, DynaCollisionContext* dyna);
+void DynaPoly_UnsetAllInteractFlags(struct PlayState* play, DynaCollisionContext* dyna, struct Actor* actor);
+void DynaPoly_UpdateContext(struct PlayState* play, DynaCollisionContext* dyna);
+void DynaPoly_UpdateBgActorTransforms(struct PlayState* play, DynaCollisionContext* dyna);
+void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest);
+void func_800418D0(CollisionContext* colCtx, struct PlayState* play);
+u32 SurfaceType_GetBgCamIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u16 BgCheck_GetBgCamSettingImpl(CollisionContext* colCtx, u32 bgCamIndex, s32 bgId);
+u16 BgCheck_GetBgCamSetting(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u16 BgCheck_GetBgCamCount(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+Vec3s* BgCheck_GetBgCamFuncDataImpl(CollisionContext* colCtx, s32 bgCamIndex, s32 bgId);
+Vec3s* BgCheck_GetBgCamFuncData(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_GetExitIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_GetFloorType(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 func_80041D70(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+s32 SurfaceType_GetWallFlags(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+s32 SurfaceType_CheckWallFlag0(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+s32 SurfaceType_CheckWallFlag1(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+s32 SurfaceType_CheckWallFlag2(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_GetFloorProperty(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_IsSoft(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_IsHorseBlocked(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_GetMaterial(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u16 SurfaceType_GetSfxOffset(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_GetFloorEffect(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_GetLightSetting(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_CanHookshot(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+s32 SurfaceType_IsIgnoredByEntities(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+s32 SurfaceType_IsIgnoredByProjectiles(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+s32 SurfaceType_IsFloorConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_GetConveyorSpeed(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 SurfaceType_GetConveyorDirection(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+u32 func_80042108(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
+s32 WaterBox_GetSurface1(struct PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
+ WaterBox** outWaterBox);
+s32 WaterBox_GetSurface2(struct PlayState* play, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist,
+ WaterBox** outWaterBox);
+s32 WaterBox_GetSurfaceImpl(struct PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
+ WaterBox** outWaterBox);
+u32 WaterBox_GetBgCamIndex(CollisionContext* colCtx, WaterBox* waterBox);
+u16 WaterBox_GetBgCamSetting(CollisionContext* colCtx, WaterBox* waterBox);
+u32 WaterBox_GetLightIndex(CollisionContext* colCtx, WaterBox* waterBox);
+s32 func_80042708(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* point, Vec3f* closestPoint);
+s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec3f* pointB, Vec3f* closestPoint);
+#if DEBUG_FEATURES
+void BgCheck_DrawDynaCollision(struct PlayState*, CollisionContext*);
+void BgCheck_DrawStaticCollision(struct PlayState*, CollisionContext*);
+#endif
+
+void func_80043334(CollisionContext* colCtx, struct Actor* actor, s32 bgId);
+s32 DynaPolyActor_TransformCarriedActor(CollisionContext* colCtx, s32 bgId, struct Actor* carriedActor);
+void DynaPolyActor_Init(struct DynaPolyActor* dynaActor, s32 transformFlags);
+void DynaPolyActor_UnsetAllInteractFlags(struct DynaPolyActor* dynaActor);
+void DynaPolyActor_SetActorOnTop(struct DynaPolyActor* dynaActor);
+void DynaPoly_SetPlayerOnTop(CollisionContext* colCtx, s32 floorBgId);
+void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 floorBgId);
+void DynaPolyActor_SetSwitchPressed(struct DynaPolyActor* dynaActor);
+s32 DynaPolyActor_IsActorOnTop(struct DynaPolyActor* dynaActor);
+s32 DynaPolyActor_IsPlayerOnTop(struct DynaPolyActor* dynaActor);
+s32 DynaPolyActor_IsPlayerAbove(struct DynaPolyActor* dynaActor);
+s32 DynaPolyActor_IsSwitchPressed(struct DynaPolyActor* dynaActor);
+s32 func_800435D8(struct PlayState* play, struct DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4);
+
#endif
diff --git a/include/z64camera.h b/include/z64camera.h
index ee28d87f1c..2fcbffdf5a 100644
--- a/include/z64camera.h
+++ b/include/z64camera.h
@@ -4,7 +4,9 @@
#include "ultra64.h"
#include "z64cutscene.h"
#include "z64math.h"
-#include "z64save.h"
+
+struct CollisionContext;
+struct View;
#define CAM_STAT_CUT 0
#define CAM_STAT_WAIT 1
@@ -98,7 +100,7 @@
#define CAM_STATE_CHECK_BG (1 << 2) // Must be set for the camera to change settings based on the bg surface
#define CAM_STATE_EXTERNAL_FINISHED (1 << 3) // Signal from the external systems to camera that the current cam-update function is no longer needed
#define CAM_STATE_CAM_FUNC_FINISH (1 << 4) // Signal from camera to player that the cam-update function is finished its primary purpose
-#define CAM_STATE_LOCK_MODE (1 << 5) // Prevents camera from changing mode, unless overriden by `forceModeChange` passed to `Camera_RequestModeImpl`
+#define CAM_STATE_LOCK_MODE (1 << 5) // Prevents camera from changing mode, unless overridden by `forceModeChange` passed to `Camera_RequestModeImpl`
#define CAM_STATE_DISTORTION (1 << 6) // Set when camera distortion is on
#define CAM_STATE_PLAY_INIT (1 << 7) // Set in Play_Init, never used or changed
#define CAM_STATE_CAMERA_IN_WATER (1 << 8) // Camera (eye) is underwater
@@ -794,7 +796,7 @@ typedef struct KeepOn3ReadOnlyData {
/* 0x00 */ f32 yOffset;
/* 0x04 */ f32 minDist;
/* 0x08 */ f32 maxDist;
- /* 0x0C */ f32 swingYawInital;
+ /* 0x0C */ f32 swingYawInitial;
/* 0x10 */ f32 swingYawFinal;
/* 0x14 */ f32 swingPitchInitial;
/* 0x18 */ f32 swingPitchFinal;
@@ -1182,7 +1184,7 @@ typedef struct Unique0ReadOnlyData {
} Unique0ReadOnlyData; // size = 0x4
typedef struct Unique0ReadWriteData {
- /* 0x00 */ Vec3f initalPos;
+ /* 0x00 */ Vec3f initialPos;
/* 0x0C */ s16 animTimer;
/* 0x10 */ InfiniteLine eyeAndDirection;
} Unique0ReadWriteData; // size = 0x28
@@ -1407,7 +1409,7 @@ typedef struct Special0 {
{ interfaceField, CAM_DATA_INTERFACE_FIELD }
typedef struct Special4ReadWriteData {
- /* 0x0 */ s16 initalTimer;
+ /* 0x0 */ s16 initialTimer;
} Special4ReadWriteData; // size = 0x4
typedef struct Special4 {
@@ -1469,7 +1471,7 @@ typedef struct Special6ReadOnlyData {
} Special6ReadOnlyData; // size = 0x4
typedef struct Special6ReadWriteData {
- /* 0x0 */ f32 initalPlayerY;
+ /* 0x0 */ f32 initialPlayerY;
/* 0x4 */ s16 animTimer;
} Special6ReadWriteData; // size = 0x8
@@ -1619,81 +1621,36 @@ typedef struct Camera {
/* 0x16A */ s16 unk_16A;
} Camera; // size = 0x16C
-/**
- * Debug Camera
-*/
+extern s32 gDebugCamEnabled;
-typedef struct DebugCamSub {
- /* 0x0000 */ s16 mode;
- /* 0x0002 */ s16 nFrames;
- /* 0x0004 */ s16 nPoints;
- /* 0x0006 */ s16 unkIdx;
- /* 0x0008 */ s16 unk_08;
- /* 0x000A */ s16 unk_0A;
- /* 0x000C */ s32 unk_0C; // bool: indicates position vs lookAt?
- /* 0x0010 */ char unk_10[0x14];
- /* 0x0024 */ CutsceneCameraPoint position[129];
- /* 0x0834 */ CutsceneCameraPoint lookAt[129];
- /* 0x1044 */ s16 demoCtrlMenu;
- /* 0x1046 */ s16 demoCtrlActionIdx; // e (?), s (save), l (load), c (clear)
- /* 0x1048 */ s16 demoCtrlToggleSwitch;
- /* 0x104A */ Vec3s unk_104A;
-} DebugCamSub; // size = 0x1050
-
-typedef struct DebugCam {
- /* 0x00 */ s32 unk_00;
- /* 0x04 */ Vec3f at;
- /* 0x10 */ Vec3f eye;
- /* 0x1C */ Vec3f unk_1C;
- /* 0x28 */ char unk_28[0xC];
- /* 0x34 */ s32 unk_34;
- /* 0x38 */ s32 unk_38;
- /* 0x3C */ s32 unk_3C; // bool
- /* 0x40 */ s32 unk_40;
- /* 0x44 */ s32 unk_44;
- /* 0x48 */ f32 fov;
- /* 0x4C */ s16 roll;
- /* 0x4E */ char unk_4E[0x2];
- /* 0x50 */ f32 rollDegrees;
- /* 0x54 */ Vec3f unk_54;
- /* 0x60 */ Vec3f unk_60;
- /* 0x6C */ Vec3f unk_6C;
- /* 0x78 */ s16 unk_78;
- /* 0x7A */ s16 unk_7A;
- /* 0x7C */ DebugCamSub sub;
-} DebugCam; // size = 0x10CC
-
-typedef struct DebugCamCut {
- /* 0x00 */ char letter;
- /* 0x01 */ u8 unk_01;
- /* 0x02 */ s16 mode;
- /* 0x04 */ CutsceneCameraPoint* position;
- /* 0x08 */ CutsceneCameraPoint* lookAt;
- /* 0x0C */ s16 nFrames;
- /* 0x0E */ s16 nPoints;
-} DebugCamCut; // size = 0x10
-
-typedef struct DebugCamAnim {
- /* 0x00 */ f32 curFrame;
- /* 0x04 */ f32 unk_04; // frame count?
- /* 0x08 */ s16 keyframe;
- /* 0x0A */ s16 unk_0A;
- /* 0x0C */ s16 unk_0C;
- /* 0x10 */ Vec3f positionPos; // confusing name
- /* 0x1C */ Vec3f lookAtPos;
- /* 0x28 */ f32 roll;
- /* 0x2C */ f32 fov;
-} DebugCamAnim; // size = 0x30
-
-typedef enum DebugCamTextColor {
- /* 0 */ DEBUG_CAM_TEXT_YELLOW,
- /* 1 */ DEBUG_CAM_TEXT_PEACH,
- /* 2 */ DEBUG_CAM_TEXT_BROWN,
- /* 3 */ DEBUG_CAM_TEXT_ORANGE,
- /* 4 */ DEBUG_CAM_TEXT_GOLD,
- /* 5 */ DEBUG_CAM_TEXT_WHITE,
- /* 6 */ DEBUG_CAM_TEXT_BLUE,
- /* 7 */ DEBUG_CAM_TEXT_GREEN
-} DebugCamTextColor;
+void Camera_Init(Camera* camera, struct View* view, struct CollisionContext* colCtx, struct PlayState* play);
+void Camera_InitDataUsingPlayer(Camera* camera, struct Player* player);
+s16 Camera_ChangeStatus(Camera* camera, s16 status);
+Vec3s Camera_Update(Camera* camera);
+void Camera_Finish(Camera* camera);
+s32 Camera_RequestMode(Camera* camera, s16 mode);
+s32 Camera_CheckValidMode(Camera* camera, s16 mode);
+s32 Camera_RequestSetting(Camera* camera, s16 setting);
+s32 Camera_RequestBgCam(Camera* camera, s32 requestedBgCamIndex);
+s16 Camera_GetInputDirYaw(Camera* camera);
+Vec3s Camera_GetCamDir(Camera* camera);
+s16 Camera_GetCamDirPitch(Camera* camera);
+s16 Camera_GetCamDirYaw(Camera* camera);
+s32 Camera_RequestQuake(Camera* camera, s32 unused, s16 y, s32 duration);
+s32 Camera_SetViewParam(Camera* camera, s32 viewFlag, void* param);
+s32 Camera_OverwriteStateFlags(Camera* camera, s16 stateFlags);
+s16 Camera_SetStateFlag(Camera* camera, s16 stateFlag);
+s16 Camera_UnsetStateFlag(Camera* camera, s16 stateFlag);
+s32 Camera_ResetAnim(Camera* camera);
+s32 Camera_SetCSParams(Camera* camera, CutsceneCameraPoint* atPoints, CutsceneCameraPoint* eyePoints,
+ struct Player* player, s16 relativeToPlayer);
+s32 Camera_ChangeDoorCam(Camera* camera, struct Actor* doorActor, s16 bgCamIndex, f32 arg3, s16 timer1, s16 timer2,
+ s16 timer3);
+s32 Camera_Copy(Camera* dstCamera, Camera* srcCamera);
+Vec3f Camera_GetQuakeOffset(Camera* camera);
+void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* data1, s16 data2, s16 data3,
+ UNK_TYPE arg6);
+s32 func_8005B198(void);
+s16 Camera_SetFinishedFlag(Camera* camera);
#endif
diff --git a/include/z64collision_check.h b/include/z64collision_check.h
index 1b96c4a46e..2c27563766 100644
--- a/include/z64collision_check.h
+++ b/include/z64collision_check.h
@@ -471,7 +471,7 @@ typedef struct CollisionCheckInfo {
DamageTable* DamageTable_Get(s32 index);
void DamageTable_Clear(DamageTable* table);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void Collider_DrawRedPoly(struct GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC);
void Collider_DrawPoly(struct GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC, u8 r, u8 g, u8 b);
#endif
@@ -522,7 +522,7 @@ void CollisionCheck_DestroyContext(struct PlayState* play, CollisionCheckContext
void CollisionCheck_ClearContext(struct PlayState* play, CollisionCheckContext* colChkCtx);
void CollisionCheck_EnableSAC(struct PlayState* play, CollisionCheckContext* colChkCtx);
void CollisionCheck_DisableSAC(struct PlayState* play, CollisionCheckContext* colChkCtx);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void Collider_Draw(struct PlayState* play, Collider* col);
void CollisionCheck_DrawCollision(struct PlayState* play, CollisionCheckContext* colChkCtx);
#endif
diff --git a/include/z64curve.h b/include/z64curve.h
index 2f35aec967..3ca0eac132 100644
--- a/include/z64curve.h
+++ b/include/z64curve.h
@@ -1,10 +1,10 @@
#ifndef Z64_CURVE_H
#define Z64_CURVE_H
-#include "ultra64/ultratypes.h"
-#include "z64math.h"
+#include "ultra64.h"
struct PlayState;
+struct Actor;
typedef struct CurveInterpKnot {
/* 0x0 */ u16 flags; // Only the bottom two bits are used, although others are set in objects
@@ -56,7 +56,7 @@ void SkelCurve_Destroy(struct PlayState* play, SkelCurve* skelCurve);
void SkelCurve_SetAnim(SkelCurve* skelCurve, CurveAnimationHeader* animation, f32 arg2, f32 endFrame, f32 curFrame,
f32 playSpeed);
s32 SkelCurve_Update(struct PlayState* play, SkelCurve* skelCurve);
-void SkelCurve_Draw(Actor* actor, struct PlayState* play, SkelCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw,
+void SkelCurve_Draw(struct Actor* actor, struct PlayState* play, SkelCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw,
PostCurveLimbDraw postLimbDraw, s32 lod, void* data);
#endif
diff --git a/include/z64cutscene.h b/include/z64cutscene.h
index 627da47e51..f8aed368d4 100644
--- a/include/z64cutscene.h
+++ b/include/z64cutscene.h
@@ -4,6 +4,8 @@
#include "ultra64.h"
#include "z64math.h"
+struct PlayState;
+
typedef union CutsceneData {
s32 i;
f32 f;
@@ -20,6 +22,7 @@ typedef enum CutsceneState {
} CutsceneState;
typedef enum CutsceneCmd {
+ /* 0xFFFF */ CS_CMD_END_OF_SCRIPT = -1,
/* 0x0001 */ CS_CMD_CAM_EYE_SPLINE = 0x01,
/* 0x0002 */ CS_CMD_CAM_AT_SPLINE,
/* 0x0003 */ CS_CMD_MISC,
@@ -147,8 +150,7 @@ typedef enum CutsceneCmd {
/* 0x008E */ CS_CMD_ACTOR_CUE_7_6,
/* 0x008F */ CS_CMD_ACTOR_CUE_9_0,
/* 0x0090 */ CS_CMD_ACTOR_CUE_0_17,
- /* 0x03E8 */ CS_CMD_DESTINATION = 0x03E8,
- /* 0xFFFF */ CS_CMD_END = 0xFFFF
+ /* 0x03E8 */ CS_CMD_DESTINATION = 0x03E8
} CutsceneCmd;
typedef enum CutsceneMiscType {
@@ -172,8 +174,8 @@ typedef enum CutsceneMiscType {
/* 0x11 */ CS_MISC_QUAKE_STOP,
/* 0x12 */ CS_MISC_STOP_STORM_AND_ADVANCE_TO_DAY,
/* 0x13 */ CS_MISC_SET_FLAG_FAST_WINDMILL,
- /* 0x14 */ CS_MISC_SET_FLAG_WELL_DRAINED,
- /* 0x15 */ CS_MISC_SET_FLAG_LAKE_HYLIA_RESTORED,
+ /* 0x14 */ CS_MISC_SET_FLAG_DRAINED_WELL,
+ /* 0x15 */ CS_MISC_SET_FLAG_RESTORED_LAKE_HYLIA,
/* 0x16 */ CS_MISC_VISMONO_BLACK_AND_WHITE,
/* 0x17 */ CS_MISC_VISMONO_SEPIA,
/* 0x18 */ CS_MISC_HIDE_ROOM,
@@ -297,8 +299,8 @@ typedef enum CutsceneDestination {
/* 0x4A */ CS_DEST_LON_LON_RANCH_CREDITS_PART_2,
/* 0x4B */ CS_DEST_LON_LON_RANCH_CREDITS_PART_3,
/* 0x4C */ CS_DEST_LON_LON_RANCH_CREDITS_PART_4,
- /* 0x4D */ CS_DEST_LON_LON_RANCH_CREDITS_PART_5,
- /* 0x4E */ CS_DEST_LON_LON_RANCH_CREDITS_PART_6,
+ /* 0x4D */ CS_DEST_LON_LON_RANCH_CREDITS_PART_6,
+ /* 0x4E */ CS_DEST_LON_LON_RANCH_CREDITS_PART_5,
/* 0x4F */ CS_DEST_LON_LON_RANCH_1, // unused
/* 0x50 */ CS_DEST_LON_LON_RANCH_2, // unused
/* 0x51 */ CS_DEST_LON_LON_RANCH_3, // unused
@@ -513,4 +515,21 @@ typedef struct CutsceneContext {
/* 0x28 */ CsCmdActorCue* actorCues[10]; // "npcdemopnt"
} CutsceneContext; // size = 0x50
+extern u8 gUseCutsceneCam;
+extern u16 D_8015FCCC;
+extern char D_8015FCD0[20];
+extern u8 D_8015FCE4;
+extern u16 gCamAtSplinePointsAppliedFrame;
+extern u16 gCamEyePointAppliedFrame;
+extern u16 gCamAtPointAppliedFrame;
+
+void Cutscene_InitContext(struct PlayState* play, CutsceneContext* csCtx);
+void Cutscene_StartManual(struct PlayState* play, CutsceneContext* csCtx);
+void Cutscene_StopManual(struct PlayState* play, CutsceneContext* csCtx);
+void Cutscene_UpdateManual(struct PlayState* play, CutsceneContext* csCtx);
+void Cutscene_UpdateScripted(struct PlayState* play, CutsceneContext* csCtx);
+void Cutscene_HandleEntranceTriggers(struct PlayState* play);
+void Cutscene_HandleConditionalTriggers(struct PlayState* play);
+void Cutscene_SetScript(struct PlayState* play, void* script);
+
#endif
diff --git a/include/z64cutscene_commands.h b/include/z64cutscene_commands.h
index 5de3d3c835..f0c8146cd1 100644
--- a/include/z64cutscene_commands.h
+++ b/include/z64cutscene_commands.h
@@ -37,9 +37,10 @@
#endif
/**
- * Marks the beginning of a cutscene script.
+ * Describes the length and the total number of command entries for a cutscene script.
+ * Required at the beginning of every script.
*/
-#define CS_BEGIN_CUTSCENE(totalEntries, frameCount) CMD_W(totalEntries), CMD_W(frameCount)
+#define CS_HEADER(totalEntries, frameCount) CMD_W(totalEntries), CMD_W(frameCount)
/**
* Defines data for `CutsceneCameraPoint`, which can be used with any of the `eye` or `at` camera commands.
@@ -267,9 +268,9 @@
CS_CMD_DESTINATION, 1, CMD_HH(destination, startFrame), CMD_HH(endFrame, endFrame)
/**
- * Marks the end of a cutscene script.
+ * Marks the end of a command list in a cutscene script. Processing for the current frame will finish.
*/
-#define CS_END() 0xFFFFFFFF, 0x00000000
+#define CS_END_OF_SCRIPT() CS_CMD_END_OF_SCRIPT, CMD_W(0)
// most instances of this look like unimplemented actor cues.
diff --git a/include/z64cutscene_flags.h b/include/z64cutscene_flags.h
new file mode 100644
index 0000000000..5a3c7c2a7a
--- /dev/null
+++ b/include/z64cutscene_flags.h
@@ -0,0 +1,13 @@
+#ifndef Z64CUTSCENE_FLAGS_H
+#define Z64CUTSCENE_FLAGS_H
+
+#include "ultra64.h"
+
+struct PlayState;
+
+void CutsceneFlags_UnsetAll(struct PlayState* play);
+void CutsceneFlags_Set(struct PlayState* play, s16 flag);
+void CutsceneFlags_Unset(struct PlayState* play, s16 flag);
+s32 CutsceneFlags_Get(struct PlayState* play, s16 flag);
+
+#endif
diff --git a/include/z64cutscene_spline.h b/include/z64cutscene_spline.h
new file mode 100644
index 0000000000..3a73949453
--- /dev/null
+++ b/include/z64cutscene_spline.h
@@ -0,0 +1,12 @@
+#ifndef Z64CUTSCENE_SPLINE_H
+#define Z64CUTSCENE_SPLINE_H
+
+#include "ultra64.h"
+#include "z64math.h"
+
+union CutsceneCameraPoint;
+
+void func_800BB0A0(f32 u, Vec3f* pos, f32* roll, f32* viewAngle, f32* point0, f32* point1, f32* point2, f32* point3);
+s32 func_800BB2B4(Vec3f* pos, f32* roll, f32* fov, union CutsceneCameraPoint* point, s16* keyFrame, f32* curFrame);
+
+#endif
diff --git a/include/z64debug.h b/include/z64debug.h
new file mode 100644
index 0000000000..0e2c7334ee
--- /dev/null
+++ b/include/z64debug.h
@@ -0,0 +1,17 @@
+#ifndef Z64DEBUG_H
+#define Z64DEBUG_H
+
+#include "ultra64.h"
+
+struct GraphicsContext;
+struct Input;
+
+void Regs_Init(void);
+void DebugCamera_ScreenText(u8 x, u8 y, const char* text);
+void DebugCamera_ScreenTextColored(u8 x, u8 y, u8 colorIndex, const char* text);
+#if DEBUG_FEATURES
+void Regs_UpdateEditor(struct Input* input);
+#endif
+void Debug_DrawText(struct GraphicsContext* gfxCtx);
+
+#endif
diff --git a/include/z64debug_display.h b/include/z64debug_display.h
new file mode 100644
index 0000000000..9cb1198067
--- /dev/null
+++ b/include/z64debug_display.h
@@ -0,0 +1,27 @@
+#ifndef Z64_DEBUG_DISPLAY_H
+#define Z64_DEBUG_DISPLAY_H
+
+#include "ultra64.h"
+#include "z64math.h"
+#include "color.h"
+
+struct GraphicsContext;
+struct PlayState;
+
+typedef struct DebugDispObject {
+ /* 0x00 */ Vec3f pos;
+ /* 0x0C */ Vec3s rot;
+ /* 0x14 */ Vec3f scale;
+ /* 0x20 */ Color_RGBA8 color;
+ /* 0x24 */ s16 type;
+ /* 0x28 */ struct DebugDispObject* next;
+} DebugDispObject; // size = 0x2C
+
+void DebugDisplay_Init(void);
+DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, f32 scaleX,
+ f32 scaleY, f32 scaleZ, u8 red, u8 green, u8 blue, u8 alpha, s16 type,
+ struct GraphicsContext* gfxCtx);
+void DebugDisplay_DrawObjects(struct PlayState* play);
+
+
+#endif
diff --git a/include/z64dma.h b/include/z64dma.h
index aab5556d7c..10968517bc 100755
--- a/include/z64dma.h
+++ b/include/z64dma.h
@@ -34,7 +34,7 @@ extern size_t gDmaMgrDmaBuffSize;
s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size, u32 unk5, OSMesgQueue* queue,
OSMesg msg);
s32 DmaMgr_RequestSync(void* ram, uintptr_t vrom, size_t size);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 DmaMgr_RequestAsyncDebug(DmaRequest* req, void* ram, uintptr_t vrom, size_t size, u32 unk5, OSMesgQueue* queue,
OSMesg msg, const char* file, int line);
s32 DmaMgr_RequestSyncDebug(void* ram, uintptr_t vrom, size_t size, const char* file, int line);
@@ -50,4 +50,12 @@ s32 DmaMgr_AudioDmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction);
void DmaMgr_Init(void);
+#if DEBUG_FEATURES
+#define DMA_REQUEST_SYNC(ram, vrom, size, file, line) DmaMgr_RequestSyncDebug(ram, vrom, size, file, line)
+#define DMA_REQUEST_ASYNC(req, ram, vrom, size, unk5, queue, msg, file, line) DmaMgr_RequestAsyncDebug(req, ram, vrom, size, unk5, queue, msg, file, line)
+#else
+#define DMA_REQUEST_SYNC(ram, vrom, size, file, line) DmaMgr_RequestSync(ram, vrom, size)
+#define DMA_REQUEST_ASYNC(req, ram, vrom, size, unk5, queue, msg, file, line) DmaMgr_RequestAsync(req, ram, vrom, size, unk5, queue, msg)
+#endif
+
#endif
diff --git a/include/z64draw.h b/include/z64draw.h
new file mode 100644
index 0000000000..51250ed8c8
--- /dev/null
+++ b/include/z64draw.h
@@ -0,0 +1,10 @@
+#ifndef Z64_DRAW_H
+#define Z64_DRAW_H
+
+#include "ultra64.h"
+
+struct PlayState;
+
+void GetItem_Draw(struct PlayState* play, s16 drawId);
+
+#endif
diff --git a/include/z64effect.h b/include/z64effect.h
index d21f2cb53d..0c07cc5124 100644
--- a/include/z64effect.h
+++ b/include/z64effect.h
@@ -2,7 +2,11 @@
#define Z64EFFECT_H
#include "color.h"
+#include "romfile.h"
+#include "z64light.h"
+#include "z64math.h"
+struct Actor;
struct GraphicsContext;
struct PlayState;
@@ -218,7 +222,7 @@ typedef struct EffectSs {
/* 0x28 */ EffectSsDrawFunc draw;
/* 0x2C */ Vec3f vec; // usage specific per effect
/* 0x38 */ void* gfx; // mostly used for display lists, sometimes textures
- /* 0x3C */ Actor* actor; // interfacing actor, usually the actor that spawned the effect
+ /* 0x3C */ struct Actor* actor; // interfacing actor, usually the actor that spawned the effect
/* 0x40 */ s16 regs[13]; // specific per effect
/* 0x5A */ u16 flags;
/* 0x5C */ s16 life; // -1 means this entry is free
@@ -258,4 +262,182 @@ typedef enum EffectSsType {
#undef DEFINE_EFFECT_SS
#undef DEFINE_EFFECT_SS_UNSET
+extern EffectSsOverlay gEffectSsOverlayTable[EFFECT_SS_TYPE_MAX];
+
+void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2);
+void EffectBlure_AddSpace(EffectBlure* this);
+void EffectBlure_Init1(void* thisx, void* initParamsx);
+void EffectBlure_Init2(void* thisx, void* initParamsx);
+void EffectBlure_Destroy(void* thisx);
+s32 EffectBlure_Update(void* thisx);
+void EffectBlure_Draw(void* thisx, struct GraphicsContext* gfxCtx);
+void EffectShieldParticle_Init(void* thisx, void* initParamsx);
+void EffectShieldParticle_Destroy(void* thisx);
+s32 EffectShieldParticle_Update(void* thisx);
+void EffectShieldParticle_Draw(void* thisx, struct GraphicsContext* gfxCtx);
+void EffectSpark_Init(void* thisx, void* initParamsx);
+void EffectSpark_Destroy(void* thisx);
+s32 EffectSpark_Update(void* thisx);
+void EffectSpark_Draw(void* thisx, struct GraphicsContext* gfxCtx);
+void func_80026230(struct PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
+void func_80026400(struct PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
+void func_80026608(struct PlayState* play);
+void func_80026690(struct PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
+void func_80026860(struct PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3);
+void func_80026A6C(struct PlayState* play);
+struct PlayState* Effect_GetPlayState(void);
+void* Effect_GetByIndex(s32 index);
+void Effect_InitContext(struct PlayState* play);
+void Effect_Add(struct PlayState* play, s32* pIndex, s32 type, u8 arg3, u8 arg4, void* initParams);
+void Effect_DrawAll(struct GraphicsContext* gfxCtx);
+void Effect_UpdateAll(struct PlayState* play);
+void Effect_Delete(struct PlayState* play, s32 index);
+void Effect_DeleteAll(struct PlayState* play);
+void EffectSs_InitInfo(struct PlayState* play, s32 tableSize);
+void EffectSs_ClearAll(struct PlayState* play);
+void EffectSs_Delete(EffectSs* effectSs);
+void EffectSs_Reset(EffectSs* effectSs);
+void EffectSs_Insert(struct PlayState* play, EffectSs* effectSs);
+void EffectSs_Spawn(struct PlayState* play, s32 type, s32 priority, void* initParams);
+void EffectSs_UpdateAll(struct PlayState* play);
+void EffectSs_DrawAll(struct PlayState* play);
+s16 EffectSs_LerpInv(s16 a, s16 b, s32 weightInv);
+s16 EffectSs_LerpS16(s16 a, s16 b, f32 weight);
+u8 EffectSs_LerpU8(u8 a, u8 b, f32 weight);
+void EffectSs_DrawGEffect(struct PlayState* play, EffectSs* this, void* texture);
+void EffectSsDust_Spawn(struct PlayState* play, u16 drawFlags, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life,
+ u8 updateMode);
+void func_8002829C(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep);
+void func_80028304(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep);
+void func_8002836C(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
+void func_800283D4(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
+void func_8002843C(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
+void func_800284A4(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep);
+void func_80028510(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep);
+void func_8002857C(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
+void func_800285EC(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
+void func_8002865C(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
+void func_800286CC(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
+void func_8002873C(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
+ s16 life);
+void func_800287AC(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
+ s16 life);
+void func_8002881C(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor);
+void func_80028858(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor);
+void func_80028990(struct PlayState* play, f32 randScale, Vec3f* srcPos);
+void func_80028A54(struct PlayState* play, f32 randScale, Vec3f* srcPos);
+void EffectSsKiraKira_SpawnSmallYellow(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
+void EffectSsKiraKira_SpawnSmall(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor);
+void EffectSsKiraKira_SpawnDispersed(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
+void EffectSsKiraKira_SpawnFocused(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
+void EffectSsBomb_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
+void EffectSsBomb2_SpawnFade(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
+void EffectSsBomb2_SpawnLayered(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
+ s16 scaleStep);
+void EffectSsBlast_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* innerColor,
+ Color_RGBA8* outerColor, s16 scale, s16 scaleStep, s16 scaleStepDecay, s16 life);
+void EffectSsBlast_SpawnWhiteShockwaveSetScale(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ s16 scale, s16 scaleStep, s16 life);
+void EffectSsBlast_SpawnShockwaveSetColor(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* innerColor, Color_RGBA8* outerColor, s16 life);
+void EffectSsBlast_SpawnWhiteShockwave(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
+void EffectSsGSpk_SpawnAccel(struct PlayState* play, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
+void EffectSsGSpk_SpawnNoAccel(struct PlayState* play, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
+void EffectSsGSpk_SpawnFuse(struct PlayState* play, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
+void EffectSsGSpk_SpawnRandColor(struct PlayState* play, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ s16 scale, s16 scaleStep);
+void EffectSsGSpk_SpawnSmall(struct PlayState* play, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor);
+void EffectSsDFire_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
+ s16 alpha, s16 fadeDelay, s32 life);
+void EffectSsDFire_SpawnFixedScale(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 alpha,
+ s16 fadeDelay);
+void EffectSsBubble_Spawn(struct PlayState* play, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale,
+ f32 scale);
+void EffectSsGRipple_Spawn(struct PlayState* play, Vec3f* pos, s16 radius, s16 radiusMax, s16 life);
+void EffectSsGSplash_Spawn(struct PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type,
+ s16 scale);
+void EffectSsGMagma_Spawn(struct PlayState* play, Vec3f* pos);
+void EffectSsGFire_Spawn(struct PlayState* play, Vec3f* pos);
+void EffectSsLightning_Spawn(struct PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
+ s16 scale, s16 yaw, s16 life, s16 numBolts);
+void EffectSsDtBubble_SpawnColorProfile(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
+ s16 life, s16 colorProfile, s16 randXZ);
+void EffectSsDtBubble_SpawnCustomColor(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
+void EffectSsHahen_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale,
+ s16 objId, s16 life, Gfx* dList);
+void EffectSsHahen_SpawnBurst(struct PlayState* play, Vec3f* pos, f32 burstScale, s16 unused, s16 scale,
+ s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
+void EffectSsStick_Spawn(struct PlayState* play, Vec3f* pos, s16 yaw);
+void EffectSsSibuki_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 moveDelay,
+ s16 direction, s16 scale);
+void EffectSsSibuki_SpawnBurst(struct PlayState* play, Vec3f* pos);
+void EffectSsSibuki2_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
+void EffectSsGMagma2_Spawn(struct PlayState* play, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
+ s16 updateRate, s16 drawMode, s16 scale);
+void EffectSsStone1_Spawn(struct PlayState* play, Vec3f* pos, s32 arg2);
+void EffectSsHitMark_Spawn(struct PlayState* play, s32 type, s16 scale, Vec3f* pos);
+void EffectSsHitMark_SpawnFixedScale(struct PlayState* play, s32 type, Vec3f* pos);
+void EffectSsHitMark_SpawnCustomScale(struct PlayState* play, s32 type, s16 scale, Vec3f* pos);
+void EffectSsFhgFlash_SpawnLightBall(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
+ u8 param);
+void EffectSsFhgFlash_SpawnShock(struct PlayState* play, struct Actor* actor, Vec3f* pos, s16 scale, u8 param);
+void EffectSsKFire_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scaleMax, u8 type);
+void EffectSsSolderSrchBall_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused,
+ s16* linkDetected);
+void EffectSsKakera_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5,
+ s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx,
+ s16 objId, Gfx* dList);
+void EffectSsIcePiece_Spawn(struct PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, s32 life);
+void EffectSsIcePiece_SpawnBurst(struct PlayState* play, Vec3f* refPos, f32 scale);
+void EffectSsEnIce_SpawnFlyingVec3f(struct PlayState* play, struct Actor* actor, Vec3f* pos, s16 primR, s16 primG,
+ s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, f32 scale);
+void EffectSsEnIce_SpawnFlyingVec3s(struct PlayState* play, struct Actor* actor, Vec3s* pos, s16 primR, s16 primG,
+ s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, f32 scale);
+void EffectSsEnIce_Spawn(struct PlayState* play, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life);
+void EffectSsFireTail_Spawn(struct PlayState* play, struct Actor* actor, Vec3f* pos, f32 scale, Vec3f* arg4, s16 arg5,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 bodyPart, s32 life);
+void EffectSsFireTail_SpawnFlame(struct PlayState* play, struct Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart,
+ f32 colorIntensity);
+void EffectSsFireTail_SpawnFlameOnPlayer(struct PlayState* play, f32 scale, s16 bodyPart, f32 colorIntensity);
+void EffectSsEnFire_SpawnVec3f(struct PlayState* play, struct Actor* actor, Vec3f* pos, s16 scale, s16 arg4, s16 flags,
+ s16 bodyPart);
+void EffectSsEnFire_SpawnVec3s(struct PlayState* play, struct Actor* actor, Vec3s* pos, s16 scale, s16 arg4, s16 flags,
+ s16 bodyPart);
+void EffectSsExtra_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIdx);
+void EffectSsFCircle_Spawn(struct PlayState* play, struct Actor* actor, Vec3f* pos, s16 radius, s16 height);
+void EffectSsDeadDb_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
+ s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, s16 unused,
+ s32 arg14, s16 playSfx);
+void EffectSsDeadDd_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
+ s16 primR, s16 primG, s16 primB, s16 alpha, s16 envR, s16 envG, s16 envB, s16 alphaStep,
+ s32 life);
+void EffectSsDeadDd_SpawnRandYellow(struct PlayState* play, Vec3f* pos, s16 scale, s16 scaleStep, f32 randPosScale,
+ s32 randIter, s32 life);
+void EffectSsDeadDs_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
+ s16 alpha, s32 life);
+void EffectSsDeadDs_SpawnStationary(struct PlayState* play, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha, s32 life);
+void EffectSsDeadSound_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, u16 sfxId,
+ s16 lowerPriority, s16 repeatMode, s32 life);
+void EffectSsDeadSound_SpawnStationary(struct PlayState* play, Vec3f* pos, u16 sfxId, s16 lowerPriority, s16 repeatMode,
+ s32 life);
+void EffectSsIceSmoke_Spawn(struct PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
+
#endif
diff --git a/include/z64environment.h b/include/z64environment.h
index 79d34bbff5..4c4bc770cd 100644
--- a/include/z64environment.h
+++ b/include/z64environment.h
@@ -5,8 +5,12 @@
#include "z64light.h"
#include "z64dma.h"
+struct GameOverContext;
+struct MessageContext;
+struct PauseContext;
struct PlayState;
struct SkyboxContext;
+struct View;
#define FILL_SCREEN_OPA (1 << 0)
#define FILL_SCREEN_XLU (1 << 1)
@@ -238,7 +242,61 @@ extern u8 gLightConfigAfterUnderwater;
extern u8 gInterruptSongOfStorms;
extern u16 gTimeSpeed;
+extern LightningStrike gLightningStrike;
+// TODO: These variables are here for BSS ordering but ideally they should not
+// be extern. This could be fixed by putting more stuff (e.g. struct definitions)
+// between gLightningStrike and gCustomLensFlareOn.
+extern s16 sLightningFlashAlpha;
+extern s16 sSunDepthTestX;
+extern s16 sSunDepthTestY;
+extern u8 gCustomLensFlareOn;
+extern Vec3f gCustomLensFlarePos;
+extern s16 gLensFlareScale;
+extern f32 gLensFlareColorIntensity;
+extern s16 gLensFlareGlareStrength;
+
void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, struct SkyboxContext* skyboxCtx);
void Environment_DrawSkyboxFilters(struct PlayState* play);
+s32 Environment_ZBufValToFixedPoint(s32 zBufferVal);
+u16 Environment_GetPixelDepth(s32 x, s32 y);
+void Environment_GraphCallback(struct GraphicsContext* gfxCtx, void* param);
+void Environment_Init(struct PlayState* play2, EnvironmentContext* envCtx, s32 unused);
+u8 Environment_SmoothStepToU8(u8* pvalue, u8 target, u8 scale, u8 step, u8 minStep);
+u8 Environment_SmoothStepToS8(s8* pvalue, s8 target, u8 scale, u8 step, u8 minStep);
+f32 Environment_LerpWeight(u16 max, u16 min, u16 val);
+f32 Environment_LerpWeightAccelDecel(u16 endFrame, u16 startFrame, u16 curFrame, u16 accelDuration, u16 decelDuration);
+void Environment_EnableUnderwaterLights(struct PlayState* play, s32 waterLightsIndex);
+void Environment_DisableUnderwaterLights(struct PlayState* play);
+void Environment_Update(struct PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx,
+ struct PauseContext* pauseCtx, struct MessageContext* msgCtx,
+ struct GameOverContext* gameOverCtx, struct GraphicsContext* gfxCtx);
+void Environment_DrawSunAndMoon(struct PlayState* play);
+void Environment_DrawSunLensFlare(struct PlayState* play, EnvironmentContext* envCtx, struct View* view,
+ struct GraphicsContext* gfxCtx, Vec3f pos, s32 unused);
+void Environment_DrawLensFlare(struct PlayState* play, EnvironmentContext* envCtx, struct View* view,
+ struct GraphicsContext* gfxCtx, Vec3f pos, s32 unused, s16 scale, f32 colorIntensity,
+ s16 glareStrength, u8 isSun);
+void Environment_DrawRain(struct PlayState* play, struct View* view, struct GraphicsContext* gfxCtx);
+void Environment_ChangeLightSetting(struct PlayState* play, u32 lightSetting);
+void Environment_UpdateLightningStrike(struct PlayState* play);
+void Environment_AddLightningBolts(struct PlayState* play, u8 num);
+void Environment_DrawLightning(struct PlayState* play, s32 unused);
+void Environment_PlaySceneSequence(struct PlayState* play);
+void Environment_DrawCustomLensFlare(struct PlayState* play);
+void Environment_InitGameOverLights(struct PlayState* play);
+void Environment_FadeInGameOverLights(struct PlayState* play);
+void Environment_FadeOutGameOverLights(struct PlayState* play);
+void Environment_FillScreen(struct GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue, u8 alpha, u8 drawFlags);
+void Environment_DrawSandstorm(struct PlayState* play, u8 sandstormState);
+void Environment_AdjustLights(struct PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
+s32 Environment_GetBgsDayCount(void);
+void Environment_ClearBgsDayCount(void);
+s32 Environment_GetTotalDays(void);
+void Environment_ForcePlaySequence(u16 seqId);
+s32 Environment_IsForcedSequenceDisabled(void);
+void Environment_PlayStormNatureAmbience(struct PlayState* play);
+void Environment_StopStormNatureAmbience(struct PlayState* play);
+void Environment_WarpSongLeave(struct PlayState* play);
+
#endif
diff --git a/include/z64face_reaction.h b/include/z64face_reaction.h
new file mode 100644
index 0000000000..274340ebcb
--- /dev/null
+++ b/include/z64face_reaction.h
@@ -0,0 +1,74 @@
+#ifndef Z64FACE_REACTION_H
+#define Z64FACE_REACTION_H
+
+#include "ultra64.h"
+
+struct PlayState;
+
+typedef enum MaskReactionSet {
+ /* 0x00 */ MASK_REACTION_SET_CARPENTER_BOSS,
+ /* 0x01 */ MASK_REACTION_SET_CARPENTER_1,
+ /* 0x02 */ MASK_REACTION_SET_CARPENTER_2,
+ /* 0x03 */ MASK_REACTION_SET_CARPENTER_3,
+ /* 0x04 */ MASK_REACTION_SET_CARPENTER_4,
+ /* 0x05 */ MASK_REACTION_SET_HYRULIAN_GUARD,
+ /* 0x06 */ MASK_REACTION_SET_HEISHI4_1,
+ /* 0x07 */ MASK_REACTION_SET_HEISHI4_2,
+ /* 0x08 */ MASK_REACTION_SET_CUCCO_LADY,
+ /* 0x09 */ MASK_REACTION_SET_CARPENTERS_SON,
+ /* 0x0A */ MASK_REACTION_SET_KAKARIKO_ROOF_MAN,
+ /* 0x0B */ MASK_REACTION_SET_WINDMILL_MAN,
+ /* 0x0C */ MASK_REACTION_SET_12, // Unused
+ /* 0x0D */ MASK_REACTION_SET_CURSED_SKULLTULA_MAN,
+ /* 0x0E */ MASK_REACTION_SET_DAMPE,
+ /* 0x0F */ MASK_REACTION_SET_GRAVEYARD_KID,
+ /* 0x10 */ MASK_REACTION_SET_SARIA,
+ /* 0x11 */ MASK_REACTION_SET_MIDO,
+ /* 0x12 */ MASK_REACTION_SET_FADO,
+ /* 0x13 */ MASK_REACTION_SET_KOKIRI_1,
+ /* 0x14 */ MASK_REACTION_SET_KOKIRI_2,
+ /* 0x15 */ MASK_REACTION_SET_SKULL_KID,
+ /* 0x16 */ MASK_REACTION_SET_ZELDA,
+ /* 0x17 */ MASK_REACTION_SET_MALON,
+ /* 0x18 */ MASK_REACTION_SET_TALON,
+ /* 0x19 */ MASK_REACTION_SET_INGO,
+ /* 0x1A */ MASK_REACTION_SET_LAKESIDE_PROFESSOR,
+ /* 0x1B */ MASK_REACTION_SET_MAGIC_BEAN_SALESMAN,
+ /* 0x1C */ MASK_REACTION_SET_RUNNING_MAN,
+ /* 0x1D */ MASK_REACTION_SET_ZORA,
+ /* 0x1E */ MASK_REACTION_SET_KING_ZORA,
+ /* 0x1F */ MASK_REACTION_SET_RUTO,
+ /* 0x20 */ MASK_REACTION_SET_GORON,
+ /* 0x21 */ MASK_REACTION_SET_DARUNIA,
+ /* 0x22 */ MASK_REACTION_SET_GERUDO_WHITE,
+ /* 0x23 */ MASK_REACTION_SET_NABOORU,
+ /* 0x24 */ MASK_REACTION_SET_DANCING_COUPLE,
+ /* 0x25 */ MASK_REACTION_SET_DOG_LADY,
+ /* 0x26 */ MASK_REACTION_SET_WOMAN_3,
+ /* 0x27 */ MASK_REACTION_SET_MAN_1_BEARD,
+ /* 0x28 */ MASK_REACTION_SET_MAN_2_BALD,
+ /* 0x29 */ MASK_REACTION_SET_MAN_1_SHAVED_BLACK_SHIRT,
+ /* 0x2A */ MASK_REACTION_SET_BEGGAR,
+ /* 0x2B */ MASK_REACTION_SET_OLD_WOMAN,
+ /* 0x2C */ MASK_REACTION_SET_OLD_MAN,
+ /* 0x2D */ MASK_REACTION_SET_YOUNG_WOMAN_BROWN_HAIR,
+ /* 0x2E */ MASK_REACTION_SET_MAN_2_MUSTACHE_RED_SHIRT,
+ /* 0x2F */ MASK_REACTION_SET_MAN_2_MUSTACHE_BLUE_SHIRT,
+ /* 0x30 */ MASK_REACTION_SET_YOUNG_WOMAN_ORANGE_HAIR,
+ /* 0x31 */ MASK_REACTION_SET_MAN_2_ALT_MUSTACHE,
+ /* 0x32 */ MASK_REACTION_SET_MAN_1_BOWL_CUT_PURPLE_SHIRT,
+ /* 0x33 */ MASK_REACTION_SET_MAN_2_BEARD,
+ /* 0x34 */ MASK_REACTION_SET_OLD_MAN_BALD_BROWN_ROBE,
+ /* 0x35 */ MASK_REACTION_SET_MAN_2_MUSTACHE_WHITE_SHIRT,
+ /* 0x36 */ MASK_REACTION_SET_MAN_1_SHAVED_GREEN_SHIRT,
+ /* 0x37 */ MASK_REACTION_SET_WOMAN_2,
+ /* 0x38 */ MASK_REACTION_SET_OLD_MAN_BALD_PURPLE_ROBE,
+ /* 0x39 */ MASK_REACTION_SET_MAN_1_BOWL_CUT_GREEN_SHIRT,
+ /* 0x3A */ MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_1,
+ /* 0x3B */ MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_2,
+ /* 0x3C */ MASK_REACTION_SET_MAX
+} MaskReactionSet;
+
+u16 MaskReaction_GetTextId(struct PlayState* play, u32 maskReactionSet);
+
+#endif
diff --git a/include/z64font.h b/include/z64font.h
new file mode 100644
index 0000000000..72f97fddd6
--- /dev/null
+++ b/include/z64font.h
@@ -0,0 +1,41 @@
+#ifndef Z64FONT_H
+#define Z64FONT_H
+
+#include "ultra64.h"
+
+// TODO get these properties from the textures themselves
+#define FONT_CHAR_TEX_WIDTH 16
+#define FONT_CHAR_TEX_HEIGHT 16
+#define FONT_CHAR_TEX_SIZE ((FONT_CHAR_TEX_WIDTH * FONT_CHAR_TEX_HEIGHT) / 2) // 16x16 I4 texture
+
+typedef struct Font {
+ /* 0x0000 */ u32 msgOffset;
+ /* 0x0004 */ u32 msgLength;
+ union {
+ /* 0x0008 */ u8 charTexBuf[FONT_CHAR_TEX_SIZE * 120];
+ /* 0x0008 */ u64 force_structure_alignment_charTex;
+ };
+ union {
+ /* 0x3C08 */ u8 iconBuf[FONT_CHAR_TEX_SIZE];
+ /* 0x3C08 */ u64 force_structure_alignment_icon;
+ };
+ union {
+ /* 0x3C88 */ u8 fontBuf[FONT_CHAR_TEX_SIZE * 320];
+ /* 0x3C88 */ u64 force_structure_alignment_font;
+ };
+ union {
+ /* 0xDC88 */ u8 msgBuf[1280];
+ /* 0xDC88 */ u16 msgBufWide[640];
+ /* 0xDC88 */ u64 force_structure_alignment_msg;
+ };
+} Font; // size = 0xE188
+
+#if PLATFORM_IQUE
+void Font_LoadCharCHN(Font* font, u16 character, u16 codePointIndex);
+#endif
+void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex);
+void Font_LoadChar(Font* font, u8 character, u16 codePointIndex);
+void Font_LoadMessageBoxIcon(Font* font, u16 icon);
+void Font_LoadOrderedFont(Font* font);
+
+#endif
diff --git a/include/z64game.h b/include/z64game.h
index 3b50cfd362..aaf70be321 100644
--- a/include/z64game.h
+++ b/include/z64game.h
@@ -3,33 +3,11 @@
// This file is named "game" after game.c for now, this may change later with the system name
#include "ultra64/ultratypes.h"
-#include "padmgr.h"
+#include "libu64/pad.h"
+#include "gamealloc.h"
#include "tha.h"
struct GraphicsContext;
-
-typedef struct GameAllocEntry {
- /* 0x00 */ struct GameAllocEntry* next;
- /* 0x04 */ struct GameAllocEntry* prev;
- /* 0x08 */ u32 size;
- /* 0x0C */ u32 unk_0C;
-} GameAllocEntry; // size = 0x10
-
-typedef struct GameAlloc {
- /* 0x00 */ GameAllocEntry base;
- /* 0x10 */ GameAllocEntry* head;
-} GameAlloc; // size = 0x14
-
-// Used in Graph_GetNextGameState in graph.c
-#define DEFINE_GAMESTATE_INTERNAL(typeName, enumName) enumName,
-#define DEFINE_GAMESTATE(typeName, enumName, name) DEFINE_GAMESTATE_INTERNAL(typeName, enumName)
-typedef enum GameStateId {
-#include "tables/gamestate_table.h"
- GAMESTATE_ID_MAX
-} GameStateId;
-#undef DEFINE_GAMESTATE
-#undef DEFINE_GAMESTATE_INTERNAL
-
struct GameState;
typedef void (*GameStateFunc)(struct GameState* gameState);
@@ -48,4 +26,27 @@ typedef struct GameState {
/* 0xA0 */ u32 inPreNMIState;
} GameState; // size = 0xA4
+#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
+ if (1) { \
+ GameState* state = curState; \
+ \
+ (state)->init = newInit; \
+ (state)->size = sizeof(newStruct); \
+ } (void)0
+
+void GameState_ReqPadData(GameState* gameState);
+void GameState_Update(GameState* gameState);
+void GameState_InitArena(GameState* gameState, size_t size);
+void GameState_Realloc(GameState* gameState, size_t size);
+void GameState_Init(GameState* gameState, GameStateFunc init, struct GraphicsContext* gfxCtx);
+void GameState_Destroy(GameState* gameState);
+GameStateFunc GameState_GetInit(GameState* gameState);
+u32 GameState_IsRunning(GameState* gameState);
+#if DEBUG_FEATURES
+void* GameState_Alloc(GameState* gameState, size_t size, const char* file, int line);
+#define GAME_STATE_ALLOC(gameState, size, file, line) GameState_Alloc(gameState, size, file, line)
+#else
+#define GAME_STATE_ALLOC(gameState, size, file, line) THA_AllocTailAlign16(&(gameState)->tha, size)
+#endif
+
#endif
diff --git a/include/z64horse.h b/include/z64horse.h
new file mode 100644
index 0000000000..d58de4b6d4
--- /dev/null
+++ b/include/z64horse.h
@@ -0,0 +1,16 @@
+#ifndef Z64HORSE_H
+#define Z64HORSE_H
+
+#include "ultra64.h"
+#include "z64math.h"
+
+struct PlayState;
+struct Actor;
+struct Player;
+
+void Horse_ResetHorseData(struct PlayState* play);
+void Horse_FixLakeHyliaPosition(struct PlayState* play);
+void Horse_InitPlayerHorse(struct PlayState* play, struct Player* player);
+void Horse_RotateToPoint(struct Actor* actor, Vec3f* pos, s16 turnAmount);
+
+#endif
diff --git a/include/z64interface.h b/include/z64interface.h
index e9284499ab..bfa3bffeb3 100644
--- a/include/z64interface.h
+++ b/include/z64interface.h
@@ -1,6 +1,7 @@
#ifndef Z64INTERFACE_H
#define Z64INTERFACE_H
+#include "ultra64.h"
#include "z64dma.h"
#include "z64view.h"
@@ -80,7 +81,7 @@ typedef struct InterfaceContext {
/* 0x0134 */ u8* doActionSegment;
/* 0x0138 */ u8* iconItemSegment;
/* 0x013C */ u8* mapSegment;
- /* 0x0140 */ u8 mapPalette[32];
+ /* 0x0140 */ char mapPalette[32];
/* 0x0160 */ DmaRequest dmaRequest_160;
/* 0x0180 */ DmaRequest dmaRequest_180;
/* 0x01A0 */ char unk_1A0[0x20];
@@ -278,4 +279,7 @@ void Interface_Update(struct PlayState* play);
void Interface_Destroy(struct PlayState* play);
void Interface_Init(struct PlayState* play);
+extern s16 gSpoilingItems[3];
+extern s16 gSpoilingItemReverts[3];
+
#endif
diff --git a/include/z64inventory.h b/include/z64inventory.h
new file mode 100644
index 0000000000..8c1a5a90d8
--- /dev/null
+++ b/include/z64inventory.h
@@ -0,0 +1,25 @@
+#ifndef Z64INVENTORY_H
+#define Z64INVENTORY_H
+
+#include "ultra64.h"
+#include "z64item.h"
+
+struct PlayState;
+
+void Inventory_ChangeEquipment(s16 equipment, u16 value);
+u8 Inventory_DeleteEquipment(struct PlayState* play, s16 equipment);
+void Inventory_ChangeUpgrade(s16 upgrade, s16 value);
+
+extern u32 gBitFlags[32];
+extern u16 gEquipMasks[EQUIP_TYPE_MAX];
+extern u16 gEquipNegMasks[EQUIP_TYPE_MAX];
+extern u32 gUpgradeMasks[UPG_MAX];
+extern u8 gEquipShifts[EQUIP_TYPE_MAX];
+extern u8 gUpgradeShifts[UPG_MAX];
+extern u16 gUpgradeCapacities[UPG_MAX][4];
+extern u32 gGsFlagsMasks[4];
+extern u32 gGsFlagsShifts[4];
+extern void* gItemIcons[0x82];
+extern u8 gItemSlots[56];
+
+#endif
diff --git a/include/z64item.h b/include/z64item.h
index 28c2aa1903..60344f326c 100644
--- a/include/z64item.h
+++ b/include/z64item.h
@@ -113,7 +113,8 @@ typedef enum QuestItem {
/* 0x15 */ QUEST_STONE_OF_AGONY,
/* 0x16 */ QUEST_GERUDOS_CARD,
/* 0x17 */ QUEST_SKULL_TOKEN,
- /* 0x1C */ QUEST_HEART_PIECE_COUNT = 0x1C
+ /* 0x18 */ QUEST_HEART_PIECE, // for `pauseCtx->cursorPoint[PAUSE_QUEST]`
+ /* 0x1C */ QUEST_HEART_PIECE_COUNT = 0x1C // for accessing the `Inventory.questItems` bitfield
} QuestItem;
typedef enum DungeonItem {
diff --git a/include/z64lifemeter.h b/include/z64lifemeter.h
new file mode 100644
index 0000000000..29b2656b88
--- /dev/null
+++ b/include/z64lifemeter.h
@@ -0,0 +1,14 @@
+#ifndef Z64LIFEMETER_H
+#define Z64LIFEMETER_H
+
+#include "ultra64/ultratypes.h"
+
+struct PlayState;
+
+void Health_InitMeter(struct PlayState* play);
+void Health_UpdateMeter(struct PlayState* play);
+void Health_DrawMeter(struct PlayState* play);
+void Health_UpdateBeatingHeart(struct PlayState* play);
+u32 Health_IsCritical(void);
+
+#endif
diff --git a/include/z64light.h b/include/z64light.h
index cb666ff752..ff6f732e12 100644
--- a/include/z64light.h
+++ b/include/z64light.h
@@ -4,7 +4,6 @@
#include "ultra64.h"
#include "ultra64/gbi.h"
#include "z64math.h"
-#include "color.h"
struct GraphicsContext;
struct PlayState;
diff --git a/include/z64map_mark.h b/include/z64map_mark.h
index 0c55efa3ae..b566491118 100644
--- a/include/z64map_mark.h
+++ b/include/z64map_mark.h
@@ -3,6 +3,8 @@
#include "ultra64.h"
+struct PlayState;
+
#define MAP_MARK_NONE -1
#define MAP_MARK_CHEST 0
#define MAP_MARK_BOSS 1
@@ -20,6 +22,10 @@ typedef struct MapMarkIconData {
typedef MapMarkIconData MapMarkData[3]; // size = 0x72
+void MapMark_Init(struct PlayState* play);
+void MapMark_ClearPointers(struct PlayState* play);
+void MapMark_Draw(struct PlayState* play);
+
extern MapMarkData* gMapMarkDataTable[];
#endif
diff --git a/include/z64math.h b/include/z64math.h
index 95a494a693..187d95b250 100644
--- a/include/z64math.h
+++ b/include/z64math.h
@@ -1,11 +1,8 @@
#ifndef Z64MATH_H
#define Z64MATH_H
-#include "ultra64.h"
#include "math.h"
-
-#define SQ(x) ((x)*(x))
-#define VEC_SET(V,X,Y,Z) (V).x=(X);(V).y=(Y);(V).z=(Z)
+#include "ultra64.h"
typedef union FloatInt {
f32 f;
@@ -95,6 +92,27 @@ typedef VecSphGeo VecSph;
// Pitch is 0 along the xz-plane (horizon)
typedef VecSphGeo VecGeo;
+/**
+ * Macros
+ */
+
+// General number macros
+#define SQ(x) ((x)*(x))
+#define ABS(x) ((x) >= 0 ? (x) : -(x))
+#define DECR(x) ((x) == 0 ? 0 : --(x))
+#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
+#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
+#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
+
+#define SWAP(type, a, b) \
+ { \
+ type _temp = (a); \
+ (a) = (b); \
+ (b) = _temp; \
+ } \
+ (void)0
+
+// LERP macros
#define LERP(x, y, scale) (((y) - (x)) * (scale) + (x))
#define LERP32(x, y, scale) ((s32)(((y) - (x)) * (scale)) + (x))
#define LERP16(x, y, scale) ((s16)(((y) - (x)) * (scale)) + (x))
@@ -110,6 +128,7 @@ typedef VecSphGeo VecGeo;
(dst)->z = (v0)->z + (((v1)->z - (v0)->z) * t); \
}
+// Floating point macros
#define IS_ZERO(f) (fabsf(f) < 0.008f)
// Casting a float to an integer, when the float value is larger than what the integer type can hold,
@@ -145,6 +164,7 @@ typedef VecSphGeo VecGeo;
#define CAM_BINANG_TO_DEG(binang) ((f32)(binang) * (360.0001525f / 65535.0f))
// Vector macros
+#define VEC_SET(V,X,Y,Z) (V).x=(X);(V).y=(Y);(V).z=(Z)
#define SQXZ(vec) ((vec).x * (vec).x + (vec).z * (vec).z)
#define DOTXZ(vec1, vec2) ((vec1).x * (vec2).x + (vec1).z * (vec2).z)
#define SQXYZ(vec) ((vec).x * (vec).x + (vec).y * (vec).y + (vec).z * (vec).z)
diff --git a/include/z64message.h b/include/z64message.h
index 609f737fb7..3dfa196d97 100644
--- a/include/z64message.h
+++ b/include/z64message.h
@@ -3,6 +3,7 @@
#include "z64view.h"
#include "versions.h"
+#include "z64font.h"
struct OcarinaStaff;
struct Actor;
@@ -14,11 +15,6 @@ typedef enum TextBoxIcon {
/* 2 */ TEXTBOX_ICON_ARROW
} TextBoxIcon;
-// TODO get these properties from the textures themselves
-#define FONT_CHAR_TEX_WIDTH 16
-#define FONT_CHAR_TEX_HEIGHT 16
-#define FONT_CHAR_TEX_SIZE ((FONT_CHAR_TEX_WIDTH * FONT_CHAR_TEX_HEIGHT) / 2) // 16x16 I4 texture
-
// TODO get these properties from the textures themselves
#define MESSAGE_STATIC_TEX_SIZE 0x1000
@@ -115,70 +111,6 @@ typedef enum MessageMode {
/* 0x37 */ MSGMODE_PAUSED // Causes the message system to do nothing until external code sets a new message mode or calls a public function
} MessageMode;
-typedef enum MaskReactionSet {
- /* 0x00 */ MASK_REACTION_SET_CARPENTER_BOSS,
- /* 0x01 */ MASK_REACTION_SET_CARPENTER_1,
- /* 0x02 */ MASK_REACTION_SET_CARPENTER_2,
- /* 0x03 */ MASK_REACTION_SET_CARPENTER_3,
- /* 0x04 */ MASK_REACTION_SET_CARPENTER_4,
- /* 0x05 */ MASK_REACTION_SET_HYRULIAN_GUARD,
- /* 0x06 */ MASK_REACTION_SET_HEISHI4_1,
- /* 0x07 */ MASK_REACTION_SET_HEISHI4_2,
- /* 0x08 */ MASK_REACTION_SET_CUCCO_LADY,
- /* 0x09 */ MASK_REACTION_SET_CARPENTERS_SON,
- /* 0x0A */ MASK_REACTION_SET_KAKARIKO_ROOF_MAN,
- /* 0x0B */ MASK_REACTION_SET_WINDMILL_MAN,
- /* 0x0C */ MASK_REACTION_SET_12, // Unused
- /* 0x0D */ MASK_REACTION_SET_CURSED_SKULLTULA_MAN,
- /* 0x0E */ MASK_REACTION_SET_DAMPE,
- /* 0x0F */ MASK_REACTION_SET_GRAVEYARD_KID,
- /* 0x10 */ MASK_REACTION_SET_SARIA,
- /* 0x11 */ MASK_REACTION_SET_MIDO,
- /* 0x12 */ MASK_REACTION_SET_FADO,
- /* 0x13 */ MASK_REACTION_SET_KOKIRI_1,
- /* 0x14 */ MASK_REACTION_SET_KOKIRI_2,
- /* 0x15 */ MASK_REACTION_SET_SKULL_KID,
- /* 0x16 */ MASK_REACTION_SET_ZELDA,
- /* 0x17 */ MASK_REACTION_SET_MALON,
- /* 0x18 */ MASK_REACTION_SET_TALON,
- /* 0x19 */ MASK_REACTION_SET_INGO,
- /* 0x1A */ MASK_REACTION_SET_LAKESIDE_PROFESSOR,
- /* 0x1B */ MASK_REACTION_SET_MAGIC_BEAN_SALESMAN,
- /* 0x1C */ MASK_REACTION_SET_RUNNING_MAN,
- /* 0x1D */ MASK_REACTION_SET_ZORA,
- /* 0x1E */ MASK_REACTION_SET_KING_ZORA,
- /* 0x1F */ MASK_REACTION_SET_RUTO,
- /* 0x20 */ MASK_REACTION_SET_GORON,
- /* 0x21 */ MASK_REACTION_SET_DARUNIA,
- /* 0x22 */ MASK_REACTION_SET_GERUDO_WHITE,
- /* 0x23 */ MASK_REACTION_SET_NABOORU,
- /* 0x24 */ MASK_REACTION_SET_DANCING_COUPLE,
- /* 0x25 */ MASK_REACTION_SET_37, // ENHY_TYPE_AOB
- /* 0x26 */ MASK_REACTION_SET_38, // ENHY_TYPE_COB
- /* 0x27 */ MASK_REACTION_SET_39, // ENHY_TYPE_AHG_2
- /* 0x28 */ MASK_REACTION_SET_40, // ENHY_TYPE_BOJ_3
- /* 0x29 */ MASK_REACTION_SET_41, // ENHY_TYPE_AHG_4
- /* 0x2A */ MASK_REACTION_SET_42, // ENHY_TYPE_BOJ_5
- /* 0x2B */ MASK_REACTION_SET_43, // ENHY_TYPE_BBA
- /* 0x2C */ MASK_REACTION_SET_44, // ENHY_TYPE_BJI_7
- /* 0x2D */ MASK_REACTION_SET_45, // ENHY_TYPE_CNE_8
- /* 0x2E */ MASK_REACTION_SET_46, // ENHY_TYPE_BOJ_9
- /* 0x2F */ MASK_REACTION_SET_47, // ENHY_TYPE_BOJ_10
- /* 0x30 */ MASK_REACTION_SET_48, // ENHY_TYPE_CNE_11
- /* 0x31 */ MASK_REACTION_SET_49, // ENHY_TYPE_BOJ_12
- /* 0x32 */ MASK_REACTION_SET_50, // ENHY_TYPE_AHG_13
- /* 0x33 */ MASK_REACTION_SET_51, // ENHY_TYPE_BOJ_14
- /* 0x34 */ MASK_REACTION_SET_52, // ENHY_TYPE_BJI_15
- /* 0x35 */ MASK_REACTION_SET_53, // ENHY_TYPE_BOJ_16
- /* 0x36 */ MASK_REACTION_SET_54, // ENHY_TYPE_AHG_17
- /* 0x37 */ MASK_REACTION_SET_55, // ENHY_TYPE_BOB_18
- /* 0x38 */ MASK_REACTION_SET_56, // ENHY_TYPE_BJI_19
- /* 0x39 */ MASK_REACTION_SET_57, // ENHY_TYPE_AHG_20
- /* 0x3A */ MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_1,
- /* 0x3B */ MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_2,
- /* 0x3C */ MASK_REACTION_SET_MAX
-} MaskReactionSet;
-
typedef enum TextState {
/* 0 */ TEXT_STATE_NONE,
/* 1 */ TEXT_STATE_DONE_HAS_NEXT,
@@ -193,28 +125,6 @@ typedef enum TextState {
/* 10 */ TEXT_STATE_AWAITING_NEXT
} TextState;
-typedef struct Font {
- /* 0x0000 */ u32 msgOffset;
- /* 0x0004 */ u32 msgLength;
- union {
- /* 0x0008 */ u8 charTexBuf[FONT_CHAR_TEX_SIZE * 120];
- /* 0x0008 */ u64 force_structure_alignment_charTex;
- };
- union {
- /* 0x3C08 */ u8 iconBuf[FONT_CHAR_TEX_SIZE];
- /* 0x3C08 */ u64 force_structure_alignment_icon;
- };
- union {
- /* 0x3C88 */ u8 fontBuf[FONT_CHAR_TEX_SIZE * 320];
- /* 0x3C88 */ u64 force_structure_alignment_font;
- };
- union {
- /* 0xDC88 */ char msgBuf[1280];
- /* 0xDC88 */ u16 msgBufWide[640];
- /* 0xDC88 */ u64 force_structure_alignment_msg;
- };
-} Font; // size = 0xE188
-
#define TEXTBOX_ENDTYPE_DEFAULT 0x00
#define TEXTBOX_ENDTYPE_2_CHOICE 0x10
#define TEXTBOX_ENDTYPE_3_CHOICE 0x20
@@ -255,7 +165,7 @@ typedef struct MessageContext {
/* 0xE3E4 */ u8 textboxEndType; // original name : "select"
/* 0xE3E5 */ u8 choiceIndex;
/* 0xE3E6 */ u8 choiceNum; // textboxes that are not choice textboxes have a choiceNum of 1
- /* 0xE3E7 */ u8 stateTimer;
+ /* 0xE3E7 */ char stateTimer;
/* 0xE3E8 */ u16 textDelayTimer;
/* 0xE3EA */ u16 textDelay;
/* 0xE3EA */ u16 lastPlayedSong; // original references : "Ocarina_Flog" , "Ocarina_Free"
@@ -293,4 +203,6 @@ void Message_Update(struct PlayState* play);
void Message_SetTables(void);
void Message_Init(struct PlayState* play);
+extern s16 gOcarinaSongItemMap[];
+
#endif
diff --git a/include/z64object.h b/include/z64object.h
index e74b1793d1..016eda00d7 100644
--- a/include/z64object.h
+++ b/include/z64object.h
@@ -4,6 +4,8 @@
#include "ultra64.h"
#include "z64dma.h"
+struct PlayState;
+
typedef struct ObjectEntry {
/* 0x00 */ s16 id;
/* 0x04 */ void* segment;
@@ -35,4 +37,13 @@ typedef enum ObjectId {
#undef DEFINE_OBJECT_EMPTY
#undef DEFINE_OBJECT_UNSET
+void Object_InitContext(struct PlayState* play, ObjectContext* objectCtx);
+void Object_UpdateEntries(ObjectContext* objectCtx);
+s32 Object_GetSlot(ObjectContext* objectCtx, s16 objectId);
+s32 Object_IsLoaded(ObjectContext* objectCtx, s32 slot);
+void func_800981B8(ObjectContext* objectCtx);
+
+extern u32 gObjectTableSize;
+extern RomFile gObjectTable[OBJECT_ID_MAX];
+
#endif
diff --git a/include/z64ocarina.h b/include/z64ocarina.h
index 917b1b83f4..d00ef01f2b 100644
--- a/include/z64ocarina.h
+++ b/include/z64ocarina.h
@@ -177,4 +177,20 @@ typedef struct OcarinaStaff {
/* 0x2 */ u8 pos; // "locate"
} OcarinaStaff; // size = 0x3
+void AudioOcarina_Start(u16 ocarinaFlags);
+void AudioOcarina_SetInstrument(u8 ocarinaInstrumentId);
+void AudioOcarina_SetPlaybackSong(s8 songIndexPlusOne, s8 playbackState);
+void AudioOcarina_SetRecordingState(u8 recordingState);
+OcarinaStaff* AudioOcarina_GetRecordingStaff(void);
+OcarinaStaff* AudioOcarina_GetPlayingStaff(void);
+OcarinaStaff* AudioOcarina_GetPlaybackStaff(void);
+void AudioOcarina_MemoryGameInit(u8 minigameRound);
+s32 AudioOcarina_MemoryGameNextNote(void);
+void AudioOcarina_PlayLongScarecrowSong(void);
+
+extern u8* gFrogsSongPtr;
+extern OcarinaNote* gScarecrowLongSongPtr;
+extern u8* gScarecrowSpawnSongPtr;
+extern OcarinaSongButtons gOcarinaSongButtons[];
+
#endif
diff --git a/include/z64olib.h b/include/z64olib.h
new file mode 100644
index 0000000000..1b704b0e69
--- /dev/null
+++ b/include/z64olib.h
@@ -0,0 +1,17 @@
+#ifndef Z64OLIB_H
+#define Z64OLIB_H
+
+#include "z64math.h"
+
+f32 OLib_Vec3fDist(Vec3f* a, Vec3f* b);
+f32 OLib_Vec3fDistXZ(Vec3f* a, Vec3f* b);
+f32 OLib_ClampMinDist(f32 val, f32 min);
+f32 OLib_ClampMaxDist(f32 val, f32 max);
+Vec3f OLib_Vec3fDistNormalize(Vec3f* a, Vec3f* b);
+Vec3f OLib_VecGeoToVec3f(VecGeo* geo);
+VecSph OLib_Vec3fToVecSph(Vec3f* vec);
+VecGeo OLib_Vec3fToVecGeo(Vec3f* vec);
+VecGeo OLib_Vec3fDiffToVecGeo(Vec3f* a, Vec3f* b);
+Vec3f OLib_Vec3fDiffRad(Vec3f* a, Vec3f* b);
+
+#endif
diff --git a/include/z64path.h b/include/z64path.h
new file mode 100644
index 0000000000..0f9243974a
--- /dev/null
+++ b/include/z64path.h
@@ -0,0 +1,19 @@
+#ifndef Z64PATH_H
+#define Z64PATH_H
+
+#include "ultra64.h"
+#include "z64math.h"
+
+struct PlayState;
+struct Actor;
+
+typedef struct Path {
+ /* 0x00 */ u8 count; // number of points in the path
+ /* 0x04 */ Vec3s* points; // Segment Address to the array of points
+} Path; // size = 0x8
+
+Path* Path_GetByIndex(struct PlayState* play, s16 index, s16 max);
+f32 Path_OrientAndGetDistSq(struct Actor* actor, Path* path, s16 waypoint, s16* yaw);
+void Path_CopyLastPoint(Path* path, Vec3f* dest);
+
+#endif
diff --git a/include/z64pause.h b/include/z64pause.h
index c9485a1e20..da0e56038a 100644
--- a/include/z64pause.h
+++ b/include/z64pause.h
@@ -50,6 +50,8 @@ typedef enum PauseMenuPage {
#define PAUSE_EQUIP_PLAYER_WIDTH 64
#define PAUSE_EQUIP_PLAYER_HEIGHT 112
+#define PAUSE_EQUIP_PLAYER_FRAG_HEIGHT (TMEM_SIZE / (PAUSE_EQUIP_PLAYER_WIDTH * G_IM_SIZ_16b_BYTES))
+#define PAUSE_EQUIP_PLAYER_FRAG_NUM (((PAUSE_EQUIP_PLAYER_HEIGHT - 1) / PAUSE_EQUIP_PLAYER_FRAG_HEIGHT) + 1)
#define PAUSE_EQUIP_BUFFER_SIZE sizeof(u16[PAUSE_EQUIP_PLAYER_HEIGHT][PAUSE_EQUIP_PLAYER_WIDTH])
#define PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE 0x5000
@@ -63,22 +65,22 @@ typedef enum PauseState {
/* 5 */ PAUSE_STATE_OPENING_2, // Finish some animations for opening the menu.
/* 6 */ PAUSE_STATE_MAIN, // Pause menu ready for player inputs.
/* 7 */ PAUSE_STATE_SAVE_PROMPT, // Save prompt in the pause menu
- /* 8 */ PAUSE_STATE_8,
- /* 9 */ PAUSE_STATE_9,
- /* 10 */ PAUSE_STATE_10,
- /* 11 */ PAUSE_STATE_11,
- /* 12 */ PAUSE_STATE_12,
- /* 13 */ PAUSE_STATE_13,
- /* 14 */ PAUSE_STATE_14,
- /* 15 */ PAUSE_STATE_15,
- /* 16 */ PAUSE_STATE_16,
- /* 17 */ PAUSE_STATE_17,
+ /* 8 */ PAUSE_STATE_GAME_OVER_START,
+ /* 9 */ PAUSE_STATE_GAME_OVER_WAIT_BG_PRERENDER,
+ /* 10 */ PAUSE_STATE_GAME_OVER_INIT,
+ /* 11 */ PAUSE_STATE_GAME_OVER_SHOW_MESSAGE,
+ /* 12 */ PAUSE_STATE_GAME_OVER_WINDOW_DELAY,
+ /* 13 */ PAUSE_STATE_GAME_OVER_SHOW_WINDOW, // Show background and animate
+ /* 14 */ PAUSE_STATE_GAME_OVER_SAVE_PROMPT, // Ask "Would you like to save?", apply the choice
+ /* 15 */ PAUSE_STATE_GAME_OVER_SAVED, // Show "Game saved.", wait for the delay or input
+ /* 16 */ PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT, // Ask "Continue playing?"
+ /* 17 */ PAUSE_STATE_GAME_OVER_FINISH, // Fade out, then apply the choice
/* 18 */ PAUSE_STATE_CLOSING, // Animate the pause menu closing
/* 19 */ PAUSE_STATE_RESUME_GAMEPLAY // Handles returning to normal gameplay once the pause menu is visually closed
} PauseState;
#define IS_PAUSE_STATE_GAMEOVER(pauseCtx) \
- (((pauseCtx)->state >= PAUSE_STATE_8) && ((pauseCtx)->state <= PAUSE_STATE_17))
+ (((pauseCtx)->state >= PAUSE_STATE_GAME_OVER_START) && ((pauseCtx)->state <= PAUSE_STATE_GAME_OVER_FINISH))
#define IS_PAUSED(pauseCtx) \
(((pauseCtx)->state != PAUSE_STATE_OFF) || ((pauseCtx)->debugState != 0))
@@ -87,14 +89,14 @@ typedef enum PauseState {
typedef enum PauseMainState {
/* 0 */ PAUSE_MAIN_STATE_IDLE,
/* 1 */ PAUSE_MAIN_STATE_SWITCHING_PAGE,
- /* 2 */ PAUSE_MAIN_STATE_2,
+ /* 2 */ PAUSE_MAIN_STATE_SONG_PLAYBACK, // The song is being played back to the player.
/* 3 */ PAUSE_MAIN_STATE_3,
- /* 4 */ PAUSE_MAIN_STATE_4,
- /* 5 */ PAUSE_MAIN_STATE_5,
- /* 6 */ PAUSE_MAIN_STATE_6,
- /* 7 */ PAUSE_MAIN_STATE_7,
- /* 8 */ PAUSE_MAIN_STATE_8,
- /* 9 */ PAUSE_MAIN_STATE_9
+ /* 4 */ PAUSE_MAIN_STATE_SONG_PROMPT_INIT, // Start the prompt for the player to play the song.
+ /* 5 */ PAUSE_MAIN_STATE_SONG_PROMPT, // Waiting for the player to play the song.
+ /* 6 */ PAUSE_MAIN_STATE_SONG_PROMPT_DONE, // The song prompt is done, the player either played the song successfully or made a mistake.
+ /* 7 */ PAUSE_MAIN_STATE_EQUIP_CHANGED,
+ /* 8 */ PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG, // Like PAUSE_MAIN_STATE_IDLE, but the quest page is active and the cursor is positioned on a song.
+ /* 9 */ PAUSE_MAIN_STATE_SONG_PLAYBACK_START // Start playing the song back to the player.
} PauseMainState;
// Sub-states of PAUSE_STATE_SAVE_PROMPT
@@ -141,6 +143,11 @@ typedef enum WorldMapPointState {
/* 2 */ WORLD_MAP_POINT_STATE_HIGHLIGHT
} WorldMapPointState;
+// Values for PauseContext.pagesYOrigin1 and R_PAUSE_PAGES_Y_ORIGIN_2 respectively,
+// that make the pause pages rotate around their lower edge instead of the middle.
+#define PAUSE_PAGES_Y_ORIGIN_1_LOWER 80 // PAGE_BG_ROWS * PAGE_BG_QUAD_HEIGHT / 2
+#define PAUSE_PAGES_Y_ORIGIN_2_LOWER (s16)(-PAUSE_PAGES_Y_ORIGIN_1_LOWER * 0.78 * 100)
+
typedef struct PauseContext {
/* 0x0000 */ View view;
/* 0x0128 */ u8* iconItemSegment;
@@ -174,14 +181,14 @@ typedef struct PauseContext {
/* 0x01E8 */ u16 pageIndex; // "kscp_pos"
/* 0x01EA */ u16 pageSwitchTimer;
/* 0x01EC */ u16 savePromptState;
- /* 0x01F0 */ f32 unk_1F0;
- /* 0x01F4 */ f32 unk_1F4;
- /* 0x01F8 */ f32 unk_1F8;
- /* 0x01FC */ f32 unk_1FC;
- /* 0x0200 */ f32 unk_200;
- /* 0x0204 */ f32 unk_204; // "angle_s"
+ /* 0x01F0 */ f32 promptDepthOffset; // Offset position of the prompt away from the camera
+ /* 0x01F4 */ f32 itemPagePitch; // Rotation of the item page around its local horizontal/sideways axis
+ /* 0x01F8 */ f32 equipPagePitch; // Rotation of the equip page around its local horizontal/sideways axis
+ /* 0x01FC */ f32 mapPagePitch; // Rotation of the map page around its local horizontal/sideways axis
+ /* 0x0200 */ f32 questPagePitch; // Rotation of the quest page around its local horizontal/sideways axis
+ /* 0x0204 */ f32 promptPitch; // Rotation of the prompt around its local horizontal/sideways axis. "angle_s"
/* 0x0208 */ u16 alpha;
- /* 0x020A */ s16 offsetY;
+ /* 0x020A */ s16 pagesYOrigin1;
/* 0x020C */ char unk_20C[0x08];
/* 0x0214 */ s16 stickAdjX;
/* 0x0216 */ s16 stickAdjY;
@@ -245,4 +252,9 @@ void KaleidoSetup_Update(struct PlayState* play);
void KaleidoSetup_Init(struct PlayState* play);
void KaleidoSetup_Destroy(struct PlayState* play);
+extern u8 gBossMarkState;
+extern f32 gBossMarkScale;
+extern u32 D_8016139C;
+extern PauseMapMarksData* gLoadedPauseMarkDataTable;
+
#endif
diff --git a/include/z64play.h b/include/z64play.h
index 562ad756d4..4853ac8f47 100644
--- a/include/z64play.h
+++ b/include/z64play.h
@@ -4,7 +4,7 @@
#include "ultra64.h"
#include "prerender.h"
-
+#include "transition_tile.h"
#include "z64actor.h"
#include "z64bgcheck.h"
#include "z64camera.h"
@@ -18,6 +18,7 @@
#include "z64message.h"
#include "z64object.h"
#include "z64pause.h"
+#include "z64room.h"
#include "z64scene.h"
#include "z64sfx_source.h"
#include "z64skybox.h"
@@ -26,10 +27,26 @@
#include "z64view.h"
union Color_RGBA8_u32;
+struct Path;
struct Player;
struct QuestHintCmd;
struct VisMono;
+typedef enum PauseBgPreRenderState {
+ /* 0 */ PAUSE_BG_PRERENDER_OFF, // Inactive, do nothing.
+ /* 1 */ PAUSE_BG_PRERENDER_SETUP, // The current frame is only drawn for the purpose of serving as the pause background.
+ /* 2 */ PAUSE_BG_PRERENDER_PROCESS, // The previous frame was PAUSE_BG_PRERENDER_SETUP, now apply prerender filters.
+ /* 3 */ PAUSE_BG_PRERENDER_READY, // The pause background is ready to be used.
+ /* 4 */ PAUSE_BG_PRERENDER_MAX
+} PauseBgPreRenderState;
+
+typedef enum TransitionTileState {
+ /* 0 */ TRANS_TILE_OFF, // Inactive, do nothing
+ /* 1 */ TRANS_TILE_SETUP, // Save the necessary buffers
+ /* 2 */ TRANS_TILE_PROCESS, // Initialize the transition
+ /* 3 */ TRANS_TILE_READY // The transition is ready, so will update and draw each frame
+} TransitionTileState;
+
typedef struct SceneSequences {
/* 0x00 */ u8 seqId;
/* 0x01 */ u8 natureAmbienceId;
@@ -88,7 +105,7 @@ typedef struct PlayState {
/* 0x11DFC */ void* unk_11DFC;
/* 0x11E00 */ Spawn* spawnList;
/* 0x11E04 */ s16* exitList;
- /* 0x11E08 */ Path* pathList;
+ /* 0x11E08 */ struct Path* pathList;
/* 0x11E0C */ struct QuestHintCmd* naviQuestHints;
/* 0x11E10 */ void* specialEffects;
/* 0x11E14 */ u8 skyboxId;
@@ -115,6 +132,8 @@ typedef struct PlayState {
/* 0x12430 */ char unk_12430[0xE8];
} PlayState; // size = 0x12518
+extern Mtx D_01000000; // billboardMtx
+
#define GET_ACTIVE_CAM(play) ((play)->cameraPtrs[(play)->activeCamId])
#define GET_PLAYER(play) ((Player*)(play)->actorCtx.actorLists[ACTORCAT_PLAYER].head)
@@ -122,15 +141,13 @@ void Play_SetViewpoint(PlayState* this, s16 viewpoint);
s32 Play_CheckViewpoint(PlayState* this, s16 viewpoint);
void Play_SetShopBrowsingViewpoint(PlayState* this);
Gfx* Play_SetFog(PlayState* this, Gfx* gfx);
-void Play_Destroy(GameState* thisx);
-void Play_Init(GameState* thisx);
void Play_Main(GameState* thisx);
int Play_InCsMode(PlayState* this);
f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* pos);
void* Play_LoadFile(PlayState* this, RomFile* file);
void Play_GetScreenPos(PlayState* this, Vec3f* src, Vec3f* dest);
s16 Play_CreateSubCamera(PlayState* this);
-s16 Play_GetActiveCamId(PlayState* this);
+s32 Play_GetActiveCamId(PlayState* this);
s16 Play_ChangeCameraStatus(PlayState* this, s16 camId, s16 status);
void Play_ClearCamera(PlayState* this, s16 camId);
void Play_ClearAllSubCameras(PlayState* this);
@@ -148,8 +165,13 @@ void Play_SetupRespawnPoint(PlayState* this, s32 respawnMode, s32 playerParams);
void Play_TriggerVoidOut(PlayState* this);
void Play_TriggerRespawn(PlayState* this);
int Play_CamIsNotFixed(PlayState* this);
+s32 func_800C0D34(PlayState* this, Actor* actor, s16* yaw);
+s32 func_800C0DB4(PlayState* this, Vec3f* pos);
-#if OOT_DEBUG
+void Play_Init(GameState* thisx);
+void Play_Destroy(GameState* thisx);
+
+#if DEBUG_FEATURES
extern void* gDebugCutsceneScript;
#endif
diff --git a/include/z64player.h b/include/z64player.h
index 7591e632ac..368a6cf032 100644
--- a/include/z64player.h
+++ b/include/z64player.h
@@ -7,6 +7,40 @@
struct Player;
+#define PLAYER_PARAMS(startMode, startBgCamIndex) (PARAMS_PACK_NOMASK(startMode, 8) | PARAMS_PACK_NOMASK(startBgCamIndex, 0))
+
+// Determines behavior when spawning. See `PlayerStartMode`.
+#define PLAYER_GET_START_MODE(thisx) PARAMS_GET_S((thisx)->params, 8, 4)
+
+// Sets initial `bgCamIndex`, which determines camera behavior.
+// The value is used to index a list of `BgCamInfo` contained within the scene's collision data.
+// See `PLAYER_START_BG_CAM_DEFAULT` for what a value of -1 does.
+#define PLAYER_GET_START_BG_CAM_INDEX(thisx) PARAMS_GET_S((thisx)->params, 0, 8)
+
+// A value of -1 for `startBgCamIndex` indicates that default behavior should be used.
+// This means the `bgCamIndex` will be read from the current floor polygon.
+#define PLAYER_START_BG_CAM_DEFAULT ((u8)-1)
+
+typedef enum PlayerStartMode {
+ /* 0 */ PLAYER_START_MODE_NOTHING, // Update is empty and draw function is NULL, nothing occurs. Useful in cutscenes, for example.
+ /* 1 */ PLAYER_START_MODE_TIME_TRAVEL, // Arriving from time travel. Automatically adjusts by age.
+ /* 2 */ PLAYER_START_MODE_BLUE_WARP, // Arriving from a blue warp.
+ /* 3 */ PLAYER_START_MODE_DOOR, // Unused. Use a door immediately if one is nearby. If no door is in usable range, a softlock occurs.
+ /* 4 */ PLAYER_START_MODE_GROTTO, // Arriving from a grotto, launched upward from the ground.
+ /* 5 */ PLAYER_START_MODE_WARP_SONG, // Arriving from a warp song.
+ /* 6 */ PLAYER_START_MODE_FARORES_WIND, // Arriving from a Farores Wind warp.
+ /* 7 */ PLAYER_START_MODE_KNOCKED_OVER, // Knocked over on the ground and flashing red.
+ /* 8 */ PLAYER_START_MODE_UNUSED_8, // Unused, behaves the same as PLAYER_START_MODE_MOVE_FORWARD_SLOW.
+ /* 9 */ PLAYER_START_MODE_UNUSED_9, // Unused, behaves the same as PLAYER_START_MODE_MOVE_FORWARD_SLOW.
+ /* 10 */ PLAYER_START_MODE_UNUSED_10, // Unused, behaves the same as PLAYER_START_MODE_MOVE_FORWARD_SLOW.
+ /* 11 */ PLAYER_START_MODE_UNUSED_11, // Unused, behaves the same as PLAYER_START_MODE_MOVE_FORWARD_SLOW.
+ /* 12 */ PLAYER_START_MODE_UNUSED_12, // Unused, behaves the same as PLAYER_START_MODE_MOVE_FORWARD_SLOW.
+ /* 13 */ PLAYER_START_MODE_IDLE, // Idle standing still, or swim if in water.
+ /* 14 */ PLAYER_START_MODE_MOVE_FORWARD_SLOW, // Take a few steps forward at a slow speed (2.0f), or swim if in water.
+ /* 15 */ PLAYER_START_MODE_MOVE_FORWARD, // Take a few steps forward, using the speed from the last exit (gSaveContext.entranceSpeed), or swim if in water.
+ /* 16 */ PLAYER_START_MODE_MAX // Note: By default, this param has 4 bits allocated. The max value is 16.
+} PlayerStartMode;
+
typedef enum PlayerSword {
/* 0 */ PLAYER_SWORD_NONE,
/* 1 */ PLAYER_SWORD_KOKIRI,
@@ -70,9 +104,15 @@ typedef enum PlayerEnvHazard {
/* 0x4 */ PLAYER_ENV_HAZARD_UNDERWATER_FREE
} PlayerEnvHazard;
+typedef enum PlayerIdleType {
+ /* -0x1 */ PLAYER_IDLE_CRIT_HEALTH = -1,
+ /* 0x0 */ PLAYER_IDLE_DEFAULT,
+ /* 0x1 */ PLAYER_IDLE_FIDGET
+} PlayerIdleType;
+
typedef enum PlayerItemAction {
/* 0x00 */ PLAYER_IA_NONE,
- /* 0x01 */ PLAYER_IA_SWORD_CS, // Hold sword without shield in hand. The sword is not useable.
+ /* 0x01 */ PLAYER_IA_SWORD_CS, // Hold sword without shield in hand. The sword is not usable.
/* 0x02 */ PLAYER_IA_FISHING_POLE,
/* 0x03 */ PLAYER_IA_SWORD_MASTER,
/* 0x04 */ PLAYER_IA_SWORD_KOKIRI,
@@ -604,6 +644,21 @@ typedef enum PlayerStickDirection {
/* 3 */ PLAYER_STICK_DIR_RIGHT
} PlayerStickDirection;
+typedef enum PlayerKnockbackType {
+ /* 0 */ PLAYER_KNOCKBACK_NONE, // No knockback
+ /* 1 */ PLAYER_KNOCKBACK_SMALL, // A small hop, remains standing up
+ /* 2 */ PLAYER_KNOCKBACK_LARGE, // Sent flying in the air and lands laying down on the floor
+ /* 3 */ PLAYER_KNOCKBACK_LARGE_SHOCK // Same as`PLAYER_KNOCKBACK_LARGE` with a shock effect
+} PlayerKnockbackType;
+
+typedef enum PlayerDamageResponseType {
+ /* 0 */ PLAYER_HIT_RESPONSE_NONE,
+ /* 1 */ PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE,
+ /* 2 */ PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL,
+ /* 3 */ PLAYER_HIT_RESPONSE_ICE_TRAP,
+ /* 4 */ PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK
+} PlayerDamageResponseType;
+
typedef struct PlayerAgeProperties {
/* 0x00 */ f32 ceilingCheckHeight;
/* 0x04 */ f32 unk_04;
@@ -630,8 +685,8 @@ typedef struct PlayerAgeProperties {
/* 0x92 */ u16 unk_92;
/* 0x94 */ u16 unk_94;
/* 0x98 */ LinkAnimationHeader* unk_98;
- /* 0x9C */ LinkAnimationHeader* unk_9C;
- /* 0xA0 */ LinkAnimationHeader* unk_A0;
+ /* 0x9C */ LinkAnimationHeader* timeTravelStartAnim;
+ /* 0xA0 */ LinkAnimationHeader* timeTravelEndAnim;
/* 0xA4 */ LinkAnimationHeader* unk_A4;
/* 0xA8 */ LinkAnimationHeader* unk_A8;
/* 0xAC */ LinkAnimationHeader* unk_AC[4];
@@ -654,13 +709,13 @@ typedef struct WeaponInfo {
#define PLAYER_STATE1_3 (1 << 3)
#define PLAYER_STATE1_HOSTILE_LOCK_ON (1 << 4) // Currently locked onto a hostile actor. Triggers a "battle" variant of many actions.
#define PLAYER_STATE1_5 (1 << 5)
-#define PLAYER_STATE1_6 (1 << 6)
+#define PLAYER_STATE1_TALKING (1 << 6) // Currently talking to an actor. This includes item exchanges.
#define PLAYER_STATE1_DEAD (1 << 7) // Player has died. Note that this gets set when the death cutscene has started, after landing from the air.
#define PLAYER_STATE1_START_CHANGING_HELD_ITEM (1 << 8) // Item change process has begun
#define PLAYER_STATE1_9 (1 << 9)
#define PLAYER_STATE1_10 (1 << 10)
-#define PLAYER_STATE1_ACTOR_CARRY (1 << 11) // Currently carrying an actor
-#define PLAYER_STATE1_CHARGING_SPIN_ATTACK (1 << 12) // Currently charing a spin attack (by holding down the B button)
+#define PLAYER_STATE1_CARRYING_ACTOR (1 << 11) // Currently carrying an actor
+#define PLAYER_STATE1_CHARGING_SPIN_ATTACK (1 << 12) // Currently charging a spin attack (by holding down the B button)
#define PLAYER_STATE1_13 (1 << 13)
#define PLAYER_STATE1_14 (1 << 14)
#define PLAYER_STATE1_Z_TARGETING (1 << 15) // Either lock-on or parallel is active. This flag is never checked for and is practically unused.
@@ -670,7 +725,7 @@ typedef struct WeaponInfo {
#define PLAYER_STATE1_19 (1 << 19)
#define PLAYER_STATE1_20 (1 << 20)
#define PLAYER_STATE1_21 (1 << 21)
-#define PLAYER_STATE1_22 (1 << 22)
+#define PLAYER_STATE1_SHIELDING (1 << 22) // Shielding in any form (regular, hylian shield as child, "shielding" with a two handed sword, etc.)
#define PLAYER_STATE1_23 (1 << 23)
#define PLAYER_STATE1_USING_BOOMERANG (1 << 24) // Currently using the boomerang. This includes all phases (aiming, throwing, and catching).
#define PLAYER_STATE1_BOOMERANG_THROWN (1 << 25) // Boomerang has been thrown and is flying in the air
@@ -682,7 +737,7 @@ typedef struct WeaponInfo {
#define PLAYER_STATE1_31 (1 << 31)
#define PLAYER_STATE2_0 (1 << 0)
-#define PLAYER_STATE2_1 (1 << 1)
+#define PLAYER_STATE2_CAN_ACCEPT_TALK_OFFER (1 << 1) // Can accept a talk offer. "Speak" or "Check" is shown on the A button.
#define PLAYER_STATE2_2 (1 << 2)
#define PLAYER_STATE2_3 (1 << 3)
#define PLAYER_STATE2_4 (1 << 4)
@@ -701,15 +756,15 @@ typedef struct WeaponInfo {
#define PLAYER_STATE2_17 (1 << 17)
#define PLAYER_STATE2_CRAWLING (1 << 18) // Crawling through a crawlspace
#define PLAYER_STATE2_19 (1 << 19)
-#define PLAYER_STATE2_20 (1 << 20)
+#define PLAYER_STATE2_NAVI_ACTIVE (1 << 20) // Navi is visible and active. Could be hovering idle near Link or hovering over other actors.
#define PLAYER_STATE2_21 (1 << 21)
#define PLAYER_STATE2_22 (1 << 22)
#define PLAYER_STATE2_23 (1 << 23)
#define PLAYER_STATE2_24 (1 << 24)
#define PLAYER_STATE2_25 (1 << 25)
#define PLAYER_STATE2_26 (1 << 26)
-#define PLAYER_STATE2_27 (1 << 27)
-#define PLAYER_STATE2_28 (1 << 28)
+#define PLAYER_STATE2_USING_OCARINA (1 << 27) // Playing the ocarina or warping out from an ocarina warp song
+#define PLAYER_STATE2_IDLE_FIDGET (1 << 28) // Playing a fidget idle animation (under typical circumstances, see `Player_ChooseNextIdleAnim` for more info)
#define PLAYER_STATE2_29 (1 << 29)
#define PLAYER_STATE2_30 (1 << 30)
#define PLAYER_STATE2_31 (1 << 31)
@@ -727,6 +782,16 @@ typedef void (*PlayerActionFunc)(struct Player*, struct PlayState*);
typedef s32 (*UpperActionFunc)(struct Player*, struct PlayState*);
typedef void (*AfterPutAwayFunc)(struct PlayState*, struct Player*);
+#define UNK6AE_ROT_FOCUS_X (1 << 0)
+#define UNK6AE_ROT_FOCUS_Y (1 << 1)
+#define UNK6AE_ROT_FOCUS_Z (1 << 2)
+#define UNK6AE_ROT_HEAD_X (1 << 3)
+#define UNK6AE_ROT_HEAD_Y (1 << 4)
+#define UNK6AE_ROT_HEAD_Z (1 << 5)
+#define UNK6AE_ROT_UPPER_X (1 << 6)
+#define UNK6AE_ROT_UPPER_Y (1 << 7)
+#define UNK6AE_ROT_UPPER_Z (1 << 8)
+
typedef struct Player {
/* 0x0000 */ Actor actor;
/* 0x014C */ s8 currentTunic; // current tunic from `PlayerTunic`
@@ -803,7 +868,7 @@ typedef struct Player {
/* 0x0678 */ PlayerAgeProperties* ageProperties;
/* 0x067C */ u32 stateFlags1;
/* 0x0680 */ u32 stateFlags2;
- /* 0x0684 */ Actor* unk_684;
+ /* 0x0684 */ Actor* autoLockOnActor; // Actor that is locked onto automatically without player input; see `Player_SetAutoLockOnActor`
/* 0x0688 */ Actor* boomerangActor;
/* 0x068C */ Actor* naviActor;
/* 0x0690 */ s16 naviTextId;
@@ -815,17 +880,13 @@ typedef struct Player {
/* 0x06A0 */ f32 unk_6A0;
/* 0x06A4 */ f32 closestSecretDistSq;
/* 0x06A8 */ Actor* unk_6A8;
- /* 0x06AC */ s8 unk_6AC;
+ /* 0x06AC */ s8 idleType;
/* 0x06AD */ u8 unk_6AD;
- /* 0x06AE */ u16 unk_6AE;
- /* 0x06B0 */ s16 unk_6B0;
+ /* 0x06AE */ u16 unk_6AE_rotFlags; // See `UNK6AE_ROT_` macros. If its flag isn't set, a rot steps to 0.
+ /* 0x06B0 */ s16 upperLimbYawSecondary;
/* 0x06B2 */ char unk_6B4[0x004];
- /* 0x06B6 */ s16 unk_6B6;
- /* 0x06B8 */ s16 unk_6B8;
- /* 0x06BA */ s16 unk_6BA;
- /* 0x06BC */ s16 unk_6BC;
- /* 0x06BE */ s16 unk_6BE;
- /* 0x06C0 */ s16 unk_6C0;
+ /* 0x06B6 */ Vec3s headLimbRot;
+ /* 0x06BC */ Vec3s upperLimbRot;
/* 0x06C2 */ s16 unk_6C2;
/* 0x06C4 */ f32 unk_6C4;
/* 0x06C8 */ SkelAnime upperSkelAnime;
@@ -835,7 +896,7 @@ typedef struct Player {
/* 0x0830 */ f32 upperAnimInterpWeight;
/* 0x0834 */ s16 unk_834;
/* 0x0836 */ s8 unk_836;
- /* 0x0837 */ u8 unk_837;
+ /* 0x0837 */ u8 putAwayCooldownTimer;
/* 0x0838 */ f32 speedXZ; // Controls horizontal speed, used for `actor.speed`. Current or target value depending on context.
/* 0x083C */ s16 yaw; // General yaw value, used both for world and shape rotation. Current or target value depending on context.
/* 0x083E */ s16 parallelYaw; // yaw in "parallel" mode, Z-Target without an actor lock-on
@@ -850,15 +911,27 @@ typedef struct Player {
/* 0x084F */ union {
s8 actionVar1;
+ s8 startedAnim; // Player_Action_TimeTravelEnd: Started playing the animation that was previously frozen
+ s8 facingUpSlope; // Player_Action_SlideOnSlope: Facing uphill when sliding on a slope
+ s8 isLakeHyliaCs; // Player_Action_BlueWarpArrive: In Lake Hylia CS after Water Temple. Floating down is delayed until a specific point in the cutscene.
+ s8 bottleCatchType; // Player_Action_SwingBottle: entry type for `sBottleCatchInfo`, corresponds to actor caught in a bottle
} av1; // "Action Variable 1": context dependent variable that has different meanings depending on what action is currently running
/* 0x0850 */ union {
s16 actionVar2;
+ s16 fallDamageStunTimer; // Player_Action_Idle: Prevents any movement and shakes model up and down quickly to indicate fall damage stun
+ s16 bonked; // Player_Action_Roll: Set to true after bonking into a wall or an actor
+ s16 animDelayTimer; // Player_Action_TimeTravelEnd: Delays playing animation until finished counting down
+ s16 startedTextbox; // Player_Action_SwingBottle: set to true when the textbox is started
+ s16 inWater; // Player_Action_SwingBottle: True if a bottle is swung in water. Used to determine which bottle swing animation to use.
+ s16 csDelayTimer; // Player_Action_WaitForCutscene: Number of frames to wait before responding to a cutscene
+ s16 playedLandingSfx; // Player_Action_BlueWarpArrive: Played sfx when landing on the ground
+ s16 appearTimer; // Player_Action_FaroresWindArrive: Counts up, appear at 20 frames (1 second)
} av2; // "Action Variable 2": context dependent variable that has different meanings depending on what action is currently running
/* 0x0854 */ f32 unk_854;
/* 0x0858 */ f32 unk_858;
- /* 0x085C */ f32 unk_85C; // stick length among other things
+ /* 0x085C */ f32 unk_85C; // stick length among other things (TODO: probably part of an "fwork" array)
/* 0x0860 */ s16 unk_860; // stick flame timer among other things
/* 0x0862 */ s8 unk_862; // get item draw ID + 1
/* 0x0864 */ f32 unk_864;
@@ -868,14 +941,14 @@ typedef struct Player {
/* 0x0874 */ f32 unk_874;
/* 0x0878 */ f32 unk_878;
/* 0x087C */ s16 unk_87C;
- /* 0x087E */ s16 unk_87E;
+ /* 0x087E */ s16 turnRate; // Amount angle is changed every frame when turning in place
/* 0x0880 */ f32 unk_880;
/* 0x0884 */ f32 yDistToLedge; // y distance to ground above an interact wall. LEDGE_DIST_MAX if no ground is found
/* 0x0888 */ f32 distToInteractWall; // xyz distance to the interact wall
/* 0x088C */ u8 ledgeClimbType;
/* 0x088D */ u8 ledgeClimbDelayTimer;
- /* 0x088E */ u8 unk_88E;
- /* 0x088F */ u8 unk_88F;
+ /* 0x088E */ u8 textboxBtnCooldownTimer; // Prevents usage of A/B/C-up when counting down
+ /* 0x088F */ u8 damageFlickerAnimCounter; // Used to flicker Link after taking damage
/* 0x0890 */ u8 unk_890;
/* 0x0891 */ u8 bodyShockTimer;
/* 0x0892 */ u8 unk_892;
@@ -886,11 +959,11 @@ typedef struct Player {
/* 0x089A */ s16 floorPitchAlt; // the calculation for this value is bugged and doesn't represent anything meaningful
/* 0x089C */ s16 unk_89C;
/* 0x089E */ u16 floorSfxOffset;
- /* 0x08A0 */ u8 unk_8A0;
- /* 0x08A1 */ u8 unk_8A1;
- /* 0x08A2 */ s16 unk_8A2;
- /* 0x08A4 */ f32 unk_8A4;
- /* 0x08A8 */ f32 unk_8A8;
+ /* 0x08A0 */ u8 knockbackDamage;
+ /* 0x08A1 */ u8 knockbackType;
+ /* 0x08A2 */ s16 knockbackRot;
+ /* 0x08A4 */ f32 knockbackSpeed;
+ /* 0x08A8 */ f32 knockbackYVelocity;
/* 0x08AC */ f32 pushedSpeed; // Pushing player, examples include water currents, floor conveyors, climbing sloped surfaces
/* 0x08B0 */ s16 pushedYaw; // Yaw direction of player being pushed
/* 0x08B4 */ WeaponInfo meleeWeaponInfo[3];
@@ -901,7 +974,7 @@ typedef struct Player {
/* 0x0A61 */ u8 bodyFlameTimers[PLAYER_BODYPART_MAX]; // one flame per body part
/* 0x0A73 */ u8 unk_A73;
/* 0x0A74 */ AfterPutAwayFunc afterPutAwayFunc; // See `Player_SetupWaitForPutAway` and `Player_Action_WaitForPutAway`
- /* 0x0A78 */ s8 invincibilityTimer; // prevents damage when nonzero (positive = visible, counts towards zero each frame)
+ /* 0x0A78 */ s8 invincibilityTimer; // prevents damage when nonzero. Positive values are intangibility, negative are invulnerability
/* 0x0A79 */ u8 floorTypeTimer; // counts up every frame the current floor type is the same as the last frame
/* 0x0A7A */ u8 floorProperty;
/* 0x0A7B */ u8 prevFloorType;
@@ -914,4 +987,71 @@ typedef struct Player {
/* 0x0A88 */ Vec3f unk_A88; // previous body part 0 position
} Player; // size = 0xA94
+// z_player_lib.c
+void Player_SetBootData(struct PlayState* play, Player* this);
+int Player_InBlockingCsMode(struct PlayState* play, Player* this);
+int Player_InCsMode(struct PlayState* play);
+s32 Player_CheckHostileLockOn(Player* this);
+int Player_IsChildWithHylianShield(Player* this);
+s32 Player_ActionToModelGroup(Player* this, s32 itemAction);
+void Player_SetModelsForHoldingShield(Player* this);
+void Player_SetModels(Player* this, s32 modelGroup);
+void Player_SetModelGroup(Player* this, s32 modelGroup);
+void func_8008EC70(Player* this);
+void Player_SetEquipmentData(struct PlayState* play, Player* this);
+void Player_UpdateBottleHeld(struct PlayState* play, Player* this, s32 item, s32 itemAction);
+void Player_ReleaseLockOn(Player* this);
+void Player_ClearZTargeting(Player* this);
+void Player_SetAutoLockOnActor(struct PlayState* play, Actor* actor);
+s32 func_8008EF44(struct PlayState* play, s32 ammo);
+int Player_IsBurningStickInRange(struct PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange);
+s32 Player_GetStrength(void);
+u8 Player_GetMask(struct PlayState* play);
+Player* Player_UnsetMask(struct PlayState* play);
+s32 Player_HasMirrorShieldEquipped(struct PlayState* play);
+int Player_HasMirrorShieldSetToDraw(struct PlayState* play);
+s32 Player_ActionToMagicSpell(Player* this, s32 itemAction);
+int Player_HoldsHookshot(Player* this);
+int func_8008F128(Player* this);
+s32 Player_ActionToMeleeWeapon(s32 itemAction);
+s32 Player_GetMeleeWeaponHeld(Player* this);
+s32 Player_HoldsTwoHandedWeapon(Player* this);
+int Player_HoldsBrokenKnife(Player* this);
+s32 Player_ActionToBottle(Player* this, s32 itemAction);
+s32 Player_GetBottleHeld(Player* this);
+s32 Player_ActionToExplosive(Player* this, s32 itemAction);
+s32 Player_GetExplosiveHeld(Player* this);
+s32 func_8008F2BC(Player* this, s32 itemAction);
+s32 Player_GetEnvironmentalHazard(struct PlayState* play);
+void Player_DrawImpl(struct PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic,
+ s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw,
+ void* data);
+s32 Player_OverrideLimbDrawGameplayCommon(struct PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
+ void* thisx);
+s32 Player_OverrideLimbDrawGameplayDefault(struct PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
+ void* thisx);
+s32 Player_OverrideLimbDrawGameplayFirstPerson(struct PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos,
+ Vec3s* rot, void* thisx);
+s32 Player_OverrideLimbDrawGameplayCrawling(struct PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
+ void* thisx);
+u8 func_80090480(struct PlayState* play, ColliderQuad* collider, WeaponInfo* weaponInfo, Vec3f* newTip, Vec3f* newBase);
+void Player_DrawGetItem(struct PlayState* play, Player* this);
+void Player_PostLimbDrawGameplay(struct PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx);
+u32 Player_InitPauseDrawData(struct PlayState* play, u8* segment, SkelAnime* skelAnime);
+void Player_DrawPause(struct PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale,
+ s32 sword, s32 tunic, s32 shield, s32 boots);
+
+// z_player_lib.c
+extern FlexSkeletonHeader* gPlayerSkelHeaders[2];
+extern u8 gPlayerModelTypes[PLAYER_MODELGROUP_MAX][PLAYER_MODELGROUPENTRY_MAX];
+extern Gfx* gPlayerLeftHandBgsDLs[];
+extern Gfx* gPlayerLeftHandOpenDLs[];
+extern Gfx* gPlayerLeftHandClosedDLs[];
+extern Gfx* gPlayerLeftHandBoomerangDLs[];
+extern Gfx gCullBackDList[];
+extern Gfx gCullFrontDList[];
+
+// object_table.c
+extern s16 gLinkObjectIds[2];
+
#endif
diff --git a/include/z64quest_hint.h b/include/z64quest_hint.h
new file mode 100644
index 0000000000..b592a07c34
--- /dev/null
+++ b/include/z64quest_hint.h
@@ -0,0 +1,11 @@
+#ifndef Z64QUEST_HINT_H
+#define Z64QUEST_HINT_H
+
+#include "ultra64.h"
+
+struct PlayState;
+
+u16 QuestHint_GetSariaTextId(struct PlayState* play);
+u16 QuestHint_GetNaviTextId(struct PlayState* play);
+
+#endif
diff --git a/include/z64quest_hint_commands.h b/include/z64quest_hint_commands.h
index 62f262f39b..8b99510160 100644
--- a/include/z64quest_hint_commands.h
+++ b/include/z64quest_hint_commands.h
@@ -3,6 +3,13 @@
#include "ultra64.h"
+typedef struct QuestHintCmd {
+ /* 0x00 */ u8 byte0;
+ /* 0x01 */ u8 byte1;
+ /* 0x02 */ u8 byte2;
+ /* 0x03 */ u8 byte3;
+} QuestHintCmd; // size = 0x4
+
/*
* Hint Command Types
*/
diff --git a/include/z64room.h b/include/z64room.h
new file mode 100644
index 0000000000..72c6f0982b
--- /dev/null
+++ b/include/z64room.h
@@ -0,0 +1,174 @@
+#ifndef Z64ROOM_H
+#define Z64ROOM_H
+
+#include "ultra64.h"
+#include "z64dma.h"
+#include "z64math.h"
+
+struct Input;
+struct PlayState;
+
+// Room shapes
+
+typedef enum RoomShapeType {
+ /* 0 */ ROOM_SHAPE_TYPE_NORMAL,
+ /* 1 */ ROOM_SHAPE_TYPE_IMAGE,
+ /* 2 */ ROOM_SHAPE_TYPE_CULLABLE,
+ /* 3 */ ROOM_SHAPE_TYPE_MAX
+} RoomShapeType;
+
+typedef struct RoomShapeBase {
+ /* 0x00 */ u8 type;
+} RoomShapeBase; // size = 0x01
+
+typedef struct RoomShapeDListsEntry {
+ /* 0x00 */ Gfx* opa;
+ /* 0x04 */ Gfx* xlu;
+} RoomShapeDListsEntry; // size = 0x08
+
+typedef struct RoomShapeNormal {
+ /* 0x00 */ RoomShapeBase base;
+ /* 0x01 */ u8 numEntries;
+ /* 0x04 */ RoomShapeDListsEntry* entries;
+ /* 0x08 */ RoomShapeDListsEntry* entriesEnd;
+} RoomShapeNormal; // size = 0x0C
+
+typedef enum RoomShapeImageAmountType {
+ /* 1 */ ROOM_SHAPE_IMAGE_AMOUNT_SINGLE = 1,
+ /* 2 */ ROOM_SHAPE_IMAGE_AMOUNT_MULTI
+} RoomShapeImageAmountType;
+
+typedef struct RoomShapeImageBase {
+ /* 0x00 */ RoomShapeBase base;
+ /* 0x01 */ u8 amountType; // RoomShapeImageAmountType
+ /* 0x04 */ RoomShapeDListsEntry* entry;
+} RoomShapeImageBase; // size = 0x08
+
+typedef struct RoomShapeImageSingle {
+ /* 0x00 */ RoomShapeImageBase base;
+ /* 0x08 */ void* source;
+ /* 0x0C */ u32 unk_0C;
+ /* 0x10 */ void* tlut;
+ /* 0x14 */ u16 width;
+ /* 0x16 */ u16 height;
+ /* 0x18 */ u8 fmt;
+ /* 0x19 */ u8 siz;
+ /* 0x1A */ u16 tlutMode;
+ /* 0x1C */ u16 tlutCount;
+} RoomShapeImageSingle; // size = 0x20
+
+typedef struct RoomShapeImageMultiBgEntry {
+ /* 0x00 */ u16 unk_00;
+ /* 0x02 */ u8 bgCamIndex; // for which bg cam index is this entry for
+ /* 0x04 */ void* source;
+ /* 0x08 */ u32 unk_0C;
+ /* 0x0C */ void* tlut;
+ /* 0x10 */ u16 width;
+ /* 0x12 */ u16 height;
+ /* 0x14 */ u8 fmt;
+ /* 0x15 */ u8 siz;
+ /* 0x16 */ u16 tlutMode;
+ /* 0x18 */ u16 tlutCount;
+} RoomShapeImageMultiBgEntry; // size = 0x1C
+
+typedef struct RoomShapeImageMulti {
+ /* 0x00 */ RoomShapeImageBase base;
+ /* 0x08 */ u8 numBackgrounds;
+ /* 0x0C */ RoomShapeImageMultiBgEntry* backgrounds;
+} RoomShapeImageMulti; // size = 0x10
+
+typedef struct RoomShapeCullableEntry {
+ /* 0x00 */ Vec3s boundsSphereCenter;
+ /* 0x06 */ s16 boundsSphereRadius;
+ /* 0x08 */ Gfx* opa;
+ /* 0x0C */ Gfx* xlu;
+} RoomShapeCullableEntry; // size = 0x10
+
+#define ROOM_SHAPE_CULLABLE_MAX_ENTRIES 64
+
+typedef struct RoomShapeCullable {
+ /* 0x00 */ RoomShapeBase base;
+ /* 0x01 */ u8 numEntries;
+ /* 0x04 */ RoomShapeCullableEntry* entries;
+ /* 0x08 */ RoomShapeCullableEntry* entriesEnd;
+} RoomShapeCullable; // size = 0x0C
+
+typedef union RoomShape {
+ RoomShapeBase base;
+ RoomShapeNormal normal;
+ union {
+ RoomShapeImageBase base;
+ RoomShapeImageSingle single;
+ RoomShapeImageMulti multi;
+ } image;
+ RoomShapeCullable cullable;
+} RoomShape; // "Ground Shape"
+
+typedef enum RoomType {
+ /* 0 */ ROOM_TYPE_NORMAL,
+ /* 1 */ ROOM_TYPE_DUNGEON, // Blocks Sun's Song's time advance effect. Not exclusively used by typical dungeon rooms.
+ /* 2 */ ROOM_TYPE_INDOORS, // Reduces player run speed and blocks player from attacking or jumping.
+ /* 3 */ ROOM_TYPE_3, // Unused. Color dithering is turned off when drawing the room and other things.
+ /* 4 */ ROOM_TYPE_4, // Unused. Prevents switching to CAM_SET_HORSE when mounting a horse.
+ /* 5 */ ROOM_TYPE_BOSS // Disables Environment_AdjustLights
+} RoomType;
+
+typedef enum RoomEnvironmentType {
+ /* 0 */ ROOM_ENV_DEFAULT,
+ /* 1 */ ROOM_ENV_COLD,
+ /* 2 */ ROOM_ENV_WARM,
+ /* 3 */ ROOM_ENV_HOT, // Enables hot room timer for the current room
+ /* 4 */ ROOM_ENV_UNK_STRETCH_1,
+ /* 5 */ ROOM_ENV_UNK_STRETCH_2,
+ /* 6 */ ROOM_ENV_UNK_STRETCH_3
+} RoomEnvironmentType;
+
+typedef enum LensMode {
+ /* 0 */ LENS_MODE_SHOW_ACTORS, // lens actors are invisible by default, and shown by using lens (for example, invisible enemies)
+ /* 1 */ LENS_MODE_HIDE_ACTORS // lens actors are visible by default, and hidden by using lens (for example, fake walls)
+} LensMode;
+
+typedef struct Room {
+ /* 0x00 */ s8 num; // -1 is invalid room
+ /* 0x01 */ u8 unk_01;
+ /* 0x02 */ u8 environmentType;
+ /* 0x03 */ u8 type;
+ /* 0x04 */ s8 echo;
+ /* 0x05 */ u8 lensMode;
+ /* 0x08 */ RoomShape* roomShape; // original name: "ground_shape"
+ /* 0x0C */ void* segment;
+ /* 0x10 */ char unk_10[0x4];
+} Room; // size = 0x14
+
+typedef struct RoomContext {
+ /* 0x00 */ Room curRoom;
+ /* 0x14 */ Room prevRoom;
+ /* 0x28 */ void* bufPtrs[2]; // Start and end pointers for the room buffer. Can be split into two pages, where page 0 is allocated from the start pointer and page 1 is allocated from the end pointer.
+ /* 0x30 */ u8 activeBufPage; // 0 - First page in memory, 1 - Last page in memory
+ /* 0x31 */ s8 status; // 0 - Free for new room request, 1 - DmaRequest for a new room is in progress
+ /* 0x34 */ void* roomRequestAddr; // Pointer to where the requested room segment will be stored
+ /* 0x38 */ DmaRequest dmaRequest;
+ /* 0x58 */ OSMesgQueue loadQueue;
+ /* 0x70 */ OSMesg loadMsg;
+ /* 0x74 */ s16 drawParams[2]; // context-specific data used by the current scene draw config
+} RoomContext; // size = 0x78
+
+typedef struct RoomList {
+ /* 0x00 */ u8 count;
+ /* 0x04 */ RomFile* romFiles; // Array of rom addresses for each room in a scene
+} RoomList;
+
+#define ROOM_DRAW_OPA (1 << 0)
+#define ROOM_DRAW_XLU (1 << 1)
+
+void func_80095AA0(struct PlayState* play, Room* room, struct Input* input, s32 arg3);
+void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tlutMode,
+ u16 tlutCount, f32 offsetX, f32 offsetY);
+void Room_Init(struct PlayState* play, Room* room);
+u32 Room_SetupFirstRoom(struct PlayState* play, RoomContext* roomCtx);
+s32 Room_RequestNewRoom(struct PlayState* play, RoomContext* roomCtx, s32 roomNum);
+s32 Room_ProcessRoomRequest(struct PlayState* play, RoomContext* roomCtx);
+void Room_Draw(struct PlayState* play, Room* room, u32 flags);
+void Room_FinishRoomChange(struct PlayState* play, RoomContext* roomCtx);
+
+#endif
diff --git a/include/z64save.h b/include/z64save.h
index 4b7513e53a..71b1414052 100644
--- a/include/z64save.h
+++ b/include/z64save.h
@@ -3,8 +3,14 @@
#include "ultra64.h"
#include "versions.h"
+#include "z64inventory.h"
#include "z64math.h"
+typedef enum ZTargetSetting {
+ /* 0 */ Z_TARGET_SETTING_SWITCH,
+ /* 1 */ Z_TARGET_SETTING_HOLD
+} ZTargetSetting;
+
typedef enum Language {
#if OOT_NTSC
/* 0 */ LANGUAGE_JPN,
@@ -83,6 +89,10 @@ typedef struct Inventory {
/* 0x5C */ s16 gsTokens;
} Inventory; // size = 0x5E
+typedef struct Checksum {
+ /* 0x00 */ u16 value;
+} Checksum; // size = 0x02
+
typedef struct SavedSceneFlags {
/* 0x00 */ u32 chest;
/* 0x04 */ u32 swch;
@@ -207,7 +217,7 @@ typedef enum WorldMapArea {
typedef struct SavePlayerData {
/* 0x00 0x001C */ char newf[6]; // string "ZELDAZ"
/* 0x06 0x0022 */ u16 deaths;
- /* 0x08 0x0024 */ char playerName[8];
+ /* 0x08 0x0024 */ u8 playerName[8];
/* 0x10 0x002C */ s16 n64ddFlag;
/* 0x12 0x002E */ s16 healthCapacity; // "max_life"
/* 0x14 0x0030 */ s16 health; // "now_life"
@@ -253,7 +263,7 @@ typedef struct SaveInfo {
/* 0x12AA 0x12C6 */ u8 scarecrowSpawnSong[0x80];
/* 0x132A 0x1346 */ char unk_1346[0x02];
/* 0x132C 0x1348 */ HorseData horseData;
- /* 0x1336 0x1352 */ u16 checksum; // "check_sum"
+ /* 0x1336 0x1352 */ Checksum checksum; // "check_sum"
} SaveInfo;
typedef struct Save {
@@ -310,10 +320,10 @@ typedef struct SaveContext {
/* 0x1404 */ u16 minigameState;
/* 0x1406 */ u16 minigameScore; // "yabusame_total"
/* 0x1408 */ char unk_1408[0x0001];
- /* 0x1409 */ u8 language; // NTSC 0: Japanese; 1: English | PAL 0: English; 1: German; 2: French
- /* 0x140A */ u8 audioSetting;
+ /* 0x1409 */ u8 language; // NTSC 0: Japanese; 1: English | PAL 0: English; 1: German; 2: French (see enum `Language`)
+ /* 0x140A */ u8 soundSetting; // 0: Stereo; 1: Mono; 2: Headset; 3: Surround (see enum `SoundSetting`)
/* 0x140B */ char unk_140B[0x0001];
- /* 0x140C */ u8 zTargetSetting; // 0: Switch; 1: Hold
+ /* 0x140C */ u8 zTargetSetting; // 0: Switch; 1: Hold (see enum `ZTargetSetting`)
/* 0x140E */ u16 forcedSeqId; // immediately start playing the sequence if set
/* 0x1410 */ u8 cutsceneTransitionControl; // context dependent usage: can either trigger a delayed fade or control fill alpha
/* 0x1411 */ char unk_1411[0x0001];
@@ -398,6 +408,59 @@ typedef enum LinkAge {
} LinkAge;
+#define LINK_IS_ADULT (gSaveContext.save.linkAge == LINK_AGE_ADULT)
+#define LINK_IS_CHILD (gSaveContext.save.linkAge == LINK_AGE_CHILD)
+
+#define YEARS_CHILD 5
+#define YEARS_ADULT 17
+#define LINK_AGE_IN_YEARS (!LINK_IS_ADULT ? YEARS_CHILD : YEARS_ADULT)
+
+#define CLOCK_TIME(hr, min) ((s32)(((hr) * 60 + (min)) * (f32)0x10000 / (24 * 60) + 0.5f))
+
+#define IS_DAY (gSaveContext.save.nightFlag == 0)
+#define IS_NIGHT (gSaveContext.save.nightFlag == 1)
+
+#define SLOT(item) gItemSlots[item]
+#define INV_CONTENT(item) gSaveContext.save.info.inventory.items[SLOT(item)]
+#define AMMO(item) gSaveContext.save.info.inventory.ammo[SLOT(item)]
+#define BEANS_BOUGHT AMMO(ITEM_MAGIC_BEAN + 1)
+
+#define ALL_EQUIP_VALUE(equip) ((s32)(gSaveContext.save.info.inventory.equipment & gEquipMasks[equip]) >> gEquipShifts[equip])
+#define CUR_EQUIP_VALUE(equip) ((s32)(gSaveContext.save.info.equips.equipment & gEquipMasks[equip]) >> gEquipShifts[equip])
+#define OWNED_EQUIP_FLAG(equip, value) (gBitFlags[value] << gEquipShifts[equip])
+#define OWNED_EQUIP_FLAG_ALT(equip, value) ((1 << (value)) << gEquipShifts[equip])
+#define CHECK_OWNED_EQUIP(equip, value) (gSaveContext.save.info.inventory.equipment & OWNED_EQUIP_FLAG(equip, value))
+#define CHECK_OWNED_EQUIP_ALT(equip, value) (gSaveContext.save.info.inventory.equipment & gBitFlags[(value) + (equip) * 4])
+
+#define SWORD_EQUIP_TO_PLAYER(swordEquip) (swordEquip)
+#define SHIELD_EQUIP_TO_PLAYER(shieldEquip) (shieldEquip)
+#define TUNIC_EQUIP_TO_PLAYER(tunicEquip) ((tunicEquip) - 1)
+#define BOOTS_EQUIP_TO_PLAYER(bootsEquip) ((bootsEquip) - 1)
+
+#define CUR_UPG_VALUE(upg) ((s32)(gSaveContext.save.info.inventory.upgrades & gUpgradeMasks[upg]) >> gUpgradeShifts[upg])
+#define CAPACITY(upg, value) gUpgradeCapacities[upg][value]
+#define CUR_CAPACITY(upg) CAPACITY(upg, CUR_UPG_VALUE(upg))
+
+#define CHECK_QUEST_ITEM(item) (gSaveContext.save.info.inventory.questItems & gBitFlags[item])
+#define CHECK_DUNGEON_ITEM(item, dungeonIndex) (gSaveContext.save.info.inventory.dungeonItems[dungeonIndex] & gBitFlags[item])
+
+#define GET_GS_FLAGS(index) \
+ ((gSaveContext.save.info.gsFlags[(index) >> 2] & gGsFlagsMasks[(index) & 3]) >> gGsFlagsShifts[(index) & 3])
+#define SET_GS_FLAGS(index, value) \
+ (gSaveContext.save.info.gsFlags[(index) >> 2] |= (value) << gGsFlagsShifts[(index) & 3])
+
+#define HIGH_SCORE(score) (gSaveContext.save.info.highScores[score])
+
+#define B_BTN_ITEM ((gSaveContext.buttonStatus[0] == ITEM_NONE) \
+ ? ITEM_NONE \
+ : (gSaveContext.save.info.equips.buttonItems[0] == ITEM_GIANTS_KNIFE) \
+ ? ITEM_SWORD_BIGGORON \
+ : gSaveContext.save.info.equips.buttonItems[0])
+
+#define C_BTN_ITEM(button) ((gSaveContext.buttonStatus[(button) + 1] != BTN_DISABLED) \
+ ? gSaveContext.save.info.equips.buttonItems[(button) + 1] \
+ : ITEM_NONE)
+
/*
*
@@ -410,7 +473,18 @@ typedef enum LinkAge {
* SaveContext.eventChkInf
*/
-#define EVENTCHKINF_02 0x02
+#define EVENTCHKINF_INDEX(flag) ((flag) >> 4)
+#define EVENTCHKINF_MASK(flag) (1 << ((flag) & 0xF))
+
+#define GET_EVENTCHKINF(flag) (gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX(flag)] & EVENTCHKINF_MASK(flag))
+#define SET_EVENTCHKINF(flag) (gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX(flag)] |= EVENTCHKINF_MASK(flag))
+#define CLEAR_EVENTCHKINF(flag) (gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX(flag)] &= ~EVENTCHKINF_MASK(flag))
+
+// EVENTCHKINF 0x00-0x0F
+#define EVENTCHKINF_INDEX_0 0
+#define EVENTCHKINF_00_UNUSED 0x00 // flag is set in the debug save, but has no functionality
+#define EVENTCHKINF_01_UNUSED 0x01 // flag is set in the debug save, but has no functionality
+#define EVENTCHKINF_MIDO_DENIED_DEKU_TREE_ACCESS 0x02
#define EVENTCHKINF_03 0x03
#define EVENTCHKINF_04 0x04
#define EVENTCHKINF_05 0x05
@@ -445,19 +519,17 @@ typedef enum LinkAge {
#define EVENTCHKINF_30 0x30
#define EVENTCHKINF_31 0x31
#define EVENTCHKINF_32 0x32
-#define EVENTCHKINF_33 0x33
+#define EVENTCHKINF_GAVE_LETTER_TO_KING_ZORA 0x33
#define EVENTCHKINF_37 0x37
#define EVENTCHKINF_38 0x38
#define EVENTCHKINF_39 0x39
-#define EVENTCHKINF_3A 0x3A
+#define EVENTCHKINF_OPENED_JABU_JABU 0x3A
#define EVENTCHKINF_3B 0x3B
-#define EVENTCHKINF_3C 0x3C
+#define EVENTCHKINF_DEFEATED_NABOORU_KNUCKLE 0x3C
-// 0x40
-#define EVENTCHKINF_40_INDEX 4
-#define EVENTCHKINF_40_SHIFT 0
-#define EVENTCHKINF_40_MASK (1 << EVENTCHKINF_40_SHIFT)
-#define EVENTCHKINF_40 ((EVENTCHKINF_40_INDEX << 4) | EVENTCHKINF_40_SHIFT)
+// EVENTCHKINF 0x40
+#define EVENTCHKINF_INDEX_40 EVENTCHKINF_INDEX(EVENTCHKINF_40)
+#define EVENTCHKINF_40 0x40
#define EVENTCHKINF_41 0x41
#define EVENTCHKINF_42 0x42
@@ -466,11 +538,11 @@ typedef enum LinkAge {
#define EVENTCHKINF_48 0x48
#define EVENTCHKINF_49 0x49
#define EVENTCHKINF_4A 0x4A
-#define EVENTCHKINF_4B 0x4B
+#define EVENTCHKINF_OPENED_DOOR_OF_TIME 0x4B
#define EVENTCHKINF_4C 0x4C
-#define EVENTCHKINF_4D 0x4D
-#define EVENTCHKINF_4E 0x4E
-#define EVENTCHKINF_WATCHED_SHEIK_AFTER_MASTER_SWORD_CS 0x4F // Cutscene in Temple of Time as adult after pulling the Master Sword for the first time
+#define EVENTCHKINF_CREATED_RAINBOW_BRIDGE 0x4D
+#define EVENTCHKINF_CAUGHT_BY_CASTLE_GUARDS 0x4E // set but unused
+#define EVENTCHKINF_REVEALED_MASTER_SWORD 0x4F // Cutscene in Temple of Time when entering the Master Sword chamber for the first time
#define EVENTCHKINF_50 0x50
#define EVENTCHKINF_51 0x51
#define EVENTCHKINF_52 0x52
@@ -481,48 +553,63 @@ typedef enum LinkAge {
#define EVENTCHKINF_5B 0x5B
#define EVENTCHKINF_5C 0x5C
#define EVENTCHKINF_65 0x65
-#define EVENTCHKINF_67 0x67
+#define EVENTCHKINF_DRAINED_WELL 0x67
#define EVENTCHKINF_68 0x68
-#define EVENTCHKINF_69 0x69
+#define EVENTCHKINF_RESTORED_LAKE_HYLIA 0x69
#define EVENTCHKINF_TALON_WOKEN_IN_KAKARIKO 0x6A
-// 0x6B
-#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_INDEX 6
-#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_SHIFT 11
-#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_MASK (1 << EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_SHIFT)
-#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO ((EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_INDEX << 4) | EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_SHIFT)
+// EVENTCHKINF 0x6B
+#define EVENTCHKINF_INDEX_TALON_RETURNED_FROM_KAKARIKO EVENTCHKINF_INDEX(EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO)
+#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO 0x6B
#define EVENTCHKINF_6E 0x6E
#define EVENTCHKINF_6F 0x6F
-#define EVENTCHKINF_70 0x70
-#define EVENTCHKINF_71 0x71
-#define EVENTCHKINF_72 0x72
-#define EVENTCHKINF_73 0x73
-#define EVENTCHKINF_74 0x74
-#define EVENTCHKINF_75 0x75
-#define EVENTCHKINF_76 0x76
-#define EVENTCHKINF_77 0x77
-#define EVENTCHKINF_78 0x78
+#define EVENTCHKINF_BEGAN_GOHMA_BATTLE 0x70
+#define EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE 0x71
+#define EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE 0x72
+#define EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE 0x73
+#define EVENTCHKINF_BEGAN_MORPHA_BATTLE 0x74
+#define EVENTCHKINF_BEGAN_TWINROVA_BATTLE 0x75
+#define EVENTCHKINF_BEGAN_BARINADE_BATTLE 0x76
+#define EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE 0x77
+#define EVENTCHKINF_BEGAN_GANONDORF_BATTLE 0x78
#define EVENTCHKINF_80 0x80
#define EVENTCHKINF_82 0x82
-#define EVENTCHKINF_8C 0x8C
-#define EVENTCHKINF_8D 0x8D
-#define EVENTCHKINF_8E 0x8E
-#define EVENTCHKINF_8F 0x8F
+#define EVENTCHKINF_PAID_BACK_KEATON_MASK 0x8C
+#define EVENTCHKINF_PAID_BACK_SKULL_MASK 0x8D
+#define EVENTCHKINF_PAID_BACK_SPOOKY_MASK 0x8E
+#define EVENTCHKINF_PAID_BACK_BUNNY_HOOD 0x8F
-// 0x90-0x93
-// carpenters freed from the gerudo
-#define EVENTCHKINF_CARPENTERS_FREE_INDEX 9
-#define EVENTCHKINF_CARPENTERS_FREE_SHIFT(n) (0 + (n))
-#define EVENTCHKINF_CARPENTERS_FREE_MASK(n) (1 << EVENTCHKINF_CARPENTERS_FREE_SHIFT(n))
-#define EVENTCHKINF_CARPENTERS_FREE(n) ((EVENTCHKINF_CARPENTERS_FREE_INDEX << 4) | EVENTCHKINF_CARPENTERS_FREE_SHIFT(n))
-#define EVENTCHKINF_CARPENTERS_FREE_MASK_ALL (\
- EVENTCHKINF_CARPENTERS_FREE_MASK(0) \
- | EVENTCHKINF_CARPENTERS_FREE_MASK(1) \
- | EVENTCHKINF_CARPENTERS_FREE_MASK(2) \
- | EVENTCHKINF_CARPENTERS_FREE_MASK(3) )
-#define GET_EVENTCHKINF_CARPENTERS_FREE_ALL() \
- CHECK_FLAG_ALL(gSaveContext.save.info.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX], EVENTCHKINF_CARPENTERS_FREE_MASK_ALL)
+// EVENTCHKINF 0x90-0x93
+// Carpenters rescued from Gerudo Fortress
+#define EVENTCHKINF_INDEX_CARPENTERS_RESCUED 0x9
+#define EVENTCHKINF_CARPENTER_0_RESCUED 0x90
+#define EVENTCHKINF_CARPENTER_1_RESCUED 0x91
+#define EVENTCHKINF_CARPENTER_2_RESCUED 0x92
+#define EVENTCHKINF_CARPENTER_3_RESCUED 0x93
+
+#define EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK \
+ (EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_0_RESCUED) | EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_1_RESCUED) | \
+ EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_2_RESCUED) | EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_3_RESCUED))
+
+#define GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED() \
+ ((gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] & EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK) == (EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK))
+
+#define GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED2() \
+ ((gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] & (EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK | 0xF0) & EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK) == (EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK))
+
+#define ENDAIKU_CARPENTER_RESCUED_MASK(carpenterType) (1 << (carpenterType))
+
+#define ENDAIKU_IS_CARPENTER_RESCUED(carpenterType) \
+ gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] & \
+ ENDAIKU_CARPENTER_RESCUED_MASK(carpenterType)
+
+#define ENDAIKU_SET_CARPENTER_RESCUED(carpenterType) \
+ gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] |= \
+ ENDAIKU_CARPENTER_RESCUED_MASK((carpenterType))
+
+#define GET_EVENTCHKINF_CARPENTERS_RESCUED_FLAGS() \
+ gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] & EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK
#define EVENTCHKINF_94 0x94
#define EVENTCHKINF_95 0x95
@@ -566,43 +653,35 @@ typedef enum LinkAge {
#define EVENTCHKINF_C8 0xC8
#define EVENTCHKINF_C9 0xC9
-// 0xD0-0xD6
-#define EVENTCHKINF_SONGS_FOR_FROGS_INDEX 13
-#define EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_SHIFT 0
-#define EVENTCHKINF_SONGS_FOR_FROGS_ZL_SHIFT 1
-#define EVENTCHKINF_SONGS_FOR_FROGS_EPONA_SHIFT 2
-#define EVENTCHKINF_SONGS_FOR_FROGS_SUNS_SHIFT 3
-#define EVENTCHKINF_SONGS_FOR_FROGS_SARIA_SHIFT 4
-#define EVENTCHKINF_SONGS_FOR_FROGS_SOT_SHIFT 5
-#define EVENTCHKINF_SONGS_FOR_FROGS_STORMS_SHIFT 6
-#define EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_ZL_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_ZL_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_EPONA_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_EPONA_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_SUNS_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_SUNS_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_SARIA_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_SARIA_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_SOT_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_SOT_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_STORMS_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_STORMS_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_CHOIR ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_ZL ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_ZL_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_EPONA ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_EPONA_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_SUNS ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_SUNS_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_SARIA ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_SARIA_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_SOT ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_SOT_SHIFT)
-#define EVENTCHKINF_SONGS_FOR_FROGS_STORMS ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_STORMS_SHIFT)
+// EVENTCHKINF 0xD0-0xD6
+#define EVENTCHKINF_INDEX_SONGS_FOR_FROGS EVENTCHKINF_INDEX(EVENTCHKINF_SONGS_FOR_FROGS_CHOIR)
+#define EVENTCHKINF_SONGS_FOR_FROGS_CHOIR 0xD0
+#define EVENTCHKINF_SONGS_FOR_FROGS_ZL 0xD1
+#define EVENTCHKINF_SONGS_FOR_FROGS_EPONA 0xD2
+#define EVENTCHKINF_SONGS_FOR_FROGS_SUNS 0xD3
+#define EVENTCHKINF_SONGS_FOR_FROGS_SARIA 0xD4
+#define EVENTCHKINF_SONGS_FOR_FROGS_SOT 0xD5
+#define EVENTCHKINF_SONGS_FOR_FROGS_STORMS 0xD6
-// 0xDA-0xDE
-#define EVENTCHKINF_DA_DB_DC_DD_DE_INDEX 13
-#define EVENTCHKINF_DA_MASK (1 << 10)
-#define EVENTCHKINF_DB_MASK (1 << 11)
-#define EVENTCHKINF_DC_MASK (1 << 12)
-#define EVENTCHKINF_DD_MASK (1 << 13)
-#define EVENTCHKINF_DE_MASK (1 << 14)
+// EVENTCHKINF 0xDA-0xDE
+#define EVENTCHKINF_INDEX_SKULLTULA_REWARD 0xD
+#define EVENTCHKINF_SKULLTULA_REWARD_10 0xDA
+#define EVENTCHKINF_SKULLTULA_REWARD_20 0xDB
+#define EVENTCHKINF_SKULLTULA_REWARD_30 0xDC
+#define EVENTCHKINF_SKULLTULA_REWARD_40 0xDD
+#define EVENTCHKINF_SKULLTULA_REWARD_50 0xDE
/*
* SaveContext.itemGetInf
*/
+#define ITEMGETINF_INDEX(flag) ((flag) >> 4)
+#define ITEMGETINF_MASK(flag) (1 << ((flag) & 0xF))
+
+#define GET_ITEMGETINF(flag) (gSaveContext.save.info.itemGetInf[ITEMGETINF_INDEX(flag)] & ITEMGETINF_MASK(flag))
+#define SET_ITEMGETINF(flag) (gSaveContext.save.info.itemGetInf[ITEMGETINF_INDEX(flag)] |= ITEMGETINF_MASK(flag))
+
#define ITEMGETINF_TALON_BOTTLE 0x02
#define ITEMGETINF_03 0x03
#define ITEMGETINF_04 0x04
@@ -625,23 +704,20 @@ typedef enum LinkAge {
#define ITEMGETINF_16 0x16
#define ITEMGETINF_17 0x17
-// 0x18-0x1A
-#define ITEMGETINF_18_19_1A_INDEX 1
-#define ITEMGETINF_18_SHIFT 8
-#define ITEMGETINF_19_SHIFT 9
-#define ITEMGETINF_1A_SHIFT 10
-#define ITEMGETINF_18_MASK (1 << ITEMGETINF_18_SHIFT)
-#define ITEMGETINF_19_MASK (1 << ITEMGETINF_19_SHIFT)
-#define ITEMGETINF_1A_MASK (1 << ITEMGETINF_1A_SHIFT)
-#define ITEMGETINF_18 ((ITEMGETINF_18_19_1A_INDEX << 4) | ITEMGETINF_18_SHIFT)
-#define ITEMGETINF_19 ((ITEMGETINF_18_19_1A_INDEX << 4) | ITEMGETINF_19_SHIFT)
-#define ITEMGETINF_1A ((ITEMGETINF_18_19_1A_INDEX << 4) | ITEMGETINF_1A_SHIFT)
+// ITEMGETINF 0x18-0x1A
+#define ITEMGETINF_INDEX_18_19_1A 1
+#define ITEMGETINF_18 0x18
+#define ITEMGETINF_19 0x19
+#define ITEMGETINF_1A 0x1A
#define ITEMGETINF_1B 0x1B
#define ITEMGETINF_1C 0x1C
#define ITEMGETINF_1D 0x1D
-#define ITEMGETINF_1E 0x1E
-#define ITEMGETINF_1F 0x1F
+#define ITEMGETINF_FOREST_STAGE_STICK_UPGRADE 0x1E
+// This flag is shared by two events; It is set when obtaining the Deku Nut upgrade at the Forest Stage and when obtaining Poachers Saw.
+// This will make obtaining the Deku Nut upgrade impossible if Poachers Saw is obtained first.
+// This flag is never read for the Poachers Saw event, so the overlap only causes an issue for the Deku Nut Upgrade. It will not prevent obtaining Poachers Saw.
+#define ITEMGETINF_FOREST_STAGE_NUT_UPGRADE 0x1F
#define ITEMGETINF_23 0x23
#define ITEMGETINF_24 0x24
#define ITEMGETINF_25 0x25
@@ -662,6 +738,15 @@ typedef enum LinkAge {
* SaveContext.infTable
*/
+#define INFTABLE_INDEX(flag) ((flag) >> 4)
+#define INFTABLE_MASK(flag) (1 << ((flag) & 0xF))
+
+#define GET_INFTABLE(flag) (gSaveContext.save.info.infTable[INFTABLE_INDEX(flag)] & INFTABLE_MASK(flag))
+#define SET_INFTABLE(flag) (gSaveContext.save.info.infTable[INFTABLE_INDEX(flag)] |= INFTABLE_MASK(flag))
+#define CLEAR_INFTABLE(flag) (gSaveContext.save.info.infTable[INFTABLE_INDEX(flag)] &= ~INFTABLE_MASK(flag))
+
+// INFTABLE 0x0-0xF
+#define INFTABLE_INDEX_0 0
#define INFTABLE_00 0x00
#define INFTABLE_01 0x01
#define INFTABLE_03 0x03
@@ -789,18 +874,18 @@ typedef enum LinkAge {
#define INFTABLE_197 0x197
#define INFTABLE_198 0x198
-// 0x199-0x19F
-#define INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX 25
-#define INFTABLE_199_MASK (1 << 9)
-#define INFTABLE_19A_MASK (1 << 10)
-#define INFTABLE_19B_MASK (1 << 11)
-#define INFTABLE_19C_MASK (1 << 12)
-#define INFTABLE_19D_MASK (1 << 13)
-#define INFTABLE_19E_MASK (1 << 14)
-#define INFTABLE_19F_MASK (1 << 15)
+// INFTABLE 0x199-0x19F
+#define INFTABLE_INDEX_199_19A_19B_19C_19D_19E_19F 25
+#define INFTABLE_199 0x199
+#define INFTABLE_19A 0x19A
+#define INFTABLE_19B 0x19B
+#define INFTABLE_19C 0x19C
+#define INFTABLE_19D 0x19D
+#define INFTABLE_19E 0x19E
+#define INFTABLE_19F 0x19F
-// 0x1A0-0x1AF
-#define INFTABLE_1AX_INDEX 26
+// INFTABLE 0x1A0-0x1AF
+#define INFTABLE_INDEX_1AX 26
#define INFTABLE_1A0_SHIFT 0
#define INFTABLE_1A1_SHIFT 1
#define INFTABLE_1A2_SHIFT 2
@@ -814,83 +899,101 @@ typedef enum LinkAge {
#define INFTABLE_1AB_SHIFT 11
#define INFTABLE_1AD_SHIFT 13
-// 0x1D0-0x1DF
-#define INFTABLE_1DX_INDEX 29
+// INFTABLE 0x1D0-0x1DF
+#define INFTABLE_INDEX_1DX INFTABLE_INDEX(INFTABLE_1D0)
+#define INFTABLE_1D0 0x1D0
/*
* SaveContext.eventInf
*/
-// 0x00-0x0F
-// horses related
-#define EVENTINF_HORSES_INDEX 0
-#define EVENTINF_HORSES_STATE_SHIFT 0
-#define EVENTINF_HORSES_HORSETYPE_SHIFT 4
-#define EVENTINF_HORSES_05_SHIFT 5
-#define EVENTINF_HORSES_06_SHIFT 6
-#define EVENTINF_HORSES_08_SHIFT 8
-#define EVENTINF_HORSES_0A_SHIFT 10
-#define EVENTINF_HORSES_0F_SHIFT 15 // unused?
-#define EVENTINF_HORSES_STATE_MASK (0xF << EVENTINF_HORSES_STATE_SHIFT)
-#define EVENTINF_HORSES_HORSETYPE_MASK (1 << EVENTINF_HORSES_HORSETYPE_SHIFT)
-#define EVENTINF_HORSES_05_MASK (1 << EVENTINF_HORSES_05_SHIFT)
-#define EVENTINF_HORSES_06_MASK (1 << EVENTINF_HORSES_06_SHIFT)
-#define EVENTINF_HORSES_0F_MASK (1 << EVENTINF_HORSES_0F_SHIFT)
-#define EVENTINF_HORSES_05 ((EVENTINF_HORSES_INDEX << 4) | EVENTINF_HORSES_05_SHIFT)
-#define EVENTINF_HORSES_06 ((EVENTINF_HORSES_INDEX << 4) | EVENTINF_HORSES_06_SHIFT)
+#define EVENTINF_INDEX(flag) ((flag) >> 4)
+#define EVENTINF_MASK(flag) (1 << ((flag) & 0xF))
+
+#define GET_EVENTINF(flag) (gSaveContext.eventInf[EVENTINF_INDEX(flag)] & EVENTINF_MASK(flag))
+#define SET_EVENTINF(flag) (gSaveContext.eventInf[EVENTINF_INDEX(flag)] |= EVENTINF_MASK(flag))
+#define CLEAR_EVENTINF(flag) (gSaveContext.eventInf[EVENTINF_INDEX(flag)] &= ~EVENTINF_MASK(flag))
+
+// EVENTINF 0x00-0x0F
+// Ingo Race, Lon Lon Ranch minigames, and Horseback Archery minigame flags
+#define EVENTINF_INDEX_HORSES 0
+// EVENTINF 0x00-0x03 reserved for IngoRaceState
+#define EVENTINF_INGO_RACE_STATE_MASK (0xF << 0x00)
+typedef enum IngoRaceState {
+ /* 0 */ INGO_RACE_STATE_OFFER_RENTAL,
+ /* 1 */ INGO_RACE_STATE_HORSE_RENTAL_PERIOD,
+ /* 2 */ INGO_RACE_STATE_RACING,
+ /* 3 */ INGO_RACE_STATE_PLAYER_LOSE,
+ /* 4 */ INGO_RACE_STATE_FIRST_WIN,
+ /* 5 */ INGO_RACE_STATE_TRAPPED_WIN_UNUSED,
+ /* 6 */ INGO_RACE_STATE_TRAPPED_WIN_EPONA, // Ingo Traps you in Lon Lon
+ /* 7 */ INGO_RACE_STATE_REMATCH
+} IngoRaceState;
+
+#define EVENTINF_INGO_RACE_HORSETYPE 0x04
+#define EVENTINF_INGO_RACE_LOST_ONCE 0x05
+#define EVENTINF_INGO_RACE_SECOND_RACE 0x06
// Used in z_en_ta (Talon) to store Cucco game winning status
// and in z_en_ge1 (Gerudo) to store archery in-progress status
-#define EVENTINF_HORSES_08 ((EVENTINF_HORSES_INDEX << 4) | EVENTINF_HORSES_08_SHIFT)
+#define EVENTINF_HORSES_08 0x08
#define EVENTINF_CUCCO_GAME_WON EVENTINF_HORSES_08
// Used in z_en_ta (Talon) and z_en_ma3 (Malon) to store minigame finishing status
-#define EVENTINF_HORSES_0A ((EVENTINF_HORSES_INDEX << 4) | EVENTINF_HORSES_0A_SHIFT)
+#define EVENTINF_HORSES_0A 0x0A
#define EVENTINF_CUCCO_GAME_FINISHED EVENTINF_HORSES_0A
-
-typedef enum EventInfHorsesState {
- /* 0 */ EVENTINF_HORSES_STATE_0,
- /* 1 */ EVENTINF_HORSES_STATE_1,
- /* 2 */ EVENTINF_HORSES_STATE_2,
- /* 3 */ EVENTINF_HORSES_STATE_3,
- /* 4 */ EVENTINF_HORSES_STATE_4,
- /* 5 */ EVENTINF_HORSES_STATE_5,
- /* 6 */ EVENTINF_HORSES_STATE_6,
- /* 7 */ EVENTINF_HORSES_STATE_7
-} EventInfHorsesState;
+#define EVENTINF_INGO_RACE_0F 0x0F // unused?
// "InRaceSeq"
-#define GET_EVENTINF_HORSES_STATE() \
- ((gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & EVENTINF_HORSES_STATE_MASK) >> EVENTINF_HORSES_STATE_SHIFT)
-#define SET_EVENTINF_HORSES_STATE(v) \
- gSaveContext.eventInf[EVENTINF_HORSES_INDEX] = \
- (gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & ~EVENTINF_HORSES_STATE_MASK) | \
- ((v) << EVENTINF_HORSES_STATE_SHIFT)
+#define GET_EVENTINF_INGO_RACE_STATE() (gSaveContext.eventInf[EVENTINF_INDEX_HORSES] & EVENTINF_INGO_RACE_STATE_MASK)
-#define GET_EVENTINF_HORSES_HORSETYPE() \
- ((gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & EVENTINF_HORSES_HORSETYPE_MASK) >> EVENTINF_HORSES_HORSETYPE_SHIFT)
-#define SET_EVENTINF_HORSES_HORSETYPE(v) \
- gSaveContext.eventInf[EVENTINF_HORSES_INDEX] = \
- (gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & ~EVENTINF_HORSES_HORSETYPE_MASK) | \
- ((v) << EVENTINF_HORSES_HORSETYPE_SHIFT)
+#define SET_EVENTINF_INGO_RACE_STATE(v) \
+ gSaveContext.eventInf[EVENTINF_INDEX_HORSES] = \
+ (gSaveContext.eventInf[EVENTINF_INDEX_HORSES] & ~EVENTINF_INGO_RACE_STATE_MASK) | (v)
-#define SET_EVENTINF_HORSES_0F(v) \
- gSaveContext.eventInf[EVENTINF_HORSES_INDEX] = \
- (gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & ~EVENTINF_HORSES_0F_MASK) | ((v) << EVENTINF_HORSES_0F_SHIFT)
+#define GET_EVENTINF_INGO_RACE_FLAG(flag) \
+ ((gSaveContext.eventInf[EVENTINF_INDEX_HORSES] & EVENTINF_MASK(flag)) >> ((flag) & 0xF))
+#define SET_EVENTINF_INGO_RACE_FLAG(flag) \
+ gSaveContext.eventInf[EVENTINF_INDEX_HORSES] = \
+ (gSaveContext.eventInf[EVENTINF_INDEX_HORSES] & 0xFFFF) | EVENTINF_MASK(flag)
+
+#define WRITE_EVENTINF_INGO_RACE_FLAG(flag, v) \
+ gSaveContext.eventInf[EVENTINF_INDEX_HORSES] = \
+ (gSaveContext.eventInf[EVENTINF_INDEX_HORSES] & ~EVENTINF_MASK(flag)) | ((v) << ((flag) & 0xF))
+
+#define GET_EVENTINF_INGO_RACE_HORSETYPE() GET_EVENTINF_INGO_RACE_FLAG(EVENTINF_INGO_RACE_HORSETYPE)
+#define WRITE_EVENTINF_INGO_RACE_HORSETYPE(v) WRITE_EVENTINF_INGO_RACE_FLAG(EVENTINF_INGO_RACE_HORSETYPE, v)
+
+#define WRITE_EVENTINF_INGO_RACE_0F(v) WRITE_EVENTINF_INGO_RACE_FLAG(EVENTINF_INGO_RACE_0F, v)
// Is the running man race active
#define EVENTINF_MARATHON_ACTIVE 0x10
-// 0x20-0x24
-#define EVENTINF_20_21_22_23_24_INDEX 2
-#define EVENTINF_20_MASK (1 << 0)
-#define EVENTINF_21_MASK (1 << 1)
-#define EVENTINF_22_MASK (1 << 2)
-#define EVENTINF_23_MASK (1 << 3)
-#define EVENTINF_24_MASK (1 << 4)
+// EVENTINF 0x20-0x24
+#define EVENTINF_INDEX_HAGGLING_TOWNSFOLK 0x2
+#define EVENTINF_HAGGLING_TOWNSFOLK_MESG_0 0x20
+#define EVENTINF_HAGGLING_TOWNSFOLK_MESG_1 0x21
+#define EVENTINF_HAGGLING_TOWNSFOLK_MESG_2 0x22
+#define EVENTINF_HAGGLING_TOWNSFOLK_MESG_3 0x23
+#define EVENTINF_HAGGLING_TOWNSFOLK_MESG_4 0x24
+
+#define EVENTINF_HAGGLING_TOWNSFOLK_MASK \
+ (EVENTINF_MASK(EVENTINF_HAGGLING_TOWNSFOLK_MESG_0) | EVENTINF_MASK(EVENTINF_HAGGLING_TOWNSFOLK_MESG_1) | \
+ EVENTINF_MASK(EVENTINF_HAGGLING_TOWNSFOLK_MESG_2) | EVENTINF_MASK(EVENTINF_HAGGLING_TOWNSFOLK_MESG_3) | \
+ EVENTINF_MASK(EVENTINF_HAGGLING_TOWNSFOLK_MESG_4))
+
+#define GET_EVENTINF_ENMU_TALK_FLAGS() \
+ gSaveContext.eventInf[EVENTINF_INDEX_HAGGLING_TOWNSFOLK] & EVENTINF_HAGGLING_TOWNSFOLK_MASK
+
+#define SET_EVENTINF_ENMU_TALK_FLAGS(talkFlags) \
+ gSaveContext.eventInf[EVENTINF_INDEX_HAGGLING_TOWNSFOLK] |= (talkFlags);
+
+#define RESET_EVENTINF_ENMU_TALK_FLAGS() \
+ gSaveContext.eventInf[EVENTINF_INDEX_HAGGLING_TOWNSFOLK] &= ~(EVENTINF_HAGGLING_TOWNSFOLK_MASK);
#define EVENTINF_30 0x30
+void SaveContext_Init(void);
extern SaveContext gSaveContext;
diff --git a/include/z64scene.h b/include/z64scene.h
index 87c8927d9f..09b342c047 100644
--- a/include/z64scene.h
+++ b/include/z64scene.h
@@ -1,17 +1,19 @@
#ifndef Z64SCENE_H
#define Z64SCENE_H
-#include "macros.h"
+#include "avoid_ub.h"
#include "ultra64.h"
#include "z64bgcheck.h"
-#include "z64dma.h"
#include "z64environment.h"
#include "z64light.h"
#include "z64math.h"
+#include "z64path.h"
#include "command_macros_base.h"
+struct GameState;
struct PlayState;
+struct RoomShapeBase;
typedef struct SceneTableEntry {
/* 0x00 */ RomFile sceneFile;
@@ -50,159 +52,6 @@ typedef struct Spawn {
/* 0x01 */ u8 room;
} Spawn;
-typedef struct Path {
- /* 0x00 */ u8 count; // number of points in the path
- /* 0x04 */ Vec3s* points; // Segment Address to the array of points
-} Path; // size = 0x8
-
-// Room shapes
-
-typedef enum RoomShapeType {
- /* 0 */ ROOM_SHAPE_TYPE_NORMAL,
- /* 1 */ ROOM_SHAPE_TYPE_IMAGE,
- /* 2 */ ROOM_SHAPE_TYPE_CULLABLE,
- /* 3 */ ROOM_SHAPE_TYPE_MAX
-} RoomShapeType;
-
-typedef struct RoomShapeBase {
- /* 0x00 */ u8 type;
-} RoomShapeBase; // size = 0x01
-
-typedef struct RoomShapeDListsEntry {
- /* 0x00 */ Gfx* opa;
- /* 0x04 */ Gfx* xlu;
-} RoomShapeDListsEntry; // size = 0x08
-
-typedef struct RoomShapeNormal {
- /* 0x00 */ RoomShapeBase base;
- /* 0x01 */ u8 numEntries;
- /* 0x04 */ RoomShapeDListsEntry* entries;
- /* 0x08 */ RoomShapeDListsEntry* entriesEnd;
-} RoomShapeNormal; // size = 0x0C
-
-typedef enum RoomShapeImageAmountType {
- /* 1 */ ROOM_SHAPE_IMAGE_AMOUNT_SINGLE = 1,
- /* 2 */ ROOM_SHAPE_IMAGE_AMOUNT_MULTI
-} RoomShapeImageAmountType;
-
-typedef struct RoomShapeImageBase {
- /* 0x00 */ RoomShapeBase base;
- /* 0x01 */ u8 amountType; // RoomShapeImageAmountType
- /* 0x04 */ RoomShapeDListsEntry* entry;
-} RoomShapeImageBase; // size = 0x08
-
-typedef struct RoomShapeImageSingle {
- /* 0x00 */ RoomShapeImageBase base;
- /* 0x08 */ void* source;
- /* 0x0C */ u32 unk_0C;
- /* 0x10 */ void* tlut;
- /* 0x14 */ u16 width;
- /* 0x16 */ u16 height;
- /* 0x18 */ u8 fmt;
- /* 0x19 */ u8 siz;
- /* 0x1A */ u16 tlutMode;
- /* 0x1C */ u16 tlutCount;
-} RoomShapeImageSingle; // size = 0x20
-
-typedef struct RoomShapeImageMultiBgEntry {
- /* 0x00 */ u16 unk_00;
- /* 0x02 */ u8 bgCamIndex; // for which bg cam index is this entry for
- /* 0x04 */ void* source;
- /* 0x08 */ u32 unk_0C;
- /* 0x0C */ void* tlut;
- /* 0x10 */ u16 width;
- /* 0x12 */ u16 height;
- /* 0x14 */ u8 fmt;
- /* 0x15 */ u8 siz;
- /* 0x16 */ u16 tlutMode;
- /* 0x18 */ u16 tlutCount;
-} RoomShapeImageMultiBgEntry; // size = 0x1C
-
-typedef struct RoomShapeImageMulti {
- /* 0x00 */ RoomShapeImageBase base;
- /* 0x08 */ u8 numBackgrounds;
- /* 0x0C */ RoomShapeImageMultiBgEntry* backgrounds;
-} RoomShapeImageMulti; // size = 0x10
-
-typedef struct RoomShapeCullableEntry {
- /* 0x00 */ Vec3s boundsSphereCenter;
- /* 0x06 */ s16 boundsSphereRadius;
- /* 0x08 */ Gfx* opa;
- /* 0x0C */ Gfx* xlu;
-} RoomShapeCullableEntry; // size = 0x10
-
-#define ROOM_SHAPE_CULLABLE_MAX_ENTRIES 64
-
-typedef struct RoomShapeCullable {
- /* 0x00 */ RoomShapeBase base;
- /* 0x01 */ u8 numEntries;
- /* 0x04 */ RoomShapeCullableEntry* entries;
- /* 0x08 */ RoomShapeCullableEntry* entriesEnd;
-} RoomShapeCullable; // size = 0x0C
-
-typedef union RoomShape {
- RoomShapeBase base;
- RoomShapeNormal normal;
- union {
- RoomShapeImageBase base;
- RoomShapeImageSingle single;
- RoomShapeImageMulti multi;
- } image;
- RoomShapeCullable cullable;
-} RoomShape; // "Ground Shape"
-
-typedef enum RoomBehaviorType1 {
- /* 0 */ ROOM_BEHAVIOR_TYPE1_0,
- /* 1 */ ROOM_BEHAVIOR_TYPE1_1,
- /* 2 */ ROOM_BEHAVIOR_TYPE1_2,
- /* 3 */ ROOM_BEHAVIOR_TYPE1_3, // unused
- /* 4 */ ROOM_BEHAVIOR_TYPE1_4, // unused
- /* 5 */ ROOM_BEHAVIOR_TYPE1_5
-} RoomBehaviorType1;
-
-typedef enum RoomBehaviorType2 {
- /* 0 */ ROOM_BEHAVIOR_TYPE2_0,
- /* 1 */ ROOM_BEHAVIOR_TYPE2_1,
- /* 2 */ ROOM_BEHAVIOR_TYPE2_2,
- /* 3 */ ROOM_BEHAVIOR_TYPE2_3,
- /* 4 */ ROOM_BEHAVIOR_TYPE2_4,
- /* 5 */ ROOM_BEHAVIOR_TYPE2_5,
- /* 6 */ ROOM_BEHAVIOR_TYPE2_6
-} RoomBehaviorType2;
-
-typedef struct Room {
- /* 0x00 */ s8 num; // -1 is invalid room
- /* 0x01 */ u8 unk_01;
- /* 0x02 */ u8 behaviorType2;
- /* 0x03 */ u8 behaviorType1;
- /* 0x04 */ s8 echo;
- /* 0x05 */ u8 lensMode;
- /* 0x08 */ RoomShape* roomShape; // original name: "ground_shape"
- /* 0x0C */ void* segment;
- /* 0x10 */ char unk_10[0x4];
-} Room; // size = 0x14
-
-typedef struct RoomContext {
- /* 0x00 */ Room curRoom;
- /* 0x14 */ Room prevRoom;
- /* 0x28 */ void* bufPtrs[2]; // Start and end pointers for the room buffer. Can be split into two pages, where page 0 is allocated from the start pointer and page 1 is allocated from the end pointer.
- /* 0x30 */ u8 activeBufPage; // 0 - First page in memory, 1 - Last page in memory
- /* 0x31 */ s8 status; // 0 - Free for new room request, 1 - DmaRequest for a new room is in progress
- /* 0x34 */ void* roomRequestAddr; // Pointer to where the requested room segment will be stored
- /* 0x38 */ DmaRequest dmaRequest;
- /* 0x58 */ OSMesgQueue loadQueue;
- /* 0x70 */ OSMesg loadMsg;
- /* 0x74 */ s16 drawParams[2]; // context-specific data used by the current scene draw config
-} RoomContext; // size = 0x78
-
-typedef struct RoomList {
- /* 0x00 */ u8 count;
- /* 0x04 */ RomFile* romFiles; // Array of rom addresses for each room in a scene
-} RoomList;
-
-#define ROOM_DRAW_OPA (1 << 0)
-#define ROOM_DRAW_XLU (1 << 1)
-
// Scene commands
typedef struct SCmdBase {
@@ -272,7 +121,7 @@ typedef struct SCmdRoomBehavior {
typedef struct SCmdMesh {
/* 0x00 */ u8 code;
/* 0x01 */ u8 data1;
- /* 0x04 */ RoomShapeBase* data;
+ /* 0x04 */ struct RoomShapeBase* data;
} SCmdMesh;
typedef struct SCmdObjectList {
@@ -417,7 +266,7 @@ typedef enum SceneID {
#undef DEFINE_SCENE
// Fake enum values for scenes that are still referenced in the entrance table
-#if !OOT_DEBUG
+#if !DEBUG_ASSETS
// Debug-only scenes
#define SCENE_TEST01 0x65
#define SCENE_BESITU 0x66
@@ -432,6 +281,26 @@ typedef enum SceneID {
// Deleted scene
#define SCENE_UNUSED_6E 0x6E
+// Macros for `EntranceInfo.field`
+#define ENTRANCE_INFO_CONTINUE_BGM_FLAG (1 << 15)
+#define ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG (1 << 14)
+#define ENTRANCE_INFO_END_TRANS_TYPE_MASK 0x3F80
+#define ENTRANCE_INFO_END_TRANS_TYPE_SHIFT 7
+#define ENTRANCE_INFO_END_TRANS_TYPE(field) \
+ (((field) >> ENTRANCE_INFO_END_TRANS_TYPE_SHIFT) \
+ & (ENTRANCE_INFO_END_TRANS_TYPE_MASK >> ENTRANCE_INFO_END_TRANS_TYPE_SHIFT))
+#define ENTRANCE_INFO_START_TRANS_TYPE_MASK 0x7F
+#define ENTRANCE_INFO_START_TRANS_TYPE_SHIFT 0
+#define ENTRANCE_INFO_START_TRANS_TYPE(field) \
+ (((field) >> ENTRANCE_INFO_START_TRANS_TYPE_SHIFT) \
+ & (ENTRANCE_INFO_START_TRANS_TYPE_MASK >> ENTRANCE_INFO_START_TRANS_TYPE_SHIFT))
+
+typedef struct EntranceInfo {
+ /* 0x00 */ s8 sceneId;
+ /* 0x01 */ s8 spawn;
+ /* 0x02 */ u16 field;
+} EntranceInfo; // size = 0x4
+
// Entrance Index Enum
#define DEFINE_ENTRANCE(enum, _1, _2, _3, _4, _5, _6) enum,
@@ -584,9 +453,9 @@ typedef enum SceneCommandTypeID {
#define SCENE_CMD_SPECIAL_FILES(naviQuestHintFileId, keepObjectId) \
{ SCENE_CMD_ID_SPECIAL_FILES, naviQuestHintFileId, CMD_W(keepObjectId) }
-#define SCENE_CMD_ROOM_BEHAVIOR(curRoomUnk3, curRoomUnk2, showInvisActors, disableWarpSongs) \
- { SCENE_CMD_ID_ROOM_BEHAVIOR, curRoomUnk3, \
- curRoomUnk2 | _SHIFTL(showInvisActors, 8, 1) | _SHIFTL(disableWarpSongs, 10, 1) }
+#define SCENE_CMD_ROOM_BEHAVIOR(type, environment, showInvisActors, disableWarpSongs) \
+ { SCENE_CMD_ID_ROOM_BEHAVIOR, type, \
+ environment | _SHIFTL(showInvisActors, 8, 1) | _SHIFTL(disableWarpSongs, 10, 1) }
#define SCENE_CMD_UNK_09() \
{ SCENE_CMD_ID_UNDEFINED_9, 0, CMD_W(0) }
@@ -639,5 +508,12 @@ typedef enum SceneCommandTypeID {
#define SCENE_CMD_MISC_SETTINGS(sceneCamType, worldMapLocation) \
{ SCENE_CMD_ID_MISC_SETTINGS, sceneCamType, CMD_W(worldMapLocation) }
+s32 Scene_ExecuteCommands(struct PlayState* play, SceneCmd* sceneCmd);
+void Scene_ResetTransitionActorList(struct GameState* state, TransitionActorList* transitionActors);
+void Scene_SetTransitionForNextEntrance(struct PlayState* play);
+void Scene_Draw(struct PlayState* play);
+
+extern EntranceInfo gEntranceTable[ENTR_MAX];
+extern SceneTableEntry gSceneTable[SCENE_ID_MAX];
#endif
diff --git a/include/z64skin.h b/include/z64skin.h
index d29c7c7482..641a980925 100644
--- a/include/z64skin.h
+++ b/include/z64skin.h
@@ -3,6 +3,10 @@
#include "z64animation.h"
+struct Actor;
+struct GraphicsContext;
+struct PlayState;
+
/**
* Holds a compact version of a vertex used in the Skin system
* It is used to initialise the Vtx used by an animated limb
@@ -75,4 +79,19 @@ typedef s32 (*SkinOverrideLimbDraw)(struct Actor*, struct PlayState*, s32, Skin*
#define SKIN_TRANSFORM_IS_FHG 0x23
+void Skin_UpdateVertices(MtxF* mtx, SkinVertex* skinVertices, SkinLimbModif* modifEntry, Vtx* vtxBuf, Vec3f* pos);
+void Skin_DrawAnimatedLimb(struct GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, s32 arg3, s32 drawFlags);
+void Skin_DrawLimb(struct GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, Gfx* dlistOverride, s32 drawFlags);
+void func_800A6330(struct Actor* actor, struct PlayState* play, Skin* skin, SkinPostDraw postDraw, s32 setTranslation);
+void func_800A6360(struct Actor* actor, struct PlayState* play, Skin* skin, SkinPostDraw postDraw,
+ SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation);
+void func_800A6394(struct Actor* actor, struct PlayState* play, Skin* skin, SkinPostDraw postDraw,
+ SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation, s32 arg6);
+void func_800A63CC(struct Actor* actor, struct PlayState* play, Skin* skin, SkinPostDraw postDraw,
+ SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation, s32 arg6, s32 drawFlags);
+void Skin_GetLimbPos(Skin* skin, s32 limbIndex, Vec3f* offset, Vec3f* dst);
+void Skin_Init(struct PlayState* play, Skin* skin, SkeletonHeader* skeletonHeader, AnimationHeader* animationHeader);
+void Skin_Free(struct PlayState* play, Skin* skin);
+s32 Skin_ApplyAnimTransformations(Skin* skin, MtxF* limbMatrices, struct Actor* actor, s32 setTranslation);
+
#endif
diff --git a/include/z64skin_matrix.h b/include/z64skin_matrix.h
new file mode 100644
index 0000000000..647790abff
--- /dev/null
+++ b/include/z64skin_matrix.h
@@ -0,0 +1,25 @@
+#ifndef Z64SKIN_MATRIX_H
+#define Z64SKIN_MATRIX_H
+
+#include "ultra64.h"
+#include "z64math.h"
+
+struct GraphicsContext;
+
+void SkinMatrix_Vec3fMtxFMultXYZW(MtxF* mf, Vec3f* src, Vec3f* xyzDest, f32* wDest);
+void SkinMatrix_Vec3fMtxFMultXYZ(MtxF* mf, Vec3f* src, Vec3f* dest);
+void SkinMatrix_MtxFMtxFMult(MtxF* mfA, MtxF* mfB, MtxF* dest);
+void SkinMatrix_GetClear(MtxF** mfp);
+void SkinMatrix_MtxFCopy(MtxF* src, MtxF* dest);
+s32 SkinMatrix_Invert(MtxF* src, MtxF* dest);
+void SkinMatrix_SetScale(MtxF* mf, f32 x, f32 y, f32 z);
+void SkinMatrix_SetRotateZYX(MtxF* mf, s16 x, s16 y, s16 z);
+void SkinMatrix_SetTranslate(MtxF* mf, f32 x, f32 y, f32 z);
+void SkinMatrix_SetTranslateRotateYXZScale(MtxF* dest, f32 scaleX, f32 scaleY, f32 scaleZ, s16 rotX, s16 rotY, s16 rotZ,
+ f32 translateX, f32 translateY, f32 translateZ);
+void SkinMatrix_SetTranslateRotateZYX(MtxF* dest, s16 rotX, s16 rotY, s16 rotZ, f32 translateX, f32 translateY,
+ f32 translateZ);
+Mtx* SkinMatrix_MtxFToNewMtx(struct GraphicsContext* gfxCtx, MtxF* src);
+void SkinMatrix_SetRotateAxis(MtxF* mf, s16 angle, f32 axisX, f32 axisY, f32 axisZ);
+
+#endif
diff --git a/include/z64skybox.h b/include/z64skybox.h
index e0ebcf0c03..60b3bbb7d3 100644
--- a/include/z64skybox.h
+++ b/include/z64skybox.h
@@ -4,8 +4,8 @@
#include "ultra64/ultratypes.h"
#include "ultra64/gbi.h"
+#include "romfile.h"
#include "z64math.h"
-#include "z64dma.h" // for RomFile
struct GameState;
struct GraphicsContext;
diff --git a/include/z64sram.h b/include/z64sram.h
index 36478c1716..f1d05b7775 100644
--- a/include/z64sram.h
+++ b/include/z64sram.h
@@ -3,6 +3,9 @@
#include "ultra64/ultratypes.h"
+struct FileSelectState;
+struct GameState;
+
typedef struct SramContext {
/* 0x00 */ u8* readBuff;
} SramContext; // size = 0x4
@@ -12,9 +15,24 @@ typedef struct SramContext {
typedef enum SramHeaderField {
/* 0x00 */ SRAM_HEADER_SOUND,
- /* 0x01 */ SRAM_HEADER_ZTARGET,
+ /* 0x01 */ SRAM_HEADER_Z_TARGET,
/* 0x02 */ SRAM_HEADER_LANGUAGE,
- /* 0x03 */ SRAM_HEADER_MAGIC // must be the value of `sZeldaMagic` for save to be considered valid
+ /* 0x03 */ SRAM_HEADER_MAGIC // must be the value in `sSramDefaultHeader` for save to be considered valid
} SramHeaderField;
+extern u16 gSramSlotOffsets[];
+
+void Sram_InitNewSave(void);
+void Sram_InitDebugSave(void);
+void Sram_OpenSave(SramContext* sramCtx);
+void Sram_WriteSave(SramContext* sramCtx);
+void Sram_VerifyAndLoadAllSaves(struct FileSelectState* fileSelect, SramContext* sramCtx);
+void Sram_InitSave(struct FileSelectState* fileSelect, SramContext* sramCtx);
+void Sram_EraseSave(struct FileSelectState* fileSelect, SramContext* sramCtx);
+void Sram_CopySave(struct FileSelectState* fileSelect, SramContext* sramCtx);
+void Sram_WriteSramHeader(SramContext* sramCtx);
+void Sram_InitSram(struct GameState* gameState, SramContext* sramCtx);
+void Sram_Alloc(struct GameState* gameState, SramContext* sramCtx);
+void Sram_Init(struct GameState* gameState, SramContext* sramCtx);
+
#endif
diff --git a/include/z64ss_sram.h b/include/z64ss_sram.h
new file mode 100644
index 0000000000..4168446263
--- /dev/null
+++ b/include/z64ss_sram.h
@@ -0,0 +1,12 @@
+#ifndef Z64SS_SRAM_H
+#define Z64SS_SRAM_H
+
+#include "stddef.h"
+#include "ultra64/ultratypes.h"
+
+void SsSram_Init(s32 addr, u8 handleType, u8 handleDomain, u8 handleLatency, u8 handlePageSize, u8 handleRelDuration,
+ u8 handlePulse, u32 handleSpeed);
+void SsSram_Dma(void* dramAddr, size_t size, s32 direction);
+void SsSram_ReadWrite(s32 addr, void* dramAddr, size_t size, s32 direction);
+
+#endif
diff --git a/include/z64thread.h b/include/z64thread.h
new file mode 100644
index 0000000000..c4ab827b42
--- /dev/null
+++ b/include/z64thread.h
@@ -0,0 +1,33 @@
+#ifndef Z64THREAD_H
+#define Z64THREAD_H
+
+#include "ultra64.h"
+
+#define THREAD_ID_IDLE 1
+#define THREAD_ID_FAULT 2
+#define THREAD_ID_MAIN 3
+#define THREAD_ID_GRAPH 4
+#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
+#define THREAD_ID_DMAMGR 18
+#define THREAD_ID_IRQMGR 19
+
+#define THREAD_PRI_IDLE_INIT 10
+#define THREAD_PRI_MAIN_INIT 10
+#define THREAD_PRI_DMAMGR_LOW 10 // Used when decompressing files
+#define THREAD_PRI_GRAPH 11
+#define THREAD_PRI_AUDIOMGR 12
+#define THREAD_PRI_N64DD 13
+#define THREAD_PRI_DDMSG 13
+#define THREAD_PRI_PADMGR 14
+#define THREAD_PRI_MAIN 15
+#define THREAD_PRI_SCHED 15
+#define THREAD_PRI_DMAMGR 16
+#define THREAD_PRI_IRQMGR 17
+#define THREAD_PRI_FAULT_CLIENT (OS_PRIORITY_APPMAX - 1)
+#define THREAD_PRI_FAULT OS_PRIORITY_APPMAX
+
+#endif
diff --git a/include/z64transition.h b/include/z64transition.h
index 569b8fb328..f867aed09a 100644
--- a/include/z64transition.h
+++ b/include/z64transition.h
@@ -2,7 +2,11 @@
#define Z64TRANSITION_H
#include "ultra64/ultratypes.h"
-#include "ultra64/gbi.h" // for Gfx
+#include "ultra64/gbi.h"
+#include "transition_circle.h"
+#include "transition_fade.h"
+#include "transition_triforce.h"
+#include "transition_wipe.h"
#include "z64transition_instances.h"
#define TRANS_TRIGGER_OFF 0 // transition is not active
diff --git a/include/z64transition_instances.h b/include/z64transition_instances.h
index 154b98d008..cc35add03c 100644
--- a/include/z64transition_instances.h
+++ b/include/z64transition_instances.h
@@ -1,104 +1,10 @@
#ifndef Z64TRANSITION_INSTANCES_H
#define Z64TRANSITION_INSTANCES_H
-#include "ultra64.h"
-#include "color.h"
-
-typedef struct TransitionTileVtxData {
- /* 0x0 */ f32 x;
- /* 0x4 */ f32 y;
-} TransitionTileVtxData; // size = 0x8
-
-typedef struct TransitionTile {
- /* 0x00 */ s32 cols;
- /* 0x04 */ s32 rows;
- /* 0x08 */ s32 frame;
- /* 0x0C */ TransitionTileVtxData* vtxData;
- /* 0x10 */ Vtx* vtxFrame1;
- /* 0x14 */ Vtx* vtxFrame2;
- /* 0x18 */ Mtx projection;
- /* 0x58 */ Mtx modelView;
- /* 0x98 */ Mtx unk_98;
- /* 0xD8 */ Gfx* gfx; // "gfxtbl"
- /* 0xDC */ u16* zBuffer;
-} TransitionTile; // size = 0xE0
-
typedef enum TransitionInstanceType {
/* 1 */ TRANS_INSTANCE_TYPE_FILL_OUT = 1,
- /* 2 */ TRANS_INSTANCE_TYPE_FILL_IN
+ /* 2 */ TRANS_INSTANCE_TYPE_FILL_IN,
+ /* 3 */ TRANS_INSTANCE_TYPE_FADE_FLASH
} TransitionInstanceType;
-typedef struct TransitionWipe {
- /* 0x000 */ Color_RGBA8_u32 color;
- /* 0x004 */ Color_RGBA8_u32 unkColor;
- /* 0x008 */ u8 direction;
- /* 0x009 */ u8 frame;
- /* 0x00A */ u8 isDone;
- /* 0x00C */ u16 texX;
- /* 0x00E */ u16 texY;
- /* 0x010 */ u16 normal;
- /* 0x018 */ Mtx projection;
- /* 0x058 */ Mtx lookAt;
- /* 0x098 */ Mtx modelView[2][3];
-} TransitionWipe; // size = 0x218
-
-#define TRANS_INSTANCE_TYPE_FADE_FLASH 3
-
-typedef struct TransitionFade {
- /* 0x000 */ u8 type;
- /* 0x001 */ u8 isDone;
- /* 0x002 */ u8 direction;
- /* 0x004 */ Color_RGBA8_u32 color;
- /* 0x008 */ u16 timer;
-} TransitionFade; // size = 0xC
-
-typedef enum TransitionCircleAppearance {
- /* 0 */ TCA_NORMAL,
- /* 1 */ TCA_WAVE,
- /* 2 */ TCA_RIPPLE,
- /* 3 */ TCA_STARBURST
-} TransitionCircleAppearance;
-
-typedef enum TransitionCircleColor {
- /* 0 */ TCC_BLACK,
- /* 1 */ TCC_WHITE,
- /* 2 */ TCC_GRAY,
- /* 3 */ TCC_SPECIAL // color varies depending on appearance. unused and appears broken
-} TransitionCircleColor;
-
-typedef enum TransitionCircleSpeed {
- /* 0 */ TCS_FAST,
- /* 1 */ TCS_SLOW
-} TransitionCircleSpeed;
-
-typedef struct TransitionCircle {
- /* 0x000 */ Color_RGBA8_u32 color;
- /* 0x004 */ Color_RGBA8_u32 unkColor;
- /* 0x008 */ s32 texX;
- /* 0x00C */ s32 texY;
- /* 0x010 */ s32 speed;
- /* 0x014 */ u8 direction;
- /* 0x015 */ u8 colorType;
- /* 0x016 */ u8 speedType;
- /* 0x017 */ u8 appearanceType;
- /* 0x018 */ u8 isDone;
- /* 0x019 */ u8 frame;
- /* 0x01A */ u16 normal;
- /* 0x020 */ Mtx projection;
- /* 0x060 */ Mtx lookAt;
- /* 0x0A0 */ void* texture;
- /* 0x0A8 */ Mtx modelView[2][3];
-} TransitionCircle; // size = 0x228
-
-typedef struct TransitionTriforce {
- /* 0x000 */ Color_RGBA8_u32 color;
- /* 0x004 */ f32 transPos;
- /* 0x008 */ f32 step;
- /* 0x00C */ s32 state;
- /* 0x010 */ s32 type;
- /* 0x018 */ Mtx projection;
- /* 0x058 */ s32 frame;
- /* 0x060 */ Mtx modelView[2][3];
-} TransitionTriforce; // size = 0x1E0
-
#endif
diff --git a/include/z64view.h b/include/z64view.h
index 935b6f79a0..83bdf0fe84 100644
--- a/include/z64view.h
+++ b/include/z64view.h
@@ -1,6 +1,8 @@
#ifndef Z64VIEW_H
#define Z64VIEW_H
+#include "avoid_ub.h"
+#include "ultra64.h"
#include "z64math.h"
struct GraphicsContext;
@@ -12,6 +14,17 @@ typedef struct Viewport {
/* 0xC */ s32 rightX; // lrx (lower right x)
} Viewport; // size = 0x10
+#define SET_FULLSCREEN_VIEWPORT(view) \
+ { \
+ Viewport viewport; \
+ viewport.topY = 0; \
+ viewport.bottomY = SCREEN_HEIGHT; \
+ viewport.leftX = 0; \
+ viewport.rightX = SCREEN_WIDTH; \
+ View_SetViewport(view, &viewport); \
+ } \
+ (void)0
+
typedef struct View {
/* 0x000 */ s32 magic; // string literal "VIEW" / 0x56494557
/* 0x004 */ struct GraphicsContext* gfxCtx;
@@ -49,10 +62,39 @@ typedef struct View {
#define VIEW_FORCE_PROJECTION_PERSPECTIVE (VIEW_PROJECTION_PERSPECTIVE << 4)
#define VIEW_FORCE_PROJECTION_ORTHO (VIEW_PROJECTION_ORTHO << 4)
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define VIEW_ERROR_CHECK_EYE_POS(x, y, z) View_ErrorCheckEyePosition((x), (y), (z))
#else
#define VIEW_ERROR_CHECK_EYE_POS(x, y, z) (void)0
#endif
+View* View_New(struct GraphicsContext* gfxCtx);
+void View_Free(View* view);
+void View_Init(View*, struct GraphicsContext*);
+void View_LookAt(View* view, Vec3f* eye, Vec3f* at, Vec3f* up);
+void View_LookAtUnsafe(View* view, Vec3f* eye, Vec3f* at, Vec3f* up);
+void View_SetScale(View* view, f32 scale);
+void View_GetScale(View* view, f32* scale);
+void View_SetPerspective(View* view, f32 fovy, f32 zNear, f32 zFar);
+void View_GetPerspective(View* view, f32* fovy, f32* zNear, f32* zFar);
+void View_SetOrtho(View* view, f32 fovy, f32 zNear, f32 zFar);
+void View_GetOrtho(View* view, f32* fovy, f32* zNear, f32* zFar);
+void View_SetViewport(View* view, Viewport* viewport);
+void View_GetViewport(View* view, Viewport* viewport);
+void View_SetDistortionOrientation(View* view, f32 rotX, f32 rotY, f32 rotZ);
+void View_SetDistortionScale(View* view, f32 scaleX, f32 scaleY, f32 scaleZ);
+BAD_RETURN(s32) View_SetDistortionSpeed(View* view, f32 speed);
+void View_InitDistortion(View* view);
+void View_ClearDistortion(View* view);
+void View_SetDistortion(View* view, Vec3f orientation, Vec3f scale, f32 speed);
+s32 View_StepDistortion(View* view, Mtx* projectionMtx);
+s32 View_Apply(View* view, s32 mask);
+s32 View_ApplyOrthoToOverlay(View* view);
+s32 View_ApplyPerspectiveToOverlay(View* view);
+s32 View_UpdateViewingMatrix(View* view);
+s32 View_ApplyTo(View* view, s32 mask, Gfx** gfxP);
+#if DEBUG_FEATURES
+s32 View_ErrorCheckEyePosition(f32 eyeX, f32 eyeY, f32 eyeZ);
+#endif
+
#endif
diff --git a/include/z64vis.h b/include/z64vis.h
index fcd24d1b76..86e286c325 100644
--- a/include/z64vis.h
+++ b/include/z64vis.h
@@ -28,7 +28,6 @@ typedef struct Vis {
} Vis; // size = 0x10
-
/* Cvg: Coverage */
#define FB_FILTER_TO_CVG_TYPE(filter) (filter)
@@ -50,7 +49,6 @@ void VisCvg_Destroy(VisCvg* this);
void VisCvg_Draw(VisCvg* this, Gfx** gfxP);
-
/* Mono: Desaturation */
// Only one type
@@ -66,7 +64,6 @@ void VisMono_Destroy(VisMono* this);
void VisMono_Draw(VisMono* this, Gfx** gfxP);
-
/* ZBuf: Z-Buffer */
#define FB_FILTER_TO_ZBUF_TYPE(filter) ((filter) - FB_FILTER_ZBUF_IA)
diff --git a/include/z_actor_dlftbls.h b/include/z_actor_dlftbls.h
new file mode 100644
index 0000000000..e9e2dc7d93
--- /dev/null
+++ b/include/z_actor_dlftbls.h
@@ -0,0 +1,74 @@
+#ifndef Z_ACTOR_DLFTBLS_H
+#define Z_ACTOR_DLFTBLS_H
+
+#include "romfile.h"
+#include "z64actor_profile.h"
+
+/**
+ * @see ACTOROVL_ALLOC_ABSOLUTE
+ */
+#if DEBUG_FEATURES
+#define ACTOROVL_ABSOLUTE_SPACE_SIZE 0x27A0
+#else
+#define ACTOROVL_ABSOLUTE_SPACE_SIZE 0x24E0
+#endif
+
+/**
+ * The actor overlay should be allocated memory for when loading,
+ * and the memory deallocated when there is no more actor using the overlay.
+ *
+ * `ACTOROVL_ALLOC_` defines indicate how an actor overlay should be loaded.
+ *
+ * @note Bitwise or-ing `ACTOROVL_ALLOC_` types is not meaningful.
+ * The `ACTOROVL_ALLOC_` types are 0, 1, 2 but checked against with a bitwise and.
+ *
+ * @see ACTOROVL_ALLOC_ABSOLUTE
+ * @see ACTOROVL_ALLOC_PERSISTENT
+ * @see actor_table.h
+ */
+#define ACTOROVL_ALLOC_NORMAL 0
+
+/**
+ * The actor overlay should be loaded to "absolute space".
+ *
+ * Absolute space is a fixed amount of memory allocated once.
+ * The overlay will still need to be loaded again if at some point there is no more actor using the overlay.
+ *
+ * @note Only one such overlay may be loaded at a time.
+ * This is not checked: a newly loaded overlay will overwrite the previous one in absolute space,
+ * even if actors are still relying on the previous one. Actors using absolute-allocated overlays should be deleted
+ * when another absolute-allocated overlay is about to be used.
+ *
+ * @see ACTOROVL_ABSOLUTE_SPACE_SIZE
+ * @see ActorContext.absoluteSpace
+ * @see ACTOROVL_ALLOC_NORMAL
+ */
+#define ACTOROVL_ALLOC_ABSOLUTE (1 << 0)
+
+/**
+ * The actor overlay should be loaded persistently.
+ * It will stay loaded until the current game state instance ends.
+ *
+ * @see ACTOROVL_ALLOC_NORMAL
+ */
+#define ACTOROVL_ALLOC_PERSISTENT (1 << 1)
+
+typedef struct ActorOverlay {
+ /* 0x00 */ RomFile file;
+ /* 0x08 */ void* vramStart;
+ /* 0x0C */ void* vramEnd;
+ /* 0x10 */ void* loadedRamAddr; // original name: "allocp"
+ /* 0x14 */ ActorProfile* profile;
+ /* 0x18 */ char* name;
+ /* 0x1C */ u16 allocType; // See `ACTOROVL_ALLOC_` defines
+ /* 0x1E */ s8 numLoaded; // original name: "clients"
+} ActorOverlay; // size = 0x20
+
+extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0
+extern s32 gMaxActorId; // original name: "MaxProfile"
+
+void ActorOverlayTable_LogPrint(void);
+void ActorOverlayTable_Init(void);
+void ActorOverlayTable_Cleanup(void);
+
+#endif
diff --git a/include/z_en_a_obj.h b/include/z_en_a_obj.h
new file mode 100644
index 0000000000..bd65f88f13
--- /dev/null
+++ b/include/z_en_a_obj.h
@@ -0,0 +1,41 @@
+#ifndef Z_EN_A_OBJ_H
+#define Z_EN_A_OBJ_H
+
+#include "ultra64.h"
+#include "z64actor.h"
+
+// Only A_OBJ_SIGNPOST_OBLONG and A_OBJ_SIGNPOST_ARROW are used in room files.
+typedef enum AObjType {
+ /* 0x00 */ A_OBJ_BLOCK_SMALL,
+ /* 0x01 */ A_OBJ_BLOCK_LARGE,
+ /* 0x02 */ A_OBJ_BLOCK_HUGE,
+ /* 0x03 */ A_OBJ_BLOCK_SMALL_ROT,
+ /* 0x04 */ A_OBJ_BLOCK_LARGE_ROT,
+ /* 0x05 */ A_OBJ_CUBE_SMALL,
+ /* 0x06 */ A_OBJ_UNKNOWN_6,
+ /* 0x07 */ A_OBJ_GRASS_CLUMP,
+ /* 0x08 */ A_OBJ_TREE_STUMP,
+ /* 0x09 */ A_OBJ_SIGNPOST_OBLONG,
+ /* 0x0A */ A_OBJ_SIGNPOST_ARROW,
+ /* 0x0B */ A_OBJ_BOULDER_FRAGMENT,
+ /* 0x0C */ A_OBJ_MAX
+} AObjType;
+
+struct EnAObj;
+
+typedef void (*EnAObjActionFunc)(struct EnAObj*, struct PlayState*);
+
+typedef struct EnAObj {
+ /* 0x000 */ DynaPolyActor dyna;
+ /* 0x164 */ EnAObjActionFunc actionFunc;
+ /* 0x168 */ s32 rotateWaitTimer;
+ /* 0x16C */ s16 textId;
+ /* 0x16E */ s16 rotateState;
+ /* 0x170 */ s16 rotateForTimer;
+ /* 0x172 */ s16 rotSpeedY;
+ /* 0x174 */ s16 rotSpeedX;
+ /* 0x178 */ f32 focusYoffset;
+ /* 0x17C */ ColliderCylinder collider;
+} EnAObj; // size = 0x1C8
+
+#endif
diff --git a/include/z_en_item00.h b/include/z_en_item00.h
new file mode 100644
index 0000000000..483f666f5f
--- /dev/null
+++ b/include/z_en_item00.h
@@ -0,0 +1,59 @@
+#ifndef Z_EN_ITEM00_H
+#define Z_EN_ITEM00_H
+
+#include "ultra64.h"
+#include "z64actor.h"
+
+typedef enum Item00Type {
+ /* 0x00 */ ITEM00_RUPEE_GREEN,
+ /* 0x01 */ ITEM00_RUPEE_BLUE,
+ /* 0x02 */ ITEM00_RUPEE_RED,
+ /* 0x03 */ ITEM00_RECOVERY_HEART,
+ /* 0x04 */ ITEM00_BOMBS_A,
+ /* 0x05 */ ITEM00_ARROWS_SINGLE,
+ /* 0x06 */ ITEM00_HEART_PIECE,
+ /* 0x07 */ ITEM00_HEART_CONTAINER,
+ /* 0x08 */ ITEM00_ARROWS_SMALL,
+ /* 0x09 */ ITEM00_ARROWS_MEDIUM,
+ /* 0x0A */ ITEM00_ARROWS_LARGE,
+ /* 0x0B */ ITEM00_BOMBS_B,
+ /* 0x0C */ ITEM00_NUTS,
+ /* 0x0D */ ITEM00_STICK,
+ /* 0x0E */ ITEM00_MAGIC_LARGE,
+ /* 0x0F */ ITEM00_MAGIC_SMALL,
+ /* 0x10 */ ITEM00_SEEDS,
+ /* 0x11 */ ITEM00_SMALL_KEY,
+ /* 0x12 */ ITEM00_FLEXIBLE,
+ /* 0x13 */ ITEM00_RUPEE_ORANGE,
+ /* 0x14 */ ITEM00_RUPEE_PURPLE,
+ /* 0x15 */ ITEM00_SHIELD_DEKU,
+ /* 0x16 */ ITEM00_SHIELD_HYLIAN,
+ /* 0x17 */ ITEM00_TUNIC_ZORA,
+ /* 0x18 */ ITEM00_TUNIC_GORON,
+ /* 0x19 */ ITEM00_BOMBS_SPECIAL,
+ /* 0x1A */ ITEM00_MAX,
+ /* 0xFF */ ITEM00_NONE = 0xFF
+} Item00Type;
+
+struct EnItem00;
+
+typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct PlayState*);
+
+typedef struct EnItem00 {
+ /* 0x000 */ Actor actor;
+ /* 0x14C */ EnItem00ActionFunc actionFunc;
+ /* 0x150 */ s16 collectibleFlag;
+ /* 0x152 */ s16 getItemId;
+ /* 0x154 */ s16 unk_154;
+ /* 0x156 */ s16 unk_156;
+ /* 0x158 */ s16 unk_158;
+ /* 0x15A */ s16 despawnTimer;
+ /* 0x15C */ f32 scale;
+ /* 0x160 */ ColliderCylinder collider;
+} EnItem00; // size = 0x1AC
+
+EnItem00* Item_DropCollectible(struct PlayState* play, Vec3f* spawnPos, s16 params);
+EnItem00* Item_DropCollectible2(struct PlayState* play, Vec3f* spawnPos, s16 params);
+void Item_DropCollectibleRandom(struct PlayState* play, Actor* fromActor, Vec3f* spawnPos, s16 params);
+
+#endif
diff --git a/include/z_game_dlftbls.h b/include/z_game_dlftbls.h
new file mode 100644
index 0000000000..b5b8c62c87
--- /dev/null
+++ b/include/z_game_dlftbls.h
@@ -0,0 +1,36 @@
+#ifndef Z_GAME_DLFTBLS_H
+#define Z_GAME_DLFTBLS_H
+
+#include "ultra64.h"
+#include "romfile.h"
+
+typedef struct GameStateOverlay {
+ /* 0x00 */ void* loadedRamAddr;
+ /* 0x04 */ RomFile file; // if applicable
+ /* 0x0C */ void* vramStart; // if applicable
+ /* 0x10 */ void* vramEnd; // if applicable
+ /* 0x14 */ void* unk_14;
+ /* 0x18 */ void* init; // initializes and executes the given context
+ /* 0x1C */ void* destroy; // deconstructs the context, and sets the next context to load
+ /* 0x20 */ void* unk_20;
+ /* 0x24 */ void* unk_24;
+ /* 0x28 */ s32 unk_28;
+ /* 0x2C */ u32 instanceSize;
+} GameStateOverlay; // size = 0x30
+
+// Used in Graph_GetNextGameState in graph.c
+#define DEFINE_GAMESTATE_INTERNAL(typeName, enumName) enumName,
+#define DEFINE_GAMESTATE(typeName, enumName, name) DEFINE_GAMESTATE_INTERNAL(typeName, enumName)
+typedef enum GameStateId {
+#include "tables/gamestate_table.h"
+ GAMESTATE_ID_MAX
+} GameStateId;
+#undef DEFINE_GAMESTATE
+#undef DEFINE_GAMESTATE_INTERNAL
+
+extern GameStateOverlay gGameStateOverlayTable[GAMESTATE_ID_MAX];
+
+void Overlay_LoadGameState(GameStateOverlay* overlayEntry);
+void Overlay_FreeGameState(GameStateOverlay* overlayEntry);
+
+#endif
diff --git a/include/z_lib.h b/include/z_lib.h
index 34581da982..24fa806914 100644
--- a/include/z_lib.h
+++ b/include/z_lib.h
@@ -1,8 +1,8 @@
#ifndef Z_LIB_H
#define Z_LIB_H
-#include "libc/stddef.h"
-#include "padmgr.h"
+#include "stddef.h"
+#include "libu64/pad.h"
#include "z64math.h"
#include "color.h"
diff --git a/include/z_locale.h b/include/z_locale.h
new file mode 100644
index 0000000000..5be416e823
--- /dev/null
+++ b/include/z_locale.h
@@ -0,0 +1,11 @@
+#ifndef Z_LOCALE_H
+#define Z_LOCALE_H
+
+#include "ultra64/ultratypes.h"
+
+extern s32 gCurrentRegion;
+
+void Locale_Init(void);
+void Locale_ResetRegion(void);
+
+#endif
diff --git a/include/zelda_arena.h b/include/zelda_arena.h
new file mode 100644
index 0000000000..cf67406577
--- /dev/null
+++ b/include/zelda_arena.h
@@ -0,0 +1,39 @@
+#ifndef ZELDA_ARENA_H
+#define ZELDA_ARENA_H
+
+#include "ultra64.h"
+
+extern s32 gZeldaArenaLogSeverity;
+
+void* ZeldaArena_Malloc(u32 size);
+void* ZeldaArena_MallocR(u32 size);
+void* ZeldaArena_Realloc(void* ptr, u32 newSize);
+void ZeldaArena_Free(void* ptr);
+void* ZeldaArena_Calloc(u32 num, u32 size);
+void ZeldaArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
+void ZeldaArena_Check(void);
+void ZeldaArena_Init(void* start, u32 size);
+void ZeldaArena_Cleanup(void);
+s32 ZeldaArena_IsInitialized(void);
+
+#if DEBUG_FEATURES
+void ZeldaArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
+void* ZeldaArena_MallocDebug(u32 size, const char* file, int line);
+void* ZeldaArena_MallocRDebug(u32 size, const char* file, int line);
+void* ZeldaArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line);
+void ZeldaArena_FreeDebug(void* ptr, const char* file, int line);
+void ZeldaArena_Display(void);
+
+#define ZELDA_ARENA_MALLOC(size, file, line) ZeldaArena_MallocDebug(size, file, line)
+#define ZELDA_ARENA_MALLOC_R(size, file, line) ZeldaArena_MallocRDebug(size, file, line)
+#define ZELDA_ARENA_FREE(size, file, line) ZeldaArena_FreeDebug(size, file, line)
+
+#else
+
+#define ZELDA_ARENA_MALLOC(size, file, line) ZeldaArena_Malloc(size)
+#define ZELDA_ARENA_MALLOC_R(size, file, line) ZeldaArena_MallocR(size)
+#define ZELDA_ARENA_FREE(size, file, line) ZeldaArena_Free(size)
+
+#endif
+
+#endif
diff --git a/linker_scripts/data_with_rodata.ld b/linker_scripts/data_with_rodata.ld
index 8d508ee18b..9318247f93 100644
--- a/linker_scripts/data_with_rodata.ld
+++ b/linker_scripts/data_with_rodata.ld
@@ -18,5 +18,7 @@ SECTIONS {
* To avoid dealing with this, we just discard all .gptab sections.
*/
*(.gptab.*)
+ /* Inhibit merging of COMMON into scommon */
+ *(.scommon)
}
}
diff --git a/linker_scripts/makerom.ld b/linker_scripts/makerom.ld
new file mode 100644
index 0000000000..a898c6b34f
--- /dev/null
+++ b/linker_scripts/makerom.ld
@@ -0,0 +1,13 @@
+#include "boot.h"
+
+/* These are only here due to iQue entry.s using ori to load the lower halves of symbols
+ * rather than addiu, so the usual relocation operators %hi() and %lo() can't be used. */
+
+_bootSegmentBssStart_HI = _bootSegmentBssStart >> 16;
+
+_bootSegmentBssSize_HI = _bootSegmentBssSize >> 16;
+
+bootproc_HI = bootproc >> 16;
+
+BOOT_STACK_TOP = (sBootThreadStack + BOOT_STACK_SIZE);
+BOOT_STACK_TOP_HI = BOOT_STACK_TOP >> 16;
diff --git a/linker_scripts/soundfont.ld b/linker_scripts/soundfont.ld
index d914a7de31..c480e36867 100644
--- a/linker_scripts/soundfont.ld
+++ b/linker_scripts/soundfont.ld
@@ -4,14 +4,15 @@ OUTPUT_ARCH (mips)
SECTIONS {
- .rodata :
+ .rodata ALIGN(16) :
{
*(.data*)
*(.rodata*)
. = ALIGN(16);
- __LEN__ = . - ADDR(.rodata);
}
+ __LEN__ = ABSOLUTE(SIZEOF(.rodata));
+
/DISCARD/ :
{
*(*);
diff --git a/requirements.txt b/requirements.txt
index 45c122f0ec..bea2fe176c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,8 @@
# Setup and compression
-crunch64>=0.3.1,<1.0.0
+crunch64>=0.5.1,<1.0.0
ipl3checksum>=1.2.0,<2.0.0
pyyaml>=6.0.1,<7.0.0
+pygfxd>=1.0.3,<2.0.0
# asm-differ
argcomplete
diff --git a/retail_progress.py b/retail_progress.py
index ec1095330e..cf6a623c4a 100755
--- a/retail_progress.py
+++ b/retail_progress.py
@@ -192,7 +192,9 @@ def get_section_hex_dump(path: Path, section: str) -> List[str]:
def parse_hex_dump(lines: List[str]) -> bytes:
result = bytearray()
for line in lines:
- data = line[6:41].replace(" ", "")
+ # strip offset
+ line = " ".join(line.strip().split(" ", 1)[1])
+ data = line[:35].replace(" ", "")
result.extend(bytes.fromhex(data))
# pad to 0x10-byte alignment
@@ -391,7 +393,7 @@ if __name__ == "__main__":
"--version",
dest="oot_version",
help="version to compare",
- default="ntsc-1.2",
+ default="ique-cn",
)
parser.add_argument(
"--data",
diff --git a/spec b/spec
deleted file mode 100644
index cd35a7f8df..0000000000
--- a/spec
+++ /dev/null
@@ -1,19560 +0,0 @@
-/*
- * ROM spec file
- */
-
-#include "include/versions.h"
-
-beginseg
- name "makerom"
- include "$(BUILD_DIR)/src/makerom/rom_header.o"
- include "$(BUILD_DIR)/src/makerom/ipl3.o"
- include "$(BUILD_DIR)/src/makerom/entry.o"
-endseg
-
-beginseg
- name "boot"
- address 0x80000460
- include "$(BUILD_DIR)/src/boot/boot_main.o"
- include "$(BUILD_DIR)/data/unk_80009410.data.o"
- include "$(BUILD_DIR)/src/boot/idle.o"
- include "$(BUILD_DIR)/src/boot/viconfig.o"
- include "$(BUILD_DIR)/src/boot/z_std_dma.o"
- include "$(BUILD_DIR)/src/boot/yaz0.o"
- include "$(BUILD_DIR)/src/boot/z_locale.o"
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/boot/cic6105.o"
-#endif
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/boot/assert.o"
-#endif
- include "$(BUILD_DIR)/src/boot/is_debug.o"
- include "$(BUILD_DIR)/src/boot/driverominit.o"
- include "$(BUILD_DIR)/src/boot/mio0.o"
- include "$(BUILD_DIR)/src/boot/stackcheck.o"
- include "$(BUILD_DIR)/src/boot/logutils.o"
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libc64/sleep.o"
-#endif
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/libc64/sprintf.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/piacs.o"
- include "$(BUILD_DIR)/src/libultra/os/sendmesg.o"
- include "$(BUILD_DIR)/src/libultra/os/stopthread.o"
- include "$(BUILD_DIR)/src/libultra/io/viextendvstart.o"
- include "$(BUILD_DIR)/src/libultra/io/vimodepallan1.o"
- include "$(BUILD_DIR)/src/libultra/os/recvmesg.o"
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/os/initialize.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/libc/ll.o"
- include "$(BUILD_DIR)/src/libultra/os/exceptasm.o"
- include "$(BUILD_DIR)/src/libultra/os/thread.o"
- include "$(BUILD_DIR)/src/libultra/os/destroythread.o"
- include "$(BUILD_DIR)/src/libultra/libc/bzero.o"
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/os/parameters.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/os/createthread.o"
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/os/initialize.o"
- include "$(BUILD_DIR)/src/libultra/os/parameters.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/os/setsr.o"
- include "$(BUILD_DIR)/src/libultra/os/getsr.o"
- include "$(BUILD_DIR)/src/libultra/os/writebackdcache.o"
- include "$(BUILD_DIR)/src/libultra/io/vigetnextframebuf.o"
- include "$(BUILD_DIR)/src/libultra/io/pimgr.o"
- include "$(BUILD_DIR)/src/libultra/io/devmgr.o"
- include "$(BUILD_DIR)/src/libultra/io/pirawdma.o"
- include "$(BUILD_DIR)/src/libultra/os/virtualtophysical.o"
- include "$(BUILD_DIR)/src/libultra/io/viblack.o"
- include "$(BUILD_DIR)/src/libultra/io/sirawread.o"
- include "$(BUILD_DIR)/src/libultra/os/getthreadid.o"
- include "$(BUILD_DIR)/src/libultra/os/setintmask.o"
- include "$(BUILD_DIR)/src/libultra/io/visetmode.o"
- include "$(BUILD_DIR)/src/libultra/os/probetlb.o"
- include "$(BUILD_DIR)/src/libultra/os/getmemsize.o"
- include "$(BUILD_DIR)/src/libultra/os/seteventmesg.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/libc/xprintf.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/os/unmaptlball.o"
- include "$(BUILD_DIR)/src/libultra/io/epidma.o"
-#if OOT_DEBUG || defined(COMPILER_GCC)
- include "$(BUILD_DIR)/src/libultra/libc/string.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/os/invalicache.o"
- include "$(BUILD_DIR)/src/libultra/os/createmesgqueue.o"
- include "$(BUILD_DIR)/src/libultra/os/invaldcache.o"
- include "$(BUILD_DIR)/src/libultra/io/si.o"
- include "$(BUILD_DIR)/src/libultra/os/jammesg.o"
- include "$(BUILD_DIR)/src/libultra/os/setthreadpri.o"
- include "$(BUILD_DIR)/src/libultra/os/getthreadpri.o"
- include "$(BUILD_DIR)/src/libultra/io/epirawread.o"
- include "$(BUILD_DIR)/src/libultra/io/viswapbuf.o"
- include "$(BUILD_DIR)/src/libultra/io/epirawdma.o"
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/libc/bcmp.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/os/gettime.o"
- include "$(BUILD_DIR)/src/libultra/os/timerintr.o"
- include "$(BUILD_DIR)/src/libultra/os/getcount.o"
- include "$(BUILD_DIR)/src/libultra/os/setglobalintmask.o"
- include "$(BUILD_DIR)/src/libultra/os/setcompare.o"
- include "$(BUILD_DIR)/src/libultra/libc/bcopy.o"
- include "$(BUILD_DIR)/src/libultra/os/resetglobalintmask.o"
- include "$(BUILD_DIR)/src/libultra/os/interrupt.o"
-#if !OOT_PAL_N64
- include "$(BUILD_DIR)/src/libultra/io/vimodentsclan1.o"
- include "$(BUILD_DIR)/src/libultra/io/vimodempallan1.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/vi.o"
-#if OOT_PAL_N64
- include "$(BUILD_DIR)/src/libultra/io/vimodentsclan1.o"
- include "$(BUILD_DIR)/src/libultra/io/vimodempallan1.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/viswapcontext.o"
- include "$(BUILD_DIR)/src/libultra/io/pigetcmdq.o"
- include "$(BUILD_DIR)/src/libultra/io/epiread.o"
- include "$(BUILD_DIR)/src/libultra/io/visetspecial.o"
- include "$(BUILD_DIR)/src/libultra/io/cartrominit.o"
-#if OOT_PAL_N64 || OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/os/setfpccsr.o"
- include "$(BUILD_DIR)/src/libultra/os/getfpccsr.o"
-#if PLATFORM_N64 || OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/epiwrite.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/os/maptlbrdb.o"
- include "$(BUILD_DIR)/src/libultra/os/yieldthread.o"
- include "$(BUILD_DIR)/src/libultra/os/getcause.o"
- include "$(BUILD_DIR)/src/libultra/io/epirawwrite.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/libc/xlitob.o"
- include "$(BUILD_DIR)/src/libultra/libc/ldiv.o"
- include "$(BUILD_DIR)/src/libultra/libc/xldtob.o"
-#endif
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/os/settimer.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/sirawwrite.o"
- include "$(BUILD_DIR)/src/libultra/io/vimgr.o"
- include "$(BUILD_DIR)/src/libultra/io/vigetcurrcontext.o"
- include "$(BUILD_DIR)/src/libultra/os/startthread.o"
- include "$(BUILD_DIR)/src/libultra/io/visetyscale.o"
- include "$(BUILD_DIR)/src/libultra/io/visetxscale.o"
- include "$(BUILD_DIR)/src/libultra/os/sethwintrroutine.o"
- include "$(BUILD_DIR)/src/libultra/os/gethwintrroutine.o"
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/os/setwatchlo.o"
-#endif
- include "$(BUILD_DIR)/src/boot/build.o"
- include "$(BUILD_DIR)/data/rsp_boot.text.o"
- include "$(BUILD_DIR)/data/cic6105.text.o"
-#ifdef COMPILER_GCC
- include "$(BUILD_DIR)/src/libc/memset.o"
- include "$(BUILD_DIR)/src/libc/memmove.o"
- include "$(BUILD_DIR)/src/gcc_fix/missing_gcc_functions.o"
-#endif
-endseg
-
-beginseg
- name "dmadata"
- include "$(BUILD_DIR)/src/dmadata/dmadata.o"
-endseg
-
-beginseg
- name "Audiobank"
- address 0
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_0.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_1.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_2.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_3.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_4.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_5.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_6.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_7.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_8.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_9.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_10.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_11.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_12.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_13.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_14.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_15.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_16.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_17.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_18.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_19.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_20.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_21.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_22.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_23.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_24.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_25.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_26.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_27.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_28.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_29.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_30.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_31.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_32.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_33.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_34.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_35.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_36.o"
- include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_37.o"
- include "$(BUILD_DIR)/assets/audio/audiobank_padding.o"
-endseg
-
-beginseg
- name "Audioseq"
- address 0
- include "$(BUILD_DIR)/assets/audio/sequences/seq_0.prg.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_1.prg.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_2.prg.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_3.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_4.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_5.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_6.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_7.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_8.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_9.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_10.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_11.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_12.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_13.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_14.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_15.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_16.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_17.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_18.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_19.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_20.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_21.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_22.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_23.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_24.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_25.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_26.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_27.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_28.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_29.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_30.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_31.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_32.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_33.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_34.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_35.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_36.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_37.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_38.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_39.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_40.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_41.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_42.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_43.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_44.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_45.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_46.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_47.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_48.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_49.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_50.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_51.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_52.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_53.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_54.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_55.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_56.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_57.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_58.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_59.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_60.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_61.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_62.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_63.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_64.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_65.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_66.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_67.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_68.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_69.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_70.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_71.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_72.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_73.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_74.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_75.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_76.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_77.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_78.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_79.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_80.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_81.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_82.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_83.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_84.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_85.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_86.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_88.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_89.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_90.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_91.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_92.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_93.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_94.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_95.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_96.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_97.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_98.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_99.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_100.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_101.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_102.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_103.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_104.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_105.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_106.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_107.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_108.o"
- include "$(BUILD_DIR)/assets/audio/sequences/seq_109.prg.o"
-endseg
-
-beginseg
- name "Audiotable"
- address 0
- include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_0.o"
- include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_2.o"
- include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_3.o"
- include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_4.o"
- include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_5.o"
- include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_6.o"
-endseg
-
-#if OOT_NTSC
-beginseg
- name "kanji"
- include "$(BUILD_DIR)/assets/textures/kanji/kanji.o"
-endseg
-#endif
-
-beginseg
- name "link_animetion"
-#if OOT_NTSC
- romalign 0x1000
-#endif
- include "$(BUILD_DIR)/assets/misc/link_animetion/link_animetion.o"
- number 7
-endseg
-
-beginseg
- name "icon_item_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/icon_item_static/icon_item_static.o"
- number 8
-endseg
-
-beginseg
- name "icon_item_24_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/icon_item_24_static/icon_item_24_static.o"
- number 9
-endseg
-
-beginseg
- name "icon_item_field_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/icon_item_field_static/icon_item_field_static.o"
- number 12
-endseg
-
-beginseg
- name "icon_item_dungeon_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/icon_item_dungeon_static/icon_item_dungeon_static.o"
- number 12
-endseg
-
-beginseg
- name "icon_item_gameover_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/icon_item_gameover_static/icon_item_gameover_static.o"
- number 12
-endseg
-
-#if OOT_NTSC
-beginseg
- name "icon_item_jpn_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/icon_item_jpn_static/icon_item_jpn_static.o"
- number 13
-endseg
-#endif
-
-beginseg
- name "icon_item_nes_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/icon_item_nes_static/icon_item_nes_static.o"
- number 13
-endseg
-
-#if OOT_PAL
-beginseg
- name "icon_item_ger_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/icon_item_ger_static/icon_item_ger_static.o"
- number 13
-endseg
-
-beginseg
- name "icon_item_fra_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/icon_item_fra_static/icon_item_fra_static.o"
- number 13
-endseg
-#endif
-
-beginseg
- name "item_name_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/item_name_static/item_name_static.o"
- number 10
-endseg
-
-beginseg
- name "map_name_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/map_name_static/map_name_static.o"
- number 11
-endseg
-
-beginseg
- name "do_action_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/do_action_static/do_action_static.o"
- number 7
-endseg
-
-beginseg
- name "message_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/message_static/message_static.o"
- number 7
-endseg
-
-beginseg
- name "message_texture_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/message_texture_static/message_texture_static.o"
- number 9
-endseg
-
-beginseg
- name "nes_font_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/nes_font_static/nes_font_static.o"
- number 10
-endseg
-
-#if OOT_NTSC
-beginseg
- name "jpn_message_data_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/text/jpn_message_data_static.o"
- number 8
-endseg
-#endif
-
-beginseg
- name "nes_message_data_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/text/nes_message_data_static.o"
- number 7
-endseg
-
-#if OOT_PAL
-beginseg
- name "ger_message_data_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/text/ger_message_data_static.o"
- number 7
-endseg
-
-beginseg
- name "fra_message_data_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/text/fra_message_data_static.o"
- number 7
-endseg
-#endif
-
-beginseg
- name "staff_message_data_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/text/staff_message_data_static.o"
- number 7
-endseg
-
-beginseg
- name "map_grand_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/map_grand_static/map_grand_static.o"
- number 11
-endseg
-
-#if PLATFORM_N64
-beginseg
- name "map_i_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/map_i_static/map_i_static.o"
- number 11
-endseg
-#endif
-
-beginseg
- name "map_48x85_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/map_48x85_static/map_48x85_static.o"
- number 11
-endseg
-
-#if !PLATFORM_N64
-beginseg
- name "map_i_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/map_i_static/map_i_static.o"
- number 11
-endseg
-#endif
-
-beginseg
- name "code"
- compress
- after "dmadata"
- align 0x20
- include "$(BUILD_DIR)/src/code/z_en_a_keep.o"
- include "$(BUILD_DIR)/src/code/z_en_item00.o"
- include "$(BUILD_DIR)/src/code/z_eff_blure.o"
- include "$(BUILD_DIR)/src/code/z_eff_shield_particle.o"
- include "$(BUILD_DIR)/src/code/z_eff_spark.o"
- include "$(BUILD_DIR)/src/code/z_eff_ss_dead.o"
- include "$(BUILD_DIR)/src/code/z_effect.o"
- include "$(BUILD_DIR)/src/code/z_effect_soft_sprite.o"
- include "$(BUILD_DIR)/src/code/z_effect_soft_sprite_old_init.o"
- include "$(BUILD_DIR)/src/code/z_effect_soft_sprite_dlftbls.o"
- include "$(BUILD_DIR)/src/code/flg_set.o"
- include "$(BUILD_DIR)/src/code/z_DLF.o"
- include "$(BUILD_DIR)/src/code/z_actor.o"
- include "$(BUILD_DIR)/src/code/z_actor_dlftbls.o"
- include "$(BUILD_DIR)/src/code/z_bgcheck.o"
- include "$(BUILD_DIR)/src/code/code_800430A0.o"
- include "$(BUILD_DIR)/src/code/code_80043480.o"
- include "$(BUILD_DIR)/src/code/z_camera.o"
- include "$(BUILD_DIR)/src/code/z_collision_btltbls.o"
- include "$(BUILD_DIR)/src/code/z_collision_check.o"
- include "$(BUILD_DIR)/src/code/z_common_data.o"
- include "$(BUILD_DIR)/src/code/z_debug.o"
- include "$(BUILD_DIR)/src/code/z_debug_display.o"
- include "$(BUILD_DIR)/src/code/z_demo.o"
- include "$(BUILD_DIR)/src/code/code_80069420.o"
- include "$(BUILD_DIR)/src/code/z_draw.o"
- include "$(BUILD_DIR)/src/code/z_sfx_source.o"
- include "$(BUILD_DIR)/src/code/z_elf_message.o"
- include "$(BUILD_DIR)/src/code/z_face_reaction.o"
- include "$(BUILD_DIR)/src/code/code_8006C3A0.o"
- include "$(BUILD_DIR)/src/code/z_fcurve_data.o"
- include "$(BUILD_DIR)/src/code/z_fcurve_data_skelanime.o"
- include "$(BUILD_DIR)/src/code/z_game_dlftbls.o"
- include "$(BUILD_DIR)/src/code/z_horse.o"
- include "$(BUILD_DIR)/src/code/z_jpeg.o"
- include "$(BUILD_DIR)/src/code/z_kaleido_setup.o"
- include "$(BUILD_DIR)/src/code/z_kanfont.o"
- include "$(BUILD_DIR)/src/code/z_kankyo.o"
- include "$(BUILD_DIR)/src/code/z_lib.o"
- include "$(BUILD_DIR)/src/code/z_lifemeter.o"
- include "$(BUILD_DIR)/src/code/z_lights.o"
- include "$(BUILD_DIR)/src/code/z_malloc.o"
- include "$(BUILD_DIR)/src/code/z_map_mark.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/code/z_moji.o"
-#endif
- include "$(BUILD_DIR)/src/code/z_prenmi_buff.o"
- include "$(BUILD_DIR)/src/code/z_nulltask.o"
- include "$(BUILD_DIR)/src/code/z_olib.o"
- include "$(BUILD_DIR)/src/code/z_onepointdemo.o"
- include "$(BUILD_DIR)/src/code/z_map_exp.o"
- include "$(BUILD_DIR)/src/code/z_map_data.o"
- include "$(BUILD_DIR)/src/code/z_parameter.o"
- include "$(BUILD_DIR)/src/code/z_path.o"
- include "$(BUILD_DIR)/src/code/z_frame_advance.o"
- include "$(BUILD_DIR)/src/code/z_player_lib.o"
- include "$(BUILD_DIR)/src/code/z_prenmi.o"
- include "$(BUILD_DIR)/src/code/z_quake.o"
- include "$(BUILD_DIR)/src/code/z_rcp.o"
- include "$(BUILD_DIR)/src/code/z_room.o"
- include "$(BUILD_DIR)/src/code/z_sample.o"
- include "$(BUILD_DIR)/src/code/code_80097A00.o"
- include "$(BUILD_DIR)/src/code/z_scene.o"
- include "$(BUILD_DIR)/src/code/object_table.o"
- include "$(BUILD_DIR)/src/code/z_scene_table.o"
- include "$(BUILD_DIR)/src/code/z_skelanime.o"
- include "$(BUILD_DIR)/src/code/z_skin.o"
- include "$(BUILD_DIR)/src/code/z_skin_awb.o"
- include "$(BUILD_DIR)/src/code/z_skin_matrix.o"
- include "$(BUILD_DIR)/src/code/z_sram.o"
- include "$(BUILD_DIR)/src/code/z_ss_sram.o"
- include "$(BUILD_DIR)/src/code/z_rumble.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/data/z_text.data.o"
-#endif
- include "$(BUILD_DIR)/data/unk_8012ABC0.data.o"
- include "$(BUILD_DIR)/src/code/z_view.o"
- include "$(BUILD_DIR)/src/code/z_vimode.o"
- include "$(BUILD_DIR)/src/code/z_viscvg.o"
- include "$(BUILD_DIR)/src/code/z_vismono.o"
- include "$(BUILD_DIR)/src/code/z_viszbuf.o"
- include "$(BUILD_DIR)/src/code/z_vr_box.o"
- include "$(BUILD_DIR)/src/code/z_vr_box_draw.o"
- include "$(BUILD_DIR)/src/code/z_player_call.o"
- include "$(BUILD_DIR)/src/code/z_fbdemo.o"
- include "$(BUILD_DIR)/src/code/z_fbdemo_triforce.o"
- include "$(BUILD_DIR)/src/code/z_fbdemo_wipe1.o"
- include "$(BUILD_DIR)/src/code/z_fbdemo_circle.o"
- include "$(BUILD_DIR)/src/code/z_fbdemo_fade.o"
- include "$(BUILD_DIR)/src/code/shrink_window.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/code/db_camera.o"
-#endif
- include "$(BUILD_DIR)/src/code/code_800BB0A0.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/code/mempak.o"
-#endif
- include "$(BUILD_DIR)/src/code/z_kaleido_manager.o"
- include "$(BUILD_DIR)/src/code/z_kaleido_scope_call.o"
- include "$(BUILD_DIR)/src/code/z_play.o"
- include "$(BUILD_DIR)/src/code/PreRender.o"
- include "$(BUILD_DIR)/src/code/TwoHeadGfxArena.o"
- include "$(BUILD_DIR)/src/code/TwoHeadArena.o"
- include "$(BUILD_DIR)/src/code/audio_stop_all_sfx.o"
- include "$(BUILD_DIR)/src/code/audio_thread_manager.o"
- include "$(BUILD_DIR)/src/code/title_setup.o"
- include "$(BUILD_DIR)/src/code/game.o"
- include "$(BUILD_DIR)/src/code/gamealloc.o"
- include "$(BUILD_DIR)/src/code/graph.o"
- include "$(BUILD_DIR)/src/code/gfxalloc.o"
- include "$(BUILD_DIR)/src/code/listalloc.o"
- include "$(BUILD_DIR)/src/code/main.o"
- include "$(BUILD_DIR)/src/code/padmgr.o"
- include "$(BUILD_DIR)/src/code/sched.o"
- include "$(BUILD_DIR)/src/code/speed_meter.o"
- include "$(BUILD_DIR)/src/code/sys_cfb.o"
- include "$(BUILD_DIR)/src/code/sys_math.o"
- include "$(BUILD_DIR)/src/code/sys_math3d.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/code/sys_math3d_draw.o"
-#endif
- include "$(BUILD_DIR)/src/code/sys_math_atan.o"
- include "$(BUILD_DIR)/src/code/sys_matrix.o"
- include "$(BUILD_DIR)/src/code/sys_ucode.o"
- include "$(BUILD_DIR)/src/code/sys_rumble.o"
- include "$(BUILD_DIR)/src/code/code_800D31A0.o"
- include "$(BUILD_DIR)/src/code/irqmgr.o"
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/code/code_n64dd_800AD410.o"
- include "$(BUILD_DIR)/src/code/code_n64dd_800AD4C0.o"
-#endif
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/code/debug_malloc.o"
-#endif
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/code/fault_n64.o"
-#else
- include "$(BUILD_DIR)/src/code/fault_gc.o"
- include "$(BUILD_DIR)/src/code/fault_gc_drawer.o"
-#endif
- include "$(BUILD_DIR)/src/code/kanread.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/code/ucode_disas.o"
-#endif
-#if OOT_VERSION <= NTSC_1_0 || PLATFORM_GC
- pad_text
-#endif
- include "$(BUILD_DIR)/src/audio/lib/data.o"
- include "$(BUILD_DIR)/src/audio/lib/synthesis.o"
- include "$(BUILD_DIR)/src/audio/lib/heap.o"
- include "$(BUILD_DIR)/src/audio/lib/load.o"
- include "$(BUILD_DIR)/src/audio/lib/thread.o"
- include "$(BUILD_DIR)/src/audio/lib/dcache.o"
- include "$(BUILD_DIR)/src/audio/lib/aisetnextbuf.o"
-#if OOT_PAL_N64
- pad_text
- pad_text
- pad_text
-#endif
- include "$(BUILD_DIR)/src/audio/lib/playback.o"
- include "$(BUILD_DIR)/src/audio/lib/effects.o"
- include "$(BUILD_DIR)/src/audio/lib/seqplayer.o"
- include "$(BUILD_DIR)/src/audio/general.o"
-#if PLATFORM_GC && !OOT_DEBUG
- pad_text
-#endif
- include "$(BUILD_DIR)/src/audio/sfx_params.o"
- include "$(BUILD_DIR)/src/audio/sfx.o"
- include "$(BUILD_DIR)/src/audio/sequence.o"
- include "$(BUILD_DIR)/src/audio/data.o"
- include "$(BUILD_DIR)/src/audio/session_config.o"
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/code/gfxprint.o"
- include "$(BUILD_DIR)/src/code/rcp_utils.o"
- include "$(BUILD_DIR)/src/code/loadfragment2_n64.o"
- include "$(BUILD_DIR)/src/code/padutils.o"
- include "$(BUILD_DIR)/src/code/code_800FC620.o"
- include "$(BUILD_DIR)/src/code/padsetup.o"
-#else
- include "$(BUILD_DIR)/src/code/logseverity_gc.o"
- include "$(BUILD_DIR)/src/code/gfxprint.o"
- include "$(BUILD_DIR)/src/code/rcp_utils.o"
- include "$(BUILD_DIR)/src/code/loadfragment2_gc.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/code/mtxuty-cvt.o"
-#endif
- include "$(BUILD_DIR)/src/code/relocation_gc.o"
- include "$(BUILD_DIR)/src/code/load_gc.o"
- include "$(BUILD_DIR)/src/code/code_800FC620.o"
- include "$(BUILD_DIR)/src/code/padutils.o"
- include "$(BUILD_DIR)/src/code/padsetup.o"
-#endif
- include "$(BUILD_DIR)/src/libc64/math64.o"
- include "$(BUILD_DIR)/src/libc64/fp.o"
- include "$(BUILD_DIR)/src/libc64/malloc.o"
- include "$(BUILD_DIR)/src/libc64/qrand.o"
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libc64/__osMalloc_n64.o"
-#else
- include "$(BUILD_DIR)/src/libc64/__osMalloc_gc.o"
-#endif
-#if !OOT_DEBUG
- include "$(BUILD_DIR)/src/libc64/sprintf.o"
-#endif
- include "$(BUILD_DIR)/src/libc64/aprintf.o"
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libc64/sleep.o"
-#endif
- include "$(BUILD_DIR)/src/code/jpegutils.o"
- include "$(BUILD_DIR)/src/code/jpegdecoder.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/pfsfreeblocks.o"
-#endif
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/os/getintmask.o"
-#endif
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/gu/scale.o"
-#else
- include "$(BUILD_DIR)/src/libultra/mgu/scale.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/gu/sinf.o"
- include "$(BUILD_DIR)/src/libultra/gu/sins.o"
- include "$(BUILD_DIR)/src/libultra/io/sptask.o"
- include "$(BUILD_DIR)/src/libultra/io/motor.o"
- include "$(BUILD_DIR)/src/libultra/io/siacs.o"
- include "$(BUILD_DIR)/src/libultra/io/controller.o"
- include "$(BUILD_DIR)/src/libultra/io/contreaddata.o"
- include "$(BUILD_DIR)/src/libultra/gu/perspective.o"
- include "$(BUILD_DIR)/src/libultra/io/sprawdma.o"
- include "$(BUILD_DIR)/src/libultra/io/sirawdma.o"
- include "$(BUILD_DIR)/src/libultra/io/sptaskyield.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/pfsreadwritefile.o"
- include "$(BUILD_DIR)/src/libultra/io/pfsgetstatus.o"
-#endif
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/gu/mtxutil.o"
-#endif
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/mgu/mtxidentf.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/gu/lookat.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/pfsallocatefile.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/os/stoptimer.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/contpfs.o"
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/mgu/mtxl2f.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/pfsfindfile.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/gu/sqrtf.o"
- include "$(BUILD_DIR)/src/libultra/os/afterprenmi.o"
- include "$(BUILD_DIR)/src/libultra/io/contquery.o"
- include "$(BUILD_DIR)/src/libultra/gu/lookathil.o"
-#if !OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/libc/xprintf.o"
-#endif
-#if !OOT_DEBUG && !defined(COMPILER_GCC)
- include "$(BUILD_DIR)/src/libultra/libc/string.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/sp.o"
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/mgu/mtxident.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/gu/position.o"
- include "$(BUILD_DIR)/src/libultra/io/sptaskyielded.o"
- include "$(BUILD_DIR)/src/libultra/gu/rotate.o"
- include "$(BUILD_DIR)/src/libultra/io/aisetfreq.o"
- include "$(BUILD_DIR)/src/libultra/os/getactivequeue.o"
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/gu/normalize.o"
-#else
- include "$(BUILD_DIR)/src/libultra/mgu/normalize.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/dpgetstat.o"
- include "$(BUILD_DIR)/src/libultra/io/dpsetstat.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/pfsdeletefile.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/gu/ortho.o"
- include "$(BUILD_DIR)/src/libultra/gu/cosf.o"
- include "$(BUILD_DIR)/src/libultra/gu/libm_vals.o"
- include "$(BUILD_DIR)/src/libultra/gu/coss.o"
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/os/settime.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/visetevent.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/pfsisplug.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/gu/us2dex.o"
- include "$(BUILD_DIR)/src/libultra/io/pfsselectbank.o"
- include "$(BUILD_DIR)/src/libultra/io/contsetch.o"
-#if OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/pfsfilestate.o"
- include "$(BUILD_DIR)/src/libultra/io/pfsinitpak.o"
- include "$(BUILD_DIR)/src/libultra/io/pfschecker.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/aigetlen.o"
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/gu/translate.o"
-#else
- include "$(BUILD_DIR)/src/libultra/mgu/translate.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/contramwrite.o"
-#if !OOT_PAL_N64 && !OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o"
-#endif
-#if !OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/pfsgetstatus.o"
- include "$(BUILD_DIR)/src/libultra/io/contpfs.o"
-#endif
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/libc/bcmp.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/contramread.o"
- include "$(BUILD_DIR)/src/libultra/io/crc.o"
-#if !OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/io/pfsisplug.o"
-#endif
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/os/settimer.o"
-#endif
-#if PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/libc/xlitob.o"
- include "$(BUILD_DIR)/src/libultra/libc/ldiv.o"
- include "$(BUILD_DIR)/src/libultra/libc/xldtob.o"
-#elif !OOT_DEBUG
- include "$(BUILD_DIR)/src/libultra/libc/xldtob.o"
- include "$(BUILD_DIR)/src/libultra/libc/ldiv.o"
- include "$(BUILD_DIR)/src/libultra/libc/xlitob.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/io/spgetstat.o"
- include "$(BUILD_DIR)/src/libultra/io/spsetstat.o"
- include "$(BUILD_DIR)/src/libultra/os/writebackdcacheall.o"
- include "$(BUILD_DIR)/src/libultra/os/getcurrfaultedthread.o"
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libultra/mgu/mtxf2l.o"
-#endif
- include "$(BUILD_DIR)/src/libultra/libc/llcvt.o"
- include "$(BUILD_DIR)/src/libultra/io/vigetcurrframebuf.o"
- include "$(BUILD_DIR)/src/libultra/io/spsetpc.o"
- include "$(BUILD_DIR)/src/libc/sqrt.o"
-#if !PLATFORM_N64
- include "$(BUILD_DIR)/src/libc/absf.o"
-#endif
- include "$(BUILD_DIR)/src/libc/fmodf.o"
-#ifndef COMPILER_GCC
- include "$(BUILD_DIR)/src/libc/memset.o"
- include "$(BUILD_DIR)/src/libc/memmove.o"
-#endif
- // For some reason, the data sections of z_message and z_game_over are
- // placed near the rodata sections of other files, so we first build this
- // combined object before the final link.
- include "$(BUILD_DIR)/src/code/z_message_z_game_over.o"
- include "$(BUILD_DIR)/src/code/z_construct.o"
- include "$(BUILD_DIR)/src/audio/tables/soundfont_table.o"
- include "$(BUILD_DIR)/assets/audio/sequence_font_table.o"
- include "$(BUILD_DIR)/src/audio/tables/sequence_table.o"
- include "$(BUILD_DIR)/src/audio/tables/samplebank_table.o"
- include "$(BUILD_DIR)/data/rsp.text.o"
- include "$(BUILD_DIR)/data/rsp.rodata.o"
-endseg
-
-beginseg
- name "buffers"
- flags NOLOAD
- align 0x40
- include "$(BUILD_DIR)/src/buffers/zbuffer.o"
- include "$(BUILD_DIR)/src/buffers/gfxbuffers.o"
- include "$(BUILD_DIR)/src/buffers/audio_heap.o"
-endseg
-
-#if PLATFORM_N64
-beginseg
- name "n64dd"
- compress
- align 0x40
- include "$(BUILD_DIR)/src/n64dd/z_n64dd.o"
- include "$(BUILD_DIR)/src/n64dd/n64dd_data_buffer.o"
- include "$(BUILD_DIR)/src/n64dd/n64dd_801C8000.o"
- include "$(BUILD_DIR)/src/n64dd/n64dd_801C8940.o"
- include "$(BUILD_DIR)/src/n64dd/n64dd_801C9440.o"
- include "$(BUILD_DIR)/src/n64dd/n64dd_801C9B70.o"
- include "$(BUILD_DIR)/src/n64dd/n64dd_error_headers.o"
- include "$(BUILD_DIR)/src/n64dd/n64dd_error_bodies.o"
- include "$(BUILD_DIR)/src/n64dd/n64dd_error_textures.o"
- include "$(BUILD_DIR)/src/n64dd/n64dd_801CA0B0.o"
- include "$(BUILD_DIR)/src/libleo/api/readwrite.o"
- include "$(BUILD_DIR)/src/libleo/leo/leofunc.o"
- include "$(BUILD_DIR)/src/libleo/leo/leoram.o"
- include "$(BUILD_DIR)/src/libleo/leo/leoint.o"
- include "$(BUILD_DIR)/src/libleo/leo/leocmdex.o"
- include "$(BUILD_DIR)/src/libleo/api/getaadr2.o"
- include "$(BUILD_DIR)/src/libleo/leo/leoread.o"
- include "$(BUILD_DIR)/src/libleo/api/lbatobyte.o"
- include "$(BUILD_DIR)/src/libleo/leo/leoinquiry.o"
- include "$(BUILD_DIR)/src/libleo/leo/leodiskinit.o"
- include "$(BUILD_DIR)/src/libleo/api/seek.o"
- include "$(BUILD_DIR)/src/libleo/leo/leord_diskid.o"
- include "$(BUILD_DIR)/src/libleo/leo/leomecha.o"
- include "$(BUILD_DIR)/src/libleo/api/spdlmotor.o"
- include "$(BUILD_DIR)/src/libleo/leo/leo_tbl.o"
- include "$(BUILD_DIR)/src/libleo/leo/leotempbuffer.o"
- include "$(BUILD_DIR)/src/libleo/leo/leoc2_syndrome.o"
- include "$(BUILD_DIR)/src/libleo/leo/leoc2ecc.o"
- include "$(BUILD_DIR)/src/libleo/leo/leomseq_tbl.o"
- include "$(BUILD_DIR)/src/libleo/leo/leomotor.o"
- include "$(BUILD_DIR)/src/libleo/api/driveexist.o"
- include "$(BUILD_DIR)/src/libleo/leo/leomode_sel.o"
- include "$(BUILD_DIR)/src/libleo/leo/leord_capa.o"
- include "$(BUILD_DIR)/src/libleo/leo/leoutil.o"
- include "$(BUILD_DIR)/src/libleo/leo/leorezero.o"
- include "$(BUILD_DIR)/src/libleo/api/clearqueue.o"
- include "$(BUILD_DIR)/src/libleo/api/bytetolba.o"
- include "$(BUILD_DIR)/src/libleo/leo/leoreset.o"
- include "$(BUILD_DIR)/src/libleo/leo/leotranslat.o"
- include "$(BUILD_DIR)/src/libleo/leo/leotimer.o"
- include "$(BUILD_DIR)/src/libleo/api/getkadr.o"
- include "$(BUILD_DIR)/src/libleo/api/getaadr.o"
- include "$(BUILD_DIR)/src/libleo/leo/leoglobals.o"
- include "$(BUILD_DIR)/src/libleo/leo/leowrite.o"
- include "$(BUILD_DIR)/src/libleo/api/cjcreateleomanager.o"
- include "$(BUILD_DIR)/src/libleo/leo/leointerrupt.o"
- include "$(BUILD_DIR)/src/libleo/api/cacreateleomanager.o"
- include "$(BUILD_DIR)/src/libleo/api/testunitready.o"
- include "$(BUILD_DIR)/src/libleo/leo/leotestunit.o"
- include "$(BUILD_DIR)/src/libleo/leo/leoseek.o"
-endseg
-#endif
-
-beginseg
- name "ovl_title"
- compress
- address 0x80800000
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_title/z_title.o"
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_title/ovl_title_reloc.o"
-endseg
-
-beginseg
- name "ovl_select"
- compress
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_select/z_select.o"
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_select/ovl_select_reloc.o"
-endseg
-
-beginseg
- name "ovl_opening"
- compress
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_opening/z_opening.o"
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_opening/ovl_opening_reloc.o"
-endseg
-
-beginseg
- name "ovl_file_choose"
- compress
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_nameset_data.o"
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.o"
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_nameset.o"
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_choose.o"
- include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/ovl_file_choose_reloc.o"
-endseg
-
-beginseg
- name "ovl_kaleido_scope"
- compress
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.o"
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_debug.o"
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.o"
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.o"
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.o"
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.o"
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.o"
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.o"
-#if !OOT_MQ
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark_data.o"
-#else
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark_data_mq.o"
-#endif
- include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/ovl_kaleido_scope_reloc.o"
-endseg
-
-beginseg
- name "ovl_player_actor"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_player_actor/z_player.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_player_actor/ovl_player_actor_reloc.o"
-endseg
-
-beginseg
- name "ovl_map_mark_data"
- compress
-#if !OOT_MQ
- include "$(BUILD_DIR)/src/overlays/misc/ovl_map_mark_data/z_map_mark_data.o"
-#else
- include "$(BUILD_DIR)/src/overlays/misc/ovl_map_mark_data/z_map_mark_data_mq.o"
-#endif
- include "$(BUILD_DIR)/src/overlays/misc/ovl_map_mark_data/ovl_map_mark_data_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Test"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test/z_en_test.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test/ovl_En_Test_reloc.o"
-endseg
-
-// Overlays for most actors and effects are reordered between versions. On N64 and iQue,
-// the overlays are in some arbitrary order, while on GameCube they are sorted alphabetically.
-#if !PLATFORM_GC
-
-beginseg
- name "ovl_En_GirlA"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GirlA/z_en_girla.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GirlA/ovl_En_GirlA_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Part"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Part/z_en_part.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Part/ovl_En_Part_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Light"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Light/z_en_light.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Light/ovl_En_Light_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Door"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door/z_en_door.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door/ovl_En_Door_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Box"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Box/z_en_box.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Box/ovl_En_Box_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Poh"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Poh/z_en_poh.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Poh/ovl_En_Poh_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Okuta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okuta/z_en_okuta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okuta/ovl_En_Okuta_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bom"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom/z_en_bom.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom/ovl_En_Bom_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wallmas"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wallmas/ovl_En_Wallmas_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dodongo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodongo/ovl_En_Dodongo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Firefly"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly/z_en_firefly.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly/ovl_En_Firefly_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse/z_en_horse.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse/ovl_En_Horse_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Arrow"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arrow/z_en_arrow.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arrow/ovl_En_Arrow_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Elf"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elf/z_en_elf.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elf/ovl_En_Elf_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Niw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw/z_en_niw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw/ovl_En_Niw_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tite"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tite/z_en_tite.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tite/ovl_En_Tite_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Reeba"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Reeba/z_en_reeba.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Reeba/ovl_En_Reeba_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Peehat"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Peehat/z_en_peehat.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Peehat/ovl_En_Peehat_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Holl"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Holl/z_en_holl.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Holl/ovl_En_Holl_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Scene_Change"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scene_Change/ovl_En_Scene_Change_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zf"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zf/z_en_zf.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zf/ovl_En_Zf_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Hata"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hata/z_en_hata.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hata/ovl_En_Hata_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Dodongo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Dodongo/ovl_Boss_Dodongo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Goma"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Goma/ovl_Boss_Goma_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zl1"
- compress
-include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/z_en_zl1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/ovl_En_Zl1_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Viewer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Viewer/z_en_viewer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Viewer/ovl_En_Viewer_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Goma"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goma/z_en_goma.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goma/ovl_En_Goma_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Pushbox"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Pushbox/ovl_Bg_Pushbox_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bubble"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bubble/z_en_bubble.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bubble/ovl_En_Bubble_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Shutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Shutter/ovl_Door_Shutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dodojr"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodojr/ovl_En_Dodojr_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bdfire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bdfire/ovl_En_Bdfire_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Boom"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boom/z_en_boom.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boom/ovl_En_Boom_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Torch2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch2/z_en_torch2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch2/ovl_En_Torch2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bili"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bili/z_en_bili.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bili/ovl_En_Bili_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tp"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tp/z_en_tp.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tp/ovl_En_Tp_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_St"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_St/z_en_st.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_St/ovl_En_St_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bw/z_en_bw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bw/ovl_En_Bw_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Eiyer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eiyer/ovl_En_Eiyer_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_River_Sound"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_River_Sound/ovl_En_River_Sound_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse_Normal"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Normal/ovl_En_Horse_Normal_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ossan"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ossan/z_en_ossan.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ossan/ovl_En_Ossan_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Treemouth"
- compress
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/ovl_Bg_Treemouth_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Dodoago"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dodoago/ovl_Bg_Dodoago_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Dalm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Dalm/ovl_Bg_Hidan_Dalm_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Hrock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hrock/ovl_Bg_Hidan_Hrock_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse_Ganon"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Ganon/ovl_En_Horse_Ganon_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Rock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rock/ovl_Bg_Hidan_Rock_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Rsekizou"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/ovl_Bg_Hidan_Rsekizou_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Sekizou"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sekizou/ovl_Bg_Hidan_Sekizou_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Sima"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sima/ovl_Bg_Hidan_Sima_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Syoku"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Syoku/ovl_Bg_Hidan_Syoku_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Xc"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Xc/z_en_xc.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Xc/ovl_En_Xc_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Curtain"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Curtain/ovl_Bg_Hidan_Curtain_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot00_Hanebasi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/ovl_Bg_Spot00_Hanebasi_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mb/z_en_mb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mb/ovl_En_Mb_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bombf"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombf/z_en_bombf.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombf/ovl_En_Bombf_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Firewall"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Firewall/ovl_Bg_Hidan_Firewall_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Dy_Yoseizo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dy_Yoseizo/ovl_Bg_Dy_Yoseizo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zl2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl2/z_en_zl2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl2/ovl_En_Zl2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Fslift"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fslift/ovl_Bg_Hidan_Fslift_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_OE2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_OE2/z_en_oe2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_OE2/ovl_En_OE2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ydan_Hasi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Hasi/ovl_Bg_Ydan_Hasi_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ydan_Maruta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Maruta/ovl_Bg_Ydan_Maruta_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Ganondrof"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganondrof/ovl_Boss_Ganondrof_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Am"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Am/z_en_am.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Am/ovl_En_Am_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dekubaba"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekubaba/ovl_En_Dekubaba_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_M_Fire1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Fire1/ovl_En_M_Fire1_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_M_Thunder"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Thunder/ovl_En_M_Thunder_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ddan_Jd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Jd/ovl_Bg_Ddan_Jd_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Breakwall"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Breakwall/ovl_Bg_Breakwall_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Jj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jj/z_en_jj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jj/ovl_En_Jj_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse_Zelda"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Zelda/ovl_En_Horse_Zelda_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ddan_Kd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Kd/ovl_Bg_Ddan_Kd_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Warp1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Warp1/ovl_Door_Warp1_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Syokudai"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Syokudai/ovl_Obj_Syokudai_reloc.o"
-endseg
-
-beginseg
- name "ovl_Item_B_Heart"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/ovl_Item_B_Heart_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dekunuts"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekunuts/ovl_En_Dekunuts_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Menkuri_Kaiten"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/ovl_Bg_Menkuri_Kaiten_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Menkuri_Eye"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Eye/ovl_Bg_Menkuri_Eye_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Vali"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vali/z_en_vali.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vali/ovl_En_Vali_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mizu_Movebg"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Movebg/ovl_Bg_Mizu_Movebg_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mizu_Water"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Water/ovl_Bg_Mizu_Water_reloc.o"
-endseg
-
-beginseg
- name "ovl_Arms_Hook"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arms_Hook/ovl_Arms_Hook_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_fHG"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_fHG/z_en_fhg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_fHG/ovl_En_fHG_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Hineri"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hineri/ovl_Bg_Mori_Hineri_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bb/z_en_bb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bb/ovl_En_Bb_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Toki_Hikari"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Hikari/ovl_Bg_Toki_Hikari_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Yukabyun"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yukabyun/ovl_En_Yukabyun_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Toki_Swd"
- compress
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.o"
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.o"
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/ovl_Bg_Toki_Swd_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fhg_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fhg_Fire/ovl_En_Fhg_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mjin"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mjin/ovl_Bg_Mjin_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Kousi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kousi/ovl_Bg_Hidan_Kousi_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Toki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Toki/z_door_toki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Toki/ovl_Door_Toki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Hamstep"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hamstep/ovl_Bg_Hidan_Hamstep_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bird"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bird/z_en_bird.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bird/ovl_En_Bird_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wood02"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wood02/z_en_wood02.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wood02/ovl_En_Wood02_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Lightbox"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Lightbox/ovl_En_Lightbox_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Pu_box"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pu_box/ovl_En_Pu_box_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Trap"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trap/z_en_trap.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trap/ovl_En_Trap_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Arow_Trap"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arow_Trap/ovl_En_Arow_Trap_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Vase"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vase/z_en_vase.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vase/ovl_En_Vase_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ta/z_en_ta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ta/ovl_En_Ta_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tk"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tk/z_en_tk.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tk/ovl_En_Tk_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Bigst"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Bigst/ovl_Bg_Mori_Bigst_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Elevator"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Elevator/ovl_Bg_Mori_Elevator_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Kaitenkabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/ovl_Bg_Mori_Kaitenkabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Rakkatenjo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/ovl_Bg_Mori_Rakkatenjo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Vm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vm/z_en_vm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vm/ovl_En_Vm_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Effect"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Effect/ovl_Demo_Effect_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Kankyo"
- compress
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.o"
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.o"
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.o"
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.o"
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.o"
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.o"
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.o"
-include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/ovl_Demo_Kankyo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Fwbig"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fwbig/ovl_Bg_Hidan_Fwbig_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Floormas"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Floormas/z_en_floormas.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Floormas/ovl_En_Floormas_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Heishi1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi1/ovl_En_Heishi1_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Rd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rd/z_en_rd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rd/ovl_En_Rd_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Po_Sisters"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Sisters/ovl_En_Po_Sisters_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Heavy_Block"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Heavy_Block/ovl_Bg_Heavy_Block_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Po_Event"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Event/ovl_Bg_Po_Event_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Mure"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure/ovl_Obj_Mure_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Sw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sw/z_en_sw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sw/ovl_En_Sw_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Fd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd/ovl_Boss_Fd_reloc.o"
-endseg
-
-beginseg
- name "ovl_Object_Kankyo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Object_Kankyo/ovl_Object_Kankyo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Du"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Du/z_en_du.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Du/ovl_En_Du_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd/z_en_fd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd/ovl_En_Fd_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse_Link_Child"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Link_Child/ovl_En_Horse_Link_Child_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Ana"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Ana/z_door_ana.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Ana/ovl_Door_Ana_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot02_Objects"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot02_Objects/ovl_Bg_Spot02_Objects_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka/ovl_Bg_Haka_reloc.o"
-endseg
-
-beginseg
- name "ovl_Magic_Wind"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Wind/ovl_Magic_Wind_reloc.o"
-endseg
-
-beginseg
- name "ovl_Magic_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Fire/ovl_Magic_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ru1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru1/z_en_ru1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru1/ovl_En_Ru1_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Fd2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd2/ovl_Boss_Fd2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fd_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd_Fire/ovl_En_Fd_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dh"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dh/z_en_dh.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dh/ovl_En_Dh_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dha"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dha/z_en_dha.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dha/ovl_En_Dha_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Rl"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rl/z_en_rl.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rl/ovl_En_Rl_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Encount1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount1/z_en_encount1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount1/ovl_En_Encount1_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Du"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Du/z_demo_du.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Du/ovl_Demo_Du_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Im"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Im/z_demo_im.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Im/ovl_Demo_Im_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Tre_Lgt"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Tre_Lgt/ovl_Demo_Tre_Lgt_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fw/z_en_fw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fw/ovl_En_Fw_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Vb_Sima"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Vb_Sima/ovl_Bg_Vb_Sima_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Vb_Ball"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vb_Ball/ovl_En_Vb_Ball_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Megane"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Megane/ovl_Bg_Haka_Megane_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_MeganeBG"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_MeganeBG/ovl_Bg_Haka_MeganeBG_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Ship"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Ship/ovl_Bg_Haka_Ship_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Sgami"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Sgami/ovl_Bg_Haka_Sgami_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Heishi2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi2/ovl_En_Heishi2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Encount2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount2/z_en_encount2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount2/ovl_En_Encount2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fire_Rock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fire_Rock/ovl_En_Fire_Rock_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Brob"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Brob/z_en_brob.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Brob/ovl_En_Brob_reloc.o"
-endseg
-
-beginseg
- name "ovl_Mir_Ray"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray/ovl_Mir_Ray_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot09_Obj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot09_Obj/ovl_Bg_Spot09_Obj_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot18_Obj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Obj/ovl_Bg_Spot18_Obj_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Va"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Va/z_boss_va.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Va/ovl_Boss_Va_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Tubo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Tubo/ovl_Bg_Haka_Tubo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Trap"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Trap/ovl_Bg_Haka_Trap_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Huta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Huta/ovl_Bg_Haka_Huta_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Zou"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Zou/ovl_Bg_Haka_Zou_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot17_Funen"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Funen/ovl_Bg_Spot17_Funen_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Syateki_Itm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Itm/ovl_En_Syateki_Itm_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Syateki_Man"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Man/ovl_En_Syateki_Man_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tana"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tana/z_en_tana.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tana/ovl_En_Tana_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Nb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nb/z_en_nb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nb/ovl_En_Nb_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Mo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Mo/ovl_Boss_Mo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Sb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sb/z_en_sb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sb/ovl_En_Sb_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bigokuta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigokuta/ovl_En_Bigokuta_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Karebaba"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Karebaba/ovl_En_Karebaba_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Bdan_Objects"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Objects/ovl_Bg_Bdan_Objects_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Sa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Sa/ovl_Demo_Sa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Go"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Go/z_demo_go.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Go/ovl_Demo_Go_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_In"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_In/z_en_in.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_In/ovl_En_In_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tr"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tr/z_en_tr.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tr/ovl_En_Tr_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot16_Bombstone"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Bombstone/ovl_Bg_Spot16_Bombstone_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Kowarerukabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/ovl_Bg_Hidan_Kowarerukabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Bombwall"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bombwall/ovl_Bg_Bombwall_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ru2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru2/z_en_ru2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru2/ovl_En_Ru2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Dekujr"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dekujr/ovl_Obj_Dekujr_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mizu_Uzu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Uzu/ovl_Bg_Mizu_Uzu_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot06_Objects"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot06_Objects/ovl_Bg_Spot06_Objects_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ice_Objects"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Objects/ovl_Bg_Ice_Objects_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Water"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Water/ovl_Bg_Haka_Water_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ma2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma2/z_en_ma2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma2/ovl_En_Ma2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bom_Chu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Chu/ovl_En_Bom_Chu_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse_Game_Check"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Game_Check/ovl_En_Horse_Game_Check_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Tw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Tw/ovl_Boss_Tw_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Rr"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rr/z_en_rr.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rr/ovl_En_Rr_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ba"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ba/z_en_ba.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ba/ovl_En_Ba_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bx"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bx/z_en_bx.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bx/ovl_En_Bx_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Anubice"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice/z_en_anubice.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice/ovl_En_Anubice_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Anubice_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Fire/ovl_En_Anubice_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Hashigo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashigo/ovl_Bg_Mori_Hashigo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Hashira4"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashira4/ovl_Bg_Mori_Hashira4_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Idomizu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Idomizu/ovl_Bg_Mori_Idomizu_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot16_Doughnut"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Doughnut/ovl_Bg_Spot16_Doughnut_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Bdan_Switch"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Switch/ovl_Bg_Bdan_Switch_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ma1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma1/z_en_ma1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma1/ovl_En_Ma1_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Ganon"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon/ovl_Boss_Ganon_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Sst"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Sst/ovl_Boss_Sst_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ny"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ny/z_en_ny.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ny/ovl_En_Ny_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fr"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fr/z_en_fr.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fr/ovl_En_Fr_reloc.o"
-endseg
-
-beginseg
- name "ovl_Item_Shield"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Shield/z_item_shield.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Shield/ovl_Item_Shield_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ice_Shelter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shelter/ovl_Bg_Ice_Shelter_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ice_Hono"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ice_Hono/ovl_En_Ice_Hono_reloc.o"
-endseg
-
-beginseg
- name "ovl_Item_Ocarina"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Ocarina/ovl_Item_Ocarina_reloc.o"
-endseg
-
-beginseg
- name "ovl_Magic_Dark"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Dark/ovl_Magic_Dark_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_6K"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_6K/z_demo_6k.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_6K/ovl_Demo_6K_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Anubice_Tag"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Tag/ovl_En_Anubice_Tag_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Gate"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Gate/ovl_Bg_Haka_Gate_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot15_Saku"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Saku/ovl_Bg_Spot15_Saku_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Goroiwa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Goroiwa/ovl_Bg_Jya_Goroiwa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Zurerukabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/ovl_Bg_Jya_Zurerukabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Cobra"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Cobra/ovl_Bg_Jya_Cobra_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Kanaami"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Kanaami/ovl_Bg_Jya_Kanaami_reloc.o"
-endseg
-
-beginseg
- name "ovl_Fishing"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Fishing/z_fishing.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Fishing/ovl_Fishing_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Oshihiki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Oshihiki/ovl_Obj_Oshihiki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gate_Shutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gate_Shutter/ovl_Bg_Gate_Shutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_Eff_Dust"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Dust/ovl_Eff_Dust_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot01_Fusya"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Fusya/ovl_Bg_Spot01_Fusya_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot01_Idohashira"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idohashira/ovl_Bg_Spot01_Idohashira_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot01_Idomizu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idomizu/ovl_Bg_Spot01_Idomizu_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Po_Syokudai"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Syokudai/ovl_Bg_Po_Syokudai_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ganon_Otyuka"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ganon_Otyuka/ovl_Bg_Ganon_Otyuka_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot15_Rrbox"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Rrbox/ovl_Bg_Spot15_Rrbox_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Umajump"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Umajump/ovl_Bg_Umajump_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Insect"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Insect/z_en_insect.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Insect/ovl_En_Insect_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Butte"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Butte/z_en_butte.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Butte/ovl_En_Butte_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fish"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish/z_en_fish.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish/ovl_En_Fish_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot08_Iceblock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Iceblock/ovl_Bg_Spot08_Iceblock_reloc.o"
-endseg
-
-beginseg
- name "ovl_Item_Etcetera"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Etcetera/ovl_Item_Etcetera_reloc.o"
-endseg
-
-beginseg
- name "ovl_Arrow_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Fire/ovl_Arrow_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Arrow_Ice"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Ice/ovl_Arrow_Ice_reloc.o"
-endseg
-
-beginseg
- name "ovl_Arrow_Light"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Light/ovl_Arrow_Light_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Kibako"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako/ovl_Obj_Kibako_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Tsubo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tsubo/ovl_Obj_Tsubo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wonder_Item"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Item/ovl_En_Wonder_Item_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ik"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ik/z_en_ik.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ik/ovl_En_Ik_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Ik"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ik/ovl_Demo_Ik_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Skj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skj/z_en_skj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skj/ovl_En_Skj_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Skjneedle"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skjneedle/ovl_En_Skjneedle_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_G_Switch"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_G_Switch/ovl_En_G_Switch_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Ext"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ext/ovl_Demo_Ext_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Shd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Shd/ovl_Demo_Shd_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dns"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dns/z_en_dns.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dns/ovl_En_Dns_reloc.o"
-endseg
-
-beginseg
- name "ovl_Elf_Msg"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg/ovl_Elf_Msg_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Honotrap"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Honotrap/ovl_En_Honotrap_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tubo_Trap"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tubo_Trap/ovl_En_Tubo_Trap_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Ice_Poly"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ice_Poly/ovl_Obj_Ice_Poly_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot03_Taki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot03_Taki/ovl_Bg_Spot03_Taki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot07_Taki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot07_Taki/ovl_Bg_Spot07_Taki_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fz"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fz/z_en_fz.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fz/ovl_En_Fz_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Po_Relay"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Relay/ovl_En_Po_Relay_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Relay_Objects"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Relay_Objects/ovl_Bg_Relay_Objects_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Diving_Game"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Diving_Game/ovl_En_Diving_Game_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kusa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa/z_en_kusa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa/ovl_En_Kusa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Bean"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bean/ovl_Obj_Bean_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Bombiwa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bombiwa/ovl_Obj_Bombiwa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Switch"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Switch/ovl_Obj_Switch_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Elevator"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Elevator/ovl_Obj_Elevator_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Lift"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lift/ovl_Obj_Lift_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Hsblock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hsblock/ovl_Obj_Hsblock_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Okarina_Tag"
- compress
-include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/ovl_En_Okarina_Tag_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Yabusame_Mark"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yabusame_Mark/ovl_En_Yabusame_Mark_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Goroiwa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goroiwa/ovl_En_Goroiwa_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ex_Ruppy"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Ruppy/ovl_En_Ex_Ruppy_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Toryo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Toryo/z_en_toryo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Toryo/ovl_En_Toryo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Daiku"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku/z_en_daiku.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku/ovl_En_Daiku_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Nwc"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nwc/z_en_nwc.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nwc/ovl_En_Nwc_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Blkobj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Blkobj/ovl_En_Blkobj_reloc.o"
-endseg
-
-beginseg
- name "ovl_Item_Inbox"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Inbox/ovl_Item_Inbox_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ge1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge1/z_en_ge1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge1/ovl_En_Ge1_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Blockstop"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Blockstop/ovl_Obj_Blockstop_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Sda"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sda/z_en_sda.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sda/ovl_En_Sda_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Clear_Tag"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Clear_Tag/ovl_En_Clear_Tag_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Niw_Lady"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Lady/ovl_En_Niw_Lady_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Gm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gm/z_en_gm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gm/ovl_En_Gm_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ms"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ms/z_en_ms.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ms/ovl_En_Ms_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Hs"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs/z_en_hs.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs/ovl_En_Hs_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ingate"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ingate/ovl_Bg_Ingate_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kanban"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kanban/z_en_kanban.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kanban/ovl_En_Kanban_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Heishi3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi3/ovl_En_Heishi3_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Syateki_Niw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Niw/ovl_En_Syateki_Niw_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Attack_Niw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Attack_Niw/ovl_En_Attack_Niw_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot01_Idosoko"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idosoko/ovl_Bg_Spot01_Idosoko_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Sa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sa/z_en_sa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sa/ovl_En_Sa_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wonder_Talk"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk/ovl_En_Wonder_Talk_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gjyo_Bridge"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gjyo_Bridge/ovl_Bg_Gjyo_Bridge_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ds"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ds/z_en_ds.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ds/ovl_En_Ds_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mk"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mk/z_en_mk.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mk/ovl_En_Mk_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bom_Bowl_Man"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Man/ovl_En_Bom_Bowl_Man_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bom_Bowl_Pit"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Pit/ovl_En_Bom_Bowl_Pit_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Owl"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Owl/z_en_owl.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Owl/ovl_En_Owl_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ishi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ishi/z_en_ishi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ishi/ovl_En_Ishi_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Hana"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hana/ovl_Obj_Hana_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Lightswitch"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightswitch/ovl_Obj_Lightswitch_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Mure2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure2/ovl_Obj_Mure2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Go"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go/z_en_go.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go/ovl_En_Go_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu/z_en_fu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu/ovl_En_Fu_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Changer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Changer/z_en_changer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Changer/ovl_En_Changer_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Megami"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Megami/ovl_Bg_Jya_Megami_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Lift"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Lift/ovl_Bg_Jya_Lift_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Bigmirror"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bigmirror/ovl_Bg_Jya_Bigmirror_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Bombchuiwa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/ovl_Bg_Jya_Bombchuiwa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Amishutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Amishutter/ovl_Bg_Jya_Amishutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Bombiwa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombiwa/ovl_Bg_Jya_Bombiwa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot18_Basket"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Basket/ovl_Bg_Spot18_Basket_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ganon_Organ"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Organ/ovl_En_Ganon_Organ_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Siofuki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Siofuki/ovl_En_Siofuki_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Stream"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stream/z_en_stream.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stream/ovl_En_Stream_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm/z_en_mm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm/ovl_En_Mm_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ko"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ko/z_en_ko.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ko/ovl_En_Ko_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kz"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kz/z_en_kz.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kz/ovl_En_Kz_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Weather_Tag"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weather_Tag/ovl_En_Weather_Tag_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Sst_Floor"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Sst_Floor/ovl_Bg_Sst_Floor_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ani"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ani/z_en_ani.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ani/ovl_En_Ani_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ex_Item"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Item/ovl_En_Ex_Item_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Ironobj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Ironobj/ovl_Bg_Jya_Ironobj_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Js"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Js/z_en_js.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Js/ovl_En_Js_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Jsjutan"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jsjutan/ovl_En_Jsjutan_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Cs"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cs/z_en_cs.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cs/ovl_En_Cs_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Md"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Md/z_en_md.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Md/ovl_En_Md_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Hy"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hy/z_en_hy.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hy/ovl_En_Hy_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ganon_Mant"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Mant/ovl_En_Ganon_Mant_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Okarina_Effect"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Effect/ovl_En_Okarina_Effect_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mag"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/z_en_mag.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/ovl_En_Mag_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Gerudo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Gerudo/ovl_Door_Gerudo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Elf_Msg2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg2/ovl_Elf_Msg2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Gt"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gt/ovl_Demo_Gt_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Po_Field"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Field/ovl_En_Po_Field_reloc.o"
-endseg
-
-beginseg
- name "ovl_Efc_Erupc"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Efc_Erupc/ovl_Efc_Erupc_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Zg"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Zg/ovl_Bg_Zg_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Heishi4"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi4/ovl_En_Heishi4_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zl3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl3/z_en_zl3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl3/ovl_En_Zl3_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Ganon2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon2/ovl_Boss_Ganon2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kakasi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi/ovl_En_Kakasi_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Takara_Man"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Takara_Man/ovl_En_Takara_Man_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Makeoshihiki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makeoshihiki/ovl_Obj_Makeoshihiki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Spot"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Spot/ovl_Oceff_Spot_reloc.o"
-endseg
-
-beginseg
- name "ovl_End_Title"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_End_Title/z_end_title.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_End_Title/ovl_End_Title_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Torch"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch/z_en_torch.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch/ovl_En_Torch_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Ec"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ec/ovl_Demo_Ec_reloc.o"
-endseg
-
-beginseg
- name "ovl_Shot_Sun"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Shot_Sun/ovl_Shot_Sun_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dy_Extra"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dy_Extra/ovl_En_Dy_Extra_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wonder_Talk2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk2/ovl_En_Wonder_Talk2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ge2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge2/z_en_ge2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge2/ovl_En_Ge2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Roomtimer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ssh"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ssh/z_en_ssh.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ssh/ovl_En_Ssh_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Sth"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth/z_en_sth.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth/ovl_En_Sth_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Wipe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe/ovl_Oceff_Wipe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dust"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dust/ovl_Effect_Ss_Dust_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_KiraKira"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_KiraKira/ovl_Effect_Ss_KiraKira_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Bomb"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb/ovl_Effect_Ss_Bomb_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Bomb2"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb2/ovl_Effect_Ss_Bomb2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Blast"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Blast/ovl_Effect_Ss_Blast_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Spk"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Spk/ovl_Effect_Ss_G_Spk_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_D_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_D_Fire/ovl_Effect_Ss_D_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Bubble"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bubble/ovl_Effect_Ss_Bubble_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Ripple"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Ripple/ovl_Effect_Ss_G_Ripple_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Splash"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Splash/ovl_Effect_Ss_G_Splash_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Magma"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma/ovl_Effect_Ss_G_Magma_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Fire/ovl_Effect_Ss_G_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Lightning"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Lightning/ovl_Effect_Ss_Lightning_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dt_Bubble"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/ovl_Effect_Ss_Dt_Bubble_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Hahen"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hahen/ovl_Effect_Ss_Hahen_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Stick"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stick/ovl_Effect_Ss_Stick_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Sibuki"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki/ovl_Effect_Ss_Sibuki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Sibuki2"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki2/ovl_Effect_Ss_Sibuki2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Magma2"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma2/ovl_Effect_Ss_G_Magma2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Stone1"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stone1/ovl_Effect_Ss_Stone1_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_HitMark"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_HitMark/ovl_Effect_Ss_HitMark_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Fhg_Flash"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/ovl_Effect_Ss_Fhg_Flash_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_K_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_K_Fire/ovl_Effect_Ss_K_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Solder_Srch_Ball"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/ovl_Effect_Ss_Solder_Srch_Ball_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Kakera"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kakera/ovl_Effect_Ss_Kakera_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Ice_Piece"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/ovl_Effect_Ss_Ice_Piece_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_En_Ice"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Ice/ovl_Effect_Ss_En_Ice_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Fire_Tail"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/ovl_Effect_Ss_Fire_Tail_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_En_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Fire/ovl_Effect_Ss_En_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Extra"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Extra/ovl_Effect_Ss_Extra_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Fcircle"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fcircle/ovl_Effect_Ss_Fcircle_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dead_Db"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Db/ovl_Effect_Ss_Dead_Db_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dead_Dd"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/ovl_Effect_Ss_Dead_Dd_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dead_Ds"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/ovl_Effect_Ss_Dead_Ds_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dead_Sound"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/ovl_Effect_Ss_Dead_Sound_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Storm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Storm/ovl_Oceff_Storm_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Weiyer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weiyer/ovl_En_Weiyer_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot05_Soko"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot05_Soko/ovl_Bg_Spot05_Soko_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_1flift"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_1flift/ovl_Bg_Jya_1flift_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Haheniron"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Haheniron/ovl_Bg_Jya_Haheniron_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot12_Gate"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Gate/ovl_Bg_Spot12_Gate_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot12_Saku"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Saku/ovl_Bg_Spot12_Saku_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Hintnuts"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hintnuts/ovl_En_Hintnuts_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Nutsball"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nutsball/ovl_En_Nutsball_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot00_Break"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Break/ovl_Bg_Spot00_Break_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Shopnuts"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Shopnuts/ovl_En_Shopnuts_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_It"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_It/z_en_it.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_It/ovl_En_It_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_GeldB"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GeldB/z_en_geldb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GeldB/ovl_En_GeldB_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Wipe2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe2/ovl_Oceff_Wipe2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Wipe3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Niw_Girl"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Girl/ovl_En_Niw_Girl_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dog"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dog/z_en_dog.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dog/ovl_En_Dog_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Si"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Si/z_en_si.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Si/ovl_En_Si_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot01_Objects2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Objects2/ovl_Bg_Spot01_Objects2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Comb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Comb/ovl_Obj_Comb_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot11_Bakudankabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/ovl_Bg_Spot11_Bakudankabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Kibako2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako2/ovl_Obj_Kibako2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dnt_Demo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Demo/ovl_En_Dnt_Demo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dnt_Jiji"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Jiji/ovl_En_Dnt_Jiji_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dnt_Nomal"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Nomal/ovl_En_Dnt_Nomal_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Guest"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guest/z_en_guest.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guest/ovl_En_Guest_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Bom_Guard"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bom_Guard/ovl_Bg_Bom_Guard_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Hs2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs2/z_en_hs2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs2/ovl_En_Hs2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Kekkai"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kekkai/ovl_Demo_Kekkai_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot08_Bakudankabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/ovl_Bg_Spot08_Bakudankabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot17_Bakudankabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/ovl_Bg_Spot17_Bakudankabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Mure3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure3/ovl_Obj_Mure3_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tg"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tg/z_en_tg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tg/ovl_En_Tg_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mu/z_en_mu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mu/ovl_En_Mu_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Go2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go2/z_en_go2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go2/ovl_En_Go2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wf"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wf/z_en_wf.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wf/ovl_En_Wf_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Skb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skb/z_en_skb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skb/ovl_En_Skb_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Gj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gj/ovl_Demo_Gj_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Geff"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Geff/ovl_Demo_Geff_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gnd_Firemeiro"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/ovl_Bg_Gnd_Firemeiro_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gnd_Darkmeiro"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/ovl_Bg_Gnd_Darkmeiro_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gnd_Soulmeiro"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/ovl_Bg_Gnd_Soulmeiro_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gnd_Nisekabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/ovl_Bg_Gnd_Nisekabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gnd_Iceblock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Iceblock/ovl_Bg_Gnd_Iceblock_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ydan_Sp"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Sp/ovl_Bg_Ydan_Sp_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Gb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gb/z_en_gb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gb/ovl_En_Gb_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Gs"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gs/z_en_gs.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gs/ovl_En_Gs_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mizu_Bwall"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Bwall/ovl_Bg_Mizu_Bwall_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mizu_Shutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Shutter/ovl_Bg_Mizu_Shutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Daiku_Kakariko"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku_Kakariko/ovl_En_Daiku_Kakariko_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Bowl_Wall"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bowl_Wall/ovl_Bg_Bowl_Wall_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wall_Tubo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wall_Tubo/ovl_En_Wall_Tubo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Po_Desert"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Desert/ovl_En_Po_Desert_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Crow"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Crow/z_en_crow.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Crow/ovl_En_Crow_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Killer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Killer/z_door_killer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Killer/ovl_Door_Killer_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot11_Oasis"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Oasis/ovl_Bg_Spot11_Oasis_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot18_Futa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Futa/ovl_Bg_Spot18_Futa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot18_Shutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Shutter/ovl_Bg_Spot18_Shutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ma3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma3/z_en_ma3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma3/ovl_En_Ma3_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Cow"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cow/z_en_cow.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cow/ovl_En_Cow_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ice_Turara"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Turara/ovl_Bg_Ice_Turara_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ice_Shutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shutter/ovl_Bg_Ice_Shutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kakasi2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi2/ovl_En_Kakasi2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kakasi3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi3/ovl_En_Kakasi3_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Wipe4"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe4/ovl_Oceff_Wipe4_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Eg"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eg/z_en_eg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eg/ovl_En_Eg_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Menkuri_Nisekabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/ovl_Bg_Menkuri_Nisekabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zo/z_en_zo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zo/ovl_En_Zo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Ice_Smoke"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/ovl_Effect_Ss_Ice_Smoke_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Makekinsuta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makekinsuta/ovl_Obj_Makekinsuta_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ge3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge3/z_en_ge3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge3/ovl_En_Ge3_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Timeblock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Timeblock/ovl_Obj_Timeblock_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Hamishi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hamishi/ovl_Obj_Hamishi_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zl4"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl4/z_en_zl4.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl4/ovl_En_Zl4_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mm2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm2/z_en_mm2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm2/ovl_En_Mm2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Block"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Block/ovl_Bg_Jya_Block_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Warp2block"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Warp2block/ovl_Obj_Warp2block_reloc.o"
-endseg
-
-#else
-
-beginseg
- name "ovl_Arms_Hook"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arms_Hook/ovl_Arms_Hook_reloc.o"
-endseg
-
-beginseg
- name "ovl_Arrow_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Fire/ovl_Arrow_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Arrow_Ice"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Ice/ovl_Arrow_Ice_reloc.o"
-endseg
-
-beginseg
- name "ovl_Arrow_Light"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Light/ovl_Arrow_Light_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Bdan_Objects"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Objects/ovl_Bg_Bdan_Objects_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Bdan_Switch"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Switch/ovl_Bg_Bdan_Switch_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Bom_Guard"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bom_Guard/ovl_Bg_Bom_Guard_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Bombwall"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bombwall/ovl_Bg_Bombwall_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Bowl_Wall"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bowl_Wall/ovl_Bg_Bowl_Wall_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Breakwall"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Breakwall/ovl_Bg_Breakwall_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ddan_Jd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Jd/ovl_Bg_Ddan_Jd_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ddan_Kd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Kd/ovl_Bg_Ddan_Kd_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Dodoago"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dodoago/ovl_Bg_Dodoago_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Dy_Yoseizo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dy_Yoseizo/ovl_Bg_Dy_Yoseizo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ganon_Otyuka"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ganon_Otyuka/ovl_Bg_Ganon_Otyuka_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gate_Shutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gate_Shutter/ovl_Bg_Gate_Shutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gjyo_Bridge"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gjyo_Bridge/ovl_Bg_Gjyo_Bridge_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gnd_Darkmeiro"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/ovl_Bg_Gnd_Darkmeiro_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gnd_Firemeiro"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/ovl_Bg_Gnd_Firemeiro_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gnd_Iceblock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Iceblock/ovl_Bg_Gnd_Iceblock_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gnd_Nisekabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/ovl_Bg_Gnd_Nisekabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Gnd_Soulmeiro"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/ovl_Bg_Gnd_Soulmeiro_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka/ovl_Bg_Haka_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Gate"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Gate/ovl_Bg_Haka_Gate_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Huta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Huta/ovl_Bg_Haka_Huta_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Megane"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Megane/ovl_Bg_Haka_Megane_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_MeganeBG"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_MeganeBG/ovl_Bg_Haka_MeganeBG_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Sgami"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Sgami/ovl_Bg_Haka_Sgami_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Ship"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Ship/ovl_Bg_Haka_Ship_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Trap"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Trap/ovl_Bg_Haka_Trap_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Tubo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Tubo/ovl_Bg_Haka_Tubo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Water"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Water/ovl_Bg_Haka_Water_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Haka_Zou"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Zou/ovl_Bg_Haka_Zou_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Heavy_Block"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Heavy_Block/ovl_Bg_Heavy_Block_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Curtain"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Curtain/ovl_Bg_Hidan_Curtain_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Dalm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Dalm/ovl_Bg_Hidan_Dalm_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Firewall"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Firewall/ovl_Bg_Hidan_Firewall_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Fslift"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fslift/ovl_Bg_Hidan_Fslift_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Fwbig"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fwbig/ovl_Bg_Hidan_Fwbig_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Hamstep"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hamstep/ovl_Bg_Hidan_Hamstep_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Hrock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hrock/ovl_Bg_Hidan_Hrock_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Kousi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kousi/ovl_Bg_Hidan_Kousi_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Kowarerukabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/ovl_Bg_Hidan_Kowarerukabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Rock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rock/ovl_Bg_Hidan_Rock_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Rsekizou"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/ovl_Bg_Hidan_Rsekizou_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Sekizou"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sekizou/ovl_Bg_Hidan_Sekizou_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Sima"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sima/ovl_Bg_Hidan_Sima_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Hidan_Syoku"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Syoku/ovl_Bg_Hidan_Syoku_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ice_Objects"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Objects/ovl_Bg_Ice_Objects_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ice_Shelter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shelter/ovl_Bg_Ice_Shelter_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ice_Shutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shutter/ovl_Bg_Ice_Shutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ice_Turara"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Turara/ovl_Bg_Ice_Turara_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ingate"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ingate/ovl_Bg_Ingate_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_1flift"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_1flift/ovl_Bg_Jya_1flift_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Amishutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Amishutter/ovl_Bg_Jya_Amishutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Bigmirror"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bigmirror/ovl_Bg_Jya_Bigmirror_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Block"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Block/ovl_Bg_Jya_Block_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Bombchuiwa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/ovl_Bg_Jya_Bombchuiwa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Bombiwa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombiwa/ovl_Bg_Jya_Bombiwa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Cobra"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Cobra/ovl_Bg_Jya_Cobra_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Goroiwa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Goroiwa/ovl_Bg_Jya_Goroiwa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Haheniron"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Haheniron/ovl_Bg_Jya_Haheniron_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Ironobj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Ironobj/ovl_Bg_Jya_Ironobj_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Kanaami"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Kanaami/ovl_Bg_Jya_Kanaami_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Lift"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Lift/ovl_Bg_Jya_Lift_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Megami"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Megami/ovl_Bg_Jya_Megami_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Jya_Zurerukabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/ovl_Bg_Jya_Zurerukabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Menkuri_Eye"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Eye/ovl_Bg_Menkuri_Eye_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Menkuri_Kaiten"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/ovl_Bg_Menkuri_Kaiten_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Menkuri_Nisekabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/ovl_Bg_Menkuri_Nisekabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mizu_Bwall"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Bwall/ovl_Bg_Mizu_Bwall_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mizu_Movebg"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Movebg/ovl_Bg_Mizu_Movebg_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mizu_Shutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Shutter/ovl_Bg_Mizu_Shutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mizu_Uzu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Uzu/ovl_Bg_Mizu_Uzu_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mizu_Water"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Water/ovl_Bg_Mizu_Water_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mjin"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mjin/ovl_Bg_Mjin_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Bigst"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Bigst/ovl_Bg_Mori_Bigst_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Elevator"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Elevator/ovl_Bg_Mori_Elevator_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Hashigo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashigo/ovl_Bg_Mori_Hashigo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Hashira4"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashira4/ovl_Bg_Mori_Hashira4_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Hineri"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hineri/ovl_Bg_Mori_Hineri_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Idomizu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Idomizu/ovl_Bg_Mori_Idomizu_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Kaitenkabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/ovl_Bg_Mori_Kaitenkabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Mori_Rakkatenjo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/ovl_Bg_Mori_Rakkatenjo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Po_Event"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Event/ovl_Bg_Po_Event_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Po_Syokudai"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Syokudai/ovl_Bg_Po_Syokudai_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Pushbox"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Pushbox/ovl_Bg_Pushbox_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Relay_Objects"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Relay_Objects/ovl_Bg_Relay_Objects_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot00_Break"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Break/ovl_Bg_Spot00_Break_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot00_Hanebasi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/ovl_Bg_Spot00_Hanebasi_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot01_Fusya"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Fusya/ovl_Bg_Spot01_Fusya_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot01_Idohashira"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idohashira/ovl_Bg_Spot01_Idohashira_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot01_Idomizu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idomizu/ovl_Bg_Spot01_Idomizu_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot01_Idosoko"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idosoko/ovl_Bg_Spot01_Idosoko_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot01_Objects2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Objects2/ovl_Bg_Spot01_Objects2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot02_Objects"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot02_Objects/ovl_Bg_Spot02_Objects_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot03_Taki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot03_Taki/ovl_Bg_Spot03_Taki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot05_Soko"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot05_Soko/ovl_Bg_Spot05_Soko_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot06_Objects"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot06_Objects/ovl_Bg_Spot06_Objects_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot07_Taki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot07_Taki/ovl_Bg_Spot07_Taki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot08_Bakudankabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/ovl_Bg_Spot08_Bakudankabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot08_Iceblock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Iceblock/ovl_Bg_Spot08_Iceblock_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot09_Obj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot09_Obj/ovl_Bg_Spot09_Obj_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot11_Bakudankabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/ovl_Bg_Spot11_Bakudankabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot11_Oasis"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Oasis/ovl_Bg_Spot11_Oasis_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot12_Gate"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Gate/ovl_Bg_Spot12_Gate_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot12_Saku"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Saku/ovl_Bg_Spot12_Saku_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot15_Rrbox"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Rrbox/ovl_Bg_Spot15_Rrbox_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot15_Saku"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Saku/ovl_Bg_Spot15_Saku_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot16_Bombstone"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Bombstone/ovl_Bg_Spot16_Bombstone_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot16_Doughnut"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Doughnut/ovl_Bg_Spot16_Doughnut_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot17_Bakudankabe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/ovl_Bg_Spot17_Bakudankabe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot17_Funen"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Funen/ovl_Bg_Spot17_Funen_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot18_Basket"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Basket/ovl_Bg_Spot18_Basket_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot18_Futa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Futa/ovl_Bg_Spot18_Futa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot18_Obj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Obj/ovl_Bg_Spot18_Obj_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Spot18_Shutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Shutter/ovl_Bg_Spot18_Shutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Sst_Floor"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Sst_Floor/ovl_Bg_Sst_Floor_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Toki_Hikari"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Hikari/ovl_Bg_Toki_Hikari_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Toki_Swd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/ovl_Bg_Toki_Swd_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Treemouth"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/ovl_Bg_Treemouth_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Umajump"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Umajump/ovl_Bg_Umajump_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Vb_Sima"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Vb_Sima/ovl_Bg_Vb_Sima_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ydan_Hasi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Hasi/ovl_Bg_Ydan_Hasi_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ydan_Maruta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Maruta/ovl_Bg_Ydan_Maruta_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Ydan_Sp"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Sp/ovl_Bg_Ydan_Sp_reloc.o"
-endseg
-
-beginseg
- name "ovl_Bg_Zg"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Zg/ovl_Bg_Zg_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Dodongo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Dodongo/ovl_Boss_Dodongo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Fd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd/ovl_Boss_Fd_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Fd2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd2/ovl_Boss_Fd2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Ganon"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon/ovl_Boss_Ganon_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Ganon2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon2/ovl_Boss_Ganon2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Ganondrof"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganondrof/ovl_Boss_Ganondrof_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Goma"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Goma/ovl_Boss_Goma_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Mo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Mo/ovl_Boss_Mo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Sst"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Sst/ovl_Boss_Sst_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Tw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Tw/ovl_Boss_Tw_reloc.o"
-endseg
-
-beginseg
- name "ovl_Boss_Va"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Va/z_boss_va.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Va/ovl_Boss_Va_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_6K"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_6K/z_demo_6k.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_6K/ovl_Demo_6K_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Du"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Du/z_demo_du.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Du/ovl_Demo_Du_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Ec"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ec/ovl_Demo_Ec_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Effect"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Effect/ovl_Demo_Effect_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Ext"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ext/ovl_Demo_Ext_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Geff"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Geff/ovl_Demo_Geff_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Gj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gj/ovl_Demo_Gj_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Go"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Go/z_demo_go.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Go/ovl_Demo_Go_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Gt"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gt/ovl_Demo_Gt_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Ik"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ik/ovl_Demo_Ik_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Im"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Im/z_demo_im.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Im/ovl_Demo_Im_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Kankyo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/ovl_Demo_Kankyo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Kekkai"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kekkai/ovl_Demo_Kekkai_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Sa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Sa/ovl_Demo_Sa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Shd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Shd/ovl_Demo_Shd_reloc.o"
-endseg
-
-beginseg
- name "ovl_Demo_Tre_Lgt"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Tre_Lgt/ovl_Demo_Tre_Lgt_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Ana"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Ana/z_door_ana.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Ana/ovl_Door_Ana_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Gerudo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Gerudo/ovl_Door_Gerudo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Killer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Killer/z_door_killer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Killer/ovl_Door_Killer_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Shutter"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Shutter/ovl_Door_Shutter_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Toki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Toki/z_door_toki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Toki/ovl_Door_Toki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Door_Warp1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Warp1/ovl_Door_Warp1_reloc.o"
-endseg
-
-beginseg
- name "ovl_Efc_Erupc"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Efc_Erupc/ovl_Efc_Erupc_reloc.o"
-endseg
-
-beginseg
- name "ovl_Eff_Dust"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Dust/ovl_Eff_Dust_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Blast"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Blast/ovl_Effect_Ss_Blast_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Bomb"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb/ovl_Effect_Ss_Bomb_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Bomb2"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb2/ovl_Effect_Ss_Bomb2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Bubble"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bubble/ovl_Effect_Ss_Bubble_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_D_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_D_Fire/ovl_Effect_Ss_D_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dead_Db"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Db/ovl_Effect_Ss_Dead_Db_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dead_Dd"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/ovl_Effect_Ss_Dead_Dd_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dead_Ds"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/ovl_Effect_Ss_Dead_Ds_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dead_Sound"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/ovl_Effect_Ss_Dead_Sound_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dt_Bubble"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/ovl_Effect_Ss_Dt_Bubble_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Dust"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dust/ovl_Effect_Ss_Dust_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_En_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Fire/ovl_Effect_Ss_En_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_En_Ice"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Ice/ovl_Effect_Ss_En_Ice_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Extra"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Extra/ovl_Effect_Ss_Extra_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Fcircle"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fcircle/ovl_Effect_Ss_Fcircle_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Fhg_Flash"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/ovl_Effect_Ss_Fhg_Flash_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Fire_Tail"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/ovl_Effect_Ss_Fire_Tail_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Fire/ovl_Effect_Ss_G_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Magma"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma/ovl_Effect_Ss_G_Magma_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Magma2"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma2/ovl_Effect_Ss_G_Magma2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Ripple"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Ripple/ovl_Effect_Ss_G_Ripple_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Spk"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Spk/ovl_Effect_Ss_G_Spk_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_G_Splash"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Splash/ovl_Effect_Ss_G_Splash_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Hahen"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hahen/ovl_Effect_Ss_Hahen_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_HitMark"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_HitMark/ovl_Effect_Ss_HitMark_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Ice_Piece"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/ovl_Effect_Ss_Ice_Piece_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Ice_Smoke"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/ovl_Effect_Ss_Ice_Smoke_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_K_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_K_Fire/ovl_Effect_Ss_K_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Kakera"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kakera/ovl_Effect_Ss_Kakera_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_KiraKira"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_KiraKira/ovl_Effect_Ss_KiraKira_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Lightning"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Lightning/ovl_Effect_Ss_Lightning_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Sibuki"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki/ovl_Effect_Ss_Sibuki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Sibuki2"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki2/ovl_Effect_Ss_Sibuki2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Solder_Srch_Ball"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/ovl_Effect_Ss_Solder_Srch_Ball_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Stick"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stick/ovl_Effect_Ss_Stick_reloc.o"
-endseg
-
-beginseg
- name "ovl_Effect_Ss_Stone1"
- compress
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.o"
- include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stone1/ovl_Effect_Ss_Stone1_reloc.o"
-endseg
-
-beginseg
- name "ovl_Elf_Msg"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg/ovl_Elf_Msg_reloc.o"
-endseg
-
-beginseg
- name "ovl_Elf_Msg2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg2/ovl_Elf_Msg2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Am"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Am/z_en_am.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Am/ovl_En_Am_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ani"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ani/z_en_ani.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ani/ovl_En_Ani_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Anubice"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice/z_en_anubice.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice/ovl_En_Anubice_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Anubice_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Fire/ovl_En_Anubice_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Anubice_Tag"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Tag/ovl_En_Anubice_Tag_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Arow_Trap"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arow_Trap/ovl_En_Arow_Trap_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Arrow"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arrow/z_en_arrow.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arrow/ovl_En_Arrow_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Attack_Niw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Attack_Niw/ovl_En_Attack_Niw_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ba"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ba/z_en_ba.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ba/ovl_En_Ba_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bb/z_en_bb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bb/ovl_En_Bb_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bdfire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bdfire/ovl_En_Bdfire_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bigokuta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigokuta/ovl_En_Bigokuta_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bili"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bili/z_en_bili.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bili/ovl_En_Bili_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bird"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bird/z_en_bird.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bird/ovl_En_Bird_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Blkobj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Blkobj/ovl_En_Blkobj_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bom"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom/z_en_bom.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom/ovl_En_Bom_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bom_Bowl_Man"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Man/ovl_En_Bom_Bowl_Man_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bom_Bowl_Pit"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Pit/ovl_En_Bom_Bowl_Pit_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bom_Chu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Chu/ovl_En_Bom_Chu_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bombf"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombf/z_en_bombf.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombf/ovl_En_Bombf_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Boom"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boom/z_en_boom.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boom/ovl_En_Boom_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Box"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Box/z_en_box.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Box/ovl_En_Box_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Brob"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Brob/z_en_brob.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Brob/ovl_En_Brob_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bubble"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bubble/z_en_bubble.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bubble/ovl_En_Bubble_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Butte"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Butte/z_en_butte.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Butte/ovl_En_Butte_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bw/z_en_bw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bw/ovl_En_Bw_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Bx"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bx/z_en_bx.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bx/ovl_En_Bx_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Changer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Changer/z_en_changer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Changer/ovl_En_Changer_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Clear_Tag"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Clear_Tag/ovl_En_Clear_Tag_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Cow"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cow/z_en_cow.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cow/ovl_En_Cow_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Crow"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Crow/z_en_crow.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Crow/ovl_En_Crow_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Cs"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cs/z_en_cs.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cs/ovl_En_Cs_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Daiku"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku/z_en_daiku.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku/ovl_En_Daiku_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Daiku_Kakariko"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku_Kakariko/ovl_En_Daiku_Kakariko_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dekubaba"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekubaba/ovl_En_Dekubaba_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dekunuts"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekunuts/ovl_En_Dekunuts_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dh"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dh/z_en_dh.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dh/ovl_En_Dh_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dha"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dha/z_en_dha.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dha/ovl_En_Dha_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Diving_Game"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Diving_Game/ovl_En_Diving_Game_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dns"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dns/z_en_dns.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dns/ovl_En_Dns_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dnt_Demo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Demo/ovl_En_Dnt_Demo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dnt_Jiji"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Jiji/ovl_En_Dnt_Jiji_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dnt_Nomal"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Nomal/ovl_En_Dnt_Nomal_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dodojr"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodojr/ovl_En_Dodojr_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dodongo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodongo/ovl_En_Dodongo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dog"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dog/z_en_dog.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dog/ovl_En_Dog_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Door"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door/z_en_door.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door/ovl_En_Door_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ds"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ds/z_en_ds.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ds/ovl_En_Ds_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Du"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Du/z_en_du.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Du/ovl_En_Du_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Dy_Extra"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dy_Extra/ovl_En_Dy_Extra_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Eg"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eg/z_en_eg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eg/ovl_En_Eg_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Eiyer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eiyer/ovl_En_Eiyer_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Elf"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elf/z_en_elf.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elf/ovl_En_Elf_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Encount1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount1/z_en_encount1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount1/ovl_En_Encount1_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Encount2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount2/z_en_encount2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount2/ovl_En_Encount2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ex_Item"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Item/ovl_En_Ex_Item_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ex_Ruppy"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Ruppy/ovl_En_Ex_Ruppy_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd/z_en_fd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd/ovl_En_Fd_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fd_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd_Fire/ovl_En_Fd_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fhg_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fhg_Fire/ovl_En_Fhg_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fire_Rock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fire_Rock/ovl_En_Fire_Rock_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Firefly"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly/z_en_firefly.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly/ovl_En_Firefly_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fish"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish/z_en_fish.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish/ovl_En_Fish_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Floormas"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Floormas/z_en_floormas.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Floormas/ovl_En_Floormas_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fr"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fr/z_en_fr.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fr/ovl_En_Fr_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu/z_en_fu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu/ovl_En_Fu_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fw/z_en_fw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fw/ovl_En_Fw_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Fz"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fz/z_en_fz.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fz/ovl_En_Fz_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_G_Switch"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_G_Switch/ovl_En_G_Switch_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ganon_Mant"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Mant/ovl_En_Ganon_Mant_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ganon_Organ"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Organ/ovl_En_Ganon_Organ_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Gb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gb/z_en_gb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gb/ovl_En_Gb_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ge1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge1/z_en_ge1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge1/ovl_En_Ge1_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ge2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge2/z_en_ge2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge2/ovl_En_Ge2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ge3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge3/z_en_ge3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge3/ovl_En_Ge3_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_GeldB"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GeldB/z_en_geldb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GeldB/ovl_En_GeldB_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_GirlA"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GirlA/z_en_girla.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GirlA/ovl_En_GirlA_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Gm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gm/z_en_gm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gm/ovl_En_Gm_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Go"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go/z_en_go.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go/ovl_En_Go_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Go2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go2/z_en_go2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go2/ovl_En_Go2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Goma"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goma/z_en_goma.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goma/ovl_En_Goma_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Goroiwa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goroiwa/ovl_En_Goroiwa_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Gs"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gs/z_en_gs.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gs/ovl_En_Gs_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Guest"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guest/z_en_guest.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guest/ovl_En_Guest_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Hata"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hata/z_en_hata.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hata/ovl_En_Hata_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Heishi1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi1/ovl_En_Heishi1_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Heishi2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi2/ovl_En_Heishi2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Heishi3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi3/ovl_En_Heishi3_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Heishi4"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi4/ovl_En_Heishi4_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Hintnuts"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hintnuts/ovl_En_Hintnuts_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Holl"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Holl/z_en_holl.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Holl/ovl_En_Holl_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Honotrap"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Honotrap/ovl_En_Honotrap_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse/z_en_horse.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse/ovl_En_Horse_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse_Game_Check"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Game_Check/ovl_En_Horse_Game_Check_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse_Ganon"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Ganon/ovl_En_Horse_Ganon_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse_Link_Child"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Link_Child/ovl_En_Horse_Link_Child_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse_Normal"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Normal/ovl_En_Horse_Normal_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Horse_Zelda"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Zelda/ovl_En_Horse_Zelda_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Hs"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs/z_en_hs.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs/ovl_En_Hs_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Hs2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs2/z_en_hs2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs2/ovl_En_Hs2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Hy"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hy/z_en_hy.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hy/ovl_En_Hy_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ice_Hono"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ice_Hono/ovl_En_Ice_Hono_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ik"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ik/z_en_ik.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ik/ovl_En_Ik_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_In"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_In/z_en_in.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_In/ovl_En_In_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Insect"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Insect/z_en_insect.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Insect/ovl_En_Insect_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ishi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ishi/z_en_ishi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ishi/ovl_En_Ishi_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_It"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_It/z_en_it.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_It/ovl_En_It_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Jj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jj/z_en_jj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jj/ovl_En_Jj_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Js"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Js/z_en_js.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Js/ovl_En_Js_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Jsjutan"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jsjutan/ovl_En_Jsjutan_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kakasi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi/ovl_En_Kakasi_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kakasi2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi2/ovl_En_Kakasi2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kakasi3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi3/ovl_En_Kakasi3_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kanban"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kanban/z_en_kanban.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kanban/ovl_En_Kanban_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Karebaba"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Karebaba/ovl_En_Karebaba_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ko"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ko/z_en_ko.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ko/ovl_En_Ko_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kusa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa/z_en_kusa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa/ovl_En_Kusa_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Kz"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kz/z_en_kz.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kz/ovl_En_Kz_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Light"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Light/z_en_light.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Light/ovl_En_Light_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Lightbox"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Lightbox/ovl_En_Lightbox_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_M_Fire1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Fire1/ovl_En_M_Fire1_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_M_Thunder"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Thunder/ovl_En_M_Thunder_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ma1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma1/z_en_ma1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma1/ovl_En_Ma1_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ma2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma2/z_en_ma2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma2/ovl_En_Ma2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ma3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma3/z_en_ma3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma3/ovl_En_Ma3_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mag"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/z_en_mag.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/ovl_En_Mag_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mb/z_en_mb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mb/ovl_En_Mb_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Md"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Md/z_en_md.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Md/ovl_En_Md_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mk"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mk/z_en_mk.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mk/ovl_En_Mk_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm/z_en_mm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm/ovl_En_Mm_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mm2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm2/z_en_mm2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm2/ovl_En_Mm2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ms"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ms/z_en_ms.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ms/ovl_En_Ms_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Mu"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mu/z_en_mu.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mu/ovl_En_Mu_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Nb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nb/z_en_nb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nb/ovl_En_Nb_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Niw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw/z_en_niw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw/ovl_En_Niw_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Niw_Girl"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Girl/ovl_En_Niw_Girl_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Niw_Lady"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Lady/ovl_En_Niw_Lady_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Nutsball"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nutsball/ovl_En_Nutsball_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Nwc"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nwc/z_en_nwc.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nwc/ovl_En_Nwc_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ny"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ny/z_en_ny.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ny/ovl_En_Ny_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_OE2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_OE2/z_en_oe2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_OE2/ovl_En_OE2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Okarina_Effect"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Effect/ovl_En_Okarina_Effect_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Okarina_Tag"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/ovl_En_Okarina_Tag_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Okuta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okuta/z_en_okuta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okuta/ovl_En_Okuta_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ossan"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ossan/z_en_ossan.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ossan/ovl_En_Ossan_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Owl"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Owl/z_en_owl.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Owl/ovl_En_Owl_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Part"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Part/z_en_part.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Part/ovl_En_Part_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Peehat"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Peehat/z_en_peehat.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Peehat/ovl_En_Peehat_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Po_Desert"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Desert/ovl_En_Po_Desert_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Po_Field"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Field/ovl_En_Po_Field_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Po_Relay"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Relay/ovl_En_Po_Relay_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Po_Sisters"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Sisters/ovl_En_Po_Sisters_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Poh"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Poh/z_en_poh.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Poh/ovl_En_Poh_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Pu_box"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pu_box/ovl_En_Pu_box_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Rd"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rd/z_en_rd.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rd/ovl_En_Rd_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Reeba"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Reeba/z_en_reeba.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Reeba/ovl_En_Reeba_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_River_Sound"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_River_Sound/ovl_En_River_Sound_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Rl"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rl/z_en_rl.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rl/ovl_En_Rl_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Rr"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rr/z_en_rr.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rr/ovl_En_Rr_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ru1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru1/z_en_ru1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru1/ovl_En_Ru1_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ru2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru2/z_en_ru2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru2/ovl_En_Ru2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Sa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sa/z_en_sa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sa/ovl_En_Sa_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Sb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sb/z_en_sb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sb/ovl_En_Sb_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Scene_Change"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scene_Change/ovl_En_Scene_Change_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Sda"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sda/z_en_sda.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sda/ovl_En_Sda_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Shopnuts"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Shopnuts/ovl_En_Shopnuts_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Si"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Si/z_en_si.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Si/ovl_En_Si_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Siofuki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Siofuki/ovl_En_Siofuki_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Skb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skb/z_en_skb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skb/ovl_En_Skb_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Skj"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skj/z_en_skj.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skj/ovl_En_Skj_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Skjneedle"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skjneedle/ovl_En_Skjneedle_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ssh"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ssh/z_en_ssh.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ssh/ovl_En_Ssh_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_St"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_St/z_en_st.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_St/ovl_En_St_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Sth"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth/z_en_sth.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth/ovl_En_Sth_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Stream"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stream/z_en_stream.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stream/ovl_En_Stream_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Sw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sw/z_en_sw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sw/ovl_En_Sw_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Syateki_Itm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Itm/ovl_En_Syateki_Itm_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Syateki_Man"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Man/ovl_En_Syateki_Man_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Syateki_Niw"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Niw/ovl_En_Syateki_Niw_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Ta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ta/z_en_ta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ta/ovl_En_Ta_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Takara_Man"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Takara_Man/ovl_En_Takara_Man_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tana"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tana/z_en_tana.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tana/ovl_En_Tana_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tg"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tg/z_en_tg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tg/ovl_En_Tg_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tite"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tite/z_en_tite.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tite/ovl_En_Tite_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tk"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tk/z_en_tk.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tk/ovl_En_Tk_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Torch"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch/z_en_torch.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch/ovl_En_Torch_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Torch2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch2/z_en_torch2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch2/ovl_En_Torch2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Toryo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Toryo/z_en_toryo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Toryo/ovl_En_Toryo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tp"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tp/z_en_tp.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tp/ovl_En_Tp_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tr"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tr/z_en_tr.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tr/ovl_En_Tr_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Trap"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trap/z_en_trap.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trap/ovl_En_Trap_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Tubo_Trap"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tubo_Trap/ovl_En_Tubo_Trap_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Vali"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vali/z_en_vali.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vali/ovl_En_Vali_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Vase"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vase/z_en_vase.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vase/ovl_En_Vase_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Vb_Ball"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vb_Ball/ovl_En_Vb_Ball_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Viewer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Viewer/z_en_viewer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Viewer/ovl_En_Viewer_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Vm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vm/z_en_vm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vm/ovl_En_Vm_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wall_Tubo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wall_Tubo/ovl_En_Wall_Tubo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wallmas"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wallmas/ovl_En_Wallmas_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Weather_Tag"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weather_Tag/ovl_En_Weather_Tag_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Weiyer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weiyer/ovl_En_Weiyer_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wf"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wf/z_en_wf.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wf/ovl_En_Wf_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wonder_Item"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Item/ovl_En_Wonder_Item_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wonder_Talk"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk/ovl_En_Wonder_Talk_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wonder_Talk2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk2/ovl_En_Wonder_Talk2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Wood02"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wood02/z_en_wood02.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wood02/ovl_En_Wood02_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Xc"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Xc/z_en_xc.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Xc/ovl_En_Xc_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Yabusame_Mark"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yabusame_Mark/ovl_En_Yabusame_Mark_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Yukabyun"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yukabyun/ovl_En_Yukabyun_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zf"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zf/z_en_zf.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zf/ovl_En_Zf_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zl1"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/z_en_zl1.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/ovl_En_Zl1_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zl2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl2/z_en_zl2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl2/ovl_En_Zl2_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zl3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl3/z_en_zl3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl3/ovl_En_Zl3_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zl4"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl4/z_en_zl4.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl4/ovl_En_Zl4_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_Zo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zo/z_en_zo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zo/ovl_En_Zo_reloc.o"
-endseg
-
-beginseg
- name "ovl_En_fHG"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_fHG/z_en_fhg.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_En_fHG/ovl_En_fHG_reloc.o"
-endseg
-
-beginseg
- name "ovl_End_Title"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_End_Title/z_end_title.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_End_Title/ovl_End_Title_reloc.o"
-endseg
-
-beginseg
- name "ovl_Fishing"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Fishing/z_fishing.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Fishing/ovl_Fishing_reloc.o"
-endseg
-
-beginseg
- name "ovl_Item_B_Heart"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/ovl_Item_B_Heart_reloc.o"
-endseg
-
-beginseg
- name "ovl_Item_Etcetera"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Etcetera/ovl_Item_Etcetera_reloc.o"
-endseg
-
-beginseg
- name "ovl_Item_Inbox"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Inbox/ovl_Item_Inbox_reloc.o"
-endseg
-
-beginseg
- name "ovl_Item_Ocarina"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Ocarina/ovl_Item_Ocarina_reloc.o"
-endseg
-
-beginseg
- name "ovl_Item_Shield"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Shield/z_item_shield.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Shield/ovl_Item_Shield_reloc.o"
-endseg
-
-beginseg
- name "ovl_Magic_Dark"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Dark/ovl_Magic_Dark_reloc.o"
-endseg
-
-beginseg
- name "ovl_Magic_Fire"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Fire/ovl_Magic_Fire_reloc.o"
-endseg
-
-beginseg
- name "ovl_Magic_Wind"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Wind/ovl_Magic_Wind_reloc.o"
-endseg
-
-beginseg
- name "ovl_Mir_Ray"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray/ovl_Mir_Ray_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Bean"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bean/ovl_Obj_Bean_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Blockstop"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Blockstop/ovl_Obj_Blockstop_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Bombiwa"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bombiwa/ovl_Obj_Bombiwa_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Comb"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Comb/ovl_Obj_Comb_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Dekujr"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dekujr/ovl_Obj_Dekujr_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Elevator"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Elevator/ovl_Obj_Elevator_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Hamishi"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hamishi/ovl_Obj_Hamishi_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Hana"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hana/ovl_Obj_Hana_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Hsblock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hsblock/ovl_Obj_Hsblock_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Ice_Poly"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ice_Poly/ovl_Obj_Ice_Poly_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Kibako"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako/ovl_Obj_Kibako_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Kibako2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako2/ovl_Obj_Kibako2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Lift"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lift/ovl_Obj_Lift_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Lightswitch"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightswitch/ovl_Obj_Lightswitch_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Makekinsuta"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makekinsuta/ovl_Obj_Makekinsuta_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Makeoshihiki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makeoshihiki/ovl_Obj_Makeoshihiki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Mure"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure/ovl_Obj_Mure_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Mure2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure2/ovl_Obj_Mure2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Mure3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure3/ovl_Obj_Mure3_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Oshihiki"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Oshihiki/ovl_Obj_Oshihiki_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Roomtimer"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Switch"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Switch/ovl_Obj_Switch_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Syokudai"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Syokudai/ovl_Obj_Syokudai_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Timeblock"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Timeblock/ovl_Obj_Timeblock_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Tsubo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tsubo/ovl_Obj_Tsubo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Obj_Warp2block"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Warp2block/ovl_Obj_Warp2block_reloc.o"
-endseg
-
-beginseg
- name "ovl_Object_Kankyo"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Object_Kankyo/ovl_Object_Kankyo_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Spot"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Spot/ovl_Oceff_Spot_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Storm"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Storm/ovl_Oceff_Storm_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Wipe"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe/ovl_Oceff_Wipe_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Wipe2"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe2/ovl_Oceff_Wipe2_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Wipe3"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3_reloc.o"
-endseg
-
-beginseg
- name "ovl_Oceff_Wipe4"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe4/ovl_Oceff_Wipe4_reloc.o"
-endseg
-
-beginseg
- name "ovl_Shot_Sun"
- compress
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.o"
- include "$(BUILD_DIR)/src/overlays/actors/ovl_Shot_Sun/ovl_Shot_Sun_reloc.o"
-endseg
-
-#endif
-
-beginseg
- name "gameplay_keep"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/gameplay_keep/gameplay_keep.o"
- number 4
-endseg
-
-beginseg
- name "gameplay_field_keep"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/gameplay_field_keep/gameplay_field_keep.o"
- number 5
-endseg
-
-beginseg
- name "gameplay_dangeon_keep"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.o"
- number 5
-endseg
-
-beginseg
- name "gameplay_object_exchange_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/gameplay_object_exchange_static.o"
-endseg
-
-beginseg
- name "object_link_boy"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_link_boy/object_link_boy.o"
- number 6
-endseg
-
-beginseg
- name "object_link_child"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_link_child/object_link_child.o"
- number 6
-endseg
-
-beginseg
- name "object_box"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_box/object_box.o"
- number 6
-endseg
-
-beginseg
- name "object_human"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_human/object_human.o"
- number 6
-endseg
-
-beginseg
- name "object_okuta"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_okuta/object_okuta.o"
- number 6
-endseg
-
-beginseg
- name "object_poh"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_poh/object_poh.o"
- number 6
-endseg
-
-beginseg
- name "object_wallmaster"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_wallmaster/object_wallmaster.o"
- number 6
-endseg
-
-beginseg
- name "object_dy_obj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_dy_obj/object_dy_obj.o"
- number 6
-endseg
-
-beginseg
- name "object_firefly"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_firefly/object_firefly.o"
- number 6
-endseg
-
-beginseg
- name "object_dodongo"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_dodongo/object_dodongo.o"
- number 6
-endseg
-
-beginseg
- name "object_fire"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_fire/object_fire.o"
- number 6
-endseg
-
-beginseg
- name "object_niw"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_niw/object_niw.o"
- number 6
-endseg
-
-beginseg
- name "object_tite"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_tite/object_tite.o"
- number 6
-endseg
-
-beginseg
- name "object_reeba"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_reeba/object_reeba.o"
- number 6
-endseg
-
-beginseg
- name "object_peehat"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_peehat/object_peehat.o"
- number 6
-endseg
-
-beginseg
- name "object_kingdodongo"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_kingdodongo/object_kingdodongo.o"
- number 6
-endseg
-
-beginseg
- name "object_horse"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_horse/object_horse.o"
- number 6
-endseg
-
-beginseg
- name "object_zf"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_zf/object_zf.o"
- number 6
-endseg
-
-beginseg
- name "object_goma"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_goma/object_goma.o"
- number 6
-endseg
-
-beginseg
- name "object_zl1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_zl1/object_zl1.o"
- number 6
-endseg
-
-beginseg
- name "object_gol"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gol/object_gol.o"
- number 6
-endseg
-
-beginseg
- name "object_bubble"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bubble/object_bubble.o"
- number 6
-endseg
-
-beginseg
- name "object_dodojr"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_dodojr/object_dodojr.o"
- number 6
-endseg
-
-beginseg
- name "object_torch2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_torch2/object_torch2.o"
- number 6
-endseg
-
-beginseg
- name "object_bl"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bl/object_bl.o"
- number 6
-endseg
-
-beginseg
- name "object_tp"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_tp/object_tp.o"
- number 6
-endseg
-
-beginseg
- name "object_oA1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA1/object_oA1.o"
- number 6
-endseg
-
-beginseg
- name "object_st"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_st/object_st.o"
- number 6
-endseg
-
-beginseg
- name "object_bw"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bw/object_bw.o"
- number 6
-endseg
-
-beginseg
- name "object_ei"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ei/object_ei.o"
- number 6
-endseg
-
-beginseg
- name "object_horse_normal"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_horse_normal/object_horse_normal.o"
- number 6
-endseg
-
-beginseg
- name "object_oB1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oB1/object_oB1.o"
- number 6
-endseg
-
-beginseg
- name "object_o_anime"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_o_anime/object_o_anime.o"
- number 6
-endseg
-
-beginseg
- name "object_spot04_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot04_objects/object_spot04_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_ddan_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ddan_objects/object_ddan_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_hidan_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_hidan_objects/object_hidan_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_horse_ganon"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_horse_ganon/object_horse_ganon.o"
- number 6
-endseg
-
-beginseg
- name "object_oA2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA2/object_oA2.o"
- number 6
-endseg
-
-beginseg
- name "object_spot00_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot00_objects/object_spot00_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_mb"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mb/object_mb.o"
- number 6
-endseg
-
-beginseg
- name "object_bombf"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bombf/object_bombf.o"
- number 6
-endseg
-
-beginseg
- name "object_sk2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_sk2/object_sk2.o"
- number 6
-endseg
-
-beginseg
- name "object_oE1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE1/object_oE1.o"
- number 6
-endseg
-
-beginseg
- name "object_oE_anime"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE_anime/object_oE_anime.o"
- number 6
-endseg
-
-beginseg
- name "object_oE2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE2/object_oE2.o"
- number 6
-endseg
-
-beginseg
- name "object_ydan_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ydan_objects/object_ydan_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_gnd"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gnd/object_gnd.o"
- number 6
-endseg
-
-beginseg
- name "object_am"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_am/object_am.o"
- number 6
-endseg
-
-beginseg
- name "object_dekubaba"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_dekubaba/object_dekubaba.o"
- number 6
-endseg
-
-beginseg
- name "object_oA3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA3/object_oA3.o"
- number 6
-endseg
-
-beginseg
- name "object_oA4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA4/object_oA4.o"
- number 6
-endseg
-
-beginseg
- name "object_oA5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA5/object_oA5.o"
- number 6
-endseg
-
-beginseg
- name "object_oA6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA6/object_oA6.o"
- number 6
-endseg
-
-beginseg
- name "object_oA7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA7/object_oA7.o"
- number 6
-endseg
-
-beginseg
- name "object_jj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_jj/object_jj.o"
- number 6
-endseg
-
-beginseg
- name "object_oA8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA8/object_oA8.o"
- number 6
-endseg
-
-beginseg
- name "object_oA9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA9/object_oA9.o"
- number 6
-endseg
-
-beginseg
- name "object_oB2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oB2/object_oB2.o"
- number 6
-endseg
-
-beginseg
- name "object_oB3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oB3/object_oB3.o"
- number 6
-endseg
-
-beginseg
- name "object_oB4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oB4/object_oB4.o"
- number 6
-endseg
-
-beginseg
- name "object_horse_zelda"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_horse_zelda/object_horse_zelda.o"
- number 6
-endseg
-
-beginseg
- name "object_opening_demo1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_opening_demo1/object_opening_demo1.o"
- number 6
-endseg
-
-beginseg
- name "object_warp1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_warp1/object_warp1.o"
- number 6
-endseg
-
-beginseg
- name "object_b_heart"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_b_heart/object_b_heart.o"
- number 6
-endseg
-
-beginseg
- name "object_dekunuts"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_dekunuts/object_dekunuts.o"
- number 6
-endseg
-
-beginseg
- name "object_oE3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE3/object_oE3.o"
- number 6
-endseg
-
-beginseg
- name "object_oE4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE4/object_oE4.o"
- number 6
-endseg
-
-beginseg
- name "object_menkuri_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_menkuri_objects/object_menkuri_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_oE5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE5/object_oE5.o"
- number 6
-endseg
-
-beginseg
- name "object_oE6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE6/object_oE6.o"
- number 6
-endseg
-
-beginseg
- name "object_oE7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE7/object_oE7.o"
- number 6
-endseg
-
-beginseg
- name "object_oE8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE8/object_oE8.o"
- number 6
-endseg
-
-beginseg
- name "object_oE9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE9/object_oE9.o"
- number 6
-endseg
-
-beginseg
- name "object_oE10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE10/object_oE10.o"
- number 6
-endseg
-
-beginseg
- name "object_oE11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE11/object_oE11.o"
- number 6
-endseg
-
-beginseg
- name "object_oE12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE12/object_oE12.o"
- number 6
-endseg
-
-beginseg
- name "object_vali"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_vali/object_vali.o"
- number 6
-endseg
-
-beginseg
- name "object_oA10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA10/object_oA10.o"
- number 6
-endseg
-
-beginseg
- name "object_oA11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oA11/object_oA11.o"
- number 6
-endseg
-
-beginseg
- name "object_mizu_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mizu_objects/object_mizu_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_fhg"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_fhg/object_fhg.o"
- number 6
-endseg
-
-beginseg
- name "object_ossan"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ossan/object_ossan.o"
- number 6
-endseg
-
-beginseg
- name "object_mori_hineri1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mori_hineri1/object_mori_hineri1.o"
- number 6
-endseg
-
-beginseg
- name "object_Bb"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_Bb/object_Bb.o"
- number 6
-endseg
-
-beginseg
- name "object_toki_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_toki_objects/object_toki_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_yukabyun"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_yukabyun/object_yukabyun.o"
- number 6
-endseg
-
-beginseg
- name "object_zl2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_zl2/object_zl2.o"
- number 6
-endseg
-
-beginseg
- name "object_mjin"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mjin/object_mjin.o"
- number 6
-endseg
-
-beginseg
- name "object_mjin_flash"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mjin_flash/object_mjin_flash.o"
- number 6
-endseg
-
-beginseg
- name "object_mjin_dark"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mjin_dark/object_mjin_dark.o"
- number 6
-endseg
-
-beginseg
- name "object_mjin_flame"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mjin_flame/object_mjin_flame.o"
- number 6
-endseg
-
-beginseg
- name "object_mjin_ice"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mjin_ice/object_mjin_ice.o"
- number 6
-endseg
-
-beginseg
- name "object_mjin_soul"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mjin_soul/object_mjin_soul.o"
- number 6
-endseg
-
-beginseg
- name "object_mjin_wind"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mjin_wind/object_mjin_wind.o"
- number 6
-endseg
-
-beginseg
- name "object_mjin_oka"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mjin_oka/object_mjin_oka.o"
- number 6
-endseg
-
-beginseg
- name "object_haka_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_haka_objects/object_haka_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_spot06_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot06_objects/object_spot06_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_ice_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ice_objects/object_ice_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_relay_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_relay_objects/object_relay_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_mori_hineri1a"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mori_hineri1a/object_mori_hineri1a.o"
- number 6
-endseg
-
-beginseg
- name "object_mori_hineri2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mori_hineri2/object_mori_hineri2.o"
- number 6
-endseg
-
-beginseg
- name "object_mori_hineri2a"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mori_hineri2a/object_mori_hineri2a.o"
- number 6
-endseg
-
-beginseg
- name "object_mori_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mori_objects/object_mori_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_mori_tex"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mori_tex/object_mori_tex.o"
- number 8
-endseg
-
-beginseg
- name "object_spot08_obj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot08_obj/object_spot08_obj.o"
- number 6
-endseg
-
-beginseg
- name "object_warp2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_warp2/object_warp2.o"
- number 6
-endseg
-
-beginseg
- name "object_hata"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_hata/object_hata.o"
- number 6
-endseg
-
-beginseg
- name "object_bird"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bird/object_bird.o"
- number 6
-endseg
-
-beginseg
- name "object_wood02"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_wood02/object_wood02.o"
- number 6
-endseg
-
-beginseg
- name "object_lightbox"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_lightbox/object_lightbox.o"
- number 6
-endseg
-
-beginseg
- name "object_pu_box"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_pu_box/object_pu_box.o"
- number 6
-endseg
-
-beginseg
- name "object_trap"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_trap/object_trap.o"
- number 6
-endseg
-
-beginseg
- name "object_vase"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_vase/object_vase.o"
- number 6
-endseg
-
-beginseg
- name "object_im"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_im/object_im.o"
- number 6
-endseg
-
-beginseg
- name "object_ta"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ta/object_ta.o"
- number 6
-endseg
-
-beginseg
- name "object_tk"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_tk/object_tk.o"
- number 6
-endseg
-
-beginseg
- name "object_xc"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_xc/object_xc.o"
- number 6
-endseg
-
-beginseg
- name "object_vm"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_vm/object_vm.o"
- number 6
-endseg
-
-beginseg
- name "object_bv"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bv/object_bv.o"
- number 6
-endseg
-
-beginseg
- name "object_hakach_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_hakach_objects/object_hakach_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_efc_crystal_light"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_efc_crystal_light/object_efc_crystal_light.o"
- number 6
-endseg
-
-beginseg
- name "object_efc_fire_ball"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_efc_fire_ball/object_efc_fire_ball.o"
- number 6
-endseg
-
-beginseg
- name "object_efc_flash"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_efc_flash/object_efc_flash.o"
- number 6
-endseg
-
-beginseg
- name "object_efc_lgt_shower"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_efc_lgt_shower/object_efc_lgt_shower.o"
- number 6
-endseg
-
-beginseg
- name "object_efc_star_field"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_efc_star_field/object_efc_star_field.o"
- number 6
-endseg
-
-beginseg
- name "object_god_lgt"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_god_lgt/object_god_lgt.o"
- number 6
-endseg
-
-beginseg
- name "object_light_ring"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_light_ring/object_light_ring.o"
- number 6
-endseg
-
-beginseg
- name "object_triforce_spot"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_triforce_spot/object_triforce_spot.o"
- number 6
-endseg
-
-beginseg
- name "object_medal"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_medal/object_medal.o"
- number 6
-endseg
-
-beginseg
- name "object_bdan_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bdan_objects/object_bdan_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_sd"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_sd/object_sd.o"
- number 6
-endseg
-
-beginseg
- name "object_rd"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_rd/object_rd.o"
- number 6
-endseg
-
-beginseg
- name "object_po_sisters"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_po_sisters/object_po_sisters.o"
- number 6
-endseg
-
-beginseg
- name "object_heavy_object"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_heavy_object/object_heavy_object.o"
- number 6
-endseg
-
-beginseg
- name "object_gndd"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gndd/object_gndd.o"
- number 6
-endseg
-
-beginseg
- name "object_fd"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_fd/object_fd.o"
- number 6
-endseg
-
-beginseg
- name "object_du"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_du/object_du.o"
- number 6
-endseg
-
-beginseg
- name "object_fw"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_fw/object_fw.o"
- number 6
-endseg
-
-beginseg
- name "object_horse_link_child"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_horse_link_child/object_horse_link_child.o"
- number 6
-endseg
-
-beginseg
- name "object_spot02_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot02_objects/object_spot02_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_haka"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_haka/object_haka.o"
- number 6
-endseg
-
-beginseg
- name "object_ru1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ru1/object_ru1.o"
- number 6
-endseg
-
-beginseg
- name "object_syokudai"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_syokudai/object_syokudai.o"
- number 6
-endseg
-
-beginseg
- name "object_fd2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_fd2/object_fd2.o"
- number 6
-endseg
-
-beginseg
- name "object_dh"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_dh/object_dh.o"
- number 6
-endseg
-
-beginseg
- name "object_rl"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_rl/object_rl.o"
- number 6
-endseg
-
-beginseg
- name "object_efc_tw"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_efc_tw/object_efc_tw.o"
- number 6
-endseg
-
-beginseg
- name "object_demo_tre_lgt"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_demo_tre_lgt/object_demo_tre_lgt.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_key"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_key/object_gi_key.o"
- number 6
-endseg
-
-beginseg
- name "object_mir_ray"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mir_ray/object_mir_ray.o"
- number 6
-endseg
-
-beginseg
- name "object_brob"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_brob/object_brob.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_jewel"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_jewel/object_gi_jewel.o"
- number 6
-endseg
-
-beginseg
- name "object_spot09_obj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot09_obj/object_spot09_obj.o"
- number 6
-endseg
-
-beginseg
- name "object_spot18_obj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot18_obj/object_spot18_obj.o"
- number 6
-endseg
-
-beginseg
- name "object_bdoor"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bdoor/object_bdoor.o"
- number 6
-endseg
-
-beginseg
- name "object_spot17_obj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot17_obj/object_spot17_obj.o"
- number 6
-endseg
-
-beginseg
- name "object_shop_dungen"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_shop_dungen/object_shop_dungen.o"
- number 6
-endseg
-
-beginseg
- name "object_nb"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_nb/object_nb.o"
- number 6
-endseg
-
-beginseg
- name "object_mo"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mo/object_mo.o"
- number 6
-endseg
-
-beginseg
- name "object_sb"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_sb/object_sb.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_melody"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_melody/object_gi_melody.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_heart"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_heart/object_gi_heart.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_compass"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_compass/object_gi_compass.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_bosskey"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_bosskey/object_gi_bosskey.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_medal"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_medal/object_gi_medal.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_nuts"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_nuts/object_gi_nuts.o"
- number 6
-endseg
-
-beginseg
- name "object_sa"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_sa/object_sa.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_hearts"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_hearts/object_gi_hearts.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_arrowcase"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_arrowcase/object_gi_arrowcase.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_bombpouch"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_bombpouch/object_gi_bombpouch.o"
- number 6
-endseg
-
-beginseg
- name "object_in"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_in/object_in.o"
- number 6
-endseg
-
-beginseg
- name "object_tr"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_tr/object_tr.o"
- number 6
-endseg
-
-beginseg
- name "object_spot16_obj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot16_obj/object_spot16_obj.o"
- number 6
-endseg
-
-beginseg
- name "object_oE1s"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE1s/object_oE1s.o"
- number 6
-endseg
-
-beginseg
- name "object_oE4s"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oE4s/object_oE4s.o"
- number 6
-endseg
-
-beginseg
- name "object_os_anime"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_os_anime/object_os_anime.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_bottle"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_bottle/object_gi_bottle.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_stick"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_stick/object_gi_stick.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_map"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_map/object_gi_map.o"
- number 6
-endseg
-
-beginseg
- name "object_oF1d_map"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oF1d_map/object_oF1d_map.o"
- number 6
-endseg
-
-beginseg
- name "object_ru2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ru2/object_ru2.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_shield_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_shield_1/object_gi_shield_1.o"
- number 6
-endseg
-
-beginseg
- name "object_dekujr"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_dekujr/object_dekujr.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_magicpot"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_magicpot/object_gi_magicpot.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_bomb_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_bomb_1/object_gi_bomb_1.o"
- number 6
-endseg
-
-beginseg
- name "object_oF1s"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_oF1s/object_oF1s.o"
- number 6
-endseg
-
-beginseg
- name "object_ma2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ma2/object_ma2.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_purse"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_purse/object_gi_purse.o"
- number 6
-endseg
-
-beginseg
- name "object_hni"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_hni/object_hni.o"
- number 6
-endseg
-
-beginseg
- name "object_tw"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_tw/object_tw.o"
- number 6
-endseg
-
-beginseg
- name "object_rr"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_rr/object_rr.o"
- number 6
-endseg
-
-beginseg
- name "object_bxa"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bxa/object_bxa.o"
- number 6
-endseg
-
-beginseg
- name "object_anubice"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_anubice/object_anubice.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_gerudo"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_gerudo/object_gi_gerudo.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_arrow"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_arrow/object_gi_arrow.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_bomb_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_bomb_2/object_gi_bomb_2.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_egg"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_egg/object_gi_egg.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_scale"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_scale/object_gi_scale.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_shield_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_shield_2/object_gi_shield_2.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_hookshot"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_hookshot/object_gi_hookshot.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_ocarina"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_ocarina/object_gi_ocarina.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_milk"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_milk/object_gi_milk.o"
- number 6
-endseg
-
-beginseg
- name "object_ma1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ma1/object_ma1.o"
- number 6
-endseg
-
-beginseg
- name "object_ganon"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ganon/object_ganon.o"
- number 6
-endseg
-
-beginseg
- name "object_sst"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_sst/object_sst.o"
- number 6
-endseg
-
-beginseg
- name "object_ny"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ny/object_ny.o"
- number 6
-endseg
-
-beginseg
- name "object_fr"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_fr/object_fr.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_pachinko"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_pachinko/object_gi_pachinko.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_boomerang"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_boomerang/object_gi_boomerang.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_bow"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_bow/object_gi_bow.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_glasses"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_glasses/object_gi_glasses.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_liquid"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_liquid/object_gi_liquid.o"
- number 6
-endseg
-
-beginseg
- name "object_ani"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ani/object_ani.o"
- number 6
-endseg
-
-beginseg
- name "object_demo_6k"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_demo_6k/object_demo_6k.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_shield_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_shield_3/object_gi_shield_3.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_letter"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_letter/object_gi_letter.o"
- number 6
-endseg
-
-beginseg
- name "object_spot15_obj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot15_obj/object_spot15_obj.o"
- number 6
-endseg
-
-beginseg
- name "object_jya_obj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_jya_obj/object_jya_obj.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_clothes"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_clothes/object_gi_clothes.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_bean"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_bean/object_gi_bean.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_fish"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_fish/object_gi_fish.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_saw"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_saw/object_gi_saw.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_hammer"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_hammer/object_gi_hammer.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_grass"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_grass/object_gi_grass.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_longsword"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_longsword/object_gi_longsword.o"
- number 6
-endseg
-
-beginseg
- name "object_spot01_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot01_objects/object_spot01_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_md"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_md/object_md.o"
- number 6
-endseg
-
-beginseg
- name "object_km1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_km1/object_km1.o"
- number 6
-endseg
-
-beginseg
- name "object_kw1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_kw1/object_kw1.o"
- number 6
-endseg
-
-beginseg
- name "object_zo"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_zo/object_zo.o"
- number 6
-endseg
-
-beginseg
- name "object_kz"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_kz/object_kz.o"
- number 6
-endseg
-
-beginseg
- name "object_umajump"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_umajump/object_umajump.o"
- number 6
-endseg
-
-beginseg
- name "object_masterkokiri"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_masterkokiri/object_masterkokiri.o"
- number 6
-endseg
-
-beginseg
- name "object_masterkokirihead"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_masterkokirihead/object_masterkokirihead.o"
- number 6
-endseg
-
-beginseg
- name "object_mastergolon"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mastergolon/object_mastergolon.o"
- number 6
-endseg
-
-beginseg
- name "object_masterzoora"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_masterzoora/object_masterzoora.o"
- number 6
-endseg
-
-beginseg
- name "object_aob"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_aob/object_aob.o"
- number 6
-endseg
-
-beginseg
- name "object_ik"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ik/object_ik.o"
- number 6
-endseg
-
-beginseg
- name "object_ahg"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ahg/object_ahg.o"
- number 6
-endseg
-
-beginseg
- name "object_cne"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_cne/object_cne.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_niwatori"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_niwatori/object_gi_niwatori.o"
- number 6
-endseg
-
-beginseg
- name "object_skj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_skj/object_skj.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_bottle_letter"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_bottle_letter/object_gi_bottle_letter.o"
- number 6
-endseg
-
-beginseg
- name "object_bji"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bji/object_bji.o"
- number 6
-endseg
-
-beginseg
- name "object_bba"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bba/object_bba.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_ocarina_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_ocarina_0/object_gi_ocarina_0.o"
- number 6
-endseg
-
-beginseg
- name "object_ds"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ds/object_ds.o"
- number 6
-endseg
-
-beginseg
- name "object_ane"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ane/object_ane.o"
- number 6
-endseg
-
-beginseg
- name "object_boj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_boj/object_boj.o"
- number 6
-endseg
-
-beginseg
- name "object_spot03_object"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot03_object/object_spot03_object.o"
- number 6
-endseg
-
-beginseg
- name "object_spot07_object"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot07_object/object_spot07_object.o"
- number 6
-endseg
-
-beginseg
- name "object_fz"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_fz/object_fz.o"
- number 6
-endseg
-
-beginseg
- name "object_bob"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bob/object_bob.o"
- number 6
-endseg
-
-beginseg
- name "object_ge1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ge1/object_ge1.o"
- number 6
-endseg
-
-beginseg
- name "object_yabusame_point"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_yabusame_point/object_yabusame_point.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_boots_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_boots_2/object_gi_boots_2.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_seed"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_seed/object_gi_seed.o"
- number 6
-endseg
-
-beginseg
- name "object_gnd_magic"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gnd_magic/object_gnd_magic.o"
- number 6
-endseg
-
-beginseg
- name "object_d_elevator"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_d_elevator/object_d_elevator.o"
- number 6
-endseg
-
-beginseg
- name "object_d_hsblock"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_d_hsblock/object_d_hsblock.o"
- number 6
-endseg
-
-beginseg
- name "object_d_lift"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_d_lift/object_d_lift.o"
- number 6
-endseg
-
-beginseg
- name "object_mamenoki"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mamenoki/object_mamenoki.o"
- number 6
-endseg
-
-beginseg
- name "object_goroiwa"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_goroiwa/object_goroiwa.o"
- number 6
-endseg
-
-beginseg
- name "object_toryo"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_toryo/object_toryo.o"
- number 6
-endseg
-
-beginseg
- name "object_daiku"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_daiku/object_daiku.o"
- number 6
-endseg
-
-beginseg
- name "object_nwc"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_nwc/object_nwc.o"
- number 6
-endseg
-
-beginseg
- name "object_blkobj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_blkobj/object_blkobj.o"
- number 6
-endseg
-
-beginseg
- name "object_gm"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gm/object_gm.o"
- number 6
-endseg
-
-beginseg
- name "object_ms"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ms/object_ms.o"
- number 6
-endseg
-
-beginseg
- name "object_hs"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_hs/object_hs.o"
- number 6
-endseg
-
-beginseg
- name "object_ingate"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ingate/object_ingate.o"
- number 6
-endseg
-
-beginseg
- name "object_lightswitch"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_lightswitch/object_lightswitch.o"
- number 6
-endseg
-
-beginseg
- name "object_kusa"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_kusa/object_kusa.o"
- number 6
-endseg
-
-beginseg
- name "object_tsubo"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_tsubo/object_tsubo.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_gloves"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_gloves/object_gi_gloves.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_coin"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_coin/object_gi_coin.o"
- number 6
-endseg
-
-beginseg
- name "object_kanban"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_kanban/object_kanban.o"
- number 6
-endseg
-
-beginseg
- name "object_gjyo_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gjyo_objects/object_gjyo_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_owl"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_owl/object_owl.o"
- number 6
-endseg
-
-beginseg
- name "object_mk"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mk/object_mk.o"
- number 6
-endseg
-
-beginseg
- name "object_fu"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_fu/object_fu.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_ki_tan_mask"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_ki_tan_mask/object_gi_ki_tan_mask.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_redead_mask"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_redead_mask/object_gi_redead_mask.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_skj_mask"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_skj_mask/object_gi_skj_mask.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_rabit_mask"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_rabit_mask/object_gi_rabit_mask.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_truth_mask"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_truth_mask/object_gi_truth_mask.o"
- number 6
-endseg
-
-beginseg
- name "object_ganon_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ganon_objects/object_ganon_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_siofuki"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_siofuki/object_siofuki.o"
- number 6
-endseg
-
-beginseg
- name "object_stream"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_stream/object_stream.o"
- number 6
-endseg
-
-beginseg
- name "object_mm"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mm/object_mm.o"
- number 6
-endseg
-
-beginseg
- name "object_fa"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_fa/object_fa.o"
- number 6
-endseg
-
-beginseg
- name "object_os"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_os/object_os.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_eye_lotion"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_eye_lotion/object_gi_eye_lotion.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_powder"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_powder/object_gi_powder.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_mushroom"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_mushroom/object_gi_mushroom.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_ticketstone"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_ticketstone/object_gi_ticketstone.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_brokensword"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_brokensword/object_gi_brokensword.o"
- number 6
-endseg
-
-beginseg
- name "object_js"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_js/object_js.o"
- number 6
-endseg
-
-beginseg
- name "object_cs"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_cs/object_cs.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_prescription"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_prescription/object_gi_prescription.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_bracelet"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_bracelet/object_gi_bracelet.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_soldout"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_soldout/object_gi_soldout.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_frog"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_frog/object_gi_frog.o"
- number 6
-endseg
-
-beginseg
- name "object_mag"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mag/object_mag.o"
- number 6
-endseg
-
-beginseg
- name "object_door_gerudo"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_door_gerudo/object_door_gerudo.o"
- number 6
-endseg
-
-beginseg
- name "object_gt"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gt/object_gt.o"
- number 6
-endseg
-
-beginseg
- name "object_efc_erupc"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_efc_erupc/object_efc_erupc.o"
- number 6
-endseg
-
-beginseg
- name "object_zl2_anime1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_zl2_anime1/object_zl2_anime1.o"
- number 6
-endseg
-
-beginseg
- name "object_zl2_anime2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_zl2_anime2/object_zl2_anime2.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_golonmask"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_golonmask/object_gi_golonmask.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_zoramask"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_zoramask/object_gi_zoramask.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_gerudomask"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_gerudomask/object_gi_gerudomask.o"
- number 6
-endseg
-
-beginseg
- name "object_ganon2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ganon2/object_ganon2.o"
- number 6
-endseg
-
-beginseg
- name "object_ka"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ka/object_ka.o"
- number 6
-endseg
-
-beginseg
- name "object_ts"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ts/object_ts.o"
- number 6
-endseg
-
-beginseg
- name "object_zg"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_zg/object_zg.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_hoverboots"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_hoverboots/object_gi_hoverboots.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_m_arrow"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_m_arrow/object_gi_m_arrow.o"
- number 6
-endseg
-
-beginseg
- name "object_ds2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ds2/object_ds2.o"
- number 6
-endseg
-
-beginseg
- name "object_ec"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ec/object_ec.o"
- number 6
-endseg
-
-beginseg
- name "object_fish"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_fish/object_fish.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_sutaru"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_sutaru/object_gi_sutaru.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_goddess"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_goddess/object_gi_goddess.o"
- number 6
-endseg
-
-beginseg
- name "object_ssh"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ssh/object_ssh.o"
- number 6
-endseg
-
-beginseg
- name "object_bigokuta"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bigokuta/object_bigokuta.o"
- number 6
-endseg
-
-beginseg
- name "object_bg"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bg/object_bg.o"
- number 6
-endseg
-
-beginseg
- name "object_spot05_objects"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot05_objects/object_spot05_objects.o"
- number 6
-endseg
-
-beginseg
- name "object_spot12_obj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot12_obj/object_spot12_obj.o"
- number 6
-endseg
-
-beginseg
- name "object_bombiwa"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bombiwa/object_bombiwa.o"
- number 6
-endseg
-
-beginseg
- name "object_hintnuts"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_hintnuts/object_hintnuts.o"
- number 6
-endseg
-
-beginseg
- name "object_rs"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_rs/object_rs.o"
- number 6
-endseg
-
-beginseg
- name "object_spot00_break"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot00_break/object_spot00_break.o"
- number 6
-endseg
-
-beginseg
- name "object_gla"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gla/object_gla.o"
- number 6
-endseg
-
-beginseg
- name "object_shopnuts"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_shopnuts/object_shopnuts.o"
- number 6
-endseg
-
-beginseg
- name "object_geldb"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_geldb/object_geldb.o"
- number 6
-endseg
-
-beginseg
- name "object_gr"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gr/object_gr.o"
- number 6
-endseg
-
-beginseg
- name "object_dog"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_dog/object_dog.o"
- number 6
-endseg
-
-beginseg
- name "object_jya_iron"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_jya_iron/object_jya_iron.o"
- number 6
-endseg
-
-beginseg
- name "object_jya_door"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_jya_door/object_jya_door.o"
- number 6
-endseg
-
-beginseg
- name "object_spot01_objects2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot01_objects2/object_spot01_objects2.o"
- number 6
-endseg
-
-beginseg
- name "object_spot11_obj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot11_obj/object_spot11_obj.o"
- number 6
-endseg
-
-beginseg
- name "object_kibako2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_kibako2/object_kibako2.o"
- number 6
-endseg
-
-beginseg
- name "object_dns"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_dns/object_dns.o"
- number 6
-endseg
-
-beginseg
- name "object_dnk"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_dnk/object_dnk.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_fire"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_fire/object_gi_fire.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_insect"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_insect/object_gi_insect.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_butterfly"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_butterfly/object_gi_butterfly.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_ghost"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_ghost/object_gi_ghost.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_soul"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_soul/object_gi_soul.o"
- number 6
-endseg
-
-beginseg
- name "object_bowl"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bowl/object_bowl.o"
- number 6
-endseg
-
-beginseg
- name "object_po_field"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_po_field/object_po_field.o"
- number 6
-endseg
-
-beginseg
- name "object_demo_kekkai"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_demo_kekkai/object_demo_kekkai.o"
- number 6
-endseg
-
-beginseg
- name "object_efc_doughnut"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_efc_doughnut/object_efc_doughnut.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_dekupouch"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_dekupouch/object_gi_dekupouch.o"
- number 6
-endseg
-
-beginseg
- name "object_ganon_anime1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ganon_anime1/object_ganon_anime1.o"
- number 6
-endseg
-
-beginseg
- name "object_ganon_anime2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ganon_anime2/object_ganon_anime2.o"
- number 6
-endseg
-
-beginseg
- name "object_ganon_anime3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ganon_anime3/object_ganon_anime3.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_rupy"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_rupy/object_gi_rupy.o"
- number 6
-endseg
-
-beginseg
- name "object_spot01_matoya"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot01_matoya/object_spot01_matoya.o"
- number 6
-endseg
-
-beginseg
- name "object_spot01_matoyab"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_spot01_matoyab/object_spot01_matoyab.o"
- number 6
-endseg
-
-beginseg
- name "object_po_composer"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_po_composer/object_po_composer.o"
- number 6
-endseg
-
-beginseg
- name "object_mu"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_mu/object_mu.o"
- number 6
-endseg
-
-beginseg
- name "object_wf"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_wf/object_wf.o"
- number 6
-endseg
-
-beginseg
- name "object_skb"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_skb/object_skb.o"
- number 6
-endseg
-
-beginseg
- name "object_gj"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gj/object_gj.o"
- number 6
-endseg
-
-beginseg
- name "object_geff"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_geff/object_geff.o"
- number 6
-endseg
-
-beginseg
- name "object_haka_door"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_haka_door/object_haka_door.o"
- number 6
-endseg
-
-beginseg
- name "object_gs"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gs/object_gs.o"
- number 6
-endseg
-
-beginseg
- name "object_ps"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ps/object_ps.o"
- number 6
-endseg
-
-beginseg
- name "object_bwall"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_bwall/object_bwall.o"
- number 6
-endseg
-
-beginseg
- name "object_crow"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_crow/object_crow.o"
- number 6
-endseg
-
-beginseg
- name "object_cow"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_cow/object_cow.o"
- number 6
-endseg
-
-beginseg
- name "object_cob"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_cob/object_cob.o"
- number 6
-endseg
-
-beginseg
- name "object_gi_sword_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_gi_sword_1/object_gi_sword_1.o"
- number 6
-endseg
-
-beginseg
- name "object_door_killer"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_door_killer/object_door_killer.o"
- number 6
-endseg
-
-beginseg
- name "object_ouke_haka"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_ouke_haka/object_ouke_haka.o"
- number 6
-endseg
-
-beginseg
- name "object_timeblock"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_timeblock/object_timeblock.o"
- number 6
-endseg
-
-beginseg
- name "object_zl4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/objects/object_zl4/object_zl4.o"
- number 6
-endseg
-
-beginseg
- name "g_pn_01"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_01.o"
-endseg
-
-beginseg
- name "g_pn_02"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_02.o"
-endseg
-
-beginseg
- name "g_pn_03"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_03.o"
-endseg
-
-beginseg
- name "g_pn_04"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_04.o"
-endseg
-
-beginseg
- name "g_pn_05"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_05.o"
-endseg
-
-beginseg
- name "g_pn_06"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_06.o"
-endseg
-
-beginseg
- name "g_pn_07"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_07.o"
-endseg
-
-beginseg
- name "g_pn_08"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_08.o"
-endseg
-
-beginseg
- name "g_pn_09"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_09.o"
-endseg
-
-beginseg
- name "g_pn_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_10.o"
-endseg
-
-beginseg
- name "g_pn_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_11.o"
-endseg
-
-beginseg
- name "g_pn_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_12.o"
-endseg
-
-beginseg
- name "g_pn_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_13.o"
-endseg
-
-beginseg
- name "g_pn_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_14.o"
-endseg
-
-beginseg
- name "g_pn_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_15.o"
-endseg
-
-beginseg
- name "g_pn_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_16.o"
-endseg
-
-beginseg
- name "g_pn_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_17.o"
-endseg
-
-beginseg
- name "g_pn_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_18.o"
-endseg
-
-beginseg
- name "g_pn_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_19.o"
-endseg
-
-beginseg
- name "g_pn_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_20.o"
-endseg
-
-beginseg
- name "g_pn_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_21.o"
-endseg
-
-beginseg
- name "g_pn_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_22.o"
-endseg
-
-beginseg
- name "g_pn_23"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_23.o"
-endseg
-
-beginseg
- name "g_pn_24"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_24.o"
-endseg
-
-beginseg
- name "g_pn_25"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_25.o"
-endseg
-
-beginseg
- name "g_pn_26"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_26.o"
-endseg
-
-beginseg
- name "g_pn_27"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_27.o"
-endseg
-
-beginseg
- name "g_pn_28"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_28.o"
-endseg
-
-beginseg
- name "g_pn_29"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_29.o"
-endseg
-
-beginseg
- name "g_pn_30"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_30.o"
-endseg
-
-beginseg
- name "g_pn_31"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_31.o"
-endseg
-
-beginseg
- name "g_pn_32"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_32.o"
-endseg
-
-beginseg
- name "g_pn_33"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_33.o"
-endseg
-
-beginseg
- name "g_pn_34"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_34.o"
-endseg
-
-beginseg
- name "g_pn_35"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_35.o"
-endseg
-
-beginseg
- name "g_pn_36"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_36.o"
-endseg
-
-beginseg
- name "g_pn_37"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_37.o"
-endseg
-
-beginseg
- name "g_pn_38"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_38.o"
-endseg
-
-beginseg
- name "g_pn_39"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_39.o"
-endseg
-
-beginseg
- name "g_pn_40"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_40.o"
-endseg
-
-beginseg
- name "g_pn_41"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_41.o"
-endseg
-
-beginseg
- name "g_pn_42"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_42.o"
-endseg
-
-beginseg
- name "g_pn_43"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_43.o"
-endseg
-
-beginseg
- name "g_pn_44"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_44.o"
-endseg
-
-beginseg
- name "g_pn_45"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_45.o"
-endseg
-
-beginseg
- name "g_pn_46"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_46.o"
-endseg
-
-beginseg
- name "g_pn_47"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_47.o"
-endseg
-
-beginseg
- name "g_pn_48"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_48.o"
-endseg
-
-beginseg
- name "g_pn_49"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_49.o"
-endseg
-
-beginseg
- name "g_pn_50"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_50.o"
-endseg
-
-beginseg
- name "g_pn_51"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_51.o"
-endseg
-
-beginseg
- name "g_pn_52"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_52.o"
-endseg
-
-beginseg
- name "g_pn_53"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_53.o"
-endseg
-
-beginseg
- name "g_pn_54"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_54.o"
-endseg
-
-beginseg
- name "g_pn_55"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_55.o"
-endseg
-
-beginseg
- name "g_pn_56"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_56.o"
-endseg
-
-beginseg
- name "g_pn_57"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_57.o"
-endseg
-
-beginseg
- name "z_select_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/misc/z_select_static/z_select_static.o"
- number 1
-endseg
-
-beginseg
- name "nintendo_rogo_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/nintendo_rogo_static/nintendo_rogo_static.o"
- number 1
-endseg
-
-beginseg
- name "title_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/title_static/title_static.o"
- number 1
-endseg
-
-beginseg
- name "parameter_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/parameter_static/parameter_static.o"
- number 2
-endseg
-
-beginseg
- name "vr_fine0_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine0_static.o"
-endseg
-
-beginseg
- name "vr_fine0_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine0_pal_static.o"
-endseg
-
-beginseg
- name "vr_fine1_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine1_static.o"
-endseg
-
-beginseg
- name "vr_fine1_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine1_pal_static.o"
-endseg
-
-beginseg
- name "vr_fine2_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine2_static.o"
-endseg
-
-beginseg
- name "vr_fine2_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine2_pal_static.o"
-endseg
-
-beginseg
- name "vr_fine3_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine3_static.o"
-endseg
-
-beginseg
- name "vr_fine3_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine3_pal_static.o"
-endseg
-
-beginseg
- name "vr_cloud0_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud0_static.o"
-endseg
-
-beginseg
- name "vr_cloud0_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud0_pal_static.o"
-endseg
-
-beginseg
- name "vr_cloud1_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud1_static.o"
-endseg
-
-beginseg
- name "vr_cloud1_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud1_pal_static.o"
-endseg
-
-beginseg
- name "vr_cloud2_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud2_static.o"
-endseg
-
-beginseg
- name "vr_cloud2_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud2_pal_static.o"
-endseg
-
-beginseg
- name "vr_cloud3_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud3_static.o"
-endseg
-
-beginseg
- name "vr_cloud3_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud3_pal_static.o"
-endseg
-
-beginseg
- name "vr_holy0_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_holy0_static.o"
-endseg
-
-beginseg
- name "vr_holy0_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_holy0_pal_static.o"
-endseg
-
-beginseg
- name "vr_holy1_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_holy1_static.o"
-endseg
-
-beginseg
- name "vr_holy1_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/skyboxes/vr_holy1_pal_static.o"
-endseg
-
-beginseg
- name "vr_MDVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MDVR_static.o"
-endseg
-
-beginseg
- name "vr_MDVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MDVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_MNVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MNVR_static.o"
-endseg
-
-beginseg
- name "vr_MNVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MNVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_RUVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_RUVR_static.o"
-endseg
-
-beginseg
- name "vr_RUVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_RUVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_LHVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_LHVR_static.o"
-endseg
-
-beginseg
- name "vr_LHVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_LHVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_KHVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KHVR_static.o"
-endseg
-
-beginseg
- name "vr_KHVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KHVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_K3VR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K3VR_static.o"
-endseg
-
-beginseg
- name "vr_K3VR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K3VR_pal_static.o"
-endseg
-
-beginseg
- name "vr_K4VR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K4VR_static.o"
-endseg
-
-beginseg
- name "vr_K4VR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K4VR_pal_static.o"
-endseg
-
-beginseg
- name "vr_K5VR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K5VR_static.o"
-endseg
-
-beginseg
- name "vr_K5VR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K5VR_pal_static.o"
-endseg
-
-beginseg
- name "vr_SP1a_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_SP1a_static.o"
-endseg
-
-beginseg
- name "vr_SP1a_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_SP1a_pal_static.o"
-endseg
-
-beginseg
- name "vr_MLVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MLVR_static.o"
-endseg
-
-beginseg
- name "vr_MLVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MLVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_KKRVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KKRVR_static.o"
-endseg
-
-beginseg
- name "vr_KKRVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KKRVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_KR3VR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KR3VR_static.o"
-endseg
-
-beginseg
- name "vr_KR3VR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KR3VR_pal_static.o"
-endseg
-
-beginseg
- name "vr_IPVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_IPVR_static.o"
-endseg
-
-beginseg
- name "vr_IPVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_IPVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_KSVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KSVR_static.o"
-endseg
-
-beginseg
- name "vr_KSVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KSVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_GLVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_GLVR_static.o"
-endseg
-
-beginseg
- name "vr_GLVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_GLVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_ZRVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_ZRVR_static.o"
-endseg
-
-beginseg
- name "vr_ZRVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_ZRVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_DGVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_DGVR_static.o"
-endseg
-
-beginseg
- name "vr_DGVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_DGVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_ALVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_ALVR_static.o"
-endseg
-
-beginseg
- name "vr_ALVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_ALVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_NSVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_NSVR_static.o"
-endseg
-
-beginseg
- name "vr_NSVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_NSVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_LBVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_LBVR_static.o"
-endseg
-
-beginseg
- name "vr_LBVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_LBVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_TTVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_TTVR_static.o"
-endseg
-
-beginseg
- name "vr_TTVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_TTVR_pal_static.o"
-endseg
-
-beginseg
- name "vr_FCVR_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_FCVR_static.o"
-endseg
-
-beginseg
- name "vr_FCVR_pal_static"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/textures/backgrounds/vr_FCVR_pal_static.o"
-endseg
-
-beginseg
- name "elf_message_field"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/src/elf_message/elf_message_field.o"
- number 0
-endseg
-
-beginseg
- name "elf_message_ydan"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/src/elf_message/elf_message_ydan.o"
- number 0
-endseg
-
-// Scene files are reordered between versions. On GameCube and iQue, dungeon scenes
-// have been moved to the beginning.
-#if PLATFORM_N64
-
-beginseg
- name "ddan_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_scene.o"
- number 2
-endseg
-
-beginseg
- name "ddan_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_5.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_7.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_8.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_9.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_10.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_11.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_12.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_13.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_14.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_15.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_16.o"
- number 3
-endseg
-
-beginseg
- name "spot00_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot00/spot00_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot00_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot00/spot00_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot01_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot01/spot01_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot01_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot01/spot01_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot02_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot02_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot02_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot03_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot03_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot03_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot04_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot04_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot04_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot04_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_2.o"
- number 3
-endseg
-
-beginseg
- name "spot05_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot05/spot05_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot05_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot05/spot05_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot06_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot06/spot06_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot06_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot06/spot06_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot07_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot07_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot07_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot08_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot08/spot08_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot08_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot08/spot08_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot09_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot09/spot09_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot09_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot09/spot09_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot10_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot10_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_2.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_3.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_4.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_5.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_6.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_7.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_8.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_9.o"
- number 3
-endseg
-
-beginseg
- name "spot11_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot11/spot11_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot11_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot11/spot11_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot12_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot12_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot12_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot13_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot13_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot13_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot15_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot15/spot15_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot15_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot15/spot15_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot16_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot16/spot16_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot16_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot16/spot16_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot17_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot17_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot17_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot18_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot18_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot18_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot18_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_2.o"
- number 3
-endseg
-
-beginseg
- name "spot18_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_3.o"
- number 3
-endseg
-
-beginseg
- name "market_day_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_day/market_day_scene.o"
- number 2
-endseg
-
-beginseg
- name "market_day_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_day/market_day_room_0.o"
- number 3
-endseg
-
-beginseg
- name "market_night_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_night/market_night_scene.o"
- number 2
-endseg
-
-beginseg
- name "market_night_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_night/market_night_room_0.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_scene.o"
- number 2
-endseg
-
-beginseg
- name "HIDAN_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_0.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_1.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_2.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_3.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_4.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_5.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_6.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_7.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_8.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_9.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_10.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_11.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_12.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_13.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_14.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_15.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_16.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_17.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_18.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_19.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_20.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_21.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_22.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_23"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_23.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_24"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_24.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_25"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_25.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_26"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_26.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_scene.o"
- number 2
-endseg
-
-beginseg
- name "Bmori1_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_0.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_1.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_2.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_3.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_4.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_5.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_6.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_7.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_8.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_9.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_10.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_11.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_12.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_13.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_14.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_15.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_16.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_17.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_18.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_19.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_20.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_21.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_22.o"
- number 3
-endseg
-
-beginseg
- name "ydan_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_scene.o"
- number 2
-endseg
-
-beginseg
- name "ydan_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_5.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_7.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_8.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_9.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_10.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_11.o"
- number 3
-endseg
-
-beginseg
- name "kenjyanoma_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kenjyanoma/kenjyanoma_scene.o"
- number 2
-endseg
-
-beginseg
- name "kenjyanoma_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kenjyanoma/kenjyanoma_room_0.o"
- number 3
-endseg
-
-beginseg
- name "tokinoma_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_scene.o"
- number 2
-endseg
-
-beginseg
- name "tokinoma_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_room_0.o"
- number 3
-endseg
-
-beginseg
- name "tokinoma_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_room_1.o"
- number 3
-endseg
-
-beginseg
- name "link_home_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/link_home/link_home_scene.o"
- number 2
-endseg
-
-beginseg
- name "link_home_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/link_home/link_home_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kokiri_shop_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/kokiri_shop/kokiri_shop_scene.o"
- number 2
-endseg
-
-beginseg
- name "kokiri_shop_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/kokiri_shop/kokiri_shop_room_0.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_scene.o"
- number 2
-endseg
-
-beginseg
- name "MIZUsin_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_0.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_1.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_2.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_3.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_4.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_5.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_6.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_7.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_8.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_9.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_10.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_11.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_12.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_13.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_14.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_15.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_16.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_17.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_18.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_19.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_20.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_21.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_22.o"
- number 3
-endseg
-
-beginseg
- name "kokiri_home_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home/kokiri_home_scene.o"
- number 2
-endseg
-
-beginseg
- name "kokiri_home_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home/kokiri_home_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_scene.o"
- number 2
-endseg
-
-beginseg
- name "kakusiana_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_1.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_2.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_3.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_4.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_5.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_6.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_7.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_8.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_9.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_10.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_11.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_12.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_13.o"
- number 3
-endseg
-
-beginseg
- name "entra_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/entra/entra_scene.o"
- number 2
-endseg
-
-beginseg
- name "entra_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/entra/entra_room_0.o"
- number 3
-endseg
-
-beginseg
- name "bdan_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_scene.o"
- number 2
-endseg
-
-beginseg
- name "bdan_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_0.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_1.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_2.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_3.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_4.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_5.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_6.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_7.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_8.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_9.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_10.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_11.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_12.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_13.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_14.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_15.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_scene.o"
- number 2
-endseg
-
-beginseg
- name "HAKAdan_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_0.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_1.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_2.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_3.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_4.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_5.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_6.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_7.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_8.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_9.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_10.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_11.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_12.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_13.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_14.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_15.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_16.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_17.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_18.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_19.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_20.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_21.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_22.o"
- number 3
-endseg
-
-beginseg
- name "moribossroom_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_scene.o"
- number 2
-endseg
-
-beginseg
- name "moribossroom_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_room_0.o"
- number 3
-endseg
-
-beginseg
- name "moribossroom_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_room_1.o"
- number 3
-endseg
-
-beginseg
- name "syatekijyou_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/syatekijyou/syatekijyou_scene.o"
- number 2
-endseg
-
-beginseg
- name "syatekijyou_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/syatekijyou/syatekijyou_room_0.o"
- number 3
-endseg
-
-beginseg
- name "men_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_scene.o"
- number 2
-endseg
-
-beginseg
- name "men_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_0.o"
- number 3
-endseg
-
-beginseg
- name "men_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_1.o"
- number 3
-endseg
-
-beginseg
- name "men_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_2.o"
- number 3
-endseg
-
-beginseg
- name "men_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_3.o"
- number 3
-endseg
-
-beginseg
- name "men_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_4.o"
- number 3
-endseg
-
-beginseg
- name "men_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_5.o"
- number 3
-endseg
-
-beginseg
- name "men_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_6.o"
- number 3
-endseg
-
-beginseg
- name "men_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_7.o"
- number 3
-endseg
-
-beginseg
- name "men_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_8.o"
- number 3
-endseg
-
-beginseg
- name "men_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_9.o"
- number 3
-endseg
-
-beginseg
- name "men_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_10.o"
- number 3
-endseg
-
-beginseg
- name "shop1_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/shop1/shop1_scene.o"
- number 2
-endseg
-
-beginseg
- name "shop1_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/shop1/shop1_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hairal_niwa_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa/hairal_niwa_scene.o"
- number 2
-endseg
-
-beginseg
- name "hairal_niwa_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa/hairal_niwa_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganon_tou_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/ganon_tou/ganon_tou_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_tou_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/ganon_tou/ganon_tou_room_0.o"
- number 3
-endseg
-
-beginseg
- name "market_alley_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_alley/market_alley_scene.o"
- number 2
-endseg
-
-beginseg
- name "market_alley_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_alley/market_alley_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot20_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot20/spot20_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot20_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot20/spot20_room_0.o"
- number 3
-endseg
-
-beginseg
- name "market_ruins_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_ruins/market_ruins_scene.o"
- number 2
-endseg
-
-beginseg
- name "market_ruins_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_ruins/market_ruins_room_0.o"
- number 3
-endseg
-
-beginseg
- name "entra_n_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/entra_n/entra_n_scene.o"
- number 2
-endseg
-
-beginseg
- name "entra_n_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/entra_n/entra_n_room_0.o"
- number 3
-endseg
-
-beginseg
- name "enrui_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/enrui/enrui_scene.o"
- number 2
-endseg
-
-beginseg
- name "enrui_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/enrui/enrui_room_0.o"
- number 3
-endseg
-
-beginseg
- name "market_alley_n_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_alley_n/market_alley_n_scene.o"
- number 2
-endseg
-
-beginseg
- name "market_alley_n_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_alley_n/market_alley_n_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hiral_demo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hiral_demo/hiral_demo_scene.o"
- number 2
-endseg
-
-beginseg
- name "hiral_demo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hiral_demo/hiral_demo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kokiri_home3_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home3/kokiri_home3_scene.o"
- number 2
-endseg
-
-beginseg
- name "kokiri_home3_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home3/kokiri_home3_room_0.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_scene.o"
- number 2
-endseg
-
-beginseg
- name "jyasinzou_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_0.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_1.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_2.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_3.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_4.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_5.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_6.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_7.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_8.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_9.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_10.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_11.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_12.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_13.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_14.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_15.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_16.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_17.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_18.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_19.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_20.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_21.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_22.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_23"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_23.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_24"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_24.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_25"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_25.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_26"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_26.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_27"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_27.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_28"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_28.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.o"
- number 2
-endseg
-
-beginseg
- name "ice_doukutu_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_5.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_7.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_8.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_9.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_10.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_11.o"
- number 3
-endseg
-
-beginseg
- name "malon_stable_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/malon_stable/malon_stable_scene.o"
- number 2
-endseg
-
-beginseg
- name "malon_stable_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/malon_stable/malon_stable_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kakariko_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kakariko/kakariko_scene.o"
- number 2
-endseg
-
-beginseg
- name "kakariko_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kakariko/kakariko_room_0.o"
- number 3
-endseg
-
-beginseg
- name "bdan_boss_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_scene.o"
- number 2
-endseg
-
-beginseg
- name "bdan_boss_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_room_0.o"
- number 3
-endseg
-
-beginseg
- name "bdan_boss_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_room_1.o"
- number 3
-endseg
-
-beginseg
- name "FIRE_bs_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_scene.o"
- number 2
-endseg
-
-beginseg
- name "FIRE_bs_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_room_0.o"
- number 3
-endseg
-
-beginseg
- name "FIRE_bs_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_room_1.o"
- number 3
-endseg
-
-beginseg
- name "hut_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hut/hut_scene.o"
- number 2
-endseg
-
-beginseg
- name "hut_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hut/hut_room_0.o"
- number 3
-endseg
-
-beginseg
- name "daiyousei_izumi_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/daiyousei_izumi/daiyousei_izumi_scene.o"
- number 2
-endseg
-
-beginseg
- name "daiyousei_izumi_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/daiyousei_izumi/daiyousei_izumi_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hakaana_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana/hakaana_scene.o"
- number 2
-endseg
-
-beginseg
- name "hakaana_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana/hakaana_room_0.o"
- number 3
-endseg
-
-beginseg
- name "yousei_izumi_tate_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_tate/yousei_izumi_tate_scene.o"
- number 2
-endseg
-
-beginseg
- name "yousei_izumi_tate_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_tate/yousei_izumi_tate_room_0.o"
- number 3
-endseg
-
-beginseg
- name "yousei_izumi_yoko_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_scene.o"
- number 2
-endseg
-
-beginseg
- name "yousei_izumi_yoko_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_room_0.o"
- number 3
-endseg
-
-beginseg
- name "golon_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/golon/golon_scene.o"
- number 2
-endseg
-
-beginseg
- name "golon_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/golon/golon_room_0.o"
- number 3
-endseg
-
-beginseg
- name "zoora_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/zoora/zoora_scene.o"
- number 2
-endseg
-
-beginseg
- name "zoora_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/zoora/zoora_room_0.o"
- number 3
-endseg
-
-beginseg
- name "drag_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/drag/drag_scene.o"
- number 2
-endseg
-
-beginseg
- name "drag_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/drag/drag_room_0.o"
- number 3
-endseg
-
-beginseg
- name "alley_shop_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/alley_shop/alley_shop_scene.o"
- number 2
-endseg
-
-beginseg
- name "alley_shop_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/alley_shop/alley_shop_room_0.o"
- number 3
-endseg
-
-beginseg
- name "night_shop_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/night_shop/night_shop_scene.o"
- number 2
-endseg
-
-beginseg
- name "night_shop_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/night_shop/night_shop_room_0.o"
- number 3
-endseg
-
-beginseg
- name "impa_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/impa/impa_scene.o"
- number 2
-endseg
-
-beginseg
- name "impa_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/impa/impa_room_0.o"
- number 3
-endseg
-
-beginseg
- name "labo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/labo/labo_scene.o"
- number 2
-endseg
-
-beginseg
- name "labo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/labo/labo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "tent_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/tent/tent_scene.o"
- number 2
-endseg
-
-beginseg
- name "tent_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/tent/tent_room_0.o"
- number 3
-endseg
-
-beginseg
- name "nakaniwa_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/nakaniwa/nakaniwa_scene.o"
- number 2
-endseg
-
-beginseg
- name "nakaniwa_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/nakaniwa/nakaniwa_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ddan_boss_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_scene.o"
- number 2
-endseg
-
-beginseg
- name "ddan_boss_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ddan_boss_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ydan_boss_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_scene.o"
- number 2
-endseg
-
-beginseg
- name "ydan_boss_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ydan_boss_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_room_1.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_bs_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_scene.o"
- number 2
-endseg
-
-beginseg
- name "HAKAdan_bs_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_room_0.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_bs_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_room_1.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_bs_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_scene.o"
- number 2
-endseg
-
-beginseg
- name "MIZUsin_bs_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_room_0.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_bs_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ganon_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_5.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_7.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_8.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_9.o"
- number 3
-endseg
-
-beginseg
- name "ganon_boss_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_boss/ganon_boss_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_boss_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_boss/ganon_boss_room_0.o"
- number 3
-endseg
-
-beginseg
- name "jyasinboss_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_scene.o"
- number 2
-endseg
-
-beginseg
- name "jyasinboss_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_0.o"
- number 3
-endseg
-
-beginseg
- name "jyasinboss_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_1.o"
- number 3
-endseg
-
-beginseg
- name "jyasinboss_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_2.o"
- number 3
-endseg
-
-beginseg
- name "jyasinboss_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_3.o"
- number 3
-endseg
-
-beginseg
- name "kokiri_home4_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home4/kokiri_home4_scene.o"
- number 2
-endseg
-
-beginseg
- name "kokiri_home4_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home4/kokiri_home4_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kokiri_home5_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home5/kokiri_home5_scene.o"
- number 2
-endseg
-
-beginseg
- name "kokiri_home5_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home5/kokiri_home5_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganon_final_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_final/ganon_final_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_final_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_final/ganon_final_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kakariko3_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakariko3/kakariko3_scene.o"
- number 2
-endseg
-
-beginseg
- name "kakariko3_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakariko3/kakariko3_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_scene.o"
- number 2
-endseg
-
-beginseg
- name "hakasitarelay_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_1.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_2.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_3.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_4.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_5.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_6.o"
- number 3
-endseg
-
-beginseg
- name "shrine_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine/shrine_scene.o"
- number 2
-endseg
-
-beginseg
- name "shrine_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine/shrine_room_0.o"
- number 3
-endseg
-
-beginseg
- name "turibori_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/turibori/turibori_scene.o"
- number 2
-endseg
-
-beginseg
- name "turibori_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/turibori/turibori_room_0.o"
- number 3
-endseg
-
-beginseg
- name "shrine_n_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine_n/shrine_n_scene.o"
- number 2
-endseg
-
-beginseg
- name "shrine_n_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine_n/shrine_n_room_0.o"
- number 3
-endseg
-
-beginseg
- name "shrine_r_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine_r/shrine_r_scene.o"
- number 2
-endseg
-
-beginseg
- name "shrine_r_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine_r/shrine_r_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganontika_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_5.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_7.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_8.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_9.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_10.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_11.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_12.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_13.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_14.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_15.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_16.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_17.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_18.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_19.o"
- number 3
-endseg
-
-beginseg
- name "hakaana2_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana2/hakaana2_scene.o"
- number 2
-endseg
-
-beginseg
- name "hakaana2_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana2/hakaana2_room_0.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_scene.o"
- number 2
-endseg
-
-beginseg
- name "gerudoway_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_0.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_1.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_2.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_3.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_4.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_5.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_scene.o"
- number 2
-endseg
-
-beginseg
- name "HAKAdanCH_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_0.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_1.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_2.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_3.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_4.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_5.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_6.o"
- number 3
-endseg
-
-beginseg
- name "hairal_niwa_n_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa_n/hairal_niwa_n_scene.o"
- number 2
-endseg
-
-beginseg
- name "hairal_niwa_n_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa_n/hairal_niwa_n_room_0.o"
- number 3
-endseg
-
-beginseg
- name "bowling_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/bowling/bowling_scene.o"
- number 2
-endseg
-
-beginseg
- name "bowling_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/bowling/bowling_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hakaana_ouke_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_scene.o"
- number 2
-endseg
-
-beginseg
- name "hakaana_ouke_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hakaana_ouke_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_1.o"
- number 3
-endseg
-
-beginseg
- name "hakaana_ouke_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_2.o"
- number 3
-endseg
-
-beginseg
- name "hylia_labo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hylia_labo/hylia_labo_scene.o"
- number 2
-endseg
-
-beginseg
- name "hylia_labo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hylia_labo/hylia_labo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "souko_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_scene.o"
- number 2
-endseg
-
-beginseg
- name "souko_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_0.o"
- number 3
-endseg
-
-beginseg
- name "souko_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_1.o"
- number 3
-endseg
-
-beginseg
- name "souko_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_2.o"
- number 3
-endseg
-
-beginseg
- name "miharigoya_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/miharigoya/miharigoya_scene.o"
- number 2
-endseg
-
-beginseg
- name "miharigoya_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/miharigoya/miharigoya_room_0.o"
- number 3
-endseg
-
-beginseg
- name "mahouya_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/mahouya/mahouya_scene.o"
- number 2
-endseg
-
-beginseg
- name "mahouya_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/mahouya/mahouya_room_0.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_scene.o"
- number 2
-endseg
-
-beginseg
- name "takaraya_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_0.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_1.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_2.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_3.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_4.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_5.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ganon_sonogo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_sonogo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganon_sonogo_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ganon_sonogo_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ganon_sonogo_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ganon_sonogo_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ganon_demo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_demo/ganon_demo_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_demo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_demo/ganon_demo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "face_shop_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/face_shop/face_shop_scene.o"
- number 2
-endseg
-
-beginseg
- name "face_shop_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/face_shop/face_shop_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kinsuta_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kinsuta/kinsuta_scene.o"
- number 2
-endseg
-
-beginseg
- name "kinsuta_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kinsuta/kinsuta_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganontikasonogo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganontikasonogo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganontikasonogo_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_room_1.o"
- number 3
-endseg
-
-#else
-
-beginseg
- name "ydan_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_scene.o"
- number 2
-endseg
-
-beginseg
- name "ydan_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_5.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_7.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_8.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_9.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_10.o"
- number 3
-endseg
-
-beginseg
- name "ydan_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_11.o"
- number 3
-endseg
-
-beginseg
- name "ddan_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_scene.o"
- number 2
-endseg
-
-beginseg
- name "ddan_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_5.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_7.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_8.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_9.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_10.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_11.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_12.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_13.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_14.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_15.o"
- number 3
-endseg
-
-beginseg
- name "ddan_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_16.o"
- number 3
-endseg
-
-beginseg
- name "bdan_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_scene.o"
- number 2
-endseg
-
-beginseg
- name "bdan_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_0.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_1.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_2.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_3.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_4.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_5.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_6.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_7.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_8.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_9.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_10.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_11.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_12.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_13.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_14.o"
- number 3
-endseg
-
-beginseg
- name "bdan_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_15.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_scene.o"
- number 2
-endseg
-
-beginseg
- name "Bmori1_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_0.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_1.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_2.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_3.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_4.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_5.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_6.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_7.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_8.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_9.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_10.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_11.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_12.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_13.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_14.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_15.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_16.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_17.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_18.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_19.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_20.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_21.o"
- number 3
-endseg
-
-beginseg
- name "Bmori1_room_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_22.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_scene.o"
- number 2
-endseg
-
-beginseg
- name "HIDAN_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_0.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_1.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_2.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_3.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_4.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_5.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_6.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_7.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_8.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_9.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_10.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_11.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_12.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_13.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_14.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_15.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_16.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_17.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_18.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_19.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_20.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_21.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_22.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_23"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_23.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_24"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_24.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_25"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_25.o"
- number 3
-endseg
-
-beginseg
- name "HIDAN_room_26"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_26.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_scene.o"
- number 2
-endseg
-
-beginseg
- name "MIZUsin_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_0.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_1.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_2.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_3.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_4.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_5.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_6.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_7.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_8.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_9.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_10.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_11.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_12.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_13.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_14.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_15.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_16.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_17.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_18.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_19.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_20.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_21.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_room_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_22.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_scene.o"
- number 2
-endseg
-
-beginseg
- name "jyasinzou_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_0.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_1.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_2.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_3.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_4.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_5.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_6.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_7.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_8.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_9.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_10.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_11.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_12.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_13.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_14.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_15.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_16.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_17.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_18.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_19.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_20.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_21.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_22.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_23"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_23.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_24"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_24.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_25"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_25.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_26"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_26.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_27"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_27.o"
- number 3
-endseg
-
-beginseg
- name "jyasinzou_room_28"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_28.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_scene.o"
- number 2
-endseg
-
-beginseg
- name "HAKAdan_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_0.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_1.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_2.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_3.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_4.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_5.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_6.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_7.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_8.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_9.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_10.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_11.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_12.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_13.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_14.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_15.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_16.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_17.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_18.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_19.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_20"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_20.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_21"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_21.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_room_22"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_22.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_scene.o"
- number 2
-endseg
-
-beginseg
- name "HAKAdanCH_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_0.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_1.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_2.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_3.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_4.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_5.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdanCH_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.o"
- number 2
-endseg
-
-beginseg
- name "ice_doukutu_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_5.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_7.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_8.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_9.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_10.o"
- number 3
-endseg
-
-beginseg
- name "ice_doukutu_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_11.o"
- number 3
-endseg
-
-beginseg
- name "men_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_scene.o"
- number 2
-endseg
-
-beginseg
- name "men_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_0.o"
- number 3
-endseg
-
-beginseg
- name "men_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_1.o"
- number 3
-endseg
-
-beginseg
- name "men_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_2.o"
- number 3
-endseg
-
-beginseg
- name "men_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_3.o"
- number 3
-endseg
-
-beginseg
- name "men_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_4.o"
- number 3
-endseg
-
-beginseg
- name "men_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_5.o"
- number 3
-endseg
-
-beginseg
- name "men_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_6.o"
- number 3
-endseg
-
-beginseg
- name "men_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_7.o"
- number 3
-endseg
-
-beginseg
- name "men_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_8.o"
- number 3
-endseg
-
-beginseg
- name "men_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_9.o"
- number 3
-endseg
-
-beginseg
- name "men_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_10.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganontika_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_5.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_7.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_8.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_9.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_10.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_11.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_12.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_13.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_14"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_14.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_15"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_15.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_16"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_16.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_17"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_17.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_18"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_18.o"
- number 3
-endseg
-
-beginseg
- name "ganontika_room_19"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_19.o"
- number 3
-endseg
-
-#if OOT_DEBUG
-beginseg
- name "syotes_scene"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/syotes/syotes_scene.o"
- number 2
-endseg
-
-beginseg
- name "syotes_room_0"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/syotes/syotes_room_0.o"
- number 3
-endseg
-
-beginseg
- name "syotes2_scene"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/syotes2/syotes2_scene.o"
- number 2
-endseg
-
-beginseg
- name "syotes2_room_0"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/syotes2/syotes2_room_0.o"
- number 3
-endseg
-
-beginseg
- name "depth_test_scene"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/depth_test/depth_test_scene.o"
- number 2
-endseg
-
-beginseg
- name "depth_test_room_0"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/depth_test/depth_test_room_0.o"
- number 3
-endseg
-#endif
-
-beginseg
- name "spot00_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot00/spot00_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot00_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot00/spot00_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot01_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot01/spot01_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot01_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot01/spot01_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot02_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot02_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot02_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot03_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot03_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot03_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot04_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot04_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot04_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot04_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_2.o"
- number 3
-endseg
-
-beginseg
- name "spot05_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot05/spot05_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot05_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot05/spot05_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot06_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot06/spot06_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot06_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot06/spot06_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot07_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot07_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot07_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot08_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot08/spot08_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot08_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot08/spot08_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot09_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot09/spot09_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot09_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot09/spot09_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot10_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot10_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_2.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_3.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_4.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_5.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_6.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_7.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_8.o"
- number 3
-endseg
-
-beginseg
- name "spot10_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_9.o"
- number 3
-endseg
-
-beginseg
- name "spot11_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot11/spot11_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot11_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot11/spot11_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot12_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot12_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot12_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot13_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot13_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot13_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot15_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot15/spot15_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot15_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot15/spot15_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot16_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot16/spot16_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot16_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot16/spot16_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot17_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot17_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot17_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot18_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot18_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot18_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_1.o"
- number 3
-endseg
-
-beginseg
- name "spot18_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_2.o"
- number 3
-endseg
-
-beginseg
- name "spot18_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_3.o"
- number 3
-endseg
-
-beginseg
- name "market_day_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_day/market_day_scene.o"
- number 2
-endseg
-
-beginseg
- name "market_day_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_day/market_day_room_0.o"
- number 3
-endseg
-
-beginseg
- name "market_night_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_night/market_night_scene.o"
- number 2
-endseg
-
-beginseg
- name "market_night_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_night/market_night_room_0.o"
- number 3
-endseg
-
-#if OOT_DEBUG
-beginseg
- name "testroom_scene"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_scene.o"
- number 2
-endseg
-
-beginseg
- name "testroom_room_0"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_room_0.o"
- number 3
-endseg
-
-beginseg
- name "testroom_room_1"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_room_1.o"
- number 3
-endseg
-
-beginseg
- name "testroom_room_2"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_room_2.o"
- number 3
-endseg
-
-beginseg
- name "testroom_room_3"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_room_3.o"
- number 3
-endseg
-
-beginseg
- name "testroom_room_4"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_room_4.o"
- number 3
-endseg
-#endif
-
-beginseg
- name "kenjyanoma_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kenjyanoma/kenjyanoma_scene.o"
- number 2
-endseg
-
-beginseg
- name "kenjyanoma_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kenjyanoma/kenjyanoma_room_0.o"
- number 3
-endseg
-
-beginseg
- name "tokinoma_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_scene.o"
- number 2
-endseg
-
-beginseg
- name "tokinoma_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_room_0.o"
- number 3
-endseg
-
-beginseg
- name "tokinoma_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_room_1.o"
- number 3
-endseg
-
-#if OOT_DEBUG
-beginseg
- name "sutaru_scene"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/sutaru/sutaru_scene.o"
- number 2
-endseg
-
-beginseg
- name "sutaru_room_0"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/sutaru/sutaru_room_0.o"
- number 3
-endseg
-#endif
-
-beginseg
- name "link_home_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/link_home/link_home_scene.o"
- number 2
-endseg
-
-beginseg
- name "link_home_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/link_home/link_home_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kokiri_shop_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/kokiri_shop/kokiri_shop_scene.o"
- number 2
-endseg
-
-beginseg
- name "kokiri_shop_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/kokiri_shop/kokiri_shop_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kokiri_home_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home/kokiri_home_scene.o"
- number 2
-endseg
-
-beginseg
- name "kokiri_home_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home/kokiri_home_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_scene.o"
- number 2
-endseg
-
-beginseg
- name "kakusiana_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_1.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_2.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_3.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_4.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_5.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_6.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_7.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_8.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_9.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_10"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_10.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_11"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_11.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_12"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_12.o"
- number 3
-endseg
-
-beginseg
- name "kakusiana_room_13"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_13.o"
- number 3
-endseg
-
-beginseg
- name "entra_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/entra/entra_scene.o"
- number 2
-endseg
-
-beginseg
- name "entra_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/entra/entra_room_0.o"
- number 3
-endseg
-
-beginseg
- name "moribossroom_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_scene.o"
- number 2
-endseg
-
-beginseg
- name "moribossroom_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_room_0.o"
- number 3
-endseg
-
-beginseg
- name "moribossroom_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_room_1.o"
- number 3
-endseg
-
-beginseg
- name "syatekijyou_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/syatekijyou/syatekijyou_scene.o"
- number 2
-endseg
-
-beginseg
- name "syatekijyou_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/syatekijyou/syatekijyou_room_0.o"
- number 3
-endseg
-
-beginseg
- name "shop1_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/shop1/shop1_scene.o"
- number 2
-endseg
-
-beginseg
- name "shop1_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/shop1/shop1_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hairal_niwa_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa/hairal_niwa_scene.o"
- number 2
-endseg
-
-beginseg
- name "hairal_niwa_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa/hairal_niwa_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganon_tou_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/ganon_tou/ganon_tou_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_tou_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/ganon_tou/ganon_tou_room_0.o"
- number 3
-endseg
-
-#if OOT_DEBUG
-beginseg
- name "sasatest_scene"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/sasatest/sasatest_scene.o"
- number 2
-endseg
-
-beginseg
- name "sasatest_room_0"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/sasatest/sasatest_room_0.o"
- number 3
-endseg
-#endif
-
-beginseg
- name "market_alley_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_alley/market_alley_scene.o"
- number 2
-endseg
-
-beginseg
- name "market_alley_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_alley/market_alley_room_0.o"
- number 3
-endseg
-
-beginseg
- name "spot20_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot20/spot20_scene.o"
- number 2
-endseg
-
-beginseg
- name "spot20_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/overworld/spot20/spot20_room_0.o"
- number 3
-endseg
-
-beginseg
- name "market_ruins_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_ruins/market_ruins_scene.o"
- number 2
-endseg
-
-beginseg
- name "market_ruins_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_ruins/market_ruins_room_0.o"
- number 3
-endseg
-
-beginseg
- name "entra_n_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/entra_n/entra_n_scene.o"
- number 2
-endseg
-
-beginseg
- name "entra_n_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/entra_n/entra_n_room_0.o"
- number 3
-endseg
-
-beginseg
- name "enrui_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/enrui/enrui_scene.o"
- number 2
-endseg
-
-beginseg
- name "enrui_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/enrui/enrui_room_0.o"
- number 3
-endseg
-
-beginseg
- name "market_alley_n_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_alley_n/market_alley_n_scene.o"
- number 2
-endseg
-
-beginseg
- name "market_alley_n_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/market_alley_n/market_alley_n_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hiral_demo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hiral_demo/hiral_demo_scene.o"
- number 2
-endseg
-
-beginseg
- name "hiral_demo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hiral_demo/hiral_demo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kokiri_home3_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home3/kokiri_home3_scene.o"
- number 2
-endseg
-
-beginseg
- name "kokiri_home3_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home3/kokiri_home3_room_0.o"
- number 3
-endseg
-
-beginseg
- name "malon_stable_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/malon_stable/malon_stable_scene.o"
- number 2
-endseg
-
-beginseg
- name "malon_stable_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/malon_stable/malon_stable_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kakariko_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kakariko/kakariko_scene.o"
- number 2
-endseg
-
-beginseg
- name "kakariko_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kakariko/kakariko_room_0.o"
- number 3
-endseg
-
-beginseg
- name "bdan_boss_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_scene.o"
- number 2
-endseg
-
-beginseg
- name "bdan_boss_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_room_0.o"
- number 3
-endseg
-
-beginseg
- name "bdan_boss_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_room_1.o"
- number 3
-endseg
-
-beginseg
- name "FIRE_bs_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_scene.o"
- number 2
-endseg
-
-beginseg
- name "FIRE_bs_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_room_0.o"
- number 3
-endseg
-
-beginseg
- name "FIRE_bs_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_room_1.o"
- number 3
-endseg
-
-beginseg
- name "hut_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hut/hut_scene.o"
- number 2
-endseg
-
-beginseg
- name "hut_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hut/hut_room_0.o"
- number 3
-endseg
-
-beginseg
- name "daiyousei_izumi_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/daiyousei_izumi/daiyousei_izumi_scene.o"
- number 2
-endseg
-
-beginseg
- name "daiyousei_izumi_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/daiyousei_izumi/daiyousei_izumi_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hakaana_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana/hakaana_scene.o"
- number 2
-endseg
-
-beginseg
- name "hakaana_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana/hakaana_room_0.o"
- number 3
-endseg
-
-beginseg
- name "yousei_izumi_tate_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_tate/yousei_izumi_tate_scene.o"
- number 2
-endseg
-
-beginseg
- name "yousei_izumi_tate_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_tate/yousei_izumi_tate_room_0.o"
- number 3
-endseg
-
-beginseg
- name "yousei_izumi_yoko_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_scene.o"
- number 2
-endseg
-
-beginseg
- name "yousei_izumi_yoko_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_room_0.o"
- number 3
-endseg
-
-beginseg
- name "golon_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/golon/golon_scene.o"
- number 2
-endseg
-
-beginseg
- name "golon_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/golon/golon_room_0.o"
- number 3
-endseg
-
-beginseg
- name "zoora_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/zoora/zoora_scene.o"
- number 2
-endseg
-
-beginseg
- name "zoora_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/zoora/zoora_room_0.o"
- number 3
-endseg
-
-beginseg
- name "drag_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/drag/drag_scene.o"
- number 2
-endseg
-
-beginseg
- name "drag_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/drag/drag_room_0.o"
- number 3
-endseg
-
-beginseg
- name "alley_shop_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/alley_shop/alley_shop_scene.o"
- number 2
-endseg
-
-beginseg
- name "alley_shop_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/alley_shop/alley_shop_room_0.o"
- number 3
-endseg
-
-beginseg
- name "night_shop_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/night_shop/night_shop_scene.o"
- number 2
-endseg
-
-beginseg
- name "night_shop_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/night_shop/night_shop_room_0.o"
- number 3
-endseg
-
-beginseg
- name "impa_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/impa/impa_scene.o"
- number 2
-endseg
-
-beginseg
- name "impa_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/impa/impa_room_0.o"
- number 3
-endseg
-
-beginseg
- name "labo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/labo/labo_scene.o"
- number 2
-endseg
-
-beginseg
- name "labo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/labo/labo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "tent_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/tent/tent_scene.o"
- number 2
-endseg
-
-beginseg
- name "tent_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/tent/tent_room_0.o"
- number 3
-endseg
-
-beginseg
- name "nakaniwa_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/nakaniwa/nakaniwa_scene.o"
- number 2
-endseg
-
-beginseg
- name "nakaniwa_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/nakaniwa/nakaniwa_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ddan_boss_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_scene.o"
- number 2
-endseg
-
-beginseg
- name "ddan_boss_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ddan_boss_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ydan_boss_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_scene.o"
- number 2
-endseg
-
-beginseg
- name "ydan_boss_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ydan_boss_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_room_1.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_bs_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_scene.o"
- number 2
-endseg
-
-beginseg
- name "HAKAdan_bs_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_room_0.o"
- number 3
-endseg
-
-beginseg
- name "HAKAdan_bs_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_room_1.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_bs_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_scene.o"
- number 2
-endseg
-
-beginseg
- name "MIZUsin_bs_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_room_0.o"
- number 3
-endseg
-
-beginseg
- name "MIZUsin_bs_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ganon_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_5.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_7"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_7.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_8"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_8.o"
- number 3
-endseg
-
-beginseg
- name "ganon_room_9"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_9.o"
- number 3
-endseg
-
-beginseg
- name "ganon_boss_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_boss/ganon_boss_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_boss_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_boss/ganon_boss_room_0.o"
- number 3
-endseg
-
-beginseg
- name "jyasinboss_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_scene.o"
- number 2
-endseg
-
-beginseg
- name "jyasinboss_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_0.o"
- number 3
-endseg
-
-beginseg
- name "jyasinboss_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_1.o"
- number 3
-endseg
-
-beginseg
- name "jyasinboss_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_2.o"
- number 3
-endseg
-
-beginseg
- name "jyasinboss_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_3.o"
- number 3
-endseg
-
-beginseg
- name "kokiri_home4_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home4/kokiri_home4_scene.o"
- number 2
-endseg
-
-beginseg
- name "kokiri_home4_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home4/kokiri_home4_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kokiri_home5_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home5/kokiri_home5_scene.o"
- number 2
-endseg
-
-beginseg
- name "kokiri_home5_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home5/kokiri_home5_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganon_final_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_final/ganon_final_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_final_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_final/ganon_final_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kakariko3_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakariko3/kakariko3_scene.o"
- number 2
-endseg
-
-beginseg
- name "kakariko3_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kakariko3/kakariko3_room_0.o"
- number 3
-endseg
-
-#if OOT_DEBUG
-beginseg
- name "hairal_niwa2_scene"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa2/hairal_niwa2_scene.o"
- number 2
-endseg
-
-beginseg
- name "hairal_niwa2_room_0"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa2/hairal_niwa2_room_0.o"
- number 3
-endseg
-#endif
-
-beginseg
- name "hakasitarelay_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_scene.o"
- number 2
-endseg
-
-beginseg
- name "hakasitarelay_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_1.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_2.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_3.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_4.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_5.o"
- number 3
-endseg
-
-beginseg
- name "hakasitarelay_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_6.o"
- number 3
-endseg
-
-beginseg
- name "shrine_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine/shrine_scene.o"
- number 2
-endseg
-
-beginseg
- name "shrine_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine/shrine_room_0.o"
- number 3
-endseg
-
-beginseg
- name "turibori_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/turibori/turibori_scene.o"
- number 2
-endseg
-
-beginseg
- name "turibori_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/turibori/turibori_room_0.o"
- number 3
-endseg
-
-beginseg
- name "shrine_n_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine_n/shrine_n_scene.o"
- number 2
-endseg
-
-beginseg
- name "shrine_n_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine_n/shrine_n_room_0.o"
- number 3
-endseg
-
-beginseg
- name "shrine_r_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine_r/shrine_r_scene.o"
- number 2
-endseg
-
-beginseg
- name "shrine_r_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/shrine_r/shrine_r_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hakaana2_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana2/hakaana2_scene.o"
- number 2
-endseg
-
-beginseg
- name "hakaana2_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana2/hakaana2_room_0.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_scene.o"
- number 2
-endseg
-
-beginseg
- name "gerudoway_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_0.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_1.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_2.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_3.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_4.o"
- number 3
-endseg
-
-beginseg
- name "gerudoway_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_5.o"
- number 3
-endseg
-
-beginseg
- name "hairal_niwa_n_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa_n/hairal_niwa_n_scene.o"
- number 2
-endseg
-
-beginseg
- name "hairal_niwa_n_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa_n/hairal_niwa_n_room_0.o"
- number 3
-endseg
-
-beginseg
- name "bowling_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/bowling/bowling_scene.o"
- number 2
-endseg
-
-beginseg
- name "bowling_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/bowling/bowling_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hakaana_ouke_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_scene.o"
- number 2
-endseg
-
-beginseg
- name "hakaana_ouke_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_0.o"
- number 3
-endseg
-
-beginseg
- name "hakaana_ouke_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_1.o"
- number 3
-endseg
-
-beginseg
- name "hakaana_ouke_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_2.o"
- number 3
-endseg
-
-beginseg
- name "hylia_labo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hylia_labo/hylia_labo_scene.o"
- number 2
-endseg
-
-beginseg
- name "hylia_labo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/hylia_labo/hylia_labo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "souko_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_scene.o"
- number 2
-endseg
-
-beginseg
- name "souko_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_0.o"
- number 3
-endseg
-
-beginseg
- name "souko_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_1.o"
- number 3
-endseg
-
-beginseg
- name "souko_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_2.o"
- number 3
-endseg
-
-beginseg
- name "miharigoya_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/miharigoya/miharigoya_scene.o"
- number 2
-endseg
-
-beginseg
- name "miharigoya_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/miharigoya/miharigoya_room_0.o"
- number 3
-endseg
-
-beginseg
- name "mahouya_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/mahouya/mahouya_scene.o"
- number 2
-endseg
-
-beginseg
- name "mahouya_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/mahouya/mahouya_room_0.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_scene.o"
- number 2
-endseg
-
-beginseg
- name "takaraya_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_0.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_1.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_2.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_3.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_4.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_5"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_5.o"
- number 3
-endseg
-
-beginseg
- name "takaraya_room_6"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_6.o"
- number 3
-endseg
-
-beginseg
- name "ganon_sonogo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_sonogo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganon_sonogo_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_1.o"
- number 3
-endseg
-
-beginseg
- name "ganon_sonogo_room_2"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_2.o"
- number 3
-endseg
-
-beginseg
- name "ganon_sonogo_room_3"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_3.o"
- number 3
-endseg
-
-beginseg
- name "ganon_sonogo_room_4"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_4.o"
- number 3
-endseg
-
-beginseg
- name "ganon_demo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_demo/ganon_demo_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganon_demo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_demo/ganon_demo_room_0.o"
- number 3
-endseg
-
-#if OOT_DEBUG
-beginseg
- name "besitu_scene"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/besitu/besitu_scene.o"
- number 2
-endseg
-
-beginseg
- name "besitu_room_0"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/besitu/besitu_room_0.o"
- number 3
-endseg
-#endif
-
-beginseg
- name "face_shop_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/face_shop/face_shop_scene.o"
- number 2
-endseg
-
-beginseg
- name "face_shop_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/shops/face_shop/face_shop_room_0.o"
- number 3
-endseg
-
-beginseg
- name "kinsuta_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kinsuta/kinsuta_scene.o"
- number 2
-endseg
-
-beginseg
- name "kinsuta_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/misc/kinsuta/kinsuta_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganontikasonogo_scene"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_scene.o"
- number 2
-endseg
-
-beginseg
- name "ganontikasonogo_room_0"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_room_0.o"
- number 3
-endseg
-
-beginseg
- name "ganontikasonogo_room_1"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_room_1.o"
- number 3
-endseg
-
-#if OOT_DEBUG
-beginseg
- name "test01_scene"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/test01/test01_scene.o"
- number 2
-endseg
-
-beginseg
- name "test01_room_0"
- romalign 0x1000
- include "$(BUILD_DIR)/assets/scenes/test_levels/test01/test01_room_0.o"
- number 3
-endseg
-#endif
-
-#endif
-
-beginseg
- name "bump_texture_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/bump_texture_static.o"
-endseg
-
-beginseg
- name "anime_model_1_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_model_1_static.o"
-endseg
-
-beginseg
- name "anime_model_2_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_model_2_static.o"
-endseg
-
-beginseg
- name "anime_model_3_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_model_3_static.o"
-endseg
-
-beginseg
- name "anime_model_4_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_model_4_static.o"
-endseg
-
-beginseg
- name "anime_model_5_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_model_5_static.o"
-endseg
-
-beginseg
- name "anime_model_6_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_model_6_static.o"
-endseg
-
-beginseg
- name "anime_texture_1_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_texture_1_static.o"
-endseg
-
-beginseg
- name "anime_texture_2_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_texture_2_static.o"
-endseg
-
-beginseg
- name "anime_texture_3_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_texture_3_static.o"
-endseg
-
-beginseg
- name "anime_texture_4_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_texture_4_static.o"
-endseg
-
-beginseg
- name "anime_texture_5_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_texture_5_static.o"
-endseg
-
-beginseg
- name "anime_texture_6_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/anime_texture_6_static.o"
-endseg
-
-beginseg
- name "softsprite_matrix_static"
- compress
- romalign 0x1000
- include "$(BUILD_DIR)/baserom/softsprite_matrix_static.o"
-endseg
diff --git a/spec/boot_libultra_gc.inc b/spec/boot_libultra_gc.inc
new file mode 100644
index 0000000000..963e47215e
--- /dev/null
+++ b/spec/boot_libultra_gc.inc
@@ -0,0 +1,92 @@
+ include "$(BUILD_DIR)/src/libultra/io/piacs.o"
+ include "$(BUILD_DIR)/src/libultra/os/sendmesg.o"
+ include "$(BUILD_DIR)/src/libultra/os/stopthread.o"
+ include "$(BUILD_DIR)/src/libultra/io/viextendvstart.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallan1.o"
+ include "$(BUILD_DIR)/src/libultra/os/recvmesg.o"
+ include "$(BUILD_DIR)/src/libultra/os/initialize.o"
+ include "$(BUILD_DIR)/src/libultra/libc/ll.o"
+ include "$(BUILD_DIR)/src/libultra/os/exceptasm.o"
+ include "$(BUILD_DIR)/src/libultra/os/thread.o"
+ include "$(BUILD_DIR)/src/libultra/os/destroythread.o"
+ include "$(BUILD_DIR)/src/libultra/libc/bzero.o"
+ include "$(BUILD_DIR)/src/libultra/os/parameters.o"
+ include "$(BUILD_DIR)/src/libultra/os/createthread.o"
+ include "$(BUILD_DIR)/src/libultra/os/setsr.o"
+ include "$(BUILD_DIR)/src/libultra/os/getsr.o"
+ include "$(BUILD_DIR)/src/libultra/os/writebackdcache.o"
+ include "$(BUILD_DIR)/src/libultra/io/vigetnextframebuf.o"
+ include "$(BUILD_DIR)/src/libultra/io/pimgr.o"
+ include "$(BUILD_DIR)/src/libultra/os/kdebugserver.o"
+ include "$(BUILD_DIR)/src/libultra/io/devmgr.o"
+ include "$(BUILD_DIR)/src/libultra/io/pirawdma.o"
+ include "$(BUILD_DIR)/src/libultra/os/virtualtophysical.o"
+ include "$(BUILD_DIR)/src/libultra/io/viblack.o"
+ include "$(BUILD_DIR)/src/libultra/io/sirawread.o"
+ include "$(BUILD_DIR)/src/libultra/os/getthreadid.o"
+ include "$(BUILD_DIR)/src/libultra/os/setintmask.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetmode.o"
+ include "$(BUILD_DIR)/src/libultra/os/probetlb.o"
+ include "$(BUILD_DIR)/src/libultra/os/getmemsize.o"
+ include "$(BUILD_DIR)/src/libultra/os/seteventmesg.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/libc/xprintf.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/os/unmaptlball.o"
+ include "$(BUILD_DIR)/src/libultra/io/epidma.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/libc/string.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/os/invalicache.o"
+ include "$(BUILD_DIR)/src/libultra/os/createmesgqueue.o"
+ include "$(BUILD_DIR)/src/libultra/os/invaldcache.o"
+ include "$(BUILD_DIR)/src/libultra/io/si.o"
+ include "$(BUILD_DIR)/src/libultra/os/jammesg.o"
+ include "$(BUILD_DIR)/src/libultra/os/setthreadpri.o"
+ include "$(BUILD_DIR)/src/libultra/os/getthreadpri.o"
+ include "$(BUILD_DIR)/src/libultra/io/epirawread.o"
+ include "$(BUILD_DIR)/src/libultra/io/viswapbuf.o"
+ include "$(BUILD_DIR)/src/libultra/io/epirawdma.o"
+ include "$(BUILD_DIR)/src/libultra/libc/bcmp.o"
+ include "$(BUILD_DIR)/src/libultra/os/gettime.o"
+ include "$(BUILD_DIR)/src/libultra/os/timerintr.o"
+ include "$(BUILD_DIR)/src/libultra/os/getcount.o"
+ include "$(BUILD_DIR)/src/libultra/os/setglobalintmask.o"
+ include "$(BUILD_DIR)/src/libultra/os/setcompare.o"
+ include "$(BUILD_DIR)/src/libultra/libc/bcopy.o"
+ include "$(BUILD_DIR)/src/libultra/os/resetglobalintmask.o"
+ include "$(BUILD_DIR)/src/libultra/os/interrupt.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vi.o"
+ include "$(BUILD_DIR)/src/libultra/io/viswapcontext.o"
+ include "$(BUILD_DIR)/src/libultra/io/pigetcmdq.o"
+ include "$(BUILD_DIR)/src/libultra/io/epiread.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetspecial.o"
+ include "$(BUILD_DIR)/src/libultra/io/cartrominit.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/os/setfpccsr.o"
+ include "$(BUILD_DIR)/src/libultra/os/getfpccsr.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/epiwrite.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/os/maptlbrdb.o"
+ include "$(BUILD_DIR)/src/libultra/os/yieldthread.o"
+ include "$(BUILD_DIR)/src/libultra/os/getcause.o"
+ include "$(BUILD_DIR)/src/libultra/io/epirawwrite.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/libc/xlitob.o"
+ include "$(BUILD_DIR)/src/libultra/libc/ldiv.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xldtob.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/sirawwrite.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimgr.o"
+ include "$(BUILD_DIR)/src/libultra/io/vigetcurrcontext.o"
+ include "$(BUILD_DIR)/src/libultra/os/startthread.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetyscale.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetxscale.o"
+ include "$(BUILD_DIR)/src/libultra/os/sethwintrroutine.o"
+ include "$(BUILD_DIR)/src/libultra/os/gethwintrroutine.o"
+ include "$(BUILD_DIR)/src/libultra/os/setwatchlo.o"
diff --git a/spec/boot_libultra_ique.inc b/spec/boot_libultra_ique.inc
new file mode 100644
index 0000000000..ac943b2268
--- /dev/null
+++ b/spec/boot_libultra_ique.inc
@@ -0,0 +1,73 @@
+ include "$(BUILD_DIR)/src/libultra/os/invaldcache.o"
+ include "$(BUILD_DIR)/src/libultra/os/invalicache.o"
+ include "$(BUILD_DIR)/src/libultra/libc/bcmp.o"
+ include "$(BUILD_DIR)/src/libultra/libc/bzero.o"
+ include "$(BUILD_DIR)/src/libultra/os/createmesgqueue.o"
+ include "$(BUILD_DIR)/src/libultra/os/recvmesg.o"
+ include "$(BUILD_DIR)/src/libultra/os/sendmesg.o"
+ include "$(BUILD_DIR)/src/libultra/os/getfpccsr.o"
+ include "$(BUILD_DIR)/src/libultra/os/getsr.o"
+ include "$(BUILD_DIR)/src/libultra/os/setfpccsr.o"
+ include "$(BUILD_DIR)/src/libultra/os/setsr.o"
+ include "$(BUILD_DIR)/src/libultra/os/createthread.o"
+ include "$(BUILD_DIR)/src/libultra/os/setthreadpri.o"
+ include "$(BUILD_DIR)/src/libultra/os/startthread.o"
+ include "$(BUILD_DIR)/src/libultra/os/stopthread.o"
+ include "$(BUILD_DIR)/src/libultra/os/thread.o"
+ include "$(BUILD_DIR)/src/libultra/os/gettime.o"
+ include "$(BUILD_DIR)/src/libultra/os/timerintr.o"
+ include "$(BUILD_DIR)/src/libultra/io/vigetnextframebuf.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimgr.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetmode.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetspecial.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetxscale.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetyscale.o"
+ include "$(BUILD_DIR)/src/libultra/io/viswapbuf.o"
+ include "$(BUILD_DIR)/src/libultra/io/viswapcontext.o"
+ include "$(BUILD_DIR)/src/libultra/io/viblack.o"
+ include "$(BUILD_DIR)/src/libultra/io/viextendvstart.o"
+ include "$(BUILD_DIR)/src/libultra/os/exceptasm.o"
+ include "$(BUILD_DIR)/src/libultra/os/interrupt.o"
+ include "$(BUILD_DIR)/src/libultra/os/setintmask.o"
+ include "$(BUILD_DIR)/src/libultra/os/sethwintrroutine.o"
+ include "$(BUILD_DIR)/src/libultra/os/gethwintrroutine.o"
+ include "$(BUILD_DIR)/src/libultra/io/pimgr.o"
+ include "$(BUILD_DIR)/src/libultra/os/kdebugserver.o"
+ include "$(BUILD_DIR)/src/libultra/io/epirawdma.o"
+ include "$(BUILD_DIR)/src/libultra/io/epiread.o"
+ include "$(BUILD_DIR)/src/libultra/io/epidma.o"
+ include "$(BUILD_DIR)/src/libultra/io/cartrominit.o"
+ include "$(BUILD_DIR)/src/libultra/io/devmgr.o"
+ include "$(BUILD_DIR)/src/libultra/io/piacs.o"
+ include "$(BUILD_DIR)/src/libultra/os/parameters.o"
+ include "$(BUILD_DIR)/src/libultra/os/getmemsize.o"
+ include "$(BUILD_DIR)/src/libultra/os/initialize.o"
+ include "$(BUILD_DIR)/src/libultra/os/writebackdcache.o"
+ include "$(BUILD_DIR)/src/libultra/os/virtualtophysical.o"
+ include "$(BUILD_DIR)/src/libultra/libc/bcopy.o"
+ include "$(BUILD_DIR)/src/libultra/os/jammesg.o"
+ include "$(BUILD_DIR)/src/libultra/os/seteventmesg.o"
+ include "$(BUILD_DIR)/src/libultra/os/getcause.o"
+ include "$(BUILD_DIR)/src/libultra/os/setwatchlo.o"
+ include "$(BUILD_DIR)/src/libultra/reg/_getcount.o"
+ include "$(BUILD_DIR)/src/libultra/reg/_setcompare.o"
+ include "$(BUILD_DIR)/src/libultra/io/sirawread.o"
+ include "$(BUILD_DIR)/src/libultra/io/sirawwrite.o"
+ include "$(BUILD_DIR)/src/libultra/os/destroythread.o"
+ include "$(BUILD_DIR)/src/libultra/os/getthreadpri.o"
+ include "$(BUILD_DIR)/src/libultra/os/yieldthread.o"
+ include "$(BUILD_DIR)/src/libultra/os/probetlb.o"
+ include "$(BUILD_DIR)/src/libultra/os/maptlbrdb.o"
+ include "$(BUILD_DIR)/src/libultra/os/unmaptlball.o"
+ include "$(BUILD_DIR)/src/libultra/io/vi.o"
+ include "$(BUILD_DIR)/src/libultra/io/vigetcurrcontext.o"
+ include "$(BUILD_DIR)/src/libultra/os/setglobalintmask.o"
+ include "$(BUILD_DIR)/src/libultra/os/resetglobalintmask.o"
+ include "$(BUILD_DIR)/src/libultra/io/pirawdma.o"
+ include "$(BUILD_DIR)/src/libultra/io/pigetcmdq.o"
+ include "$(BUILD_DIR)/src/libultra/io/epirawread.o"
+ include "$(BUILD_DIR)/src/libultra/io/epirawwrite.o"
+ include "$(BUILD_DIR)/src/libultra/io/si.o"
diff --git a/spec/boot_libultra_n64.inc b/spec/boot_libultra_n64.inc
new file mode 100644
index 0000000000..70c7d373a6
--- /dev/null
+++ b/spec/boot_libultra_n64.inc
@@ -0,0 +1,95 @@
+ include "$(BUILD_DIR)/src/libultra/io/piacs.o"
+ include "$(BUILD_DIR)/src/libultra/os/sendmesg.o"
+ include "$(BUILD_DIR)/src/libultra/os/stopthread.o"
+#if OOT_VERSION >= PAL_1_0
+ include "$(BUILD_DIR)/src/libultra/io/viextendvstart.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallan1.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/os/recvmesg.o"
+ include "$(BUILD_DIR)/src/libultra/libc/ll.o"
+ include "$(BUILD_DIR)/src/libultra/os/exceptasm.o"
+ include "$(BUILD_DIR)/src/libultra/os/thread.o"
+ include "$(BUILD_DIR)/src/libultra/os/destroythread.o"
+ include "$(BUILD_DIR)/src/libultra/libc/bzero.o"
+ include "$(BUILD_DIR)/src/libultra/os/createthread.o"
+ include "$(BUILD_DIR)/src/libultra/os/initialize.o"
+ include "$(BUILD_DIR)/src/libultra/os/parameters.o"
+ include "$(BUILD_DIR)/src/libultra/os/setsr.o"
+ include "$(BUILD_DIR)/src/libultra/os/getsr.o"
+ include "$(BUILD_DIR)/src/libultra/os/writebackdcache.o"
+ include "$(BUILD_DIR)/src/libultra/io/vigetnextframebuf.o"
+ include "$(BUILD_DIR)/src/libultra/io/pimgr.o"
+ include "$(BUILD_DIR)/src/libultra/os/kdebugserver.o"
+ include "$(BUILD_DIR)/src/libultra/io/devmgr.o"
+ include "$(BUILD_DIR)/src/libultra/io/pirawdma.o"
+ include "$(BUILD_DIR)/src/libultra/os/virtualtophysical.o"
+ include "$(BUILD_DIR)/src/libultra/io/viblack.o"
+ include "$(BUILD_DIR)/src/libultra/io/sirawread.o"
+ include "$(BUILD_DIR)/src/libultra/os/getthreadid.o"
+ include "$(BUILD_DIR)/src/libultra/os/setintmask.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetmode.o"
+ include "$(BUILD_DIR)/src/libultra/os/probetlb.o"
+ include "$(BUILD_DIR)/src/libultra/os/getmemsize.o"
+ include "$(BUILD_DIR)/src/libultra/os/seteventmesg.o"
+ include "$(BUILD_DIR)/src/libultra/os/unmaptlball.o"
+ include "$(BUILD_DIR)/src/libultra/io/epidma.o"
+ include "$(BUILD_DIR)/src/libultra/os/invalicache.o"
+ include "$(BUILD_DIR)/src/libultra/os/createmesgqueue.o"
+ include "$(BUILD_DIR)/src/libultra/os/invaldcache.o"
+ include "$(BUILD_DIR)/src/libultra/io/si.o"
+ include "$(BUILD_DIR)/src/libultra/os/jammesg.o"
+ include "$(BUILD_DIR)/src/libultra/os/setthreadpri.o"
+ include "$(BUILD_DIR)/src/libultra/os/getthreadpri.o"
+ include "$(BUILD_DIR)/src/libultra/io/epirawread.o"
+#if OOT_VERSION >= PAL_1_0
+ include "$(BUILD_DIR)/src/libultra/io/viswapbuf.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/epirawdma.o"
+ include "$(BUILD_DIR)/src/libultra/os/gettime.o"
+ include "$(BUILD_DIR)/src/libultra/os/timerintr.o"
+ include "$(BUILD_DIR)/src/libultra/os/getcount.o"
+ include "$(BUILD_DIR)/src/libultra/os/setglobalintmask.o"
+ include "$(BUILD_DIR)/src/libultra/os/setcompare.o"
+ include "$(BUILD_DIR)/src/libultra/libc/bcopy.o"
+ include "$(BUILD_DIR)/src/libultra/os/resetglobalintmask.o"
+ include "$(BUILD_DIR)/src/libultra/os/interrupt.o"
+#if OOT_NTSC
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallan1.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/vi.o"
+#if OOT_PAL
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallan1.o"
+#endif
+#if OOT_VERSION < PAL_1_0
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallan1.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/viswapcontext.o"
+ include "$(BUILD_DIR)/src/libultra/io/pigetcmdq.o"
+ include "$(BUILD_DIR)/src/libultra/io/epiread.o"
+#if OOT_VERSION >= PAL_1_0
+ include "$(BUILD_DIR)/src/libultra/io/visetspecial.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/cartrominit.o"
+#if OOT_PAL
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/os/setfpccsr.o"
+ include "$(BUILD_DIR)/src/libultra/os/getfpccsr.o"
+ include "$(BUILD_DIR)/src/libultra/io/epiwrite.o"
+ include "$(BUILD_DIR)/src/libultra/os/maptlbrdb.o"
+ include "$(BUILD_DIR)/src/libultra/os/yieldthread.o"
+ include "$(BUILD_DIR)/src/libultra/os/getcause.o"
+ include "$(BUILD_DIR)/src/libultra/io/epirawwrite.o"
+ include "$(BUILD_DIR)/src/libultra/os/settimer.o"
+ include "$(BUILD_DIR)/src/libultra/io/sirawwrite.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimgr.o"
+ include "$(BUILD_DIR)/src/libultra/io/vigetcurrcontext.o"
+ include "$(BUILD_DIR)/src/libultra/os/startthread.o"
+#if OOT_VERSION >= PAL_1_0
+ include "$(BUILD_DIR)/src/libultra/io/visetyscale.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetxscale.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/os/sethwintrroutine.o"
+ include "$(BUILD_DIR)/src/libultra/os/gethwintrroutine.o"
diff --git a/spec/code_libultra_gc.inc b/spec/code_libultra_gc.inc
new file mode 100644
index 0000000000..25839bc917
--- /dev/null
+++ b/spec/code_libultra_gc.inc
@@ -0,0 +1,95 @@
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/pfsfreeblocks.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/mgu/scale.o"
+ include "$(BUILD_DIR)/src/libultra/gu/sinf.o"
+ include "$(BUILD_DIR)/src/libultra/gu/sins.o"
+ include "$(BUILD_DIR)/src/libultra/io/sptask.o"
+ include "$(BUILD_DIR)/src/libultra/io/motor.o"
+ include "$(BUILD_DIR)/src/libultra/io/siacs.o"
+ include "$(BUILD_DIR)/src/libultra/io/controller.o"
+ include "$(BUILD_DIR)/src/libultra/io/contreaddata.o"
+ include "$(BUILD_DIR)/src/libultra/gu/perspective.o"
+ include "$(BUILD_DIR)/src/libultra/io/sprawdma.o"
+ include "$(BUILD_DIR)/src/libultra/io/sirawdma.o"
+ include "$(BUILD_DIR)/src/libultra/io/sptaskyield.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/pfsreadwritefile.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsgetstatus.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/mgu/mtxidentf.o"
+ include "$(BUILD_DIR)/src/libultra/gu/lookat.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/pfsallocatefile.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/os/stoptimer.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/contpfs.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/mtxl2f.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsfindfile.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/gu/sqrtf.o"
+ include "$(BUILD_DIR)/src/libultra/os/afterprenmi.o"
+ include "$(BUILD_DIR)/src/libultra/io/contquery.o"
+ include "$(BUILD_DIR)/src/libultra/gu/lookathil.o"
+#if !DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/libc/xprintf.o"
+ include "$(BUILD_DIR)/src/libultra/libc/string.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/sp.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/mtxident.o"
+ include "$(BUILD_DIR)/src/libultra/gu/position.o"
+ include "$(BUILD_DIR)/src/libultra/io/sptaskyielded.o"
+ include "$(BUILD_DIR)/src/libultra/gu/rotate.o"
+ include "$(BUILD_DIR)/src/libultra/io/aisetfreq.o"
+ include "$(BUILD_DIR)/src/libultra/os/getactivequeue.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/normalize.o"
+ include "$(BUILD_DIR)/src/libultra/io/dpgetstat.o"
+ include "$(BUILD_DIR)/src/libultra/io/dpsetstat.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/pfsdeletefile.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/gu/ortho.o"
+ include "$(BUILD_DIR)/src/libultra/gu/cosf.o"
+ include "$(BUILD_DIR)/src/libultra/gu/libm_vals.o"
+ include "$(BUILD_DIR)/src/libultra/gu/coss.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetevent.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/pfsisplug.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/gu/us2dex.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsselectbank.o"
+ include "$(BUILD_DIR)/src/libultra/io/contsetch.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/pfsfilestate.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsinitpak.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfschecker.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/aigetlen.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/translate.o"
+ include "$(BUILD_DIR)/src/libultra/io/contramwrite.o"
+#if !DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsgetstatus.o"
+ include "$(BUILD_DIR)/src/libultra/io/contpfs.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/contramread.o"
+ include "$(BUILD_DIR)/src/libultra/io/crc.o"
+#if !DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/io/pfsisplug.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/os/settimer.o"
+#if !DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libultra/libc/xldtob.o"
+ include "$(BUILD_DIR)/src/libultra/libc/ldiv.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xlitob.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/spgetstat.o"
+ include "$(BUILD_DIR)/src/libultra/io/spsetstat.o"
+ include "$(BUILD_DIR)/src/libultra/os/writebackdcacheall.o"
+ include "$(BUILD_DIR)/src/libultra/os/getcurrfaultedthread.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/mtxf2l.o"
+ include "$(BUILD_DIR)/src/libultra/libc/llcvt.o"
+ include "$(BUILD_DIR)/src/libultra/io/vigetcurrframebuf.o"
+ include "$(BUILD_DIR)/src/libultra/io/spsetpc.o"
+ include "$(BUILD_DIR)/src/libc/sqrt.o"
diff --git a/spec/code_libultra_ique.inc b/spec/code_libultra_ique.inc
new file mode 100644
index 0000000000..e99152cf98
--- /dev/null
+++ b/spec/code_libultra_ique.inc
@@ -0,0 +1,127 @@
+ include "$(BUILD_DIR)/src/libultra/io/aigetlen.o"
+ include "$(BUILD_DIR)/src/libultra/io/aisetfreq.o"
+ include "$(BUILD_DIR)/src/libultra/audio/sl.o"
+ include "$(BUILD_DIR)/src/libultra/audio/synthesizer.o"
+ include "$(BUILD_DIR)/src/libultra/audio/syndelete.o"
+ include "$(BUILD_DIR)/src/libultra/audio/synallocfx.o"
+ include "$(BUILD_DIR)/src/libultra/os/writebackdcacheall.o"
+ include "$(BUILD_DIR)/src/libultra/io/contquery.o"
+ include "$(BUILD_DIR)/src/libultra/io/contreaddata.o"
+ include "$(BUILD_DIR)/src/libultra/io/controller.o"
+ include "$(BUILD_DIR)/src/libultra/io/contsetch.o"
+ include "$(BUILD_DIR)/src/libultra/gu/sqrtf.o"
+ include "$(BUILD_DIR)/src/libultra/gu/cosf.o"
+ include "$(BUILD_DIR)/src/libultra/gu/coss.o"
+ include "$(BUILD_DIR)/src/libultra/gu/lookat.o"
+ include "$(BUILD_DIR)/src/libultra/gu/lookathil.o"
+ include "$(BUILD_DIR)/src/libultra/gu/ortho.o"
+ include "$(BUILD_DIR)/src/libultra/gu/perspective.o"
+ include "$(BUILD_DIR)/src/libultra/gu/position.o"
+ include "$(BUILD_DIR)/src/libultra/gu/sinf.o"
+ include "$(BUILD_DIR)/src/libultra/gu/sins.o"
+ include "$(BUILD_DIR)/src/libultra/gu/us2dex.o"
+ include "$(BUILD_DIR)/src/libultra/libc/ll.o"
+ include "$(BUILD_DIR)/src/libultra/libc/llcvt.o"
+ include "$(BUILD_DIR)/src/libultra/libc/string.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xprintf.o"
+ include "$(BUILD_DIR)/src/libultra/io/dpgetstat.o"
+ include "$(BUILD_DIR)/src/libultra/io/dpsetstat.o"
+ include "$(BUILD_DIR)/src/libultra/io/spgetstat.o"
+ include "$(BUILD_DIR)/src/libultra/io/spsetstat.o"
+ include "$(BUILD_DIR)/src/libultra/io/sptask.o"
+ include "$(BUILD_DIR)/src/libultra/io/sptaskyield.o"
+ include "$(BUILD_DIR)/src/libultra/io/sptaskyielded.o"
+ include "$(BUILD_DIR)/src/libultra/io/sirawdma.o"
+ include "$(BUILD_DIR)/src/libultra/io/siacs.o"
+ include "$(BUILD_DIR)/src/libultra/os/getthreadid.o"
+ include "$(BUILD_DIR)/src/libultra/os/getactivequeue.o"
+ include "$(BUILD_DIR)/src/libultra/os/settimer.o"
+ include "$(BUILD_DIR)/src/libultra/os/stoptimer.o"
+ include "$(BUILD_DIR)/src/libultra/io/vigetcurrframebuf.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetevent.o"
+ include "$(BUILD_DIR)/src/libultra/io/vitbl.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclpn1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclpf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclaf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclpn2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclpf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclan2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentsclaf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentschpn1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentschpf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentschan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentschaf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentschpn2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodentschpf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallpn1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallpf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallaf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallpn2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallpf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallan2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepallaf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepalhpn1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepalhpf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepalhan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepalhaf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepalhpn2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodepalhpf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallpn1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallpf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallaf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallpn2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallpf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallan2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempallaf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempalhpn1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempalhpf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempalhan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempalhaf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempalhpn2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodempalhpf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallpn1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallpf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallaf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallpn2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallpf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallan2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallaf2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpalhpn1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpalhpf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpalhan1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpalhaf1.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpalhpn2.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpalhpf2.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/mtxident.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/mtxidentf.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/mtxf2l.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/scale.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/translate.o"
+ include "$(BUILD_DIR)/src/libultra/gu/rotate.o"
+ include "$(BUILD_DIR)/src/libultra/os/getcurrfaultedthread.o"
+ include "$(BUILD_DIR)/src/libultra/bb/sk/skapi.o"
+#ifndef COMPILER_GCC
+ include "$(BUILD_DIR)/src/libultra/bb/sa/common.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/motor.o"
+ include "$(BUILD_DIR)/src/libultra/os/afterprenmi.o"
+ include "$(BUILD_DIR)/src/libultra/audio/drvrnew.o"
+ include "$(BUILD_DIR)/src/libultra/audio/load.o"
+ include "$(BUILD_DIR)/src/libultra/audio/auxbus.o"
+ include "$(BUILD_DIR)/src/libultra/audio/env.o"
+ include "$(BUILD_DIR)/src/libultra/audio/filter.o"
+ include "$(BUILD_DIR)/src/libultra/audio/mainbus.o"
+ include "$(BUILD_DIR)/src/libultra/audio/resample.o"
+ include "$(BUILD_DIR)/src/libultra/audio/reverb.o"
+ include "$(BUILD_DIR)/src/libultra/audio/save.o"
+ include "$(BUILD_DIR)/src/libultra/audio/heapalloc.o"
+ include "$(BUILD_DIR)/src/libultra/audio/copy.o"
+ include "$(BUILD_DIR)/src/libultra/gu/libm_vals.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xlitob.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xldtob.o"
+ include "$(BUILD_DIR)/src/libultra/io/sp.o"
+ include "$(BUILD_DIR)/src/libultra/io/spsetpc.o"
+ include "$(BUILD_DIR)/src/libultra/io/sprawdma.o"
+ include "$(BUILD_DIR)/src/libultra/mgu/normalize.o"
+ include "$(BUILD_DIR)/src/libultra/libc/ldiv.o"
diff --git a/spec/code_libultra_n64.inc b/spec/code_libultra_n64.inc
new file mode 100644
index 0000000000..7535025d1e
--- /dev/null
+++ b/spec/code_libultra_n64.inc
@@ -0,0 +1,72 @@
+ include "$(BUILD_DIR)/src/libultra/os/getintmask.o"
+ include "$(BUILD_DIR)/src/libultra/gu/scale.o"
+ include "$(BUILD_DIR)/src/libultra/gu/sinf.o"
+ include "$(BUILD_DIR)/src/libultra/gu/sins.o"
+ include "$(BUILD_DIR)/src/libultra/io/sptask.o"
+ include "$(BUILD_DIR)/src/libultra/io/motor.o"
+ include "$(BUILD_DIR)/src/libultra/io/siacs.o"
+ include "$(BUILD_DIR)/src/libultra/io/controller.o"
+ include "$(BUILD_DIR)/src/libultra/io/contreaddata.o"
+ include "$(BUILD_DIR)/src/libultra/gu/perspective.o"
+ include "$(BUILD_DIR)/src/libultra/io/sprawdma.o"
+ include "$(BUILD_DIR)/src/libultra/io/sirawdma.o"
+ include "$(BUILD_DIR)/src/libultra/io/sptaskyield.o"
+ include "$(BUILD_DIR)/src/libultra/gu/mtxutil.o"
+ include "$(BUILD_DIR)/src/libultra/gu/lookat.o"
+ include "$(BUILD_DIR)/src/libultra/os/stoptimer.o"
+ include "$(BUILD_DIR)/src/libultra/gu/sqrtf.o"
+ include "$(BUILD_DIR)/src/libultra/os/afterprenmi.o"
+ include "$(BUILD_DIR)/src/libultra/io/contquery.o"
+ include "$(BUILD_DIR)/src/libultra/gu/lookathil.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xprintf.o"
+ include "$(BUILD_DIR)/src/libultra/libc/string.o"
+ include "$(BUILD_DIR)/src/libultra/io/sp.o"
+#if OOT_VERSION < PAL_1_0
+ include "$(BUILD_DIR)/src/libultra/io/viswapbuf.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/gu/position.o"
+ include "$(BUILD_DIR)/src/libultra/io/sptaskyielded.o"
+ include "$(BUILD_DIR)/src/libultra/gu/rotate.o"
+ include "$(BUILD_DIR)/src/libultra/io/aisetfreq.o"
+ include "$(BUILD_DIR)/src/libultra/os/getactivequeue.o"
+ include "$(BUILD_DIR)/src/libultra/gu/normalize.o"
+ include "$(BUILD_DIR)/src/libultra/io/dpgetstat.o"
+ include "$(BUILD_DIR)/src/libultra/io/dpsetstat.o"
+ include "$(BUILD_DIR)/src/libultra/gu/ortho.o"
+ include "$(BUILD_DIR)/src/libultra/gu/cosf.o"
+ include "$(BUILD_DIR)/src/libultra/gu/libm_vals.o"
+#if OOT_VERSION < PAL_1_0
+ include "$(BUILD_DIR)/src/libultra/io/visetspecial.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/gu/coss.o"
+ include "$(BUILD_DIR)/src/libultra/os/settime.o"
+ include "$(BUILD_DIR)/src/libultra/io/visetevent.o"
+ include "$(BUILD_DIR)/src/libultra/gu/us2dex.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsselectbank.o"
+ include "$(BUILD_DIR)/src/libultra/io/contsetch.o"
+ include "$(BUILD_DIR)/src/libultra/io/aigetlen.o"
+ include "$(BUILD_DIR)/src/libultra/gu/translate.o"
+ include "$(BUILD_DIR)/src/libultra/io/contramwrite.o"
+#if OOT_VERSION == NTSC_1_2
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/pfsgetstatus.o"
+ include "$(BUILD_DIR)/src/libultra/io/contpfs.o"
+ include "$(BUILD_DIR)/src/libultra/libc/bcmp.o"
+ include "$(BUILD_DIR)/src/libultra/io/contramread.o"
+ include "$(BUILD_DIR)/src/libultra/io/crc.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsisplug.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xlitob.o"
+ include "$(BUILD_DIR)/src/libultra/libc/ldiv.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xldtob.o"
+ include "$(BUILD_DIR)/src/libultra/io/spgetstat.o"
+ include "$(BUILD_DIR)/src/libultra/io/spsetstat.o"
+ include "$(BUILD_DIR)/src/libultra/os/writebackdcacheall.o"
+ include "$(BUILD_DIR)/src/libultra/os/getcurrfaultedthread.o"
+ include "$(BUILD_DIR)/src/libultra/libc/llcvt.o"
+#if OOT_VERSION < PAL_1_0
+ include "$(BUILD_DIR)/src/libultra/io/visetyscale.o"
+#endif
+ include "$(BUILD_DIR)/src/libultra/io/vigetcurrframebuf.o"
+ include "$(BUILD_DIR)/src/libultra/io/spsetpc.o"
+ include "$(BUILD_DIR)/src/libc/sqrt.o"
diff --git a/spec/overlays_gc.inc b/spec/overlays_gc.inc
new file mode 100644
index 0000000000..27bbb72b04
--- /dev/null
+++ b/spec/overlays_gc.inc
@@ -0,0 +1,3240 @@
+beginseg
+ name "ovl_Arms_Hook"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arms_Hook/ovl_Arms_Hook_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Arrow_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Fire/ovl_Arrow_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Arrow_Ice"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Ice/ovl_Arrow_Ice_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Arrow_Light"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Light/ovl_Arrow_Light_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Bdan_Objects"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Objects/ovl_Bg_Bdan_Objects_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Bdan_Switch"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Switch/ovl_Bg_Bdan_Switch_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Bom_Guard"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bom_Guard/ovl_Bg_Bom_Guard_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Bombwall"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bombwall/ovl_Bg_Bombwall_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Bowl_Wall"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bowl_Wall/ovl_Bg_Bowl_Wall_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Breakwall"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Breakwall/ovl_Bg_Breakwall_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ddan_Jd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Jd/ovl_Bg_Ddan_Jd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ddan_Kd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Kd/ovl_Bg_Ddan_Kd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Dodoago"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dodoago/ovl_Bg_Dodoago_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Dy_Yoseizo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dy_Yoseizo/ovl_Bg_Dy_Yoseizo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ganon_Otyuka"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ganon_Otyuka/ovl_Bg_Ganon_Otyuka_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gate_Shutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gate_Shutter/ovl_Bg_Gate_Shutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gjyo_Bridge"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gjyo_Bridge/ovl_Bg_Gjyo_Bridge_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gnd_Darkmeiro"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/ovl_Bg_Gnd_Darkmeiro_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gnd_Firemeiro"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/ovl_Bg_Gnd_Firemeiro_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gnd_Iceblock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Iceblock/ovl_Bg_Gnd_Iceblock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gnd_Nisekabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/ovl_Bg_Gnd_Nisekabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gnd_Soulmeiro"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/ovl_Bg_Gnd_Soulmeiro_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka/ovl_Bg_Haka_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Gate"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Gate/ovl_Bg_Haka_Gate_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Huta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Huta/ovl_Bg_Haka_Huta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Megane"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Megane/ovl_Bg_Haka_Megane_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_MeganeBG"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_MeganeBG/ovl_Bg_Haka_MeganeBG_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Sgami"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Sgami/ovl_Bg_Haka_Sgami_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Ship"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Ship/ovl_Bg_Haka_Ship_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Trap"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Trap/ovl_Bg_Haka_Trap_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Tubo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Tubo/ovl_Bg_Haka_Tubo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Water"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Water/ovl_Bg_Haka_Water_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Zou"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Zou/ovl_Bg_Haka_Zou_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Heavy_Block"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Heavy_Block/ovl_Bg_Heavy_Block_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Curtain"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Curtain/ovl_Bg_Hidan_Curtain_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Dalm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Dalm/ovl_Bg_Hidan_Dalm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Firewall"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Firewall/ovl_Bg_Hidan_Firewall_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Fslift"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fslift/ovl_Bg_Hidan_Fslift_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Fwbig"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fwbig/ovl_Bg_Hidan_Fwbig_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Hamstep"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hamstep/ovl_Bg_Hidan_Hamstep_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Hrock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hrock/ovl_Bg_Hidan_Hrock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Kousi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kousi/ovl_Bg_Hidan_Kousi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Kowarerukabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/ovl_Bg_Hidan_Kowarerukabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Rock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rock/ovl_Bg_Hidan_Rock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Rsekizou"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/ovl_Bg_Hidan_Rsekizou_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Sekizou"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sekizou/ovl_Bg_Hidan_Sekizou_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Sima"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sima/ovl_Bg_Hidan_Sima_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Syoku"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Syoku/ovl_Bg_Hidan_Syoku_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ice_Objects"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Objects/ovl_Bg_Ice_Objects_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ice_Shelter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shelter/ovl_Bg_Ice_Shelter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ice_Shutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shutter/ovl_Bg_Ice_Shutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ice_Turara"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Turara/ovl_Bg_Ice_Turara_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ingate"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ingate/ovl_Bg_Ingate_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_1flift"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_1flift/ovl_Bg_Jya_1flift_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Amishutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Amishutter/ovl_Bg_Jya_Amishutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Bigmirror"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bigmirror/ovl_Bg_Jya_Bigmirror_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Block"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Block/ovl_Bg_Jya_Block_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Bombchuiwa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/ovl_Bg_Jya_Bombchuiwa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Bombiwa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombiwa/ovl_Bg_Jya_Bombiwa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Cobra"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Cobra/ovl_Bg_Jya_Cobra_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Goroiwa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Goroiwa/ovl_Bg_Jya_Goroiwa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Haheniron"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Haheniron/ovl_Bg_Jya_Haheniron_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Ironobj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Ironobj/ovl_Bg_Jya_Ironobj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Kanaami"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Kanaami/ovl_Bg_Jya_Kanaami_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Lift"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Lift/ovl_Bg_Jya_Lift_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Megami"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Megami/ovl_Bg_Jya_Megami_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Zurerukabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/ovl_Bg_Jya_Zurerukabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Menkuri_Eye"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Eye/ovl_Bg_Menkuri_Eye_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Menkuri_Kaiten"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/ovl_Bg_Menkuri_Kaiten_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Menkuri_Nisekabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/ovl_Bg_Menkuri_Nisekabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mizu_Bwall"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Bwall/ovl_Bg_Mizu_Bwall_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mizu_Movebg"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Movebg/ovl_Bg_Mizu_Movebg_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mizu_Shutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Shutter/ovl_Bg_Mizu_Shutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mizu_Uzu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Uzu/ovl_Bg_Mizu_Uzu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mizu_Water"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Water/ovl_Bg_Mizu_Water_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mjin"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mjin/ovl_Bg_Mjin_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Bigst"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Bigst/ovl_Bg_Mori_Bigst_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Elevator"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Elevator/ovl_Bg_Mori_Elevator_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Hashigo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashigo/ovl_Bg_Mori_Hashigo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Hashira4"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashira4/ovl_Bg_Mori_Hashira4_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Hineri"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hineri/ovl_Bg_Mori_Hineri_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Idomizu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Idomizu/ovl_Bg_Mori_Idomizu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Kaitenkabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/ovl_Bg_Mori_Kaitenkabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Rakkatenjo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/ovl_Bg_Mori_Rakkatenjo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Po_Event"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Event/ovl_Bg_Po_Event_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Po_Syokudai"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Syokudai/ovl_Bg_Po_Syokudai_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Pushbox"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Pushbox/ovl_Bg_Pushbox_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Relay_Objects"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Relay_Objects/ovl_Bg_Relay_Objects_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot00_Break"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Break/ovl_Bg_Spot00_Break_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot00_Hanebasi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/ovl_Bg_Spot00_Hanebasi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot01_Fusya"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Fusya/ovl_Bg_Spot01_Fusya_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot01_Idohashira"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idohashira/ovl_Bg_Spot01_Idohashira_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot01_Idomizu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idomizu/ovl_Bg_Spot01_Idomizu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot01_Idosoko"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idosoko/ovl_Bg_Spot01_Idosoko_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot01_Objects2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Objects2/ovl_Bg_Spot01_Objects2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot02_Objects"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot02_Objects/ovl_Bg_Spot02_Objects_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot03_Taki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot03_Taki/ovl_Bg_Spot03_Taki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot05_Soko"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot05_Soko/ovl_Bg_Spot05_Soko_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot06_Objects"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot06_Objects/ovl_Bg_Spot06_Objects_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot07_Taki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot07_Taki/ovl_Bg_Spot07_Taki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot08_Bakudankabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/ovl_Bg_Spot08_Bakudankabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot08_Iceblock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Iceblock/ovl_Bg_Spot08_Iceblock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot09_Obj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot09_Obj/ovl_Bg_Spot09_Obj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot11_Bakudankabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/ovl_Bg_Spot11_Bakudankabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot11_Oasis"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Oasis/ovl_Bg_Spot11_Oasis_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot12_Gate"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Gate/ovl_Bg_Spot12_Gate_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot12_Saku"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Saku/ovl_Bg_Spot12_Saku_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot15_Rrbox"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Rrbox/ovl_Bg_Spot15_Rrbox_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot15_Saku"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Saku/ovl_Bg_Spot15_Saku_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot16_Bombstone"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Bombstone/ovl_Bg_Spot16_Bombstone_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot16_Doughnut"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Doughnut/ovl_Bg_Spot16_Doughnut_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot17_Bakudankabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/ovl_Bg_Spot17_Bakudankabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot17_Funen"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Funen/ovl_Bg_Spot17_Funen_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot18_Basket"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Basket/ovl_Bg_Spot18_Basket_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot18_Futa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Futa/ovl_Bg_Spot18_Futa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot18_Obj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Obj/ovl_Bg_Spot18_Obj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot18_Shutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Shutter/ovl_Bg_Spot18_Shutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Sst_Floor"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Sst_Floor/ovl_Bg_Sst_Floor_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Toki_Hikari"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Hikari/ovl_Bg_Toki_Hikari_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Toki_Swd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/ovl_Bg_Toki_Swd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Treemouth"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/ovl_Bg_Treemouth_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Umajump"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Umajump/ovl_Bg_Umajump_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Vb_Sima"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Vb_Sima/ovl_Bg_Vb_Sima_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ydan_Hasi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Hasi/ovl_Bg_Ydan_Hasi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ydan_Maruta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Maruta/ovl_Bg_Ydan_Maruta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ydan_Sp"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Sp/ovl_Bg_Ydan_Sp_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Zg"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Zg/ovl_Bg_Zg_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Dodongo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Dodongo/ovl_Boss_Dodongo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Fd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd/ovl_Boss_Fd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Fd2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd2/ovl_Boss_Fd2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Ganon"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon/ovl_Boss_Ganon_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Ganon2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon2/ovl_Boss_Ganon2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Ganondrof"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganondrof/ovl_Boss_Ganondrof_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Goma"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Goma/ovl_Boss_Goma_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Mo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Mo/ovl_Boss_Mo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Sst"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Sst/ovl_Boss_Sst_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Tw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Tw/ovl_Boss_Tw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Va"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Va/z_boss_va.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Va/ovl_Boss_Va_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_6K"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_6K/z_demo_6k.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_6K/ovl_Demo_6K_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Du"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Du/z_demo_du.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Du/ovl_Demo_Du_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Ec"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ec/ovl_Demo_Ec_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Effect"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Effect/ovl_Demo_Effect_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Ext"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ext/ovl_Demo_Ext_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Geff"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Geff/ovl_Demo_Geff_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Gj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gj/ovl_Demo_Gj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Go"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Go/z_demo_go.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Go/ovl_Demo_Go_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Gt"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gt/ovl_Demo_Gt_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Ik"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ik/ovl_Demo_Ik_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Im"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Im/z_demo_im.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Im/ovl_Demo_Im_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Kankyo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/ovl_Demo_Kankyo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Kekkai"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kekkai/ovl_Demo_Kekkai_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Sa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Sa/ovl_Demo_Sa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Shd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Shd/ovl_Demo_Shd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Tre_Lgt"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Tre_Lgt/ovl_Demo_Tre_Lgt_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Ana"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Ana/z_door_ana.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Ana/ovl_Door_Ana_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Gerudo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Gerudo/ovl_Door_Gerudo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Killer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Killer/z_door_killer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Killer/ovl_Door_Killer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Shutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Shutter/ovl_Door_Shutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Toki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Toki/z_door_toki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Toki/ovl_Door_Toki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Warp1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Warp1/ovl_Door_Warp1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Efc_Erupc"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Efc_Erupc/ovl_Efc_Erupc_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Eff_Dust"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Dust/ovl_Eff_Dust_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Blast"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Blast/ovl_Effect_Ss_Blast_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Bomb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb/ovl_Effect_Ss_Bomb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Bomb2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb2/ovl_Effect_Ss_Bomb2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Bubble"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bubble/ovl_Effect_Ss_Bubble_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_D_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_D_Fire/ovl_Effect_Ss_D_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dead_Db"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Db/ovl_Effect_Ss_Dead_Db_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dead_Dd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/ovl_Effect_Ss_Dead_Dd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dead_Ds"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/ovl_Effect_Ss_Dead_Ds_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dead_Sound"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/ovl_Effect_Ss_Dead_Sound_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dt_Bubble"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/ovl_Effect_Ss_Dt_Bubble_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dust"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dust/ovl_Effect_Ss_Dust_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_En_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Fire/ovl_Effect_Ss_En_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_En_Ice"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Ice/ovl_Effect_Ss_En_Ice_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Extra"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Extra/ovl_Effect_Ss_Extra_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Fcircle"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fcircle/ovl_Effect_Ss_Fcircle_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Fhg_Flash"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/ovl_Effect_Ss_Fhg_Flash_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Fire_Tail"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/ovl_Effect_Ss_Fire_Tail_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Fire/ovl_Effect_Ss_G_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Magma"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma/ovl_Effect_Ss_G_Magma_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Magma2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma2/ovl_Effect_Ss_G_Magma2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Ripple"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Ripple/ovl_Effect_Ss_G_Ripple_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Spk"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Spk/ovl_Effect_Ss_G_Spk_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Splash"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Splash/ovl_Effect_Ss_G_Splash_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Hahen"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hahen/ovl_Effect_Ss_Hahen_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_HitMark"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_HitMark/ovl_Effect_Ss_HitMark_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Ice_Piece"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/ovl_Effect_Ss_Ice_Piece_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Ice_Smoke"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/ovl_Effect_Ss_Ice_Smoke_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_K_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_K_Fire/ovl_Effect_Ss_K_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Kakera"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kakera/ovl_Effect_Ss_Kakera_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_KiraKira"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_KiraKira/ovl_Effect_Ss_KiraKira_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Lightning"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Lightning/ovl_Effect_Ss_Lightning_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Sibuki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki/ovl_Effect_Ss_Sibuki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Sibuki2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki2/ovl_Effect_Ss_Sibuki2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Solder_Srch_Ball"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/ovl_Effect_Ss_Solder_Srch_Ball_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Stick"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stick/ovl_Effect_Ss_Stick_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Stone1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stone1/ovl_Effect_Ss_Stone1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Elf_Msg"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg/ovl_Elf_Msg_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Elf_Msg2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg2/ovl_Elf_Msg2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Am"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Am/z_en_am.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Am/ovl_En_Am_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ani"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ani/z_en_ani.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ani/ovl_En_Ani_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Anubice"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice/z_en_anubice.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice/ovl_En_Anubice_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Anubice_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Fire/ovl_En_Anubice_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Anubice_Tag"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Tag/ovl_En_Anubice_Tag_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Arow_Trap"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arow_Trap/ovl_En_Arow_Trap_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Arrow"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arrow/z_en_arrow.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arrow/ovl_En_Arrow_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Attack_Niw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Attack_Niw/ovl_En_Attack_Niw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ba"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ba/z_en_ba.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ba/ovl_En_Ba_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bb/z_en_bb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bb/ovl_En_Bb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bdfire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bdfire/ovl_En_Bdfire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bigokuta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigokuta/ovl_En_Bigokuta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bili"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bili/z_en_bili.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bili/ovl_En_Bili_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bird"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bird/z_en_bird.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bird/ovl_En_Bird_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Blkobj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Blkobj/ovl_En_Blkobj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bom"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom/z_en_bom.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom/ovl_En_Bom_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bom_Bowl_Man"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Man/ovl_En_Bom_Bowl_Man_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bom_Bowl_Pit"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Pit/ovl_En_Bom_Bowl_Pit_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bom_Chu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Chu/ovl_En_Bom_Chu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bombf"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombf/z_en_bombf.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombf/ovl_En_Bombf_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Boom"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boom/z_en_boom.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boom/ovl_En_Boom_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Box"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Box/z_en_box.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Box/ovl_En_Box_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Brob"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Brob/z_en_brob.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Brob/ovl_En_Brob_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bubble"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bubble/z_en_bubble.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bubble/ovl_En_Bubble_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Butte"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Butte/z_en_butte.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Butte/ovl_En_Butte_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bw/z_en_bw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bw/ovl_En_Bw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bx"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bx/z_en_bx.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bx/ovl_En_Bx_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Changer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Changer/z_en_changer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Changer/ovl_En_Changer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Clear_Tag"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Clear_Tag/ovl_En_Clear_Tag_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Cow"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cow/z_en_cow.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cow/ovl_En_Cow_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Crow"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Crow/z_en_crow.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Crow/ovl_En_Crow_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Cs"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cs/z_en_cs.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cs/ovl_En_Cs_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Daiku"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku/z_en_daiku.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku/ovl_En_Daiku_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Daiku_Kakariko"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku_Kakariko/ovl_En_Daiku_Kakariko_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dekubaba"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekubaba/ovl_En_Dekubaba_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dekunuts"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekunuts/ovl_En_Dekunuts_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dh"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dh/z_en_dh.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dh/ovl_En_Dh_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dha"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dha/z_en_dha.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dha/ovl_En_Dha_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Diving_Game"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Diving_Game/ovl_En_Diving_Game_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dns"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dns/z_en_dns.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dns/ovl_En_Dns_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dnt_Demo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Demo/ovl_En_Dnt_Demo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dnt_Jiji"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Jiji/ovl_En_Dnt_Jiji_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dnt_Nomal"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Nomal/ovl_En_Dnt_Nomal_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dodojr"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodojr/ovl_En_Dodojr_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dodongo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodongo/ovl_En_Dodongo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dog"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dog/z_en_dog.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dog/ovl_En_Dog_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Door"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door/z_en_door.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door/ovl_En_Door_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ds"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ds/z_en_ds.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ds/ovl_En_Ds_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Du"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Du/z_en_du.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Du/ovl_En_Du_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dy_Extra"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dy_Extra/ovl_En_Dy_Extra_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Eg"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eg/z_en_eg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eg/ovl_En_Eg_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Eiyer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eiyer/ovl_En_Eiyer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Elf"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elf/z_en_elf.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elf/ovl_En_Elf_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Encount1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount1/z_en_encount1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount1/ovl_En_Encount1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Encount2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount2/z_en_encount2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount2/ovl_En_Encount2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ex_Item"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Item/ovl_En_Ex_Item_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ex_Ruppy"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Ruppy/ovl_En_Ex_Ruppy_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd/z_en_fd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd/ovl_En_Fd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fd_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd_Fire/ovl_En_Fd_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fhg_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fhg_Fire/ovl_En_Fhg_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fire_Rock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fire_Rock/ovl_En_Fire_Rock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Firefly"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly/z_en_firefly.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly/ovl_En_Firefly_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fish"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish/z_en_fish.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish/ovl_En_Fish_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Floormas"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Floormas/z_en_floormas.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Floormas/ovl_En_Floormas_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fr"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fr/z_en_fr.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fr/ovl_En_Fr_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu/z_en_fu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu/ovl_En_Fu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fw/z_en_fw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fw/ovl_En_Fw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fz"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fz/z_en_fz.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fz/ovl_En_Fz_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_G_Switch"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_G_Switch/ovl_En_G_Switch_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ganon_Mant"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Mant/ovl_En_Ganon_Mant_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ganon_Organ"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Organ/ovl_En_Ganon_Organ_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Gb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gb/z_en_gb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gb/ovl_En_Gb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ge1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge1/z_en_ge1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge1/ovl_En_Ge1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ge2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge2/z_en_ge2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge2/ovl_En_Ge2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ge3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge3/z_en_ge3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge3/ovl_En_Ge3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_GeldB"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GeldB/z_en_geldb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GeldB/ovl_En_GeldB_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_GirlA"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GirlA/z_en_girla.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GirlA/ovl_En_GirlA_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Gm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gm/z_en_gm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gm/ovl_En_Gm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Go"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go/z_en_go.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go/ovl_En_Go_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Go2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go2/z_en_go2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go2/ovl_En_Go2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Goma"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goma/z_en_goma.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goma/ovl_En_Goma_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Goroiwa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goroiwa/ovl_En_Goroiwa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Gs"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gs/z_en_gs.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gs/ovl_En_Gs_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Guest"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guest/z_en_guest.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guest/ovl_En_Guest_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Hata"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hata/z_en_hata.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hata/ovl_En_Hata_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Heishi1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi1/ovl_En_Heishi1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Heishi2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi2/ovl_En_Heishi2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Heishi3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi3/ovl_En_Heishi3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Heishi4"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi4/ovl_En_Heishi4_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Hintnuts"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hintnuts/ovl_En_Hintnuts_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Holl"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Holl/z_en_holl.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Holl/ovl_En_Holl_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Honotrap"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Honotrap/ovl_En_Honotrap_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse/z_en_horse.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse/ovl_En_Horse_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse_Game_Check"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Game_Check/ovl_En_Horse_Game_Check_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse_Ganon"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Ganon/ovl_En_Horse_Ganon_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse_Link_Child"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Link_Child/ovl_En_Horse_Link_Child_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse_Normal"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Normal/ovl_En_Horse_Normal_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse_Zelda"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Zelda/ovl_En_Horse_Zelda_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Hs"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs/z_en_hs.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs/ovl_En_Hs_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Hs2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs2/z_en_hs2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs2/ovl_En_Hs2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Hy"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hy/z_en_hy.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hy/ovl_En_Hy_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ice_Hono"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ice_Hono/ovl_En_Ice_Hono_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ik"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ik/z_en_ik.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ik/ovl_En_Ik_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_In"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_In/z_en_in.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_In/ovl_En_In_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Insect"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Insect/z_en_insect.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Insect/ovl_En_Insect_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ishi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ishi/z_en_ishi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ishi/ovl_En_Ishi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_It"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_It/z_en_it.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_It/ovl_En_It_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Jj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jj/z_en_jj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jj/ovl_En_Jj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Js"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Js/z_en_js.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Js/ovl_En_Js_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Jsjutan"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jsjutan/ovl_En_Jsjutan_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kakasi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi/ovl_En_Kakasi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kakasi2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi2/ovl_En_Kakasi2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kakasi3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi3/ovl_En_Kakasi3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kanban"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kanban/z_en_kanban.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kanban/ovl_En_Kanban_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Karebaba"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Karebaba/ovl_En_Karebaba_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ko"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ko/z_en_ko.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ko/ovl_En_Ko_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kusa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa/z_en_kusa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa/ovl_En_Kusa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kz"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kz/z_en_kz.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kz/ovl_En_Kz_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Light"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Light/z_en_light.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Light/ovl_En_Light_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Lightbox"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Lightbox/ovl_En_Lightbox_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_M_Fire1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Fire1/ovl_En_M_Fire1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_M_Thunder"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Thunder/ovl_En_M_Thunder_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ma1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma1/z_en_ma1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma1/ovl_En_Ma1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ma2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma2/z_en_ma2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma2/ovl_En_Ma2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ma3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma3/z_en_ma3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma3/ovl_En_Ma3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mag"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/z_en_mag.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/ovl_En_Mag_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mb/z_en_mb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mb/ovl_En_Mb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Md"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Md/z_en_md.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Md/ovl_En_Md_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mk"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mk/z_en_mk.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mk/ovl_En_Mk_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm/z_en_mm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm/ovl_En_Mm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mm2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm2/z_en_mm2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm2/ovl_En_Mm2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ms"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ms/z_en_ms.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ms/ovl_En_Ms_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mu/z_en_mu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mu/ovl_En_Mu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Nb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nb/z_en_nb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nb/ovl_En_Nb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Niw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw/z_en_niw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw/ovl_En_Niw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Niw_Girl"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Girl/ovl_En_Niw_Girl_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Niw_Lady"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Lady/ovl_En_Niw_Lady_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Nutsball"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nutsball/ovl_En_Nutsball_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Nwc"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nwc/z_en_nwc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nwc/ovl_En_Nwc_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ny"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ny/z_en_ny.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ny/ovl_En_Ny_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_OE2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_OE2/z_en_oe2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_OE2/ovl_En_OE2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Okarina_Effect"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Effect/ovl_En_Okarina_Effect_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Okarina_Tag"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/ovl_En_Okarina_Tag_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Okuta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okuta/z_en_okuta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okuta/ovl_En_Okuta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ossan"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ossan/z_en_ossan.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ossan/ovl_En_Ossan_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Owl"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Owl/z_en_owl.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Owl/ovl_En_Owl_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Part"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Part/z_en_part.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Part/ovl_En_Part_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Peehat"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Peehat/z_en_peehat.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Peehat/ovl_En_Peehat_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Po_Desert"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Desert/ovl_En_Po_Desert_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Po_Field"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Field/ovl_En_Po_Field_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Po_Relay"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Relay/ovl_En_Po_Relay_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Po_Sisters"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Sisters/ovl_En_Po_Sisters_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Poh"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Poh/z_en_poh.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Poh/ovl_En_Poh_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Pu_box"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pu_box/ovl_En_Pu_box_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Rd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rd/z_en_rd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rd/ovl_En_Rd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Reeba"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Reeba/z_en_reeba.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Reeba/ovl_En_Reeba_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_River_Sound"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_River_Sound/ovl_En_River_Sound_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Rl"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rl/z_en_rl.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rl/ovl_En_Rl_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Rr"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rr/z_en_rr.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rr/ovl_En_Rr_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ru1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru1/z_en_ru1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru1/ovl_En_Ru1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ru2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru2/z_en_ru2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru2/ovl_En_Ru2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Sa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sa/z_en_sa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sa/ovl_En_Sa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Sb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sb/z_en_sb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sb/ovl_En_Sb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Scene_Change"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scene_Change/ovl_En_Scene_Change_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Sda"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sda/z_en_sda.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sda/ovl_En_Sda_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Shopnuts"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Shopnuts/ovl_En_Shopnuts_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Si"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Si/z_en_si.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Si/ovl_En_Si_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Siofuki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Siofuki/ovl_En_Siofuki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Skb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skb/z_en_skb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skb/ovl_En_Skb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Skj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skj/z_en_skj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skj/ovl_En_Skj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Skjneedle"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skjneedle/ovl_En_Skjneedle_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ssh"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ssh/z_en_ssh.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ssh/ovl_En_Ssh_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_St"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_St/z_en_st.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_St/ovl_En_St_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Sth"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth/z_en_sth.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth/ovl_En_Sth_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Stream"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stream/z_en_stream.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stream/ovl_En_Stream_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Sw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sw/z_en_sw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sw/ovl_En_Sw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Syateki_Itm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Itm/ovl_En_Syateki_Itm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Syateki_Man"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Man/ovl_En_Syateki_Man_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Syateki_Niw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Niw/ovl_En_Syateki_Niw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ta/z_en_ta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ta/ovl_En_Ta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Takara_Man"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Takara_Man/ovl_En_Takara_Man_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tana"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tana/z_en_tana.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tana/ovl_En_Tana_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tg"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tg/z_en_tg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tg/ovl_En_Tg_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tite"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tite/z_en_tite.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tite/ovl_En_Tite_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tk"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tk/z_en_tk.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tk/ovl_En_Tk_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Torch"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch/z_en_torch.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch/ovl_En_Torch_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Torch2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch2/z_en_torch2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch2/ovl_En_Torch2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Toryo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Toryo/z_en_toryo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Toryo/ovl_En_Toryo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tp"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tp/z_en_tp.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tp/ovl_En_Tp_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tr"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tr/z_en_tr.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tr/ovl_En_Tr_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Trap"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trap/z_en_trap.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trap/ovl_En_Trap_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tubo_Trap"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tubo_Trap/ovl_En_Tubo_Trap_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Vali"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vali/z_en_vali.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vali/ovl_En_Vali_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Vase"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vase/z_en_vase.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vase/ovl_En_Vase_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Vb_Ball"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vb_Ball/ovl_En_Vb_Ball_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Viewer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Viewer/z_en_viewer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Viewer/ovl_En_Viewer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Vm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vm/z_en_vm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vm/ovl_En_Vm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wall_Tubo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wall_Tubo/ovl_En_Wall_Tubo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wallmas"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wallmas/ovl_En_Wallmas_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Weather_Tag"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weather_Tag/ovl_En_Weather_Tag_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Weiyer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weiyer/ovl_En_Weiyer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wf"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wf/z_en_wf.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wf/ovl_En_Wf_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wonder_Item"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Item/ovl_En_Wonder_Item_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wonder_Talk"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk/ovl_En_Wonder_Talk_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wonder_Talk2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk2/ovl_En_Wonder_Talk2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wood02"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wood02/z_en_wood02.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wood02/ovl_En_Wood02_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Xc"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Xc/z_en_xc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Xc/ovl_En_Xc_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Yabusame_Mark"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yabusame_Mark/ovl_En_Yabusame_Mark_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Yukabyun"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yukabyun/ovl_En_Yukabyun_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zf"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zf/z_en_zf.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zf/ovl_En_Zf_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zl1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/z_en_zl1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/ovl_En_Zl1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zl2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl2/z_en_zl2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl2/ovl_En_Zl2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zl3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl3/z_en_zl3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl3/ovl_En_Zl3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zl4"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl4/z_en_zl4.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl4/ovl_En_Zl4_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zo/z_en_zo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zo/ovl_En_Zo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_fHG"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_fHG/z_en_fhg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_fHG/ovl_En_fHG_reloc.o"
+endseg
+
+beginseg
+ name "ovl_End_Title"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_End_Title/z_end_title.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_End_Title/ovl_End_Title_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Fishing"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Fishing/z_fishing.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Fishing/ovl_Fishing_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Item_B_Heart"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/ovl_Item_B_Heart_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Item_Etcetera"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Etcetera/ovl_Item_Etcetera_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Item_Inbox"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Inbox/ovl_Item_Inbox_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Item_Ocarina"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Ocarina/ovl_Item_Ocarina_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Item_Shield"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Shield/z_item_shield.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Shield/ovl_Item_Shield_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Magic_Dark"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Dark/ovl_Magic_Dark_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Magic_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Fire/ovl_Magic_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Magic_Wind"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Wind/ovl_Magic_Wind_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Mir_Ray"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray/ovl_Mir_Ray_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Bean"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bean/ovl_Obj_Bean_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Blockstop"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Blockstop/ovl_Obj_Blockstop_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Bombiwa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bombiwa/ovl_Obj_Bombiwa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Comb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Comb/ovl_Obj_Comb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Dekujr"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dekujr/ovl_Obj_Dekujr_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Elevator"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Elevator/ovl_Obj_Elevator_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Hamishi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hamishi/ovl_Obj_Hamishi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Hana"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hana/ovl_Obj_Hana_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Hsblock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hsblock/ovl_Obj_Hsblock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Ice_Poly"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ice_Poly/ovl_Obj_Ice_Poly_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Kibako"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako/ovl_Obj_Kibako_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Kibako2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako2/ovl_Obj_Kibako2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Lift"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lift/ovl_Obj_Lift_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Lightswitch"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightswitch/ovl_Obj_Lightswitch_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Makekinsuta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makekinsuta/ovl_Obj_Makekinsuta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Makeoshihiki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makeoshihiki/ovl_Obj_Makeoshihiki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Mure"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure/ovl_Obj_Mure_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Mure2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure2/ovl_Obj_Mure2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Mure3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure3/ovl_Obj_Mure3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Oshihiki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Oshihiki/ovl_Obj_Oshihiki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Roomtimer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Switch"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Switch/ovl_Obj_Switch_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Syokudai"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Syokudai/ovl_Obj_Syokudai_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Timeblock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Timeblock/ovl_Obj_Timeblock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Tsubo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tsubo/ovl_Obj_Tsubo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Warp2block"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Warp2block/ovl_Obj_Warp2block_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Object_Kankyo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Object_Kankyo/ovl_Object_Kankyo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Spot"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Spot/ovl_Oceff_Spot_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Storm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Storm/ovl_Oceff_Storm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Wipe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe/ovl_Oceff_Wipe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Wipe2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe2/ovl_Oceff_Wipe2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Wipe3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Wipe4"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe4/ovl_Oceff_Wipe4_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Shot_Sun"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Shot_Sun/ovl_Shot_Sun_reloc.o"
+endseg
diff --git a/spec/overlays_n64_ique.inc b/spec/overlays_n64_ique.inc
new file mode 100644
index 0000000000..8c1905a5ad
--- /dev/null
+++ b/spec/overlays_n64_ique.inc
@@ -0,0 +1,3240 @@
+beginseg
+ name "ovl_En_GirlA"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GirlA/z_en_girla.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GirlA/ovl_En_GirlA_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Part"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Part/z_en_part.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Part/ovl_En_Part_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Light"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Light/z_en_light.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Light/ovl_En_Light_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Door"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door/z_en_door.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Door/ovl_En_Door_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Box"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Box/z_en_box.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Box/ovl_En_Box_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Poh"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Poh/z_en_poh.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Poh/ovl_En_Poh_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Okuta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okuta/z_en_okuta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okuta/ovl_En_Okuta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bom"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom/z_en_bom.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom/ovl_En_Bom_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wallmas"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wallmas/ovl_En_Wallmas_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dodongo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodongo/ovl_En_Dodongo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Firefly"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly/z_en_firefly.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Firefly/ovl_En_Firefly_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse/z_en_horse.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse/ovl_En_Horse_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Arrow"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arrow/z_en_arrow.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arrow/ovl_En_Arrow_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Elf"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elf/z_en_elf.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Elf/ovl_En_Elf_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Niw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw/z_en_niw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw/ovl_En_Niw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tite"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tite/z_en_tite.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tite/ovl_En_Tite_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Reeba"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Reeba/z_en_reeba.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Reeba/ovl_En_Reeba_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Peehat"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Peehat/z_en_peehat.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Peehat/ovl_En_Peehat_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Holl"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Holl/z_en_holl.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Holl/ovl_En_Holl_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Scene_Change"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Scene_Change/ovl_En_Scene_Change_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zf"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zf/z_en_zf.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zf/ovl_En_Zf_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Hata"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hata/z_en_hata.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hata/ovl_En_Hata_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Dodongo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Dodongo/ovl_Boss_Dodongo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Goma"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Goma/ovl_Boss_Goma_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zl1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/z_en_zl1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl1/ovl_En_Zl1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Viewer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Viewer/z_en_viewer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Viewer/ovl_En_Viewer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Goma"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goma/z_en_goma.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goma/ovl_En_Goma_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Pushbox"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Pushbox/ovl_Bg_Pushbox_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bubble"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bubble/z_en_bubble.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bubble/ovl_En_Bubble_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Shutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Shutter/ovl_Door_Shutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dodojr"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dodojr/ovl_En_Dodojr_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bdfire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bdfire/ovl_En_Bdfire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Boom"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boom/z_en_boom.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Boom/ovl_En_Boom_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Torch2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch2/z_en_torch2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch2/ovl_En_Torch2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bili"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bili/z_en_bili.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bili/ovl_En_Bili_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tp"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tp/z_en_tp.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tp/ovl_En_Tp_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_St"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_St/z_en_st.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_St/ovl_En_St_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bw/z_en_bw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bw/ovl_En_Bw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Eiyer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eiyer/ovl_En_Eiyer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_River_Sound"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_River_Sound/ovl_En_River_Sound_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse_Normal"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Normal/ovl_En_Horse_Normal_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ossan"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ossan/z_en_ossan.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ossan/ovl_En_Ossan_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Treemouth"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Treemouth/ovl_Bg_Treemouth_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Dodoago"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dodoago/ovl_Bg_Dodoago_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Dalm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Dalm/ovl_Bg_Hidan_Dalm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Hrock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hrock/ovl_Bg_Hidan_Hrock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse_Ganon"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Ganon/ovl_En_Horse_Ganon_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Rock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rock/ovl_Bg_Hidan_Rock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Rsekizou"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/ovl_Bg_Hidan_Rsekizou_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Sekizou"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sekizou/ovl_Bg_Hidan_Sekizou_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Sima"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Sima/ovl_Bg_Hidan_Sima_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Syoku"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Syoku/ovl_Bg_Hidan_Syoku_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Xc"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Xc/z_en_xc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Xc/ovl_En_Xc_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Curtain"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Curtain/ovl_Bg_Hidan_Curtain_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot00_Hanebasi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/ovl_Bg_Spot00_Hanebasi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mb/z_en_mb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mb/ovl_En_Mb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bombf"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombf/z_en_bombf.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bombf/ovl_En_Bombf_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Firewall"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Firewall/ovl_Bg_Hidan_Firewall_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Dy_Yoseizo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Dy_Yoseizo/ovl_Bg_Dy_Yoseizo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zl2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl2/z_en_zl2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl2/ovl_En_Zl2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Fslift"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fslift/ovl_Bg_Hidan_Fslift_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_OE2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_OE2/z_en_oe2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_OE2/ovl_En_OE2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ydan_Hasi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Hasi/ovl_Bg_Ydan_Hasi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ydan_Maruta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Maruta/ovl_Bg_Ydan_Maruta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Ganondrof"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganondrof/ovl_Boss_Ganondrof_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Am"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Am/z_en_am.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Am/ovl_En_Am_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dekubaba"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekubaba/ovl_En_Dekubaba_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_M_Fire1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Fire1/ovl_En_M_Fire1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_M_Thunder"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_M_Thunder/ovl_En_M_Thunder_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ddan_Jd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Jd/ovl_Bg_Ddan_Jd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Breakwall"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Breakwall/ovl_Bg_Breakwall_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Jj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jj/z_en_jj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jj/ovl_En_Jj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse_Zelda"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Zelda/ovl_En_Horse_Zelda_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ddan_Kd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ddan_Kd/ovl_Bg_Ddan_Kd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Warp1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Warp1/ovl_Door_Warp1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Syokudai"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Syokudai/ovl_Obj_Syokudai_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Item_B_Heart"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_B_Heart/ovl_Item_B_Heart_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dekunuts"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dekunuts/ovl_En_Dekunuts_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Menkuri_Kaiten"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/ovl_Bg_Menkuri_Kaiten_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Menkuri_Eye"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Eye/ovl_Bg_Menkuri_Eye_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Vali"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vali/z_en_vali.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vali/ovl_En_Vali_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mizu_Movebg"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Movebg/ovl_Bg_Mizu_Movebg_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mizu_Water"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Water/ovl_Bg_Mizu_Water_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Arms_Hook"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arms_Hook/ovl_Arms_Hook_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_fHG"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_fHG/z_en_fhg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_fHG/ovl_En_fHG_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Hineri"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hineri/ovl_Bg_Mori_Hineri_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bb/z_en_bb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bb/ovl_En_Bb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Toki_Hikari"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Hikari/ovl_Bg_Toki_Hikari_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Yukabyun"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yukabyun/ovl_En_Yukabyun_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Toki_Swd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Toki_Swd/ovl_Bg_Toki_Swd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fhg_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fhg_Fire/ovl_En_Fhg_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mjin"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mjin/ovl_Bg_Mjin_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Kousi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kousi/ovl_Bg_Hidan_Kousi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Toki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Toki/z_door_toki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Toki/ovl_Door_Toki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Hamstep"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Hamstep/ovl_Bg_Hidan_Hamstep_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bird"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bird/z_en_bird.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bird/ovl_En_Bird_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wood02"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wood02/z_en_wood02.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wood02/ovl_En_Wood02_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Lightbox"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Lightbox/ovl_En_Lightbox_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Pu_box"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Pu_box/ovl_En_Pu_box_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Trap"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trap/z_en_trap.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Trap/ovl_En_Trap_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Arow_Trap"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Arow_Trap/ovl_En_Arow_Trap_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Vase"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vase/z_en_vase.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vase/ovl_En_Vase_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ta/z_en_ta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ta/ovl_En_Ta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tk"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tk/z_en_tk.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tk/ovl_En_Tk_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Bigst"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Bigst/ovl_Bg_Mori_Bigst_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Elevator"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Elevator/ovl_Bg_Mori_Elevator_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Kaitenkabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/ovl_Bg_Mori_Kaitenkabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Rakkatenjo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/ovl_Bg_Mori_Rakkatenjo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Vm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vm/z_en_vm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vm/ovl_En_Vm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Effect"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Effect/ovl_Demo_Effect_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Kankyo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kankyo/ovl_Demo_Kankyo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Fwbig"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Fwbig/ovl_Bg_Hidan_Fwbig_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Floormas"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Floormas/z_en_floormas.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Floormas/ovl_En_Floormas_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Heishi1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi1/ovl_En_Heishi1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Rd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rd/z_en_rd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rd/ovl_En_Rd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Po_Sisters"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Sisters/ovl_En_Po_Sisters_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Heavy_Block"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Heavy_Block/ovl_Bg_Heavy_Block_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Po_Event"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Event/ovl_Bg_Po_Event_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Mure"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure/ovl_Obj_Mure_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Sw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sw/z_en_sw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sw/ovl_En_Sw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Fd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd/ovl_Boss_Fd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Object_Kankyo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Object_Kankyo/ovl_Object_Kankyo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Du"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Du/z_en_du.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Du/ovl_En_Du_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd/z_en_fd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd/ovl_En_Fd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse_Link_Child"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Link_Child/ovl_En_Horse_Link_Child_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Ana"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Ana/z_door_ana.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Ana/ovl_Door_Ana_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot02_Objects"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot02_Objects/ovl_Bg_Spot02_Objects_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka/ovl_Bg_Haka_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Magic_Wind"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Wind/ovl_Magic_Wind_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Magic_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Fire/ovl_Magic_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ru1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru1/z_en_ru1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru1/ovl_En_Ru1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Fd2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Fd2/ovl_Boss_Fd2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fd_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fd_Fire/ovl_En_Fd_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dh"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dh/z_en_dh.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dh/ovl_En_Dh_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dha"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dha/z_en_dha.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dha/ovl_En_Dha_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Rl"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rl/z_en_rl.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rl/ovl_En_Rl_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Encount1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount1/z_en_encount1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount1/ovl_En_Encount1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Du"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Du/z_demo_du.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Du/ovl_Demo_Du_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Im"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Im/z_demo_im.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Im/ovl_Demo_Im_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Tre_Lgt"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Tre_Lgt/ovl_Demo_Tre_Lgt_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fw/z_en_fw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fw/ovl_En_Fw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Vb_Sima"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Vb_Sima/ovl_Bg_Vb_Sima_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Vb_Ball"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Vb_Ball/ovl_En_Vb_Ball_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Megane"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Megane/ovl_Bg_Haka_Megane_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_MeganeBG"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_MeganeBG/ovl_Bg_Haka_MeganeBG_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Ship"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Ship/ovl_Bg_Haka_Ship_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Sgami"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Sgami/ovl_Bg_Haka_Sgami_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Heishi2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi2/ovl_En_Heishi2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Encount2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount2/z_en_encount2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Encount2/ovl_En_Encount2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fire_Rock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fire_Rock/ovl_En_Fire_Rock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Brob"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Brob/z_en_brob.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Brob/ovl_En_Brob_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Mir_Ray"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Mir_Ray/ovl_Mir_Ray_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot09_Obj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot09_Obj/ovl_Bg_Spot09_Obj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot18_Obj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Obj/ovl_Bg_Spot18_Obj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Va"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Va/z_boss_va.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Va/ovl_Boss_Va_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Tubo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Tubo/ovl_Bg_Haka_Tubo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Trap"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Trap/ovl_Bg_Haka_Trap_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Huta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Huta/ovl_Bg_Haka_Huta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Zou"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Zou/ovl_Bg_Haka_Zou_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot17_Funen"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Funen/ovl_Bg_Spot17_Funen_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Syateki_Itm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Itm/ovl_En_Syateki_Itm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Syateki_Man"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Man/ovl_En_Syateki_Man_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tana"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tana/z_en_tana.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tana/ovl_En_Tana_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Nb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nb/z_en_nb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nb/ovl_En_Nb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Mo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Mo/ovl_Boss_Mo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Sb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sb/z_en_sb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sb/ovl_En_Sb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bigokuta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bigokuta/ovl_En_Bigokuta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Karebaba"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Karebaba/ovl_En_Karebaba_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Bdan_Objects"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Objects/ovl_Bg_Bdan_Objects_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Sa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Sa/ovl_Demo_Sa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Go"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Go/z_demo_go.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Go/ovl_Demo_Go_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_In"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_In/z_en_in.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_In/ovl_En_In_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tr"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tr/z_en_tr.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tr/ovl_En_Tr_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot16_Bombstone"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Bombstone/ovl_Bg_Spot16_Bombstone_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Hidan_Kowarerukabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/ovl_Bg_Hidan_Kowarerukabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Bombwall"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bombwall/ovl_Bg_Bombwall_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ru2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru2/z_en_ru2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ru2/ovl_En_Ru2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Dekujr"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Dekujr/ovl_Obj_Dekujr_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mizu_Uzu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Uzu/ovl_Bg_Mizu_Uzu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot06_Objects"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot06_Objects/ovl_Bg_Spot06_Objects_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ice_Objects"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Objects/ovl_Bg_Ice_Objects_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Water"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Water/ovl_Bg_Haka_Water_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ma2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma2/z_en_ma2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma2/ovl_En_Ma2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bom_Chu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Chu/ovl_En_Bom_Chu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Horse_Game_Check"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Horse_Game_Check/ovl_En_Horse_Game_Check_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Tw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Tw/ovl_Boss_Tw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Rr"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rr/z_en_rr.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Rr/ovl_En_Rr_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ba"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ba/z_en_ba.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ba/ovl_En_Ba_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bx"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bx/z_en_bx.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bx/ovl_En_Bx_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Anubice"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice/z_en_anubice.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice/ovl_En_Anubice_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Anubice_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Fire/ovl_En_Anubice_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Hashigo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashigo/ovl_Bg_Mori_Hashigo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Hashira4"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Hashira4/ovl_Bg_Mori_Hashira4_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mori_Idomizu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mori_Idomizu/ovl_Bg_Mori_Idomizu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot16_Doughnut"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot16_Doughnut/ovl_Bg_Spot16_Doughnut_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Bdan_Switch"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bdan_Switch/ovl_Bg_Bdan_Switch_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ma1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma1/z_en_ma1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma1/ovl_En_Ma1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Ganon"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon/ovl_Boss_Ganon_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Sst"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Sst/ovl_Boss_Sst_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ny"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ny/z_en_ny.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ny/ovl_En_Ny_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fr"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fr/z_en_fr.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fr/ovl_En_Fr_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Item_Shield"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Shield/z_item_shield.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Shield/ovl_Item_Shield_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ice_Shelter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shelter/ovl_Bg_Ice_Shelter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ice_Hono"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ice_Hono/ovl_En_Ice_Hono_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Item_Ocarina"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Ocarina/ovl_Item_Ocarina_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Magic_Dark"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Magic_Dark/ovl_Magic_Dark_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_6K"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_6K/z_demo_6k.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_6K/ovl_Demo_6K_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Anubice_Tag"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Anubice_Tag/ovl_En_Anubice_Tag_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Haka_Gate"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Haka_Gate/ovl_Bg_Haka_Gate_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot15_Saku"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Saku/ovl_Bg_Spot15_Saku_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Goroiwa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Goroiwa/ovl_Bg_Jya_Goroiwa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Zurerukabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/ovl_Bg_Jya_Zurerukabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Cobra"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Cobra/ovl_Bg_Jya_Cobra_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Kanaami"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Kanaami/ovl_Bg_Jya_Kanaami_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Fishing"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Fishing/z_fishing.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Fishing/ovl_Fishing_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Oshihiki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Oshihiki/ovl_Obj_Oshihiki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gate_Shutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gate_Shutter/ovl_Bg_Gate_Shutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Eff_Dust"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Eff_Dust/ovl_Eff_Dust_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot01_Fusya"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Fusya/ovl_Bg_Spot01_Fusya_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot01_Idohashira"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idohashira/ovl_Bg_Spot01_Idohashira_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot01_Idomizu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idomizu/ovl_Bg_Spot01_Idomizu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Po_Syokudai"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Po_Syokudai/ovl_Bg_Po_Syokudai_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ganon_Otyuka"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ganon_Otyuka/ovl_Bg_Ganon_Otyuka_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot15_Rrbox"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot15_Rrbox/ovl_Bg_Spot15_Rrbox_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Umajump"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Umajump/ovl_Bg_Umajump_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Insect"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Insect/z_en_insect.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Insect/ovl_En_Insect_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Butte"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Butte/z_en_butte.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Butte/ovl_En_Butte_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fish"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish/z_en_fish.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fish/ovl_En_Fish_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot08_Iceblock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Iceblock/ovl_Bg_Spot08_Iceblock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Item_Etcetera"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Etcetera/ovl_Item_Etcetera_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Arrow_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Fire/ovl_Arrow_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Arrow_Ice"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Ice/ovl_Arrow_Ice_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Arrow_Light"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Arrow_Light/ovl_Arrow_Light_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Kibako"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako/ovl_Obj_Kibako_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Tsubo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Tsubo/ovl_Obj_Tsubo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wonder_Item"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Item/ovl_En_Wonder_Item_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ik"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ik/z_en_ik.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ik/ovl_En_Ik_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Ik"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ik/ovl_Demo_Ik_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Skj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skj/z_en_skj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skj/ovl_En_Skj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Skjneedle"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skjneedle/ovl_En_Skjneedle_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_G_Switch"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_G_Switch/ovl_En_G_Switch_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Ext"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ext/ovl_Demo_Ext_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Shd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Shd/ovl_Demo_Shd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dns"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dns/z_en_dns.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dns/ovl_En_Dns_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Elf_Msg"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg/ovl_Elf_Msg_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Honotrap"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Honotrap/ovl_En_Honotrap_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tubo_Trap"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tubo_Trap/ovl_En_Tubo_Trap_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Ice_Poly"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Ice_Poly/ovl_Obj_Ice_Poly_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot03_Taki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot03_Taki/ovl_Bg_Spot03_Taki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot07_Taki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot07_Taki/ovl_Bg_Spot07_Taki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fz"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fz/z_en_fz.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fz/ovl_En_Fz_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Po_Relay"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Relay/ovl_En_Po_Relay_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Relay_Objects"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Relay_Objects/ovl_Bg_Relay_Objects_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Diving_Game"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Diving_Game/ovl_En_Diving_Game_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kusa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa/z_en_kusa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kusa/ovl_En_Kusa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Bean"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bean/ovl_Obj_Bean_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Bombiwa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Bombiwa/ovl_Obj_Bombiwa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Switch"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Switch/ovl_Obj_Switch_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Elevator"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Elevator/ovl_Obj_Elevator_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Lift"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lift/ovl_Obj_Lift_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Hsblock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hsblock/ovl_Obj_Hsblock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Okarina_Tag"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Tag/ovl_En_Okarina_Tag_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Yabusame_Mark"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Yabusame_Mark/ovl_En_Yabusame_Mark_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Goroiwa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Goroiwa/ovl_En_Goroiwa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ex_Ruppy"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Ruppy/ovl_En_Ex_Ruppy_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Toryo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Toryo/z_en_toryo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Toryo/ovl_En_Toryo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Daiku"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku/z_en_daiku.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku/ovl_En_Daiku_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Nwc"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nwc/z_en_nwc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nwc/ovl_En_Nwc_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Blkobj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Blkobj/ovl_En_Blkobj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Item_Inbox"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Item_Inbox/ovl_Item_Inbox_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ge1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge1/z_en_ge1.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge1/ovl_En_Ge1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Blockstop"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Blockstop/ovl_Obj_Blockstop_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Sda"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sda/z_en_sda.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sda/ovl_En_Sda_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Clear_Tag"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Clear_Tag/ovl_En_Clear_Tag_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Niw_Lady"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Lady/ovl_En_Niw_Lady_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Gm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gm/z_en_gm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gm/ovl_En_Gm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ms"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ms/z_en_ms.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ms/ovl_En_Ms_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Hs"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs/z_en_hs.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs/ovl_En_Hs_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ingate"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ingate/ovl_Bg_Ingate_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kanban"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kanban/z_en_kanban.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kanban/ovl_En_Kanban_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Heishi3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi3/ovl_En_Heishi3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Syateki_Niw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Syateki_Niw/ovl_En_Syateki_Niw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Attack_Niw"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Attack_Niw/ovl_En_Attack_Niw_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot01_Idosoko"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Idosoko/ovl_Bg_Spot01_Idosoko_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Sa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sa/z_en_sa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sa/ovl_En_Sa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wonder_Talk"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk/ovl_En_Wonder_Talk_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gjyo_Bridge"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gjyo_Bridge/ovl_Bg_Gjyo_Bridge_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ds"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ds/z_en_ds.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ds/ovl_En_Ds_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mk"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mk/z_en_mk.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mk/ovl_En_Mk_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bom_Bowl_Man"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Man/ovl_En_Bom_Bowl_Man_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Bom_Bowl_Pit"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Bom_Bowl_Pit/ovl_En_Bom_Bowl_Pit_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Owl"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Owl/z_en_owl.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Owl/ovl_En_Owl_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ishi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ishi/z_en_ishi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ishi/ovl_En_Ishi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Hana"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hana/ovl_Obj_Hana_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Lightswitch"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Lightswitch/ovl_Obj_Lightswitch_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Mure2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure2/ovl_Obj_Mure2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Go"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go/z_en_go.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go/ovl_En_Go_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Fu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu/z_en_fu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Fu/ovl_En_Fu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Changer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Changer/z_en_changer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Changer/ovl_En_Changer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Megami"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Megami/ovl_Bg_Jya_Megami_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Lift"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Lift/ovl_Bg_Jya_Lift_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Bigmirror"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bigmirror/ovl_Bg_Jya_Bigmirror_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Bombchuiwa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/ovl_Bg_Jya_Bombchuiwa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Amishutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Amishutter/ovl_Bg_Jya_Amishutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Bombiwa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Bombiwa/ovl_Bg_Jya_Bombiwa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot18_Basket"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Basket/ovl_Bg_Spot18_Basket_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ganon_Organ"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Organ/ovl_En_Ganon_Organ_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Siofuki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Siofuki/ovl_En_Siofuki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Stream"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stream/z_en_stream.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Stream/ovl_En_Stream_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm/z_en_mm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm/ovl_En_Mm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ko"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ko/z_en_ko.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ko/ovl_En_Ko_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kz"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kz/z_en_kz.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kz/ovl_En_Kz_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Weather_Tag"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weather_Tag/ovl_En_Weather_Tag_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Sst_Floor"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Sst_Floor/ovl_Bg_Sst_Floor_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ani"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ani/z_en_ani.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ani/ovl_En_Ani_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ex_Item"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ex_Item/ovl_En_Ex_Item_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Ironobj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Ironobj/ovl_Bg_Jya_Ironobj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Js"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Js/z_en_js.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Js/ovl_En_Js_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Jsjutan"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Jsjutan/ovl_En_Jsjutan_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Cs"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cs/z_en_cs.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cs/ovl_En_Cs_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Md"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Md/z_en_md.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Md/ovl_En_Md_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Hy"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hy/z_en_hy.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hy/ovl_En_Hy_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ganon_Mant"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ganon_Mant/ovl_En_Ganon_Mant_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Okarina_Effect"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Okarina_Effect/ovl_En_Okarina_Effect_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mag"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/z_en_mag.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mag/ovl_En_Mag_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Gerudo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Gerudo/ovl_Door_Gerudo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Elf_Msg2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Elf_Msg2/ovl_Elf_Msg2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Gt"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gt/ovl_Demo_Gt_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Po_Field"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Field/ovl_En_Po_Field_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Efc_Erupc"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Efc_Erupc/ovl_Efc_Erupc_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Zg"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Zg/ovl_Bg_Zg_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Heishi4"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Heishi4/ovl_En_Heishi4_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zl3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl3/z_en_zl3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl3/ovl_En_Zl3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Boss_Ganon2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Boss_Ganon2/ovl_Boss_Ganon2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kakasi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi/ovl_En_Kakasi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Takara_Man"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Takara_Man/ovl_En_Takara_Man_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Makeoshihiki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makeoshihiki/ovl_Obj_Makeoshihiki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Spot"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Spot/ovl_Oceff_Spot_reloc.o"
+endseg
+
+beginseg
+ name "ovl_End_Title"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_End_Title/z_end_title.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_End_Title/ovl_End_Title_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Torch"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch/z_en_torch.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Torch/ovl_En_Torch_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Ec"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Ec/ovl_Demo_Ec_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Shot_Sun"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Shot_Sun/ovl_Shot_Sun_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dy_Extra"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dy_Extra/ovl_En_Dy_Extra_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wonder_Talk2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wonder_Talk2/ovl_En_Wonder_Talk2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ge2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge2/z_en_ge2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge2/ovl_En_Ge2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Roomtimer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ssh"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ssh/z_en_ssh.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ssh/ovl_En_Ssh_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Sth"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth/z_en_sth.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Sth/ovl_En_Sth_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Wipe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe/ovl_Oceff_Wipe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dust"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dust/ovl_Effect_Ss_Dust_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_KiraKira"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_KiraKira/ovl_Effect_Ss_KiraKira_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Bomb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb/ovl_Effect_Ss_Bomb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Bomb2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bomb2/ovl_Effect_Ss_Bomb2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Blast"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Blast/ovl_Effect_Ss_Blast_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Spk"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Spk/ovl_Effect_Ss_G_Spk_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_D_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_D_Fire/ovl_Effect_Ss_D_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Bubble"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Bubble/ovl_Effect_Ss_Bubble_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Ripple"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Ripple/ovl_Effect_Ss_G_Ripple_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Splash"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Splash/ovl_Effect_Ss_G_Splash_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Magma"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma/ovl_Effect_Ss_G_Magma_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Fire/ovl_Effect_Ss_G_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Lightning"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Lightning/ovl_Effect_Ss_Lightning_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dt_Bubble"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/ovl_Effect_Ss_Dt_Bubble_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Hahen"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Hahen/ovl_Effect_Ss_Hahen_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Stick"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stick/ovl_Effect_Ss_Stick_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Sibuki"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki/ovl_Effect_Ss_Sibuki_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Sibuki2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Sibuki2/ovl_Effect_Ss_Sibuki2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_G_Magma2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_G_Magma2/ovl_Effect_Ss_G_Magma2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Stone1"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Stone1/ovl_Effect_Ss_Stone1_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_HitMark"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_HitMark/ovl_Effect_Ss_HitMark_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Fhg_Flash"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/ovl_Effect_Ss_Fhg_Flash_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_K_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_K_Fire/ovl_Effect_Ss_K_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Solder_Srch_Ball"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/ovl_Effect_Ss_Solder_Srch_Ball_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Kakera"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Kakera/ovl_Effect_Ss_Kakera_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Ice_Piece"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/ovl_Effect_Ss_Ice_Piece_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_En_Ice"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Ice/ovl_Effect_Ss_En_Ice_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Fire_Tail"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/ovl_Effect_Ss_Fire_Tail_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_En_Fire"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_En_Fire/ovl_Effect_Ss_En_Fire_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Extra"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Extra/ovl_Effect_Ss_Extra_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Fcircle"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Fcircle/ovl_Effect_Ss_Fcircle_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dead_Db"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Db/ovl_Effect_Ss_Dead_Db_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dead_Dd"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/ovl_Effect_Ss_Dead_Dd_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dead_Ds"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/ovl_Effect_Ss_Dead_Ds_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Dead_Sound"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/ovl_Effect_Ss_Dead_Sound_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Storm"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Storm/ovl_Oceff_Storm_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Weiyer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Weiyer/ovl_En_Weiyer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot05_Soko"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot05_Soko/ovl_Bg_Spot05_Soko_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_1flift"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_1flift/ovl_Bg_Jya_1flift_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Haheniron"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Haheniron/ovl_Bg_Jya_Haheniron_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot12_Gate"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Gate/ovl_Bg_Spot12_Gate_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot12_Saku"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot12_Saku/ovl_Bg_Spot12_Saku_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Hintnuts"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hintnuts/ovl_En_Hintnuts_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Nutsball"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Nutsball/ovl_En_Nutsball_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot00_Break"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot00_Break/ovl_Bg_Spot00_Break_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Shopnuts"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Shopnuts/ovl_En_Shopnuts_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_It"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_It/z_en_it.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_It/ovl_En_It_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_GeldB"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GeldB/z_en_geldb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_GeldB/ovl_En_GeldB_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Wipe2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe2/ovl_Oceff_Wipe2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Wipe3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Niw_Girl"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Niw_Girl/ovl_En_Niw_Girl_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dog"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dog/z_en_dog.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dog/ovl_En_Dog_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Si"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Si/z_en_si.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Si/ovl_En_Si_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot01_Objects2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot01_Objects2/ovl_Bg_Spot01_Objects2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Comb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Comb/ovl_Obj_Comb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot11_Bakudankabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/ovl_Bg_Spot11_Bakudankabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Kibako2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Kibako2/ovl_Obj_Kibako2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dnt_Demo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Demo/ovl_En_Dnt_Demo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dnt_Jiji"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Jiji/ovl_En_Dnt_Jiji_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Dnt_Nomal"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Dnt_Nomal/ovl_En_Dnt_Nomal_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Guest"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guest/z_en_guest.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Guest/ovl_En_Guest_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Bom_Guard"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bom_Guard/ovl_Bg_Bom_Guard_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Hs2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs2/z_en_hs2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Hs2/ovl_En_Hs2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Kekkai"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Kekkai/ovl_Demo_Kekkai_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot08_Bakudankabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/ovl_Bg_Spot08_Bakudankabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot17_Bakudankabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/ovl_Bg_Spot17_Bakudankabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Mure3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Mure3/ovl_Obj_Mure3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Tg"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tg/z_en_tg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Tg/ovl_En_Tg_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mu"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mu/z_en_mu.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mu/ovl_En_Mu_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Go2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go2/z_en_go2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Go2/ovl_En_Go2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wf"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wf/z_en_wf.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wf/ovl_En_Wf_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Skb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skb/z_en_skb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Skb/ovl_En_Skb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Gj"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Gj/ovl_Demo_Gj_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Demo_Geff"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Demo_Geff/ovl_Demo_Geff_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gnd_Firemeiro"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/ovl_Bg_Gnd_Firemeiro_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gnd_Darkmeiro"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/ovl_Bg_Gnd_Darkmeiro_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gnd_Soulmeiro"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/ovl_Bg_Gnd_Soulmeiro_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gnd_Nisekabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/ovl_Bg_Gnd_Nisekabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Gnd_Iceblock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Gnd_Iceblock/ovl_Bg_Gnd_Iceblock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ydan_Sp"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ydan_Sp/ovl_Bg_Ydan_Sp_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Gb"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gb/z_en_gb.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gb/ovl_En_Gb_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Gs"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gs/z_en_gs.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Gs/ovl_En_Gs_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mizu_Bwall"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Bwall/ovl_Bg_Mizu_Bwall_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Mizu_Shutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Mizu_Shutter/ovl_Bg_Mizu_Shutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Daiku_Kakariko"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Daiku_Kakariko/ovl_En_Daiku_Kakariko_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Bowl_Wall"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Bowl_Wall/ovl_Bg_Bowl_Wall_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Wall_Tubo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Wall_Tubo/ovl_En_Wall_Tubo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Po_Desert"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Po_Desert/ovl_En_Po_Desert_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Crow"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Crow/z_en_crow.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Crow/ovl_En_Crow_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Door_Killer"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Killer/z_door_killer.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Door_Killer/ovl_Door_Killer_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot11_Oasis"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot11_Oasis/ovl_Bg_Spot11_Oasis_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot18_Futa"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Futa/ovl_Bg_Spot18_Futa_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Spot18_Shutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Spot18_Shutter/ovl_Bg_Spot18_Shutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ma3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma3/z_en_ma3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ma3/ovl_En_Ma3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Cow"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cow/z_en_cow.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Cow/ovl_En_Cow_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ice_Turara"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Turara/ovl_Bg_Ice_Turara_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Ice_Shutter"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Ice_Shutter/ovl_Bg_Ice_Shutter_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kakasi2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi2/ovl_En_Kakasi2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Kakasi3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Kakasi3/ovl_En_Kakasi3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Oceff_Wipe4"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Oceff_Wipe4/ovl_Oceff_Wipe4_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Eg"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eg/z_en_eg.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Eg/ovl_En_Eg_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Menkuri_Nisekabe"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/ovl_Bg_Menkuri_Nisekabe_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zo"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zo/z_en_zo.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zo/ovl_En_Zo_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Effect_Ss_Ice_Smoke"
+ compress
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.o"
+ include "$(BUILD_DIR)/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/ovl_Effect_Ss_Ice_Smoke_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Makekinsuta"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Makekinsuta/ovl_Obj_Makekinsuta_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Ge3"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge3/z_en_ge3.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Ge3/ovl_En_Ge3_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Timeblock"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Timeblock/ovl_Obj_Timeblock_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Hamishi"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Hamishi/ovl_Obj_Hamishi_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Zl4"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl4/z_en_zl4.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Zl4/ovl_En_Zl4_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Mm2"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm2/z_en_mm2.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Mm2/ovl_En_Mm2_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Bg_Jya_Block"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Bg_Jya_Block/ovl_Bg_Jya_Block_reloc.o"
+endseg
+
+beginseg
+ name "ovl_Obj_Warp2block"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_Obj_Warp2block/ovl_Obj_Warp2block_reloc.o"
+endseg
diff --git a/spec/scenes_gc_ique.inc b/spec/scenes_gc_ique.inc
new file mode 100644
index 0000000000..6b1b42b05a
--- /dev/null
+++ b/spec/scenes_gc_ique.inc
@@ -0,0 +1,4079 @@
+beginseg
+ name "ydan_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ydan_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ddan_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "bdan_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "Bmori1_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_20.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_21.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_22.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "HIDAN_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_20.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_21.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_22.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_23"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_23.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_24"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_24.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_25"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_25.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_26"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_26.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "MIZUsin_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_20.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_21.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_22.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "jyasinzou_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_20.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_21.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_22.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_23"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_23.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_24"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_24.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_25"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_25.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_26"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_26.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_27"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_27.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_28"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_28.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "HAKAdan_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_20.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_21.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_22.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "HAKAdanCH_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ice_doukutu_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "men_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "men_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganontika_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_19.o"
+ number 3
+endseg
+
+#if DEBUG_ASSETS
+beginseg
+ name "syotes_scene"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/syotes/syotes_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "syotes_room_0"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/syotes/syotes_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "syotes2_scene"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/syotes2/syotes2_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "syotes2_room_0"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/syotes2/syotes2_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "depth_test_scene"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/depth_test/depth_test_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "depth_test_room_0"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/depth_test/depth_test_room_0.o"
+ number 3
+endseg
+#endif
+
+beginseg
+ name "spot00_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot00/spot00_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot00_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot00/spot00_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot01_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot01/spot01_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot01_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot01/spot01_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot02_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot02_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot02_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot03_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot03_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot03_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot04_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot04_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot04_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot04_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "spot05_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot05/spot05_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot05_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot05/spot05_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot06_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot06/spot06_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot06_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot06/spot06_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot07_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot07_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot07_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot08_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot08/spot08_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot08_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot08/spot08_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot09_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot09/spot09_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot09_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot09/spot09_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot10_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "spot11_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot11/spot11_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot11_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot11/spot11_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot12_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot12_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot12_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot13_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot13_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot13_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot15_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot15/spot15_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot15_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot15/spot15_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot16_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot16/spot16_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot16_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot16/spot16_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot17_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot17_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot17_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot18_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot18_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot18_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot18_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "spot18_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "market_day_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_day/market_day_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "market_day_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_day/market_day_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "market_night_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_night/market_night_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "market_night_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_night/market_night_room_0.o"
+ number 3
+endseg
+
+#if DEBUG_ASSETS
+beginseg
+ name "testroom_scene"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "testroom_room_0"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "testroom_room_1"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "testroom_room_2"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "testroom_room_3"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "testroom_room_4"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/testroom/testroom_room_4.o"
+ number 3
+endseg
+#endif
+
+beginseg
+ name "kenjyanoma_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kenjyanoma/kenjyanoma_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kenjyanoma_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kenjyanoma/kenjyanoma_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "tokinoma_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "tokinoma_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "tokinoma_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_room_1.o"
+ number 3
+endseg
+
+#if DEBUG_ASSETS
+beginseg
+ name "sutaru_scene"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/sutaru/sutaru_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "sutaru_room_0"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/sutaru/sutaru_room_0.o"
+ number 3
+endseg
+#endif
+
+beginseg
+ name "link_home_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/link_home/link_home_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "link_home_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/link_home/link_home_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kokiri_shop_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/kokiri_shop/kokiri_shop_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kokiri_shop_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/kokiri_shop/kokiri_shop_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kokiri_home_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home/kokiri_home_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kokiri_home_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home/kokiri_home_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kakusiana_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "entra_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/entra/entra_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "entra_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/entra/entra_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "moribossroom_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "moribossroom_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "moribossroom_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "syatekijyou_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/syatekijyou/syatekijyou_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "syatekijyou_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/syatekijyou/syatekijyou_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "shop1_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/shop1/shop1_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "shop1_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/shop1/shop1_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hairal_niwa_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa/hairal_niwa_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hairal_niwa_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa/hairal_niwa_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_tou_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/ganon_tou/ganon_tou_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_tou_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/ganon_tou/ganon_tou_room_0.o"
+ number 3
+endseg
+
+#if DEBUG_ASSETS
+beginseg
+ name "sasatest_scene"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/sasatest/sasatest_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "sasatest_room_0"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/sasatest/sasatest_room_0.o"
+ number 3
+endseg
+#endif
+
+beginseg
+ name "market_alley_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_alley/market_alley_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "market_alley_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_alley/market_alley_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot20_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot20/spot20_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot20_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot20/spot20_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "market_ruins_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_ruins/market_ruins_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "market_ruins_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_ruins/market_ruins_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "entra_n_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/entra_n/entra_n_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "entra_n_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/entra_n/entra_n_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "enrui_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/enrui/enrui_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "enrui_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/enrui/enrui_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "market_alley_n_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_alley_n/market_alley_n_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "market_alley_n_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_alley_n/market_alley_n_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hiral_demo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hiral_demo/hiral_demo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hiral_demo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hiral_demo/hiral_demo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kokiri_home3_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home3/kokiri_home3_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kokiri_home3_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home3/kokiri_home3_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "malon_stable_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/malon_stable/malon_stable_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "malon_stable_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/malon_stable/malon_stable_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kakariko_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kakariko/kakariko_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kakariko_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kakariko/kakariko_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_boss_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "bdan_boss_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_boss_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "FIRE_bs_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "FIRE_bs_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "FIRE_bs_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "hut_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hut/hut_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hut_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hut/hut_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "daiyousei_izumi_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/daiyousei_izumi/daiyousei_izumi_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "daiyousei_izumi_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/daiyousei_izumi/daiyousei_izumi_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hakaana_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana/hakaana_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hakaana_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana/hakaana_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "yousei_izumi_tate_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_tate/yousei_izumi_tate_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "yousei_izumi_tate_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_tate/yousei_izumi_tate_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "yousei_izumi_yoko_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "yousei_izumi_yoko_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "golon_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/golon/golon_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "golon_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/golon/golon_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "zoora_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/zoora/zoora_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "zoora_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/zoora/zoora_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "drag_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/drag/drag_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "drag_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/drag/drag_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "alley_shop_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/alley_shop/alley_shop_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "alley_shop_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/alley_shop/alley_shop_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "night_shop_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/night_shop/night_shop_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "night_shop_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/night_shop/night_shop_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "impa_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/impa/impa_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "impa_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/impa/impa_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "labo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/labo/labo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "labo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/labo/labo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "tent_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/tent/tent_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "tent_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/tent/tent_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "nakaniwa_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/nakaniwa/nakaniwa_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "nakaniwa_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/nakaniwa/nakaniwa_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_boss_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ddan_boss_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_boss_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_boss_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ydan_boss_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_boss_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_bs_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "HAKAdan_bs_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_bs_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_bs_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "MIZUsin_bs_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_bs_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_boss_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_boss/ganon_boss_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_boss_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_boss/ganon_boss_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinboss_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "jyasinboss_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinboss_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinboss_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinboss_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "kokiri_home4_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home4/kokiri_home4_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kokiri_home4_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home4/kokiri_home4_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kokiri_home5_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home5/kokiri_home5_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kokiri_home5_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home5/kokiri_home5_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_final_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_final/ganon_final_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_final_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_final/ganon_final_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kakariko3_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakariko3/kakariko3_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kakariko3_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakariko3/kakariko3_room_0.o"
+ number 3
+endseg
+
+#if DEBUG_ASSETS
+beginseg
+ name "hairal_niwa2_scene"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa2/hairal_niwa2_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hairal_niwa2_room_0"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa2/hairal_niwa2_room_0.o"
+ number 3
+endseg
+#endif
+
+beginseg
+ name "hakasitarelay_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hakasitarelay_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "shrine_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine/shrine_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "shrine_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine/shrine_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "turibori_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/turibori/turibori_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "turibori_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/turibori/turibori_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "shrine_n_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine_n/shrine_n_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "shrine_n_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine_n/shrine_n_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "shrine_r_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine_r/shrine_r_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "shrine_r_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine_r/shrine_r_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hakaana2_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana2/hakaana2_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hakaana2_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana2/hakaana2_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "gerudoway_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "hairal_niwa_n_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa_n/hairal_niwa_n_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hairal_niwa_n_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa_n/hairal_niwa_n_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "bowling_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/bowling/bowling_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "bowling_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/bowling/bowling_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hakaana_ouke_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hakaana_ouke_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hakaana_ouke_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "hakaana_ouke_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "hylia_labo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hylia_labo/hylia_labo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hylia_labo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hylia_labo/hylia_labo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "souko_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "souko_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "souko_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "souko_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "miharigoya_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/miharigoya/miharigoya_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "miharigoya_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/miharigoya/miharigoya_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "mahouya_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/mahouya/mahouya_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "mahouya_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/mahouya/mahouya_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "takaraya_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_sonogo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_sonogo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_sonogo_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_sonogo_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_sonogo_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_sonogo_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_demo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_demo/ganon_demo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_demo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_demo/ganon_demo_room_0.o"
+ number 3
+endseg
+
+#if DEBUG_ASSETS
+beginseg
+ name "besitu_scene"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/besitu/besitu_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "besitu_room_0"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/besitu/besitu_room_0.o"
+ number 3
+endseg
+#endif
+
+beginseg
+ name "face_shop_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/face_shop/face_shop_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "face_shop_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/face_shop/face_shop_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kinsuta_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kinsuta/kinsuta_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kinsuta_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kinsuta/kinsuta_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontikasonogo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganontikasonogo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontikasonogo_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_room_1.o"
+ number 3
+endseg
+
+#if DEBUG_ASSETS
+beginseg
+ name "test01_scene"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/test01/test01_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "test01_room_0"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/test_levels/test01/test01_room_0.o"
+ number 3
+endseg
+#endif
diff --git a/spec/scenes_n64.inc b/spec/scenes_n64.inc
new file mode 100644
index 0000000000..47c82b0bf1
--- /dev/null
+++ b/spec/scenes_n64.inc
@@ -0,0 +1,3911 @@
+beginseg
+ name "ddan_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ddan_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan/ddan_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "spot00_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot00/spot00_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot00_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot00/spot00_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot01_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot01/spot01_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot01_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot01/spot01_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot02_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot02_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot02_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot02/spot02_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot03_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot03_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot03_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot03/spot03_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot04_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot04_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot04_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot04_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot04/spot04_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "spot05_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot05/spot05_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot05_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot05/spot05_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot06_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot06/spot06_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot06_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot06/spot06_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot07_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot07_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot07_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot07/spot07_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot08_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot08/spot08_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot08_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot08/spot08_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot09_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot09/spot09_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot09_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot09/spot09_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot10_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "spot10_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot10/spot10_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "spot11_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot11/spot11_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot11_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot11/spot11_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot12_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot12_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot12_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot12/spot12_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot13_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot13_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot13_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot13/spot13_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot15_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot15/spot15_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot15_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot15/spot15_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot16_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot16/spot16_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot16_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot16/spot16_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot17_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot17_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot17_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot17/spot17_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot18_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot18_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot18_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "spot18_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "spot18_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot18/spot18_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "market_day_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_day/market_day_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "market_day_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_day/market_day_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "market_night_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_night/market_night_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "market_night_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_night/market_night_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "HIDAN_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_20.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_21.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_22.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_23"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_23.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_24"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_24.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_25"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_25.o"
+ number 3
+endseg
+
+beginseg
+ name "HIDAN_room_26"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HIDAN/HIDAN_room_26.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "Bmori1_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_20.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_21.o"
+ number 3
+endseg
+
+beginseg
+ name "Bmori1_room_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/Bmori1/Bmori1_room_22.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ydan_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan/ydan_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "kenjyanoma_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kenjyanoma/kenjyanoma_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kenjyanoma_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kenjyanoma/kenjyanoma_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "tokinoma_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "tokinoma_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "tokinoma_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/tokinoma/tokinoma_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "link_home_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/link_home/link_home_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "link_home_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/link_home/link_home_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kokiri_shop_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/kokiri_shop/kokiri_shop_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kokiri_shop_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/kokiri_shop/kokiri_shop_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "MIZUsin_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_20.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_21.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_room_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin/MIZUsin_room_22.o"
+ number 3
+endseg
+
+beginseg
+ name "kokiri_home_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home/kokiri_home_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kokiri_home_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home/kokiri_home_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kakusiana_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "kakusiana_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakusiana/kakusiana_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "entra_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/entra/entra_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "entra_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/entra/entra_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "bdan_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan/bdan_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "HAKAdan_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_20.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_21.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_room_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan/HAKAdan_room_22.o"
+ number 3
+endseg
+
+beginseg
+ name "moribossroom_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "moribossroom_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "moribossroom_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/moribossroom/moribossroom_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "syatekijyou_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/syatekijyou/syatekijyou_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "syatekijyou_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/syatekijyou/syatekijyou_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "men_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "men_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "men_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/men/men_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "shop1_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/shop1/shop1_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "shop1_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/shop1/shop1_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hairal_niwa_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa/hairal_niwa_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hairal_niwa_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa/hairal_niwa_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_tou_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/ganon_tou/ganon_tou_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_tou_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/ganon_tou/ganon_tou_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "market_alley_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_alley/market_alley_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "market_alley_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_alley/market_alley_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "spot20_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot20/spot20_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "spot20_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/overworld/spot20/spot20_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "market_ruins_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_ruins/market_ruins_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "market_ruins_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_ruins/market_ruins_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "entra_n_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/entra_n/entra_n_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "entra_n_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/entra_n/entra_n_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "enrui_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/enrui/enrui_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "enrui_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/enrui/enrui_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "market_alley_n_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_alley_n/market_alley_n_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "market_alley_n_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/market_alley_n/market_alley_n_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hiral_demo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hiral_demo/hiral_demo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hiral_demo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hiral_demo/hiral_demo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kokiri_home3_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home3/kokiri_home3_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kokiri_home3_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home3/kokiri_home3_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "jyasinzou_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_20.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_21.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_22.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_23"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_23.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_24"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_24.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_25"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_25.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_26"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_26.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_27"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_27.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinzou_room_28"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinzou/jyasinzou_room_28.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ice_doukutu_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "ice_doukutu_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ice_doukutu/ice_doukutu_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "malon_stable_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/malon_stable/malon_stable_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "malon_stable_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/malon_stable/malon_stable_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kakariko_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kakariko/kakariko_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kakariko_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kakariko/kakariko_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_boss_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "bdan_boss_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "bdan_boss_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/bdan_boss/bdan_boss_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "FIRE_bs_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "FIRE_bs_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "FIRE_bs_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/FIRE_bs/FIRE_bs_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "hut_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hut/hut_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hut_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hut/hut_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "daiyousei_izumi_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/daiyousei_izumi/daiyousei_izumi_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "daiyousei_izumi_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/daiyousei_izumi/daiyousei_izumi_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hakaana_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana/hakaana_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hakaana_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana/hakaana_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "yousei_izumi_tate_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_tate/yousei_izumi_tate_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "yousei_izumi_tate_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_tate/yousei_izumi_tate_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "yousei_izumi_yoko_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "yousei_izumi_yoko_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "golon_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/golon/golon_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "golon_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/golon/golon_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "zoora_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/zoora/zoora_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "zoora_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/zoora/zoora_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "drag_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/drag/drag_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "drag_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/drag/drag_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "alley_shop_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/alley_shop/alley_shop_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "alley_shop_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/alley_shop/alley_shop_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "night_shop_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/night_shop/night_shop_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "night_shop_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/night_shop/night_shop_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "impa_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/impa/impa_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "impa_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/impa/impa_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "labo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/labo/labo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "labo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/labo/labo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "tent_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/tent/tent_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "tent_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/tent/tent_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "nakaniwa_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/nakaniwa/nakaniwa_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "nakaniwa_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/nakaniwa/nakaniwa_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_boss_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ddan_boss_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ddan_boss_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ddan_boss/ddan_boss_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_boss_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ydan_boss_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ydan_boss_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ydan_boss/ydan_boss_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_bs_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "HAKAdan_bs_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdan_bs_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdan_bs/HAKAdan_bs_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_bs_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "MIZUsin_bs_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "MIZUsin_bs_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/MIZUsin_bs/MIZUsin_bs_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon/ganon_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_boss_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_boss/ganon_boss_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_boss_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_boss/ganon_boss_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinboss_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "jyasinboss_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinboss_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinboss_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "jyasinboss_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/jyasinboss/jyasinboss_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "kokiri_home4_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home4/kokiri_home4_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kokiri_home4_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home4/kokiri_home4_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kokiri_home5_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home5/kokiri_home5_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kokiri_home5_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/kokiri_home5/kokiri_home5_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_final_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_final/ganon_final_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_final_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_final/ganon_final_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kakariko3_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakariko3/kakariko3_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kakariko3_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kakariko3/kakariko3_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hakasitarelay_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "hakasitarelay_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hakasitarelay/hakasitarelay_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "shrine_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine/shrine_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "shrine_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine/shrine_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "turibori_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/turibori/turibori_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "turibori_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/turibori/turibori_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "shrine_n_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine_n/shrine_n_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "shrine_n_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine_n/shrine_n_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "shrine_r_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine_r/shrine_r_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "shrine_r_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/shrine_r/shrine_r_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganontika_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_7.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_8.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_9.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_10.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_11.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_12.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_13.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_14.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_15.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_16.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_17.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_18.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontika_room_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontika/ganontika_room_19.o"
+ number 3
+endseg
+
+beginseg
+ name "hakaana2_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana2/hakaana2_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hakaana2_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana2/hakaana2_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "gerudoway_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "gerudoway_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/gerudoway/gerudoway_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "HAKAdanCH_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "HAKAdanCH_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/HAKAdanCH/HAKAdanCH_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "hairal_niwa_n_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa_n/hairal_niwa_n_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hairal_niwa_n_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hairal_niwa_n/hairal_niwa_n_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "bowling_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/bowling/bowling_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "bowling_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/bowling/bowling_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hakaana_ouke_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hakaana_ouke_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "hakaana_ouke_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "hakaana_ouke_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/hakaana_ouke/hakaana_ouke_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "hylia_labo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hylia_labo/hylia_labo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "hylia_labo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/hylia_labo/hylia_labo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "souko_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "souko_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "souko_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "souko_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/souko/souko_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "miharigoya_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/miharigoya/miharigoya_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "miharigoya_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/miharigoya/miharigoya_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "mahouya_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/mahouya/mahouya_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "mahouya_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/mahouya/mahouya_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "takaraya_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_5.o"
+ number 3
+endseg
+
+beginseg
+ name "takaraya_room_6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/indoors/takaraya/takaraya_room_6.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_sonogo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_sonogo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_sonogo_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_1.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_sonogo_room_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_2.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_sonogo_room_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_3.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_sonogo_room_4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_sonogo/ganon_sonogo_room_4.o"
+ number 3
+endseg
+
+beginseg
+ name "ganon_demo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_demo/ganon_demo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganon_demo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganon_demo/ganon_demo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "face_shop_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/face_shop/face_shop_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "face_shop_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/shops/face_shop/face_shop_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "kinsuta_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kinsuta/kinsuta_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "kinsuta_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/misc/kinsuta/kinsuta_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontikasonogo_scene"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_scene.o"
+ number 2
+endseg
+
+beginseg
+ name "ganontikasonogo_room_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_room_0.o"
+ number 3
+endseg
+
+beginseg
+ name "ganontikasonogo_room_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/scenes/dungeons/ganontikasonogo/ganontikasonogo_room_1.o"
+ number 3
+endseg
diff --git a/spec/spec b/spec/spec
new file mode 100644
index 0000000000..60437c4bf9
--- /dev/null
+++ b/spec/spec
@@ -0,0 +1,5017 @@
+/*
+ * ROM spec file
+ */
+
+#include "include/versions.h"
+
+beginseg
+ name "makerom"
+ // We set the address of the makerom segment as 0x80000400 - 0x1000, since the ROM header and IPL3 together
+ // are 0x1000 bytes long and we want the entry code to end up at address 0x80000400.
+ address 0x7FFFF400
+ include "$(BUILD_DIR)/src/makerom/rom_header.o"
+ include "$(BUILD_DIR)/src/makerom/ipl3.o"
+ include "$(BUILD_DIR)/src/makerom/entry.o"
+endseg
+
+beginseg
+ name "boot"
+
+#if PLATFORM_IQUE
+ include "*$(BUILD_DIR)/boot_bss_1.o"
+ include "*$(BUILD_DIR)/boot_bss_boot_main.o"
+ include "*$(BUILD_DIR)/boot_bss_idle.o"
+ include "*$(BUILD_DIR)/boot_bss_viconfig.o"
+#endif
+ include "$(BUILD_DIR)/src/boot/boot_main.o"
+ include "$(BUILD_DIR)/src/boot/idle.o"
+#if OOT_VERSION >= PAL_1_0
+ include "$(BUILD_DIR)/src/boot/viconfig.o"
+#endif
+ include "$(BUILD_DIR)/src/boot/carthandle.o"
+ include "$(BUILD_DIR)/src/boot/z_std_dma.o"
+#if PLATFORM_IQUE
+ include "*$(BUILD_DIR)/boot_bss_z_std_dma.o"
+#endif
+#if !PLATFORM_IQUE
+ include "$(BUILD_DIR)/src/boot/yaz0.o"
+#else
+ include "$(BUILD_DIR)/src/boot/inflate.o"
+#endif
+ include "$(BUILD_DIR)/src/boot/z_locale.o"
+#if PLATFORM_N64
+ include "$(BUILD_DIR)/src/boot/cic6105.o"
+#endif
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/boot/assert.o"
+#endif
+#if !PLATFORM_IQUE
+ include "$(BUILD_DIR)/src/boot/is_debug.o"
+#else
+ include "$(BUILD_DIR)/src/boot/is_debug_ique.o"
+#endif
+ include "$(BUILD_DIR)/src/boot/driverominit.o"
+ include "$(BUILD_DIR)/src/boot/mio0.o"
+
+ // libu64
+ include "$(BUILD_DIR)/src/libu64/stackcheck.o"
+#if !PLATFORM_IQUE
+ include "$(BUILD_DIR)/src/libu64/debug.o"
+#endif
+
+ // libc64
+#if PLATFORM_N64
+ include "$(BUILD_DIR)/src/libc64/sleep.o"
+#endif
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libc64/sprintf.o"
+#endif
+
+ // libultra
+#if PLATFORM_N64
+#include "boot_libultra_n64.inc"
+#elif PLATFORM_GC
+#include "boot_libultra_gc.inc"
+#elif PLATFORM_IQUE
+#include "boot_libultra_ique.inc"
+#endif
+
+ // libgcc
+#if PLATFORM_IQUE && !defined(COMPILER_GCC)
+ include "$(BUILD_DIR)/src/libgcc/__divdi3.o"
+ include "$(BUILD_DIR)/src/libgcc/__moddi3.o"
+ include "$(BUILD_DIR)/src/libgcc/__udivdi3.o"
+ include "$(BUILD_DIR)/src/libgcc/__umoddi3.o"
+ include "$(BUILD_DIR)/src/libgcc/__cmpdi2.o"
+ include "$(BUILD_DIR)/src/libgcc/__floatdidf.o"
+ include "$(BUILD_DIR)/src/libgcc/__floatdisf.o"
+ include "$(BUILD_DIR)/src/libgcc/__fixunsdfdi.o"
+ include "$(BUILD_DIR)/src/libgcc/__fixdfdi.o"
+ include "$(BUILD_DIR)/src/libgcc/__fixunssfdi.o"
+ include "$(BUILD_DIR)/src/libgcc/__fixsfdi.o"
+#endif
+
+ // Build information
+ include "$(BUILD_DIR)/src/boot/build.o"
+
+ // RSP microcode
+ include "$(BUILD_DIR)/data/rsp_boot.text.o"
+ include "$(BUILD_DIR)/data/cic6105.text.o"
+
+ // Extra files for non-matching debug builds
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libu64/debug.o"
+ include "$(BUILD_DIR)/src/libultra/io/epiwrite.o"
+ include "$(BUILD_DIR)/src/libultra/io/vimodefpallan1.o"
+ include "$(BUILD_DIR)/src/libultra/libc/ldiv.o"
+ include "$(BUILD_DIR)/src/libultra/libc/string.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xldtob.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xlitob.o"
+ include "$(BUILD_DIR)/src/libultra/libc/xprintf.o"
+#endif
+
+#if PLATFORM_IQUE
+ include "*$(BUILD_DIR)/boot_bss_2.o"
+#endif
+
+ // Functions that GCC-compiled code may depend on, placed in boot so they will always be loaded
+#ifdef COMPILER_GCC
+ include "$(BUILD_DIR)/src/libultra/libc/string.o"
+ include "$(BUILD_DIR)/src/libc/memset.o"
+ include "$(BUILD_DIR)/src/libc/memmove.o"
+ include "$(BUILD_DIR)/src/gcc_fix/missing_gcc_functions.o"
+#endif
+
+endseg
+
+beginseg
+ name "dmadata"
+ include "$(BUILD_DIR)/src/dmadata/dmadata.o"
+endseg
+
+beginseg
+ name "Audiobank"
+ address 0
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_0.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_1.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_2.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_3.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_4.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_5.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_6.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_7.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_8.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_9.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_10.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_11.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_12.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_13.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_14.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_15.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_16.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_17.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_18.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_19.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_20.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_21.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_22.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_23.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_24.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_25.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_26.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_27.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_28.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_29.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_30.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_31.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_32.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_33.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_34.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_35.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_36.o"
+ include "$(BUILD_DIR)/assets/audio/soundfonts/Soundfont_37.o"
+#if OOT_VERSION >= PAL_1_0
+ include "$(BUILD_DIR)/assets/audio/audiobank_padding.o"
+#endif
+endseg
+
+beginseg
+ name "Audioseq"
+ address 0
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_0.prg.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_1.prg.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_2.prg.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_3.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_4.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_5.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_6.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_7.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_8.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_9.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_10.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_11.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_12.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_13.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_14.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_15.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_16.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_17.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_18.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_19.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_20.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_21.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_22.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_23.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_24.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_25.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_26.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_27.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_28.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_29.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_30.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_31.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_32.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_33.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_34.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_35.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_36.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_37.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_38.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_39.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_40.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_41.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_42.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_43.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_44.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_45.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_46.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_47.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_48.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_49.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_50.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_51.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_52.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_53.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_54.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_55.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_56.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_57.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_58.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_59.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_60.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_61.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_62.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_63.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_64.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_65.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_66.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_67.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_68.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_69.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_70.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_71.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_72.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_73.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_74.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_75.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_76.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_77.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_78.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_79.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_80.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_81.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_82.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_83.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_84.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_85.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_86.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_88.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_89.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_90.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_91.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_92.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_93.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_94.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_95.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_96.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_97.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_98.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_99.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_100.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_101.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_102.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_103.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_104.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_105.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_106.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_107.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_108.o"
+ include "$(BUILD_DIR)/assets/audio/sequences/seq_109.prg.o"
+endseg
+
+beginseg
+ name "Audiotable"
+ address 0
+ include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_0.o"
+ include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_2.o"
+ include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_3.o"
+ include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_4.o"
+ include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_5.o"
+ include "$(BUILD_DIR)/assets/audio/samplebanks/SampleBank_6.o"
+endseg
+
+#if OOT_NTSC
+beginseg
+ name "kanji"
+ include "$(BUILD_DIR)/assets/textures/kanji/kanji.o"
+endseg
+#endif
+
+beginseg
+ name "link_animetion"
+#if OOT_NTSC
+ romalign 0x1000
+#endif
+ include "$(BUILD_DIR)/assets/misc/link_animetion/link_animetion.o"
+ number 7
+endseg
+
+beginseg
+ name "icon_item_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/icon_item_static/icon_item_static.o"
+ number 8
+endseg
+
+beginseg
+ name "icon_item_24_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/icon_item_24_static/icon_item_24_static.o"
+ number 9
+endseg
+
+beginseg
+ name "icon_item_field_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/icon_item_field_static/icon_item_field_static.o"
+ number 12
+endseg
+
+beginseg
+ name "icon_item_dungeon_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/icon_item_dungeon_static/icon_item_dungeon_static.o"
+ number 12
+endseg
+
+beginseg
+ name "icon_item_gameover_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/icon_item_gameover_static/icon_item_gameover_static.o"
+ number 12
+endseg
+
+#if OOT_NTSC
+beginseg
+ name "icon_item_jpn_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/icon_item_jpn_static/icon_item_jpn_static.o"
+ number 13
+endseg
+#endif
+
+beginseg
+ name "icon_item_nes_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/icon_item_nes_static/icon_item_nes_static.o"
+ number 13
+endseg
+
+#if OOT_PAL
+beginseg
+ name "icon_item_ger_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/icon_item_ger_static/icon_item_ger_static.o"
+ number 13
+endseg
+
+beginseg
+ name "icon_item_fra_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/icon_item_fra_static/icon_item_fra_static.o"
+ number 13
+endseg
+#endif
+
+beginseg
+ name "item_name_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/item_name_static/item_name_static.o"
+ number 10
+endseg
+
+beginseg
+ name "map_name_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/map_name_static/map_name_static.o"
+ number 11
+endseg
+
+beginseg
+ name "do_action_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/do_action_static/do_action_static.o"
+ number 7
+endseg
+
+beginseg
+ name "message_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/message_static/message_static.o"
+ number 7
+endseg
+
+#if OOT_NTSC && OOT_VERSION < NTSC_1_2
+beginseg
+ name "jpn_message_data_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/text/jpn_message_data_static.o"
+ number 8
+endseg
+#endif
+
+beginseg
+ name "message_texture_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/message_texture_static/message_texture_static.o"
+ number 9
+endseg
+
+beginseg
+ name "nes_font_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/nes_font_static/nes_font_static.o"
+ number 10
+endseg
+
+#if OOT_NTSC && OOT_VERSION >= NTSC_1_2
+beginseg
+ name "jpn_message_data_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/text/jpn_message_data_static.o"
+ number 8
+endseg
+#endif
+
+beginseg
+ name "nes_message_data_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/text/nes_message_data_static.o"
+ number 7
+endseg
+
+#if OOT_PAL
+beginseg
+ name "ger_message_data_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/text/ger_message_data_static.o"
+ number 7
+endseg
+
+beginseg
+ name "fra_message_data_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/text/fra_message_data_static.o"
+ number 7
+endseg
+#endif
+
+beginseg
+ name "staff_message_data_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/text/staff_message_data_static.o"
+ number 7
+endseg
+
+beginseg
+ name "map_grand_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/map_grand_static/map_grand_static.o"
+ number 11
+endseg
+
+#if PLATFORM_N64
+beginseg
+ name "map_i_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/map_i_static/map_i_static.o"
+ number 11
+endseg
+#endif
+
+beginseg
+ name "map_48x85_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/map_48x85_static/map_48x85_static.o"
+ number 11
+endseg
+
+#if !PLATFORM_N64
+beginseg
+ name "map_i_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/map_i_static/map_i_static.o"
+ number 11
+endseg
+#endif
+
+beginseg
+ name "code"
+ compress
+ after "dmadata"
+ align 0x20
+
+#if PLATFORM_IQUE
+ include "*$(BUILD_DIR)/code_bss_1.o"
+#endif
+ include "$(BUILD_DIR)/src/code/z_en_a_keep.o"
+ include "$(BUILD_DIR)/src/code/z_en_item00.o"
+ include "$(BUILD_DIR)/src/code/z_eff_blure.o"
+ include "$(BUILD_DIR)/src/code/z_eff_shield_particle.o"
+ include "$(BUILD_DIR)/src/code/z_eff_spark.o"
+ include "$(BUILD_DIR)/src/code/z_eff_ss_dead.o"
+ include "$(BUILD_DIR)/src/code/z_effect.o"
+ include "$(BUILD_DIR)/src/code/z_effect_soft_sprite.o"
+ include "$(BUILD_DIR)/src/code/z_effect_soft_sprite_old_init.o"
+ include "$(BUILD_DIR)/src/code/z_effect_soft_sprite_dlftbls.o"
+ include "$(BUILD_DIR)/src/code/flg_set.o"
+ include "$(BUILD_DIR)/src/code/z_DLF.o"
+ include "$(BUILD_DIR)/src/code/z_actor.o"
+#if PLATFORM_IQUE
+ include "*$(BUILD_DIR)/code_bss_z_actor.o"
+#endif
+ include "$(BUILD_DIR)/src/code/z_actor_dlftbls.o"
+ include "$(BUILD_DIR)/src/code/z_bgcheck.o"
+ include "$(BUILD_DIR)/src/code/z_bg_collect.o"
+ include "$(BUILD_DIR)/src/code/z_bg_item.o"
+ include "$(BUILD_DIR)/src/code/z_camera.o"
+ include "$(BUILD_DIR)/src/code/z_collision_btltbls.o"
+ include "$(BUILD_DIR)/src/code/z_collision_check.o"
+ include "$(BUILD_DIR)/src/code/z_common_data.o"
+ include "$(BUILD_DIR)/src/code/z_debug.o"
+ include "$(BUILD_DIR)/src/code/z_debug_display.o"
+ include "$(BUILD_DIR)/src/code/z_demo.o"
+ include "$(BUILD_DIR)/src/code/z_memory_utils.o"
+ include "$(BUILD_DIR)/src/code/z_draw.o"
+ include "$(BUILD_DIR)/src/code/z_sfx_source.o"
+ include "$(BUILD_DIR)/src/code/z_elf_message.o"
+ include "$(BUILD_DIR)/src/code/z_face_reaction.o"
+ include "$(BUILD_DIR)/src/code/z_env_flags.o"
+ include "$(BUILD_DIR)/src/code/z_fcurve_data.o"
+ include "$(BUILD_DIR)/src/code/z_fcurve_data_skelanime.o"
+ include "$(BUILD_DIR)/src/code/z_game_dlftbls.o"
+ include "$(BUILD_DIR)/src/code/z_horse.o"
+ include "$(BUILD_DIR)/src/code/z_jpeg.o"
+ include "$(BUILD_DIR)/src/code/z_kaleido_setup.o"
+ include "$(BUILD_DIR)/src/code/z_kanfont.o"
+ include "$(BUILD_DIR)/src/code/z_kankyo.o"
+ include "$(BUILD_DIR)/src/code/z_lib.o"
+ include "$(BUILD_DIR)/src/code/z_lifemeter.o"
+ include "$(BUILD_DIR)/src/code/z_lights.o"
+ include "$(BUILD_DIR)/src/code/z_malloc.o"
+ include "$(BUILD_DIR)/src/code/z_map_mark.o"
+#if DEBUG_ASSETS
+ include "$(BUILD_DIR)/src/code/z_moji.o"
+#endif
+ include "$(BUILD_DIR)/src/code/z_prenmi_buff.o"
+ include "$(BUILD_DIR)/src/code/z_nulltask.o"
+ include "$(BUILD_DIR)/src/code/z_olib.o"
+ include "$(BUILD_DIR)/src/code/z_onepointdemo.o"
+ include "$(BUILD_DIR)/src/code/z_map_exp.o"
+ include "$(BUILD_DIR)/src/code/z_map_data.o"
+ include "$(BUILD_DIR)/src/code/z_parameter.o"
+ include "$(BUILD_DIR)/src/code/z_path.o"
+ include "$(BUILD_DIR)/src/code/z_frame_advance.o"
+ include "$(BUILD_DIR)/src/code/z_player_lib.o"
+ include "$(BUILD_DIR)/src/code/z_prenmi.o"
+ include "$(BUILD_DIR)/src/code/z_quake.o"
+ include "$(BUILD_DIR)/src/code/z_rcp.o"
+ include "$(BUILD_DIR)/src/code/z_room.o"
+ include "$(BUILD_DIR)/src/code/z_sample.o"
+ include "$(BUILD_DIR)/src/code/z_inventory.o"
+ include "$(BUILD_DIR)/src/code/z_scene.o"
+ include "$(BUILD_DIR)/src/code/object_table.o"
+ include "$(BUILD_DIR)/src/code/z_scene_table.o"
+ include "$(BUILD_DIR)/src/code/z_skelanime.o"
+ include "$(BUILD_DIR)/src/code/z_skin.o"
+ include "$(BUILD_DIR)/src/code/z_skin_awb.o"
+ include "$(BUILD_DIR)/src/code/z_skin_matrix.o"
+ include "$(BUILD_DIR)/src/code/z_sram.o"
+ include "$(BUILD_DIR)/src/code/z_ss_sram.o"
+ include "$(BUILD_DIR)/src/code/z_rumble.o"
+#if DEBUG_ASSETS
+ include "$(BUILD_DIR)/data/z_text.data.o"
+#endif
+ include "$(BUILD_DIR)/data/unk_8012ABC0.data.o"
+ include "$(BUILD_DIR)/src/code/z_view.o"
+ include "$(BUILD_DIR)/src/code/z_vimode.o"
+ include "$(BUILD_DIR)/src/code/z_viscvg.o"
+ include "$(BUILD_DIR)/src/code/z_vismono.o"
+ include "$(BUILD_DIR)/src/code/z_viszbuf.o"
+ include "$(BUILD_DIR)/src/code/z_vr_box.o"
+ include "$(BUILD_DIR)/src/code/z_vr_box_draw.o"
+ include "$(BUILD_DIR)/src/code/z_player_call.o"
+ include "$(BUILD_DIR)/src/code/z_fbdemo.o"
+ include "$(BUILD_DIR)/src/code/z_fbdemo_triforce.o"
+ include "$(BUILD_DIR)/src/code/z_fbdemo_wipe1.o"
+ include "$(BUILD_DIR)/src/code/z_fbdemo_circle.o"
+ include "$(BUILD_DIR)/src/code/z_fbdemo_fade.o"
+ include "$(BUILD_DIR)/src/code/shrink_window.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/code/db_camera.o"
+#endif
+ include "$(BUILD_DIR)/src/code/z_cutscene_spline.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/code/mempak.o"
+#endif
+ include "$(BUILD_DIR)/src/code/z_kaleido_manager.o"
+ include "$(BUILD_DIR)/src/code/z_kaleido_scope_call.o"
+ include "$(BUILD_DIR)/src/code/z_play.o"
+ include "$(BUILD_DIR)/src/code/PreRender.o"
+ include "$(BUILD_DIR)/src/code/TwoHeadGfxArena.o"
+ include "$(BUILD_DIR)/src/code/TwoHeadArena.o"
+ include "$(BUILD_DIR)/src/code/audio_stop_all_sfx.o"
+ include "$(BUILD_DIR)/src/code/audio_thread_manager.o"
+ include "$(BUILD_DIR)/src/code/title_setup.o"
+ include "$(BUILD_DIR)/src/code/game.o"
+ include "$(BUILD_DIR)/src/code/gamealloc.o"
+ include "$(BUILD_DIR)/src/code/graph.o"
+ include "$(BUILD_DIR)/src/code/gfxalloc.o"
+ include "$(BUILD_DIR)/src/code/listalloc.o"
+ include "$(BUILD_DIR)/src/code/main.o"
+ include "$(BUILD_DIR)/src/code/padmgr.o"
+ include "$(BUILD_DIR)/src/code/sched.o"
+ include "$(BUILD_DIR)/src/code/speed_meter.o"
+ include "$(BUILD_DIR)/src/code/sys_cfb.o"
+ include "$(BUILD_DIR)/src/code/sys_math.o"
+ include "$(BUILD_DIR)/src/code/sys_math3d.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/code/sys_math3d_draw.o"
+#endif
+ include "$(BUILD_DIR)/src/code/sys_math_atan.o"
+ include "$(BUILD_DIR)/src/code/sys_matrix.o"
+ include "$(BUILD_DIR)/src/code/sys_ucode.o"
+ include "$(BUILD_DIR)/src/code/sys_rumble.o"
+ include "$(BUILD_DIR)/src/code/sys_freeze.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/code/sys_debug_controller.o"
+#endif
+ include "$(BUILD_DIR)/src/code/irqmgr.o"
+#if PLATFORM_N64
+ include "$(BUILD_DIR)/src/code/code_n64dd_800AD410.o"
+ include "$(BUILD_DIR)/src/code/code_n64dd_800AD4C0.o"
+#endif
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/code/debug_malloc.o"
+#endif
+#if PLATFORM_N64
+ include "$(BUILD_DIR)/src/code/fault_n64.o"
+#else
+ include "$(BUILD_DIR)/src/code/fault_gc.o"
+ include "$(BUILD_DIR)/src/code/fault_gc_drawer.o"
+#endif
+ include "$(BUILD_DIR)/src/code/kanread.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/code/ucode_disas.o"
+#endif
+
+ // audio
+#if OOT_VERSION < NTSC_1_1 || !PLATFORM_N64
+ pad_text
+#endif
+ include "$(BUILD_DIR)/src/audio/internal/data.o"
+ include "$(BUILD_DIR)/src/audio/internal/synthesis.o"
+ include "$(BUILD_DIR)/src/audio/internal/heap.o"
+ include "$(BUILD_DIR)/src/audio/internal/load.o"
+ include "$(BUILD_DIR)/src/audio/internal/thread.o"
+ include "$(BUILD_DIR)/src/audio/internal/os.o"
+#if OOT_PAL_N64
+ pad_text
+ pad_text
+ pad_text
+#endif
+ include "$(BUILD_DIR)/src/audio/internal/playback.o"
+ include "$(BUILD_DIR)/src/audio/internal/effects.o"
+ include "$(BUILD_DIR)/src/audio/internal/seqplayer.o"
+ include "$(BUILD_DIR)/src/audio/game/general.o"
+#if !PLATFORM_N64 && !DEBUG_FEATURES
+ pad_text
+#endif
+ include "$(BUILD_DIR)/src/audio/game/sfx_params.o"
+ include "$(BUILD_DIR)/src/audio/game/sfx.o"
+ include "$(BUILD_DIR)/src/audio/game/sequence.o"
+ include "$(BUILD_DIR)/src/audio/game/data.o"
+ include "$(BUILD_DIR)/src/audio/game/session_config.o"
+ include "$(BUILD_DIR)/src/audio/game/session_init.o"
+
+ // libu64
+#if PLATFORM_N64
+ include "$(BUILD_DIR)/src/libu64/gfxprint.o"
+ include "$(BUILD_DIR)/src/libu64/rcp_utils.o"
+ include "$(BUILD_DIR)/src/libu64/loadfragment2_n64.o"
+ include "$(BUILD_DIR)/src/libu64/pad.o"
+ include "$(BUILD_DIR)/src/libu64/runtime.o"
+ include "$(BUILD_DIR)/src/libu64/padsetup.o"
+#elif PLATFORM_GC
+ include "$(BUILD_DIR)/src/libu64/logseverity_gc.o"
+ include "$(BUILD_DIR)/src/libu64/gfxprint.o"
+ include "$(BUILD_DIR)/src/libu64/rcp_utils.o"
+ include "$(BUILD_DIR)/src/libu64/loadfragment2_gc.o"
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libu64/mtxuty-cvt.o"
+#endif
+ include "$(BUILD_DIR)/src/libu64/relocation_gc.o"
+ include "$(BUILD_DIR)/src/libu64/load_gc.o"
+ include "$(BUILD_DIR)/src/libu64/runtime.o"
+ include "$(BUILD_DIR)/src/libu64/pad.o"
+ include "$(BUILD_DIR)/src/libu64/padsetup.o"
+#elif PLATFORM_IQUE
+ include "$(BUILD_DIR)/src/libu64/runtime.o"
+ include "$(BUILD_DIR)/src/libu64/debug.o"
+ include "$(BUILD_DIR)/src/libu64/gfxprint.o"
+ include "$(BUILD_DIR)/src/libu64/logseverity_gc.o"
+ include "$(BUILD_DIR)/src/libu64/relocation_gc.o"
+ include "$(BUILD_DIR)/src/libu64/loadfragment2_gc.o"
+ include "$(BUILD_DIR)/src/libu64/load_gc.o"
+ include "$(BUILD_DIR)/src/libu64/padsetup.o"
+ include "$(BUILD_DIR)/src/libu64/pad.o"
+ include "$(BUILD_DIR)/src/libu64/rcp_utils.o"
+#endif
+
+ // libc64
+#if PLATFORM_N64
+ include "$(BUILD_DIR)/src/libc64/math64.o"
+ include "$(BUILD_DIR)/src/libc64/fp.o"
+ include "$(BUILD_DIR)/src/libc64/malloc.o"
+ include "$(BUILD_DIR)/src/libc64/qrand.o"
+ include "$(BUILD_DIR)/src/libc64/__osMalloc_n64.o"
+ include "$(BUILD_DIR)/src/libc64/sprintf.o"
+ include "$(BUILD_DIR)/src/libc64/aprintf.o"
+#elif PLATFORM_GC
+ include "$(BUILD_DIR)/src/libc64/math64.o"
+ include "$(BUILD_DIR)/src/libc64/fp.o"
+ include "$(BUILD_DIR)/src/libc64/malloc.o"
+ include "$(BUILD_DIR)/src/libc64/qrand.o"
+ include "$(BUILD_DIR)/src/libc64/__osMalloc_gc.o"
+ include "$(BUILD_DIR)/src/libc64/sprintf.o"
+ include "$(BUILD_DIR)/src/libc64/aprintf.o"
+ include "$(BUILD_DIR)/src/libc64/sleep.o"
+#elif PLATFORM_IQUE
+ include "$(BUILD_DIR)/src/libc64/__osMalloc_gc.o"
+ include "$(BUILD_DIR)/src/libc64/aprintf.o"
+ include "$(BUILD_DIR)/src/libc64/malloc.o"
+ include "$(BUILD_DIR)/src/libc64/math64.o"
+ include "$(BUILD_DIR)/src/libc64/fp.o"
+ include "$(BUILD_DIR)/src/libc64/qrand.o"
+ include "$(BUILD_DIR)/src/libc64/sleep.o"
+ include "$(BUILD_DIR)/src/libc64/sprintf.o"
+#endif
+
+ // jpeg
+ include "$(BUILD_DIR)/src/code/jpegutils.o"
+ include "$(BUILD_DIR)/src/code/jpegdecoder.o"
+
+ // libultra
+#if PLATFORM_N64
+#include "code_libultra_n64.inc"
+#elif PLATFORM_GC
+#include "code_libultra_gc.inc"
+#elif PLATFORM_IQUE
+#include "code_libultra_ique.inc"
+#endif
+
+ // libc
+#if PLATFORM_N64
+ include "$(BUILD_DIR)/src/libc/sqrt.o"
+ include "$(BUILD_DIR)/src/libc/fmodf.o"
+ include "$(BUILD_DIR)/src/libc/memset.o"
+ include "$(BUILD_DIR)/src/libc/memmove.o"
+#elif PLATFORM_GC
+ include "$(BUILD_DIR)/src/libc/sqrt.o"
+ include "$(BUILD_DIR)/src/libc/fabsf.o"
+ include "$(BUILD_DIR)/src/libc/fmodf.o"
+ include "$(BUILD_DIR)/src/libc/memset.o"
+ include "$(BUILD_DIR)/src/libc/memmove.o"
+#elif PLATFORM_IQUE
+ include "$(BUILD_DIR)/src/libc/fmodf.o"
+ include "$(BUILD_DIR)/src/libc/memmove.o"
+ include "$(BUILD_DIR)/src/libc/fabsf.o"
+ include "$(BUILD_DIR)/src/libc/sqrt.o"
+#endif
+
+#if PLATFORM_IQUE
+ include "*$(BUILD_DIR)/code_bss_2.o"
+ include "*$(BUILD_DIR)/code_bss_3.o"
+#endif
+
+ // For some reason, the data sections of z_message and z_game_over are
+ // placed near the rodata sections of other files, so we first build this
+ // combined object before the final link.
+ include "$(BUILD_DIR)/src/code/z_message_z_game_over.o"
+ include "$(BUILD_DIR)/src/code/z_construct.o"
+
+ // Audio tables
+ include "$(BUILD_DIR)/src/audio/tables/soundfont_table.o"
+ include "$(BUILD_DIR)/assets/audio/sequence_font_table.o"
+ include "$(BUILD_DIR)/src/audio/tables/sequence_table.o"
+ include "$(BUILD_DIR)/src/audio/tables/samplebank_table.o"
+
+ // RSP microcode
+ include "$(BUILD_DIR)/data/rsp.text.o"
+ include "$(BUILD_DIR)/data/rsp.rodata.o"
+
+ // Extra files for non-matching debug builds
+#if DEBUG_FEATURES
+ include "$(BUILD_DIR)/src/libu64/mtxuty-cvt.o"
+ include "$(BUILD_DIR)/src/libultra/io/contpfs.o"
+ include "$(BUILD_DIR)/src/libultra/io/contramread.o"
+ include "$(BUILD_DIR)/src/libultra/io/contramwrite.o"
+ include "$(BUILD_DIR)/src/libultra/io/crc.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsallocatefile.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfschecker.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsdeletefile.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsfilestate.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsfindfile.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsfreeblocks.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsgetstatus.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsinitpak.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsisplug.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsreadwritefile.o"
+ include "$(BUILD_DIR)/src/libultra/io/pfsselectbank.o"
+#if PLATFORM_IQUE
+ include "$(BUILD_DIR)/src/libultra/mgu/mtxl2f.o"
+#endif
+#endif
+endseg
+
+beginseg
+ name "buffers"
+ flags NOLOAD
+ align 0x40
+ include "$(BUILD_DIR)/src/buffers/zbuffer.o"
+ include "$(BUILD_DIR)/src/buffers/gfxbuffers.o"
+ include "$(BUILD_DIR)/src/buffers/audio_heap.o"
+endseg
+
+#if PLATFORM_N64
+beginseg
+ name "n64dd"
+ compress
+ align 0x40
+ include "$(BUILD_DIR)/src/n64dd/z_n64dd.o"
+ include "$(BUILD_DIR)/src/n64dd/n64dd_data_buffer.o"
+ include "$(BUILD_DIR)/src/n64dd/n64dd_801C8000.o"
+ include "$(BUILD_DIR)/src/n64dd/n64dd_801C8940.o"
+ include "$(BUILD_DIR)/src/n64dd/n64dd_801C9440.o"
+ include "$(BUILD_DIR)/src/n64dd/n64dd_801C9B70.o"
+ include "$(BUILD_DIR)/src/n64dd/n64dd_error_headers.o"
+ include "$(BUILD_DIR)/src/n64dd/n64dd_error_bodies.o"
+ include "$(BUILD_DIR)/src/n64dd/n64dd_error_textures.o"
+ include "$(BUILD_DIR)/src/n64dd/n64dd_801CA0B0.o"
+ include "$(BUILD_DIR)/src/libleo/api/readwrite.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leofunc.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leoram.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leoint.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leocmdex.o"
+ include "$(BUILD_DIR)/src/libleo/api/getaadr2.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leoread.o"
+ include "$(BUILD_DIR)/src/libleo/api/lbatobyte.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leoinquiry.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leodiskinit.o"
+ include "$(BUILD_DIR)/src/libleo/api/seek.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leord_diskid.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leomecha.o"
+ include "$(BUILD_DIR)/src/libleo/api/spdlmotor.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leo_tbl.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leotempbuffer.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leoc2_syndrome.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leoc2ecc.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leomseq_tbl.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leomotor.o"
+ include "$(BUILD_DIR)/src/libleo/api/driveexist.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leomode_sel.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leord_capa.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leoutil.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leorezero.o"
+ include "$(BUILD_DIR)/src/libleo/api/clearqueue.o"
+ include "$(BUILD_DIR)/src/libleo/api/bytetolba.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leoreset.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leotranslat.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leotimer.o"
+ include "$(BUILD_DIR)/src/libleo/api/getkadr.o"
+ include "$(BUILD_DIR)/src/libleo/api/getaadr.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leoglobals.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leowrite.o"
+ include "$(BUILD_DIR)/src/libleo/api/cjcreateleomanager.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leointerrupt.o"
+ include "$(BUILD_DIR)/src/libleo/api/cacreateleomanager.o"
+ include "$(BUILD_DIR)/src/libleo/api/testunitready.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leotestunit.o"
+ include "$(BUILD_DIR)/src/libleo/leo/leoseek.o"
+endseg
+#endif
+
+beginseg
+ name "ovl_title"
+ compress
+ address 0x80800000
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_title/z_title.o"
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_title/ovl_title_reloc.o"
+endseg
+
+beginseg
+ name "ovl_select"
+ compress
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_select/z_select.o"
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_select/ovl_select_reloc.o"
+endseg
+
+beginseg
+ name "ovl_opening"
+ compress
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_opening/z_opening.o"
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_opening/ovl_opening_reloc.o"
+endseg
+
+beginseg
+ name "ovl_file_choose"
+ compress
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_nameset_data.o"
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.o"
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_nameset.o"
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/z_file_choose.o"
+ include "$(BUILD_DIR)/src/overlays/gamestates/ovl_file_choose/ovl_file_choose_reloc.o"
+endseg
+
+beginseg
+ name "ovl_kaleido_scope"
+ compress
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.o"
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_debug.o"
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.o"
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.o"
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.o"
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.o"
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.o"
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.o"
+#if !OOT_MQ
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark_data.o"
+#else
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark_data_mq.o"
+#endif
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_kaleido_scope/ovl_kaleido_scope_reloc.o"
+endseg
+
+beginseg
+ name "ovl_player_actor"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_player_actor/z_player.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_player_actor/ovl_player_actor_reloc.o"
+endseg
+
+beginseg
+ name "ovl_map_mark_data"
+ compress
+#if !OOT_MQ
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_map_mark_data/z_map_mark_data.o"
+#else
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_map_mark_data/z_map_mark_data_mq.o"
+#endif
+ include "$(BUILD_DIR)/src/overlays/misc/ovl_map_mark_data/ovl_map_mark_data_reloc.o"
+endseg
+
+beginseg
+ name "ovl_En_Test"
+ compress
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test/z_en_test.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Test/ovl_En_Test_reloc.o"
+endseg
+
+// Overlays for most actors and effects are reordered between versions. On N64 and iQue,
+// the overlays are in some arbitrary order, while on GameCube they are sorted alphabetically.
+#if !PLATFORM_GC
+#include "overlays_n64_ique.inc"
+#else
+#include "overlays_gc.inc"
+#endif
+
+beginseg
+ name "gameplay_keep"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/gameplay_keep/gameplay_keep.o"
+ number 4
+endseg
+
+beginseg
+ name "gameplay_field_keep"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/gameplay_field_keep/gameplay_field_keep.o"
+ number 5
+endseg
+
+beginseg
+ name "gameplay_dangeon_keep"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.o"
+ number 5
+endseg
+
+beginseg
+ name "gameplay_object_exchange_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/gameplay_object_exchange_static.o"
+endseg
+
+beginseg
+ name "object_link_boy"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_link_boy/object_link_boy.o"
+ number 6
+endseg
+
+beginseg
+ name "object_link_child"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_link_child/object_link_child.o"
+ number 6
+endseg
+
+beginseg
+ name "object_box"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_box/object_box.o"
+ number 6
+endseg
+
+beginseg
+ name "object_human"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_human/object_human.o"
+ number 6
+endseg
+
+beginseg
+ name "object_okuta"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_okuta/object_okuta.o"
+ number 6
+endseg
+
+beginseg
+ name "object_poh"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_poh/object_poh.o"
+ number 6
+endseg
+
+beginseg
+ name "object_wallmaster"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_wallmaster/object_wallmaster.o"
+ number 6
+endseg
+
+beginseg
+ name "object_dy_obj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_dy_obj/object_dy_obj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_firefly"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_firefly/object_firefly.o"
+ number 6
+endseg
+
+beginseg
+ name "object_dodongo"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_dodongo/object_dodongo.o"
+ number 6
+endseg
+
+beginseg
+ name "object_fire"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_fire/object_fire.o"
+ number 6
+endseg
+
+beginseg
+ name "object_niw"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_niw/object_niw.o"
+ number 6
+endseg
+
+beginseg
+ name "object_tite"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_tite/object_tite.o"
+ number 6
+endseg
+
+beginseg
+ name "object_reeba"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_reeba/object_reeba.o"
+ number 6
+endseg
+
+beginseg
+ name "object_peehat"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_peehat/object_peehat.o"
+ number 6
+endseg
+
+beginseg
+ name "object_kingdodongo"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_kingdodongo/object_kingdodongo.o"
+ number 6
+endseg
+
+beginseg
+ name "object_horse"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_horse/object_horse.o"
+ number 6
+endseg
+
+beginseg
+ name "object_zf"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_zf/object_zf.o"
+ number 6
+endseg
+
+beginseg
+ name "object_goma"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_goma/object_goma.o"
+ number 6
+endseg
+
+beginseg
+ name "object_zl1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_zl1/object_zl1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gol"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gol/object_gol.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bubble"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bubble/object_bubble.o"
+ number 6
+endseg
+
+beginseg
+ name "object_dodojr"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_dodojr/object_dodojr.o"
+ number 6
+endseg
+
+beginseg
+ name "object_torch2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_torch2/object_torch2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bl"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bl/object_bl.o"
+ number 6
+endseg
+
+beginseg
+ name "object_tp"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_tp/object_tp.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA1/object_oA1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_st"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_st/object_st.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bw"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bw/object_bw.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ei"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ei/object_ei.o"
+ number 6
+endseg
+
+beginseg
+ name "object_horse_normal"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_horse_normal/object_horse_normal.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oB1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oB1/object_oB1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_o_anime"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_o_anime/object_o_anime.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot04_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot04_objects/object_spot04_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ddan_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ddan_objects/object_ddan_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_hidan_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_hidan_objects/object_hidan_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_horse_ganon"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_horse_ganon/object_horse_ganon.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA2/object_oA2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot00_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot00_objects/object_spot00_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mb"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mb/object_mb.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bombf"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bombf/object_bombf.o"
+ number 6
+endseg
+
+beginseg
+ name "object_sk2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_sk2/object_sk2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE1/object_oE1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE_anime"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE_anime/object_oE_anime.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE2/object_oE2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ydan_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ydan_objects/object_ydan_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gnd"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gnd/object_gnd.o"
+ number 6
+endseg
+
+beginseg
+ name "object_am"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_am/object_am.o"
+ number 6
+endseg
+
+beginseg
+ name "object_dekubaba"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_dekubaba/object_dekubaba.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA3/object_oA3.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA4/object_oA4.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA5/object_oA5.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA6/object_oA6.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA7/object_oA7.o"
+ number 6
+endseg
+
+beginseg
+ name "object_jj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_jj/object_jj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA8/object_oA8.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA9/object_oA9.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oB2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oB2/object_oB2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oB3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oB3/object_oB3.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oB4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oB4/object_oB4.o"
+ number 6
+endseg
+
+beginseg
+ name "object_horse_zelda"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_horse_zelda/object_horse_zelda.o"
+ number 6
+endseg
+
+beginseg
+ name "object_opening_demo1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_opening_demo1/object_opening_demo1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_warp1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_warp1/object_warp1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_b_heart"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_b_heart/object_b_heart.o"
+ number 6
+endseg
+
+beginseg
+ name "object_dekunuts"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_dekunuts/object_dekunuts.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE3/object_oE3.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE4/object_oE4.o"
+ number 6
+endseg
+
+beginseg
+ name "object_menkuri_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_menkuri_objects/object_menkuri_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE5"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE5/object_oE5.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE6"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE6/object_oE6.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE7"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE7/object_oE7.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE8"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE8/object_oE8.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE9"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE9/object_oE9.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE10/object_oE10.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE11/object_oE11.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE12/object_oE12.o"
+ number 6
+endseg
+
+beginseg
+ name "object_vali"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_vali/object_vali.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA10/object_oA10.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oA11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oA11/object_oA11.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mizu_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mizu_objects/object_mizu_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_fhg"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_fhg/object_fhg.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ossan"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ossan/object_ossan.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mori_hineri1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mori_hineri1/object_mori_hineri1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_Bb"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_Bb/object_Bb.o"
+ number 6
+endseg
+
+beginseg
+ name "object_toki_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_toki_objects/object_toki_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_yukabyun"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_yukabyun/object_yukabyun.o"
+ number 6
+endseg
+
+beginseg
+ name "object_zl2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_zl2/object_zl2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mjin"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mjin/object_mjin.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mjin_flash"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mjin_flash/object_mjin_flash.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mjin_dark"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mjin_dark/object_mjin_dark.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mjin_flame"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mjin_flame/object_mjin_flame.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mjin_ice"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mjin_ice/object_mjin_ice.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mjin_soul"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mjin_soul/object_mjin_soul.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mjin_wind"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mjin_wind/object_mjin_wind.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mjin_oka"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mjin_oka/object_mjin_oka.o"
+ number 6
+endseg
+
+beginseg
+ name "object_haka_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_haka_objects/object_haka_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot06_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot06_objects/object_spot06_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ice_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ice_objects/object_ice_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_relay_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_relay_objects/object_relay_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mori_hineri1a"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mori_hineri1a/object_mori_hineri1a.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mori_hineri2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mori_hineri2/object_mori_hineri2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mori_hineri2a"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mori_hineri2a/object_mori_hineri2a.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mori_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mori_objects/object_mori_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mori_tex"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mori_tex/object_mori_tex.o"
+ number 8
+endseg
+
+beginseg
+ name "object_spot08_obj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot08_obj/object_spot08_obj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_warp2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_warp2/object_warp2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_hata"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_hata/object_hata.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bird"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bird/object_bird.o"
+ number 6
+endseg
+
+beginseg
+ name "object_wood02"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_wood02/object_wood02.o"
+ number 6
+endseg
+
+beginseg
+ name "object_lightbox"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_lightbox/object_lightbox.o"
+ number 6
+endseg
+
+beginseg
+ name "object_pu_box"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_pu_box/object_pu_box.o"
+ number 6
+endseg
+
+beginseg
+ name "object_trap"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_trap/object_trap.o"
+ number 6
+endseg
+
+beginseg
+ name "object_vase"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_vase/object_vase.o"
+ number 6
+endseg
+
+beginseg
+ name "object_im"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_im/object_im.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ta"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ta/object_ta.o"
+ number 6
+endseg
+
+beginseg
+ name "object_tk"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_tk/object_tk.o"
+ number 6
+endseg
+
+beginseg
+ name "object_xc"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_xc/object_xc.o"
+ number 6
+endseg
+
+beginseg
+ name "object_vm"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_vm/object_vm.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bv"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bv/object_bv.o"
+ number 6
+endseg
+
+beginseg
+ name "object_hakach_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_hakach_objects/object_hakach_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_efc_crystal_light"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_efc_crystal_light/object_efc_crystal_light.o"
+ number 6
+endseg
+
+beginseg
+ name "object_efc_fire_ball"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_efc_fire_ball/object_efc_fire_ball.o"
+ number 6
+endseg
+
+beginseg
+ name "object_efc_flash"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_efc_flash/object_efc_flash.o"
+ number 6
+endseg
+
+beginseg
+ name "object_efc_lgt_shower"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_efc_lgt_shower/object_efc_lgt_shower.o"
+ number 6
+endseg
+
+beginseg
+ name "object_efc_star_field"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_efc_star_field/object_efc_star_field.o"
+ number 6
+endseg
+
+beginseg
+ name "object_god_lgt"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_god_lgt/object_god_lgt.o"
+ number 6
+endseg
+
+beginseg
+ name "object_light_ring"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_light_ring/object_light_ring.o"
+ number 6
+endseg
+
+beginseg
+ name "object_triforce_spot"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_triforce_spot/object_triforce_spot.o"
+ number 6
+endseg
+
+beginseg
+ name "object_medal"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_medal/object_medal.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bdan_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bdan_objects/object_bdan_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_sd"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_sd/object_sd.o"
+ number 6
+endseg
+
+beginseg
+ name "object_rd"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_rd/object_rd.o"
+ number 6
+endseg
+
+beginseg
+ name "object_po_sisters"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_po_sisters/object_po_sisters.o"
+ number 6
+endseg
+
+beginseg
+ name "object_heavy_object"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_heavy_object/object_heavy_object.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gndd"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gndd/object_gndd.o"
+ number 6
+endseg
+
+beginseg
+ name "object_fd"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_fd/object_fd.o"
+ number 6
+endseg
+
+beginseg
+ name "object_du"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_du/object_du.o"
+ number 6
+endseg
+
+beginseg
+ name "object_fw"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_fw/object_fw.o"
+ number 6
+endseg
+
+beginseg
+ name "object_horse_link_child"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_horse_link_child/object_horse_link_child.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot02_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot02_objects/object_spot02_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_haka"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_haka/object_haka.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ru1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ru1/object_ru1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_syokudai"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_syokudai/object_syokudai.o"
+ number 6
+endseg
+
+beginseg
+ name "object_fd2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_fd2/object_fd2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_dh"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_dh/object_dh.o"
+ number 6
+endseg
+
+beginseg
+ name "object_rl"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_rl/object_rl.o"
+ number 6
+endseg
+
+beginseg
+ name "object_efc_tw"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_efc_tw/object_efc_tw.o"
+ number 6
+endseg
+
+beginseg
+ name "object_demo_tre_lgt"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_demo_tre_lgt/object_demo_tre_lgt.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_key"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_key/object_gi_key.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mir_ray"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mir_ray/object_mir_ray.o"
+ number 6
+endseg
+
+beginseg
+ name "object_brob"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_brob/object_brob.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_jewel"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_jewel/object_gi_jewel.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot09_obj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot09_obj/object_spot09_obj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot18_obj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot18_obj/object_spot18_obj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bdoor"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bdoor/object_bdoor.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot17_obj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot17_obj/object_spot17_obj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_shop_dungen"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_shop_dungen/object_shop_dungen.o"
+ number 6
+endseg
+
+beginseg
+ name "object_nb"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_nb/object_nb.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mo"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mo/object_mo.o"
+ number 6
+endseg
+
+beginseg
+ name "object_sb"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_sb/object_sb.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_melody"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_melody/object_gi_melody.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_heart"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_heart/object_gi_heart.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_compass"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_compass/object_gi_compass.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_bosskey"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_bosskey/object_gi_bosskey.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_medal"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_medal/object_gi_medal.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_nuts"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_nuts/object_gi_nuts.o"
+ number 6
+endseg
+
+beginseg
+ name "object_sa"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_sa/object_sa.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_hearts"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_hearts/object_gi_hearts.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_arrowcase"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_arrowcase/object_gi_arrowcase.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_bombpouch"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_bombpouch/object_gi_bombpouch.o"
+ number 6
+endseg
+
+beginseg
+ name "object_in"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_in/object_in.o"
+ number 6
+endseg
+
+beginseg
+ name "object_tr"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_tr/object_tr.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot16_obj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot16_obj/object_spot16_obj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE1s"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE1s/object_oE1s.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oE4s"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oE4s/object_oE4s.o"
+ number 6
+endseg
+
+beginseg
+ name "object_os_anime"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_os_anime/object_os_anime.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_bottle"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_bottle/object_gi_bottle.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_stick"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_stick/object_gi_stick.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_map"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_map/object_gi_map.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oF1d_map"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oF1d_map/object_oF1d_map.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ru2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ru2/object_ru2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_shield_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_shield_1/object_gi_shield_1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_dekujr"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_dekujr/object_dekujr.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_magicpot"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_magicpot/object_gi_magicpot.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_bomb_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_bomb_1/object_gi_bomb_1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_oF1s"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_oF1s/object_oF1s.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ma2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ma2/object_ma2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_purse"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_purse/object_gi_purse.o"
+ number 6
+endseg
+
+beginseg
+ name "object_hni"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_hni/object_hni.o"
+ number 6
+endseg
+
+beginseg
+ name "object_tw"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_tw/object_tw.o"
+ number 6
+endseg
+
+beginseg
+ name "object_rr"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_rr/object_rr.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bxa"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bxa/object_bxa.o"
+ number 6
+endseg
+
+beginseg
+ name "object_anubice"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_anubice/object_anubice.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_gerudo"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_gerudo/object_gi_gerudo.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_arrow"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_arrow/object_gi_arrow.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_bomb_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_bomb_2/object_gi_bomb_2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_egg"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_egg/object_gi_egg.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_scale"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_scale/object_gi_scale.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_shield_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_shield_2/object_gi_shield_2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_hookshot"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_hookshot/object_gi_hookshot.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_ocarina"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_ocarina/object_gi_ocarina.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_milk"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_milk/object_gi_milk.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ma1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ma1/object_ma1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ganon"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ganon/object_ganon.o"
+ number 6
+endseg
+
+beginseg
+ name "object_sst"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_sst/object_sst.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ny"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ny/object_ny.o"
+ number 6
+endseg
+
+beginseg
+ name "object_fr"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_fr/object_fr.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_pachinko"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_pachinko/object_gi_pachinko.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_boomerang"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_boomerang/object_gi_boomerang.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_bow"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_bow/object_gi_bow.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_glasses"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_glasses/object_gi_glasses.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_liquid"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_liquid/object_gi_liquid.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ani"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ani/object_ani.o"
+ number 6
+endseg
+
+beginseg
+ name "object_demo_6k"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_demo_6k/object_demo_6k.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_shield_3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_shield_3/object_gi_shield_3.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_letter"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_letter/object_gi_letter.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot15_obj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot15_obj/object_spot15_obj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_jya_obj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_jya_obj/object_jya_obj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_clothes"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_clothes/object_gi_clothes.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_bean"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_bean/object_gi_bean.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_fish"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_fish/object_gi_fish.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_saw"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_saw/object_gi_saw.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_hammer"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_hammer/object_gi_hammer.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_grass"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_grass/object_gi_grass.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_longsword"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_longsword/object_gi_longsword.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot01_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot01_objects/object_spot01_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_md"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_md/object_md.o"
+ number 6
+endseg
+
+beginseg
+ name "object_km1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_km1/object_km1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_kw1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_kw1/object_kw1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_zo"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_zo/object_zo.o"
+ number 6
+endseg
+
+beginseg
+ name "object_kz"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_kz/object_kz.o"
+ number 6
+endseg
+
+beginseg
+ name "object_umajump"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_umajump/object_umajump.o"
+ number 6
+endseg
+
+beginseg
+ name "object_masterkokiri"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_masterkokiri/object_masterkokiri.o"
+ number 6
+endseg
+
+beginseg
+ name "object_masterkokirihead"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_masterkokirihead/object_masterkokirihead.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mastergolon"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mastergolon/object_mastergolon.o"
+ number 6
+endseg
+
+beginseg
+ name "object_masterzoora"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_masterzoora/object_masterzoora.o"
+ number 6
+endseg
+
+beginseg
+ name "object_aob"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_aob/object_aob.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ik"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ik/object_ik.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ahg"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ahg/object_ahg.o"
+ number 6
+endseg
+
+beginseg
+ name "object_cne"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_cne/object_cne.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_niwatori"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_niwatori/object_gi_niwatori.o"
+ number 6
+endseg
+
+beginseg
+ name "object_skj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_skj/object_skj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_bottle_letter"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_bottle_letter/object_gi_bottle_letter.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bji"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bji/object_bji.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bba"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bba/object_bba.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_ocarina_0"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_ocarina_0/object_gi_ocarina_0.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ds"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ds/object_ds.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ane"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ane/object_ane.o"
+ number 6
+endseg
+
+beginseg
+ name "object_boj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_boj/object_boj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot03_object"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot03_object/object_spot03_object.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot07_object"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot07_object/object_spot07_object.o"
+ number 6
+endseg
+
+beginseg
+ name "object_fz"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_fz/object_fz.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bob"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bob/object_bob.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ge1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ge1/object_ge1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_yabusame_point"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_yabusame_point/object_yabusame_point.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_boots_2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_boots_2/object_gi_boots_2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_seed"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_seed/object_gi_seed.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gnd_magic"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gnd_magic/object_gnd_magic.o"
+ number 6
+endseg
+
+beginseg
+ name "object_d_elevator"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_d_elevator/object_d_elevator.o"
+ number 6
+endseg
+
+beginseg
+ name "object_d_hsblock"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_d_hsblock/object_d_hsblock.o"
+ number 6
+endseg
+
+beginseg
+ name "object_d_lift"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_d_lift/object_d_lift.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mamenoki"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mamenoki/object_mamenoki.o"
+ number 6
+endseg
+
+beginseg
+ name "object_goroiwa"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_goroiwa/object_goroiwa.o"
+ number 6
+endseg
+
+beginseg
+ name "object_toryo"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_toryo/object_toryo.o"
+ number 6
+endseg
+
+beginseg
+ name "object_daiku"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_daiku/object_daiku.o"
+ number 6
+endseg
+
+beginseg
+ name "object_nwc"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_nwc/object_nwc.o"
+ number 6
+endseg
+
+beginseg
+ name "object_blkobj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_blkobj/object_blkobj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gm"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gm/object_gm.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ms"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ms/object_ms.o"
+ number 6
+endseg
+
+beginseg
+ name "object_hs"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_hs/object_hs.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ingate"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ingate/object_ingate.o"
+ number 6
+endseg
+
+beginseg
+ name "object_lightswitch"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_lightswitch/object_lightswitch.o"
+ number 6
+endseg
+
+beginseg
+ name "object_kusa"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_kusa/object_kusa.o"
+ number 6
+endseg
+
+beginseg
+ name "object_tsubo"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_tsubo/object_tsubo.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_gloves"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_gloves/object_gi_gloves.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_coin"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_coin/object_gi_coin.o"
+ number 6
+endseg
+
+beginseg
+ name "object_kanban"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_kanban/object_kanban.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gjyo_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gjyo_objects/object_gjyo_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_owl"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_owl/object_owl.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mk"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mk/object_mk.o"
+ number 6
+endseg
+
+beginseg
+ name "object_fu"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_fu/object_fu.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_ki_tan_mask"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_ki_tan_mask/object_gi_ki_tan_mask.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_redead_mask"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_redead_mask/object_gi_redead_mask.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_skj_mask"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_skj_mask/object_gi_skj_mask.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_rabit_mask"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_rabit_mask/object_gi_rabit_mask.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_truth_mask"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_truth_mask/object_gi_truth_mask.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ganon_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ganon_objects/object_ganon_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_siofuki"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_siofuki/object_siofuki.o"
+ number 6
+endseg
+
+beginseg
+ name "object_stream"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_stream/object_stream.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mm"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mm/object_mm.o"
+ number 6
+endseg
+
+beginseg
+ name "object_fa"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_fa/object_fa.o"
+ number 6
+endseg
+
+beginseg
+ name "object_os"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_os/object_os.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_eye_lotion"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_eye_lotion/object_gi_eye_lotion.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_powder"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_powder/object_gi_powder.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_mushroom"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_mushroom/object_gi_mushroom.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_ticketstone"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_ticketstone/object_gi_ticketstone.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_brokensword"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_brokensword/object_gi_brokensword.o"
+ number 6
+endseg
+
+beginseg
+ name "object_js"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_js/object_js.o"
+ number 6
+endseg
+
+beginseg
+ name "object_cs"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_cs/object_cs.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_prescription"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_prescription/object_gi_prescription.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_bracelet"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_bracelet/object_gi_bracelet.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_soldout"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_soldout/object_gi_soldout.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_frog"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_frog/object_gi_frog.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mag"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mag/object_mag.o"
+ number 6
+endseg
+
+beginseg
+ name "object_door_gerudo"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_door_gerudo/object_door_gerudo.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gt"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gt/object_gt.o"
+ number 6
+endseg
+
+beginseg
+ name "object_efc_erupc"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_efc_erupc/object_efc_erupc.o"
+ number 6
+endseg
+
+beginseg
+ name "object_zl2_anime1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_zl2_anime1/object_zl2_anime1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_zl2_anime2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_zl2_anime2/object_zl2_anime2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_golonmask"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_golonmask/object_gi_golonmask.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_zoramask"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_zoramask/object_gi_zoramask.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_gerudomask"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_gerudomask/object_gi_gerudomask.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ganon2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ganon2/object_ganon2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ka"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ka/object_ka.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ts"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ts/object_ts.o"
+ number 6
+endseg
+
+beginseg
+ name "object_zg"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_zg/object_zg.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_hoverboots"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_hoverboots/object_gi_hoverboots.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_m_arrow"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_m_arrow/object_gi_m_arrow.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ds2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ds2/object_ds2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ec"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ec/object_ec.o"
+ number 6
+endseg
+
+beginseg
+ name "object_fish"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_fish/object_fish.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_sutaru"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_sutaru/object_gi_sutaru.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_goddess"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_goddess/object_gi_goddess.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ssh"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ssh/object_ssh.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bigokuta"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bigokuta/object_bigokuta.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bg"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bg/object_bg.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot05_objects"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot05_objects/object_spot05_objects.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot12_obj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot12_obj/object_spot12_obj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bombiwa"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bombiwa/object_bombiwa.o"
+ number 6
+endseg
+
+beginseg
+ name "object_hintnuts"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_hintnuts/object_hintnuts.o"
+ number 6
+endseg
+
+beginseg
+ name "object_rs"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_rs/object_rs.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot00_break"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot00_break/object_spot00_break.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gla"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gla/object_gla.o"
+ number 6
+endseg
+
+beginseg
+ name "object_shopnuts"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_shopnuts/object_shopnuts.o"
+ number 6
+endseg
+
+beginseg
+ name "object_geldb"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_geldb/object_geldb.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gr"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gr/object_gr.o"
+ number 6
+endseg
+
+beginseg
+ name "object_dog"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_dog/object_dog.o"
+ number 6
+endseg
+
+beginseg
+ name "object_jya_iron"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_jya_iron/object_jya_iron.o"
+ number 6
+endseg
+
+beginseg
+ name "object_jya_door"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_jya_door/object_jya_door.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot01_objects2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot01_objects2/object_spot01_objects2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot11_obj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot11_obj/object_spot11_obj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_kibako2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_kibako2/object_kibako2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_dns"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_dns/object_dns.o"
+ number 6
+endseg
+
+beginseg
+ name "object_dnk"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_dnk/object_dnk.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_fire"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_fire/object_gi_fire.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_insect"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_insect/object_gi_insect.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_butterfly"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_butterfly/object_gi_butterfly.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_ghost"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_ghost/object_gi_ghost.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_soul"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_soul/object_gi_soul.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bowl"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bowl/object_bowl.o"
+ number 6
+endseg
+
+beginseg
+ name "object_po_field"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_po_field/object_po_field.o"
+ number 6
+endseg
+
+beginseg
+ name "object_demo_kekkai"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_demo_kekkai/object_demo_kekkai.o"
+ number 6
+endseg
+
+beginseg
+ name "object_efc_doughnut"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_efc_doughnut/object_efc_doughnut.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_dekupouch"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_dekupouch/object_gi_dekupouch.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ganon_anime1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ganon_anime1/object_ganon_anime1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ganon_anime2"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ganon_anime2/object_ganon_anime2.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ganon_anime3"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ganon_anime3/object_ganon_anime3.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_rupy"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_rupy/object_gi_rupy.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot01_matoya"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot01_matoya/object_spot01_matoya.o"
+ number 6
+endseg
+
+beginseg
+ name "object_spot01_matoyab"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_spot01_matoyab/object_spot01_matoyab.o"
+ number 6
+endseg
+
+beginseg
+ name "object_po_composer"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_po_composer/object_po_composer.o"
+ number 6
+endseg
+
+beginseg
+ name "object_mu"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_mu/object_mu.o"
+ number 6
+endseg
+
+beginseg
+ name "object_wf"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_wf/object_wf.o"
+ number 6
+endseg
+
+beginseg
+ name "object_skb"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_skb/object_skb.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gj"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gj/object_gj.o"
+ number 6
+endseg
+
+beginseg
+ name "object_geff"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_geff/object_geff.o"
+ number 6
+endseg
+
+beginseg
+ name "object_haka_door"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_haka_door/object_haka_door.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gs"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gs/object_gs.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ps"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ps/object_ps.o"
+ number 6
+endseg
+
+beginseg
+ name "object_bwall"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_bwall/object_bwall.o"
+ number 6
+endseg
+
+beginseg
+ name "object_crow"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_crow/object_crow.o"
+ number 6
+endseg
+
+beginseg
+ name "object_cow"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_cow/object_cow.o"
+ number 6
+endseg
+
+beginseg
+ name "object_cob"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_cob/object_cob.o"
+ number 6
+endseg
+
+beginseg
+ name "object_gi_sword_1"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_gi_sword_1/object_gi_sword_1.o"
+ number 6
+endseg
+
+beginseg
+ name "object_door_killer"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_door_killer/object_door_killer.o"
+ number 6
+endseg
+
+beginseg
+ name "object_ouke_haka"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_ouke_haka/object_ouke_haka.o"
+ number 6
+endseg
+
+beginseg
+ name "object_timeblock"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_timeblock/object_timeblock.o"
+ number 6
+endseg
+
+beginseg
+ name "object_zl4"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/objects/object_zl4/object_zl4.o"
+ number 6
+endseg
+
+beginseg
+ name "g_pn_01"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_01.o"
+endseg
+
+beginseg
+ name "g_pn_02"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_02.o"
+endseg
+
+beginseg
+ name "g_pn_03"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_03.o"
+endseg
+
+beginseg
+ name "g_pn_04"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_04.o"
+endseg
+
+beginseg
+ name "g_pn_05"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_05.o"
+endseg
+
+beginseg
+ name "g_pn_06"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_06.o"
+endseg
+
+beginseg
+ name "g_pn_07"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_07.o"
+endseg
+
+beginseg
+ name "g_pn_08"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_08.o"
+endseg
+
+beginseg
+ name "g_pn_09"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_09.o"
+endseg
+
+beginseg
+ name "g_pn_10"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_10.o"
+endseg
+
+beginseg
+ name "g_pn_11"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_11.o"
+endseg
+
+beginseg
+ name "g_pn_12"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_12.o"
+endseg
+
+beginseg
+ name "g_pn_13"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_13.o"
+endseg
+
+beginseg
+ name "g_pn_14"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_14.o"
+endseg
+
+beginseg
+ name "g_pn_15"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_15.o"
+endseg
+
+beginseg
+ name "g_pn_16"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_16.o"
+endseg
+
+beginseg
+ name "g_pn_17"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_17.o"
+endseg
+
+beginseg
+ name "g_pn_18"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_18.o"
+endseg
+
+beginseg
+ name "g_pn_19"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_19.o"
+endseg
+
+beginseg
+ name "g_pn_20"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_20.o"
+endseg
+
+beginseg
+ name "g_pn_21"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_21.o"
+endseg
+
+beginseg
+ name "g_pn_22"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_22.o"
+endseg
+
+beginseg
+ name "g_pn_23"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_23.o"
+endseg
+
+beginseg
+ name "g_pn_24"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_24.o"
+endseg
+
+beginseg
+ name "g_pn_25"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_25.o"
+endseg
+
+beginseg
+ name "g_pn_26"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_26.o"
+endseg
+
+beginseg
+ name "g_pn_27"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_27.o"
+endseg
+
+beginseg
+ name "g_pn_28"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_28.o"
+endseg
+
+beginseg
+ name "g_pn_29"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_29.o"
+endseg
+
+beginseg
+ name "g_pn_30"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_30.o"
+endseg
+
+beginseg
+ name "g_pn_31"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_31.o"
+endseg
+
+beginseg
+ name "g_pn_32"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_32.o"
+endseg
+
+beginseg
+ name "g_pn_33"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_33.o"
+endseg
+
+beginseg
+ name "g_pn_34"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_34.o"
+endseg
+
+beginseg
+ name "g_pn_35"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_35.o"
+endseg
+
+beginseg
+ name "g_pn_36"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_36.o"
+endseg
+
+beginseg
+ name "g_pn_37"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_37.o"
+endseg
+
+beginseg
+ name "g_pn_38"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_38.o"
+endseg
+
+beginseg
+ name "g_pn_39"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_39.o"
+endseg
+
+beginseg
+ name "g_pn_40"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_40.o"
+endseg
+
+beginseg
+ name "g_pn_41"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_41.o"
+endseg
+
+beginseg
+ name "g_pn_42"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_42.o"
+endseg
+
+beginseg
+ name "g_pn_43"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_43.o"
+endseg
+
+beginseg
+ name "g_pn_44"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_44.o"
+endseg
+
+beginseg
+ name "g_pn_45"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_45.o"
+endseg
+
+beginseg
+ name "g_pn_46"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_46.o"
+endseg
+
+beginseg
+ name "g_pn_47"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_47.o"
+endseg
+
+beginseg
+ name "g_pn_48"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_48.o"
+endseg
+
+beginseg
+ name "g_pn_49"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_49.o"
+endseg
+
+beginseg
+ name "g_pn_50"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_50.o"
+endseg
+
+beginseg
+ name "g_pn_51"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_51.o"
+endseg
+
+beginseg
+ name "g_pn_52"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_52.o"
+endseg
+
+beginseg
+ name "g_pn_53"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_53.o"
+endseg
+
+beginseg
+ name "g_pn_54"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_54.o"
+endseg
+
+beginseg
+ name "g_pn_55"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_55.o"
+endseg
+
+beginseg
+ name "g_pn_56"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_56.o"
+endseg
+
+beginseg
+ name "g_pn_57"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/place_title_cards/g_pn_57.o"
+endseg
+
+beginseg
+ name "z_select_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/misc/z_select_static/z_select_static.o"
+ number 1
+endseg
+
+beginseg
+ name "nintendo_rogo_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/nintendo_rogo_static/nintendo_rogo_static.o"
+ number 1
+endseg
+
+beginseg
+ name "title_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/title_static/title_static.o"
+ number 1
+endseg
+
+beginseg
+ name "parameter_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/parameter_static/parameter_static.o"
+ number 2
+endseg
+
+beginseg
+ name "vr_fine0_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine0_static.o"
+endseg
+
+beginseg
+ name "vr_fine0_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine0_pal_static.o"
+endseg
+
+beginseg
+ name "vr_fine1_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine1_static.o"
+endseg
+
+beginseg
+ name "vr_fine1_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine1_pal_static.o"
+endseg
+
+beginseg
+ name "vr_fine2_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine2_static.o"
+endseg
+
+beginseg
+ name "vr_fine2_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine2_pal_static.o"
+endseg
+
+beginseg
+ name "vr_fine3_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine3_static.o"
+endseg
+
+beginseg
+ name "vr_fine3_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_fine3_pal_static.o"
+endseg
+
+beginseg
+ name "vr_cloud0_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud0_static.o"
+endseg
+
+beginseg
+ name "vr_cloud0_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud0_pal_static.o"
+endseg
+
+beginseg
+ name "vr_cloud1_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud1_static.o"
+endseg
+
+beginseg
+ name "vr_cloud1_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud1_pal_static.o"
+endseg
+
+beginseg
+ name "vr_cloud2_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud2_static.o"
+endseg
+
+beginseg
+ name "vr_cloud2_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud2_pal_static.o"
+endseg
+
+beginseg
+ name "vr_cloud3_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud3_static.o"
+endseg
+
+beginseg
+ name "vr_cloud3_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_cloud3_pal_static.o"
+endseg
+
+beginseg
+ name "vr_holy0_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_holy0_static.o"
+endseg
+
+beginseg
+ name "vr_holy0_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_holy0_pal_static.o"
+endseg
+
+beginseg
+ name "vr_holy1_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_holy1_static.o"
+endseg
+
+beginseg
+ name "vr_holy1_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/skyboxes/vr_holy1_pal_static.o"
+endseg
+
+beginseg
+ name "vr_MDVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MDVR_static.o"
+endseg
+
+beginseg
+ name "vr_MDVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MDVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_MNVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MNVR_static.o"
+endseg
+
+beginseg
+ name "vr_MNVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MNVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_RUVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_RUVR_static.o"
+endseg
+
+beginseg
+ name "vr_RUVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_RUVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_LHVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_LHVR_static.o"
+endseg
+
+beginseg
+ name "vr_LHVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_LHVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_KHVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KHVR_static.o"
+endseg
+
+beginseg
+ name "vr_KHVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KHVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_K3VR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K3VR_static.o"
+endseg
+
+beginseg
+ name "vr_K3VR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K3VR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_K4VR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K4VR_static.o"
+endseg
+
+beginseg
+ name "vr_K4VR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K4VR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_K5VR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K5VR_static.o"
+endseg
+
+beginseg
+ name "vr_K5VR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_K5VR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_SP1a_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_SP1a_static.o"
+endseg
+
+beginseg
+ name "vr_SP1a_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_SP1a_pal_static.o"
+endseg
+
+beginseg
+ name "vr_MLVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MLVR_static.o"
+endseg
+
+beginseg
+ name "vr_MLVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_MLVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_KKRVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KKRVR_static.o"
+endseg
+
+beginseg
+ name "vr_KKRVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KKRVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_KR3VR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KR3VR_static.o"
+endseg
+
+beginseg
+ name "vr_KR3VR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KR3VR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_IPVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_IPVR_static.o"
+endseg
+
+beginseg
+ name "vr_IPVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_IPVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_KSVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KSVR_static.o"
+endseg
+
+beginseg
+ name "vr_KSVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_KSVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_GLVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_GLVR_static.o"
+endseg
+
+beginseg
+ name "vr_GLVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_GLVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_ZRVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_ZRVR_static.o"
+endseg
+
+beginseg
+ name "vr_ZRVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_ZRVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_DGVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_DGVR_static.o"
+endseg
+
+beginseg
+ name "vr_DGVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_DGVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_ALVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_ALVR_static.o"
+endseg
+
+beginseg
+ name "vr_ALVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_ALVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_NSVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_NSVR_static.o"
+endseg
+
+beginseg
+ name "vr_NSVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_NSVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_LBVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_LBVR_static.o"
+endseg
+
+beginseg
+ name "vr_LBVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_LBVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_TTVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_TTVR_static.o"
+endseg
+
+beginseg
+ name "vr_TTVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_TTVR_pal_static.o"
+endseg
+
+beginseg
+ name "vr_FCVR_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_FCVR_static.o"
+endseg
+
+beginseg
+ name "vr_FCVR_pal_static"
+ romalign 0x1000
+ include "$(BUILD_DIR)/assets/textures/backgrounds/vr_FCVR_pal_static.o"
+endseg
+
+beginseg
+ name "elf_message_field"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/src/elf_message/elf_message_field.o"
+ number 0
+endseg
+
+beginseg
+ name "elf_message_ydan"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/src/elf_message/elf_message_ydan.o"
+ number 0
+endseg
+
+// Scene files are reordered between versions. On GameCube and iQue, dungeon scenes
+// have been moved to the beginning.
+#if PLATFORM_N64
+#include "scenes_n64.inc"
+#else
+#include "scenes_gc_ique.inc"
+#endif
+
+beginseg
+ name "bump_texture_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/bump_texture_static.o"
+endseg
+
+beginseg
+ name "anime_model_1_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_model_1_static.o"
+endseg
+
+beginseg
+ name "anime_model_2_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_model_2_static.o"
+endseg
+
+beginseg
+ name "anime_model_3_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_model_3_static.o"
+endseg
+
+beginseg
+ name "anime_model_4_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_model_4_static.o"
+endseg
+
+beginseg
+ name "anime_model_5_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_model_5_static.o"
+endseg
+
+beginseg
+ name "anime_model_6_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_model_6_static.o"
+endseg
+
+beginseg
+ name "anime_texture_1_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_texture_1_static.o"
+endseg
+
+beginseg
+ name "anime_texture_2_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_texture_2_static.o"
+endseg
+
+beginseg
+ name "anime_texture_3_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_texture_3_static.o"
+endseg
+
+beginseg
+ name "anime_texture_4_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_texture_4_static.o"
+endseg
+
+beginseg
+ name "anime_texture_5_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_texture_5_static.o"
+endseg
+
+beginseg
+ name "anime_texture_6_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/anime_texture_6_static.o"
+endseg
+
+beginseg
+ name "softsprite_matrix_static"
+ compress
+ romalign 0x1000
+ include "$(BUILD_DIR)/baserom/softsprite_matrix_static.o"
+endseg
diff --git a/src/audio/data.c b/src/audio/game/data.c
similarity index 87%
rename from src/audio/data.c
rename to src/audio/game/data.c
index 41d4f75226..6c5528f347 100644
--- a/src/audio/data.c
+++ b/src/audio/game/data.c
@@ -1,5 +1,7 @@
+#include "array_count.h"
+#include "sfx.h"
#include "ultra64.h"
-#include "global.h"
+#include "z64audio.h"
// sSfxRequests ring buffer endpoints. read index <= write index, wrapping around mod 256.
u8 gSfxRequestWriteIndex = 0;
@@ -44,7 +46,7 @@ s8 gSfxDefaultReverb = 0;
s32 D_801333EC = 0; // unused
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u8 D_801333F0 = 0;
u8 gAudioSfxSwapOff = 0;
u8 D_801333F8 = 0;
@@ -55,15 +57,15 @@ u8 gSeqCmdWritePos = 0;
u8 gSeqCmdReadPos = 0;
u8 gStartSeqDisabled = false;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u8 gAudioDebugPrintSeqCmd = true;
#endif
-u8 gSoundModeList[] = {
- SOUNDMODE_STEREO,
- SOUNDMODE_HEADSET,
- SOUNDMODE_SURROUND,
- SOUNDMODE_MONO,
+u8 gSoundOutputModes[] = {
+ SOUND_OUTPUT_STEREO,
+ SOUND_OUTPUT_HEADSET,
+ SOUND_OUTPUT_SURROUND,
+ SOUND_OUTPUT_MONO,
};
u8 gAudioSpecId = 0;
diff --git a/src/audio/debug.inc.c b/src/audio/game/debug.inc.c
similarity index 99%
rename from src/audio/debug.inc.c
rename to src/audio/game/debug.inc.c
index 29fbd50a3c..e6d2dd89ca 100644
--- a/src/audio/debug.inc.c
+++ b/src/audio/game/debug.inc.c
@@ -847,7 +847,7 @@ void AudioDebug_ProcessInput_SndCont(void) {
&gSfxDefaultReverb);
break;
case 4:
- func_800F6700(sAudioSndContWork[sAudioSndContSel]);
+ Audio_SetSoundOutputMode(sAudioSndContWork[sAudioSndContSel]);
break;
case 5:
SEQCMD_DISABLE_PLAY_SEQUENCES(sAudioSndContWork[sAudioSndContSel]);
diff --git a/src/audio/general.c b/src/audio/game/general.c
similarity index 93%
rename from src/audio/general.c
rename to src/audio/game/general.c
index 615a359c38..f04f203a1f 100644
--- a/src/audio/general.c
+++ b/src/audio/game/general.c
@@ -1,5 +1,17 @@
+#include "libu64/gfxprint.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "audiothread_cmd.h"
+#include "controller.h"
+#include "padmgr.h"
+#include "printf.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
#include "ultra64.h"
-#include "global.h"
+#include "versions.h"
+#include "z64audio.h"
+#include "z64ocarina.h"
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
@@ -132,10 +144,10 @@ f32 D_801305E4[4] = { 1.0f, 1.12246f, 1.33484f, 1.33484f }; // 2**({0, 2, 5, 5}/
f32 D_801305F4 = 1.0f;
u8 sGanonsTowerLevelsVol[8] = { 127, 80, 75, 73, 70, 68, 65, 60 };
u8 sEnterGanonsTowerTimer = 0;
-#if OOT_DEBUG
-s8 sSoundMode = SOUNDMODE_SURROUND;
+#if DEBUG_FEATURES
+s8 sSoundOutputMode = SOUND_OUTPUT_SURROUND;
#else
-s8 sSoundMode = SOUNDMODE_STEREO;
+s8 sSoundOutputMode = SOUND_OUTPUT_STEREO;
#endif
s8 D_80130608 = 0;
s8 sAudioCutsceneFlag = 0;
@@ -160,7 +172,7 @@ u8 sAudioExtraFilter2 = 0;
Vec3f* sSariaBgmPtr = NULL;
f32 D_80130650 = 2000.0f;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u8 sSeqModeInput = 0;
#endif
@@ -824,151 +836,151 @@ u8 sOcaMemoryGameNumNotes[] = { 5, 6, 8 };
OcarinaNote sOcarinaSongNotes[OCARINA_SONG_MAX][20] = {
// OCARINA_SONG_MINUET
{
- { OCARINA_PITCH_D4, 18, 86, 0, 0, 0 },
- { OCARINA_PITCH_D5, 18, 92, 0, 0, 0 },
- { OCARINA_PITCH_B4, 72, 86, 0, 0, 0 },
- { OCARINA_PITCH_A4, 18, 80, 0, 0, 0 },
- { OCARINA_PITCH_B4, 18, 88, 0, 0, 0 },
- { OCARINA_PITCH_A4, 144, 86, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(18, 15), 86, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(18, 15), 92, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(72, 60), 86, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(18, 15), 80, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(18, 15), 88, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(144, 120), 86, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 86, 0, 0, 0 },
},
// OCARINA_SONG_BOLERO
{
- { OCARINA_PITCH_F4, 15, 80, 0, 0, 0 },
- { OCARINA_PITCH_D4, 15, 72, 0, 0, 0 },
- { OCARINA_PITCH_F4, 15, 84, 0, 0, 0 },
- { OCARINA_PITCH_D4, 15, 76, 0, 0, 0 },
- { OCARINA_PITCH_A4, 15, 84, 0, 0, 0 },
- { OCARINA_PITCH_F4, 15, 74, 0, 0, 0 },
- { OCARINA_PITCH_A4, 15, 78, 0, 0, 0 },
- { OCARINA_PITCH_F4, 135, 66, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(15, 12), 80, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(15, 13), 72, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(15, 12), 84, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(15, 13), 76, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(15, 12), 84, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(15, 13), 74, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(15, 12), 78, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(135, 113), 66, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 66, 0, 0, 0 },
},
// OCARINA_SONG_SERENADE
{
- { OCARINA_PITCH_D4, 36, 60, 0, 0, 0 },
- { OCARINA_PITCH_F4, 36, 78, 0, 0, 0 },
- { OCARINA_PITCH_A4, 33, 82, 0, 0, 0 },
- { OCARINA_PITCH_NONE, 3, 82, 0, 0, 0 },
- { OCARINA_PITCH_A4, 36, 84, 0, 0, 0 },
- { OCARINA_PITCH_B4, 144, 90, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(36, 30), 60, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(36, 30), 78, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(33, 27), 82, 0, 0, 0 },
+ { OCARINA_PITCH_NONE, FRAMERATE_CONST(3, 3), 82, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(36, 30), 84, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(144, 120), 90, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_REQUIEM
{
- { OCARINA_PITCH_D4, 45, 88, 0, 0, 0 },
- { OCARINA_PITCH_F4, 23, 86, 0, 0, 0 },
- { OCARINA_PITCH_D4, 22, 84, 0, 0, 0 },
- { OCARINA_PITCH_A4, 45, 86, 0, 0, 0 },
- { OCARINA_PITCH_F4, 45, 94, 0, 0, 0 },
- { OCARINA_PITCH_D4, 180, 94, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(45, 37), 88, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(23, 19), 86, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(22, 19), 84, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(45, 37), 86, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(45, 38), 94, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(180, 150), 94, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 94, 0, 0, 0 },
},
// OCARINA_SONG_NOCTURNE
{
- { OCARINA_PITCH_B4, 36, 88, 0, 0, 0 },
- { OCARINA_PITCH_A4, 33, 84, 0, 0, 0 },
- { OCARINA_PITCH_NONE, 3, 84, 0, 0, 0 },
- { OCARINA_PITCH_A4, 18, 82, 0, 0, 0 },
- { OCARINA_PITCH_D4, 18, 60, 0, 0, 0 },
- { OCARINA_PITCH_B4, 18, 90, 0, 0, 0 },
- { OCARINA_PITCH_A4, 18, 88, 0, 0, 0 },
- { OCARINA_PITCH_F4, 144, 96, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(36, 30), 88, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(33, 27), 84, 0, 0, 0 },
+ { OCARINA_PITCH_NONE, FRAMERATE_CONST(3, 3), 84, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(18, 15), 82, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(18, 15), 60, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(18, 15), 90, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(18, 15), 88, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(144, 120), 96, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 96, 0, 0, 0 },
},
// OCARINA_SONG_PRELUDE
{
- { OCARINA_PITCH_D5, 15, 84, 0, 0, 0 },
- { OCARINA_PITCH_A4, 45, 88, 0, 0, 0 },
- { OCARINA_PITCH_D5, 15, 88, 0, 0, 0 },
- { OCARINA_PITCH_A4, 15, 82, 0, 0, 0 },
- { OCARINA_PITCH_B4, 15, 86, 0, 0, 0 },
- { OCARINA_PITCH_D5, 60, 90, 0, 0, 0 },
- { OCARINA_PITCH_NONE, 75, 90, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(15, 12), 84, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(45, 38), 88, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(15, 12), 88, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(15, 13), 82, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(15, 12), 86, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(60, 50), 90, 0, 0, 0 },
+ { OCARINA_PITCH_NONE, FRAMERATE_CONST(75, 63), 90, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_SARIAS
{
- { OCARINA_PITCH_F4, 17, 84, 0, 0, 0 },
- { OCARINA_PITCH_A4, 17, 88, 0, 0, 0 },
- { OCARINA_PITCH_B4, 34, 80, 0, 0, 0 },
- { OCARINA_PITCH_F4, 17, 84, 0, 0, 0 },
- { OCARINA_PITCH_A4, 17, 88, 0, 0, 0 },
- { OCARINA_PITCH_B4, 136, 80, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(17, 14), 84, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(17, 14), 88, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(34, 28), 80, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(17, 14), 84, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(17, 14), 88, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(136, 113), 80, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_EPONAS
{
- { OCARINA_PITCH_D5, 18, 84, 0, 0, 0 },
- { OCARINA_PITCH_B4, 18, 88, 0, 0, 0 },
- { OCARINA_PITCH_A4, 72, 80, 0, 0, 0 },
- { OCARINA_PITCH_D5, 18, 84, 0, 0, 0 },
- { OCARINA_PITCH_B4, 18, 88, 0, 0, 0 },
- { OCARINA_PITCH_A4, 144, 80, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(18, 15), 84, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(18, 15), 88, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(72, 60), 80, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(18, 15), 84, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(18, 15), 88, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(144, 120), 80, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_LULLABY
{
- { OCARINA_PITCH_B4, 51, 84, 0, 0, 0 },
- { OCARINA_PITCH_D5, 25, 88, 0, 0, 0 },
- { OCARINA_PITCH_A4, 78, 80, 0, 0, 0 },
- { OCARINA_PITCH_B4, 51, 84, 0, 0, 0 },
- { OCARINA_PITCH_D5, 25, 88, 0, 0, 0 },
- { OCARINA_PITCH_A4, 100, 80, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(51, 42), 84, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(25, 21), 88, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(78, 65), 80, 0, 0, 0 },
+ { OCARINA_PITCH_B4, FRAMERATE_CONST(51, 42), 84, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(25, 21), 88, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(100, 83), 80, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_SUNS
{
- { OCARINA_PITCH_A4, 12, 84, 0, 0, 0 },
- { OCARINA_PITCH_F4, 13, 88, 0, 0, 0 },
- { OCARINA_PITCH_D5, 29, 80, 2, 0, 0 },
- { OCARINA_PITCH_NONE, 9, 84, 0, 0, 0 },
- { OCARINA_PITCH_A4, 12, 84, 0, 0, 0 },
- { OCARINA_PITCH_F4, 13, 88, 0, 0, 0 },
- { OCARINA_PITCH_D5, 120, 80, 3, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(12, 10), 84, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(13, 10), 88, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(29, 25), 80, 2, 0, 0 },
+ { OCARINA_PITCH_NONE, FRAMERATE_CONST(9, 9), 84, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(12, 10), 84, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(13, 10), 88, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(120, 100), 80, 3, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_TIME
{
- { OCARINA_PITCH_A4, 32, 84, 0, 0, 0 },
- { OCARINA_PITCH_D4, 65, 88, 0, 0, 0 },
- { OCARINA_PITCH_F4, 33, 80, 0, 0, 0 },
- { OCARINA_PITCH_A4, 32, 84, 0, 0, 0 },
- { OCARINA_PITCH_D4, 65, 88, 0, 0, 0 },
- { OCARINA_PITCH_F4, 99, 80, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(32, 26), 84, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(65, 54), 88, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(33, 28), 80, 0, 0, 0 },
+ { OCARINA_PITCH_A4, FRAMERATE_CONST(32, 26), 84, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(65, 54), 88, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(99, 83), 80, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_STORMS
{
- { OCARINA_PITCH_D4, 11, 84, 0, 0, 0 },
- { OCARINA_PITCH_F4, 11, 88, 0, 0, 0 },
- { OCARINA_PITCH_D5, 45, 80, 0, 0, 0 },
- { OCARINA_PITCH_D4, 11, 84, 0, 0, 0 },
- { OCARINA_PITCH_F4, 11, 88, 0, 0, 0 },
- { OCARINA_PITCH_D5, 90, 80, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(11, 9), 84, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(11, 9), 88, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(45, 37), 80, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(11, 9), 84, 0, 0, 0 },
+ { OCARINA_PITCH_F4, FRAMERATE_CONST(11, 9), 88, 0, 0, 0 },
+ { OCARINA_PITCH_D5, FRAMERATE_CONST(90, 75), 80, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 90, 0, 0, 0 },
},
// OCARINA_SONG_SCARECROW_SPAWN
{
- { OCARINA_PITCH_D4, 3, 0, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(3, 3), 0, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 255, 0, 0, 0 },
},
// OCARINA_SONG_MEMORY_GAME
{
- { OCARINA_PITCH_D4, 3, 0, 0, 0, 0 },
+ { OCARINA_PITCH_D4, FRAMERATE_CONST(3, 3), 0, 0, 0, 0 },
{ OCARINA_PITCH_NONE, 0, 0, 0, 0, 0 },
},
};
@@ -1149,7 +1161,7 @@ OcarinaSongButtons gOcarinaSongButtons[OCARINA_SONG_MAX] = {
{ 0, { 0 } },
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u32 sAudioUpdateStartTime;
u32 sAudioUpdateEndTime;
#endif
@@ -1162,7 +1174,7 @@ FreqLerp sWaterfallFreqScaleLerp;
f32 D_8016B7D8;
s8 D_8016B7DC;
f32 D_8016B7E0;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u16 D_8016B7E4;
struct {
char str[5];
@@ -1175,11 +1187,11 @@ u8 sRiverSoundMainBgmLower;
u8 sRiverSoundMainBgmRestore;
u8 sGanonsTowerVol;
SfxPlayerState sSfxChannelState[0x10];
-#if OOT_DEBUG
+#if DEBUG_FEATURES
char sBinToStrBuf[0x20];
#endif
u8 sMalonSingingTimer;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u8 sAudioSpecPeakNumNotes[0x12];
#endif
u8 sMalonSingingDisabled;
@@ -1187,7 +1199,7 @@ u8 D_8016B9F3;
u8 sFanfareStartTimer;
u16 sFanfareSeqId;
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
u16 sPrevAmbienceSeqId;
#endif
@@ -1212,7 +1224,7 @@ u16 sMusicStaffCurHeldLength[OCARINA_SONG_MAX];
u16 sMusicStaffExpectedLength[OCARINA_SONG_MAX];
u8 sMusicStaffExpectedPitch[OCARINA_SONG_MAX];
OcarinaNote sScarecrowsLongSongSecondNote;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u8 sIsMalonSinging;
f32 sMalonSingingDist;
u32 sDebugPadHold;
@@ -1705,7 +1717,7 @@ void AudioOcarina_PlayControllerInput(u8 unused) {
} else {
// no bending or vibrato for recording state OCARINA_RECORD_SCARECROW_SPAWN
sCurOcarinaBendIndex = 0;
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
sCurOcarinaVibrato = 0;
#endif
sCurOcarinaBendFreq = 1.0f; // No bend
@@ -1851,18 +1863,17 @@ void AudioOcarina_PlaybackSong(void) {
sRelativeNotePlaybackVolume = sNotePlaybackVolume / 127.0f;
}
-#if PLATFORM_N64
- // Update vibrato
- sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato;
- // Sets vibrato to io port 6
- AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, SFX_CHANNEL_OCARINA, 6, sNotePlaybackVibrato);
-#else
// Update vibrato
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
if (sNotePlaybackVibrato != sPlaybackSong[sPlaybackNotePos].vibrato) {
sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato;
// Sets vibrato to io port 6
AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, SFX_CHANNEL_OCARINA, 6, sNotePlaybackVibrato);
}
+#else
+ sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato;
+ // Sets vibrato to io port 6
+ AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, SFX_CHANNEL_OCARINA, 6, sNotePlaybackVibrato);
#endif
// Update bend
@@ -2144,7 +2155,7 @@ void AudioOcarina_RecordSong(void) {
} else if (sRecordOcarinaVolume != sCurOcarinaVolume) {
noteChanged = true;
} else if (sRecordOcarinaVibrato != sCurOcarinaVibrato) {
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) {
noteChanged = true;
}
@@ -2152,7 +2163,7 @@ void AudioOcarina_RecordSong(void) {
noteChanged = true;
#endif
} else if (sRecordOcarinaBendIndex != sCurOcarinaBendIndex) {
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) {
noteChanged = true;
}
@@ -2199,7 +2210,7 @@ s32 AudioOcarina_MemoryGameNextNote(void) {
}
sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].pitch = randomPitch;
- sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].length = 45;
+ sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].length = FRAMERATE_CONST(45, 38);
sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].volume = 0x50;
sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].vibrato = 0;
sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcaMemoryGameAppendPos].bend = 0;
@@ -2299,7 +2310,7 @@ void AudioOcarina_ResetStaffs(void) {
sOcarinaDropInputTimer = 0;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#include "debug.inc.c"
#else
void AudioDebug_Draw(GfxPrint* printer) {
@@ -2317,7 +2328,7 @@ void Audio_UpdateFanfare(void);
*/
void Audio_Update(void) {
if (func_800FAD34() == 0) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
sAudioUpdateTaskStart = gAudioCtx.totalTaskCount;
sAudioUpdateStartTime = osGetTime();
#endif
@@ -2336,14 +2347,14 @@ void Audio_Update(void) {
func_800F8F88();
Audio_UpdateActiveSequences();
-#if OOT_DEBUG
+#if DEBUG_FEATURES
AudioDebug_SetInput();
AudioDebug_ProcessInput();
#endif
AudioThread_ScheduleProcessCmds();
-#if OOT_DEBUG
+#if DEBUG_FEATURES
sAudioUpdateTaskEnd = gAudioCtx.totalTaskCount;
sAudioUpdateEndTime = osGetTime();
#endif
@@ -2493,7 +2504,7 @@ f32 Audio_ComputeSfxFreqScale(u8 bankId, u8 entryIdx) {
switch (bankId) {
case BANK_VOICE:
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if (((entry->sfxId & 0xFF) < 0x40) && (sAudioBaseFilter2 != 0)) {
phi_v0 = true;
} else if (((entry->sfxId & 0xFF) >= 0x40) && (sAudioExtraFilter2 != 0)) {
@@ -2614,7 +2625,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) {
f32 behindScreenZ;
u8 baseFilter = 0;
SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx];
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
s32 pad;
#endif
@@ -2624,7 +2635,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) {
case BANK_ENV:
case BANK_ENEMY:
case BANK_VOICE:
- if (sSoundMode == SOUNDMODE_SURROUND) {
+ if (sSoundOutputMode == SOUND_OUTPUT_SURROUND) {
combFilterGain = func_800F3990(*entry->posY, entry->sfxParams);
}
FALLTHROUGH;
@@ -2636,7 +2647,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) {
pan = Audio_ComputeSfxPanSigned(*entry->posX, *entry->posZ, entry->token);
freqScale = Audio_ComputeSfxFreqScale(bankId, entryIdx) * *entry->freqScale;
- if (sSoundMode == SOUNDMODE_SURROUND) {
+ if (sSoundOutputMode == SOUND_OUTPUT_SURROUND) {
behindScreenZ = sBehindScreenZ[(entry->sfxParams & SFX_FLAG_10) >> SFX_FLAG_10_SHIFT];
if (!(entry->sfxParams & SFX_FLAG_11)) {
if (*entry->posZ < behindScreenZ) {
@@ -2655,7 +2666,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) {
}
}
if (sAudioBaseFilter != 0) {
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if ((bankId == BANK_PLAYER) || (bankId == BANK_ITEM) ||
((bankId == BANK_VOICE) && ((entry->sfxId & 0xFF) < 0x40)))
#else
@@ -2668,7 +2679,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) {
if ((baseFilter | sAudioExtraFilter) != 0) {
filter = (baseFilter | sAudioExtraFilter);
- } else if ((sSoundMode == SOUNDMODE_SURROUND) && !(entry->sfxParams & SFX_FLAG_13)) {
+ } else if ((sSoundOutputMode == SOUND_OUTPUT_SURROUND) && !(entry->sfxParams & SFX_FLAG_13)) {
filter = func_800F37B8(behindScreenZ, entry, pan);
}
break;
@@ -2767,7 +2778,7 @@ void func_800F4010(Vec3f* pos, u16 sfxId, f32 arg2) {
u8 phi_v0;
u16 sfxId2;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
D_80131C8C = arg2;
#endif
@@ -2875,7 +2886,7 @@ void func_800F4578(Vec3f* pos, u16 sfxId, f32 arg2) {
void func_800F45D0(f32 arg0) {
func_800F4414(&gSfxDefaultPos, NA_SE_IT_FISHING_REEL_SLOW - SFX_FLAG, arg0);
- func_800F436C(&gSfxDefaultPos, 0, (0.15f * arg0) + 1.4f);
+ func_800F436C(&gSfxDefaultPos, NA_SE_NONE, (0.15f * arg0) + 1.4f);
}
void Audio_PlaySfxRiver(Vec3f* pos, f32 freqScale) {
@@ -3239,7 +3250,7 @@ void Audio_PlaySceneSequence(u16 seqId) {
AUDIOCMD_GLOBAL_STOP_AUDIOCMDS();
}
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) {
Audio_StopSequence(SEQ_PLAYER_BGM_MAIN, 0);
AUDIOCMD_GLOBAL_STOP_AUDIOCMDS();
@@ -3358,7 +3369,7 @@ s32 Audio_IsSequencePlaying(u16 seqId) {
void func_800F5ACC(u16 seqId) {
u16 curSeqId = Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN);
-#if !OOT_DEBUG
+#if !DEBUG_FEATURES
if (1) {}
#endif
@@ -3383,7 +3394,7 @@ void func_800F5B58(void) {
if (sPrevMainBgmSeqId == NA_BGM_DISABLED) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
} else {
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if (sPrevMainBgmSeqId == NA_BGM_NATURE_AMBIENCE) {
sPrevMainBgmSeqId = sPrevAmbienceSeqId;
}
@@ -3487,7 +3498,7 @@ void Audio_SetSequenceMode(u8 seqMode) {
u16 seqId;
u8 volumeFadeOutTimer;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
sSeqModeInput = seqMode;
#endif
@@ -3519,10 +3530,10 @@ void Audio_SetSequenceMode(u8 seqMode) {
volumeFadeInTimer);
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
-#if PLATFORM_N64
- if (seqId > NA_BGM_NATURE_AMBIENCE)
-#else
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
if (seqId != NA_BGM_NATURE_AMBIENCE)
+#else
+ if (seqId > NA_BGM_NATURE_AMBIENCE)
#endif
{
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB,
@@ -3544,14 +3555,20 @@ void Audio_SetSequenceMode(u8 seqMode) {
sPrevSeqMode = seqMode + 0x80;
} else {
-#if PLATFORM_N64
- if (seqMode == SEQ_MODE_ENEMY) {
- // If both seqMode = sPrevSeqMode = SEQ_MODE_ENEMY
- if ((Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == NA_BGM_DISABLED) && (seqId != NA_BGM_DISABLED) &&
- (sSeqFlags[seqId & 0xFF & 0xFF] & SEQ_FLAG_ENEMY)) {
- SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
- sPrevSeqMode = seqMode + 0x80;
- }
+#if OOT_VERSION < NTSC_1_1 || !PLATFORM_N64
+ // Empty
+#elif OOT_VERSION < PAL_1_0
+ if ((seqMode == SEQ_MODE_ENEMY) && (seqId != NA_BGM_FIELD_LOGIC) &&
+ (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == NA_BGM_DISABLED)) {
+ SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
+ sPrevSeqMode = seqMode + 0x80;
+ }
+#else
+ // If both seqMode = sPrevSeqMode = SEQ_MODE_ENEMY
+ if ((seqMode == SEQ_MODE_ENEMY) && (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_SUB) == NA_BGM_DISABLED) &&
+ (seqId != NA_BGM_DISABLED) && (sSeqFlags[seqId & 0xFF & 0xFF] & SEQ_FLAG_ENEMY)) {
+ SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY);
+ sPrevSeqMode = seqMode + 0x80;
}
#endif
}
@@ -3594,20 +3611,20 @@ void Audio_SetBgmEnemyVolume(f32 dist) {
sAudioEnemyVol = ((350.0f - adjDist) * 127.0f) / 350.0f;
Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_BGM_SUB, sAudioEnemyVol, 10);
-#if PLATFORM_N64
- if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
-#else
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE)
+#else
+ if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
#endif
{
Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, VOL_SCALE_INDEX_BGM_SUB, (0x7F - sAudioEnemyVol), 10);
}
}
-#if PLATFORM_N64
- if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
-#else
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE)
+#else
+ if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE)
#endif
{
Audio_SplitBgmChannels(sAudioEnemyVol);
@@ -3621,7 +3638,7 @@ void Audio_UpdateMalonSinging(f32 dist, u16 seqId) {
s8 melodyVolume;
s16 curSeqId;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
sIsMalonSinging = true;
sMalonSingingDist = dist;
#endif
@@ -3760,32 +3777,40 @@ void Audio_SetCodeReverb(s8 reverb) {
}
}
-void func_800F6700(s8 audioSetting) {
- s8 soundModeIndex;
+/**
+ * Sets the Sound Output Mode.
+ *
+ * This function translates the game-side `SoundSetting` to an internal `SoundOutputMode` value.
+ * The order of each value between the two enums is slightly different.
+ *
+ * Original name: Na_SetSoundOutputMode
+ */
+void Audio_SetSoundOutputMode(s8 soundSetting) {
+ s8 soundOutputMode;
- switch (audioSetting) {
- case 0:
- soundModeIndex = SOUNDMODE_STEREO;
- sSoundMode = SOUNDMODE_STEREO;
+ switch (soundSetting) {
+ case SOUND_SETTING_STEREO:
+ soundOutputMode = SOUND_OUTPUT_STEREO;
+ sSoundOutputMode = SOUND_OUTPUT_STEREO;
break;
- case 1:
- soundModeIndex = SOUNDMODE_MONO;
- sSoundMode = SOUNDMODE_MONO;
+ case SOUND_SETTING_MONO:
+ soundOutputMode = SOUND_OUTPUT_MONO;
+ sSoundOutputMode = SOUND_OUTPUT_MONO;
break;
- case 2:
- soundModeIndex = SOUNDMODE_HEADSET;
- sSoundMode = SOUNDMODE_HEADSET;
+ case SOUND_SETTING_HEADSET:
+ soundOutputMode = SOUND_OUTPUT_HEADSET;
+ sSoundOutputMode = SOUND_OUTPUT_HEADSET;
break;
- case 3:
- soundModeIndex = SOUNDMODE_STEREO;
- sSoundMode = SOUNDMODE_SURROUND;
+ case SOUND_SETTING_SURROUND:
+ soundOutputMode = SOUND_OUTPUT_STEREO;
+ sSoundOutputMode = SOUND_OUTPUT_SURROUND;
break;
}
- SEQCMD_SET_SOUND_MODE(soundModeIndex);
+ SEQCMD_SET_SOUND_OUTPUT_MODE(soundOutputMode);
}
void Audio_SetBaseFilter(u8 filter) {
@@ -3922,7 +3947,7 @@ void func_800F6C34(void) {
sFanfareStartTimer = 0;
D_8016B9F3 = 1;
sMalonSingingDisabled = false;
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
sPrevAmbienceSeqId = NA_BGM_DISABLED;
#endif
}
@@ -3935,7 +3960,7 @@ void Audio_SetNatureAmbienceChannelIO(u8 channelIdxRange, u8 ioPort, u8 ioData)
if ((gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) &&
Audio_IsSeqCmdNotQueued(SEQCMD_OP_PLAY_SEQUENCE << 28 | NA_BGM_NATURE_AMBIENCE, SEQCMD_OP_MASK | 0xFF)) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
sAudioNatureFailed = true;
#endif
@@ -3976,14 +4001,14 @@ void Audio_StartNatureAmbienceSequence(u16 playerIO, u16 channelMask) {
channelIdx = false;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (gStartSeqDisabled) {
channelIdx = true;
SEQCMD_DISABLE_PLAY_SEQUENCES(false);
}
#endif
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if ((Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) &&
(Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_NATURE_AMBIENCE)) {
Audio_StopSequence(SEQ_PLAYER_BGM_MAIN, 0);
@@ -4017,7 +4042,7 @@ void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId) {
if ((gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId == NA_BGM_DISABLED) ||
!(sSeqFlags[gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId & 0xFF & 0xFF] & SEQ_FLAG_NO_AMBIENCE)) {
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) {
sPrevAmbienceSeqId = gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId;
}
@@ -4033,7 +4058,7 @@ void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId) {
SEQCMD_SET_CHANNEL_IO(SEQ_PLAYER_BGM_MAIN, channelIdx, ioPort, ioData);
}
- SEQCMD_SET_CHANNEL_IO(SEQ_PLAYER_BGM_MAIN, NATURE_CHANNEL_UNK, CHANNEL_IO_PORT_7, sSoundMode);
+ SEQCMD_SET_CHANNEL_IO(SEQ_PLAYER_BGM_MAIN, NATURE_CHANNEL_UNK, CHANNEL_IO_PORT_7, sSoundOutputMode);
}
}
diff --git a/src/audio/sequence.c b/src/audio/game/sequence.c
similarity index 98%
rename from src/audio/sequence.c
rename to src/audio/game/sequence.c
index 8d16b94a9b..a311e4e73d 100644
--- a/src/audio/sequence.c
+++ b/src/audio/game/sequence.c
@@ -17,9 +17,13 @@
* Nor are these commands to be confused with the internal audio commands used to transfer requests from
* the graph thread to the audio thread.
*/
+#include "array_count.h"
+#include "audiothread_cmd.h"
+#include "seqcmd.h"
+#include "sfx.h"
#include "ultra64.h"
-#include "global.h"
#include "ultra64/abi.h"
+#include "z64audio.h"
// Direct audio command (skips the queueing system)
#define SEQCMD_SET_SEQPLAYER_VOLUME_NOW(seqPlayerIndex, duration, volume) \
@@ -43,7 +47,7 @@ void Audio_StartSequence(u8 seqPlayerIndex, u8 seqId, u8 seqArgs, u16 fadeInDura
if (!gStartSeqDisabled || (seqPlayerIndex == SEQ_PLAYER_SFX)) {
seqArgs &= 0x7F;
- if (OOT_DEBUG && (seqArgs == 0x7F)) {
+ if (DEBUG_FEATURES && (seqArgs == 0x7F)) {
// `fadeInDuration` interpreted as seconds, 60 is refresh rate and does not account for PAL
skipTicks = (fadeInDuration >> 3) * 60 * gAudioCtx.audioBufferParameters.ticksPerUpdate;
AUDIOCMD_GLOBAL_INIT_SEQPLAYER_SKIP_TICKS((u32)seqPlayerIndex, (u32)seqId, skipTicks);
@@ -103,7 +107,7 @@ void Audio_ProcessSeqCmd(u32 cmd) {
f32 freqScaleTarget;
s32 pad;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (gAudioDebugPrintSeqCmd && (cmd & SEQCMD_OP_MASK) != (SEQCMD_OP_SET_SEQPLAYER_IO << 28)) {
AudioDebug_ScrPrt("SEQ H", (cmd >> 16) & 0xFFFF);
AudioDebug_ScrPrt(" L", cmd & 0xFFFF);
@@ -369,9 +373,9 @@ void Audio_ProcessSeqCmd(u32 cmd) {
subOp = (cmd & 0xF00) >> 8;
val = cmd & 0xFF;
switch (subOp) {
- case SEQCMD_SUB_OP_GLOBAL_SET_SOUND_MODE:
- // Set sound mode
- AUDIOCMD_GLOBAL_SET_SOUND_MODE(gSoundModeList[val]);
+ case SEQCMD_SUB_OP_GLOBAL_SET_SOUND_OUTPUT_MODE:
+ // Set sound output mode
+ AUDIOCMD_GLOBAL_SET_SOUND_OUTPUT_MODE(gSoundOutputModes[val]);
break;
case SEQCMD_SUB_OP_GLOBAL_DISABLE_NEW_SEQUENCES:
diff --git a/src/audio/session_config.c b/src/audio/game/session_config.c
similarity index 79%
rename from src/audio/session_config.c
rename to src/audio/game/session_config.c
index 8d1d97ca0c..c21a79c725 100644
--- a/src/audio/session_config.c
+++ b/src/audio/game/session_config.c
@@ -1,35 +1,9 @@
-#include "global.h"
+#include "z64audio.h"
AudioContext gAudioCtx;
AudioCustomUpdateFunction gAudioCustomUpdateFunction;
s32 D_801755D8[3]; // unused
-const TempoData gTempoData = {
- 0x1C00, // unk_00
- SEQTICKS_PER_BEAT, // seqTicksPerBeat
-};
-
-// TODO: Extract from table?
-#define NUM_SOUNDFONTS 38
-#define SFX_SEQ_SIZE 0x6A90
-#define SFX_SOUNDFONT_1_SIZE 0x3AA0
-#define SFX_SOUNDFONT_2_SIZE 0x17B0
-
-// Sizes of everything on the init pool
-#define AI_BUFFERS_SIZE (AIBUF_SIZE * ARRAY_COUNT(gAudioCtx.aiBuffers))
-#define SOUNDFONT_LIST_SIZE (NUM_SOUNDFONTS * sizeof(SoundFont))
-#if PLATFORM_N64
-#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONT_1_SIZE + SFX_SOUNDFONT_2_SIZE + 0x10)
-#else
-#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONT_1_SIZE + SFX_SOUNDFONT_2_SIZE)
-#endif
-
-const AudioHeapInitSizes gAudioHeapInitSizes = {
- ALIGN16(sizeof(gAudioHeap) - 0x100), // audio heap size
- ALIGN16(PERMANENT_POOL_SIZE + AI_BUFFERS_SIZE + SOUNDFONT_LIST_SIZE), // init pool size
- ALIGN16(PERMANENT_POOL_SIZE), // permanent pool size
-};
-
#define DEFAULT_REVERB_SETTINGS \
{ 1, 0x30, 0x3000, 0, 0, 0x7FFF, 0x0000, 0x0000, 0xFF, 0x3000, 0x0, 0x0 }
diff --git a/src/audio/game/session_init.c b/src/audio/game/session_init.c
new file mode 100644
index 0000000000..b8bc1924c2
--- /dev/null
+++ b/src/audio/game/session_init.c
@@ -0,0 +1,30 @@
+#include "alignment.h"
+#include "array_count.h"
+#include "buffers.h"
+#include "z64audio.h"
+
+#include "assets/audio/sequence_sizes.h"
+#include "assets/audio/soundfont_sizes.h"
+
+#define SFX_SEQ_SIZE Sequence_0_SIZE
+#define SFX_SOUNDFONTS_SIZE (Soundfont_0_SIZE + Soundfont_1_SIZE)
+
+TempoData gTempoData = {
+ 0x1C00, // unk_00
+ SEQTICKS_PER_BEAT, // seqTicksPerBeat
+};
+
+// Sizes of everything on the init pool
+#define AI_BUFFERS_SIZE (AIBUF_SIZE * ARRAY_COUNT(gAudioCtx.aiBuffers))
+#define SOUNDFONT_LIST_SIZE (NUM_SOUNDFONTS * sizeof(SoundFont))
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
+#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONTS_SIZE)
+#else
+#define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONTS_SIZE + 0x10)
+#endif
+
+AudioHeapInitSizes gAudioHeapInitSizes = {
+ ALIGN16(sizeof(gAudioHeap) - 0x100), // audio heap size
+ ALIGN16(PERMANENT_POOL_SIZE + AI_BUFFERS_SIZE + SOUNDFONT_LIST_SIZE), // init pool size
+ ALIGN16(PERMANENT_POOL_SIZE), // permanent pool size
+};
diff --git a/src/audio/sfx.c b/src/audio/game/sfx.c
similarity index 99%
rename from src/audio/sfx.c
rename to src/audio/game/sfx.c
index 90ed7a28f6..65309942a6 100644
--- a/src/audio/sfx.c
+++ b/src/audio/game/sfx.c
@@ -1,6 +1,10 @@
-#include "ultra64.h"
-#include "global.h"
+#include "array_count.h"
+#include "audiothread_cmd.h"
+#include "printf.h"
+#include "sfx.h"
#include "terminal.h"
+#include "ultra64.h"
+#include "z64audio.h"
typedef struct SfxRequest {
/* 0x00 */ u16 sfxId;
@@ -34,7 +38,7 @@ u8 sCurSfxPlayerChannelIndex;
u8 gSfxBankMuted[7];
UnusedBankLerp sUnusedBankLerp[7];
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u16 gAudioSfxSwapSource[10];
u16 gAudioSfxSwapTarget[10];
u8 gAudioSfxSwapMode[10];
@@ -74,7 +78,7 @@ void Audio_PlaySfxGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32*
if (!gSfxBankMuted[SFX_BANK_SHIFT(sfxId)]) {
req = &sSfxRequests[gSfxRequestWriteIndex];
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (!gAudioSfxSwapOff) {
for (i = 0; i < 10; i++) {
if (sfxId == gAudioSfxSwapSource[i]) {
@@ -172,7 +176,7 @@ void Audio_ProcessSfxRequest(void) {
bankId = SFX_BANK(req->sfxId);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if ((1 << bankId) & D_801333F0) {
AudioDebug_ScrPrt("SE", req->sfxId);
bankId = SFX_BANK(req->sfxId);
@@ -342,7 +346,7 @@ void Audio_ChooseActiveSfx(u8 bankId) {
entry->sfxId, entry->posX, entry->posZ, *entry->posX, *entry->posY, *entry->posZ);
}
entry->priority = (u32)entry->dist + (SQ(0xFF - sfxImportance) * SQ(76));
-#if !PLATFORM_N64
+#if OOT_VERSION < NTSC_1_1 || !PLATFORM_N64
temp3 = entry->sfxId; // fake
entry->priority = entry->priority + temp3 - temp3;
#endif
@@ -739,7 +743,7 @@ void Audio_ResetSfx(void) {
gSfxBanks[bankId][i].next = 0xFF;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (D_801333F8 == 0) {
for (bankId = 0; bankId < 10; bankId++) {
gAudioSfxSwapSource[bankId] = 0;
diff --git a/src/audio/sfx_params.c b/src/audio/game/sfx_params.c
similarity index 96%
rename from src/audio/sfx_params.c
rename to src/audio/game/sfx_params.c
index 4f52fbdf0a..37b9971caa 100644
--- a/src/audio/sfx_params.c
+++ b/src/audio/game/sfx_params.c
@@ -1,5 +1,6 @@
#include "ultra64.h"
-#include "global.h"
+#include "sfx.h"
+#include "versions.h"
#define DEFINE_SFX(_0, _1, importance, distParam, randParam, flags) \
{ importance, ((((distParam) << SFX_PARAM_01_SHIFT) & SFX_PARAM_01_MASK) | \
diff --git a/src/audio/lib/data.c b/src/audio/internal/data.c
similarity index 99%
rename from src/audio/lib/data.c
rename to src/audio/internal/data.c
index 8dc4729ff9..f2f1b2c94e 100644
--- a/src/audio/lib/data.c
+++ b/src/audio/internal/data.c
@@ -1,4 +1,6 @@
-#include "global.h"
+#include "alignment.h"
+#include "ultra64.h"
+#include "z64audio.h"
// clang-format off
ALIGNED(16) s16 gSawtoothWaveSample[] = {
diff --git a/src/audio/lib/effects.c b/src/audio/internal/effects.c
similarity index 99%
rename from src/audio/lib/effects.c
rename to src/audio/internal/effects.c
index bbfcaf61ad..7e3d01d3a7 100644
--- a/src/audio/lib/effects.c
+++ b/src/audio/internal/effects.c
@@ -1,5 +1,6 @@
#include "ultra64.h"
-#include "global.h"
+#include "attributes.h"
+#include "z64audio.h"
void Audio_SequenceChannelProcessSound(SequenceChannel* channel, s32 recalculateVolume, s32 applyBend) {
f32 channelVolume;
diff --git a/src/audio/lib/heap.c b/src/audio/internal/heap.c
similarity index 99%
rename from src/audio/lib/heap.c
rename to src/audio/internal/heap.c
index a29e0d9c9f..e78787027b 100644
--- a/src/audio/lib/heap.c
+++ b/src/audio/internal/heap.c
@@ -1,5 +1,7 @@
+#include "alignment.h"
#include "ultra64.h"
-#include "global.h"
+#include "versions.h"
+#include "z64audio.h"
void AudioHeap_InitSampleCaches(u32 persistentSampleCacheSize, u32 temporarySampleCacheSize);
SampleCacheEntry* AudioHeap_AllocTemporarySampleCacheEntry(u32 size);
@@ -907,8 +909,8 @@ void AudioHeap_Init(void) {
}
// Determine the length of the buffer for storing the audio command list passed to the rsp audio microcode
- gAudioCtx.maxAudioCmds =
- gAudioCtx.numNotes * 0x10 * gAudioCtx.audioBufferParameters.ticksPerUpdate + spec->numReverbs * 0x18 + 0x140;
+ gAudioCtx.maxAudioCmds = gAudioCtx.numNotes * 0x10 * gAudioCtx.audioBufferParameters.ticksPerUpdate +
+ spec->numReverbs * 0x18 + FRAMERATE_CONST(0x140, 0x1C0);
// Calculate sizes for various caches on the audio heap
persistentSize =
diff --git a/src/audio/lib/load.c b/src/audio/internal/load.c
similarity index 94%
rename from src/audio/lib/load.c
rename to src/audio/internal/load.c
index be87f5c457..91c25fabf7 100644
--- a/src/audio/lib/load.c
+++ b/src/audio/internal/load.c
@@ -1,5 +1,15 @@
+/**
+ * Original Filename: system.c
+ */
+
+#include "alignment.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "buffers.h"
+#include "segment_symbols.h"
#include "ultra64.h"
-#include "global.h"
+#include "versions.h"
+#include "z64audio.h"
#define MK_ASYNC_MSG(retData, tableType, id, loadStatus) \
(((retData) << 24) | ((tableType) << 16) | ((id) << 8) | (loadStatus))
@@ -72,6 +82,9 @@ void* sUnusedHandler = NULL;
s32 gAudioContextInitialized = false;
+/**
+ * original name: Nas_WaveDmaFrameWork
+ */
void AudioLoad_DecreaseSampleDmaTtls(void) {
u32 i;
@@ -104,6 +117,9 @@ void AudioLoad_DecreaseSampleDmaTtls(void) {
gAudioCtx.unused2628 = 0;
}
+/**
+ * original name:Nas_WaveDmaCallBack
+ */
void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, s32 arg2, u8* dmaIndexRef, s32 medium) {
s32 pad1;
SampleDma* dma;
@@ -198,6 +214,9 @@ void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, s32 arg2, u8* dmaIndexRef,
return (devAddr - dmaDevAddr) + dma->ramAddr;
}
+/**
+ * original name: Nas_WaveDmaNew
+ */
void AudioLoad_InitSampleDmaBuffers(s32 numNotes) {
SampleDma* dma;
s32 i;
@@ -267,6 +286,9 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) {
gAudioCtx.sampleDmaReuseQueue2WrPos = gAudioCtx.sampleDmaCount - gAudioCtx.sampleDmaListSize1;
}
+/**
+ * original name: Nas_CheckIDbank
+ */
s32 AudioLoad_IsFontLoadComplete(s32 fontId) {
if (fontId == 0xFF) {
return true;
@@ -279,6 +301,9 @@ s32 AudioLoad_IsFontLoadComplete(s32 fontId) {
}
}
+/**
+ * original name: Nas_CheckIDseq
+ */
s32 AudioLoad_IsSeqLoadComplete(s32 seqId) {
if (seqId == 0xFF) {
return true;
@@ -291,6 +316,9 @@ s32 AudioLoad_IsSeqLoadComplete(s32 seqId) {
}
}
+/**
+ * original name: Nas_CheckIDwave
+ */
s32 AudioLoad_IsSampleLoadComplete(s32 sampleBankId) {
if (sampleBankId == 0xFF) {
return true;
@@ -304,18 +332,27 @@ s32 AudioLoad_IsSampleLoadComplete(s32 sampleBankId) {
}
}
+/**
+ * original name: Nas_WriteIDbank
+ */
void AudioLoad_SetFontLoadStatus(s32 fontId, s32 loadStatus) {
if ((fontId != 0xFF) && (gAudioCtx.fontLoadStatus[fontId] != LOAD_STATUS_PERMANENTLY_LOADED)) {
gAudioCtx.fontLoadStatus[fontId] = loadStatus;
}
}
+/**
+ * original name: Nas_WriteIDseq
+ */
void AudioLoad_SetSeqLoadStatus(s32 seqId, s32 loadStatus) {
if ((seqId != 0xFF) && (gAudioCtx.seqLoadStatus[seqId] != LOAD_STATUS_PERMANENTLY_LOADED)) {
gAudioCtx.seqLoadStatus[seqId] = loadStatus;
}
}
+/**
+ * original name: Nas_WriteIDwave
+ */
void AudioLoad_SetSampleFontLoadStatusAndApplyCaches(s32 sampleBankId, s32 loadStatus) {
if (sampleBankId != 0xFF) {
if (gAudioCtx.sampleFontLoadStatus[sampleBankId] != LOAD_STATUS_PERMANENTLY_LOADED) {
@@ -329,12 +366,18 @@ void AudioLoad_SetSampleFontLoadStatusAndApplyCaches(s32 sampleBankId, s32 loadS
}
}
+/**
+ * original name: Nas_WriteIDwaveOnly
+ */
void AudioLoad_SetSampleFontLoadStatus(s32 sampleBankId, s32 loadStatus) {
if ((sampleBankId != 0xFF) && (gAudioCtx.sampleFontLoadStatus[sampleBankId] != LOAD_STATUS_PERMANENTLY_LOADED)) {
gAudioCtx.sampleFontLoadStatus[sampleBankId] = loadStatus;
}
}
+/**
+ * original name: Nas_BankHeaderInit
+ */
void AudioLoad_InitTable(AudioTable* table, u32 romAddr, u16 unkMediumParam) {
s32 i;
@@ -348,6 +391,9 @@ void AudioLoad_InitTable(AudioTable* table, u32 romAddr, u16 unkMediumParam) {
}
}
+/**
+ * original name: Nas_PreLoadBank
+ */
SoundFontData* AudioLoad_SyncLoadSeqFonts(s32 seqId, u32* outDefaultFontId) {
s32 pad[2];
s32 index;
@@ -374,6 +420,9 @@ SoundFontData* AudioLoad_SyncLoadSeqFonts(s32 seqId, u32* outDefaultFontId) {
return fontData;
}
+/**
+ * original name: Nas_PreLoadSeq
+ */
void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 arg1) {
s32 pad;
u32 defaultFontId;
@@ -388,6 +437,9 @@ void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 arg1) {
}
}
+/**
+ * original name: __Nas_LoadVoice_Inner
+ */
s32 AudioLoad_SyncLoadSample(Sample* sample, s32 fontId) {
void* sampleAddr;
@@ -409,8 +461,12 @@ s32 AudioLoad_SyncLoadSample(Sample* sample, s32 fontId) {
sample->sampleAddr = sampleAddr;
}
}
+ //! @bug Missing return, but the return value is never used so it's fine.
}
+/**
+ * original name: Nas_LoadVoice
+ */
s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId) {
if (instId < 0x7F) {
Instrument* instrument = Audio_GetInstrumentInner(fontId, instId);
@@ -425,6 +481,7 @@ s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId) {
if (instrument->normalRangeHi != 0x7F) {
return AudioLoad_SyncLoadSample(instrument->highPitchTunedSample.sample, fontId);
}
+ //! @bug Missing return, but the return value is never used so it's fine.
} else if (instId == 0x7F) {
Drum* drum = Audio_GetDrum(fontId, drumId);
@@ -436,24 +493,39 @@ s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId) {
}
}
+/**
+ * original name: Nas_PreLoad_BG
+ */
void AudioLoad_AsyncLoad(s32 tableType, s32 id, s32 nChunks, s32 retData, OSMesgQueue* retQueue) {
if (AudioLoad_AsyncLoadInner(tableType, id, nChunks, retData, retQueue) == NULL) {
osSendMesg(retQueue, (OSMesg)0xFFFFFFFF, OS_MESG_NOBLOCK);
}
}
+/**
+ * original name: Nas_PreLoadSeq_BG
+ */
void AudioLoad_AsyncLoadSeq(s32 seqId, s32 arg1, s32 retData, OSMesgQueue* retQueue) {
AudioLoad_AsyncLoad(SEQUENCE_TABLE, seqId, 0, retData, retQueue);
}
+/**
+ * original name: Nas_PreLoadWave_BG
+ */
void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 arg1, s32 retData, OSMesgQueue* retQueue) {
AudioLoad_AsyncLoad(SAMPLE_TABLE, sampleBankId, 0, retData, retQueue);
}
+/**
+ * original name: Nas_PreLoadBank_BG
+ */
void AudioLoad_AsyncLoadFont(s32 fontId, s32 arg1, s32 retData, OSMesgQueue* retQueue) {
AudioLoad_AsyncLoad(FONT_TABLE, fontId, 0, retData, retQueue);
}
+/**
+ * original name: Nas_SeqToBank
+ */
u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* outNumFonts) {
s32 index = ((u16*)gAudioCtx.sequenceFontTable)[seqId];
@@ -464,6 +536,9 @@ u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* outNumFonts) {
return &gAudioCtx.sequenceFontTable[index];
}
+/**
+ * original name: Nas_FlushBank
+ */
void AudioLoad_DiscardSeqFonts(s32 seqId) {
s32 fontId;
s32 index = ((u16*)gAudioCtx.sequenceFontTable)[seqId];
@@ -479,6 +554,9 @@ void AudioLoad_DiscardSeqFonts(s32 seqId) {
}
}
+/**
+ * original name: __Kill_Bank
+ */
void AudioLoad_DiscardFont(s32 fontId) {
u32 i;
AudioCache* pool = &gAudioCtx.fontCache;
@@ -500,6 +578,9 @@ void AudioLoad_DiscardFont(s32 fontId) {
AudioHeap_DiscardFont(fontId);
}
+/**
+ * original name: Nas_StartMySeq
+ */
s32 AudioLoad_SyncInitSeqPlayer(s32 playerIdx, s32 seqId, s32 arg2) {
if (gAudioCtx.resetTimer != 0) {
return 0;
@@ -507,12 +588,15 @@ s32 AudioLoad_SyncInitSeqPlayer(s32 playerIdx, s32 seqId, s32 arg2) {
gAudioCtx.seqPlayers[playerIdx].skipTicks = 0;
AudioLoad_SyncInitSeqPlayerInternal(playerIdx, seqId, arg2);
- // Intentionally missing return. Returning the result of the above function
- // call matches but is UB because it too is missing a return, and using the
- // result of a non-void function that has failed to return a value is UB.
- // The callers of this function do not use the return value, so it's fine.
+ //! @bug Missing return. Returning the result of the above function call
+ //! matches but is UB because it too is missing a return, and using the
+ //! result of a non-void function that has failed to return a value is UB.
+ //! The callers of this function do not use the return value, so it's fine.
}
+/**
+ * original name: Nas_StartSeq_Skip
+ */
s32 AudioLoad_SyncInitSeqPlayerSkipTicks(s32 playerIdx, s32 seqId, s32 skipTicks) {
if (gAudioCtx.resetTimer != 0) {
return 0;
@@ -520,9 +604,12 @@ s32 AudioLoad_SyncInitSeqPlayerSkipTicks(s32 playerIdx, s32 seqId, s32 skipTicks
gAudioCtx.seqPlayers[playerIdx].skipTicks = skipTicks;
AudioLoad_SyncInitSeqPlayerInternal(playerIdx, seqId, 0);
- // Missing return, see above.
+ //! @bug Missing return, see comment in AudioLoad_SyncInitSeqPlayer above.
}
+/**
+ * original name: __Nas_StartSeq
+ */
s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
SequencePlayer* seqPlayer = &gAudioCtx.seqPlayers[playerIdx];
u8* seqData;
@@ -565,6 +652,9 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
//! @bug missing return (but the return value is not used so it's not UB)
}
+/**
+ * original name: __Load_Seq
+ */
u8* AudioLoad_SyncLoadSeq(s32 seqId) {
s32 pad;
s32 didAllocate;
@@ -576,10 +666,16 @@ u8* AudioLoad_SyncLoadSeq(s32 seqId) {
return AudioLoad_SyncLoad(SEQUENCE_TABLE, seqId, &didAllocate);
}
+/**
+ * original name: __Load_Wave_Check
+ */
u32 AudioLoad_GetSampleBank(u32 sampleBankId, u32* outMedium) {
return AudioLoad_TrySyncLoadSampleBank(sampleBankId, outMedium, true);
}
+/**
+ * original name: __Load_Wave
+ */
u32 AudioLoad_TrySyncLoadSampleBank(u32 sampleBankId, u32* outMedium, s32 noLoad) {
void* ramAddr;
AudioTable* sampleBankTable;
@@ -612,6 +708,9 @@ u32 AudioLoad_TrySyncLoadSampleBank(u32 sampleBankId, u32* outMedium, s32 noLoad
return sampleBankTable->entries[realTableId].romAddr;
}
+/**
+ * original name: __Load_Ctrl
+ */
SoundFontData* AudioLoad_SyncLoadFont(u32 fontId) {
SoundFontData* fontData;
s32 sampleBankId1;
@@ -651,6 +750,9 @@ SoundFontData* AudioLoad_SyncLoadFont(u32 fontId) {
return fontData;
}
+/**
+ * original name: __Load_Bank
+ */
void* AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) {
u32 size;
AudioTable* table;
@@ -735,6 +837,9 @@ void* AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) {
return ramAddr;
}
+/**
+ * original name: __Link_BankNum
+ */
u32 AudioLoad_GetRealTableIndex(s32 tableType, u32 id) {
AudioTable* table = AudioLoad_GetLoadTable(tableType);
@@ -745,6 +850,9 @@ u32 AudioLoad_GetRealTableIndex(s32 tableType, u32 id) {
return id;
}
+/**
+ * original name: __Check_Cache
+ */
void* AudioLoad_SearchCaches(s32 tableType, s32 id) {
void* ramAddr;
@@ -761,6 +869,10 @@ void* AudioLoad_SearchCaches(s32 tableType, s32 id) {
return NULL;
}
+/**
+ * Animal Crossing's equivalent to this function is __Get_ArcHeader.
+ * This name must be new, because ARC files are GameCube speicifc.
+ */
AudioTable* AudioLoad_GetLoadTable(s32 tableType) {
AudioTable* table;
@@ -786,7 +898,9 @@ AudioTable* AudioLoad_GetLoadTable(s32 tableType) {
/**
* Read and extract information from soundFont binary loaded into ram.
- * Also relocate offsets into pointers within this loaded soundFont
+ * Also relocate offsets into pointers within this loaded soundFont.
+ *
+ * original name: Nas_BankOfsToAddr_Inner
*
* @param fontId index of font being processed
* @param fontDataStartAddr ram address of raw soundfont binary loaded into cache
@@ -916,6 +1030,9 @@ void AudioLoad_RelocateFont(s32 fontId, SoundFontData* fontDataStartAddr, Sample
gAudioCtx.soundFontList[fontId].instruments = (Instrument**)(fontData + 2);
}
+/**
+ * original name: Nas_FastCopy
+ */
void AudioLoad_SyncDma(u32 devAddr, u8* ramAddr, u32 size, s32 medium) {
OSMesgQueue* msgQueue = &gAudioCtx.syncDmaQueue;
OSIoMesg* ioMesg = &gAudioCtx.syncDmaIoMesg;
@@ -940,9 +1057,15 @@ void AudioLoad_SyncDma(u32 devAddr, u8* ramAddr, u32 size, s32 medium) {
}
}
+/**
+ * original name: Nas_FastDiskCopy
+ */
void AudioLoad_SyncDmaUnkMedium(u32 devAddr, u8* addr, u32 size, s32 unkMediumParam) {
}
+/**
+ * original name: Nas_StartDma
+ */
s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, u32 devAddr, void* ramAddr, u32 size,
OSMesgQueue* reqQueue, s32 medium, const char* dmaFuncType) {
OSPiHandle* handle;
@@ -980,15 +1103,24 @@ s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, u32 devAddr, void
return 0;
}
+/**
+ * original name: __OfsToLbaOfs
+ */
void AudioLoad_Unused1(void) {
}
+/**
+ * original name: EmemLoad
+ */
void AudioLoad_SyncLoadSimple(u32 tableType, u32 fontId) {
s32 didAllocate;
AudioLoad_SyncLoad(tableType, fontId, &didAllocate);
}
+/**
+ * original name: __Load_Bank_BG
+ */
void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, OSMesgQueue* retQueue) {
u32 size;
AudioTable* table;
@@ -1095,20 +1227,32 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData,
return ramAddr;
}
+/**
+ * original name: Nas_BgDmaFrameWork
+ */
void AudioLoad_ProcessLoads(s32 resetStatus) {
AudioLoad_ProcessSlowLoads(resetStatus);
AudioLoad_ProcessSamplePreloads(resetStatus);
AudioLoad_ProcessAsyncLoads(resetStatus);
}
+/**
+ * original name: Nas_SetRomHandler
+ */
void AudioLoad_SetDmaHandler(DmaHandler callback) {
sDmaHandler = callback;
}
+/**
+ * original name: Nas_SetRomHandler
+ */
void AudioLoad_SetUnusedHandler(void* callback) {
sUnusedHandler = callback;
}
+/**
+ * original name: __SetVlute
+ */
void AudioLoad_InitSoundFont(s32 fontId) {
SoundFont* font = &gAudioCtx.soundFontList[fontId];
AudioTableEntry* entry = &gAudioCtx.soundFontTable->entries[fontId];
@@ -1120,6 +1264,9 @@ void AudioLoad_InitSoundFont(s32 fontId) {
font->numSfx = entry->shortData3;
}
+/**
+ * original name: Nas_InitAudio
+ */
void AudioLoad_Init(void* heap, u32 heapSize) {
s32 pad[18];
s32 numFonts;
@@ -1149,6 +1296,7 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
}
// 1000 is a conversion from seconds to milliseconds
+#if !OOT_PAL_N64
switch (osTvType) {
case OS_TV_PAL:
gAudioCtx.maxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_PAL / REFRESH_RATE_PAL;
@@ -1166,6 +1314,15 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
gAudioCtx.refreshRate = REFRESH_RATE_NTSC;
break;
}
+#else
+ switch (osTvType) {
+ case OS_TV_PAL:
+ default:
+ gAudioCtx.maxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_PAL / REFRESH_RATE_PAL;
+ gAudioCtx.refreshRate = REFRESH_RATE_PAL;
+ break;
+ }
+#endif
AudioThread_InitMesgQueues();
@@ -1176,7 +1333,7 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
gAudioCtx.totalTaskCount = 0;
gAudioCtx.rspTaskIndex = 0;
gAudioCtx.curAiBufIndex = 0;
- gAudioCtx.soundMode = SOUNDMODE_STEREO;
+ gAudioCtx.soundOutputMode = SOUND_OUTPUT_STEREO;
gAudioCtx.curTask = NULL;
gAudioCtx.rspTask[0].task.t.data_size = 0;
gAudioCtx.rspTask[1].task.t.data_size = 0;
@@ -1195,8 +1352,7 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
gAudioCtx.audioHeap = gAudioHeap;
gAudioCtx.audioHeapSize = gAudioHeapInitSizes.heapSize;
} else {
- void** hp = &heap;
- gAudioCtx.audioHeap = *hp;
+ gAudioCtx.audioHeap = heap;
gAudioCtx.audioHeapSize = heapSize;
}
@@ -1213,7 +1369,7 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
}
// Set audio tables pointers
- gAudioCtx.sequenceTable = (AudioTable*)gSequenceTable;
+ gAudioCtx.sequenceTable = &gSequenceTable;
gAudioCtx.soundFontTable = &gSoundFontTable;
gAudioCtx.sampleBankTable = &gSampleBankTable;
gAudioCtx.sequenceFontTable = gSequenceFontTable;
@@ -1238,8 +1394,7 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
ramAddr = AudioHeap_Alloc(&gAudioCtx.initPool, gAudioHeapInitSizes.permanentPoolSize);
if (ramAddr == NULL) {
- // cast away const from gAudioHeapInitSizes
- *((u32*)&gAudioHeapInitSizes.permanentPoolSize) = 0;
+ gAudioHeapInitSizes.permanentPoolSize = 0;
}
AudioHeap_InitPool(&gAudioCtx.permanentPool, ramAddr, gAudioHeapInitSizes.permanentPoolSize);
@@ -1247,11 +1402,17 @@ void AudioLoad_Init(void* heap, u32 heapSize) {
osSendMesg(gAudioCtx.taskStartQueueP, (OSMesg)gAudioCtx.totalTaskCount, OS_MESG_NOBLOCK);
}
+/**
+ * original name: LpsInit
+ */
void AudioLoad_InitSlowLoads(void) {
gAudioCtx.slowLoads[0].state = SLOW_LOAD_STATE_WAITING;
gAudioCtx.slowLoads[1].state = SLOW_LOAD_STATE_WAITING;
}
+/**
+ * original name: VoiceLoad
+ */
s32 AudioLoad_SlowLoadSample(s32 fontId, s32 instId, s8* status) {
Sample* sample;
AudioSlowLoad* slowLoad;
@@ -1302,6 +1463,9 @@ s32 AudioLoad_SlowLoadSample(s32 fontId, s32 instId, s8* status) {
return 0;
}
+/**
+ * original name: __GetWaveTable
+ */
Sample* AudioLoad_GetFontSample(s32 fontId, s32 instId) {
Sample* sample;
@@ -1333,6 +1497,9 @@ Sample* AudioLoad_GetFontSample(s32 fontId, s32 instId) {
void AudioLoad_Unused2(void) {
}
+/**
+ * original name: __SwapLoadLps
+ */
void AudioLoad_FinishSlowLoad(AudioSlowLoad* slowLoad) {
Sample* sample;
@@ -1350,6 +1517,9 @@ void AudioLoad_FinishSlowLoad(AudioSlowLoad* slowLoad) {
sample->medium = MEDIUM_RAM;
}
+/**
+ * original name: LpsDma
+ */
void AudioLoad_ProcessSlowLoads(s32 resetStatus) {
AudioSlowLoad* slowLoad;
s32 i;
@@ -1399,6 +1569,9 @@ void AudioLoad_ProcessSlowLoads(s32 resetStatus) {
}
}
+/**
+ * original name: __Nas_SlowCopy
+ */
void AudioLoad_DmaSlowCopy(AudioSlowLoad* slowLoad, s32 size) {
Audio_InvalDCache(slowLoad->curRamAddr, size);
osCreateMesgQueue(&slowLoad->msgQueue, &slowLoad->msg, 1);
@@ -1406,9 +1579,15 @@ void AudioLoad_DmaSlowCopy(AudioSlowLoad* slowLoad, s32 size) {
&slowLoad->msgQueue, slowLoad->medium, "SLOWCOPY");
}
+/**
+ * original name: __Nas_SlowDiskCopy
+ */
void AudioLoad_DmaSlowCopyUnkMedium(s32 devAddr, u8* ramAddr, s32 size, s32 arg3) {
}
+/**
+ * original name: SeqLoad
+ */
s32 AudioLoad_SlowLoadSeq(s32 seqId, u8* ramAddr, s8* status) {
AudioSlowLoad* slowLoad;
AudioTable* seqTable;
@@ -1446,6 +1625,9 @@ s32 AudioLoad_SlowLoadSeq(s32 seqId, u8* ramAddr, s8* status) {
return 0;
}
+/**
+ * original name: Nas_BgCopyInit
+ */
void AudioLoad_InitAsyncLoads(void) {
s32 i;
@@ -1454,6 +1636,9 @@ void AudioLoad_InitAsyncLoads(void) {
}
}
+/**
+ * original name: Nas_BgCopyDisk
+ */
AudioAsyncLoad* AudioLoad_StartAsyncLoadUnkMedium(s32 unkMediumParam, u32 devAddr, void* ramAddr, s32 size, s32 medium,
s32 nChunks, OSMesgQueue* retQueue, s32 retMsg) {
AudioAsyncLoad* asyncLoad;
@@ -1469,6 +1654,9 @@ AudioAsyncLoad* AudioLoad_StartAsyncLoadUnkMedium(s32 unkMediumParam, u32 devAdd
return asyncLoad;
}
+/**
+ * original name: Nas_BgCopyReq
+ */
AudioAsyncLoad* AudioLoad_StartAsyncLoad(u32 devAddr, void* ramAddr, u32 size, s32 medium, s32 nChunks,
OSMesgQueue* retQueue, s32 retMsg) {
AudioAsyncLoad* asyncLoad;
@@ -1511,6 +1699,9 @@ AudioAsyncLoad* AudioLoad_StartAsyncLoad(u32 devAddr, void* ramAddr, u32 size, s
return asyncLoad;
}
+/**
+ * original name: Nas_BgCopyMain
+ */
void AudioLoad_ProcessAsyncLoads(s32 resetStatus) {
AudioAsyncLoad* asyncLoad;
s32 i;
@@ -1545,9 +1736,15 @@ void AudioLoad_ProcessAsyncLoads(s32 resetStatus) {
}
}
+/**
+ * original name: __BgCopyDisk
+ */
void AudioLoad_ProcessAsyncLoadUnkMedium(AudioAsyncLoad* asyncLoad, s32 resetStatus) {
}
+/**
+ * original name: __BgCopyFinishProcess
+ */
void AudioLoad_FinishAsyncLoad(AudioAsyncLoad* asyncLoad) {
u32 retMsg = asyncLoad->retMsg;
u32 fontId;
@@ -1588,6 +1785,9 @@ void AudioLoad_FinishAsyncLoad(AudioAsyncLoad* asyncLoad) {
osSendMesg(asyncLoad->retQueue, doneMsg, OS_MESG_NOBLOCK);
}
+/**
+ * original name: __BgCopySub
+ */
void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus) {
AudioTable* sampleBankTable = gAudioCtx.sampleBankTable;
@@ -1636,6 +1836,9 @@ void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus) {
asyncLoad->curRamAddr += asyncLoad->chunkSize;
}
+/**
+ * original name: __Nas_BgCopy
+ */
void AudioLoad_AsyncDma(AudioAsyncLoad* asyncLoad, u32 size) {
size = ALIGN16(size);
Audio_InvalDCache(asyncLoad->curRamAddr, size);
@@ -1644,6 +1847,9 @@ void AudioLoad_AsyncDma(AudioAsyncLoad* asyncLoad, u32 size) {
&asyncLoad->msgQueue, asyncLoad->medium, "BGCOPY");
}
+/**
+ * original name: __Nas_BgDiskCopy
+ */
void AudioLoad_AsyncDmaUnkMedium(u32 devAddr, void* ramAddr, u32 size, s16 arg3) {
}
@@ -1653,6 +1859,8 @@ void AudioLoad_AsyncDmaUnkMedium(u32 devAddr, void* ramAddr, u32 size, s16 arg3)
* TunedSample contains metadata on a sample used by a particular instrument/drum/sfx
* Also relocate offsets into pointers within this loaded TunedSample
*
+ * original name: __WaveTouch
+ *
* @param fontId index of font being processed
* @param fontData ram address of raw soundfont binary loaded into cache
* @param sampleBankReloc information on the sampleBank containing raw audio samples
@@ -1709,6 +1917,8 @@ void AudioLoad_RelocateSample(TunedSample* tunedSample, SoundFontData* fontData,
}
/**
+ * original name: Nas_BankOfsToAddr
+ *
* @param fontId index of font being processed
* @param fontData ram address of raw soundfont binary loaded into cache
* @param sampleBankReloc information on the sampleBank containing raw audio samples
@@ -1816,6 +2026,9 @@ void AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, SoundFontData* fontData
}
}
+/**
+ * original name: Nas_CheckBgWave
+ */
s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus) {
Sample* sample;
AudioPreloadReq* preload;
@@ -1878,6 +2091,9 @@ s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus) {
return true;
}
+/**
+ * original name: __AddList
+ */
s32 AudioLoad_AddToSampleSet(Sample* sample, s32 numSamples, Sample** sampleSet) {
s32 i;
@@ -1895,6 +2111,9 @@ s32 AudioLoad_AddToSampleSet(Sample* sample, s32 numSamples, Sample** sampleSet)
return numSamples;
}
+/**
+ * original name: MakeWaveList
+ */
s32 AudioLoad_GetSamplesForFont(s32 fontId, Sample** sampleSet) {
s32 i;
s32 numSamples = 0;
@@ -1928,6 +2147,9 @@ s32 AudioLoad_GetSamplesForFont(s32 fontId, Sample** sampleSet) {
return numSamples;
}
+/**
+ * original name: __Reload
+ */
void AudioLoad_AddUsedSample(TunedSample* tunedSample) {
Sample* sample = tunedSample->sample;
@@ -1936,6 +2158,9 @@ void AudioLoad_AddUsedSample(TunedSample* tunedSample) {
}
}
+/**
+ * original name: WaveReload
+ */
void AudioLoad_PreloadSamplesForFont(s32 fontId, s32 async, SampleBankRelocInfo* sampleBankReloc) {
s32 numDrums;
s32 numInstruments;
@@ -2071,6 +2296,9 @@ void AudioLoad_PreloadSamplesForFont(s32 fontId, s32 async, SampleBankRelocInfo*
}
}
+/**
+ * original name: EmemReload
+ */
void AudioLoad_LoadPermanentSamples(void) {
s32 pad;
u32 fontId;
@@ -2103,15 +2331,27 @@ void AudioLoad_LoadPermanentSamples(void) {
}
}
+/**
+ * original name: __ExtDiskFinishCheck
+ */
void AudioLoad_Unused3(void) {
}
+/**
+ * original name: __ExtDiskInit
+ */
void AudioLoad_Unused4(void) {
}
+/**
+ * original name: __ExtDiskLoad
+ */
void AudioLoad_Unused5(void) {
}
+/**
+ * original name: MK_load
+ */
void AudioLoad_ScriptLoad(s32 tableType, s32 id, s8* status) {
static u32 sLoadIndex = 0;
@@ -2123,6 +2363,9 @@ void AudioLoad_ScriptLoad(s32 tableType, s32 id, s8* status) {
}
}
+/**
+ * original name: MK_FrameWork
+ */
void AudioLoad_ProcessScriptLoads(void) {
u32 temp;
u32 sp20;
@@ -2137,6 +2380,9 @@ void AudioLoad_ProcessScriptLoads(void) {
}
}
+/**
+ * original name: MK_Init
+ */
void AudioLoad_InitScriptLoads(void) {
osCreateMesgQueue(&sScriptLoadQueue, sScriptLoadMsgBuf, ARRAY_COUNT(sScriptLoadMsgBuf));
}
diff --git a/src/audio/lib/aisetnextbuf.c b/src/audio/internal/os.c
similarity index 83%
rename from src/audio/lib/aisetnextbuf.c
rename to src/audio/internal/os.c
index 4cf5d1f7d9..4bbb0d2fdb 100644
--- a/src/audio/lib/aisetnextbuf.c
+++ b/src/audio/internal/os.c
@@ -1,4 +1,23 @@
-#include "global.h"
+/**
+ * Original Filename: os.c
+ */
+
+#include "ultra64.h"
+#include "z64audio.h"
+
+void Audio_InvalDCache(void* buf, s32 size) {
+ OSIntMask prevMask = osSetIntMask(OS_IM_NONE);
+
+ osInvalDCache(buf, size);
+ osSetIntMask(prevMask);
+}
+
+void Audio_WritebackDCache(void* buf, s32 size) {
+ OSIntMask prevMask = osSetIntMask(OS_IM_NONE);
+
+ osWritebackDCache(buf, size);
+ osSetIntMask(prevMask);
+}
/**
* Submits an audio buffer to be consumed by the Audio DAC. The audio interface can queue a second DMA while another
diff --git a/src/audio/lib/playback.c b/src/audio/internal/playback.c
similarity index 99%
rename from src/audio/lib/playback.c
rename to src/audio/internal/playback.c
index 9c1b8126e4..327e271d06 100644
--- a/src/audio/lib/playback.c
+++ b/src/audio/internal/playback.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "ultra64.h"
+#include "z64audio.h"
void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
f32 volLeft;
@@ -31,7 +32,7 @@ void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
sub->bitField0.stereoStrongLeft = false;
sub->bitField0.stereoHeadsetEffects = stereoData.stereoHeadsetEffects;
sub->bitField0.usesHeadsetPanEffects = stereoData.usesHeadsetPanEffects;
- if (stereoHeadsetEffects && (gAudioCtx.soundMode == SOUNDMODE_HEADSET)) {
+ if (stereoHeadsetEffects && (gAudioCtx.soundOutputMode == SOUND_OUTPUT_HEADSET)) {
halfPanIndex = pan >> 1;
if (halfPanIndex > 0x3F) {
halfPanIndex = 0x3F;
@@ -43,7 +44,7 @@ void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
volLeft = gHeadsetPanVolume[pan];
volRight = gHeadsetPanVolume[0x7F - pan];
- } else if (stereoHeadsetEffects && (gAudioCtx.soundMode == SOUNDMODE_STEREO)) {
+ } else if (stereoHeadsetEffects && (gAudioCtx.soundOutputMode == SOUND_OUTPUT_STEREO)) {
strongLeft = strongRight = 0;
sub->haasEffectLeftDelaySize = 0;
sub->haasEffectRightDelaySize = 0;
@@ -80,7 +81,7 @@ void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
break;
}
- } else if (gAudioCtx.soundMode == SOUNDMODE_MONO) {
+ } else if (gAudioCtx.soundOutputMode == SOUND_OUTPUT_MONO) {
sub->bitField0.stereoHeadsetEffects = false;
sub->bitField0.usesHeadsetPanEffects = false;
volLeft = 0.707f; // approx 1/sqrt(2)
diff --git a/src/audio/lib/seqplayer.c b/src/audio/internal/seqplayer.c
similarity index 83%
rename from src/audio/lib/seqplayer.c
rename to src/audio/internal/seqplayer.c
index 63aedeb56b..1d6fb7c0a6 100644
--- a/src/audio/lib/seqplayer.c
+++ b/src/audio/internal/seqplayer.c
@@ -1,5 +1,6 @@
/**
* @file audio_seqplayer.c
+ * original name: track.c
*
* Manages audio sequence players, interprets and executes sequence instructions used to write .seq files
*
@@ -13,8 +14,14 @@
* - All three sets share a common pool of control flow instructions (>= 0xF2).
* Otherwise, each set of instructions has its own command interpreter
*/
+#include "audio/aseq.h"
+#include "array_count.h"
+#include "assert.h"
+#include "attributes.h"
#include "ultra64.h"
-#include "global.h"
+#include "z64audio.h"
+
+static_assert(MML_VERSION == MML_VERSION_OOT, "This file implements the OoT version of the MML");
#define PORTAMENTO_IS_SPECIAL(x) ((x).mode & 0x80)
#define PORTAMENTO_MODE(x) ((x).mode & ~0x80)
@@ -70,93 +77,95 @@ u8 AudioSeq_GetInstrument(SequenceChannel* channel, u8 instId, Instrument** inst
(((sizeof(arg0Type) - 1) << 7) | ((sizeof(arg1Type) - 1) << 6) | ((sizeof(arg2Type) - 1) << 5) | 3)
u8 sSeqInstructionArgsTable[] = {
- CMD_ARGS_1(s16), // 0xB0
- CMD_ARGS_0(), // 0xB1
- CMD_ARGS_1(s16), // 0xB2
- CMD_ARGS_1(u8), // 0xB3
- CMD_ARGS_0(), // 0xB4
- CMD_ARGS_0(), // 0xB5
- CMD_ARGS_0(), // 0xB6
- CMD_ARGS_1(s16), // 0xB7
- CMD_ARGS_1(u8), // 0xB8
- CMD_ARGS_1(u8), // 0xB9
- CMD_ARGS_1(u8), // 0xBA
- CMD_ARGS_2(u8, s16), // 0xBB
- CMD_ARGS_1(s16), // 0xBC
- CMD_ARGS_2(s16, s16), // 0xBD
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_LDFILTER
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_FREEFILTER
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_LDSEQTOPTR
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_FILTER
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_PTRTODYNTBL
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_DYNTBLTOPTR
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_DYNTBLV
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_RANDTOPTR
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_RAND
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_RANDVEL
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_RANDGATE
+ CMD_ARGS_2(u8, s16), // ASEQ_OP_CHAN_COMBFILTER
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_PTRADD
+ CMD_ARGS_2(s16, s16), // ASEQ_OP_CHAN_RANDPTR
CMD_ARGS_0(), // 0xBE
CMD_ARGS_0(), // 0xBF
CMD_ARGS_0(), // 0xC0
- CMD_ARGS_1(u8), // 0xC1
- CMD_ARGS_1(s16), // 0xC2
- CMD_ARGS_0(), // 0xC3
- CMD_ARGS_0(), // 0xC4
- CMD_ARGS_0(), // 0xC5
- CMD_ARGS_1(u8), // 0xC6
- CMD_ARGS_2(u8, s16), // 0xC7
- CMD_ARGS_1(u8), // 0xC8
- CMD_ARGS_1(u8), // 0xC9
- CMD_ARGS_1(u8), // 0xCA
- CMD_ARGS_1(s16), // 0xCB
- CMD_ARGS_1(u8), // 0xCC
- CMD_ARGS_1(u8), // 0xCD
- CMD_ARGS_1(s16), // 0xCE
- CMD_ARGS_1(s16), // 0xCF
- CMD_ARGS_1(u8), // 0xD0
- CMD_ARGS_1(u8), // 0xD1
- CMD_ARGS_1(u8), // 0xD2
- CMD_ARGS_1(u8), // 0xD3
- CMD_ARGS_1(u8), // 0xD4
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_INSTR
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_DYNTBL
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_SHORT
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_NOSHORT
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_DYNTBLLOOKUP
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_FONT
+ CMD_ARGS_2(u8, s16), // ASEQ_OP_CHAN_STSEQ
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_SUB
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_AND
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_MUTEBHV
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_LDSEQ
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_LDI
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_STOPCHAN
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_LDPTR
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_STPTRTOSEQ
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_EFFECTS
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_NOTEALLOC
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_SUSTAIN
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_BEND
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_REVERB
CMD_ARGS_1(u8), // 0xD5
CMD_ARGS_1(u8), // 0xD6
- CMD_ARGS_1(u8), // 0xD7
- CMD_ARGS_1(u8), // 0xD8
- CMD_ARGS_1(u8), // 0xD9
- CMD_ARGS_1(s16), // 0xDA
- CMD_ARGS_1(u8), // 0xDB
- CMD_ARGS_1(u8), // 0xDC
- CMD_ARGS_1(u8), // 0xDD
- CMD_ARGS_1(s16), // 0xDE
- CMD_ARGS_1(u8), // 0xDF
- CMD_ARGS_1(u8), // 0xE0
- CMD_ARGS_3(u8, u8, u8), // 0xE1
- CMD_ARGS_3(u8, u8, u8), // 0xE2
- CMD_ARGS_1(u8), // 0xE3
- CMD_ARGS_0(), // 0xE4
- CMD_ARGS_1(u8), // 0xE5
- CMD_ARGS_1(u8), // 0xE6
- CMD_ARGS_1(s16), // 0xE7
- CMD_ARGS_3(u8, u8, u8), // 0xE8
- CMD_ARGS_1(u8), // 0xE9
- CMD_ARGS_0(), // 0xEA
- CMD_ARGS_2(u8, u8), // 0xEB
- CMD_ARGS_0(), // 0xEC
- CMD_ARGS_1(u8), // 0xED
- CMD_ARGS_1(u8), // 0xEE
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_VIBFREQ
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_VIBDEPTH
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_RELEASERATE
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_ENV
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_TRANSPOSE
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_PANWEIGHT
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_PAN
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_FREQSCALE
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_VOL
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_VOLEXP
+ CMD_ARGS_3(u8, u8, u8), // ASEQ_OP_CHAN_VIBFREQGRAD
+ CMD_ARGS_3(u8, u8, u8), // ASEQ_OP_CHAN_VIBDEPTHGRAD
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_VIBDELAY
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_DYNCALL
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_REVERBIDX
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_SAMPLEBOOK
+ CMD_ARGS_1(s16), // ASEQ_OP_CHAN_LDPARAMS
+ CMD_ARGS_3(u8, u8, u8), // ASEQ_OP_CHAN_PARAMS
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_NOTEPRI
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_STOP
+ CMD_ARGS_2(u8, u8), // ASEQ_OP_CHAN_FONTINSTR
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_VIBRESET
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_GAIN
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_BENDFINE
CMD_ARGS_2(s16, u8), // 0xEF
- CMD_ARGS_0(), // 0xF0
- CMD_ARGS_1(u8), // 0xF1
- // Control flow instructions (>= 0xF2) can only have 0 or 1 args
- CMD_ARGS_1(u8), // 0xF2
- CMD_ARGS_1(u8), // 0xF3
- CMD_ARGS_1(u8), // 0xF4
- CMD_ARGS_1(s16), // 0xF5
- CMD_ARGS_0(), // 0xF6
- CMD_ARGS_0(), // 0xF7
- CMD_ARGS_1(u8), // 0xF8
- CMD_ARGS_1(s16), // 0xF9
- CMD_ARGS_1(s16), // 0xFA
- CMD_ARGS_1(s16), // 0xFB
- CMD_ARGS_1(s16), // 0xFC
- CMD_ARGS_0(), // 0xFD
- CMD_ARGS_0(), // 0xFE
- CMD_ARGS_0(), // 0xFF
+ CMD_ARGS_0(), // ASEQ_OP_CHAN_FREENOTELIST
+ CMD_ARGS_1(u8), // ASEQ_OP_CHAN_ALLOCNOTELIST
+ // Control flow instructions (>= ASEQ_OP_CONTROL_FLOW_FIRST) can only have 0 or 1 args
+ CMD_ARGS_1(u8), // ASEQ_OP_RBLTZ
+ CMD_ARGS_1(u8), // ASEQ_OP_RBEQZ
+ CMD_ARGS_1(u8), // ASEQ_OP_RJUMP
+ CMD_ARGS_1(s16), // ASEQ_OP_BGEZ
+ CMD_ARGS_0(), // ASEQ_OP_BREAK
+ CMD_ARGS_0(), // ASEQ_OP_LOOPEND
+ CMD_ARGS_1(u8), // ASEQ_OP_LOOP
+ CMD_ARGS_1(s16), // ASEQ_OP_BLTZ
+ CMD_ARGS_1(s16), // ASEQ_OP_BEQZ
+ CMD_ARGS_1(s16), // ASEQ_OP_JUMP
+ CMD_ARGS_1(s16), // ASEQ_OP_CALL
+ CMD_ARGS_0(), // ASEQ_OP_DELAY
+ CMD_ARGS_0(), // ASEQ_OP_DELAY1
+ CMD_ARGS_0(), // ASEQ_OP_END
};
/**
* Read and return the argument from the sequence script for a control flow instruction.
- * Control flow instructions (>= 0xF2) can only have 0 or 1 args.
+ * Control flow instructions (>= ASEQ_OP_CONTROL_FLOW_FIRST) can only have 0 or 1 args.
* @return the argument value for a control flow instruction, or 0 if there is no argument
+ *
+ * original name: Convert_Com
*/
u16 AudioSeq_GetScriptControlFlowArgument(SeqScriptState* state, u8 cmd) {
u8 highBits = sSeqInstructionArgsTable[cmd - 0xB0];
@@ -178,33 +187,35 @@ u16 AudioSeq_GetScriptControlFlowArgument(SeqScriptState* state, u8 cmd) {
/**
* Read and execute the control flow sequence instructions
* @return number of frames until next instruction. -1 signals termination
+ *
+ * original name: Common_Com
*/
s32 AudioSeq_HandleScriptFlowControl(SequencePlayer* seqPlayer, SeqScriptState* state, s32 cmd, s32 cmdArg) {
switch (cmd) {
- case 0xFF:
+ case ASEQ_OP_END:
if (state->depth == 0) {
return PROCESS_SCRIPT_END;
}
state->pc = state->stack[--state->depth];
break;
- case 0xFD:
+ case ASEQ_OP_DELAY:
return AudioSeq_ScriptReadCompressedU16(state);
- case 0xFE:
+ case ASEQ_OP_DELAY1:
return 1;
- case 0xFC:
+ case ASEQ_OP_CALL:
state->stack[state->depth++] = state->pc;
state->pc = seqPlayer->seqData + (u16)cmdArg;
break;
- case 0xF8:
+ case ASEQ_OP_LOOP:
state->remLoopIters[state->depth] = cmdArg;
state->stack[state->depth++] = state->pc;
break;
- case 0xF7:
+ case ASEQ_OP_LOOPEND:
state->remLoopIters[state->depth - 1]--;
if (state->remLoopIters[state->depth - 1] != 0) {
state->pc = state->stack[state->depth - 1];
@@ -213,33 +224,33 @@ s32 AudioSeq_HandleScriptFlowControl(SequencePlayer* seqPlayer, SeqScriptState*
}
break;
- case 0xF6:
+ case ASEQ_OP_BREAK:
state->depth--;
break;
- case 0xF5:
- case 0xF9:
- case 0xFA:
- case 0xFB:
- if (cmd == 0xFA && state->value != 0) {
+ case ASEQ_OP_BGEZ:
+ case ASEQ_OP_BLTZ:
+ case ASEQ_OP_BEQZ:
+ case ASEQ_OP_JUMP:
+ if (cmd == ASEQ_OP_BEQZ && state->value != 0) {
break;
}
- if (cmd == 0xF9 && state->value >= 0) {
+ if (cmd == ASEQ_OP_BLTZ && state->value >= 0) {
break;
}
- if (cmd == 0xF5 && state->value < 0) {
+ if (cmd == ASEQ_OP_BGEZ && state->value < 0) {
break;
}
state->pc = seqPlayer->seqData + (u16)cmdArg;
break;
- case 0xF2:
- case 0xF3:
- case 0xF4:
- if (cmd == 0xF3 && state->value != 0) {
+ case ASEQ_OP_RBLTZ:
+ case ASEQ_OP_RBEQZ:
+ case ASEQ_OP_RJUMP:
+ if (cmd == ASEQ_OP_RBEQZ && state->value != 0) {
break;
}
- if (cmd == 0xF2 && state->value >= 0) {
+ if (cmd == ASEQ_OP_RBLTZ && state->value >= 0) {
break;
}
state->pc += (s8)(cmdArg & 0xFF);
@@ -249,6 +260,9 @@ s32 AudioSeq_HandleScriptFlowControl(SequencePlayer* seqPlayer, SeqScriptState*
return 0;
}
+/**
+ * original name: Nas_InitSubTrack
+ */
void AudioSeq_InitSequenceChannel(SequenceChannel* channel) {
s32 i;
@@ -304,6 +318,9 @@ void AudioSeq_InitSequenceChannel(SequenceChannel* channel) {
Audio_InitNoteLists(&channel->notePool);
}
+/**
+ * original name: Nas_EntryNoteTrack
+ */
s32 AudioSeq_SeqChannelSetLayer(SequenceChannel* channel, s32 layerIndex) {
SequenceLayer* layer;
s32 pad;
@@ -351,6 +368,9 @@ s32 AudioSeq_SeqChannelSetLayer(SequenceChannel* channel, s32 layerIndex) {
return 0;
}
+/**
+ * original name: Nas_ReleaseNoteTrack
+ */
void AudioSeq_SeqLayerDisable(SequenceLayer* layer) {
if (layer != NULL) {
if (layer->channel != &gAudioCtx.sequenceChannelNone && layer->channel->seqPlayer->finished == 1) {
@@ -363,6 +383,9 @@ void AudioSeq_SeqLayerDisable(SequenceLayer* layer) {
}
}
+/**
+ * original name: Nas_CloseNoteTrack
+ */
void AudioSeq_SeqLayerFree(SequenceChannel* channel, s32 layerIndex) {
SequenceLayer* layer = channel->layers[layerIndex];
@@ -373,6 +396,9 @@ void AudioSeq_SeqLayerFree(SequenceChannel* channel, s32 layerIndex) {
}
}
+/**
+ * original name: Nas_ReleaseSubTrack
+ */
void AudioSeq_SequenceChannelDisable(SequenceChannel* channel) {
s32 i;
@@ -385,6 +411,9 @@ void AudioSeq_SequenceChannelDisable(SequenceChannel* channel) {
channel->finished = true;
}
+/**
+ * original name: Nas_AllocSub
+ */
void AudioSeq_SequencePlayerSetupChannels(SequencePlayer* seqPlayer, u16 channelBits) {
SequenceChannel* channel;
s32 i;
@@ -400,6 +429,9 @@ void AudioSeq_SequencePlayerSetupChannels(SequencePlayer* seqPlayer, u16 channel
}
}
+/**
+ * original name: Nas_DeAllocSub
+ */
void AudioSeq_SequencePlayerDisableChannels(SequencePlayer* seqPlayer, u16 channelBitsUnused) {
SequenceChannel* channel;
s32 i;
@@ -412,6 +444,9 @@ void AudioSeq_SequencePlayerDisableChannels(SequencePlayer* seqPlayer, u16 chann
}
}
+/**
+ * original name: Nas_OpenSub
+ */
void AudioSeq_SequenceChannelEnable(SequencePlayer* seqPlayer, u8 channelIndex, void* script) {
SequenceChannel* channel = seqPlayer->channels[channelIndex];
s32 i;
@@ -429,15 +464,21 @@ void AudioSeq_SequenceChannelEnable(SequencePlayer* seqPlayer, u8 channelIndex,
}
}
+/**
+ * original name: Nas_ReleaseGroup_Force
+ */
void AudioSeq_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer) {
seqPlayer->finished = true;
AudioSeq_SequencePlayerDisable(seqPlayer);
}
+/**
+ * original name: Nas_ReleaseGroup
+ */
void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer) {
s32 finished = 0;
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if (seqPlayer->finished == 1) {
finished = 1;
}
@@ -457,7 +498,7 @@ void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer) {
}
if (AudioLoad_IsFontLoadComplete(seqPlayer->defaultFont)) {
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if (finished == 1) {
AudioHeap_ReleaseNotesForFont(seqPlayer->defaultFont);
}
@@ -472,6 +513,9 @@ void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer) {
}
}
+/**
+ * original name: Nas_AddList
+ */
void AudioSeq_AudioListPushBack(AudioListItem* list, AudioListItem* item) {
if (item->prev == NULL) {
list->prev->next = item;
@@ -483,6 +527,9 @@ void AudioSeq_AudioListPushBack(AudioListItem* list, AudioListItem* item) {
}
}
+/**
+ * original name: Nas_GetList
+ */
void* AudioSeq_AudioListPopBack(AudioListItem* list) {
AudioListItem* item = list->prev;
@@ -498,6 +545,9 @@ void* AudioSeq_AudioListPopBack(AudioListItem* list) {
return item->u.value;
}
+/**
+ * original name: Nas_InitNoteList
+ */
void AudioSeq_InitLayerFreelist(void) {
s32 i;
@@ -513,10 +563,16 @@ void AudioSeq_InitLayerFreelist(void) {
}
}
+/**
+ * original name: Nas_ReadByteData
+ */
u8 AudioSeq_ScriptReadU8(SeqScriptState* state) {
return *(state->pc++);
}
+/**
+ * original name: Nas_ReadWordData
+ */
s16 AudioSeq_ScriptReadS16(SeqScriptState* state) {
s16 ret = *(state->pc++) << 8;
@@ -524,6 +580,9 @@ s16 AudioSeq_ScriptReadS16(SeqScriptState* state) {
return ret;
}
+/**
+ * original name: Nas_ReadLengthData
+ */
u16 AudioSeq_ScriptReadCompressedU16(SeqScriptState* state) {
u16 ret = *(state->pc++);
@@ -534,6 +593,9 @@ u16 AudioSeq_ScriptReadCompressedU16(SeqScriptState* state) {
return ret;
}
+/**
+ * original name: Nas_NoteSeq
+ */
void AudioSeq_SeqLayerProcessScript(SequenceLayer* layer) {
s32 cmd;
@@ -575,6 +637,9 @@ void AudioSeq_SeqLayerProcessScript(SequenceLayer* layer) {
}
}
+/**
+ * original name: __Stop_Note
+ */
void AudioSeq_SeqLayerProcessScriptStep1(SequenceLayer* layer) {
if (!layer->continuousNotes) {
Audio_SeqLayerNoteDecay(layer);
@@ -589,6 +654,9 @@ void AudioSeq_SeqLayerProcessScriptStep1(SequenceLayer* layer) {
layer->notePropertiesNeedInit = true;
}
+/**
+ * original name: __SetChannel
+ */
s32 AudioSeq_SeqLayerProcessScriptStep5(SequenceLayer* layer, s32 sameTunedSample) {
Note* note;
@@ -627,6 +695,9 @@ s32 AudioSeq_SeqLayerProcessScriptStep5(SequenceLayer* layer, s32 sameTunedSampl
return 0;
}
+/**
+ * original name: __Command_Seq
+ */
s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
SequenceChannel* channel = layer->channel;
SeqScriptState* state = &layer->scriptState;
@@ -645,7 +716,7 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
}
// Control Flow Commands
- if (cmd >= 0xF2) {
+ if (cmd >= ASEQ_OP_CONTROL_FLOW_FIRST) {
cmdArg16 = AudioSeq_GetScriptControlFlowArgument(state, cmd);
if (AudioSeq_HandleScriptFlowControl(seqPlayer, state, cmd, cmdArg16) == 0) {
@@ -656,29 +727,29 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
}
switch (cmd) {
- case 0xC1: // layer_setshortnotevelocity
- case 0xCA: // layer_setpan
+ case ASEQ_OP_LAYER_SHORTVEL: // layer_setshortnotevelocity
+ case ASEQ_OP_LAYER_NOTEPAN: // layer_setpan
cmdArg8 = *(state->pc++);
- if (cmd == 0xC1) {
+ if (cmd == ASEQ_OP_LAYER_SHORTVEL) {
layer->velocitySquare = SQ(cmdArg8) / SQ(127.0f);
} else {
layer->pan = cmdArg8;
}
break;
- case 0xC9: // layer_setshortnotegatetime
- case 0xC2: // layer_transpose; set transposition in semitones
+ case ASEQ_OP_LAYER_SHORTGATE: // layer_setshortnotegatetime
+ case ASEQ_OP_LAYER_TRANSPOSE: // layer_transpose; set transposition in semitones
cmdArg8 = *(state->pc++);
- if (cmd == 0xC9) {
+ if (cmd == ASEQ_OP_LAYER_SHORTGATE) {
layer->gateTime = cmdArg8;
} else {
layer->transposition = cmdArg8;
}
break;
- case 0xC4: // layer_continuousnoteson
- case 0xC5: // layer_continuousnotesoff
- if (cmd == 0xC4) {
+ case ASEQ_OP_LAYER_LEGATO: // layer_continuousnoteson
+ case ASEQ_OP_LAYER_NOLEGATO: // layer_continuousnotesoff
+ if (cmd == ASEQ_OP_LAYER_LEGATO) {
layer->continuousNotes = true;
} else {
layer->continuousNotes = false;
@@ -687,12 +758,12 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
Audio_SeqLayerNoteDecay(layer);
break;
- case 0xC3: // layer_setshortnotedefaultdelay
+ case ASEQ_OP_LAYER_SHORTDELAY: // layer_setshortnotedefaultdelay
cmdArg16 = AudioSeq_ScriptReadCompressedU16(state);
layer->shortNoteDefaultDelay = cmdArg16;
break;
- case 0xC6: // layer_setinstr
+ case ASEQ_OP_LAYER_INSTR: // layer_setinstr
cmd = AudioSeq_ScriptReadU8(state);
if (cmd >= 0x7E) {
if (cmd == 0x7E) {
@@ -719,7 +790,7 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
}
break;
- case 0xC7: // layer_portamento
+ case ASEQ_OP_LAYER_PORTAMENTO: // layer_portamento
layer->portamento.mode = AudioSeq_ScriptReadU8(state);
cmd = AudioSeq_ScriptReadU8(state);
@@ -743,39 +814,39 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
layer->portamentoTime = cmdArg16;
break;
- case 0xC8: // layer_disableportamento
+ case ASEQ_OP_LAYER_NOPORTAMENTO: // layer_disableportamento
layer->portamento.mode = PORTAMENTO_MODE_OFF;
break;
- case 0xCB:
+ case ASEQ_OP_LAYER_ENV:
cmdArg16 = AudioSeq_ScriptReadS16(state);
layer->adsr.envelope = (EnvelopePoint*)(seqPlayer->seqData + cmdArg16);
FALLTHROUGH;
- case 0xCF:
+ case ASEQ_OP_LAYER_RELEASERATE:
layer->adsr.decayIndex = AudioSeq_ScriptReadU8(state);
break;
- case 0xCC:
+ case ASEQ_OP_LAYER_NODRUMPAN:
layer->ignoreDrumPan = true;
break;
- case 0xCD:
+ case ASEQ_OP_LAYER_STEREO:
layer->stereo.asByte = AudioSeq_ScriptReadU8(state);
break;
- case 0xCE:
+ case ASEQ_OP_LAYER_BENDFINE:
cmdArg8 = AudioSeq_ScriptReadU8(state);
layer->bend = gBendPitchTwoSemitonesFrequencies[(u8)(cmdArg8 + 0x80)];
break;
default:
switch (cmd & 0xF0) {
- case 0xD0: // layer_setshortnotevelocityfromtable
+ case ASEQ_OP_LAYER_LDSHORTVEL: // layer_setshortnotevelocityfromtable
velocity = seqPlayer->shortNoteVelocityTable[cmd & 0xF];
layer->velocitySquare = SQ(velocity) / SQ(127.0f);
break;
- case 0xE0: // layer_setshortnotegatetimefromtable
+ case ASEQ_OP_LAYER_LDSHORTGATE: // layer_setshortnotegatetimefromtable
layer->gateTime = seqPlayer->shortNoteGateTimeTable[cmd & 0xF];
break;
}
@@ -783,6 +854,9 @@ s32 AudioSeq_SeqLayerProcessScriptStep2(SequenceLayer* layer) {
}
}
+/**
+ * original name: __SetVoice
+ */
s32 AudioSeq_SeqLayerProcessScriptStep4(SequenceLayer* layer, s32 cmd) {
s32 sameTunedSample = true;
s32 instOrWave;
@@ -991,6 +1065,9 @@ s32 AudioSeq_SeqLayerProcessScriptStep4(SequenceLayer* layer, s32 cmd) {
return sameTunedSample;
}
+/**
+ * original name: __SetNote
+ */
s32 AudioSeq_SeqLayerProcessScriptStep3(SequenceLayer* layer, s32 cmd) {
SeqScriptState* state = &layer->scriptState;
u16 delay;
@@ -1000,7 +1077,7 @@ s32 AudioSeq_SeqLayerProcessScriptStep3(SequenceLayer* layer, s32 cmd) {
s32 intDelta;
f32 floatDelta;
- if (cmd == 0xC0) {
+ if (cmd == ASEQ_OP_LAYER_LDELAY) {
layer->delay = AudioSeq_ScriptReadCompressedU16(state);
layer->muted = true;
layer->bit1 = false;
@@ -1011,21 +1088,21 @@ s32 AudioSeq_SeqLayerProcessScriptStep3(SequenceLayer* layer, s32 cmd) {
if (channel->largeNotes == true) {
switch (cmd & 0xC0) {
- case 0x00:
+ case ASEQ_OP_LAYER_NOTEDVG:
delay = AudioSeq_ScriptReadCompressedU16(state);
velocity = *(state->pc++);
layer->gateTime = *(state->pc++);
layer->lastDelay = delay;
break;
- case 0x40:
+ case ASEQ_OP_LAYER_NOTEDV:
delay = AudioSeq_ScriptReadCompressedU16(state);
velocity = *(state->pc++);
layer->gateTime = 0;
layer->lastDelay = delay;
break;
- case 0x80:
+ case ASEQ_OP_LAYER_NOTEVG:
delay = layer->lastDelay;
velocity = *(state->pc++);
layer->gateTime = *(state->pc++);
@@ -1039,16 +1116,16 @@ s32 AudioSeq_SeqLayerProcessScriptStep3(SequenceLayer* layer, s32 cmd) {
cmd -= (cmd & 0xC0);
} else {
switch (cmd & 0xC0) {
- case 0x00:
+ case ASEQ_OP_LAYER_NOTEDVG:
delay = AudioSeq_ScriptReadCompressedU16(state);
layer->lastDelay = delay;
break;
- case 0x40:
+ case ASEQ_OP_LAYER_NOTEDV:
delay = layer->shortNoteDefaultDelay;
break;
- case 0x80:
+ case ASEQ_OP_LAYER_NOTEVG:
delay = layer->lastDelay;
break;
}
@@ -1104,6 +1181,9 @@ s32 AudioSeq_SeqLayerProcessScriptStep3(SequenceLayer* layer, s32 cmd) {
return cmd;
}
+/**
+ * original name: Nas_PriorityChanger
+ */
void AudioSeq_SetChannelPriorities(SequenceChannel* channel, u8 priority) {
if ((priority & 0xF) != 0) {
channel->notePriority = priority & 0xF;
@@ -1115,6 +1195,9 @@ void AudioSeq_SetChannelPriorities(SequenceChannel* channel, u8 priority) {
}
}
+/**
+ * original name: Nas_ProgramChanger
+ */
u8 AudioSeq_GetInstrument(SequenceChannel* channel, u8 instId, Instrument** instOut, AdsrSettings* adsr) {
Instrument* inst = Audio_GetInstrumentInner(channel->fontId, instId);
@@ -1134,6 +1217,9 @@ u8 AudioSeq_GetInstrument(SequenceChannel* channel, u8 instId, Instrument** inst
return instId;
}
+/**
+ * original name: Nas_SubVoiceSet
+ */
void AudioSeq_SetInstrument(SequenceChannel* channel, u8 instId) {
if (instId >= 0x80) {
// Synthetic Waves
@@ -1159,10 +1245,16 @@ void AudioSeq_SetInstrument(SequenceChannel* channel, u8 instId) {
channel->hasInstrument = true;
}
+/**
+ * original name: Nas_SubVolumeSet
+ */
void AudioSeq_SequenceChannelSetVolume(SequenceChannel* channel, u8 volume) {
channel->volume = (s32)volume / 127.0f;
}
+/**
+ * original name: Nas_SubSeq
+ */
void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
s32 i;
u8* data;
@@ -1210,7 +1302,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
}
// Control Flow Commands
- if (cmd >= 0xF2) {
+ if (cmd >= ASEQ_OP_CONTROL_FLOW_FIRST) {
delay = AudioSeq_HandleScriptFlowControl(seqPlayer, scriptState, cmd, cmdArgs[0]);
if (delay != 0) {
@@ -1225,26 +1317,26 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
}
switch (cmd) {
- case 0xEA:
+ case ASEQ_OP_CHAN_STOP:
channel->stopScript = true;
goto exit_loop;
- case 0xF1:
+ case ASEQ_OP_CHAN_ALLOCNOTELIST:
Audio_NotePoolClear(&channel->notePool);
cmd = (u8)cmdArgs[0];
Audio_NotePoolFill(&channel->notePool, cmd);
break;
- case 0xF0:
+ case ASEQ_OP_CHAN_FREENOTELIST:
Audio_NotePoolClear(&channel->notePool);
break;
- case 0xC2:
+ case ASEQ_OP_CHAN_DYNTBL:
cmdArgU16 = (u16)cmdArgs[0];
channel->dynTable = (void*)&seqPlayer->seqData[cmdArgU16];
break;
- case 0xC5:
+ case ASEQ_OP_CHAN_DYNTBLLOOKUP:
if (scriptState->value != -1) {
data = (*channel->dynTable)[scriptState->value];
cmdArgU16 = (u16)((data[0] << 8) + data[1]);
@@ -1253,7 +1345,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
}
break;
- case 0xEB:
+ case ASEQ_OP_CHAN_FONTINSTR:
cmd = (u8)cmdArgs[0];
if (seqPlayer->defaultFont != 0xFF) {
@@ -1268,93 +1360,93 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
cmdArgs[0] = cmdArgs[1];
FALLTHROUGH;
- case 0xC1:
+ case ASEQ_OP_CHAN_INSTR:
cmd = (u8)cmdArgs[0];
AudioSeq_SetInstrument(channel, cmd);
break;
- case 0xC3:
+ case ASEQ_OP_CHAN_SHORT:
channel->largeNotes = false;
break;
- case 0xC4:
+ case ASEQ_OP_CHAN_NOSHORT:
channel->largeNotes = true;
break;
- case 0xDF:
+ case ASEQ_OP_CHAN_VOL:
cmd = (u8)cmdArgs[0];
AudioSeq_SequenceChannelSetVolume(channel, cmd);
channel->changes.s.volume = true;
break;
- case 0xE0:
+ case ASEQ_OP_CHAN_VOLEXP:
cmd = (u8)cmdArgs[0];
channel->volumeScale = (s32)cmd / 128.0f;
channel->changes.s.volume = true;
break;
- case 0xDE:
+ case ASEQ_OP_CHAN_FREQSCALE:
cmdArgU16 = (u16)cmdArgs[0];
channel->freqScale = (s32)cmdArgU16 / 32768.0f;
channel->changes.s.freqScale = true;
break;
- case 0xD3:
+ case ASEQ_OP_CHAN_BEND:
cmd = (u8)cmdArgs[0];
cmd += 0x80;
channel->freqScale = gBendPitchOneOctaveFrequencies[cmd];
channel->changes.s.freqScale = true;
break;
- case 0xEE:
+ case ASEQ_OP_CHAN_BENDFINE:
cmd = (u8)cmdArgs[0];
cmd += 0x80;
channel->freqScale = gBendPitchTwoSemitonesFrequencies[cmd];
channel->changes.s.freqScale = true;
break;
- case 0xDD:
+ case ASEQ_OP_CHAN_PAN:
cmd = (u8)cmdArgs[0];
channel->newPan = cmd;
channel->changes.s.pan = true;
break;
- case 0xDC:
+ case ASEQ_OP_CHAN_PANWEIGHT:
cmd = (u8)cmdArgs[0];
channel->panChannelWeight = cmd;
channel->changes.s.pan = true;
break;
- case 0xDB:
+ case ASEQ_OP_CHAN_TRANSPOSE:
cmdArgS8 = (s8)cmdArgs[0];
channel->transposition = cmdArgS8;
break;
- case 0xDA:
+ case ASEQ_OP_CHAN_ENV:
cmdArgU16 = (u16)cmdArgs[0];
channel->adsr.envelope = (EnvelopePoint*)&seqPlayer->seqData[cmdArgU16];
break;
- case 0xD9:
+ case ASEQ_OP_CHAN_RELEASERATE:
cmd = (u8)cmdArgs[0];
channel->adsr.decayIndex = cmd;
break;
- case 0xD8:
+ case ASEQ_OP_CHAN_VIBDEPTH:
cmd = (u8)cmdArgs[0];
channel->vibratoDepthTarget = cmd * 8;
channel->vibratoDepthStart = 0;
channel->vibratoDepthChangeDelay = 0;
break;
- case 0xD7:
+ case ASEQ_OP_CHAN_VIBFREQ:
cmd = (u8)cmdArgs[0];
channel->vibratoRateChangeDelay = 0;
channel->vibratoRateTarget = cmd * 32;
channel->vibratoRateStart = cmd * 32;
break;
- case 0xE2:
+ case ASEQ_OP_CHAN_VIBDEPTHGRAD:
cmd = (u8)cmdArgs[0];
channel->vibratoDepthStart = cmd * 8;
cmd = (u8)cmdArgs[1];
@@ -1363,7 +1455,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
channel->vibratoDepthChangeDelay = cmd * 16;
break;
- case 0xE1:
+ case ASEQ_OP_CHAN_VIBFREQGRAD:
cmd = (u8)cmdArgs[0];
channel->vibratoRateStart = cmd * 32;
cmd = (u8)cmdArgs[1];
@@ -1372,17 +1464,17 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
channel->vibratoRateChangeDelay = cmd * 16;
break;
- case 0xE3:
+ case ASEQ_OP_CHAN_VIBDELAY:
cmd = (u8)cmdArgs[0];
channel->vibratoDelay = cmd * 16;
break;
- case 0xD4:
+ case ASEQ_OP_CHAN_REVERB:
cmd = (u8)cmdArgs[0];
channel->targetReverbVol = cmd;
break;
- case 0xC6:
+ case ASEQ_OP_CHAN_FONT:
cmd = (u8)cmdArgs[0];
if (seqPlayer->defaultFont != 0xFF) {
@@ -1396,56 +1488,56 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
}
break;
- case 0xC7:
+ case ASEQ_OP_CHAN_STSEQ:
cmd = (u8)cmdArgs[0];
cmdArgU16 = (u16)cmdArgs[1];
seqData = &seqPlayer->seqData[cmdArgU16];
seqData[0] = (u8)scriptState->value + cmd;
break;
- case 0xC8:
- case 0xCC:
- case 0xC9:
+ case ASEQ_OP_CHAN_SUB:
+ case ASEQ_OP_CHAN_LDI:
+ case ASEQ_OP_CHAN_AND:
cmdArgS8 = (s8)cmdArgs[0];
- if (cmd == 0xC8) {
+ if (cmd == ASEQ_OP_CHAN_SUB) {
scriptState->value -= cmdArgS8;
- } else if (cmd == 0xCC) {
+ } else if (cmd == ASEQ_OP_CHAN_LDI) {
scriptState->value = cmdArgS8;
} else {
scriptState->value &= cmdArgS8;
}
break;
- case 0xCD:
+ case ASEQ_OP_CHAN_STOPCHAN:
cmd = (u8)cmdArgs[0];
AudioSeq_SequenceChannelDisable(seqPlayer->channels[cmd]);
break;
- case 0xCA:
+ case ASEQ_OP_CHAN_MUTEBHV:
cmd = (u8)cmdArgs[0];
channel->muteBehavior = cmd;
channel->changes.s.volume = true;
break;
- case 0xCB:
+ case ASEQ_OP_CHAN_LDSEQ:
cmdArgU16 = (u16)cmdArgs[0];
scriptState->value = *(seqPlayer->seqData + (u32)(cmdArgU16 + scriptState->value));
break;
- case 0xCE:
+ case ASEQ_OP_CHAN_LDPTR:
cmdArgU16 = (u16)cmdArgs[0];
channel->unk_22 = cmdArgU16;
break;
- case 0xCF:
+ case ASEQ_OP_CHAN_STPTRTOSEQ:
cmdArgU16 = (u16)cmdArgs[0];
seqData = &seqPlayer->seqData[cmdArgU16];
seqData[0] = (channel->unk_22 >> 8) & 0xFF;
seqData[1] = channel->unk_22 & 0xFF;
break;
- case 0xD0:
+ case ASEQ_OP_CHAN_EFFECTS:
cmd = (u8)cmdArgs[0];
if (cmd & 0x80) {
channel->stereoHeadsetEffects = true;
@@ -1455,22 +1547,22 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
channel->stereo.asByte = cmd & 0x7F;
break;
- case 0xD1:
+ case ASEQ_OP_CHAN_NOTEALLOC:
cmd = (u8)cmdArgs[0];
channel->noteAllocPolicy = cmd;
break;
- case 0xD2:
+ case ASEQ_OP_CHAN_SUSTAIN:
cmd = (u8)cmdArgs[0];
channel->adsr.sustain = cmd;
break;
- case 0xE5:
+ case ASEQ_OP_CHAN_REVERBIDX:
cmd = (u8)cmdArgs[0];
channel->reverbIndex = cmd;
break;
- case 0xE4:
+ case ASEQ_OP_CHAN_DYNCALL:
if (scriptState->value != -1) {
data = (*channel->dynTable)[scriptState->value];
//! @bug: Missing a stack depth check here
@@ -1480,12 +1572,12 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
}
break;
- case 0xE6:
+ case ASEQ_OP_CHAN_SAMPLEBOOK:
cmd = (u8)cmdArgs[0];
channel->bookOffset = cmd;
break;
- case 0xE7:
+ case ASEQ_OP_CHAN_LDPARAMS:
cmdArgU16 = (u16)cmdArgs[0];
data = &seqPlayer->seqData[cmdArgU16];
channel->muteBehavior = *data++;
@@ -1500,7 +1592,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
channel->changes.s.pan = true;
break;
- case 0xE8:
+ case ASEQ_OP_CHAN_PARAMS:
channel->muteBehavior = cmdArgs[0];
channel->noteAllocPolicy = cmdArgs[1];
cmd = (u8)cmdArgs[2];
@@ -1514,7 +1606,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
channel->changes.s.pan = true;
break;
- case 0xEC:
+ case ASEQ_OP_CHAN_VIBRESET:
channel->vibratoDepthTarget = 0;
channel->vibratoDepthStart = 0;
channel->vibratoDepthChangeDelay = 0;
@@ -1532,26 +1624,26 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
channel->freqScale = 1.0f;
break;
- case 0xE9:
+ case ASEQ_OP_CHAN_NOTEPRI:
AudioSeq_SetChannelPriorities(channel, (u8)cmdArgs[0]);
break;
- case 0xED:
+ case ASEQ_OP_CHAN_GAIN:
cmd = (u8)cmdArgs[0];
channel->gain = cmd;
break;
- case 0xB0:
+ case ASEQ_OP_CHAN_LDFILTER:
cmdArgU16 = (u16)cmdArgs[0];
data = seqPlayer->seqData + cmdArgU16;
channel->filter = (s16*)data;
break;
- case 0xB1:
+ case ASEQ_OP_CHAN_FREEFILTER:
channel->filter = NULL;
break;
- case 0xB3:
+ case ASEQ_OP_CHAN_FILTER:
cmd = cmdArgs[0];
if (channel->filter != NULL) {
@@ -1561,34 +1653,34 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
}
break;
- case 0xB2:
+ case ASEQ_OP_CHAN_LDSEQTOPTR:
cmdArgU16 = (u16)cmdArgs[0];
channel->unk_22 = *(u16*)(seqPlayer->seqData + (u32)(cmdArgU16 + scriptState->value * 2));
break;
- case 0xB4:
+ case ASEQ_OP_CHAN_PTRTODYNTBL:
channel->dynTable = (void*)&seqPlayer->seqData[channel->unk_22];
break;
- case 0xB5:
+ case ASEQ_OP_CHAN_DYNTBLTOPTR:
channel->unk_22 = ((u16*)(channel->dynTable))[scriptState->value];
break;
- case 0xB6:
+ case ASEQ_OP_CHAN_DYNTBLV:
scriptState->value = (*channel->dynTable)[0][scriptState->value];
break;
- case 0xB7:
+ case ASEQ_OP_CHAN_RANDTOPTR:
channel->unk_22 =
(cmdArgs[0] == 0) ? gAudioCtx.audioRandom & 0xFFFF : gAudioCtx.audioRandom % cmdArgs[0];
break;
- case 0xB8:
+ case ASEQ_OP_CHAN_RAND:
scriptState->value =
(cmdArgs[0] == 0) ? gAudioCtx.audioRandom & 0xFFFF : gAudioCtx.audioRandom % cmdArgs[0];
break;
- case 0xBD:
+ case ASEQ_OP_CHAN_RANDPTR:
temp2 = AudioThread_NextRandom();
channel->unk_22 = (cmdArgs[0] == 0) ? (temp2 & 0xFFFF) : (temp2 % cmdArgs[0]);
channel->unk_22 += cmdArgs[1];
@@ -1597,20 +1689,20 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
channel->unk_22 = (temp2 << 8) | param;
break;
- case 0xB9:
+ case ASEQ_OP_CHAN_RANDVEL:
channel->velocityRandomVariance = cmdArgs[0];
break;
- case 0xBA:
+ case ASEQ_OP_CHAN_RANDGATE:
channel->gateTimeRandomVariance = cmdArgs[0];
break;
- case 0xBB:
+ case ASEQ_OP_CHAN_COMBFILTER:
channel->combFilterSize = cmdArgs[0];
channel->combFilterGain = cmdArgs[1];
break;
- case 0xBC:
+ case ASEQ_OP_CHAN_PTRADD:
channel->unk_22 += cmdArgs[0];
break;
}
@@ -1620,12 +1712,12 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
if (cmd >= 0x70) {
lowBits = cmd & 0x7;
- if ((cmd & 0xF8) != 0x70 && lowBits >= 4) {
+ if ((cmd & 0xF8) != ASEQ_OP_CHAN_STIO && lowBits >= 4) {
lowBits = 0;
}
switch (cmd & 0xF8) {
- case 0x80:
+ case ASEQ_OP_CHAN_TESTLAYER:
if (channel->layers[lowBits] != NULL) {
scriptState->value = channel->layers[lowBits]->finished;
} else {
@@ -1633,18 +1725,18 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
}
break;
- case 0x88:
+ case ASEQ_OP_CHAN_LDLAYER:
cmdArgU16 = AudioSeq_ScriptReadS16(scriptState);
if (!AudioSeq_SeqChannelSetLayer(channel, lowBits)) {
channel->layers[lowBits]->scriptState.pc = &seqPlayer->seqData[cmdArgU16];
}
break;
- case 0x90:
+ case ASEQ_OP_CHAN_DELLAYER:
AudioSeq_SeqLayerFree(channel, lowBits);
break;
- case 0x98:
+ case ASEQ_OP_CHAN_DYNLDLAYER:
if (scriptState->value != -1 && AudioSeq_SeqChannelSetLayer(channel, lowBits) != -1) {
data = (*channel->dynTable)[scriptState->value];
cmdArgU16 = (data[0] << 8) + data[1];
@@ -1652,11 +1744,11 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
}
break;
- case 0x70:
+ case ASEQ_OP_CHAN_STIO:
channel->seqScriptIO[lowBits] = scriptState->value;
break;
- case 0x78:
+ case ASEQ_OP_CHAN_RLDLAYER:
temp1 = AudioSeq_ScriptReadS16(scriptState);
if (!AudioSeq_SeqChannelSetLayer(channel, lowBits)) {
channel->layers[lowBits]->scriptState.pc = &scriptState->pc[temp1];
@@ -1669,11 +1761,11 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
lowBits = cmd & 0xF;
switch (cmd & 0xF0) {
- case 0x00:
+ case ASEQ_OP_CHAN_CDELAY:
channel->delay = lowBits;
goto exit_loop;
- case 0x10:
+ case ASEQ_OP_CHAN_LDSAMPLE:
if (lowBits < 8) {
channel->seqScriptIO[lowBits] = SEQ_IO_VAL_NONE;
if (AudioLoad_SlowLoadSample(channel->fontId, scriptState->value, &channel->seqScriptIO[lowBits]) ==
@@ -1686,28 +1778,28 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) {
}
break;
- case 0x60:
+ case ASEQ_OP_CHAN_LDIO:
scriptState->value = channel->seqScriptIO[lowBits];
if (lowBits < 2) {
channel->seqScriptIO[lowBits] = SEQ_IO_VAL_NONE;
}
break;
- case 0x50:
+ case ASEQ_OP_CHAN_SUBIO:
scriptState->value -= channel->seqScriptIO[lowBits];
break;
- case 0x20:
+ case ASEQ_OP_CHAN_LDCHAN:
cmdArgU16 = AudioSeq_ScriptReadS16(scriptState);
AudioSeq_SequenceChannelEnable(seqPlayer, lowBits, &seqPlayer->seqData[cmdArgU16]);
break;
- case 0x30:
+ case ASEQ_OP_CHAN_STCIO:
cmd = AudioSeq_ScriptReadU8(scriptState);
seqPlayer->channels[lowBits]->seqScriptIO[cmd] = scriptState->value;
break;
- case 0x40:
+ case ASEQ_OP_CHAN_LDCIO:
cmd = AudioSeq_ScriptReadU8(scriptState);
scriptState->value = seqPlayer->channels[lowBits]->seqScriptIO[cmd];
break;
@@ -1722,6 +1814,9 @@ exit_loop:
}
}
+/**
+ * original name: Nas_GroupSeq
+ */
void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
u8 cmd;
u8 cmdLowBits;
@@ -1780,7 +1875,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
cmd = AudioSeq_ScriptReadU8(seqScript);
// 0xF2 and above are "flow control" commands, including termination.
- if (cmd >= 0xF2) {
+ if (cmd >= ASEQ_OP_CONTROL_FLOW_FIRST) {
delay = AudioSeq_HandleScriptFlowControl(
seqPlayer, seqScript, cmd, AudioSeq_GetScriptControlFlowArgument(&seqPlayer->scriptState, cmd));
@@ -1797,7 +1892,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
if (cmd >= 0xC0) {
switch (cmd) {
- case 0xF1:
+ case ASEQ_OP_SEQ_ALLOCNOTELIST:
Audio_NotePoolClear(&seqPlayer->notePool);
cmd = AudioSeq_ScriptReadU8(seqScript);
Audio_NotePoolFill(&seqPlayer->notePool, cmd);
@@ -1813,18 +1908,18 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
if (dummy) {}
break;
- case 0xF0:
+ case ASEQ_OP_SEQ_FREENOTELIST:
Audio_NotePoolClear(&seqPlayer->notePool);
break;
- case 0xDF:
+ case ASEQ_OP_SEQ_TRANSPOSE:
seqPlayer->transposition = 0;
FALLTHROUGH;
- case 0xDE:
+ case ASEQ_OP_SEQ_RTRANSPOSE:
seqPlayer->transposition += (s8)AudioSeq_ScriptReadU8(seqScript);
break;
- case 0xDD:
+ case ASEQ_OP_SEQ_TEMPO:
seqPlayer->tempo = AudioSeq_ScriptReadU8(seqScript) * SEQTICKS_PER_BEAT;
if (seqPlayer->tempo > gAudioCtx.maxTempo) {
seqPlayer->tempo = (u16)gAudioCtx.maxTempo;
@@ -1835,11 +1930,11 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
}
break;
- case 0xDC:
+ case ASEQ_OP_SEQ_TEMPOCHG:
seqPlayer->tempoChange = (s8)AudioSeq_ScriptReadU8(seqScript) * SEQTICKS_PER_BEAT;
break;
- case 0xDA:
+ case ASEQ_OP_SEQ_VOLMODE:
cmd = AudioSeq_ScriptReadU8(seqScript);
temp = AudioSeq_ScriptReadS16(seqScript);
switch (cmd) {
@@ -1859,7 +1954,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
}
break;
- case 0xDB:
+ case ASEQ_OP_SEQ_VOL:
value = AudioSeq_ScriptReadU8(seqScript);
switch (seqPlayer->state) {
case 1:
@@ -1881,47 +1976,47 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
}
break;
- case 0xD9:
+ case ASEQ_OP_SEQ_VOLSCALE:
seqPlayer->fadeVolumeScale = (s8)AudioSeq_ScriptReadU8(seqScript) / 127.0f;
break;
- case 0xD7:
+ case ASEQ_OP_SEQ_INITCHAN:
temp = AudioSeq_ScriptReadS16(seqScript);
AudioSeq_SequencePlayerSetupChannels(seqPlayer, temp);
break;
- case 0xD6:
+ case ASEQ_OP_SEQ_FREECHAN:
AudioSeq_ScriptReadS16(seqScript);
break;
- case 0xD5:
+ case ASEQ_OP_SEQ_MUTESCALE:
seqPlayer->muteVolumeScale = (s8)AudioSeq_ScriptReadU8(seqScript) / 127.0f;
break;
- case 0xD4:
+ case ASEQ_OP_SEQ_MUTE:
seqPlayer->muted = true;
break;
- case 0xD3:
+ case ASEQ_OP_SEQ_MUTEBHV:
seqPlayer->muteBehavior = AudioSeq_ScriptReadU8(seqScript);
break;
- case 0xD1:
- case 0xD2:
+ case ASEQ_OP_SEQ_LDSHORTGATEARR:
+ case ASEQ_OP_SEQ_LDSHORTVELARR:
temp = AudioSeq_ScriptReadS16(seqScript);
data3 = &seqPlayer->seqData[temp];
- if (cmd == 0xD2) {
+ if (cmd == ASEQ_OP_SEQ_LDSHORTVELARR) {
seqPlayer->shortNoteVelocityTable = data3;
} else {
seqPlayer->shortNoteGateTimeTable = data3;
}
break;
- case 0xD0:
+ case ASEQ_OP_SEQ_NOTEALLOC:
seqPlayer->noteAllocPolicy = AudioSeq_ScriptReadU8(seqScript);
break;
- case 0xCE:
+ case ASEQ_OP_SEQ_RAND:
cmd = AudioSeq_ScriptReadU8(seqScript);
if (cmd == 0) {
seqScript->value = (gAudioCtx.audioRandom >> 2) & 0xFF;
@@ -1930,7 +2025,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
}
break;
- case 0xCD:
+ case ASEQ_OP_SEQ_DYNCALL:
temp = AudioSeq_ScriptReadS16(seqScript);
if ((seqScript->value != -1) && (seqScript->depth != 3)) {
data = seqPlayer->seqData + (u32)(temp + (seqScript->value << 1));
@@ -1942,39 +2037,39 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
}
break;
- case 0xCC:
+ case ASEQ_OP_SEQ_LDI:
seqScript->value = AudioSeq_ScriptReadU8(seqScript);
break;
- case 0xC9:
+ case ASEQ_OP_SEQ_AND:
seqScript->value &= AudioSeq_ScriptReadU8(seqScript);
break;
- case 0xC8:
+ case ASEQ_OP_SEQ_SUB:
seqScript->value -= AudioSeq_ScriptReadU8(seqScript);
break;
- case 0xC7:
+ case ASEQ_OP_SEQ_STSEQ:
cmd = AudioSeq_ScriptReadU8(seqScript);
temp = AudioSeq_ScriptReadS16(seqScript);
data2 = &seqPlayer->seqData[temp];
*data2 = (u8)seqScript->value + cmd;
break;
- case 0xC6:
+ case ASEQ_OP_SEQ_STOP:
seqPlayer->stopScript = true;
return;
- case 0xC5:
+ case ASEQ_OP_SEQ_SCRIPTCTR:
seqPlayer->scriptCounter = (u16)AudioSeq_ScriptReadS16(seqScript);
break;
- case 0xEF:
+ case ASEQ_OP_SEQ_EF:
AudioSeq_ScriptReadS16(seqScript);
AudioSeq_ScriptReadU8(seqScript);
break;
- case 0xC4:
+ case ASEQ_OP_SEQ_RUNSEQ:
cmd = AudioSeq_ScriptReadU8(seqScript);
if (cmd == 0xFF) {
cmd = seqPlayer->playerIdx;
@@ -1992,47 +2087,47 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
cmdLowBits = cmd & 0x0F;
switch (cmd & 0xF0) {
- case 0x00:
+ case ASEQ_OP_SEQ_TESTCHAN:
seqScript->value = seqPlayer->channels[cmdLowBits]->enabled ^ 1;
break;
- case 0x50:
+ case ASEQ_OP_SEQ_SUBIO:
seqScript->value -= seqPlayer->seqScriptIO[cmdLowBits];
break;
- case 0x70:
+ case ASEQ_OP_SEQ_STIO:
seqPlayer->seqScriptIO[cmdLowBits] = seqScript->value;
break;
- case 0x80:
+ case ASEQ_OP_SEQ_LDIO:
seqScript->value = seqPlayer->seqScriptIO[cmdLowBits];
if (cmdLowBits < 2) {
seqPlayer->seqScriptIO[cmdLowBits] = SEQ_IO_VAL_NONE;
}
break;
- case 0x40:
+ case ASEQ_OP_SEQ_STOPCHAN:
AudioSeq_SequenceChannelDisable(seqPlayer->channels[cmdLowBits]);
break;
- case 0x90:
+ case ASEQ_OP_SEQ_LDCHAN:
temp = AudioSeq_ScriptReadS16(seqScript);
AudioSeq_SequenceChannelEnable(seqPlayer, cmdLowBits, (void*)&seqPlayer->seqData[temp]);
break;
- case 0xA0:
+ case ASEQ_OP_SEQ_RLDCHAN:
tempS = AudioSeq_ScriptReadS16(seqScript);
AudioSeq_SequenceChannelEnable(seqPlayer, cmdLowBits, (void*)&seqScript->pc[tempS]);
break;
- case 0xB0:
+ case ASEQ_OP_SEQ_LDSEQ:
cmd = AudioSeq_ScriptReadU8(seqScript);
temp = AudioSeq_ScriptReadS16(seqScript);
data2 = &seqPlayer->seqData[temp];
AudioLoad_SlowLoadSeq(cmd, data2, &seqPlayer->seqScriptIO[cmdLowBits]);
break;
- case 0x60:
+ case ASEQ_OP_SEQ_LDRES:
cmd = AudioSeq_ScriptReadU8(seqScript);
value = cmd;
temp = AudioSeq_ScriptReadU8(seqScript);
@@ -2049,6 +2144,9 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
}
}
+/**
+ * original name: Nas_MySeqMain
+ */
void AudioSeq_ProcessSequences(s32 arg0) {
SequencePlayer* seqPlayer;
u32 i;
@@ -2066,6 +2164,9 @@ void AudioSeq_ProcessSequences(s32 arg0) {
Audio_ProcessNotes();
}
+/**
+ * original name: Nas_SeqSkip
+ */
void AudioSeq_SkipForwardSequence(SequencePlayer* seqPlayer) {
while (seqPlayer->skipTicks > 0) {
AudioSeq_SequencePlayerProcessSequence(seqPlayer);
@@ -2074,6 +2175,9 @@ void AudioSeq_SkipForwardSequence(SequencePlayer* seqPlayer) {
}
}
+/**
+ * original name: Nas_InitMySeq
+ */
void AudioSeq_ResetSequencePlayer(SequencePlayer* seqPlayer) {
s32 i;
@@ -2101,6 +2205,9 @@ void AudioSeq_ResetSequencePlayer(SequencePlayer* seqPlayer) {
}
}
+/**
+ * original name: Nas_AssignSubTrack
+ */
void AudioSeq_InitSequencePlayerChannels(s32 playerIdx) {
SequenceChannel* channel;
SequencePlayer* seqPlayer = &gAudioCtx.seqPlayers[playerIdx];
@@ -2123,6 +2230,9 @@ void AudioSeq_InitSequencePlayerChannels(s32 playerIdx) {
}
}
+/**
+ * original name: __InitGroup
+ */
void AudioSeq_InitSequencePlayer(SequencePlayer* seqPlayer) {
s32 i;
s32 j;
@@ -2148,6 +2258,9 @@ void AudioSeq_InitSequencePlayer(SequencePlayer* seqPlayer) {
AudioSeq_ResetSequencePlayer(seqPlayer);
}
+/**
+ * original name: Nas_InitPlayer
+ */
void AudioSeq_InitSequencePlayers(void) {
s32 i;
diff --git a/src/audio/lib/synthesis.c b/src/audio/internal/synthesis.c
similarity index 99%
rename from src/audio/lib/synthesis.c
rename to src/audio/internal/synthesis.c
index d2214d99ac..c7c3eefb04 100644
--- a/src/audio/lib/synthesis.c
+++ b/src/audio/internal/synthesis.c
@@ -1,5 +1,6 @@
+#include "alignment.h"
#include "ultra64.h"
-#include "global.h"
+#include "z64audio.h"
// DMEM Addresses for the RSP
#define DMEM_TEMP 0x3C0
@@ -644,10 +645,10 @@ Acmd* AudioSynth_DoOneAudioUpdate(s16* aiBuf, s32 aiBufLen, Acmd* cmd, s32 updat
// Leak reverb between the left and right channels
-#if PLATFORM_N64
- if (((reverb->leakRtl != 0) || (reverb->leakLtr != 0)) && (gAudioCtx.soundMode != SOUNDMODE_MONO))
-#else
+#if OOT_VERSION < NTSC_1_1 || !PLATFORM_N64
if ((reverb->leakRtl != 0) || (reverb->leakLtr != 0))
+#else
+ if (((reverb->leakRtl != 0) || (reverb->leakLtr != 0)) && (gAudioCtx.soundOutputMode != SOUND_OUTPUT_MONO))
#endif
{
cmd = AudioSynth_LeakReverb(cmd, reverb);
@@ -785,7 +786,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
samplesLenFixedPoint = (resamplingRateFixedPoint * aiBufLen * 2) + synthState->samplePosFrac;
numSamplesToLoad = samplesLenFixedPoint >> 16;
-#if PLATFORM_N64
+#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if (numSamplesToLoad == 0) {
skipBytes = false;
}
diff --git a/src/audio/lib/thread.c b/src/audio/internal/thread.c
similarity index 94%
rename from src/audio/lib/thread.c
rename to src/audio/internal/thread.c
index 561e95e14c..2e2d0630e1 100644
--- a/src/audio/lib/thread.c
+++ b/src/audio/internal/thread.c
@@ -1,4 +1,12 @@
-#include "global.h"
+/**
+ * Original Filename: sub_sys.c
+ */
+
+#include "array_count.h"
+#include "audiothread_cmd.h"
+#include "ultra64.h"
+#include "versions.h"
+#include "z64audio.h"
#define SAMPLES_TO_OVERPRODUCE 0x10
#define EXTRA_BUFFERED_AI_SAMPLES_TARGET 0x80
@@ -16,16 +24,18 @@ AudioTask* AudioThread_Update(void) {
return AudioThread_UpdateImpl();
}
-#if PLATFORM_N64
+#if !(OOT_VERSION < PAL_1_0 || !PLATFORM_N64)
static s32 sMaxAbiCmdCnt = 0x80;
static AudioTask* sWaitingAudioTask = NULL;
#endif
/**
* This is Audio_Update for the audio thread
+ *
+ * original name: CreateAudioTask (note: function is heavily modified in Animal Crossing)
*/
AudioTask* AudioThread_UpdateImpl(void) {
-#if !PLATFORM_N64
+#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64
static s32 sMaxAbiCmdCnt = 0x80;
static AudioTask* sWaitingAudioTask = NULL;
#endif
@@ -196,6 +206,9 @@ AudioTask* AudioThread_UpdateImpl(void) {
}
}
+/**
+ * original name: Nap_AudioSysProcess
+ */
void AudioThread_ProcessGlobalCmd(AudioCmd* cmd) {
s32 i;
s32 pad[3];
@@ -225,8 +238,8 @@ void AudioThread_ProcessGlobalCmd(AudioCmd* cmd) {
}
break;
- case AUDIOCMD_OP_GLOBAL_SET_SOUND_MODE:
- gAudioCtx.soundMode = cmd->asUInt;
+ case AUDIOCMD_OP_GLOBAL_SET_SOUND_OUTPUT_MODE:
+ gAudioCtx.soundOutputMode = cmd->asUInt;
break;
case AUDIOCMD_OP_GLOBAL_MUTE:
@@ -321,6 +334,9 @@ void AudioThread_ProcessGlobalCmd(AudioCmd* cmd) {
}
}
+/**
+ * original name: __Nas_GroupFadeOut
+ */
void AudioThread_SetFadeOutTimer(s32 seqPlayerIndex, s32 fadeTimer) {
SequencePlayer* seqPlayer = &gAudioCtx.seqPlayers[seqPlayerIndex];
@@ -333,6 +349,9 @@ void AudioThread_SetFadeOutTimer(s32 seqPlayerIndex, s32 fadeTimer) {
seqPlayer->fadeTimer = fadeTimer;
}
+/**
+ * original name: __Nas_GroupFadeIn
+ */
void AudioThread_SetFadeInTimer(s32 seqPlayerIndex, s32 fadeTimer) {
SequencePlayer* seqPlayer;
@@ -346,6 +365,9 @@ void AudioThread_SetFadeInTimer(s32 seqPlayerIndex, s32 fadeTimer) {
}
}
+/**
+ * original name: Nap_AudioPortInit
+ */
void AudioThread_InitMesgQueuesImpl(void) {
gAudioCtx.threadCmdWritePos = 0;
gAudioCtx.threadCmdReadPos = 0;
@@ -361,6 +383,9 @@ void AudioThread_InitMesgQueuesImpl(void) {
osCreateMesgQueue(gAudioCtx.audioResetQueueP, gAudioCtx.audioResetMsgBuf, ARRAY_COUNT(gAudioCtx.audioResetMsgBuf));
}
+/**
+ * original name: Nap_PortSet
+ */
void AudioThread_QueueCmd(u32 opArgs, void** data) {
AudioCmd* cmd = &gAudioCtx.threadCmdBuf[gAudioCtx.threadCmdWritePos & 0xFF];
@@ -374,26 +399,41 @@ void AudioThread_QueueCmd(u32 opArgs, void** data) {
}
}
+/**
+ * original name: Nap_SetF32
+ */
void AudioThread_QueueCmdF32(u32 opArgs, f32 data) {
AudioThread_QueueCmd(opArgs, (void**)&data);
}
+/**
+ * original name: Nap_SetS32
+ */
void AudioThread_QueueCmdS32(u32 opArgs, s32 data) {
AudioThread_QueueCmd(opArgs, (void**)&data);
}
+/**
+ * original name: Nap_SetS8
+ */
void AudioThread_QueueCmdS8(u32 opArgs, s8 data) {
u32 uData = data << 0x18;
AudioThread_QueueCmd(opArgs, (void**)&uData);
}
+/**
+ * original name: Nap_SetU16
+ */
void AudioThread_QueueCmdU16(u32 opArgs, u16 data) {
u32 uData = data << 0x10;
AudioThread_QueueCmd(opArgs, (void**)&uData);
}
+/**
+ * original name: Nap_SendStart
+ */
s32 AudioThread_ScheduleProcessCmds(void) {
static s32 D_801304E8 = 0;
s32 ret;
@@ -415,11 +455,17 @@ s32 AudioThread_ScheduleProcessCmds(void) {
return ret;
}
+/**
+ * original name: Nap_FlushPort
+ */
void AudioThread_ResetCmdQueue(void) {
gAudioCtx.threadCmdQueueFinished = false;
gAudioCtx.threadCmdReadPos = gAudioCtx.threadCmdWritePos;
}
+/**
+ * original name: Nap_Process1Command
+ */
void AudioThread_ProcessCmd(AudioCmd* cmd) {
SequencePlayer* seqPlayer;
u16 threadCmdChannelMask;
@@ -457,6 +503,9 @@ void AudioThread_ProcessCmd(AudioCmd* cmd) {
}
}
+/**
+ * original name: Nap_AudioPortProcess
+ */
void AudioThread_ProcessCmds(u32 msg) {
static u8 sCurCmdRdPos = 0;
AudioCmd* cmd;
@@ -504,6 +553,9 @@ void Audio_GetSampleBankIdsOfFont(s32 fontId, u32* sampleBankId1, u32* sampleBan
*sampleBankId2 = gAudioCtx.soundFontList[fontId].sampleBankId2;
}
+/**
+ * original name: Nap_CheckSpecChange
+ */
s32 func_800E5EDC(void) {
s32 pad;
s32 specId;
@@ -517,6 +569,9 @@ s32 func_800E5EDC(void) {
}
}
+/**
+ * original name: __ClearSpecChangeQ
+ */
void func_800E5F34(void) {
// macro?
// clang-format off
@@ -524,6 +579,9 @@ void func_800E5F34(void) {
// clang-format on
}
+/**
+ * original name: Nap_StartSpecChange
+ */
s32 AudioThread_ResetAudioHeap(s32 specId) {
s32 resetStatus;
OSMesg msg;
@@ -549,6 +607,9 @@ s32 AudioThread_ResetAudioHeap(s32 specId) {
return AudioThread_ScheduleProcessCmds();
}
+/**
+ * original name: Nap_StartReset
+ */
void AudioThread_PreNMIInternal(void) {
gAudioCtx.resetTimer = 1;
if (gAudioContextInitialized) {
@@ -557,6 +618,9 @@ void AudioThread_PreNMIInternal(void) {
}
}
+/**
+ * original name: Nap_ReadSubPort
+ */
s8 AudioThread_GetChannelIO(s32 seqPlayerIndex, s32 channelIndex, s32 ioPort) {
SequencePlayer* seqPlayer = &gAudioCtx.seqPlayers[seqPlayerIndex];
SequenceChannel* channel;
@@ -569,6 +633,9 @@ s8 AudioThread_GetChannelIO(s32 seqPlayerIndex, s32 channelIndex, s32 ioPort) {
}
}
+/**
+ * original name: Nap_ReadGrpPort
+ */
s8 AudioThread_GetSeqPlayerIO(s32 seqPlayerIndex, s32 ioPort) {
return gAudioCtx.seqPlayers[seqPlayerIndex].seqScriptIO[ioPort];
}
@@ -581,6 +648,9 @@ void AudioThread_ResetExternalPool(void) {
gAudioCtx.externalPool.startRamAddr = NULL;
}
+/**
+ * original name: __SetGrpParam
+ */
void AudioThread_ProcessSeqPlayerCmd(SequencePlayer* seqPlayer, AudioCmd* cmd) {
f32 fadeVolume;
@@ -661,6 +731,9 @@ void AudioThread_ProcessSeqPlayerCmd(SequencePlayer* seqPlayer, AudioCmd* cmd) {
}
}
+/**
+ * original name: __SetSubParam
+ */
void AudioThread_ProcessChannelCmd(SequenceChannel* channel, AudioCmd* cmd) {
switch (cmd->op) {
case AUDIOCMD_OP_CHANNEL_SET_VOL_SCALE:
@@ -767,6 +840,9 @@ void AudioThread_Noop2Cmd(u32 arg0, s32 arg1) {
AUDIOCMD_GLOBAL_NOOP_2(0, 0, arg1, arg0);
}
+/**
+ * original name: Nap_WaitVsync
+ */
void AudioThread_WaitForAudioTask(void) {
osRecvMesg(gAudioCtx.taskStartQueueP, NULL, OS_MESG_NOBLOCK);
osRecvMesg(gAudioCtx.taskStartQueueP, NULL, OS_MESG_BLOCK);
@@ -820,6 +896,9 @@ void func_800E66A0(void) {
func_800E66C0(2);
}
+/**
+ * original name: Nap_SilenceCheck_Inner
+ */
s32 func_800E66C0(s32 flags) {
s32 phi_v1;
NotePlaybackState* playbackState;
@@ -856,6 +935,9 @@ s32 func_800E66C0(s32 flags) {
return phi_v1;
}
+/**
+ * original name: Nap_GetRandom
+ */
u32 AudioThread_NextRandom(void) {
static u32 sAudioRandom = 0x12345678;
@@ -865,6 +947,9 @@ u32 AudioThread_NextRandom(void) {
return sAudioRandom;
}
+/**
+ * original name: Nas_InitGAudio
+ */
void AudioThread_InitMesgQueues(void) {
AudioThread_InitMesgQueuesImpl();
}
diff --git a/src/audio/lib/dcache.c b/src/audio/lib/dcache.c
deleted file mode 100644
index caaaea3323..0000000000
--- a/src/audio/lib/dcache.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "global.h"
-
-void Audio_InvalDCache(void* buf, s32 size) {
- OSIntMask prevMask = osSetIntMask(OS_IM_NONE);
-
- osInvalDCache(buf, size);
- osSetIntMask(prevMask);
-}
-
-void Audio_WritebackDCache(void* buf, s32 size) {
- OSIntMask prevMask = osSetIntMask(OS_IM_NONE);
-
- osWritebackDCache(buf, size);
- osSetIntMask(prevMask);
-}
diff --git a/src/audio/tables/samplebank_table.c b/src/audio/tables/samplebank_table.c
index 58ebf06f22..d26d9d5bcb 100644
--- a/src/audio/tables/samplebank_table.c
+++ b/src/audio/tables/samplebank_table.c
@@ -3,7 +3,6 @@
// Symbol definition
-extern AudioTable gSampleBankTable;
#pragma weak gSampleBankTable = sSampleBankTableHeader
// Externs for table
diff --git a/src/audio/tables/sequence_table.c b/src/audio/tables/sequence_table.c
index 7a08ce79c5..8235cd674b 100644
--- a/src/audio/tables/sequence_table.c
+++ b/src/audio/tables/sequence_table.c
@@ -1,9 +1,9 @@
#include "attributes.h"
#include "z64audio.h"
+#include "versions.h"
// Symbol definition
-extern AudioTable gSequenceTable;
#pragma weak gSequenceTable = sSequenceTableHeader
// Externs for table
diff --git a/src/audio/tables/soundfont_table.c b/src/audio/tables/soundfont_table.c
index 65d1fc9a52..779be397ba 100644
--- a/src/audio/tables/soundfont_table.c
+++ b/src/audio/tables/soundfont_table.c
@@ -3,7 +3,6 @@
// Symbol definition
-extern AudioTable gSoundFontTable;
#pragma weak gSoundFontTable = sSoundFontTableHeader
// Externs for table
diff --git a/src/boot/assert.c b/src/boot/assert.c
index e58f2cc1e7..661f7db873 100644
--- a/src/boot/assert.c
+++ b/src/boot/assert.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "libc64/sprintf.h"
+#include "assert.h"
#include "fault.h"
NORETURN void __assert(const char* assertion, const char* file, int line) {
diff --git a/src/boot/boot_main.c b/src/boot/boot_main.c
index d485a5b1f9..2f948b9d6a 100644
--- a/src/boot/boot_main.c
+++ b/src/boot/boot_main.c
@@ -1,12 +1,18 @@
-#include "global.h"
#include "boot.h"
+
+#include "carthandle.h"
+#include "idle.h"
+#include "is_debug.h"
+#include "segment_symbols.h"
#include "stack.h"
+#include "stackcheck.h"
#if PLATFORM_N64
#include "cic6105.h"
#endif
+#include "z_locale.h"
+#include "z64thread.h"
-#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"
+#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"
StackEntry sBootThreadInfo;
OSThread sIdleThread;
@@ -30,7 +36,7 @@ void bootproc(void) {
gCartHandle = osCartRomInit();
osDriveRomInit();
-#if OOT_DEBUG
+#if DEBUG_FEATURES
isPrintfInit();
#endif
Locale_Init();
diff --git a/src/boot/build.c b/src/boot/build.c
index 3782c43da6..035e685db9 100644
--- a/src/boot/build.c
+++ b/src/boot/build.c
@@ -1,31 +1,7 @@
+#include "build.h"
+
#include "versions.h"
-#if PLATFORM_N64
-const char gBuildCreator[] = "zelda@srd44";
-#else
-const char gBuildCreator[] = "zelda@srd022j";
-#endif
-
-#if OOT_VERSION == NTSC_1_2
-const char gBuildDate[] = "98-11-12 18:17:03";
-#elif OOT_VERSION == GC_JP
-const char gBuildDate[] = "02-10-29 23:49:53";
-#elif OOT_VERSION == GC_JP_MQ
-const char gBuildDate[] = "02-10-30 00:15:15";
-#elif OOT_VERSION == GC_US
-const char gBuildDate[] = "02-12-19 13:28:09";
-#elif OOT_VERSION == GC_US_MQ
-const char gBuildDate[] = "02-12-19 14:05:42";
-#elif OOT_VERSION == GC_EU_MQ_DBG
-const char gBuildDate[] = "03-02-21 00:16:31";
-#elif OOT_VERSION == GC_EU
-const char gBuildDate[] = "03-02-21 20:12:23";
-#elif OOT_VERSION == GC_EU_MQ
-const char gBuildDate[] = "03-02-21 20:37:19";
-#elif OOT_VERSION == GC_JP_CE
-const char gBuildDate[] = "03-10-08 21:53:00";
-#else
-#error "Unsupported OOT_VERSION"
-#endif
-
+const char gBuildCreator[] = BUILD_CREATOR;
+const char gBuildDate[] = BUILD_DATE " " BUILD_TIME;
const char gBuildMakeOption[] = "";
diff --git a/src/boot/carthandle.c b/src/boot/carthandle.c
new file mode 100644
index 0000000000..9a4cf542d8
--- /dev/null
+++ b/src/boot/carthandle.c
@@ -0,0 +1,3 @@
+#include "carthandle.h"
+
+OSPiHandle* gCartHandle = NULL;
diff --git a/src/boot/cic6105.c b/src/boot/cic6105.c
index e0ddcb2c49..fadae3a181 100644
--- a/src/boot/cic6105.c
+++ b/src/boot/cic6105.c
@@ -1,8 +1,11 @@
-#pragma increment_block_number "ntsc-1.2:128"
+#pragma increment_block_number "ntsc-1.0:132 ntsc-1.1:132 ntsc-1.2:132 pal-1.0:132 pal-1.1:132"
-#include "global.h"
+#include "audiomgr.h"
+#include "build.h"
#include "cic6105.h"
#include "fault.h"
+#include "regs.h"
+#include "sched.h"
s32 func_80001714(void);
@@ -10,11 +13,11 @@ OSTask D_800067C0_unknown = {
4, 0, rspbootTextStart, 0x3E8, cic6105TextStart, 0x20, (u64*)gBuildCreator, 8, NULL, 0, NULL, 0, NULL, 0, NULL, 0,
};
-s32 B_80008EE0;
-s32 B_80008EE4;
+u32 B_80008EE0;
+u32 B_80008EE4;
FaultClient sCIC6105FaultClient;
-s32 B_80008EF8;
-s32 B_80008EFC;
+u32 B_80008EF8;
+u32 B_80008EFC;
void func_800014D0(void) {
R_AUDIOMGR_DEBUG_LEVEL = AUDIOMGR_DEBUG_LEVEL_NO_RSP;
@@ -39,7 +42,11 @@ void CIC6105_FaultClient(void) {
Fault_Printf(" [Creator:%s]", gBuildCreator);
Fault_SetCursor(56, 192);
Fault_Printf("[Date:%s]", gBuildDate);
+#if OOT_VERSION < PAL_1_0
+ Fault_SetCursor(128, 24);
+#else
Fault_SetCursor(96, 32);
+#endif
Fault_Printf("I LOVE YOU %08x", func_80001714());
}
diff --git a/src/boot/driverominit.c b/src/boot/driverominit.c
index 7d1441cdd9..72ab069d34 100644
--- a/src/boot/driverominit.c
+++ b/src/boot/driverominit.c
@@ -1,9 +1,16 @@
-#include "global.h"
+#include "ultra64.h"
OSPiHandle __DriveRomHandle;
OSPiHandle* osDriveRomInit(void) {
+#if PLATFORM_IQUE && defined(NON_MATCHING)
+ // On iQue, the compiled output of this file is patched so that the
+ // `!first` check is always taken. For non-matching builds, we edit the
+ // source code instead.
+ static u32 first = false;
+#else
static u32 first = true;
+#endif
register s32 status;
register u32 value;
register u32 prevInt;
diff --git a/src/boot/idle.c b/src/boot/idle.c
index eca094e640..743219d94c 100644
--- a/src/boot/idle.c
+++ b/src/boot/idle.c
@@ -1,24 +1,50 @@
-#include "global.h"
+#include "array_count.h"
+#include "buffers.h"
+#include "build.h"
+#include "idle.h"
+#include "main.h"
+#include "printf.h"
+#include "segment_symbols.h"
#include "stack.h"
+#include "stackcheck.h"
#include "terminal.h"
+#include "translation.h"
#include "versions.h"
+#include "vi_mode.h"
+#include "z64thread.h"
+#include "z64dma.h"
-#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64 ntsc-1.2:64"
+#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
+ "ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
OSThread sMainThread;
+#if OOT_VERSION < PAL_1_0
+STACK(sMainStack, 0x800);
+#else
STACK(sMainStack, 0x900);
+#endif
StackEntry sMainStackInfo;
OSMesg sPiMgrCmdBuff[50];
OSMesgQueue gPiMgrCmdQueue;
OSViMode gViConfigMode;
-u8 gViConfigModeType;
-s8 D_80009430 = 1;
-vu8 gViConfigBlack = true;
-u8 gViConfigAdditionalScanLines = 0;
-u32 gViConfigFeatures = OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF;
-f32 gViConfigXScale = 1.0;
-f32 gViConfigYScale = 1.0;
+#if OOT_VERSION < PAL_1_0
+u8 gViConfigModeType = OS_VI_NTSC_LPN1;
+#else
+u8 gViConfigModeType;
+#endif
+
+// Unused
+void* D_80009410[] = {
+ osStopThread, __osSetHWIntrRoutine,
+#if PLATFORM_N64
+ osEPiWriteIo, osEPiReadIo,
+#endif
+ __osSetFpcCsr, __osGetFpcCsr, __osGetHWIntrRoutine, __osSetHWIntrRoutine, osViGetNextFramebuffer,
+#if !PLATFORM_N64
+ bcmp,
+#endif
+};
void Main_ThreadEntry(void* arg) {
OSTime time;
@@ -43,7 +69,7 @@ void Idle_ThreadEntry(void* arg) {
PRINTF(T("作製者 : %s\n", "Created by: %s\n"), gBuildCreator);
PRINTF(T("作成日時 : %s\n", "Created : %s\n"), gBuildDate);
PRINTF("MAKEOPTION: %s\n", gBuildMakeOption);
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("RAMサイズは %d キロバイトです(osMemSize/osGetMemSize)\n",
"RAM size is %d kilobytes (osMemSize/osGetMemSize)\n"),
(s32)osMemSize / 1024);
@@ -56,15 +82,17 @@ void Idle_ThreadEntry(void* arg) {
PRINTF(T("YIELDバッファのサイズは %d キロバイトです\n", "YIELD buffer size is %d kilobytes\n"), 3);
PRINTF(T("オーディオヒープのサイズは %d キロバイトです\n", "Audio heap size is %d kilobytes\n"),
((intptr_t)&gAudioHeap[ARRAY_COUNT(gAudioHeap)] - (intptr_t)gAudioHeap) / 1024);
- PRINTF(VT_RST);
+ PRINTF_RST();
osCreateViManager(OS_PRIORITY_VIMGR);
+#if OOT_VERSION >= PAL_1_0
gViConfigFeatures = OS_VI_GAMMA_OFF | OS_VI_DITHER_FILTER_ON;
gViConfigXScale = 1.0f;
gViConfigYScale = 1.0f;
+#endif
-#if OOT_DEBUG
+#if DEBUG_FEATURES
// Allow both 60 Hz and 50 Hz
switch (osTvType) {
case OS_TV_NTSC:
@@ -80,7 +108,9 @@ void Idle_ThreadEntry(void* arg) {
case OS_TV_PAL:
gViConfigModeType = OS_VI_FPAL_LAN1;
gViConfigMode = osViModeFpalLan1;
+#if OOT_VERSION >= PAL_1_0
gViConfigYScale = 0.833f;
+#endif
break;
}
#elif !OOT_PAL_N64
@@ -110,11 +140,17 @@ void Idle_ThreadEntry(void* arg) {
}
#endif
+#if OOT_VERSION < PAL_1_0
+ osViSetMode(&gViConfigMode);
+ osViBlack(true);
+#else
D_80009430 = 1;
osViSetMode(&gViConfigMode);
ViConfig_UpdateVi(true);
osViBlack(true);
osViSwapBuffer((void*)0x803DA80); //! @bug Invalid vram address (probably intended to be 0x803DA800)
+#endif
+
osCreatePiManager(OS_PRIORITY_PIMGR, &gPiMgrCmdQueue, sPiMgrCmdBuff, ARRAY_COUNT(sPiMgrCmdBuff));
StackCheck_Init(&sMainStackInfo, sMainStack, STACK_TOP(sMainStack), 0, 0x400, "main");
osCreateThread(&sMainThread, THREAD_ID_MAIN, Main_ThreadEntry, arg, STACK_TOP(sMainStack), THREAD_PRI_MAIN_INIT);
diff --git a/src/boot/inflate.c b/src/boot/inflate.c
new file mode 100644
index 0000000000..d9fc7c3f8d
--- /dev/null
+++ b/src/boot/inflate.c
@@ -0,0 +1,1005 @@
+/* Not copyrighted 1992 by Mark Adler
+ version c10p1, 10 January 1993 */
+
+/* You can do whatever you like with this source file, though I would
+ prefer that if you modify it and redistribute it that you include
+ comments to that effect with your name and the date. Thank you.
+ [The history has been moved to the file ChangeLog.]
+ */
+
+/*
+ Inflate deflated (PKZIP's method 8 compressed) data. The compression
+ method searches for as much of the current string of bytes (up to a
+ length of 258) in the previous 32K bytes. If it doesn't find any
+ matches (of at least length 3), it codes the next byte. Otherwise, it
+ codes the length of the matched string and its distance backwards from
+ the current position. There is a single Huffman code that codes both
+ single bytes (called "literals") and match lengths. A second Huffman
+ code codes the distance information, which follows a length code. Each
+ length or distance code actually represents a base value and a number
+ of "extra" (sometimes zero) bits to get to add to the base value. At
+ the end of each deflated block is a special end-of-block (EOB) literal/
+ length code. The decoding process is basically: get a literal/length
+ code; if EOB then done; if a literal, emit the decoded byte; if a
+ length then get the distance and emit the referred-to bytes from the
+ sliding window of previously emitted data.
+
+ There are (currently) three kinds of inflate blocks: stored, fixed, and
+ dynamic. The compressor deals with some chunk of data at a time, and
+ decides which method to use on a chunk-by-chunk basis. A chunk might
+ typically be 32K or 64K. If the chunk is uncompressible, then the
+ "stored" method is used. In this case, the bytes are simply stored as
+ is, eight bits per byte, with none of the above coding. The bytes are
+ preceded by a count, since there is no longer an EOB code.
+
+ If the data is compressible, then either the fixed or dynamic methods
+ are used. In the dynamic method, the compressed data is preceded by
+ an encoding of the literal/length and distance Huffman codes that are
+ to be used to decode this block. The representation is itself Huffman
+ coded, and so is preceded by a description of that code. These code
+ descriptions take up a little space, and so for small blocks, there is
+ a predefined set of codes, called the fixed codes. The fixed method is
+ used if the block codes up smaller that way (usually for quite small
+ chunks), otherwise the dynamic method is used. In the latter case, the
+ codes are customized to the probabilities in the current block, and so
+ can code it much better than the pre-determined fixed codes.
+
+ The Huffman codes themselves are decoded using a multi-level table
+ lookup, in order to maximize the speed of decoding plus the speed of
+ building the decoding tables. See the comments below that precede the
+ lbits and dbits tuning parameters.
+ */
+
+/*
+ Notes beyond the 1.93a appnote.txt:
+
+ 1. Distance pointers never point before the beginning of the output
+ stream.
+ 2. Distance pointers can point back across blocks, up to 32k away.
+ 3. There is an implied maximum of 7 bits for the bit length table and
+ 15 bits for the actual data.
+ 4. If only one code exists, then it is encoded using one bit. (Zero
+ would be more efficient, but perhaps a little confusing.) If two
+ codes exist, they are coded using one bit each (0 and 1).
+ 5. There is no way of sending zero distance codes--a dummy must be
+ sent if there are none. (History: a pre 2.0 version of PKZIP would
+ store blocks with no distance codes, but this was discovered to be
+ too harsh a criterion.) Valid only for 1.93a. 2.04c does allow
+ zero distance codes, which is sent as one code of zero bits in
+ length.
+ 6. There are up to 286 literal/length codes. Code 256 represents the
+ end-of-block. Note however that the static length tree defines
+ 288 codes just to fill out the Huffman codes. Codes 286 and 287
+ cannot be used though, since there is no length base or extra bits
+ defined for them. Similarly, there are up to 30 distance codes.
+ However, static trees define 32 codes (all 5 bits) to fill out the
+ Huffman codes, but the last two had better not show up in the data.
+ 7. Unzip can check dynamic Huffman blocks for complete code sets.
+ The exception is that a single code would not be complete (see #4).
+ 8. The five bits following the block type is really the number of
+ literal codes sent minus 257.
+ 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
+ (1+6+6). Therefore, to output three times the length, you output
+ three codes (1+1+1), whereas to output four times the same length,
+ you only need two codes (1+3). Hmm.
+ 10. In the tree reconstruction algorithm, Code = Code + Increment
+ only if BitLength(i) is not zero. (Pretty obvious.)
+ 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19)
+ 12. Note: length code 284 can represent 227-258, but length code 285
+ really is 258. The last length deserves its own, short code
+ since it gets used a lot in very redundant files. The length
+ 258 is special since 258 - 3 (the min match length) is 255.
+ 13. The literal/length and distance code bit lengths are read as a
+ single stream of lengths. It is possible (and advantageous) for
+ a repeat code (16, 17, or 18) to go across the boundary between
+ the two sets of lengths.
+ */
+
+#include "inflate.h"
+
+#include "ultra64/ultratypes.h"
+#include "stddef.h"
+#include "stdint.h"
+#include "alignment.h"
+#include "attributes.h"
+#include "z64dma.h"
+
+typedef u8 uch;
+typedef u16 ush;
+typedef u32 ulg;
+
+#define Trace(x)
+#define Tracev(x)
+#define Tracevv(x)
+#define Tracecv(c, x)
+
+#define EOF -1
+
+#define WSIZE 0x8000
+#define INBUFSIZ 0x1000
+
+typedef struct GzipFileDescriptor {
+ uintptr_t addr;
+ s32 size;
+} GzipFileDescriptor;
+
+GzipFileDescriptor ifd;
+
+unsigned insize;
+unsigned inptr;
+unsigned outcnt;
+
+static u8 inbuf[INBUFSIZ];
+static u8* output_ptr;
+
+int fill_inbuf(int eof_ok);
+void flush_window(void);
+
+/* Huffman code lookup table entry--this entry is four bytes for machines
+ that have 16-bit pointers (e.g. PC's in the small or medium model).
+ Valid extra bits are 0..13. e == 15 is EOB (end of block), e == 16
+ means that v is a literal, 16 < e < 32 means that v is a pointer to
+ the next table, which codes e - 16 bits, and lastly e == 99 indicates
+ an unused code. If a code with e == 99 is looked up, this implies an
+ error in the data. */
+struct huft {
+ uch e; /* number of extra bits or operation */
+ uch b; /* number of bits in this code or subcode */
+ union {
+ ush n; /* literal, length base, or distance base */
+ struct huft* t; /* pointer to next level of table */
+ } v;
+};
+
+/* Function prototypes */
+int huft_free(struct huft*);
+
+/* The inflate algorithm uses a sliding 32K byte window on the uncompressed
+ stream to find repeated byte strings. This is implemented here as a
+ circular buffer. The index is updated simply by incrementing and then
+ and'ing with 0x7fff (32K-1). */
+/* It is left to other modules to supply the 32K area. It is assumed
+ to be usable as if it were declared "uch slide[32768];" or as just
+ "uch *slide;" and then malloc'ed in the latter case. The definition
+ must be in unzip.h, included above. */
+/* unsigned wp; current position in slide */
+#define wp outcnt
+#define flush_output(w) (wp = (w), flush_window())
+
+/* Tables for deflate from PKZIP's appnote.txt. */
+static unsigned border[] = { /* Order of the bit length code lengths */
+ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
+};
+static ush cplens[] = { /* Copy lengths for literal codes 257..285 */
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
+};
+/* note: see note #13 above about the 258 in this list. */
+static ush cplext[] = { /* Extra bits for literal codes 257..285 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99
+}; /* 99==invalid */
+static ush cpdist[] = { /* Copy offsets for distance codes 0..29 */
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129,
+ 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577
+};
+static ush cpdext[] = { /* Extra bits for distance codes */
+ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13
+};
+
+/* Macros for inflate() bit peeking and grabbing.
+ The usage is:
+
+ NEEDBITS(j)
+ x = b & mask_bits[j];
+ DUMPBITS(j)
+
+ where NEEDBITS makes sure that b has at least j bits in it, and
+ DUMPBITS removes the bits from b. The macros use the variable k
+ for the number of bits in b. Normally, b and k are register
+ variables for speed, and are initialized at the beginning of a
+ routine that uses these macros from a global bit buffer and count.
+ The macros also use the variable w, which is a cached copy of wp.
+
+ If we assume that EOB will be the longest code, then we will never
+ ask for bits with NEEDBITS that are beyond the end of the stream.
+ So, NEEDBITS should not read any more bytes than are needed to
+ meet the request. Then no bytes need to be "returned" to the buffer
+ at the end of the last block.
+
+ However, this assumption is not true for fixed blocks--the EOB code
+ is 7 bits, but the other literal/length codes can be 8 or 9 bits.
+ (The EOB code is shorter than other codes because fixed blocks are
+ generally short. So, while a block always has an EOB, many other
+ literal/length codes have a significantly lower probability of
+ showing up at all.) However, by making the first table have a
+ lookup of seven bits, the EOB code will be found in that first
+ lookup, and so will not require that too many bits be pulled from
+ the stream.
+ */
+
+ulg bb; /* bit buffer */
+unsigned bk; /* bits in bit buffer */
+
+static ush mask_bits[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
+ 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff };
+
+#define GETBYTE() (inptr < insize ? inbuf[inptr++] : fill_inbuf(0))
+
+#define NEXTBYTE() (uch) GETBYTE()
+#define NEEDBITS(n) \
+ { \
+ while (k < (n)) { \
+ b |= ((ulg)NEXTBYTE()) << k; \
+ k += 8; \
+ } \
+ }
+#define DUMPBITS(n) \
+ { \
+ b >>= (n); \
+ k -= (n); \
+ }
+
+/*
+ Huffman code decoding is performed using a multi-level table lookup.
+ The fastest way to decode is to simply build a lookup table whose
+ size is determined by the longest code. However, the time it takes
+ to build this table can also be a factor if the data being decoded
+ is not very long. The most common codes are necessarily the
+ shortest codes, so those codes dominate the decoding time, and hence
+ the speed. The idea is you can have a shorter table that decodes the
+ shorter, more probable codes, and then point to subsidiary tables for
+ the longer codes. The time it costs to decode the longer codes is
+ then traded against the time it takes to make longer tables.
+
+ This results of this trade are in the variables lbits and dbits
+ below. lbits is the number of bits the first level table for literal/
+ length codes can decode in one step, and dbits is the same thing for
+ the distance codes. Subsequent tables are also less than or equal to
+ those sizes. These values may be adjusted either when all of the
+ codes are shorter than that, in which case the longest code length in
+ bits is used, or when the shortest code is *longer* than the requested
+ table size, in which case the length of the shortest code in bits is
+ used.
+
+ There are two different values for the two tables, since they code a
+ different number of possibilities each. The literal/length table
+ codes 286 possible values, or in a flat code, a little over eight
+ bits. The distance table codes 30 possible values, or a little less
+ than five bits, flat. The optimum values for speed end up being
+ about one bit more than those, so lbits is 8+1 and dbits is 5+1.
+ The optimum values may differ though from machine to machine, and
+ possibly even between compilers. Your mileage may vary.
+ */
+
+static int lbits = 9; /* bits in base literal/length lookup table */
+static int dbits = 6; /* bits in base distance lookup table */
+
+/* If BMAX needs to be larger than 16, then h and x[] should be ulg. */
+#define BMAX 16 /* maximum bit length of any code (16 for explode) */
+#define N_MAX 288 /* maximum number of codes in any set */
+
+unsigned hufts; /* track memory usage */
+
+#define MEMBUFSIZ 0x2000
+
+static u8 gzip_mem_buff[MEMBUFSIZ];
+void* gzip_malloc_addr = gzip_mem_buff;
+s32 gzip_malloc_tmp = 0;
+
+void* gzip_malloc(size_t size) {
+ void* ret;
+
+ gzip_malloc_tmp += size;
+ if (gzip_malloc_tmp > MEMBUFSIZ) {
+ return NULL;
+ }
+
+ ret = gzip_malloc_addr;
+ gzip_malloc_addr = (void*)(((uintptr_t)gzip_malloc_addr) + size);
+ return ret;
+}
+
+void gzip_free(void* ptr) {
+ gzip_malloc_tmp = 0;
+ gzip_malloc_addr = gzip_mem_buff;
+}
+
+/* Given a list of code lengths and a maximum table size, make a set of
+ tables to decode that set of codes. Return zero on success, one if
+ the given code set is incomplete (the tables are still built in this
+ case), two if the input is invalid (all zero length codes or an
+ oversubscribed set of lengths), and three if not enough memory. */
+int huft_build(unsigned* b, /* code lengths in bits (all assumed <= BMAX) */
+ unsigned n, /* number of codes (assumed <= N_MAX) */
+ unsigned s, /* number of simple-valued codes (0..s-1) */
+ ush* d, /* list of base values for non-simple codes */
+ ush* e, /* list of extra bits for non-simple codes */
+ struct huft** t, /* result: starting table */
+ int* m /* maximum lookup bits, returns actual */
+) {
+ unsigned a; /* counter for codes of length k */
+ unsigned c[BMAX + 1]; /* bit length count table */
+ unsigned f; /* i repeats in table every f entries */
+ int g; /* maximum code length */
+ int h; /* table level */
+ register unsigned i; /* counter, current code */
+ register unsigned j; /* counter */
+ register int k; /* number of bits in current code */
+ int l; /* bits per table (returned in m) */
+ register unsigned* p; /* pointer into c[], b[], or v[] */
+ register struct huft* q; /* points to current table */
+ struct huft r; /* table entry for structure assignment */
+ struct huft* u[BMAX]; /* table stack */
+ static unsigned v[N_MAX]; /* values in order of bit length */
+ register int w; /* bits before this table == (l * h) */
+ unsigned x[BMAX + 1]; /* bit offsets, then code stack */
+ unsigned* xp; /* pointer into x */
+ int y; /* number of dummy codes added */
+ unsigned z; /* number of entries in current table */
+
+ /* Generate counts for each bit length */
+ for (j = 0; j < BMAX + 1; j++) {
+ c[j] = 0;
+ }
+
+ p = b;
+ i = n;
+ do {
+ Tracecv(*p, (stderr, (n - i >= ' ' && n - i <= '~' ? "%c %d\n" : "0x%x %d\n"), n - i, *p));
+ c[*p]++; /* assume all entries <= BMAX */
+ p++; /* Can't combine with above line (Solaris bug) */
+ } while (--i);
+ if (c[0] == n) { /* null input--all zero length codes */
+ *t = NULL;
+ *m = 0;
+ return 0;
+ }
+
+ /* Find minimum and maximum length, bound *m by those */
+ l = *m;
+ for (j = 1; j <= BMAX; j++) {
+ if (c[j]) {
+ break;
+ }
+ }
+ k = j; /* minimum code length */
+ if ((unsigned)l < j) {
+ l = j;
+ }
+ for (i = BMAX; i; i--) {
+ if (c[i]) {
+ break;
+ }
+ }
+ g = i; /* maximum code length */
+ if ((unsigned)l > i) {
+ l = i;
+ }
+ *m = l;
+
+ /* Adjust last length count to fill out codes, if needed */
+ for (y = 1 << j; j < i; j++, y <<= 1) {
+ if ((y -= c[j]) < 0) {
+ return 2; /* bad input: more codes than bits */
+ }
+ }
+ if ((y -= c[i]) < 0) {
+ return 2;
+ }
+ c[i] += y;
+
+ /* Generate starting offsets into the value table for each length */
+ x[1] = j = 0;
+ p = c + 1;
+ xp = x + 2;
+ while (--i) { /* note that i == g from above */
+ *xp++ = (j += *p++);
+ }
+
+ /* Make a table of values in order of bit lengths */
+ p = b;
+ i = 0;
+ do {
+ if ((j = *p++) != 0) {
+ v[x[j]++] = i;
+ }
+ } while (++i < n);
+
+ /* Generate the Huffman codes and for each, make the table entries */
+ x[0] = i = 0; /* first Huffman code is zero */
+ p = v; /* grab values in bit order */
+ h = -1; /* no tables yet--level -1 */
+ w = -l; /* bits decoded == (l * h) */
+ u[0] = (struct huft*)NULL; /* just to keep compilers happy */
+ q = (struct huft*)NULL; /* ditto */
+ z = 0; /* ditto */
+
+ /* go through the bit lengths (k already is bits in shortest code) */
+ for (; k <= g; k++) {
+ a = c[k];
+ while (a--) {
+ /* here i is the Huffman code of length k bits for value *p */
+ /* make tables up to required level */
+ while (k > w + l) {
+ h++;
+ w += l; /* previous table always l bits */
+
+ /* compute minimum size table less than or equal to l bits */
+ z = (z = g - w) > (unsigned)l ? l : z; /* upper limit on table size */
+ if ((f = 1 << (j = k - w)) > a + 1) { /* try a k-w bit table */
+ /* too few codes for k-w bit table */
+ f -= a + 1; /* deduct codes from patterns left */
+ xp = c + k;
+ while (++j < z) { /* try smaller tables up to z bits */
+ if ((f <<= 1) <= *++xp) {
+ break; /* enough codes to use up j bits */
+ }
+ f -= *xp; /* else deduct codes from patterns */
+ }
+ }
+ z = 1 << j; /* table entries for j-bit table */
+
+ /* allocate and link in new table */
+ if ((q = (struct huft*)gzip_malloc((z + 1) * sizeof(struct huft))) == (struct huft*)NULL) {
+ if (h) {
+ huft_free(u[0]);
+ }
+ return 3; /* not enough memory */
+ }
+ hufts += z + 1; /* track memory usage */
+ *t = q + 1; /* link to list for huft_free() */
+ *(t = &(q->v.t)) = (struct huft*)NULL;
+ u[h] = ++q; /* table starts after link */
+
+ /* connect to last table, if there is one */
+ if (h) {
+ x[h] = i; /* save pattern for backing up */
+ r.b = (uch)l; /* bits to dump before this table */
+ r.e = (uch)(16 + j); /* bits in this table */
+ r.v.t = q; /* pointer to this table */
+ j = i >> (w - l); /* (get around Turbo C bug) */
+ u[h - 1][j] = r; /* connect to last table */
+ }
+ }
+
+ /* set up table entry in r */
+ r.b = (uch)(k - w);
+ if (p >= v + n) {
+ r.e = 99; /* out of values--invalid code */
+ } else if (*p < s) {
+ r.e = (uch)(*p < 256 ? 16 : 15); /* 256 is end-of-block code */
+ r.v.n = (ush)(*p); /* simple code is just the value */
+ p++; /* one compiler does not like *p++ */
+ } else {
+ r.e = (uch)e[*p - s]; /* non-simple--look up in lists */
+ r.v.n = d[*p++ - s];
+ }
+
+ /* fill code-like entries with r */
+ f = 1 << (k - w);
+ for (j = i >> w; j < z; j += f) {
+ q[j] = r;
+ }
+
+ /* backwards increment the k-bit code i */
+ for (j = 1 << (k - 1); i & j; j >>= 1) {
+ i ^= j;
+ }
+ i ^= j;
+
+ /* backup over finished tables */
+ while ((i & ((1 << w) - 1)) != x[h]) {
+ h--; /* don't need to update q */
+ w -= l;
+ }
+ }
+ }
+
+ /* Return true (1) if we were given an incomplete table */
+ return y != 0 && g != 1;
+}
+
+/* Free the malloc'ed tables T built by huft_build(), which makes a linked
+ list of the tables it made, with the links in a dummy first entry of
+ each table. */
+int huft_free(struct huft* t) {
+ register struct huft *p, *q;
+
+ /* Go through linked list, freeing from the malloced (t[-1]) address. */
+ p = t;
+ while (p != (struct huft*)NULL) {
+ q = (--p)->v.t;
+ gzip_free(p);
+ p = q;
+ }
+ return 0;
+}
+
+/* tl, td: literal/length and distance decoder tables */
+/* bl, bd: number of bits decoded by tl[] and td[] */
+/* inflate (decompress) the codes in a deflated (compressed) block.
+ Return an error code or zero if it all goes ok. */
+int inflate_codes(struct huft* tl, struct huft* td, int bl, int bd) {
+ register unsigned e; /* table entry flag/number of extra bits */
+ unsigned n, d; /* length and index for copy */
+ unsigned w; /* current window position */
+ struct huft* t; /* pointer to table entry */
+ unsigned ml, md; /* masks for bl and bd bits */
+ register ulg b; /* bit buffer */
+ register unsigned k; /* number of bits in bit buffer */
+ unsigned char* p;
+
+ /* make local copies of globals */
+ b = bb; /* initialize bit buffer */
+ k = bk;
+ w = wp; /* initialize window position */
+
+ /* inflate the coded data */
+ ml = mask_bits[bl]; /* precompute masks for speed */
+ md = mask_bits[bd];
+ for (;;) { /* do until end of block */
+ NEEDBITS((unsigned)bl)
+ if ((e = (t = tl + ((unsigned)b & ml))->e) > 16) {
+ do {
+ if (e == 99) {
+ return 1;
+ }
+ DUMPBITS(t->b)
+ e -= 16;
+ NEEDBITS(e)
+ } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16);
+ }
+ DUMPBITS(t->b)
+ if (e == 16) { /* then it's a literal */
+ *output_ptr++ = (uch)t->v.n;
+ w++;
+ if (w == WSIZE) {
+ flush_output(w);
+ w = 0;
+ }
+ } else { /* it's an EOB or a length */
+ /* exit if end of block */
+ if (e == 15) {
+ break;
+ }
+
+ /* get length of block to copy */
+ NEEDBITS(e)
+ n = t->v.n + ((unsigned)b & mask_bits[e]);
+ DUMPBITS(e);
+
+ /* decode distance of block to copy */
+ NEEDBITS((unsigned)bd)
+ if ((e = (t = td + ((unsigned)b & md))->e) > 16) {
+ do {
+ if (e == 99) {
+ return 1;
+ }
+ DUMPBITS(t->b)
+ e -= 16;
+ NEEDBITS(e)
+ } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16);
+ }
+ DUMPBITS(t->b)
+ NEEDBITS(e)
+ d = w - t->v.n - ((unsigned)b & mask_bits[e]);
+ DUMPBITS(e)
+ Tracevv((stderr, "\\[%d,%d]", w - d, n));
+
+ /* do the copy */
+ p = output_ptr + d - w;
+ do {
+ *output_ptr++ = *p++;
+ w++;
+ if (w == WSIZE) {
+ flush_output(w);
+ w = 0;
+ }
+ d++;
+ n--;
+ } while (n != 0);
+ }
+ }
+
+ /* restore the globals from the locals */
+ wp = w; /* restore global window pointer */
+ bb = b; /* restore global bit buffer */
+ bk = k;
+
+ /* done */
+ return 0;
+}
+
+/* "decompress" an inflated type 0 (stored) block. */
+int inflate_stored(void) {
+ unsigned n; /* number of bytes in block */
+ unsigned w; /* current window position */
+ register ulg b; /* bit buffer */
+ register unsigned k; /* number of bits in bit buffer */
+
+ /* make local copies of globals */
+ b = bb; /* initialize bit buffer */
+ k = bk;
+ w = wp; /* initialize window position */
+
+ /* go to byte boundary */
+ n = k & 7;
+ DUMPBITS(n);
+
+ /* get the length and its complement */
+ NEEDBITS(16)
+ n = ((unsigned)b & 0xffff);
+ DUMPBITS(16)
+ NEEDBITS(16)
+ if (n != (unsigned)((~b) & 0xffff)) {
+ return 1; /* error in compressed data */
+ }
+ DUMPBITS(16)
+
+ /* read and output the compressed data */
+ while (n--) {
+ NEEDBITS(8)
+ *output_ptr++ = (uch)b;
+ w++;
+ if (w == WSIZE) {
+ flush_output(w);
+ w = 0;
+ }
+ DUMPBITS(8)
+ }
+
+ /* restore the globals from the locals */
+ wp = w; /* restore global window pointer */
+ bb = b; /* restore global bit buffer */
+ bk = k;
+ return 0;
+}
+
+/* decompress an inflated type 1 (fixed Huffman codes) block. We should
+ either replace this with a custom decoder, or at least precompute the
+ Huffman tables. */
+int inflate_fixed(void) {
+ int i; /* temporary variable */
+ struct huft* tl; /* literal/length code table */
+ struct huft* td; /* distance code table */
+ int bl; /* lookup bits for tl */
+ int bd; /* lookup bits for td */
+ static unsigned l[288]; /* length list for huft_build */
+
+ /* set up literal table */
+ for (i = 0; i < 144; i++) {
+ l[i] = 8;
+ }
+ for (; i < 256; i++) {
+ l[i] = 9;
+ }
+ for (; i < 280; i++) {
+ l[i] = 7;
+ }
+ for (; i < 288; i++) { /* make a complete, but wrong code set */
+ l[i] = 8;
+ }
+ bl = 7;
+ if ((i = huft_build(l, 288, 257, cplens, cplext, &tl, &bl)) != 0) {
+ return i;
+ }
+
+ /* set up distance table */
+ for (i = 0; i < 30; i++) { /* make an incomplete code set */
+ l[i] = 5;
+ }
+ bd = 5;
+ if ((i = huft_build(l, 30, 0, cpdist, cpdext, &td, &bd)) > 1) {
+ huft_free(tl);
+ return i;
+ }
+
+ /* decompress until an end-of-block code */
+ if (inflate_codes(tl, td, bl, bd)) {
+ return 1;
+ }
+
+ /* free the decoding tables, return */
+ huft_free(td);
+ huft_free(tl);
+ return 0;
+}
+
+/* decompress an inflated type 2 (dynamic Huffman codes) block. */
+int inflate_dynamic(void) {
+ int i; /* temporary variables */
+ unsigned j;
+ unsigned l; /* last length */
+ unsigned m; /* mask for bit lengths table */
+ unsigned n; /* number of lengths to get */
+ UNUSED unsigned w; /* current window position */
+ struct huft* tl; /* literal/length code table */
+ struct huft* td; /* distance code table */
+ int bl; /* lookup bits for tl */
+ int bd; /* lookup bits for td */
+ unsigned nb; /* number of bit length codes */
+ unsigned nl; /* number of literal/length codes */
+ unsigned nd; /* number of distance codes */
+ static unsigned ll[288 + 32]; /* literal/length and distance code lengths */
+ register ulg b; /* bit buffer */
+ register unsigned k; /* number of bits in bit buffer */
+
+ /* make local bit buffer */
+ b = bb;
+ k = bk;
+ w = wp;
+
+ /* read in table lengths */
+ NEEDBITS(5)
+ nl = 257 + ((unsigned)b & 0x1f); /* number of literal/length codes */
+ DUMPBITS(5)
+ NEEDBITS(5)
+ nd = 1 + ((unsigned)b & 0x1f); /* number of distance codes */
+ DUMPBITS(5)
+ NEEDBITS(4)
+ nb = 4 + ((unsigned)b & 0xf); /* number of bit length codes */
+ DUMPBITS(4)
+ if (nl > 288 || nd > 32) {
+ return 1; /* bad lengths */
+ }
+
+ /* read in bit-length-code lengths */
+ for (j = 0; j < nb; j++) {
+ NEEDBITS(3)
+ ll[border[j]] = (unsigned)b & 7;
+ DUMPBITS(3)
+ }
+ for (; j < 19; j++) {
+ ll[border[j]] = 0;
+ }
+
+ /* build decoding table for trees--single level, 7 bit lookup */
+ bl = 7;
+ if ((i = huft_build(ll, 19, 19, NULL, NULL, &tl, &bl)) != 0) {
+ if (i == 1) {
+ huft_free(tl);
+ }
+ return i; /* incomplete code set */
+ }
+
+ /* read in literal and distance code lengths */
+ n = nl + nd;
+ m = mask_bits[bl];
+ i = l = 0;
+ while ((unsigned)i < n) {
+ NEEDBITS((unsigned)bl)
+ j = (td = tl + ((unsigned)b & m))->b;
+ DUMPBITS(j)
+ j = td->v.n;
+ if (j < 16) { /* length of code in bits (0..15) */
+ ll[i++] = l = j; /* save last length in l */
+ } else if (j == 16) { /* repeat last length 3 to 6 times */
+ NEEDBITS(2)
+ j = 3 + ((unsigned)b & 3);
+ DUMPBITS(2)
+ if ((unsigned)i + j > n) {
+ return 1;
+ }
+ while (j--) {
+ ll[i++] = l;
+ }
+ } else if (j == 17) { /* 3 to 10 zero length codes */
+ NEEDBITS(3)
+ j = 3 + ((unsigned)b & 7);
+ DUMPBITS(3)
+ if ((unsigned)i + j > n) {
+ return 1;
+ }
+ while (j--) {
+ ll[i++] = 0;
+ }
+ l = 0;
+ } else { /* j == 18: 11 to 138 zero length codes */
+ NEEDBITS(7)
+ j = 11 + ((unsigned)b & 0x7f);
+ DUMPBITS(7)
+ if ((unsigned)i + j > n) {
+ return 1;
+ }
+ while (j--) {
+ ll[i++] = 0;
+ }
+ l = 0;
+ }
+ }
+
+ /* free decoding table for trees */
+ huft_free(tl);
+
+ /* restore the global bit buffer */
+ bb = b;
+ bk = k;
+
+ /* build the decoding tables for literal/length and distance codes */
+ bl = lbits;
+ if ((i = huft_build(ll, nl, 257, cplens, cplext, &tl, &bl)) != 0) {
+ if (i == 1) {
+ Trace((stderr, " incomplete literal tree\n"));
+ huft_free(tl);
+ }
+ return i; /* incomplete code set */
+ }
+ bd = dbits;
+ if ((i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &td, &bd)) != 0) {
+ if (i == 1) {
+ Trace((stderr, " incomplete distance tree\n"));
+ i = 0;
+ }
+ }
+
+ /* decompress until an end-of-block code */
+ if (inflate_codes(tl, td, bl, bd) != 0) {
+ return 1;
+ }
+
+ /* free the decoding tables */
+ huft_free(td);
+ huft_free(tl);
+
+ return 0;
+}
+
+/* decompress an inflated block */
+/* E is the last block flag */
+int inflate_block(int* e) {
+ unsigned t; /* block type */
+ UNUSED unsigned w; /* current window position */
+ register ulg b; /* bit buffer */
+ register unsigned k; /* number of bits in bit buffer */
+
+ /* make local bit buffer */
+ b = bb;
+ k = bk;
+ w = wp;
+
+ /* read in last block bit */
+ NEEDBITS(1)
+ *e = (int)b & 1;
+ DUMPBITS(1)
+
+ /* read in block type */
+ NEEDBITS(2)
+ t = (unsigned)b & 3;
+ DUMPBITS(2)
+
+ /* restore the global bit buffer */
+ bb = b;
+ bk = k;
+
+ /* inflate that block type */
+ if (t == 2) {
+ return inflate_dynamic();
+ }
+ if (t == 0) {
+ return inflate_stored();
+ }
+ if (t == 1) {
+ return inflate_fixed();
+ }
+
+ /* bad block type */
+ return 2;
+}
+
+/* decompress an inflated entry */
+int inflate(void) {
+ int e; /* last block flag */
+ int r; /* result code */
+ unsigned h; /* maximum struct huft's malloc'ed */
+
+ /* initialize window, bit buffer */
+ wp = 0;
+ bk = 0;
+ bb = 0;
+
+ gzip_malloc_tmp = 0;
+ gzip_malloc_addr = gzip_mem_buff;
+
+ /* decompress until the last block */
+ h = 0;
+ do {
+ hufts = 0;
+ if ((r = inflate_block(&e)) != 0) {
+ return r;
+ }
+ if (hufts > h) {
+ h = hufts;
+ }
+ } while (!e);
+
+ /* Undo too much lookahead. The next read will be byte aligned so we
+ * can discard unused bits in the last meaningful byte.
+ */
+ while (bk >= 8) {
+ bk -= 8;
+ inptr--;
+ }
+
+ /* flush out slide */
+ flush_output(wp);
+
+ /* return success */
+ Trace((stderr, "<%u> ", h));
+ return 0;
+}
+
+size_t gzip_read(GzipFileDescriptor* romInput, void* dst, size_t blockSize) {
+ size_t alignedSize;
+
+ if (blockSize > (size_t)romInput->size) {
+ blockSize = romInput->size;
+ }
+
+ alignedSize = ALIGN8(blockSize);
+ if (alignedSize > 0) {
+ DmaMgr_DmaRomToRam(romInput->addr, dst, alignedSize);
+ }
+
+ romInput->size -= alignedSize;
+ romInput->addr += alignedSize;
+ if (romInput->size < 0) {
+ romInput->size = 0;
+ }
+
+ return blockSize;
+}
+
+int unzip(void) {
+ int ret = inflate();
+
+ if (ret == 3) {
+ return -1;
+ }
+
+ if (ret != 0) {
+ return -1;
+ }
+
+ return 0;
+}
+
+void clear_bufs(void) {
+ insize = inptr = 0;
+}
+
+int fill_inbuf(int eof_ok) {
+ int len;
+
+ /* Read as much as possible */
+ insize = 0;
+ do {
+ len = gzip_read(&ifd, (char*)inbuf + insize, INBUFSIZ - insize);
+ if (len == 0 || len == -1) {
+ break;
+ }
+ insize += len;
+ } while (insize < INBUFSIZ);
+
+ if (insize == 0) {
+ if (eof_ok) {
+ return EOF;
+ }
+ }
+
+ inptr = 1;
+ return inbuf[0];
+}
+
+void flush_window(void) {
+ outcnt = 0;
+}
+
+void gzip_decompress(uintptr_t romStart, u8* dst, size_t size) {
+ ifd.addr = romStart;
+ ifd.size = size;
+
+ output_ptr = dst;
+
+ clear_bufs();
+ unzip();
+}
diff --git a/src/boot/is_debug.c b/src/boot/is_debug.c
index dc2cedc4b8..185ee77c62 100644
--- a/src/boot/is_debug.c
+++ b/src/boot/is_debug.c
@@ -1,9 +1,21 @@
-#include "global.h"
+#include "is_debug.h"
+
+#include "ultra64.h"
+#include "versions.h"
+
+typedef struct ISVDbg {
+ /* 0x00 */ u32 magic; // "IS64"
+ /* 0x04 */ u32 get;
+ /* 0x08 */ u8 unk_08[0xC];
+ /* 0x14 */ u32 put;
+ /* 0x18 */ u8 unk_18[0x8];
+ /* 0x20 */ u8 data[0xFFE0];
+} ISVDbg; // size = 0x10000
#define gISVDbgPrnAdrs ((ISVDbg*)0xB3FF0000)
#define ASCII_TO_U32(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0)))
-#if OOT_DEBUG
+#if DEBUG_FEATURES
OSPiHandle* sISVHandle; // official name : is_Handle
void isPrintfInit(void) {
@@ -18,7 +30,7 @@ void osSyncPrintfUnused(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
_Printf(is_proutSyncPrintf, NULL, fmt, args);
#endif
@@ -29,7 +41,7 @@ void osSyncPrintf(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
_Printf(is_proutSyncPrintf, NULL, fmt, args);
#endif
@@ -41,14 +53,19 @@ void rmonPrintf(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
_Printf(is_proutSyncPrintf, NULL, fmt, args);
#endif
va_end(args);
}
-#if OOT_DEBUG
+#if OOT_VERSION < PAL_1_0
+void func_800015F4(void) {
+}
+#endif
+
+#if DEBUG_FEATURES
void* is_proutSyncPrintf(void* arg, const char* str, size_t count) {
u32 data;
s32 pos;
diff --git a/src/boot/is_debug_ique.c b/src/boot/is_debug_ique.c
new file mode 100644
index 0000000000..a78fef8235
--- /dev/null
+++ b/src/boot/is_debug_ique.c
@@ -0,0 +1,8 @@
+void osSyncPrintfUnused() {
+}
+
+void osSyncPrintf() {
+}
+
+void rmonPrintf() {
+}
diff --git a/src/boot/mio0.s b/src/boot/mio0.s
index a3fb8eba26..a6c2eee6bc 100644
--- a/src/boot/mio0.s
+++ b/src/boot/mio0.s
@@ -1,10 +1,7 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
/**
* void Mio0_Decompress(void* src, void* dst);
@@ -12,53 +9,56 @@
* Decompress Mio0 chunk
*/
LEAF(Mio0_Decompress)
- lw $a3, 8($a0) // compressed offset
- lw $t9, 0xC($a0) // uncompressed offset
- lw $t8, 4($a0) // decompressed length
- add $a3, $a3, $a0 // compressed start
- add $t9, $t9, $a0 // uncompressed start
- move $a2, $zero // 0
- addi $a0, $a0, 0x10 // move past header
- add $t8, $t8, $a1 // dst + decompressed length = end
+ lw a3, 0x08(a0) /* compressed offset */
+ lw t9, 0x0C(a0) /* uncompressed offset */
+ lw t8, 0x04(a0) /* decompressed length */
+ add a3, a3, a0 /* compressed start */
+ add t9, t9, a0 /* uncompressed start */
+ move a2, zero /* 0 */
+ addi a0, a0, 0x10 /* move past header */
+ add t8, t8, a1 /* dst + decompressed length = end */
mainloop:
- bnez $a2, 1f
- nop
- lw $t0, ($a0)
- li $a2, 32
- addi $a0, $a0, 4
+ bnez a2, 1f
+
+ lw t0, (a0)
+ li a2, 32
+ addi a0, a0, 4
1:
- slt $t1, $t0, $zero
- beqz $t1, read_comp
- nop
- lb $t2, ($t9) // read 1 byte from uncompressed data
- addi $t9, $t9, 1 // advance uncompressed start
- addi $a1, $a1, 1
+ slt t1, t0, zero
+ beqz t1, read_comp
+
+ lb t2, (t9) /* read 1 byte from uncompressed data */
+ sb t2, (a1) /* store uncompressed byte */
+ addi t9, t9, 1 /* advance uncompressed start */
+ addi a1, a1, 1
b next_iter
- sb $t2, -1($a1) // store uncompressed byte
+
read_comp:
- lhu $t2, ($a3) // read 2 bytes from compressed data
- addi $a3, $a3, 2 // advance compressed start
- srl $t3, $t2, 0xC
- andi $t2, $t2, 0xFFF
- beqz $t3, 3f
- sub $t1, $a1, $t2
- addi $t3, $t3, 2
+ lhu t2, (a3) /* read 2 bytes from compressed data */
+ addi a3, a3, 2 /* advance compressed start */
+ srl t3, t2, 0xC
+ andi t2, t2, 0xFFF
+ sub t1, a1, t2
+ beqz t3, 3f
+
+ addi t3, t3, 2
2:
- lb $t2, -1($t1)
- addi $t3, $t3, -1
- addi $t1, $t1, 1
- addi $a1, $a1, 1
- bnez $t3, 2b
- sb $t2, -1($a1)
+ lb t2, -1(t1)
+ addi t3, t3, -1
+ addi t1, t1, 1
+ sb t2, (a1)
+ addi a1, a1, 1
+ bnez t3, 2b
+
next_iter:
- sll $t0, $t0, 1
- bne $a1, $t8, mainloop // continue until decompressed length is reached
- addi $a2, $a2, -1
- jr $ra
- nop
+ sll t0, t0, 1
+ addi a2, a2, -1
+ bne a1, t8, mainloop /* continue until decompressed length is reached */
+
+ jr ra
3:
- lbu $t3, ($t9)
- addi $t9, $t9, 1
+ lbu t3, (t9)
+ addi t9, t9, 1
+ addi t3, t3, 0x12
b 2b
- addi $t3, $t3, 0x12
END(Mio0_Decompress)
diff --git a/src/boot/viconfig.c b/src/boot/viconfig.c
index 4ac95122c7..0381f57f30 100644
--- a/src/boot/viconfig.c
+++ b/src/boot/viconfig.c
@@ -1,8 +1,13 @@
-#include "global.h"
+#include "printf.h"
#include "terminal.h"
+#include "idle.h"
-// this should probably go elsewhere but right now viconfig.o is the only object between idle and z_std_dma
-OSPiHandle* gCartHandle = NULL;
+s8 D_80009430 = 1;
+vu8 gViConfigBlack = true;
+u8 gViConfigAdditionalScanLines = 0;
+u32 gViConfigFeatures = OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF;
+f32 gViConfigXScale = 1.0;
+f32 gViConfigYScale = 1.0;
void ViConfig_UpdateVi(u32 black) {
if (black) {
diff --git a/src/boot/yaz0.c b/src/boot/yaz0.c
index cbd6a87a1d..eb3ce23317 100644
--- a/src/boot/yaz0.c
+++ b/src/boot/yaz0.c
@@ -1,7 +1,11 @@
-#include "global.h"
+#include "yaz0.h"
-#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"
+#include "alignment.h"
+#include "ultra64.h"
+#include "z64dma.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"
ALIGNED(16) u8 sYaz0DataBuffer[0x400];
u8* sYaz0DataBufferEnd;
@@ -51,6 +55,13 @@ void* Yaz0_NextDMA(u8* curSrcPos) {
return dst;
}
+typedef struct Yaz0Header {
+ /* 0x00 */ char magic[4]; // Yaz0
+ /* 0x04 */ u32 decSize;
+ /* 0x08 */ u32 compInfoOffset; // only used in mio0
+ /* 0x0C */ u32 uncompDataOffset; // only used in mio0
+} Yaz0Header; // size = 0x10
+
void Yaz0_DecompressImpl(u8* src, u8* dst) {
Yaz0Header* header = (Yaz0Header*)src;
u32 bitIdx = 0;
diff --git a/src/boot/z_locale.c b/src/boot/z_locale.c
index 2ff79fb013..a517f561ce 100644
--- a/src/boot/z_locale.c
+++ b/src/boot/z_locale.c
@@ -1,11 +1,33 @@
-#include "global.h"
+#include "libu64/debug.h"
+#include "alignment.h"
+#include "carthandle.h"
+#include "line_numbers.h"
+#include "padmgr.h"
+#include "printf.h"
#include "region.h"
#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "vi_mode.h"
+#include "z_locale.h"
s32 gCurrentRegion = 0;
+typedef struct LocaleCartInfo {
+ /* 0x00 */ char name[0x18];
+ /* 0x18 */ u32 mediaFormat;
+ /* 0x1C */ union {
+ struct {
+ u16 cartId;
+ u8 countryCode;
+ u8 version;
+ };
+ u32 regionInfo;
+ };
+} LocaleCartInfo; // size = 0x20
+
void Locale_Init(void) {
-#if PLATFORM_N64
+#if !PLATFORM_GC
ALIGNED(4) u8 regionInfo[4];
u8 countryCode;
@@ -22,6 +44,7 @@ void Locale_Init(void) {
countryCode = sCartInfo.countryCode;
#endif
+#if !PLATFORM_IQUE
switch (countryCode) {
case 'J': // "NTSC-J (Japan)"
gCurrentRegion = REGION_JP;
@@ -29,31 +52,32 @@ void Locale_Init(void) {
case 'E': // "NTSC-U (North America)"
gCurrentRegion = REGION_US;
break;
+#if OOT_VERSION >= PAL_1_0
case 'P': // "PAL (Europe)"
gCurrentRegion = REGION_EU;
break;
+#endif
default:
- PRINTF(VT_COL(RED, WHITE));
+ PRINTF_COLOR_ERROR();
PRINTF(T("z_locale_init: 日本用かアメリカ用か判別できません\n",
"z_locale_init: Can't tell if it's for Japan or America\n"));
-#if PLATFORM_N64
- LogUtils_HungupThread("../z_locale.c", 101);
-#else
- LogUtils_HungupThread("../z_locale.c", 118);
-#endif
+ LogUtils_HungupThread("../z_locale.c", LN4(86, 92, 101, UNK_LINE, 118));
PRINTF(VT_RST);
break;
}
PRINTF(T("z_locale_init:日本用かアメリカ用か3コンで判断させる\n",
"z_locale_init: Determine whether it is for Japan or America using 3 controls\n"));
+#else
+ gCurrentRegion = REGION_US;
+#endif
}
void Locale_ResetRegion(void) {
gCurrentRegion = REGION_NULL;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u32 func_80001F48(void) {
if (gCurrentRegion == OOT_REGION) {
return 0;
diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c
index c3e97aa190..f38edf74a4 100644
--- a/src/boot/z_std_dma.c
+++ b/src/boot/z_std_dma.c
@@ -18,16 +18,35 @@
* There are some additional provisions to ensure that audio DMA is particularly high-speed, the audio data is assumed
* to be uncompressed and the request queue and address translation is skipped.
*/
-#include "global.h"
+#include "libc64/sleep.h"
+#include "libc64/sprintf.h"
+#include "libu64/debug.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "carthandle.h"
#include "fault.h"
-#include "stack.h"
-#include "terminal.h"
+#include "idle.h"
+#if PLATFORM_IQUE
+#include "inflate.h"
+#endif
+#include "line_numbers.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "printf.h"
+#include "segment_symbols.h"
+#include "stack.h"
+#include "stackcheck.h"
+#include "terminal.h"
+#include "translation.h"
+#if !PLATFORM_IQUE
+#include "yaz0.h"
+#endif
+#include "z64dma.h"
+#include "z64thread.h"
-#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:111"
+#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:86" \
+ "pal-1.0:84 pal-1.1:84"
StackEntry sDmaMgrStackInfo;
OSMesgQueue sDmaMgrMsgQueue;
@@ -40,7 +59,7 @@ u32 sDmaMgrIsRomCompressed = false;
OSThread sDmaMgrThread;
STACK(sDmaMgrStack, 0x500);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
const char* sDmaMgrCurFileName;
s32 sDmaMgrCurFileLine;
@@ -52,11 +71,20 @@ const char* sDmaMgrFileNames[] = {
#include "tables/dmadata_table.h"
};
-#endif
-
#undef DEFINE_DMA_ENTRY
-#if PLATFORM_N64 || OOT_DEBUG
+#endif
+
+#define SET_IOMSG(ioMsg, queue, rom, ram, buffSize) \
+ do { \
+ (ioMsg).hdr.pri = OS_MESG_PRI_NORMAL; \
+ (ioMsg).hdr.retQueue = (queue); \
+ (ioMsg).devAddr = (rom); \
+ (ioMsg).dramAddr = (ram); \
+ (ioMsg).size = (buffSize); \
+ } while (0)
+
+#if !PLATFORM_GC || DEBUG_FEATURES
/**
* Compares `str1` and `str2`.
*
@@ -65,7 +93,7 @@ const char* sDmaMgrFileNames[] = {
* -1 if the first character that does not match has a smaller value in str1 than str2,
* +1 if the first character that does not match has a greater value in str1 than str2
*/
-s32 DmaMgr_StrCmp(const char* str1, const char* str2) {
+s32 DmaMgr_StrCmp(const u8* str1, const u8* str2) {
while (*str1 != '\0') {
if (*str1 > *str2) {
return 1;
@@ -102,6 +130,9 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
OSMesg msg;
s32 ret;
size_t buffSize = gDmaMgrDmaBuffSize;
+#if DEBUG_FEATURES
+ UNUSED s32 pad;
+#endif
if (buffSize == 0) {
buffSize = DMAMGR_DEFAULT_BUFSIZE;
@@ -115,13 +146,7 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
// The system avoids large DMAs as these would stall the PI for too long, potentially causing issues with
// audio. To allow audio to continue to DMA whenever it needs to, other DMAs are split into manageable chunks.
- if (1) {} // Necessary to match
-
- ioMsg.hdr.pri = OS_MESG_PRI_NORMAL;
- ioMsg.hdr.retQueue = &queue;
- ioMsg.devAddr = rom;
- ioMsg.dramAddr = ram;
- ioMsg.size = buffSize;
+ SET_IOMSG(ioMsg, &queue, rom, ram, buffSize);
if (gDmaMgrVerbose == 10) {
PRINTF(T("%10lld ノーマルDMA %08x %08x %08x (%d)\n", "%10lld Normal DMA %08x %08x %08x (%d)\n"),
@@ -150,15 +175,9 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
ram = (u8*)ram + buffSize;
}
- if (1) { // Also necessary to match
- s32 pad[2];
- }
+ SET_IOMSG(ioMsg, &queue, rom, ram, size);
- ioMsg.hdr.pri = OS_MESG_PRI_NORMAL;
- ioMsg.hdr.retQueue = &queue;
- ioMsg.devAddr = rom;
- ioMsg.dramAddr = ram;
- ioMsg.size = size;
+ { UNUSED s32 pad2; }
if (gDmaMgrVerbose == 10) {
PRINTF(T("%10lld ノーマルDMA %08x %08x %08x (%d)\n", "%10lld Normal DMA %08x %08x %08x (%d)\n"),
@@ -241,18 +260,14 @@ void DmaMgr_DmaFromDriveRom(void* ram, uintptr_t rom, size_t size) {
osInvalDCache(ram, size);
osCreateMesgQueue(&queue, &msg, 1);
- ioMsg.hdr.retQueue = &queue;
- ioMsg.hdr.pri = OS_MESG_PRI_NORMAL;
- ioMsg.devAddr = rom;
- ioMsg.dramAddr = ram;
- ioMsg.size = size;
+ SET_IOMSG(ioMsg, &queue, rom, ram, size);
handle->transferInfo.cmdType = 2;
osEPiStartDma(handle, &ioMsg, OS_READ);
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
/**
* DMA error encountered, print error messages and bring up the crash screen.
*
@@ -271,7 +286,7 @@ NORETURN void DmaMgr_Error(DmaRequest* req, const char* filename, const char* er
char buff2[80];
PRINTF("%c", BEL);
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("DMA致命的エラー(%s)\nROM:%X RAM:%X SIZE:%X %s\n", "DMA Fatal Error (%s)\nROM:%X RAM:%X SIZE:%X %s\n"),
errorDesc != NULL ? errorDesc : (errorName != NULL ? errorName : "???"), vrom, ram, size,
filename != NULL ? filename : "???");
@@ -282,7 +297,7 @@ NORETURN void DmaMgr_Error(DmaRequest* req, const char* filename, const char* er
PRINTF("DMA ERROR: %s %d", sDmaMgrCurFileName, sDmaMgrCurFileLine);
}
- PRINTF(VT_RST);
+ PRINTF_RST();
if (req->filename != NULL) {
sprintf(buff1, "DMA ERROR: %s %d", req->filename, req->line);
@@ -296,12 +311,9 @@ NORETURN void DmaMgr_Error(DmaRequest* req, const char* filename, const char* er
Fault_AddHungupAndCrashImpl(buff1, buff2);
}
-#define DMA_ERROR(req, filename, errorName, errorDesc, file, n64Line, gcLine) \
- DmaMgr_Error(req, filename, errorName, errorDesc)
-#elif PLATFORM_N64
-#define DMA_ERROR(req, filename, errorName, errorDesc, file, n64Line, gcLine) Fault_AddHungupAndCrash(file, n64Line)
-#elif PLATFORM_GC
-#define DMA_ERROR(req, filename, errorName, errorDesc, file, n64Line, gcLine) Fault_AddHungupAndCrash(file, gcLine)
+#define DMA_ERROR(req, filename, errorName, errorDesc, file, line) DmaMgr_Error(req, filename, errorName, errorDesc)
+#else
+#define DMA_ERROR(req, filename, errorName, errorDesc, file, line) Fault_AddHungupAndCrash(file, line)
#endif
#if PLATFORM_GC
@@ -313,7 +325,7 @@ NORETURN void DmaMgr_Error(DmaRequest* req, const char* filename, const char* er
* @return Pointer to associated filename
*/
const char* DmaMgr_FindFileName(uintptr_t vrom) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
DmaEntry* iter = gDmaDataTable;
const char** name = sDmaMgrFileNames;
@@ -337,23 +349,24 @@ const char* DmaMgr_FindFileName(uintptr_t vrom) {
#endif
const char* DmaMgr_GetFileName(uintptr_t vrom) {
-#if OOT_DEBUG
+#if PLATFORM_GC && DEBUG_FEATURES
const char* ret = DmaMgr_FindFileName(vrom);
if (ret == NULL) {
return "(unknown)";
}
- if (DmaMgr_StrCmp(ret, "kanji") == 0 || DmaMgr_StrCmp(ret, "link_animetion") == 0) {
+ if (DmaMgr_StrCmp((const u8*)ret, (const u8*)"kanji") == 0 ||
+ DmaMgr_StrCmp((const u8*)ret, (const u8*)"link_animetion") == 0) {
// This check may be related to these files being too large to be loaded all at once, however a NULL filename
// does not prevent them from being loaded.
return NULL;
}
return ret;
-#elif PLATFORM_N64
- return "??";
#elif PLATFORM_GC
return "";
+#else
+ return "??";
#endif
}
@@ -365,10 +378,10 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
size_t romSize;
u8 found = false;
DmaEntry* iter;
- const char* filename;
+ UNUSED_NDEBUG const char* filename;
s32 i = 0;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
// Get the filename (for debugging)
filename = DmaMgr_GetFileName(vrom);
#elif PLATFORM_GC
@@ -382,19 +395,17 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
if (vrom >= iter->file.vromStart && vrom < iter->file.vromEnd) {
// Found the region this request falls into
-#if PLATFORM_N64
- // Based on the MM Debug ROM, these strings are part of the condition for the empty if statement below,
- // as `... && DmaMgr_StrCmp("", "kanji") != 0 && DmaMgr_StrCmp("", "link_animetion") != 0`
- (void)"";
- (void)"kanji";
- (void)"";
- (void)"link_animetion";
-#endif
-
if (0) {
- // The string is defined in .rodata of debug builds but not used, suggesting a debug print is here
- // but was optimized out in some way.
- PRINTF("DMA ROM:%08X RAM:%08X SIZE:%08X %s\n", vrom, ram, size, filename);
+#if !PLATFORM_GC
+ // Based on the MM Debug ROM, these strings are part of the condition for the empty if statement below
+ if (DmaMgr_StrCmp((const u8*)"", (const u8*)"kanji") != 0 &&
+ DmaMgr_StrCmp((const u8*)"", (const u8*)"link_animetion") != 0)
+#endif
+ {
+ // The string is defined in .rodata of debug builds but not used, suggesting a debug print is here
+ // but was optimized out in some way.
+ PRINTF("DMA ROM:%08X RAM:%08X SIZE:%08X %s\n", vrom, ram, size, filename);
+ }
}
if (iter->romEnd == 0) {
@@ -407,10 +418,10 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
DMA_ERROR(req, filename, "Segment Alignment Error",
T("セグメント境界をまたがってDMA転送することはできません",
"DMA transfers cannot cross segment boundaries"),
- "../z_std_dma.c", 578, 726);
+ "../z_std_dma.c", LN3(575, 578, 595, 726));
}
- DmaMgr_DmaRomToRam(iter->romStart + (vrom - iter->file.vromStart), ram, size);
+ DmaMgr_DmaRomToRam(iter->romStart + vrom - iter->file.vromStart, ram, size);
found = true;
if (0) {
@@ -419,16 +430,16 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
} else {
// File is compressed. Files that are stored compressed must be loaded into RAM all at once.
- romStart = iter->romStart;
romSize = iter->romEnd - iter->romStart;
+ romStart = iter->romStart;
- if (vrom != iter->file.vromStart) {
+ if (iter->file.vromStart != vrom) {
// Error, requested vrom is not the start of a file
DMA_ERROR(req, filename, "Can't Transfer Segment",
T("圧縮されたセグメントの途中からはDMA転送することはできません",
"DMA transfer cannot be performed from the middle of a compressed segment"),
- "../z_std_dma.c", 598, 746);
+ "../z_std_dma.c", LN3(595, 598, 615, 746));
}
if (size != iter->file.vromEnd - iter->file.vromStart) {
@@ -437,13 +448,19 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
DMA_ERROR(req, filename, "Can't Transfer Segment",
T("圧縮されたセグメントの一部だけをDMA転送することはできません",
"It is not possible to DMA only part of a compressed segment"),
- "../z_std_dma.c", 604, 752);
+ "../z_std_dma.c", LN3(601, 604, 621, 752));
}
// 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 !PLATFORM_IQUE
Yaz0_Decompress(romStart, ram, romSize);
+#else
+ gzip_decompress(romStart, ram, romSize);
+#endif
+
osSetThreadPri(NULL, THREAD_PRI_DMAMGR);
found = true;
@@ -454,7 +471,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
break;
}
-#if PLATFORM_N64
+#if !PLATFORM_GC
if (i != 0) {
i += 4;
}
@@ -470,12 +487,13 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
// Error, rom is compressed so DMA may only be requested within the filesystem bounds
DMA_ERROR(req, NULL, "DATA DON'T EXIST",
- T("該当するデータが存在しません", "Corresponding data does not exist"), "../z_std_dma.c", 624,
- 771);
+ T("該当するデータが存在しません", "Corresponding data does not exist"), "../z_std_dma.c",
+ LN3(621, 624, 641, 771));
return;
} else {
// ROM is uncompressed, allow arbitrary DMA even if the region is not marked in the filesystem
- DmaMgr_DmaRomToRam(vrom, ram, size);
+ romStart = vrom;
+ DmaMgr_DmaRomToRam(romStart, ram, size);
if (0) {
PRINTF(T("No Press ROM:%08X RAM:%08X SIZE:%08X (非公式)\n",
@@ -536,14 +554,16 @@ s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size,
OSMesg msg) {
static s32 sDmaMgrQueueFullLogged = 0;
-#if OOT_DEBUG
+#if PLATFORM_IQUE
+ PRINTF("dmacopy_bg(%x, %x, %x, %x, %x, %x, %x)\n", req, ram, vrom, size, unk, queue, msg);
+#endif
+
+#if DEBUG_FEATURES
if ((ram == NULL) || (osMemSize < OS_K0_TO_PHYSICAL(ram) + size) || (vrom & 1) || (vrom > 0x4000000) ||
(size == 0) || (size & 1)) {
- // The line numbers for `DMA_ERROR` are only used in retail builds, but this usage was removed so
- // its line number is unknown.
//! @bug `req` is passed to `DMA_ERROR` without rom, ram and size being set
DMA_ERROR(req, NULL, "ILLIGAL DMA-FUNCTION CALL", T("パラメータ異常です", "Parameter error"), "../z_std_dma.c",
- 0, 0);
+ UNK_LINE);
}
#endif
@@ -562,16 +582,16 @@ s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size,
req->notifyQueue = queue;
req->notifyMsg = msg;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (1 && (sDmaMgrQueueFullLogged == 0) && MQ_IS_FULL(&sDmaMgrMsgQueue)) {
sDmaMgrQueueFullLogged++;
PRINTF("%c", BEL);
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("dmaEntryMsgQが一杯です。キューサイズの再検討をおすすめします。",
"dmaEntryMsgQ is full. Reconsider your queue size."));
LOG_NUM("(sizeof(dmaEntryMsgBufs) / sizeof(dmaEntryMsgBufs[0]))", ARRAY_COUNT(sDmaMgrMsgBuf), "../z_std_dma.c",
952);
- PRINTF(VT_RST);
+ PRINTF_RST();
}
#endif
@@ -612,9 +632,10 @@ void DmaMgr_Init(void) {
// DMA the dma data table to RAM
DmaMgr_DmaRomToRam((uintptr_t)_dmadataSegmentRomStart, _dmadataSegmentStart,
(u32)(_dmadataSegmentRomEnd - _dmadataSegmentRomStart));
+
+#if DEBUG_FEATURES
PRINTF("dma_rom_ad[]\n");
-#if OOT_DEBUG
name = sDmaMgrFileNames;
iter = gDmaDataTable;
idx = 0;
@@ -645,11 +666,7 @@ void DmaMgr_Init(void) {
PRINTF("_bootSegmentRomStart(%08x) != dma_rom_ad[0].rom_b(%08x)\n", _bootSegmentRomStart,
gDmaDataTable[0].file.vromEnd);
//! @bug The main code file where fault.c resides is not yet loaded
-#if PLATFORM_N64
- Fault_AddHungupAndCrash("../z_std_dma.c", 840);
-#else
- Fault_AddHungupAndCrash("../z_std_dma.c", 1055);
-#endif
+ Fault_AddHungupAndCrash("../z_std_dma.c", LN3(837, 840, 859, 1055));
}
// Start the DMA manager
@@ -660,7 +677,7 @@ void DmaMgr_Init(void) {
osStartThread(&sDmaMgrThread);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
/**
* Asynchronous DMA Request with source file and line info for debugging.
*
diff --git a/src/buffers/audio_heap.c b/src/buffers/audio_heap.c
index b6474ccc6a..b8e0e336e7 100644
--- a/src/buffers/audio_heap.c
+++ b/src/buffers/audio_heap.c
@@ -1,3 +1,5 @@
-#include "z64.h"
+#include "ultra64/ultratypes.h"
+#include "alignment.h"
+#include "buffers.h"
ALIGNED(16) u8 gAudioHeap[0x38000];
diff --git a/src/buffers/gfxbuffers.c b/src/buffers/gfxbuffers.c
index fa466bc829..1806570ae4 100644
--- a/src/buffers/gfxbuffers.c
+++ b/src/buffers/gfxbuffers.c
@@ -1,4 +1,7 @@
-#include "z64.h"
+#include "alignment.h"
+#include "buffers.h"
+#include "gfx.h"
+#include "ultra64.h"
ALIGNED(16) u64 gGfxSPTaskOutputBuffer[0x3000];
diff --git a/src/buffers/zbuffer.c b/src/buffers/zbuffer.c
index d9e5d2784a..69c445b633 100644
--- a/src/buffers/zbuffer.c
+++ b/src/buffers/zbuffer.c
@@ -1,3 +1,5 @@
-#include "z64.h"
+#include "alignment.h"
+#include "buffers.h"
+#include "ultra64/ultratypes.h"
ALIGNED(64) u16 gZBuffer[SCREEN_HEIGHT][SCREEN_WIDTH];
diff --git a/src/code/PreRender.c b/src/code/PreRender.c
index 441dddade5..ddf6b473ea 100644
--- a/src/code/PreRender.c
+++ b/src/code/PreRender.c
@@ -5,8 +5,13 @@
* buffer copies and coverage drawing. Also contains software implementations of the Video Interface anti-aliasing and
* divot filters.
*/
-#include "global.h"
+#include "libu64/debug.h"
#include "alloca.h"
+#include "color.h"
+#include "gfx.h"
+#include "prerender.h"
+#include "printf.h"
+#include "regs.h"
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg) {
this->widthSave = width;
@@ -522,11 +527,11 @@ void PreRender_CopyImageRegion(PreRender* this, Gfx** gfxP) {
* This filter performs a linear interpolation on partially covered pixels between the current pixel color (called
* foreground color) and a "background" pixel color obtained by sampling fully covered pixels at the six highlighted
* points in the following 5x3 neighborhood:
- * _ _ _ _ _
+ * - - - - -
* | o o |
* | o X o |
* | o o |
- * ‾ ‾ ‾ ‾ ‾
+ * - - - - -
* Whether a pixel is partially covered is determined by reading the coverage values associated with the image.
* Coverage is a measure of how many subpixels the last drawn primitive covered. A fully covered pixel is one with a
* full coverage value, the entire pixel was covered by the primitive.
@@ -598,7 +603,7 @@ void PreRender_AntiAliasFilter(PreRender* this, s32 x, s32 y) {
buffCvg[i] = this->cvgSave[xi + yi * this->width] >> 5;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (buffCvg[7] == 7) {
PRINTF("Error, should not be in here \n");
return;
@@ -693,7 +698,7 @@ void PreRender_AntiAliasFilter(PreRender* this, s32 x, s32 y) {
(((a2) >= (a1)) ? (((a3) >= (a2)) ? (a2) : (((a1) >= (a3)) ? (a1) : (a3))) \
: (((a2) >= (a3)) ? (a2) : (((a3) >= (a1)) ? (a1) : (a3))))
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define R_HREG_MODE_DEBUG R_HREG_MODE
#else
#define R_HREG_MODE_DEBUG ((void)0, 0)
diff --git a/src/code/TwoHeadArena.c b/src/code/TwoHeadArena.c
index 271c2ae7ff..23ef69a910 100644
--- a/src/code/TwoHeadArena.c
+++ b/src/code/TwoHeadArena.c
@@ -9,7 +9,8 @@
* is to reset the entire arena, deallocating everything. This scheme is most applicable to allocating similar data
* with identical lifetime.
*/
-#include "global.h"
+#include "tha.h"
+#include "alignment.h"
void* THA_GetHead(TwoHeadArena* tha) {
return tha->head;
diff --git a/src/code/TwoHeadGfxArena.c b/src/code/TwoHeadGfxArena.c
index ce7b8a45fb..c3f2216fad 100644
--- a/src/code/TwoHeadGfxArena.c
+++ b/src/code/TwoHeadGfxArena.c
@@ -8,7 +8,7 @@
*
* @see TwoHeadArena.c
*/
-#include "global.h"
+#include "thga.h"
void THGA_Init(TwoHeadGfxArena* thga, void* start, size_t size) {
THA_Init(&thga->tha, start, size);
diff --git a/src/code/audio_stop_all_sfx.c b/src/code/audio_stop_all_sfx.c
index ef84cd6fff..b1b526e8ec 100644
--- a/src/code/audio_stop_all_sfx.c
+++ b/src/code/audio_stop_all_sfx.c
@@ -1,4 +1,6 @@
-#include "global.h"
+#include "array_count.h"
+#include "sfx.h"
+#include "ultra64.h"
u8 sSfxBankIds[] = {
BANK_PLAYER, BANK_ITEM, BANK_ENV, BANK_ENEMY, BANK_SYSTEM, BANK_OCARINA, BANK_VOICE,
diff --git a/src/code/audio_thread_manager.c b/src/code/audio_thread_manager.c
index 1dc72642f3..57f530a4b8 100644
--- a/src/code/audio_thread_manager.c
+++ b/src/code/audio_thread_manager.c
@@ -5,7 +5,13 @@
* and sending the audio rsp tasks generated by the driver to the task scheduler.
*/
-#include "global.h"
+#include "array_count.h"
+#include "audiomgr.h"
+#include "printf.h"
+#include "regs.h"
+#include "speed_meter.h"
+#include "translation.h"
+#include "z64dma.h"
void AudioMgr_NotifyTaskDone(AudioMgr* audioMgr) {
AudioTask* task = audioMgr->rspTask;
diff --git a/src/code/code_800D31A0.c b/src/code/code_800D31A0.c
deleted file mode 100644
index b4e0495e13..0000000000
--- a/src/code/code_800D31A0.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "global.h"
-#include "terminal.h"
-
-#if OOT_DEBUG
-u32 gIsCtrlr2Valid = false;
-#endif
-
-NORETURN void func_800D31A0(void) {
- PRINTF(VT_FGCOL(RED) "\n**** Freeze!! ****\n" VT_RST);
- for (;;) {
- Sleep_Msec(1000);
- }
-}
-
-#if OOT_DEBUG
-void func_800D31F0(void) {
- gIsCtrlr2Valid = (gPadMgr.validCtrlrsMask & 2) != 0;
-}
-
-void func_800D3210(void) {
- gIsCtrlr2Valid = false;
-}
-#endif
diff --git a/src/code/code_n64dd_800AD410.c b/src/code/code_n64dd_800AD410.c
index 66dcc3cc76..979a95afbb 100644
--- a/src/code/code_n64dd_800AD410.c
+++ b/src/code/code_n64dd_800AD410.c
@@ -11,8 +11,8 @@ vu8 D_80121214;
void func_800AD410(void) {
if (!D_80121210) {
- DmaMgr_RequestSync(_n64ddSegmentStart, (uintptr_t)_n64ddSegmentRomStart,
- _n64ddSegmentRomEnd - _n64ddSegmentRomStart);
+ DMA_REQUEST_SYNC(_n64ddSegmentStart, (uintptr_t)_n64ddSegmentRomStart,
+ _n64ddSegmentRomEnd - _n64ddSegmentRomStart, UNK_FILE, UNK_LINE);
bzero(_n64ddSegmentBssStart, _n64ddSegmentBssEnd - _n64ddSegmentBssStart);
D_80121210 = true;
D_80121211 = func_801C6E80();
diff --git a/src/code/code_n64dd_800AD4C0.c b/src/code/code_n64dd_800AD4C0.c
index 3f1488c66e..4c4e0db0e3 100644
--- a/src/code/code_n64dd_800AD4C0.c
+++ b/src/code/code_n64dd_800AD4C0.c
@@ -1,6 +1,10 @@
-#include "global.h"
#include "fault.h"
#include "n64dd.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "z64actor.h"
+#include "z64cutscene.h"
+#include "z64save.h"
n64ddStruct_800FEE70_pointers D_800FEE70 = {
func_801C7C1C,
diff --git a/src/code/db_camera.c b/src/code/db_camera.c
index 242609295d..a275cae523 100644
--- a/src/code/db_camera.c
+++ b/src/code/db_camera.c
@@ -1,4 +1,23 @@
-#include "global.h"
+#include "libu64/gfxprint.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "controller.h"
+#include "db_camera.h"
+#include "debug_arena.h"
+#include "letterbox.h"
+#include "mempak.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64camera.h"
+#include "z64cutscene.h"
+#include "z64cutscene_spline.h"
+#include "z64debug.h"
+#include "z64debug_display.h"
+#include "z64olib.h"
+#include "z64play.h"
+#include "z64save.h"
#define DEBUG_CAM_CONTROLLER_PORT 2
diff --git a/src/code/debug_malloc.c b/src/code/debug_malloc.c
index a1def050ae..ad7c786f34 100644
--- a/src/code/debug_malloc.c
+++ b/src/code/debug_malloc.c
@@ -1,5 +1,7 @@
-#include "global.h"
#include "libc64/os_malloc.h"
+#include "debug_arena.h"
+#include "printf.h"
+#include "translation.h"
#define LOG_SEVERITY_NOLOG 0
#define LOG_SEVERITY_ERROR 2
@@ -7,14 +9,16 @@
Arena sDebugArena;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 gDebugArenaLogSeverity = LOG_SEVERITY_ERROR;
void DebugArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action) {
if (ptr == NULL) {
if (gDebugArenaLogSeverity >= LOG_SEVERITY_ERROR) {
PRINTF(T("%s: %u バイトの%sに失敗しました\n", "%s: %u bytes %s failed\n"), name, size, action);
+#if PLATFORM_GC
__osDisplayArena(&sDebugArena);
+#endif
return;
}
} else if (gDebugArenaLogSeverity >= LOG_SEVERITY_VERBOSE) {
@@ -34,7 +38,7 @@ void* DebugArena_Malloc(u32 size) {
return ptr;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* DebugArena_MallocDebug(u32 size, const char* file, int line) {
void* ptr = __osMallocDebug(&sDebugArena, size, file, line);
@@ -50,7 +54,7 @@ void* DebugArena_MallocR(u32 size) {
return ptr;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* DebugArena_MallocRDebug(u32 size, const char* file, int line) {
void* ptr = __osMallocRDebug(&sDebugArena, size, file, line);
@@ -65,7 +69,7 @@ void* DebugArena_Realloc(void* ptr, u32 newSize) {
return ptr;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line) {
ptr = __osReallocDebug(&sDebugArena, ptr, newSize, file, line);
DEBUG_ARENA_CHECK_POINTER(ptr, newSize, "debug_realloc_DEBUG", "再確保"); // "Re-securing"
@@ -77,7 +81,7 @@ void DebugArena_Free(void* ptr) {
__osFree(&sDebugArena, ptr);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void DebugArena_FreeDebug(void* ptr, const char* file, int line) {
__osFreeDebug(&sDebugArena, ptr, file, line);
}
@@ -96,7 +100,7 @@ void* DebugArena_Calloc(u32 num, u32 size) {
return ret;
}
-#if OOT_DEBUG
+#if PLATFORM_GC && DEBUG_FEATURES
void DebugArena_Display(void) {
// Likely copypasted from ZeldaArena_Display, should say "Debug"
PRINTF(T("ゼルダヒープ表示\n", "Zelda heap display\n"));
@@ -113,14 +117,14 @@ void DebugArena_Check(void) {
}
void DebugArena_Init(void* start, u32 size) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
gDebugArenaLogSeverity = LOG_SEVERITY_NOLOG;
#endif
__osMallocInit(&sDebugArena, start, size);
}
void DebugArena_Cleanup(void) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
gDebugArenaLogSeverity = LOG_SEVERITY_NOLOG;
#endif
__osMallocCleanup(&sDebugArena);
diff --git a/src/code/fault_gc.c b/src/code/fault_gc.c
index 30ffc53099..b2bb9d13d4 100644
--- a/src/code/fault_gc.c
+++ b/src/code/fault_gc.c
@@ -40,16 +40,23 @@
* DPad-Up may be pressed to enable sending fault pages over osSyncPrintf as well as displaying them on-screen.
* DPad-Down disables sending fault pages over osSyncPrintf.
*/
-#if PLATFORM_GC
-#pragma increment_block_number "gc-eu:208 gc-eu-mq:208 gc-eu-mq-dbg:192 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208" \
- "gc-us-mq:208"
+#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-eu-mq-dbg:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160" \
+ "gc-us-mq:160 ique-cn:160"
-#include "global.h"
+#include "libc64/sleep.h"
+#include "libc64/sprintf.h"
#include "alloca.h"
+#include "array_count.h"
+#include "controller.h"
+#include "gfx.h"
+#include "padmgr.h"
#include "fault.h"
#include "stack.h"
+#include "stackcheck.h"
#include "terminal.h"
+#include "translation.h"
+#include "z64thread.h"
void Fault_Init(void);
void Fault_SetOsSyncPrintfEnabled(u32 enabled);
@@ -1327,9 +1334,7 @@ NORETURN void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2) {
// Since the above line triggers an exception and transfers execution to the fault handler
// this function does not return and the rest of the function is unreachable.
-#ifdef __GNUC__
- __builtin_unreachable();
-#endif
+ UNREACHABLE();
}
/**
@@ -1342,5 +1347,3 @@ NORETURN void Fault_AddHungupAndCrash(const char* file, int line) {
sprintf(msg, "HungUp %s:%d", file, line);
Fault_AddHungupAndCrashImpl(msg, NULL);
}
-
-#endif
diff --git a/src/code/fault_gc_drawer.c b/src/code/fault_gc_drawer.c
index 808b258497..9c2470b9b8 100644
--- a/src/code/fault_gc_drawer.c
+++ b/src/code/fault_gc_drawer.c
@@ -4,12 +4,13 @@
* Implements routines for drawing text with a fixed font directly to a framebuffer, used in displaying
* the crash screen implemented by fault.c
*/
-#include "global.h"
-#include "fault.h"
-#include "terminal.h"
-#pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
-#if PLATFORM_GC
+#include "array_count.h"
+#include "fault.h"
+#include "gfx.h"
+#include "terminal.h"
+
+#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
typedef struct FaultDrawer {
/* 0x00 */ u16* fb;
@@ -103,7 +104,7 @@ FaultDrawer sFaultDrawerDefault = {
NULL,
};
-#pragma increment_block_number "gc-eu:128 gc-eu-mq:128"
+#pragma increment_block_number "gc-eu:0 gc-eu-mq:0"
FaultDrawer sFaultDrawer;
char D_8016B6C0[0x20];
@@ -344,5 +345,3 @@ void Fault_InitDrawer(void) {
bcopy(&sFaultDrawerDefault, &sFaultDrawer, sizeof(FaultDrawer));
sFaultDrawer.fb = (u16*)(PHYS_TO_K0(osMemSize) - sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH]));
}
-
-#endif
diff --git a/src/code/fault_n64.c b/src/code/fault_n64.c
index 762301b562..75fc704b91 100644
--- a/src/code/fault_n64.c
+++ b/src/code/fault_n64.c
@@ -1,14 +1,19 @@
-#if PLATFORM_N64
-
-#pragma increment_block_number "ntsc-1.2:128"
-
-#include "global.h"
-#include "fault.h"
#include "libc64/os_malloc.h"
+#include "libc64/sleep.h"
+#include "libc64/sprintf.h"
+#include "array_count.h"
+#include "controller.h"
+#include "fault.h"
+#include "gfx.h"
+#include "padmgr.h"
+#include "segmented_address.h"
#include "stack.h"
+#include "stackcheck.h"
#include "terminal.h"
+#include "z64thread.h"
+#include "translation.h"
-#pragma increment_block_number "ntsc-1.2:96"
+#pragma increment_block_number "ntsc-1.0:144 ntsc-1.1:144 ntsc-1.2:144 pal-1.0:144 pal-1.1:144"
typedef struct FaultMgr {
OSThread thread;
@@ -822,7 +827,7 @@ void Fault_Init(void) {
osStartThread(&gFaultMgr.thread);
}
-void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2) {
+NORETURN void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2) {
gFaultMsgId = 4;
osSyncPrintf("HungUp on Thread %d", osGetThreadId(NULL));
osSyncPrintf("%s\n", exp1 != NULL ? exp1 : "(NULL)");
@@ -843,11 +848,9 @@ void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2) {
} while (true);
}
-void Fault_AddHungupAndCrash(const char* file, int line) {
+NORETURN void Fault_AddHungupAndCrash(const char* file, int line) {
char msg[256];
sprintf(msg, "HungUp %s:%d", file, line);
Fault_AddHungupAndCrashImpl(msg, NULL);
}
-
-#endif
diff --git a/src/code/flg_set.c b/src/code/flg_set.c
index de5b2a3d3f..88f32a3e4e 100644
--- a/src/code/flg_set.c
+++ b/src/code/flg_set.c
@@ -1,4 +1,12 @@
-#include "global.h"
+#include "flag_set.h"
+
+#include "libu64/gfxprint.h"
+#include "libu64/pad.h"
+#include "gfx.h"
+#include "gfxalloc.h"
+#include "controller.h"
+#include "z64play.h"
+#include "z64save.h"
typedef struct FlagSetEntry {
/* 0x00 */ u16* value;
diff --git a/src/code/game.c b/src/code/game.c
index 45362fb586..5b80355cbb 100644
--- a/src/code/game.c
+++ b/src/code/game.c
@@ -1,10 +1,36 @@
-#include "global.h"
-#include "fault.h"
+#include "libc64/malloc.h"
#include "libc64/os_malloc.h"
-#include "terminal.h"
+#include "libu64/debug.h"
+#include "libu64/gfxprint.h"
+#include "array_count.h"
+#include "audiomgr.h"
+#include "buffers.h"
+#include "controller.h"
+#include "debug_arena.h"
+#include "gfx.h"
+#include "gfxalloc.h"
+#include "fault.h"
+#include "idle.h"
+#include "line_numbers.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "padmgr.h"
+#include "printf.h"
+#include "regs.h"
+#include "rumble.h"
+#include "speed_meter.h"
+#include "sys_debug_controller.h"
+#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "vi_mode.h"
+#include "zelda_arena.h"
+#include "z64debug.h"
+#include "z64dma.h"
+#include "z64game.h"
+#include "z64play.h"
+#include "z64vis.h"
#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"
@@ -14,7 +40,7 @@ VisZBuf sVisZBuf;
VisMono sVisMono;
ViMode sViMode;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
FaultClient sGameFaultClient;
u16 sLastButtonPressed;
@@ -72,18 +98,16 @@ void GameState_SetFBFilter(Gfx** gfxP) {
}
void func_800C4344(GameState* gameState) {
-#if PLATFORM_N64
- if (D_80121212 != 0) {
- func_801C7E78();
- }
-#elif OOT_DEBUG
+#if DEBUG_FEATURES
Input* selectedInput;
s32 hexDumpSize;
u16 inputCompareValue;
+#if PLATFORM_GC
if (R_HREG_MODE == HREG_MODE_HEAP_FREE_BLOCK_TEST) {
__osMalloc_FreeBlockTest_Enable = R_HEAP_FREE_BLOCK_TEST_TOGGLE;
}
+#endif
if (R_HREG_MODE == HREG_MODE_INPUT_TEST) {
selectedInput =
@@ -127,9 +151,15 @@ void func_800C4344(GameState* gameState) {
}
}
#endif
+
+#if PLATFORM_N64
+ if (D_80121212 != 0) {
+ func_801C7E78();
+ }
+#endif
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void GameState_DrawInputDisplay(u16 input, Gfx** gfxP) {
static const u16 sInpDispBtnColors[] = {
GPACK_RGBA5551(255, 255, 0, 1), GPACK_RGBA5551(255, 255, 0, 1), GPACK_RGBA5551(255, 255, 0, 1),
@@ -175,7 +205,7 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
GameState_SetFBFilter(&newDList);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
sLastButtonPressed = gameState->input[0].press.button | gameState->input[0].cur.button;
if (R_DISABLE_INPUT_DISPLAY == 0) {
GameState_DrawInputDisplay(sLastButtonPressed, &newDList);
@@ -194,14 +224,14 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
#endif
if (R_ENABLE_ARENA_DBG < 0) {
-#if OOT_DEBUG
+#if PLATFORM_GC && DEBUG_FEATURES
s32 pad;
DebugArena_Display();
SystemArena_Display();
+#endif
PRINTF(T("ハイラル滅亡まであと %08x バイト(game_alloc)\n",
"%08x bytes left until Hyrule is destroyed (game_alloc)\n"),
THA_GetRemaining(&gameState->tha));
-#endif
R_ENABLE_ARENA_DBG = 0;
}
@@ -281,7 +311,15 @@ void GameState_Update(GameState* gameState) {
func_800C4344(gameState);
-#if OOT_DEBUG
+#if OOT_VERSION < PAL_1_0
+ if (R_VI_MODE_EDIT_STATE != VI_MODE_EDIT_STATE_INACTIVE) {
+ ViMode_Update(&sViMode, &gameState->input[0]);
+ gfxCtx->viMode = &sViMode.customViMode;
+ gfxCtx->viFeatures = sViMode.viFeatures;
+ }
+#endif
+
+#if OOT_VERSION >= PAL_1_0 && DEBUG_FEATURES
if (SREG(63) == 1u) {
if (R_VI_MODE_EDIT_STATE < VI_MODE_EDIT_STATE_INACTIVE) {
R_VI_MODE_EDIT_STATE = VI_MODE_EDIT_STATE_INACTIVE;
@@ -377,11 +415,7 @@ void GameState_InitArena(GameState* gameState, size_t size) {
} else {
THA_Init(&gameState->tha, NULL, 0);
PRINTF(T("ハイラル確保失敗\n", "Failure to secure Hyrule\n"));
-#if PLATFORM_N64
- HUNGUP_AND_CRASH("../game.c", 985);
-#else
- HUNGUP_AND_CRASH("../game.c", 999);
-#endif
+ HUNGUP_AND_CRASH("../game.c", LN4(895, 898, 985, 999, 999));
}
}
@@ -399,12 +433,12 @@ void GameState_Realloc(GameState* gameState, size_t size) {
SystemArena_GetSizes(&systemMaxFree, &systemFree, &systemAlloc);
if ((systemMaxFree - 0x10) < size) {
PRINTF("%c", BEL);
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("メモリが足りません。ハイラルサイズを可能な最大値に変更します\n",
"Not enough memory. Change Hyrule size to maximum possible value\n"));
PRINTF("(hyral=%08x max=%08x free=%08x alloc=%08x)\n", size, systemMaxFree, systemFree, systemAlloc);
- PRINTF(VT_RST);
+ PRINTF_RST();
size = systemMaxFree - 0x10;
}
@@ -418,21 +452,17 @@ void GameState_Realloc(GameState* gameState, size_t size) {
THA_Init(&gameState->tha, NULL, 0);
PRINTF(T("ハイラル再確保失敗\n", "Failure to secure Hyrule\n"));
-#if OOT_DEBUG
+#if PLATFORM_GC && DEBUG_FEATURES
SystemArena_Display();
#endif
-#if PLATFORM_N64
- HUNGUP_AND_CRASH("../game.c", 1030);
-#else
- HUNGUP_AND_CRASH("../game.c", 1044);
-#endif
+ HUNGUP_AND_CRASH("../game.c", LN4(940, 943, 1030, 1044, 1044));
}
}
void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx) {
- OSTime startTime;
- OSTime endTime;
+ UNUSED_NDEBUG OSTime startTime;
+ UNUSED_NDEBUG OSTime endTime;
PRINTF(T("game コンストラクタ開始\n", "game constructor start\n"));
gameState->gfxCtx = gfxCtx;
@@ -442,7 +472,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
gameState->running = 1;
startTime = osGetTime();
- // Thse assignments must be written this way for matching and to avoid a warning due to casting a pointer to an
+ // These assignments must be written this way for matching and to avoid a warning due to casting a pointer to an
// integer without a cast. This assigns init = NULL and size = 0.
gameState->size = (u32)(gameState->init = NULL);
@@ -471,7 +501,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
VisCvg_Init(&sVisCvg);
VisZBuf_Init(&sVisZBuf);
VisMono_Init(&sVisMono);
- if ((R_VI_MODE_EDIT_STATE == VI_MODE_EDIT_STATE_INACTIVE) || !OOT_DEBUG) {
+ if ((R_VI_MODE_EDIT_STATE == VI_MODE_EDIT_STATE_INACTIVE) || !DEBUG_FEATURES) {
ViMode_Init(&sViMode);
}
SpeedMeter_Init(&D_801664D0);
@@ -481,7 +511,7 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
PRINTF(T("その他初期化 処理時間 %d us\n", "Other initialization processing time %d us\n"),
OS_CYCLES_TO_USEC(endTime - startTime));
-#if OOT_DEBUG
+#if DEBUG_FEATURES
Fault_AddClient(&sGameFaultClient, GameState_FaultPrint, NULL, NULL);
#endif
@@ -502,14 +532,17 @@ void GameState_Destroy(GameState* gameState) {
VisCvg_Destroy(&sVisCvg);
VisZBuf_Destroy(&sVisZBuf);
VisMono_Destroy(&sVisMono);
- if ((R_VI_MODE_EDIT_STATE == VI_MODE_EDIT_STATE_INACTIVE) || !OOT_DEBUG) {
+ if ((R_VI_MODE_EDIT_STATE == VI_MODE_EDIT_STATE_INACTIVE) || !DEBUG_FEATURES) {
ViMode_Destroy(&sViMode);
}
THA_Destroy(&gameState->tha);
GameAlloc_Cleanup(&gameState->alloc);
-#if OOT_DEBUG
+#if PLATFORM_GC && DEBUG_FEATURES
SystemArena_Display();
+#endif
+
+#if DEBUG_FEATURES
Fault_RemoveClient(&sGameFaultClient);
#endif
@@ -528,7 +561,7 @@ u32 GameState_IsRunning(GameState* gameState) {
return gameState->running;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* GameState_Alloc(GameState* gameState, size_t size, const char* file, int line) {
void* ret;
@@ -548,9 +581,9 @@ void* GameState_Alloc(GameState* gameState, size_t size, const char* file, int l
}
}
if (ret != NULL) {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("game_alloc(%08x) %08x-%08x [%s:%d]\n", size, ret, (uintptr_t)ret + size, file, line);
- PRINTF(VT_RST);
+ PRINTF_RST();
}
return ret;
}
diff --git a/src/code/gamealloc.c b/src/code/gamealloc.c
index b80ece7b26..506ef7721e 100644
--- a/src/code/gamealloc.c
+++ b/src/code/gamealloc.c
@@ -1,4 +1,7 @@
-#include "global.h"
+#include "libc64/malloc.h"
+#include "libu64/debug.h"
+#include "gamealloc.h"
+#include "printf.h"
void GameAlloc_Log(GameAlloc* this) {
GameAllocEntry* iter;
@@ -12,7 +15,7 @@ void GameAlloc_Log(GameAlloc* this) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* GameAlloc_MallocDebug(GameAlloc* this, u32 size, const char* file, int line) {
GameAllocEntry* ptr = SystemArena_MallocDebug(size + sizeof(GameAllocEntry), file, line);
diff --git a/src/code/gfxalloc.c b/src/code/gfxalloc.c
index 79d8bb04e5..3b4d72f057 100644
--- a/src/code/gfxalloc.c
+++ b/src/code/gfxalloc.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "gfxalloc.h"
+#include "alignment.h"
Gfx* Gfx_Open(Gfx* gfx) {
return gfx + 1;
diff --git a/src/code/graph.c b/src/code/graph.c
index 7c562f160b..86543cc50d 100644
--- a/src/code/graph.c
+++ b/src/code/graph.c
@@ -1,12 +1,40 @@
-#include "global.h"
+#include "libc64/malloc.h"
+#include "libc64/sprintf.h"
+#include "libu64/debug.h"
+#include "array_count.h"
+#include "buffers.h"
+#include "console_logo_state.h"
+#include "controller.h"
+#include "gfx.h"
#include "fault.h"
+#include "file_select_state.h"
+#include "line_numbers.h"
+#include "map_select_state.h"
+#include "prenmi_buff.h"
+#include "prenmi_state.h"
+#include "printf.h"
+#include "regs.h"
+#include "setup_state.h"
+#include "speed_meter.h"
+#include "sys_cfb.h"
+#include "sys_debug_controller.h"
+#include "sys_ucode.h"
#include "terminal.h"
+#include "title_setup_state.h"
+#include "translation.h"
+#include "ucode_disas.h"
+#include "versions.h"
+#include "vi_mode.h"
+#include "z_game_dlftbls.h"
+#include "z64audio.h"
+#include "z64save.h"
+#include "z64play.h"
#define GFXPOOL_HEAD_MAGIC 0x1234
#define GFXPOOL_TAIL_MAGIC 0x5678
-#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:223"
+#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 ique-cn:128" \
+ "ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:224 pal-1.1:224"
/**
* The time at which the previous `Graph_Update` ended.
@@ -18,19 +46,19 @@ OSTime sGraphPrevUpdateEndTime;
*/
OSTime sGraphPrevTaskTimeStart;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
FaultClient sGraphFaultClient;
UCodeInfo D_8012D230[3] = {
- { UCODE_F3DZEX, gspF3DZEX2_NoN_PosLight_fifoTextStart },
- { UCODE_UNK, NULL },
- { UCODE_S2DEX, gspS2DEX2d_fifoTextStart },
+ { UCODE_TYPE_F3DZEX, gspF3DZEX2_NoN_PosLight_fifoTextStart },
+ { UCODE_TYPE_UNK, NULL },
+ { UCODE_TYPE_S2DEX, gspS2DEX2d_fifoTextStart },
};
UCodeInfo D_8012D248[3] = {
- { UCODE_F3DZEX, gspF3DZEX2_NoN_PosLight_fifoTextStart },
- { UCODE_UNK, NULL },
- { UCODE_S2DEX, gspS2DEX2d_fifoTextStart },
+ { UCODE_TYPE_F3DZEX, gspF3DZEX2_NoN_PosLight_fifoTextStart },
+ { UCODE_TYPE_UNK, NULL },
+ { UCODE_TYPE_S2DEX, gspS2DEX2d_fifoTextStart },
};
void Graph_FaultClient(void) {
@@ -139,25 +167,32 @@ void Graph_Init(GraphicsContext* gfxCtx) {
gfxCtx->gfxPoolIdx = 0;
gfxCtx->fbIdx = 0;
gfxCtx->viMode = NULL;
+
+#if OOT_VERSION < PAL_1_0
+ gfxCtx->viFeatures = 0;
+#else
gfxCtx->viFeatures = gViConfigFeatures;
gfxCtx->xScale = gViConfigXScale;
gfxCtx->yScale = gViConfigYScale;
+#endif
+
osCreateMesgQueue(&gfxCtx->queue, gfxCtx->msgBuff, ARRAY_COUNT(gfxCtx->msgBuff));
-#if OOT_DEBUG
+
+#if DEBUG_FEATURES
func_800D31F0();
Fault_AddClient(&sGraphFaultClient, Graph_FaultClient, NULL, NULL);
#endif
}
void Graph_Destroy(GraphicsContext* gfxCtx) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_800D3210();
Fault_RemoveClient(&sGraphFaultClient);
#endif
}
void Graph_TaskSet00(GraphicsContext* gfxCtx) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static Gfx* sPrevTaskWorkBuffer = NULL;
#endif
OSTask_t* task = &gfxCtx->task.list.t;
@@ -177,10 +212,10 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
osStopTimer(&timer);
if (msg == (OSMesg)666) {
-#if OOT_DEBUG
- PRINTF(VT_FGCOL(RED));
+#if DEBUG_FEATURES
+ PRINTF_COLOR_RED();
PRINTF(T("RCPが帰ってきませんでした。", "RCP did not return."));
- PRINTF(VT_RST);
+ PRINTF_RST();
LogUtils_LogHexDump((void*)PHYS_TO_K1(SP_BASE_REG), 0x20);
LogUtils_LogHexDump((void*)PHYS_TO_K1(DPC_BASE_REG), 0x20);
@@ -200,7 +235,7 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
osRecvMesg(&gfxCtx->queue, &msg, OS_MESG_NOBLOCK);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
sPrevTaskWorkBuffer = gfxCtx->workBuffer;
#endif
}
@@ -271,8 +306,10 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
cfb->viMode = gfxCtx->viMode;
cfb->viFeatures = gfxCtx->viFeatures;
+#if OOT_VERSION >= PAL_1_0
cfb->xScale = gfxCtx->xScale;
cfb->yScale = gfxCtx->yScale;
+#endif
cfb->unk_10 = 0;
cfb->updateRate = R_UPDATE_RATE;
@@ -291,7 +328,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
gameState->inPreNMIState = false;
Graph_InitTHGA(gfxCtx);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
OPEN_DISPS(gfxCtx, "../graph.c", 966);
gDPNoOpString(WORK_DISP++, "WORK_DISP 開始", 0);
@@ -305,7 +342,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
GameState_ReqPadData(gameState);
GameState_Update(gameState);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
OPEN_DISPS(gfxCtx, "../graph.c", 987);
gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0);
@@ -327,7 +364,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
CLOSE_DISPS(gfxCtx, "../graph.c", 1028);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (R_HREG_MODE == HREG_MODE_PLAY && R_PLAY_ENABLE_UCODE_DISAS == 2) {
R_HREG_MODE = HREG_MODE_UCODE_DISAS;
R_UCODE_DISAS_TOGGLE = -1;
@@ -368,22 +405,15 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
PRINTF("%c", BEL);
PRINTF(VT_COL(RED, WHITE) T("ダイナミック領域先頭が破壊されています\n", "Dynamic area head is destroyed\n")
VT_RST);
-#if PLATFORM_N64
- Fault_AddHungupAndCrash("../graph.c", 951);
-#else
- Fault_AddHungupAndCrash("../graph.c", 1070);
-#endif
+ Fault_AddHungupAndCrash("../graph.c", LN4(937, 940, 951, 1067, 1070));
}
+
if (pool->tailMagic != GFXPOOL_TAIL_MAGIC) {
problem = true;
PRINTF("%c", BEL);
PRINTF(VT_COL(RED, WHITE)
T("ダイナミック領域末尾が破壊されています\n", "Dynamic region tail is destroyed\n") VT_RST);
-#if PLATFORM_N64
- Fault_AddHungupAndCrash("../graph.c", 957);
-#else
- Fault_AddHungupAndCrash("../graph.c", 1076);
-#endif
+ Fault_AddHungupAndCrash("../graph.c", LN4(943, 946, 957, 1073, 1076));
}
}
@@ -431,7 +461,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
sGraphPrevUpdateEndTime = timeNow;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (gIsCtrlr2Valid && CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) &&
CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) {
gSaveContext.gameMode = GAMEMODE_NORMAL;
@@ -468,17 +498,15 @@ void Graph_ThreadEntry(void* arg0) {
gameState = SYSTEM_ARENA_MALLOC(size, "../graph.c", 1196);
if (gameState == NULL) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
char faultMsg[0x50];
PRINTF(T("確保失敗\n", "Failure to secure\n"));
sprintf(faultMsg, "CLASS SIZE= %d bytes", size);
Fault_AddHungupAndCrashImpl("GAME CLASS MALLOC FAILED", faultMsg);
-#elif PLATFORM_N64
- Fault_AddHungupAndCrash("../graph.c", 1081);
#else
- Fault_AddHungupAndCrash("../graph.c", 1200);
+ Fault_AddHungupAndCrash("../graph.c", LN4(1067, 1070, 1081, 1197, 1200));
#endif
}
@@ -517,7 +545,7 @@ void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size) {
return THGA_AllocTail(&gfxCtx->polyOpa, ALIGN16(size));
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void Graph_OpenDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, int line) {
if (R_HREG_MODE == HREG_MODE_UCODE_DISAS && R_UCODE_DISAS_LOG_MODE != 4) {
dispRefs[0] = gfxCtx->polyOpa.p;
diff --git a/src/code/irqmgr.c b/src/code/irqmgr.c
index d623ddad88..ced883f7a0 100644
--- a/src/code/irqmgr.c
+++ b/src/code/irqmgr.c
@@ -32,8 +32,15 @@
*
* @see sched.c
*/
-#include "global.h"
+#include "libu64/debug.h"
+#include "array_count.h"
+#include "irqmgr.h"
+#include "printf.h"
+#include "stackcheck.h"
#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z64thread.h"
vu32 gIrqMgrResetStatus = IRQ_RESET_STATUS_IDLE;
volatile OSTime sIrqMgrResetTime = 0;
@@ -43,9 +50,13 @@ u32 sIrqMgrRetraceCount = 0;
// Internal messages
#define IRQ_RETRACE_MSG 666
#define IRQ_PRENMI_MSG 669
+#if OOT_VERSION < PAL_1_0
+#define IRQ_PRENMI500_MSG 670
+#else
#define IRQ_PRENMI450_MSG 671
#define IRQ_PRENMI480_MSG 672
#define IRQ_PRENMI500_MSG 673
+#endif
/**
* Registers a client and an associated message queue with the IRQ manager. When an
@@ -163,8 +174,13 @@ void IrqMgr_HandlePreNMI(IrqMgr* irqMgr) {
irqMgr->resetStatus = IRQ_RESET_STATUS_PRENMI;
sIrqMgrResetTime = irqMgr->resetTime = osGetTime();
+#if OOT_VERSION < PAL_1_0
+ // Schedule a PRENMI500 message to be handled in 500ms
+ osSetTimer(&irqMgr->timer, OS_USEC_TO_CYCLES(500000), 0, &irqMgr->queue, (OSMesg)IRQ_PRENMI500_MSG);
+#else
// Schedule a PRENMI450 message to be handled in 450ms
osSetTimer(&irqMgr->timer, OS_USEC_TO_CYCLES(450000), 0, &irqMgr->queue, (OSMesg)IRQ_PRENMI450_MSG);
+#endif
IrqMgr_JamMesgToClients(irqMgr, (OSMesg)&irqMgr->prenmiMsg);
}
@@ -175,14 +191,35 @@ void IrqMgr_CheckStacks(void) {
PRINTF(T("スタックは大丈夫みたいです\n", "The stack looks ok\n"));
} else {
PRINTF("%c", BEL);
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("スタックがオーバーフローしたか危険な状態です\n", "Stack overflow or dangerous\n"));
PRINTF(T("早々にスタックサイズを増やすか、スタックを消費しないようにしてください\n",
"Increase stack size early or don't consume stack\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
}
}
+#if OOT_VERSION < PAL_1_0
+
+void IrqMgr_HandlePreNMI500(IrqMgr* irqMgr) {
+ u64 nmi = IRQ_RESET_STATUS_NMI; // required to match
+ u32 result;
+
+ gIrqMgrResetStatus = nmi;
+ irqMgr->resetStatus = IRQ_RESET_STATUS_NMI;
+
+ IrqMgr_SendMesgToClients(irqMgr, (OSMesg)&irqMgr->nmiMsg);
+
+ result = osAfterPreNMI();
+ if (result != 0) {
+ // Schedule another PRENMI500 message to be handled in 1ms
+ osSetTimer(&irqMgr->timer, OS_USEC_TO_CYCLES(1000), 0, &irqMgr->queue, (OSMesg)IRQ_PRENMI500_MSG);
+ }
+ IrqMgr_CheckStacks();
+}
+
+#else
+
void IrqMgr_HandlePreNMI450(IrqMgr* irqMgr) {
u64 nmi = IRQ_RESET_STATUS_NMI; // required to match
@@ -215,6 +252,8 @@ void IrqMgr_HandlePreNMI500(IrqMgr* irqMgr) {
IrqMgr_CheckStacks();
}
+#endif
+
/**
* Runs on each vertical retrace
*
@@ -244,6 +283,11 @@ void IrqMgr_ThreadEntry(void* arg) {
while (!exit) {
osRecvMesg(&irqMgr->queue, (OSMesg*)&msg, OS_MESG_BLOCK);
switch (msg) {
+#if OOT_VERSION < PAL_1_0
+ default:
+ break;
+#endif
+
case IRQ_RETRACE_MSG:
IrqMgr_HandleRetrace(irqMgr);
break;
@@ -254,6 +298,7 @@ void IrqMgr_ThreadEntry(void* arg) {
IrqMgr_HandlePreNMI(irqMgr);
break;
+#if OOT_VERSION >= PAL_1_0
case IRQ_PRENMI450_MSG:
PRINTF("PRENMI450_MSG\n");
PRINTF(T("スケジューラ:PRENMI450メッセージを受信\n", "Scheduler: Receives PRENMI450 message\n"));
@@ -265,6 +310,7 @@ void IrqMgr_ThreadEntry(void* arg) {
PRINTF(T("スケジューラ:PRENMI480メッセージを受信\n", "Scheduler: Receives PRENMI480 message\n"));
IrqMgr_HandlePreNMI480(irqMgr);
break;
+#endif
case IRQ_PRENMI500_MSG:
PRINTF("PRENMI500_MSG\n");
@@ -273,11 +319,13 @@ void IrqMgr_ThreadEntry(void* arg) {
exit = true;
break;
+#if OOT_VERSION >= PAL_1_0
default:
PRINTF(T("irqmgr.c:予期しないメッセージを受け取りました(%08x)\n",
"irqmgr.c: Unexpected message received (%08x)\n"),
msg);
break;
+#endif
}
}
diff --git a/src/code/jpegdecoder.c b/src/code/jpegdecoder.c
index a29752511c..338c6b15d9 100644
--- a/src/code/jpegdecoder.c
+++ b/src/code/jpegdecoder.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "jpeg.h"
s32 JpegDecoder_ProcessMcu(JpegHuffmanTable* hTable0, JpegHuffmanTable* hTable1, u16* mcu, s16* unk);
s32 JpegDecoder_ParseNextSymbol(JpegHuffmanTable* hTable, s16* outCoeff, s8* outZeroCount);
diff --git a/src/code/jpegutils.c b/src/code/jpegutils.c
index 00c0406096..7f5442fd9b 100644
--- a/src/code/jpegutils.c
+++ b/src/code/jpegutils.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "jpeg.h"
void JpegUtils_ProcessQuantizationTable(u8* dqt, JpegQuantizationTable* qt, u8 count) {
u8 i;
diff --git a/src/code/kanread.s b/src/code/kanread.s
index a163f9ead7..fdf69ed9be 100644
--- a/src/code/kanread.s
+++ b/src/code/kanread.s
@@ -1,11 +1,7 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
/**
* s32 Kanji_OffsetFromShiftJIS(s32 sjis);
@@ -26,64 +22,57 @@
* @remark Almost identical to "LeoGetKadr" from libleo.
*/
LEAF(Kanji_OffsetFromShiftJIS)
- // Characters with codepoints >= 0x8800 are kanji. Arrangement is regular,
- // so convert index directly.
- li $at, 0x8800
- slt $at, $a0, $at
- bnez $at, .nonkanji
- // 0xBC is number of glyphs in one block in the `kanji` file:
- // 0x100 possible codepoints with the same byte1
- // - 0x40 unused at beginning
- // - 1 unused at 0x7F
- // - 3 unused at 0xFD, 0xFE, 0xFF
- li $a2, 0xBC
- // Get byte1 and adjust so starts at 0
- srl $a1, $a0, 8
- addi $a1, $a1, -0x88
- multu $a2, $a1
- // Get byte2 and adjust so starts at 0
- andi $a3, $a0, 0xFF
- addi $a3, $a3, -0x40
- slti $at, $a3, (0x80 - 0x40)
- mflo $a2
- // 0x__7F is always empty and elided in the file, so decrement if larger
- bnezl $at, .kanji_lower_halfblock
- mflo $a2
- addi $a3, $a3, -1
- mflo $a2
-.kanji_lower_halfblock:
- addi $a3, $a3, 0x30A
- add $a3, $a3, $a2
- jr $ra
- sll $v0, $a3, 7
- // returns (0x30A + (adjusted byte2) + (adjusted byte1) * 0xBC) * FONT_CHAR_TEX_SIZE
+ /* Characters with codepoints >= 0x8800 are kanji. Arrangement is regular, */
+ /* so convert index directly. */
+ li a2, 0xBC
+ blt a0, 0x8800, .nonkanji
+ /* 0xBC is number of glyphs in one block in the `kanji` file: */
+ /* 0x100 possible codepoints with the same byte1 */
+ /* - 0x40 unused at beginning */
+ /* - 1 unused at 0x7F */
+ /* - 3 unused at 0xFD, 0xFE, 0xFF */
+ /* Get byte1 and adjust so starts at 0 */
+ srl a1, a0, 8
+ addi a1, a1, -0x88
+ /* Get byte2 and adjust so starts at 0 */
+ andi a3, a0, 0xFF
+ addi a3, a3, -0x40
+ mul a2, a2, a1
+ blt a3, 0x40, .kanji_lower_halfblock
-// Non-kanji are arranged with irregular gaps, use the lookup table.
+ /* 0x__7F is always empty and elided in the file, so decrement if larger */
+ addi a3, a3, -1
+.kanji_lower_halfblock:
+ mflo a2 /* Unncessary mflo: the pseudo-op `mul` already performs mflo */
+ addi a3, a3, 0x30A
+ add a3, a3, a2
+ /* returns (0x30A + (adjusted byte2) + (adjusted byte1) * 0xBC) * FONT_CHAR_TEX_SIZE */
+ sll v0, a3, 7
+ jr ra
+
+/* Non-kanji are arranged with irregular gaps, use the lookup table. */
.nonkanji:
- // Get byte1 and adjust so starts at 0
- srl $a1, $a0, 8
- addi $a1, $a1, -0x81
- multu $a2, $a1
- // Get byte2 and adjust so starts at 0
- andi $a3, $a0, 0xFF
- addi $a3, $a3, -0x40
- slti $at, $a3, (0x80 - 0x40)
- mflo $a2
- // 0x__7F is always empty and elided in the file, so decrement if larger
- bnezl $at, .nonkanji_lower_halfblock
- mflo $a2
- addi $a3, $a3, -1
- mflo $a2
+ /* Get byte1 and adjust so starts at 0 */
+ srl a1, a0, 8
+ addi a1, a1, -0x81
+ /* Get byte2 and adjust so starts at 0 */
+ andi a3, a0, 0xFF
+ addi a3, a3, -0x40
+ mul a2, a2, a1
+ blt a3, 0x40, .nonkanji_lower_halfblock
+
+ /* 0x__7F is always empty and elided in the file, so decrement if larger */
+ addi a3, a3, -1
.nonkanji_lower_halfblock:
- add $a3, $a3, $a2
- lui $a2, %hi(sNonKanjiIndices)
- sll $a3, $a3, 1
- addiu $a2, %lo(sNonKanjiIndices)
- add $a3, $a3, $a2
- lh $a2, ($a3)
- jr $ra
- sll $v0, $a2, 7
- // returns sNonKanjiIndices[(adjusted byte2) + (adjusted byte1) * 0xBC] * FONT_CHAR_TEX_SIZE
+ mflo a2 /* Unncessary mflo: the pseudo-op `mul` already performs mflo */
+ add a3, a3, a2
+ sll a3, a3, 1
+ la a2, sNonKanjiIndices
+ add a3, a3, a2
+ lh a2, (a3)
+ /* returns sNonKanjiIndices[(adjusted byte2) + (adjusted byte1) * 0xBC] * FONT_CHAR_TEX_SIZE */
+ sll v0, a2, 7
+ jr ra
END(Kanji_OffsetFromShiftJIS)
/**
@@ -116,7 +105,7 @@ END(Kanji_OffsetFromShiftJIS)
* into blocks by high byte.
*/
DATA(sNonKanjiIndices)
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x814_ */ .half 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F
/* 0x815_ */ .half 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F
/* 0x816_ */ .half 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F
@@ -130,7 +119,7 @@ DATA(sNonKanjiIndices)
/* 0x81E_ */ .half 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x81F_ */ .half 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0000, 0x0000, 0x0000, 0x0000, 0x0091
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x824_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0092
/* 0x825_ */ .half 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x826_ */ .half 0x009C, 0x009D, 0x009E, 0x009F, 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB
@@ -144,7 +133,7 @@ DATA(sNonKanjiIndices)
/* 0x82E_ */ .half 0x0111, 0x0112, 0x0113, 0x0114, 0x0115, 0x0116, 0x0117, 0x0118, 0x0119, 0x011A, 0x011B, 0x011C, 0x011D, 0x011E, 0x011F, 0x0120
/* 0x82F_ */ .half 0x0121, 0x0122, 0x0123, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x834_ */ .half 0x0124, 0x0125, 0x0126, 0x0127, 0x0128, 0x0129, 0x012A, 0x012B, 0x012C, 0x012D, 0x012E, 0x012F, 0x0130, 0x0131, 0x0132, 0x0133
/* 0x835_ */ .half 0x0134, 0x0135, 0x0136, 0x0137, 0x0138, 0x0139, 0x013A, 0x013B, 0x013C, 0x013D, 0x013E, 0x013F, 0x0140, 0x0141, 0x0142, 0x0143
/* 0x836_ */ .half 0x0144, 0x0145, 0x0146, 0x0147, 0x0148, 0x0149, 0x014A, 0x014B, 0x014C, 0x014D, 0x014E, 0x014F, 0x0150, 0x0151, 0x0152, 0x0153
@@ -158,7 +147,7 @@ DATA(sNonKanjiIndices)
/* 0x83E_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x83F_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x844_ */ .half 0x01AB, 0x01AC, 0x01AD, 0x01AE, 0x01AF, 0x01B0, 0x01B1, 0x01B2, 0x01B3, 0x01B4, 0x01B5, 0x01B6, 0x01B7, 0x01B8, 0x01B9, 0x01BA
/* 0x845_ */ .half 0x01BB, 0x01BC, 0x01BD, 0x01BE, 0x01BF, 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C4, 0x01C5, 0x01C6, 0x01C7, 0x01C8, 0x01C9, 0x01CA
/* 0x846_ */ .half 0x01CB, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
@@ -172,7 +161,7 @@ DATA(sNonKanjiIndices)
/* 0x84E_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x84F_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x854_ */ .half 0x020E, 0x020F, 0x0210, 0x0211, 0x0212, 0x0213, 0x0214, 0x0215, 0x0216, 0x0217, 0x0218, 0x0219, 0x021A, 0x021B, 0x021C, 0x021D
/* 0x855_ */ .half 0x021E, 0x021F, 0x0220, 0x0221, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0222, 0x0223
/* 0x856_ */ .half 0x0224, 0x0225, 0x0226, 0x0227, 0x0228, 0x0229, 0x022A, 0x022B, 0x022C, 0x022D, 0x022E, 0x022F, 0x0230, 0x0231, 0x0232, 0x0233
@@ -186,7 +175,7 @@ DATA(sNonKanjiIndices)
/* 0x85E_ */ .half 0x026C, 0x026D, 0x026E, 0x026F, 0x0270, 0x0271, 0x0272, 0x0273, 0x0274, 0x0275, 0x0276, 0x0277, 0x0278, 0x0279, 0x027A, 0x027B
/* 0x85F_ */ .half 0x027C, 0x027D, 0x027E, 0x027F, 0x0280, 0x0281, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x864_ */ .half 0x0282, 0x0283, 0x0284, 0x0285, 0x0286, 0x0287, 0x0288, 0x0289, 0x028A, 0x028B, 0x028C, 0x028D, 0x028E, 0x028F, 0x0290, 0x0291
/* 0x865_ */ .half 0x0292, 0x0293, 0x0294, 0x0295, 0x0296, 0x0297, 0x0298, 0x0299, 0x029A, 0x029B, 0x029C, 0x029D, 0x029E, 0x029F, 0x0000, 0x0000
/* 0x866_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
@@ -200,7 +189,7 @@ DATA(sNonKanjiIndices)
/* 0x86E_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x86F_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x874_ */ .half 0x02C0, 0x02C1, 0x02C2, 0x02C3, 0x02C4, 0x02C5, 0x02C6, 0x02C7, 0x02C8, 0x02C9, 0x02CA, 0x02CB, 0x02CC, 0x02CD, 0x02CE, 0x02CF
/* 0x875_ */ .half 0x02D0, 0x02D1, 0x02D2, 0x02D3, 0x02D4, 0x02D5, 0x02D6, 0x02D7, 0x02D8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x876_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
diff --git a/src/code/listalloc.c b/src/code/listalloc.c
index 7560c20c64..9ccaa443d1 100644
--- a/src/code/listalloc.c
+++ b/src/code/listalloc.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "libc64/malloc.h"
+#include "listalloc.h"
ListAlloc* ListAlloc_Init(ListAlloc* this) {
this->prev = NULL;
diff --git a/src/code/main.c b/src/code/main.c
index 8024db9412..9bd722f9ce 100644
--- a/src/code/main.c
+++ b/src/code/main.c
@@ -1,29 +1,50 @@
+#include "sys_cfb.h"
#include "ultra64.h"
+#include "versions.h"
+
+#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" \
+ "ique-cn:0 ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
// Declared before including other headers for BSS ordering
extern uintptr_t gSegments[NUM_SEGMENTS];
#pragma increment_block_number "gc-eu:252 gc-eu-mq:252 gc-jp:252 gc-jp-ce:252 gc-jp-mq:252 gc-us:252 gc-us-mq:252" \
- "ntsc-1.2:128"
+ "ique-cn:252 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
extern struct PreNmiBuff* gAppNmiBufferPtr;
extern struct Scheduler gScheduler;
extern struct PadMgr gPadMgr;
extern struct IrqMgr gIrqMgr;
-#include "global.h"
+#include "libc64/malloc.h"
+#include "libu64/rcp_utils.h"
+#include "libu64/runtime.h"
+#include "array_count.h"
+#include "audiomgr.h"
+#include "debug_arena.h"
#include "fault.h"
+#include "gfx.h"
+#include "idle.h"
+#include "padmgr.h"
+#include "prenmi_buff.h"
+#include "printf.h"
+#include "regs.h"
+#include "segment_symbols.h"
#include "segmented_address.h"
#include "stack.h"
+#include "stackcheck.h"
#include "terminal.h"
+#include "translation.h"
#include "versions.h"
#if PLATFORM_N64
#include "cic6105.h"
#include "n64dd.h"
#endif
+#include "z64debug.h"
+#include "z64thread.h"
-#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
- "ntsc-1.2:168"
+#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" \
+ "ique-cn:0 ntsc-1.0:54 ntsc-1.1:54 ntsc-1.2:54 pal-1.0:52 pal-1.1:52"
extern u8 _buffersSegmentEnd[];
@@ -39,7 +60,11 @@ uintptr_t gSegments[NUM_SEGMENTS];
OSThread sGraphThread;
STACK(sGraphStack, 0x1800);
+#if OOT_VERSION < PAL_1_0
+STACK(sSchedStack, 0x400);
+#else
STACK(sSchedStack, 0x600);
+#endif
STACK(sAudioStack, 0x800);
STACK(sPadMgrStack, 0x500);
STACK(sIrqMgrStack, 0x500);
@@ -52,13 +77,13 @@ AudioMgr sAudioMgr;
OSMesgQueue sSerialEventQueue;
OSMesg sSerialMsgBuf[1];
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void Main_LogSystemHeap(void) {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(
T("システムヒープサイズ %08x(%dKB) 開始アドレス %08x\n", "System heap size %08x (%dKB) Start address %08x\n"),
gSystemHeapSize, gSystemHeapSize / 1024, _buffersSegmentEnd);
- PRINTF(VT_RST);
+ PRINTF_RST();
}
#endif
@@ -78,7 +103,7 @@ void Main(void* arg) {
#if PLATFORM_N64
func_800AD410();
if (D_80121211 != 0) {
- systemHeapStart = (uintptr_t)&_n64ddSegmentEnd;
+ systemHeapStart = (uintptr_t)_n64ddSegmentEnd;
SysCfb_Init(1);
} else {
func_800AD488();
@@ -91,11 +116,11 @@ void Main(void* arg) {
#endif
fb = (uintptr_t)SysCfb_GetFbPtr(0);
gSystemHeapSize = fb - systemHeapStart;
- PRINTF(T("システムヒープ初期化 %08x-%08x %08x\n", "System heap initalization %08x-%08x %08x\n"), systemHeapStart,
+ PRINTF(T("システムヒープ初期化 %08x-%08x %08x\n", "System heap initialization %08x-%08x %08x\n"), systemHeapStart,
fb, gSystemHeapSize);
- SystemHeap_Init((void*)systemHeapStart, gSystemHeapSize); // initializes the system heap
+ Runtime_Init((void*)systemHeapStart, gSystemHeapSize);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
{
void* debugHeapStart;
u32 debugHeapSize;
@@ -120,7 +145,7 @@ void Main(void* arg) {
osCreateMesgQueue(&sSerialEventQueue, sSerialMsgBuf, ARRAY_COUNT(sSerialMsgBuf));
osSetEventMesg(OS_EVENT_SI, &sSerialEventQueue, NULL);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
Main_LogSystemHeap();
#endif
@@ -150,7 +175,10 @@ void Main(void* arg) {
StackCheck_Init(&sGraphStackInfo, sGraphStack, STACK_TOP(sGraphStack), 0, 0x100, "graph");
osCreateThread(&sGraphThread, THREAD_ID_GRAPH, Graph_ThreadEntry, arg, STACK_TOP(sGraphStack), THREAD_PRI_GRAPH);
osStartThread(&sGraphThread);
+
+#if OOT_VERSION >= PAL_1_0
osSetThreadPri(NULL, THREAD_PRI_MAIN);
+#endif
while (true) {
s16* msg = NULL;
@@ -162,6 +190,9 @@ void Main(void* arg) {
switch (*msg) {
case OS_SC_PRE_NMI_MSG:
PRINTF(T("main.c: リセットされたみたいだよ\n", "main.c: Looks like it's been reset\n"));
+#if OOT_VERSION < PAL_1_0
+ StackCheck_Check(NULL);
+#endif
PreNmiBuff_SetReset(gAppNmiBufferPtr);
break;
}
diff --git a/src/code/mempak.c b/src/code/mempak.c
index 8d68be5ca3..850c478b93 100644
--- a/src/code/mempak.c
+++ b/src/code/mempak.c
@@ -7,7 +7,9 @@
* Each file is assigned an uppercase ASCII letter as an identifier, the game name for each is marked as
* 'ZELDA DEMO TOOL', encoded according to the N64 Font Code described in section 26.3 of the N64 Programming Manual.
*/
-#include "global.h"
+#include "mempak.h"
+#include "padmgr.h"
+#include "printf.h"
#define MEMPAK_MAX_FILES 11
diff --git a/src/code/object_table.c b/src/code/object_table.c
index d0f9e936dc..9ed6a1f44d 100644
--- a/src/code/object_table.c
+++ b/src/code/object_table.c
@@ -1,4 +1,8 @@
-#include "global.h"
+#include "array_count.h"
+#include "segment_symbols.h"
+#include "romfile.h"
+#include "ultra64.h"
+#include "z64object.h"
s16 gLinkObjectIds[] = { OBJECT_LINK_BOY, OBJECT_LINK_CHILD };
diff --git a/src/code/padmgr.c b/src/code/padmgr.c
index 58e0ba2f32..01a952c876 100644
--- a/src/code/padmgr.c
+++ b/src/code/padmgr.c
@@ -28,15 +28,21 @@
* `osContStartReadData` to receiving the data. By running this on a separate thread to the game state, work can be
* done while waiting for this operation to complete.
*/
-#include "global.h"
+#include "libu64/debug.h"
+#include "libu64/padsetup.h"
+#include "array_count.h"
+#include "padmgr.h"
+#include "printf.h"
#include "fault.h"
#include "terminal.h"
+#include "translation.h"
+#include "line_numbers.h"
#define PADMGR_LOG(controllerNum, msg) \
- if (OOT_DEBUG) { \
- PRINTF(VT_FGCOL(YELLOW)); \
+ if (DEBUG_FEATURES) { \
+ PRINTF_COLOR_YELLOW(); \
PRINTF(T("padmgr: %dコン: %s\n", "padmgr: Controller %d: %s\n"), (controllerNum) + 1, (msg)); \
- PRINTF(VT_RST); \
+ PRINTF_RST(); \
} \
(void)0
@@ -68,7 +74,7 @@ s32 gPadMgrLogSeverity = LOG_SEVERITY_CRITICAL;
OSMesgQueue* PadMgr_AcquireSerialEventQueue(PadMgr* padMgr) {
OSMesgQueue* serialEventQueue;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
serialEventQueue = NULL;
#endif
@@ -184,7 +190,7 @@ void PadMgr_UpdateRumble(PadMgr* padMgr) {
}
} else {
if (padMgr->pakType[i] != CONT_PAK_NONE) {
- if (padMgr->pakType[i] == CONT_PAK_RUMBLE || !OOT_DEBUG) {
+ if (padMgr->pakType[i] == CONT_PAK_RUMBLE || !DEBUG_FEATURES) {
PADMGR_LOG(i, T("振動パックが抜かれたようです", "It seems that a rumble pak was pulled out"));
padMgr->pakType[i] = CONT_PAK_NONE;
} else {
@@ -326,11 +332,7 @@ void PadMgr_UpdateInputs(PadMgr* padMgr) {
default:
// Unknown error response
LOG_HEX("padnow1->errno", pad->errno, "../padmgr.c", 396);
-#if PLATFORM_N64
- Fault_AddHungupAndCrash("../padmgr.c", 382);
-#else
- Fault_AddHungupAndCrash("../padmgr.c", 397);
-#endif
+ Fault_AddHungupAndCrash("../padmgr.c", LN3(379, 382, 397, 397));
break;
}
@@ -361,7 +363,7 @@ void PadMgr_HandleRetrace(PadMgr* padMgr) {
osRecvMesg(serialEventQueue, NULL, OS_MESG_BLOCK);
osContGetReadData(padMgr->pads);
-#if !OOT_DEBUG
+#if !DEBUG_FEATURES
// Clear controllers 2 and 4
bzero(&padMgr->pads[1], sizeof(OSContPad));
bzero(&padMgr->pads[3], sizeof(OSContPad));
diff --git a/src/code/sched.c b/src/code/sched.c
index 77860aa511..c573bf97f6 100644
--- a/src/code/sched.c
+++ b/src/code/sched.c
@@ -39,8 +39,20 @@
*
* @see irqmgr.c
*/
-#include "global.h"
+#include "libu64/debug.h"
+#include "libu64/rcp_utils.h"
+#include "array_count.h"
#include "fault.h"
+#include "irqmgr.h"
+#include "main.h"
+#include "printf.h"
+#include "regs.h"
+#include "sched.h"
+#include "speed_meter.h"
+#include "translation.h"
+#include "versions.h"
+#include "vi_mode.h"
+#include "z64thread.h"
#define RSP_DONE_MSG 667
#define RDP_DONE_MSG 668
@@ -53,7 +65,7 @@ OSTime sRSPAudioTimeStart;
OSTime sRSPOtherTimeStart;
OSTime sRDPTimeStart;
-#if OOT_DEBUG
+#if OOT_VERSION < PAL_1_0 || DEBUG_FEATURES
vs32 sSchedDebugPrintfEnabled = false;
#define SCHED_DEBUG_PRINTF \
@@ -84,7 +96,7 @@ void Sched_SwapFrameBufferImpl(CfbInfo* cfbInfo) {
Fault_SetFrameBuffer(cfbInfo->swapBuffer, width, 16);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (R_HREG_MODE == HREG_MODE_SCHED && R_SCHED_INIT != HREG_MODE_SCHED) {
R_SCHED_TOGGLE_SPECIAL_FEATURES = 0;
R_SCHED_GAMMA_ON = 0;
@@ -115,10 +127,29 @@ void Sched_SwapFrameBufferImpl(CfbInfo* cfbInfo) {
#endif
}
+#if OOT_VERSION < PAL_1_0
+ if (cfbInfo->viMode != NULL) {
+ osViSetMode(cfbInfo->viMode);
+ osViSetSpecialFeatures(cfbInfo->viFeatures);
+ }
+ if (1) {}
+ if (1) {}
+ if (1) {}
+ if (1) {}
+ if (1) {}
+#endif
+
cfbInfo->unk_10 = 0;
}
void Sched_SwapFrameBuffer(Scheduler* sc, CfbInfo* cfbInfo) {
+#if OOT_VERSION < PAL_1_0
+ Sched_SwapFrameBufferImpl(cfbInfo);
+ if (sc->isFirstSwap) {
+ osViBlack(false);
+ sc->isFirstSwap = false;
+ }
+#else
if (sc->isFirstSwap) {
sc->isFirstSwap = false;
@@ -127,10 +158,11 @@ void Sched_SwapFrameBuffer(Scheduler* sc, CfbInfo* cfbInfo) {
}
}
Sched_SwapFrameBufferImpl(cfbInfo);
+#endif
}
void Sched_HandlePreNMI(Scheduler* sc) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
OSTime now;
if (sc->curRSPTask != NULL) {
@@ -162,7 +194,12 @@ void Sched_HandlePreNMI(Scheduler* sc) {
void Sched_HandleNMI(Scheduler* sc) {
// black the screen and reset the VI y scale just in time for NMI reset
+#if OOT_VERSION < PAL_1_0
+ osViSetYScale(1.0f);
+ osViBlack(true);
+#else
ViConfig_UpdateVi(true);
+#endif
}
/**
@@ -424,6 +461,13 @@ void Sched_RunTask(Scheduler* sc, OSScTask* spTask, OSScTask* dpTask) {
// If the task also uses the RDP, set current running RDP task
if (spTask == dpTask && sc->curRDPTask == NULL) {
+#if OOT_VERSION < PAL_1_0
+ // Unknown SCHED_DEBUG_PRINTF calls
+ if (sSchedDebugPrintfEnabled) {}
+ if (sSchedDebugPrintfEnabled) {}
+ if (sSchedDebugPrintfEnabled) {}
+#endif
+
sc->curRDPTask = dpTask;
sRDPTimeStart = sRSPGfxTimeStart;
}
@@ -467,7 +511,9 @@ void Sched_HandleNotification(Scheduler* sc) {
void Sched_HandleRetrace(Scheduler* sc) {
SCHED_DEBUG_PRINTF("%08d:scHandleRetrace %08x\n", (u32)OS_CYCLES_TO_USEC(osGetTime()), osViGetCurrentFramebuffer());
+#if OOT_VERSION >= PAL_1_0
ViConfig_UpdateBlack();
+#endif
sc->retraceCount++;
// Retrace handlers run after VI context swap. The last swap buffer may now be the current buffer.
@@ -649,6 +695,12 @@ void Sched_Init(Scheduler* sc, void* stack, OSPri priority, u8 viModeType, UNK_T
// 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));
+
+#if OOT_VERSION < PAL_1_0
+ osViBlack(true);
+ osViSetSpecialFeatures(OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF);
+#endif
+
osSetEventMesg(OS_EVENT_SP, &sc->interruptQueue, (OSMesg)RSP_DONE_MSG);
osSetEventMesg(OS_EVENT_DP, &sc->interruptQueue, (OSMesg)RDP_DONE_MSG);
IrqMgr_AddClient(irqMgr, &sc->irqClient, &sc->interruptQueue);
diff --git a/src/code/shrink_window.c b/src/code/shrink_window.c
index 2dbe295e6e..3c92ede0e1 100644
--- a/src/code/shrink_window.c
+++ b/src/code/shrink_window.c
@@ -1,4 +1,6 @@
-#include "global.h"
+#include "letterbox.h"
+#include "printf.h"
+#include "regs.h"
typedef enum LetterboxState {
/* 0 */ LETTERBOX_STATE_IDLE,
@@ -86,7 +88,7 @@ void Letterbox_Update(s32 updateRate) {
sLetterboxState = LETTERBOX_STATE_IDLE;
}
- if (OOT_DEBUG && (R_HREG_MODE == HREG_MODE_LETTERBOX)) {
+ if (DEBUG_FEATURES && (R_HREG_MODE == HREG_MODE_LETTERBOX)) {
if (R_LETTERBOX_INIT != HREG_MODE_LETTERBOX) {
R_LETTERBOX_INIT = HREG_MODE_LETTERBOX;
R_LETTERBOX_ENABLE_LOGS = 0;
diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c
index b3bfa6d7ce..bb3624fa86 100644
--- a/src/code/speed_meter.c
+++ b/src/code/speed_meter.c
@@ -1,8 +1,16 @@
-#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"
-
-#include "global.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:0" \
+ "pal-1.0:0 pal-1.1:0"
+#include "libc64/malloc.h"
+#include "libu64/debug.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "printf.h"
+#include "regs.h"
+#include "speed_meter.h"
#include "terminal.h"
+#include "zelda_arena.h"
+#include "z64game.h"
+#include "z64view.h"
/**
* How much time the audio update on the audio thread (`AudioThread_Update`) took in total, between scheduling the last
@@ -185,9 +193,9 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC
Gfx* gfx;
if (this->maxval == 0) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
LOG_NUM("this->maxval", this->maxval, "../speed_meter.c", 313);
- PRINTF(VT_RST);
+ PRINTF_RST();
} else {
OPEN_DISPS(gfxCtx, "../speed_meter.c", 318);
diff --git a/src/code/sys_cfb.c b/src/code/sys_cfb.c
index e770025758..38fc9c65d8 100644
--- a/src/code/sys_cfb.c
+++ b/src/code/sys_cfb.c
@@ -1,20 +1,28 @@
-#include "global.h"
+#include "sys_cfb.h"
-#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"
+#include "libu64/debug.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "line_numbers.h"
+#include "printf.h"
+#include "translation.h"
+
+#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" \
+ "pal-1.1:128"
uintptr_t sSysCfbFbPtr[2];
uintptr_t sSysCfbEnd;
void SysCfb_Init(s32 n64dd) {
u32 screenSize;
- uintptr_t tmpFbEnd;
+ UNUSED_NDEBUG uintptr_t tmpFbEnd;
if (osMemSize >= 0x800000) {
PRINTF(T("8Mバイト以上のメモリが搭載されています\n", "8MB or more memory is installed\n"));
tmpFbEnd = 0x8044BE80;
if (n64dd == 1) {
PRINTF(T("RAM 8M mode (N64DD対応)\n", "RAM 8M mode (N64DD compatible)\n"));
-#if OOT_DEBUG
+#if DEBUG_FEATURES
sSysCfbEnd = 0x805FB000;
#else
sSysCfbEnd = 0x80600000;
@@ -22,7 +30,7 @@ void SysCfb_Init(s32 n64dd) {
} else {
PRINTF(T("このバージョンのマージンは %dK バイトです\n", "The margin for this version is %dK bytes\n"),
(0x4BC00 / 1024));
-#if OOT_DEBUG
+#if DEBUG_FEATURES
sSysCfbEnd = tmpFbEnd;
#else
sSysCfbEnd = 0x80400000;
@@ -32,11 +40,7 @@ void SysCfb_Init(s32 n64dd) {
PRINTF("RAM4M mode\n");
sSysCfbEnd = 0x80400000;
} else {
-#if PLATFORM_N64
- LogUtils_HungupThread("../sys_cfb.c", 322);
-#else
- LogUtils_HungupThread("../sys_cfb.c", 354);
-#endif
+ LogUtils_HungupThread("../sys_cfb.c", LN4(305, 308, 322, 341, 354));
}
screenSize = SCREEN_WIDTH * SCREEN_HEIGHT;
diff --git a/src/code/sys_debug_controller.c b/src/code/sys_debug_controller.c
new file mode 100644
index 0000000000..06ce8bf6cd
--- /dev/null
+++ b/src/code/sys_debug_controller.c
@@ -0,0 +1,14 @@
+#include "sys_debug_controller.h"
+#include "stdbool.h"
+#include "ultra64/ultratypes.h"
+#include "padmgr.h"
+
+u32 gIsCtrlr2Valid = false;
+
+void func_800D31F0(void) {
+ gIsCtrlr2Valid = (gPadMgr.validCtrlrsMask & 2) != 0;
+}
+
+void func_800D3210(void) {
+ gIsCtrlr2Valid = false;
+}
diff --git a/src/code/sys_freeze.c b/src/code/sys_freeze.c
new file mode 100644
index 0000000000..2957155559
--- /dev/null
+++ b/src/code/sys_freeze.c
@@ -0,0 +1,12 @@
+#include "libc64/sleep.h"
+#include "attributes.h"
+#include "printf.h"
+#include "sys_freeze.h"
+#include "terminal.h"
+
+NORETURN void func_800D31A0(void) {
+ PRINTF(VT_FGCOL(RED) "\n**** Freeze!! ****\n" VT_RST);
+ for (;;) {
+ Sleep_Msec(1000);
+ }
+}
diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c
index c0ebcea868..1ce651e9c9 100644
--- a/src/code/sys_math3d.c
+++ b/src/code/sys_math3d.c
@@ -1,12 +1,14 @@
+#include "sys_math3d.h"
+
+#include "printf.h"
+#include "terminal.h"
+#include "translation.h"
#include "ultra64.h"
#include "z_lib.h"
#include "z64math.h"
-#include "terminal.h"
-#include "macros.h"
-#include "sys_math3d.h"
-#pragma increment_block_number "gc-eu:106 gc-eu-mq:106 gc-jp:106 gc-jp-ce:106 gc-jp-mq:106 gc-us:106 gc-us-mq:106" \
- "ntsc-1.2:79"
+#pragma increment_block_number "gc-eu:77 gc-eu-mq:77 gc-jp:77 gc-jp-ce:77 gc-jp-mq:77 gc-us:77 gc-us-mq:77 ique-cn:67" \
+ "ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB,
Vec3f* lineAClosestToB, Vec3f* lineBClosestToA);
@@ -127,11 +129,11 @@ void Math3D_LineClosestToPoint(InfiniteLine* line, Vec3f* pos, Vec3f* closestPoi
dirVectorLengthSq = Math3D_Vec3fMagnitudeSq(&line->dir);
if (IS_ZERO(dirVectorLengthSq)) {
- PRINTF(VT_COL(YELLOW, BLACK));
+ PRINTF_COLOR_WARNING();
PRINTF(T("Math3D_lineVsPosSuisenCross():直線の長さがありません\n",
"Math3D_lineVsPosSuisenCross(): No straight line length\n"));
PRINTF(T("cross = pos を返します。\n", "Returns cross = pos.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
Math_Vec3f_Copy(closestPoint, pos);
//! @bug Missing early return
}
@@ -929,12 +931,12 @@ f32 Math3D_Plane(Plane* plane, Vec3f* pointOnPlane) {
* `nx`, `ny`, `nz`, and `originDist`
*/
f32 Math3D_UDistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p) {
- if (OOT_DEBUG && IS_ZERO(sqrtf(SQ(nx) + SQ(ny) + SQ(nz)))) {
- PRINTF(VT_COL(YELLOW, BLACK));
+ if (DEBUG_FEATURES && IS_ZERO(sqrtf(SQ(nx) + SQ(ny) + SQ(nz)))) {
+ PRINTF_COLOR_WARNING();
PRINTF(T("Math3DLengthPlaneAndPos():法線size がゼロ近いです%f %f %f\n",
"Math3DLengthPlaneAndPos(): Normal size is near zero %f %f %f\n"),
nx, ny, nz);
- PRINTF(VT_RST);
+ PRINTF_RST();
return 0.0f;
}
return fabsf(Math3D_DistPlaneToPos(nx, ny, nz, originDist, p));
@@ -949,11 +951,11 @@ f32 Math3D_DistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p) {
normMagnitude = sqrtf(SQ(nx) + SQ(ny) + SQ(nz));
if (IS_ZERO(normMagnitude)) {
- PRINTF(VT_COL(YELLOW, BLACK));
+ PRINTF_COLOR_WARNING();
PRINTF(T("Math3DSignedLengthPlaneAndPos():法線size がゼロ近いです%f %f %f\n",
"Math3DSignedLengthPlaneAndPos(): Normal size is close to zero %f %f %f\n"),
nx, ny, nz);
- PRINTF(VT_RST);
+ PRINTF_RST();
return 0.0f;
}
return Math3D_Planef(nx, ny, nz, originDist, p) / normMagnitude;
diff --git a/src/code/sys_math3d_draw.c b/src/code/sys_math3d_draw.c
index 76651c825e..7781a79e2e 100644
--- a/src/code/sys_math3d_draw.c
+++ b/src/code/sys_math3d_draw.c
@@ -1,4 +1,5 @@
-#include "z64.h"
+#include "sys_math3d.h"
+#include "z64play.h"
void Math3D_DrawSphere(PlayState* play, Sphere16* sph) {
}
diff --git a/src/code/sys_math_atan.c b/src/code/sys_math_atan.c
index 0647745b06..0c99eaced4 100644
--- a/src/code/sys_math_atan.c
+++ b/src/code/sys_math_atan.c
@@ -1,5 +1,6 @@
+#include "array_count.h"
+#include "sys_math.h"
#include "z64math.h"
-#include "macros.h"
static u16 sAtan2Tbl[] = {
0x0000, 0x000A, 0x0014, 0x001F, 0x0029, 0x0033, 0x003D, 0x0047, 0x0051, 0x005C, 0x0066, 0x0070, 0x007A, 0x0084,
diff --git a/src/code/sys_matrix.c b/src/code/sys_matrix.c
index 1a47079299..2ca4882601 100644
--- a/src/code/sys_matrix.c
+++ b/src/code/sys_matrix.c
@@ -1,17 +1,24 @@
-#include "global.h"
-#if OOT_DEBUG
+#include "libc64/math64.h"
+#include "gfx.h"
+#if DEBUG_FEATURES
#include "fault.h"
#endif
+#include "printf.h"
+#include "sys_matrix.h"
+#include "ultra64.h"
+#include "z_lib.h"
+#include "z64game.h"
+#include "z64skin_matrix.h"
// clang-format off
-Mtx gMtxClear = gdSPDefMtx(
+Mtx gIdentityMtx = gdSPDefMtx(
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f
);
-MtxF gMtxFClear = {
+MtxF gIdentityMtxF = {
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
@@ -19,8 +26,6 @@ MtxF gMtxFClear = {
};
// clang-format on
-#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"
-
MtxF* sMatrixStack; // "Matrix_stack"
MtxF* sCurrentMatrix; // "Matrix_now"
@@ -608,7 +613,7 @@ Mtx* Matrix_MtxFToMtx(MtxF* src, Mtx* dest) {
return dest;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
Mtx* Matrix_ToMtx(Mtx* dest, const char* file, int line) {
return Matrix_MtxFToMtx(MATRIX_CHECK_FLOATS(sCurrentMatrix, file, line), dest);
@@ -628,7 +633,7 @@ Mtx* Matrix_Finalize(GraphicsContext* gfxCtx) {
return Matrix_ToMtx(GRAPH_ALLOC(gfxCtx, sizeof(Mtx)));
}
-#endif /* OOT_DEBUG */
+#endif /* DEBUG_FEATURES */
Mtx* Matrix_MtxFToNewMtx(MtxF* src, GraphicsContext* gfxCtx) {
return Matrix_MtxFToMtx(src, GRAPH_ALLOC(gfxCtx, sizeof(Mtx)));
@@ -974,7 +979,7 @@ void Matrix_RotateAxis(f32 angle, Vec3f* axis, u8 mode) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
MtxF* Matrix_CheckFloats(MtxF* mf, const char* file, int line) {
s32 i, j;
diff --git a/src/code/sys_rumble.c b/src/code/sys_rumble.c
index fdb204af57..57f61c9214 100644
--- a/src/code/sys_rumble.c
+++ b/src/code/sys_rumble.c
@@ -12,7 +12,8 @@
*
* @note Original filename is likely sys_vibrate.c or similar as it is ordered after sys_ucode.c
*/
-#include "global.h"
+#include "rumble.h"
+#include "padmgr.h"
/**
* Rumble manager update, runs on Vertical Retrace on the padmgr thread.
@@ -147,7 +148,7 @@ void RumbleMgr_Init(RumbleMgr* rumbleMgr) {
}
void RumbleMgr_Destroy(RumbleMgr* rumbleMgr) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
bzero(rumbleMgr, sizeof(RumbleMgr));
#endif
}
diff --git a/src/code/sys_ucode.c b/src/code/sys_ucode.c
index 2be2566e84..71ae003909 100644
--- a/src/code/sys_ucode.c
+++ b/src/code/sys_ucode.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "ultra64.h"
+#include "sys_ucode.h"
u64* sDefaultGSPUCodeText = gspF3DZEX2_NoN_PosLight_fifoTextStart;
u64* sDefaultGSPUCodeData = gspF3DZEX2_NoN_PosLight_fifoDataStart;
diff --git a/src/code/title_setup.c b/src/code/title_setup.c
index 0f16535c54..0272022474 100644
--- a/src/code/title_setup.c
+++ b/src/code/title_setup.c
@@ -1,7 +1,11 @@
-#include "global.h"
+#include "console_logo_state.h"
+#include "setup_state.h"
+#include "printf.h"
+#include "translation.h"
+#include "z64save.h"
void Setup_InitImpl(SetupState* this) {
- PRINTF(T("ゼルダ共通データ初期化\n", "Zelda common data initalization\n"));
+ PRINTF(T("ゼルダ共通データ初期化\n", "Zelda common data initialization\n"));
SaveContext_Init();
this->state.running = false;
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, ConsoleLogoState);
diff --git a/src/code/ucode_disas.c b/src/code/ucode_disas.c
index c0bab3f994..8d1ff6cd77 100644
--- a/src/code/ucode_disas.c
+++ b/src/code/ucode_disas.c
@@ -1,4 +1,13 @@
-#include "global.h"
+#include "libu64/mtxuty-cvt.h"
+#include "ultra64/gs2dex.h"
+#include "array_count.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "translation.h"
+#include "ucode_disas.h"
+#include "ultra64.h"
+
+#if DEBUG_FEATURES
typedef struct F3dzexConst {
/* 0x00 */ u32 value;
@@ -51,7 +60,7 @@ typedef void (*UcodeDisasCallback)(UCodeDisas*, u32);
void* UCodeDisas_TranslateAddr(UCodeDisas* this, uintptr_t addr) {
uintptr_t physical = this->segments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr);
- return PHYSICAL_TO_VIRTUAL(physical);
+ return OS_PHYSICAL_TO_K0(physical);
}
F3dzexConst sUCodeDisasGeometryModes[] = {
@@ -223,7 +232,7 @@ void UCodeDisas_SetCurUCodeImpl(UCodeDisas* this, void* ptr) {
}
if (i >= this->ucodeInfoCount) {
DISAS_LOG(T("マイクロコードが一致しなかった\n", "Microcode did not match\n"));
- this->ucodeType = UCODE_NULL;
+ this->ucodeType = UCODE_TYPE_NULL;
}
}
@@ -800,8 +809,8 @@ void UCodeDisas_Disassemble(UCodeDisas* this, Gfx* ptr) {
default: {
switch (this->ucodeType) {
- case UCODE_F3DZEX:
- case UCODE_UNK: {
+ case UCODE_TYPE_F3DZEX:
+ case UCODE_TYPE_UNK: {
switch (cmd) {
case G_MTX: {
Gdma2 gmtx = ptr->dma2;
@@ -1098,7 +1107,7 @@ void UCodeDisas_Disassemble(UCodeDisas* this, Gfx* ptr) {
}
} break;
- case UCODE_S2DEX: {
+ case UCODE_TYPE_S2DEX: {
switch (cmd) {
case G_BG_COPY: {
Gwords words = ptr->words;
@@ -1243,3 +1252,5 @@ void UCodeDisas_RegisterUCode(UCodeDisas* this, s32 count, UCodeInfo* ucodeArray
void UCodeDisas_SetCurUCode(UCodeDisas* this, void* ptr) {
UCodeDisas_SetCurUCodeImpl(this, ptr);
}
+
+#endif
diff --git a/src/code/z_DLF.c b/src/code/z_DLF.c
index 547dc4bbbd..ad2cdff118 100644
--- a/src/code/z_DLF.c
+++ b/src/code/z_DLF.c
@@ -1,5 +1,10 @@
-#include "global.h"
+#include "libc64/malloc.h"
+#include "libu64/overlay.h"
+#include "printf.h"
#include "terminal.h"
+#include "translation.h"
+#include "ultra64.h"
+#include "z_game_dlftbls.h"
void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
if (overlayEntry->loadedRamAddr != NULL) {
@@ -18,12 +23,12 @@ void Overlay_LoadGameState(GameStateOverlay* overlayEntry) {
return;
}
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("OVL(d):Seg:%08x-%08x Ram:%08x-%08x Off:%08x %s\n", overlayEntry->vramStart, overlayEntry->vramEnd,
overlayEntry->loadedRamAddr,
(u32)overlayEntry->loadedRamAddr + (u32)overlayEntry->vramEnd - (u32)overlayEntry->vramStart,
(u32)overlayEntry->vramStart - (u32)overlayEntry->loadedRamAddr, "");
- PRINTF(VT_RST);
+ PRINTF_RST();
if (overlayEntry->unk_14 != NULL) {
overlayEntry->unk_14 = (void*)((u32)overlayEntry->unk_14 -
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index e64b9345b8..83105d23ec 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -1,30 +1,64 @@
-#include "global.h"
+#include "libc64/math64.h"
+#include "libu64/overlay.h"
+#include "array_count.h"
#include "fault.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
#include "quake.h"
#include "rand.h"
+#include "regs.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
#include "versions.h"
+#include "z_actor_dlftbls.h"
+#include "z_lib.h"
+#include "zelda_arena.h"
+#include "z64actor.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64light.h"
+#include "z64horse.h"
+#include "z64play.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
#include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h"
#include "overlays/actors/ovl_En_Part/z_en_part.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "assets/objects/object_bdoor/object_bdoor.h"
-#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:0"
+#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:0" \
+ "ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
-static CollisionPoly* sCurCeilingPoly;
-static s32 sCurCeilingBgId;
+CollisionPoly* sCurCeilingPoly;
+s32 sCurCeilingBgId;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define ACTOR_DEBUG_PRINTF \
if (R_ENABLE_ACTOR_DEBUG_PRINTF) \
PRINTF
-#elif IDO_PRINTF_WORKAROUND
-#define ACTOR_DEBUG_PRINTF(args) (void)0
#else
-#define ACTOR_DEBUG_PRINTF(format, ...) (void)0
+#define ACTOR_DEBUG_PRINTF \
+ if (0) \
+ PRINTF
+#endif
+
+#if DEBUG_FEATURES
+#define ACTOR_COLOR_WARNING VT_COL(YELLOW, BLACK)
+#define ACTOR_COLOR_ERROR VT_COL(RED, WHITE)
+#define ACTOR_RST VT_RST
+#else
+#define ACTOR_COLOR_WARNING ""
+#define ACTOR_COLOR_ERROR ""
+#define ACTOR_RST ""
#endif
void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc shadowDraw, f32 shadowScale) {
@@ -70,8 +104,9 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, PlayState* play, Gfx* dlist,
Matrix_RotateY(BINANG_TO_RAD(actor->shape.rot.y), MTXMODE_APPLY);
}
- temp2 = (1.0f - (temp1 * (1.0f / 350))) * actor->shape.shadowScale;
- Matrix_Scale(actor->scale.x * temp2, 1.0f, actor->scale.z * temp2, MTXMODE_APPLY);
+ temp2 = (1.0f - (temp1 * (1.0f / 350)));
+ temp2 *= actor->shape.shadowScale;
+ Matrix_Scale(temp2 * actor->scale.x, 1.0f, temp2 * actor->scale.z, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_actor.c", 1588);
gSPDisplayList(POLY_OPA_DISP++, dlist);
@@ -97,16 +132,19 @@ void ActorShadow_DrawHorse(Actor* actor, Lights* lights, PlayState* play) {
void ActorShadow_DrawFoot(PlayState* play, Light* light, MtxF* arg2, s32 arg3, f32 arg4, f32 arg5, f32 arg6) {
s32 pad1;
f32 sp58;
- s32 pad2[2];
+ f32 temp;
+ s32 pad2;
OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 1661);
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0,
- (u32)(((arg3 * 0.00005f) > 1.0f ? 1.0f : (arg3 * 0.00005f)) * arg4) & 0xFF);
+ temp = arg3 * 0.00005f;
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, (u32)(arg4 * (temp > 1.0f ? 1.0f : temp)) & 0xFF);
sp58 = Math_FAtan2F(light->l.dir[0], light->l.dir[2]);
arg6 *= (4.5f - (light->l.dir[1] * 0.035f));
- arg6 = (arg6 < 1.0f) ? 1.0f : arg6;
+ if (arg6 < 1.0f) {
+ arg6 = 1.0f;
+ }
Matrix_Put(arg2);
Matrix_RotateY(sp58, MTXMODE_APPLY);
Matrix_Scale(arg5, 1.0f, arg5 * arg6, MTXMODE_APPLY);
@@ -165,15 +203,17 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* lights, PlayState* play) {
actor->shape.feetFloorFlag <<= 1;
distToFloor = feetPosPtr->y - *floorHeightPtr;
- if (1) {}
-
if ((-1.0f <= distToFloor) && (distToFloor < 500.0f)) {
if (distToFloor <= 0.0f) {
actor->shape.feetFloorFlag++;
}
- distToFloor = CLAMP_MAX(distToFloor, 30.0f);
+ if (distToFloor > 30.0f) {
+ distToFloor = 30.0f;
+ }
shadowAlpha = (f32)actor->shape.shadowAlpha * (1.0f - (distToFloor * (1.0f / 30.0f)));
- distToFloor = CLAMP_MAX(distToFloor, 30.0f);
+ if (distToFloor > 30.0f) {
+ distToFloor = 30.0f;
+ }
shadowScaleZ = 1.0f - (distToFloor * (1.0f / (30.0f + 40.0f)));
shadowScaleX = shadowScaleZ * actor->shape.shadowScale * actor->scale.x;
lightNumMax = 0;
@@ -236,7 +276,11 @@ void Actor_SetFeetPos(Actor* actor, s32 limbIndex, s32 leftFootIndex, Vec3f* lef
void Actor_ProjectPos(PlayState* play, Vec3f* src, Vec3f* xyzDest, f32* cappedInvWDest) {
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, src, xyzDest, cappedInvWDest);
- *cappedInvWDest = (*cappedInvWDest < 1.0f) ? 1.0f : (1.0f / *cappedInvWDest);
+ if (*cappedInvWDest < 1.0f) {
+ *cappedInvWDest = 1.0f;
+ } else {
+ *cappedInvWDest = 1.0f / *cappedInvWDest;
+ }
}
typedef struct AttentionColor {
@@ -244,7 +288,10 @@ typedef struct AttentionColor {
/* 0x04 */ Color_RGBA8 secondary; // Used for Navi's outer color
} AttentionColor; // size = 0x8
-AttentionColor sAttentionColors[ACTORCAT_MAX + 1] = {
+// Needs to be static to work around an EGCS codegen bug in Attention_SetNaviState on iQue builds.
+// If this isn't static, accessing the element at offset 4 into the struct (secondary.r) will not
+// be offset correctly in the compiled code.
+static AttentionColor sAttentionColors[ACTORCAT_MAX + 1] = {
{ { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, // ACTORCAT_SWITCH
{ { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, // ACTORCAT_BG
{ { 255, 255, 255, 255 }, { 0, 0, 255, 0 } }, // ACTORCAT_PLAYER
@@ -266,11 +313,13 @@ Gfx D_80115FF0[] = {
};
void Attention_SetReticlePos(Attention* attention, s32 reticleNum, f32 x, f32 y, f32 z) {
- attention->lockOnReticles[reticleNum].pos.x = x;
- attention->lockOnReticles[reticleNum].pos.y = y;
- attention->lockOnReticles[reticleNum].pos.z = z;
+ LockOnReticle* reticle = &attention->lockOnReticles[reticleNum];
- attention->lockOnReticles[reticleNum].radius = attention->reticleRadius;
+ reticle->pos.x = x;
+ reticle->pos.y = y;
+ reticle->pos.z = z;
+
+ reticle->radius = attention->reticleRadius;
}
void Attention_InitReticle(Attention* attention, s32 actorCategory, PlayState* play) {
@@ -295,29 +344,27 @@ void Attention_InitReticle(Attention* attention, s32 actorCategory, PlayState* p
}
void Attention_SetNaviState(Attention* attention, Actor* actor, s32 actorCategory, PlayState* play) {
- AttentionColor* attentionColor = &sAttentionColors[actorCategory];
-
attention->naviHoverPos.x = actor->focus.pos.x;
attention->naviHoverPos.y = actor->focus.pos.y + (actor->lockOnArrowOffset * actor->scale.y);
attention->naviHoverPos.z = actor->focus.pos.z;
- attention->naviInnerColor.r = attentionColor->primary.r;
- attention->naviInnerColor.g = attentionColor->primary.g;
- attention->naviInnerColor.b = attentionColor->primary.b;
- attention->naviInnerColor.a = attentionColor->primary.a;
+ attention->naviInnerColor.r = sAttentionColors[actorCategory].primary.r;
+ attention->naviInnerColor.g = sAttentionColors[actorCategory].primary.g;
+ attention->naviInnerColor.b = sAttentionColors[actorCategory].primary.b;
+ attention->naviInnerColor.a = sAttentionColors[actorCategory].primary.a;
- attention->naviOuterColor.r = attentionColor->secondary.r;
- attention->naviOuterColor.g = attentionColor->secondary.g;
- attention->naviOuterColor.b = attentionColor->secondary.b;
- attention->naviOuterColor.a = attentionColor->secondary.a;
+ attention->naviOuterColor.r = sAttentionColors[actorCategory].secondary.r;
+ attention->naviOuterColor.g = sAttentionColors[actorCategory].secondary.g;
+ attention->naviOuterColor.b = sAttentionColors[actorCategory].secondary.b;
+ attention->naviOuterColor.a = sAttentionColors[actorCategory].secondary.a;
}
void Attention_Init(Attention* attention, Actor* actor, PlayState* play) {
attention->naviHoverActor = attention->reticleActor = attention->forcedLockOnActor = attention->bgmEnemy = NULL;
attention->reticleSpinCounter = 0;
- attention->curReticle = 0;
attention->naviMoveProgressFactor = 0.0f;
+ attention->curReticle = 0;
Attention_SetNaviState(attention, actor, actor->category, play);
Attention_InitReticle(attention, actor->category, play);
@@ -389,7 +436,7 @@ void Attention_Draw(Attention* attention, PlayState* play) {
Attention_SetReticlePos(attention, attention->curReticle, projectedPos.x, projectedPos.y, projectedPos.z);
- if (!(player->stateFlags1 & PLAYER_STATE1_6) || (actor != player->focusActor)) {
+ if (!(player->stateFlags1 & PLAYER_STATE1_TALKING) || (player->focusActor != actor)) {
OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, SETUPDL_57);
for (i = 0, curReticle = attention->curReticle; i < numReticles;
@@ -440,7 +487,7 @@ void Attention_Draw(Attention* attention, PlayState* play) {
Matrix_Translate(actor->focus.pos.x, actor->focus.pos.y + (actor->lockOnArrowOffset * actor->scale.y) + 17.0f,
actor->focus.pos.z, MTXMODE_NEW);
- Matrix_RotateY(BINANG_TO_RAD((u16)(play->gameplayFrames * 3000)), MTXMODE_APPLY);
+ Matrix_RotateY(BINANG_TO_RAD((play->gameplayFrames * 3000) & 0xFFFF), MTXMODE_APPLY);
Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, attentionColor->primary.r, attentionColor->primary.g,
@@ -547,7 +594,7 @@ void Attention_Update(Attention* attention, Player* player, Actor* playerFocusAc
attention->reticleFadeAlphaControl = 0;
}
- lockOnSfxId = CHECK_FLAG_ALL(playerFocusActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
+ lockOnSfxId = ACTOR_FLAGS_CHECK_ALL(playerFocusActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
? NA_SE_SY_LOCK_ON
: NA_SE_SY_LOCK_ON_HUMAN;
Sfx_PlaySfxCentered(lockOnSfxId);
@@ -789,6 +836,7 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
height = titleCtx->height;
doubleWidth = width * 2;
titleX1 = (titleCtx->x * 4) - (width * 2);
+ titleX2 = titleX1 + (doubleWidth * 2) - 4;
titleY1 = (titleCtx->y * 4) - (height * 2);
OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 2824);
@@ -807,7 +855,6 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
height = 0x1000 / width;
}
- titleX2 = titleX1 + (doubleWidth * 2);
titleY2 = titleY1 + (height * 4);
OVERLAY_DISP = Gfx_SetupDL_52NoCD(OVERLAY_DISP);
@@ -819,19 +866,19 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
width, height, 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);
- gSPTextureRectangle(OVERLAY_DISP++, titleX1, titleY1, titleX2 - 4, titleY2 - 1, G_TX_RENDERTILE, 0, 0, 1 << 10,
+ gSPTextureRectangle(OVERLAY_DISP++, titleX1, titleY1, titleX2, titleY2 - 1, G_TX_RENDERTILE, 0, 0, 1 << 10,
1 << 10);
height = titleCtx->height - height;
// If texture is bigger than 0x1000, display the rest
if (height > 0) {
- gDPLoadTextureBlock(OVERLAY_DISP++, (u8*)titleCtx->texture + textureLanguageOffset + 0x1000, G_IM_FMT_IA,
+ gDPLoadTextureBlock(OVERLAY_DISP++, (u8*)titleCtx->texture + 0x1000 + textureLanguageOffset, G_IM_FMT_IA,
G_IM_SIZ_8b, width, height, 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);
- gSPTextureRectangle(OVERLAY_DISP++, titleX1, titleY2, titleX2 - 4, titleY2 + (height * 4) - 1,
- G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+ gSPTextureRectangle(OVERLAY_DISP++, titleX1, titleY2, titleX2, titleY2 + (height * 4) - 1, G_TX_RENDERTILE,
+ 0, 0, 1 << 10, 1 << 10);
}
CLOSE_DISPS(play->state.gfxCtx, "../z_actor.c", 2880);
@@ -883,7 +930,7 @@ void Actor_SetScale(Actor* actor, f32 scale) {
}
void Actor_SetObjectDependency(PlayState* play, Actor* actor) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[actor->objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[actor->objectSlot].segment);
}
void Actor_Init(Actor* actor, PlayState* play) {
@@ -896,9 +943,9 @@ void Actor_Init(Actor* actor, PlayState* play) {
actor->minVelocityY = -20.0f;
actor->xyzDistToPlayerSq = MAXFLOAT;
actor->naviEnemyId = NAVI_ENEMY_NONE;
- actor->uncullZoneForward = 1000.0f;
- actor->uncullZoneScale = 350.0f;
- actor->uncullZoneDownward = 700.0f;
+ actor->cullingVolumeDistance = 1000.0f;
+ actor->cullingVolumeScale = 350.0f;
+ actor->cullingVolumeDownward = 700.0f;
CollisionCheck_InitInfo(&actor->colChkInfo);
actor->floorBgId = BGCHECK_SCENE;
ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f);
@@ -917,11 +964,11 @@ void Actor_Destroy(Actor* actor, PlayState* play) {
actor->destroy(actor, play);
actor->destroy = NULL;
} else {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
overlayEntry = actor->overlayEntry;
name = overlayEntry->name != NULL ? overlayEntry->name : "";
- PRINTF(T("Actorクラス デストラクトがありません [%s]\n", "No Actor class destruct [%s]\n") VT_RST, name);
+ PRINTF(T("Actorクラス デストラクトがありません [%s]\n", "No Actor class destruct [%s]\n") ACTOR_RST, name);
#endif
}
}
@@ -941,8 +988,8 @@ void Actor_UpdatePos(Actor* actor) {
* Update actor's velocity accounting for gravity (without dropping below minimum y velocity)
*/
void Actor_UpdateVelocityXZGravity(Actor* actor) {
- actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speed;
- actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speed;
+ actor->velocity.x = actor->speed * Math_SinS(actor->world.rot.y);
+ actor->velocity.z = actor->speed * Math_CosS(actor->world.rot.y);
actor->velocity.y += actor->gravity;
@@ -965,11 +1012,11 @@ void Actor_MoveXZGravity(Actor* actor) {
* Update actor's velocity without gravity.
*/
void Actor_UpdateVelocityXYZ(Actor* actor) {
- f32 speedXZ = Math_CosS(actor->world.rot.x) * actor->speed;
+ f32 speedXZ = actor->speed * Math_CosS(actor->world.rot.x);
- actor->velocity.x = Math_SinS(actor->world.rot.y) * speedXZ;
- actor->velocity.y = Math_SinS(actor->world.rot.x) * actor->speed;
- actor->velocity.z = Math_CosS(actor->world.rot.y) * speedXZ;
+ actor->velocity.x = speedXZ * Math_SinS(actor->world.rot.y);
+ actor->velocity.y = actor->speed * Math_SinS(actor->world.rot.x);
+ actor->velocity.z = speedXZ * Math_CosS(actor->world.rot.y);
}
/**
@@ -987,8 +1034,8 @@ void Actor_MoveXYZ(Actor* actor) {
* Only the actor's world pitch is factored in, with positive pitch moving downwards.
*/
void Actor_SetProjectileSpeed(Actor* actor, f32 speedXYZ) {
- actor->speed = Math_CosS(actor->world.rot.x) * speedXYZ;
- actor->velocity.y = -Math_SinS(actor->world.rot.x) * speedXYZ;
+ actor->speed = speedXYZ * Math_CosS(actor->world.rot.x);
+ actor->velocity.y = speedXYZ * -Math_SinS(actor->world.rot.x);
}
void Actor_UpdatePosByAnimation(Actor* actor, SkelAnime* skelAnime) {
@@ -1064,7 +1111,7 @@ void Actor_WorldToActorCoords(Actor* actor, Vec3f* dest, Vec3f* pos) {
deltaX = pos->x - actor->world.pos.x;
deltaZ = pos->z - actor->world.pos.z;
- dest->x = (deltaX * cosY) - (deltaZ * sinY);
+ dest->x = -(deltaZ * sinY) + (deltaX * cosY);
dest->z = (deltaX * sinY) + (deltaZ * cosY);
dest->y = pos->y - actor->world.pos.y;
}
@@ -1084,6 +1131,8 @@ f32 Player_GetHeight(Player* player) {
}
f32 func_8002DCE4(Player* player) {
+ s32 pad;
+
if (player->stateFlags1 & PLAYER_STATE1_23) {
return 8.0f;
} else if (player->stateFlags1 & PLAYER_STATE1_27) {
@@ -1098,13 +1147,13 @@ int func_8002DD6C(Player* player) {
}
int func_8002DD78(Player* player) {
- return func_8002DD6C(player) && player->unk_834;
+ return func_8002DD6C(player) && (player->unk_834 != 0);
}
int func_8002DDA8(PlayState* play) {
Player* player = GET_PLAYER(play);
- return (player->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) || func_8002DD78(player);
+ return (player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) || func_8002DD78(player);
}
s32 func_8002DDE4(PlayState* play) {
@@ -1119,19 +1168,26 @@ s32 func_8002DDF4(PlayState* play) {
return player->stateFlags2 & PLAYER_STATE2_12;
}
-void func_8002DE04(PlayState* play, Actor* actorA, Actor* actorB) {
+/**
+ * Swap hookshot attachment state from one actor to another.
+ *
+ * Note: There is no safety check for a NULL hookshot pointer.
+ * The responsibility is on the caller to make sure the hookshot exists.
+ */
+void Actor_SwapHookshotAttachment(PlayState* play, Actor* srcActor, Actor* destActor) {
ArmsHook* hookshot = (ArmsHook*)Actor_Find(&play->actorCtx, ACTOR_ARMS_HOOK, ACTORCAT_ITEMACTION);
- hookshot->grabbed = actorB;
- hookshot->grabbedDistDiff.x = 0.0f;
- hookshot->grabbedDistDiff.y = 0.0f;
- hookshot->grabbedDistDiff.z = 0.0f;
- actorB->flags |= ACTOR_FLAG_13;
- actorA->flags &= ~ACTOR_FLAG_13;
+ hookshot->attachedActor = destActor;
+
+ // The hookshot will attach at exactly the actors world position with 0 offset
+ hookshot->attachPointOffset.x = hookshot->attachPointOffset.y = hookshot->attachPointOffset.z = 0.0f;
+
+ destActor->flags |= ACTOR_FLAG_HOOKSHOT_ATTACHED;
+ srcActor->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED;
}
-void func_8002DE74(PlayState* play, Player* player) {
- if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_4) && Play_CamIsNotFixed(play)) {
+void Actor_RequestHorseCameraSetting(PlayState* play, Player* player) {
+ if ((play->roomCtx.curRoom.type != ROOM_TYPE_4) && Play_CamIsNotFixed(play)) {
Camera_RequestSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_HORSE);
}
}
@@ -1147,8 +1203,8 @@ int func_8002DEEC(Player* player) {
(player->csAction != PLAYER_CSACTION_NONE);
}
-void func_8002DF18(PlayState* play, Player* player) {
- func_8006DC68(play, player);
+void Actor_InitPlayerHorse(PlayState* play, Player* player) {
+ Horse_InitPlayerHorse(play, player);
}
/**
@@ -1196,8 +1252,7 @@ s32 Player_SetCsActionWithHaltedActors(PlayState* play, Actor* csActor, u8 csAct
}
void func_8002DF90(DynaPolyActor* dynaActor) {
- dynaActor->unk_154 = 0.0f;
- dynaActor->unk_150 = 0.0f;
+ dynaActor->unk_150 = dynaActor->unk_154 = 0.0f;
}
void func_8002DFA4(DynaPolyActor* dynaActor, f32 arg1, s16 arg2) {
@@ -1337,7 +1392,7 @@ s32 func_8002E2AC(PlayState* play, Actor* actor, Vec3f* pos, s32 arg3) {
actor->bgCheckFlags |= BGCHECKFLAG_GROUND_STRICT;
if (actor->bgCheckFlags & BGCHECKFLAG_CEILING) {
- if (floorBgId != sCurCeilingBgId) {
+ if (sCurCeilingBgId != floorBgId) {
if (floorHeightDiff > 15.0f) {
actor->bgCheckFlags |= BGCHECKFLAG_CRUSHED;
}
@@ -1375,13 +1430,14 @@ s32 func_8002E2AC(PlayState* play, Actor* actor, Vec3f* pos, s32 arg3) {
void Actor_UpdateBgCheckInfo(PlayState* play, Actor* actor, f32 wallCheckHeight, f32 wallCheckRadius,
f32 ceilingCheckHeight, s32 flags) {
f32 sp74;
- s32 pad;
+ s32 floorBgId;
Vec3f sp64;
sp74 = actor->world.pos.y - actor->prevPos.y;
+ floorBgId = actor->floorBgId;
- if ((actor->floorBgId != BGCHECK_SCENE) && (actor->bgCheckFlags & BGCHECKFLAG_GROUND)) {
- DynaPolyActor_TransformCarriedActor(&play->colCtx, actor->floorBgId, actor);
+ if ((floorBgId != BGCHECK_SCENE) && (actor->bgCheckFlags & BGCHECKFLAG_GROUND)) {
+ DynaPolyActor_TransformCarriedActor(&play->colCtx, floorBgId, actor);
}
if (flags & UPDBGCHECKINFO_FLAG_0) {
@@ -1450,8 +1506,8 @@ void Actor_UpdateBgCheckInfo(PlayState* play, Actor* actor, f32 wallCheckHeight,
actor->bgCheckFlags |= BGCHECKFLAG_WATER;
}
} else {
- actor->bgCheckFlags &= ~(BGCHECKFLAG_WATER | BGCHECKFLAG_WATER_TOUCH);
actor->depthInWater = BGCHECK_Y_MIN;
+ actor->bgCheckFlags &= ~(BGCHECKFLAG_WATER | BGCHECKFLAG_WATER_TOUCH);
}
}
}
@@ -1468,7 +1524,7 @@ Gfx* func_8002E830(Vec3f* object, Vec3f* eye, Vec3f* lightDir, GraphicsContext*
*hilite = GRAPH_ALLOC(gfxCtx, sizeof(Hilite));
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (R_HREG_MODE == HREG_MODE_PRINT_HILITE_INFO) {
PRINTF("z_actor.c 3529 eye=[%f(%f) %f %f] object=[%f %f %f] light_direction=[%f %f %f]\n", correctedEyeX,
eye->x, eye->y, eye->z, object->x, object->y, object->z, lightDir->x, lightDir->y, lightDir->z);
@@ -1520,10 +1576,12 @@ void func_8002EBCC(Actor* actor, PlayState* play, s32 flag) {
lightDir.y = play->envCtx.dirLight1.params.dir.y;
lightDir.z = play->envCtx.dirLight1.params.dir.z;
+#if DEBUG_FEATURES
if (R_HREG_MODE == HREG_MODE_PRINT_HILITE_INFO) {
PRINTF("z_actor.c 3637 game_play->view.eye=[%f(%f) %f %f]\n", play->view.eye.x, play->view.eye.y,
play->view.eye.z);
}
+#endif
hilite = func_8002EABC(&actor->world.pos, &play->view.eye, &lightDir, play->state.gfxCtx);
@@ -1589,8 +1647,7 @@ PosRot Actor_GetWorldPosShapeRot(Actor* actor) {
* This distance will be weighted if Player is already locked onto another actor.
*/
f32 Attention_WeightedDistToPlayerSq(Actor* actor, Player* player, s16 playerShapeYaw) {
- s16 yawTemp = (s16)(actor->yawTowardsPlayer - 0x8000) - playerShapeYaw;
- s16 yawTempAbs = ABS(yawTemp);
+ s16 yawTempAbs = (s16)ABS((s16)((s16)(actor->yawTowardsPlayer - 0x8000) - playerShapeYaw));
if (player->focusActor != NULL) {
if ((yawTempAbs > 0x4000) || (actor->flags & ACTOR_FLAG_LOCK_ON_DISABLED)) {
@@ -1666,19 +1723,12 @@ s32 Attention_ShouldReleaseLockOn(Actor* actor, Player* player, s32 ignoreLeash)
}
if (!ignoreLeash) {
- s16 yawDiff = (s16)(actor->yawTowardsPlayer - 0x8000) - player->actor.shape.rot.y;
- s16 yawDiffAbs = ABS(yawDiff);
- f32 distSq;
+ s16 yawDiffAbs = (s16)ABS((s16)((s16)(actor->yawTowardsPlayer - 0x8000) - player->actor.shape.rot.y));
+ // This function is only called (and is only relevant) when `player->focusActor != NULL`,
+ // so the MAXFLOAT case is unreachable.
+ f32 distSq = ((player->focusActor == NULL) && (yawDiffAbs > 0x2AAA)) ? MAXFLOAT : actor->xyzDistToPlayerSq;
- if ((player->focusActor == NULL) && (yawDiffAbs > 0x2AAA)) {
- // This function is only called (and is only relevant) when `player->focusActor != NULL`.
- // This is unreachable.
- distSq = MAXFLOAT;
- } else {
- distSq = actor->xyzDistToPlayerSq;
- }
-
- return !Attention_ActorIsInRange(actor, sAttentionRanges[actor->attentionRangeType].lockOnLeashScale * distSq);
+ return !Attention_ActorIsInRange(actor, distSq * sAttentionRanges[actor->attentionRangeType].lockOnLeashScale);
}
return false;
@@ -1715,8 +1765,8 @@ s32 Actor_OfferTalkExchange(Actor* actor, PlayState* play, f32 xzRange, f32 yRan
if ((player->actor.flags & ACTOR_FLAG_TALK) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(play)) ||
(!actor->isLockedOn &&
- ((yRange < fabsf(actor->yDistToPlayer)) || (player->talkActorDistance < actor->xzDistToPlayer) ||
- (xzRange < actor->xzDistToPlayer)))) {
+ ((fabsf(actor->yDistToPlayer) > yRange) || (actor->xzDistToPlayer > player->talkActorDistance) ||
+ (actor->xzDistToPlayer > xzRange)))) {
return false;
}
@@ -1759,7 +1809,7 @@ u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play) {
}
}
-s8 func_8002F368(PlayState* play) {
+s8 Actor_GetPlayerExchangeItemId(PlayState* play) {
Player* player = GET_PLAYER(play);
return player->exchangeItemId;
@@ -1812,9 +1862,9 @@ s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange
(PLAYER_STATE1_DEAD | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_13 | PLAYER_STATE1_14 |
PLAYER_STATE1_18 | PLAYER_STATE1_19 | PLAYER_STATE1_20 | PLAYER_STATE1_21)) &&
Player_GetExplosiveHeld(player) < 0) {
- if ((((player->heldActor != NULL) || (actor == player->talkActor)) && (getItemId > GI_NONE) &&
+ if ((((player->heldActor != NULL) || (player->talkActor == actor)) && (getItemId > GI_NONE) &&
(getItemId < GI_MAX)) ||
- (!(player->stateFlags1 & (PLAYER_STATE1_ACTOR_CARRY | PLAYER_STATE1_29)))) {
+ (!(player->stateFlags1 & (PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_29)))) {
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
s32 absYawDiff = ABS(yawDiff);
@@ -1883,7 +1933,7 @@ u32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 &
- (PLAYER_STATE1_DEAD | PLAYER_STATE1_ACTOR_CARRY | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_13 |
+ (PLAYER_STATE1_DEAD | PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_13 |
PLAYER_STATE1_14 | PLAYER_STATE1_18 | PLAYER_STATE1_19 | PLAYER_STATE1_20 | PLAYER_STATE1_21))) {
player->rideActor = horse;
player->mountSide = mountSide;
@@ -1901,30 +1951,79 @@ s32 Actor_NotMounted(PlayState* play, Actor* horse) {
}
}
-void func_8002F698(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) {
+/**
+ * Sets the player's knockback properties
+ *
+ * @param play
+ * @param actor source actor applying knockback damage
+ * @param speed
+ * @param rot the direction the player will be pushed
+ * @param yVelocity
+ * @param type PlayerKnockbackType
+ * @param damage additional amount of damage to deal to the player
+ */
+void Actor_SetPlayerKnockback(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 type, u32 damage) {
Player* player = GET_PLAYER(play);
- player->unk_8A0 = arg6;
- player->unk_8A1 = arg5;
- player->unk_8A4 = arg2;
- player->unk_8A2 = arg3;
- player->unk_8A8 = arg4;
+ player->knockbackDamage = damage;
+ player->knockbackType = type;
+ player->knockbackSpeed = speed;
+ player->knockbackRot = rot;
+ player->knockbackYVelocity = yVelocity;
}
-void func_8002F6D4(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
- func_8002F698(play, actor, arg2, arg3, arg4, 2, arg5);
+/**
+ * Knocks the player to the ground
+ *
+ * @param play
+ * @param actor source actor applying knockback damage
+ * @param speed
+ * @param rot the direction the player will be pushed
+ * @param yVelocity
+ * @param damage additional amount of damage to deal to the player
+ */
+void Actor_SetPlayerKnockbackLarge(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage) {
+ Actor_SetPlayerKnockback(play, actor, speed, rot, yVelocity, PLAYER_KNOCKBACK_LARGE, damage);
}
-void func_8002F71C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) {
- func_8002F6D4(play, actor, arg2, arg3, arg4, 0);
+/**
+ * Knocks the player to the ground, without applying additional damage
+ *
+ * @param play
+ * @param actor source actor applying knockback damage
+ * @param speed
+ * @param rot the direction the player will be pushed
+ * @param yVelocity
+ */
+void Actor_SetPlayerKnockbackLargeNoDamage(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity) {
+ Actor_SetPlayerKnockbackLarge(play, actor, speed, rot, yVelocity, 0);
}
-void func_8002F758(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
- func_8002F698(play, actor, arg2, arg3, arg4, 1, arg5);
+/**
+ * Knocks the player back while keeping them on their feet
+ *
+ * @param play
+ * @param actor
+ * @param speed overridden
+ * @param rot the direction the player will be pushed
+ * @param yVelocity overridden
+ * @param damage additional amount of damage to deal to the player
+ */
+void Actor_SetPlayerKnockbackSmall(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage) {
+ Actor_SetPlayerKnockback(play, actor, speed, rot, yVelocity, PLAYER_KNOCKBACK_SMALL, damage);
}
-void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) {
- func_8002F758(play, actor, arg2, arg3, arg4, 0);
+/**
+ * Knocks the player back while keeping them on their feet, without applying additional damage
+ *
+ * @param play
+ * @param actor
+ * @param speed overridden
+ * @param rot the direction the player will be pushed
+ * @param yVelocity overridden
+ */
+void Actor_SetPlayerKnockbackSmallNoDamage(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity) {
+ Actor_SetPlayerKnockbackSmall(play, actor, speed, rot, yVelocity, 0);
}
/**
@@ -2022,7 +2121,8 @@ s32 func_8002F9EC(PlayState* play, Actor* actor, CollisionPoly* poly, s32 bgId,
return false;
}
-#pragma increment_block_number "gc-eu:22 gc-eu-mq:22 gc-jp:22 gc-jp-ce:22 gc-jp-mq:22 gc-us:22 gc-us-mq:22 ntsc-1.2:22"
+#pragma increment_block_number "gc-eu:22 gc-eu-mq:22 gc-jp:22 gc-jp-ce:22 gc-jp-mq:22 gc-us:22 gc-us-mq:22" \
+ "ntsc-1.0:22 ntsc-1.1:22 ntsc-1.2:22 pal-1.0:22 pal-1.1:22"
// Local data used for Farore's Wind light (stored in BSS)
LightInfo D_8015BC00;
@@ -2031,7 +2131,9 @@ s32 D_8015BC14;
f32 D_8015BC18;
void func_8002FA60(PlayState* play) {
- Vec3f lightPos;
+ f32 lightPosX;
+ f32 lightPosY;
+ f32 lightPosZ;
if (gSaveContext.save.info.fw.set) {
gSaveContext.respawn[RESPAWN_MODE_TOP].data = 0x28;
@@ -2052,10 +2154,10 @@ void func_8002FA60(PlayState* play) {
}
// clang-format off
- lightPos.x = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x; \
- lightPos.y = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y + 80.0f; \
- lightPos.z = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.z; \
- Lights_PointNoGlowSetInfo(&D_8015BC00, lightPos.x, lightPos.y, lightPos.z, 0xFF, 0xFF, 0xFF, -1);
+ lightPosX = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x; \
+ lightPosY = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y + 80.0f; \
+ lightPosZ = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.z; \
+ Lights_PointNoGlowSetInfo(&D_8015BC00, lightPosX, lightPosY, lightPosZ, 0xFF, 0xFF, 0xFF, -1);
// clang-format on
D_8015BC10 = LightContext_InsertLight(play, &play->lightCtx, &D_8015BC00);
@@ -2106,7 +2208,9 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
} else {
length = diff * (1.0f / D_8015BC18);
speed = 20.0f / length;
- speed = CLAMP_MIN(speed, 0.05f);
+ if (speed < 0.05f) {
+ speed = 0.05f;
+ }
Math_StepToF(&D_8015BC18, 0.0f, speed);
factor = (diff * (D_8015BC18 / prevNum)) / diff;
curPos->x = nextPos->x + (dist.x * factor);
@@ -2127,7 +2231,8 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
if (D_8015BC18 == 0.0f) {
gSaveContext.respawn[RESPAWN_MODE_TOP] = gSaveContext.respawn[RESPAWN_MODE_DOWN];
- gSaveContext.respawn[RESPAWN_MODE_TOP].playerParams = 0x06FF;
+ gSaveContext.respawn[RESPAWN_MODE_TOP].playerParams =
+ PLAYER_PARAMS(PLAYER_START_MODE_FARORES_WIND, PLAYER_START_BG_CAM_DEFAULT);
gSaveContext.respawn[RESPAWN_MODE_TOP].data = 40;
}
@@ -2232,8 +2337,8 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* play
bzero(actorCtx, sizeof(ActorContext));
ActorOverlayTable_Init();
- Matrix_MtxFCopy(&play->billboardMtxF, &gMtxFClear);
- Matrix_MtxFCopy(&play->viewProjectionMtxF, &gMtxFClear);
+ Matrix_MtxFCopy(&play->billboardMtxF, &gIdentityMtxF);
+ Matrix_MtxFCopy(&play->viewProjectionMtxF, &gIdentityMtxF);
overlayEntry = &gActorOverlayTable[0];
for (i = 0; i < ARRAY_COUNT(gActorOverlayTable); i++) {
@@ -2258,29 +2363,29 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* play
u32 sCategoryFreezeMasks[ACTORCAT_MAX] = {
// ACTORCAT_SWITCH
- PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
+ PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
// ACTORCAT_BG
- PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
+ PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
// ACTORCAT_PLAYER
0,
// ACTORCAT_EXPLOSIVE
- PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28,
+ PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28,
// ACTORCAT_NPC
PLAYER_STATE1_DEAD,
// ACTORCAT_ENEMY
- PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29,
+ PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29,
// ACTORCAT_PROP
PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
// ACTORCAT_ITEMACTION
0,
// ACTORCAT_MISC
- PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29,
+ PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29,
// ACTORCAT_BOSS
- PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28,
+ PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28,
// ACTORCAT_DOOR
0,
// ACTORCAT_CHEST
- PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
+ PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28,
};
void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
@@ -2288,20 +2393,22 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
Actor* actor;
Player* player;
u32* categoryFreezeMaskP;
- u32 requiredActorFlag;
+ u32 freezeExceptionFlag;
u32 canFreezeCategory;
Actor* sp74;
ActorEntry* actorEntry;
player = GET_PLAYER(play);
+#if DEBUG_FEATURES
if (0) {
- // This ASSERT is optimized out but it exists due to its presence in rodata
+ // This ASSERT is optimized out, but it can be assumed to exist because its string is present in rodata
ASSERT(gMaxActorId == ACTOR_ID_MAX, "MaxProfile == ACTOR_DLF_MAX", "../z_actor.c", UNK_LINE);
}
+#endif
sp74 = NULL;
- requiredActorFlag = 0;
+ freezeExceptionFlag = 0;
if (play->numActorEntries != 0) {
actorEntry = &play->actorEntryList[0];
@@ -2315,7 +2422,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
actorCtx->unk_02--;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (KREG(0) == -100) {
Actor* player = &GET_PLAYER(play)->actor;
@@ -2327,16 +2434,16 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
categoryFreezeMaskP = &sCategoryFreezeMasks[0];
- if (player->stateFlags2 & PLAYER_STATE2_27) {
- requiredActorFlag = ACTOR_FLAG_25;
+ if (player->stateFlags2 & PLAYER_STATE2_USING_OCARINA) {
+ freezeExceptionFlag = ACTOR_FLAG_UPDATE_DURING_OCARINA;
}
- if ((player->stateFlags1 & PLAYER_STATE1_6) && ((player->actor.textId & 0xFF00) != 0x600)) {
+ if ((player->stateFlags1 & PLAYER_STATE1_TALKING) && ((player->actor.textId & 0xFF00) != 0x600)) {
sp74 = player->talkActor;
}
for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++, categoryFreezeMaskP++) {
- canFreezeCategory = (*categoryFreezeMaskP & player->stateFlags1);
+ canFreezeCategory = (player->stateFlags1 & *categoryFreezeMaskP);
actor = actorCtx->actorLists[i].head;
while (actor != NULL) {
@@ -2356,10 +2463,10 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
} else if (!Object_IsLoaded(&play->objectCtx, actor->objectSlot)) {
Actor_Kill(actor);
actor = actor->next;
- } else if ((requiredActorFlag && !(actor->flags & requiredActorFlag)) ||
- (!requiredActorFlag && canFreezeCategory &&
- !((sp74 == actor) || (actor == player->naviActor) || (actor == player->heldActor) ||
- (&player->actor == actor->parent)))) {
+ } else if ((freezeExceptionFlag != 0 && !(actor->flags & freezeExceptionFlag)) ||
+ (freezeExceptionFlag == 0 && canFreezeCategory &&
+ !((sp74 == actor) || (player->naviActor == actor) || (player->heldActor == actor) ||
+ (actor->parent == &player->actor)))) {
CollisionCheck_ResetDamage(&actor->colChkInfo);
actor = actor->next;
} else if (actor->update == NULL) {
@@ -2376,9 +2483,10 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
actor->xyzDistToPlayerSq = SQ(actor->xzDistToPlayer) + SQ(actor->yDistToPlayer);
actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, &player->actor);
- actor->flags &= ~ACTOR_FLAG_24;
+ actor->flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
- if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_4 | ACTOR_FLAG_6))) {
+ if ((DECR(actor->freezeTimer) == 0) &&
+ (actor->flags & (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_INSIDE_CULLING_VOLUME))) {
if (actor == player->focusActor) {
actor->isLockedOn = true;
} else {
@@ -2412,16 +2520,15 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
if ((actor != NULL) && (actor->update == NULL)) {
actor = NULL;
- func_8008EDF0(player);
+ Player_ReleaseLockOn(player);
}
if ((actor == NULL) || (player->zTargetActiveTimer < 5)) {
- actor = NULL;
-
if (actorCtx->attention.reticleSpinCounter != 0) {
actorCtx->attention.reticleSpinCounter = 0;
Sfx_PlaySfxCentered(NA_SE_SY_LOCK_OFF);
}
+ actor = NULL;
}
Attention_Update(&actorCtx->attention, player, actor, play);
@@ -2438,15 +2545,15 @@ void Actor_FaultPrint(Actor* actor, char* command) {
Fault_Printf("ACTOR NAME is NULL");
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
overlayEntry = actor->overlayEntry;
name = overlayEntry->name != NULL ? overlayEntry->name : "";
-
- PRINTF(T("アクターの名前(%08x:%s)\n", "Actor name (%08x:%s)\n"), actor, name);
#else
name = "";
#endif
+ PRINTF(T("アクターの名前(%08x:%s)\n", "Actor name (%08x:%s)\n"), actor, name);
+
if (command != NULL) {
PRINTF(T("コメント:%s\n", "Command: %s\n"), command);
}
@@ -2458,6 +2565,9 @@ void Actor_FaultPrint(Actor* actor, char* command) {
void Actor_Draw(PlayState* play, Actor* actor) {
FaultClient faultClient;
Lights* lights;
+#if PLATFORM_IQUE
+ ObjectEntry* slots;
+#endif
Fault_AddClient(&faultClient, Actor_FaultPrint, actor, "Actor_draw");
@@ -2482,8 +2592,15 @@ void Actor_Draw(PlayState* play, Actor* actor) {
Matrix_Scale(actor->scale.x, actor->scale.y, actor->scale.z, MTXMODE_APPLY);
Actor_SetObjectDependency(play, actor);
+#if !PLATFORM_IQUE
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[actor->objectSlot].segment);
gSPSegment(POLY_XLU_DISP++, 0x06, play->objectCtx.slots[actor->objectSlot].segment);
+#else
+ // Workaround for EGCS internal compiler error (see docs/compilers.md)
+ slots = play->objectCtx.slots;
+ gSPSegment(POLY_OPA_DISP++, 0x06, slots[actor->objectSlot].segment);
+ gSPSegment(POLY_XLU_DISP++, 0x06, slots[actor->objectSlot].segment);
+#endif
if (actor->colorFilterTimer != 0) {
Color_RGBA8 color = { 0, 0, 0, 255 };
@@ -2648,19 +2765,92 @@ void Actor_DrawLensActors(PlayState* play, s32 numInvisibleActors, Actor** invis
CLOSE_DISPS(gfxCtx, "../z_actor.c", 6284);
}
-s32 func_800314B0(PlayState* play, Actor* actor) {
- return func_800314D4(play, actor, &actor->projectedPos, actor->projectedW);
+/**
+ * Checks if an actor should be culled or not, by seeing if it is contained within its own culling volume.
+ * For more details on the culling test, see `Actor_CullingVolumeTest`.
+ *
+ * Returns true if the actor is inside its culling volume. In other words, it should not cull.
+ *
+ * "Culling" in this context refers to the removal of something for the sake of improving performance.
+ * For actors, being culled means that their Update and Draw processes are halted.
+ * While halted, an Actor's update state is frozen and it will not draw, making it invisible.
+ *
+ * Actors that are within the bounds of their culling volume may update and draw, while actors that are
+ * out of bounds of its culling volume may be excluded from updating and drawing until they are within bounds.
+ *
+ * It is possible for actors to opt out of update culling or draw culling.
+ * This is set per-actor with `ACTOR_FLAG_UPDATE_CULLING_DISABLED` and `ACTOR_FLAG_DRAW_CULLING_DISABLED`.
+ *
+ * Note: Even if either `ACTOR_FLAG_UPDATE_CULLING_DISABLED` or `ACTOR_FLAG_DRAW_CULLING_DISABLED` are set, the actor
+ * will still undergo the culling test and set `ACTOR_FLAG_INSIDE_CULLING_VOLUME` accordingly.
+ * So, `ACTOR_FLAG_INSIDE_CULLING_VOLUME` cannot be used on it own to determine if an actor is actually culled.
+ * It simply says whether or not they are physically located within the bounds of the culling volume.
+ */
+s32 Actor_CullingCheck(PlayState* play, Actor* actor) {
+ return Actor_CullingVolumeTest(play, actor, &actor->projectedPos, actor->projectedW);
}
-s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) {
- f32 var;
+/**
+ * Tests if an actor is currently within the bounds of its own culling volume.
+ *
+ * The culling volume is a 3D shape composed of a frustum with a box attached to the end of it. The frustum sits at the
+ * camera's position and projects forward, encompassing the player's current view; the box extrudes behind the camera,
+ * allowing actors in the immediate vicinity behind and to the sides of the camera to be detected.
+ *
+ * This function returns true if the actor is within bounds, false if not.
+ * The comparison is done in projected space against the actor's projected position as the viewing frustum
+ * in world space transforms to a box in projected space, making the calculation easy.
+ *
+ * Every actor can set properties for their own culling volume, changing its dimensions to suit the needs of
+ * it and its environment. These properties are in units of projected space (i.e. compared to the actor's position
+ * after perspective projection is applied) are therefore not directly comparable to world units.
+ * These depend on the current view parameters (fov, aspect, scale, znear, zfar).
+ * The default parameters considered are (60 degrees, 4/3, 1.0, 10, 12800).
+ *
+ * cullingVolumeDistance: Configures how far forward the far plane of the frustum should extend.
+ * This along with cullingVolumeScale determines the maximum distance from
+ * the camera eye that the actor can be detected at. This quantity is related
+ * to world units by a factor of
+ * (znear - zfar) / ((znear + zfar) * scale).
+ * For default view parameters, increasing this property by 1 increases the
+ * distance by ~0.995 world units.
+ *
+ * cullingVolumeScale: Scales the entire culling volume in all directions except the downward
+ * direction. Both the frustum and the box will scale in size. This quantity is
+ * related to world units by different factors based on direction:
+ * - For the forward and backward directions, they are related in the same way
+ * as above. For default view parameters, increasing this property by 1 increases
+ * the forward and backward scales by ~0.995 world units.
+ * - For the sideways directions, the relation to world units is
+ * (aspect / scale) * tan(0.5 * fov)
+ * For default view parameters, increasing this property by 1 increases the
+ * sideways scales by ~0.77 world units.
+ * - For the upward direction, the relation to world units is
+ * (1 / scale) * tan(0.5 * fov)
+ * For default view parameters, increasing this property by 1 increases the
+ * scale by ~0.58 world units.
+ *
+ * cullingVolumeDownward: Sets the height of the culling volume in the downward direction. Increasing
+ * this value will make actors below the camera more easily detected. This
+ * quantity is related to world units by the same factor as the upward scale.
+ * For default view parameters, increasing this property by 1 increases the
+ * downward height by ~0.58 world units.
+ *
+ * This interactive 3D graph visualizes the shape of the culling volume and has sliders for the 3 properties mentioned
+ * above: https://www.desmos.com/3d/4ztkxqky2a.
+ */
+s32 Actor_CullingVolumeTest(PlayState* play, Actor* actor, Vec3f* projPos, f32 projW) {
+ f32 invW;
- if ((arg2->z > -actor->uncullZoneScale) && (arg2->z < (actor->uncullZoneForward + actor->uncullZoneScale))) {
- var = (arg3 < 1.0f) ? 1.0f : 1.0f / arg3;
+ if ((projPos->z > -actor->cullingVolumeScale) &&
+ (projPos->z < (actor->cullingVolumeDistance + actor->cullingVolumeScale))) {
+ // Clamping `projW` affects points behind the camera, so that the culling volume has
+ // a frustum shape in front of the camera and a box shape behind the camera.
+ invW = (projW < 1.0f) ? 1.0f : 1.0f / (f32)projW;
- if ((((fabsf(arg2->x) - actor->uncullZoneScale) * var) < 1.0f) &&
- (((arg2->y + actor->uncullZoneDownward) * var) > -1.0f) &&
- (((arg2->y - actor->uncullZoneScale) * var) < 1.0f)) {
+ if ((((fabsf(projPos->x) - actor->cullingVolumeScale) * invW) < 1.0f) &&
+ (((projPos->y + actor->cullingVolumeDownward) * invW) > -1.0f) &&
+ (((projPos->y - actor->cullingVolumeScale) * invW) < 1.0f)) {
return true;
}
}
@@ -2668,7 +2858,20 @@ s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) {
return false;
}
-void func_800315AC(PlayState* play, ActorContext* actorCtx) {
+/**
+ * Iterates through all category lists to draw every actor.
+ *
+ * In addition to actors, this function also draws:
+ * - Effects
+ * - EffectSs
+ * - Title Cards
+ * - Farores Wind Pointer
+ * - Light glow
+ * - Actor Collision (debug only)
+ *
+ * Note: If an actor is made visible by Lens of Truth, it will be drawn by `Actor_DrawLensActors` instead.
+ */
+void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
s32 invisibleActorCounter;
Actor* invisibleActors[INVISIBLE_ACTOR_MAX];
ActorListEntry* actorListEntry;
@@ -2686,38 +2889,45 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) {
while (actor != NULL) {
ActorOverlay* overlayEntry = actor->overlayEntry;
- char* actorName = overlayEntry->name != NULL ? overlayEntry->name : "";
+ char* actorName;
+
+#if DEBUG_FEATURES
+ actorName = overlayEntry->name != NULL ? overlayEntry->name : "";
+#else
+ actorName = "";
+#endif
gDPNoOpString(POLY_OPA_DISP++, actorName, i);
gDPNoOpString(POLY_XLU_DISP++, actorName, i);
- if (OOT_DEBUG) {
+ if (DEBUG_FEATURES) {
HREG(66) = i;
}
- if (!OOT_DEBUG || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(68) == 0)) {
+ if (!DEBUG_FEATURES || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(68) == 0)) {
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &actor->world.pos, &actor->projectedPos,
&actor->projectedW);
}
- if (!OOT_DEBUG || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(69) == 0)) {
+ if (!DEBUG_FEATURES || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(69) == 0)) {
if (actor->sfx != 0) {
Actor_UpdateFlaggedAudio(actor);
}
}
- if (!OOT_DEBUG || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(70) == 0)) {
- if (func_800314B0(play, actor)) {
- actor->flags |= ACTOR_FLAG_6;
+ if (!DEBUG_FEATURES || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(70) == 0)) {
+ if (Actor_CullingCheck(play, actor)) {
+ actor->flags |= ACTOR_FLAG_INSIDE_CULLING_VOLUME;
} else {
- actor->flags &= ~ACTOR_FLAG_6;
+ actor->flags &= ~ACTOR_FLAG_INSIDE_CULLING_VOLUME;
}
}
actor->isDrawn = false;
- if (!OOT_DEBUG || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(71) == 0)) {
- if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & (ACTOR_FLAG_5 | ACTOR_FLAG_6))) {
+ if (!DEBUG_FEATURES || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(71) == 0)) {
+ if ((actor->init == NULL) && (actor->draw != NULL) &&
+ (actor->flags & (ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_INSIDE_CULLING_VOLUME))) {
if ((actor->flags & ACTOR_FLAG_REACT_TO_LENS) &&
((play->roomCtx.curRoom.lensMode == LENS_MODE_SHOW_ACTORS) || play->actorCtx.lensActive ||
(actor->room != play->roomCtx.curRoom.num))) {
@@ -2726,7 +2936,7 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) {
invisibleActors[invisibleActorCounter] = actor;
invisibleActorCounter++;
} else {
- if (!OOT_DEBUG || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) ||
+ if (!DEBUG_FEATURES || (HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) ||
(HREG(72) == 0)) {
Actor_Draw(play, actor);
actor->isDrawn = true;
@@ -2739,15 +2949,15 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) {
}
}
- if (!OOT_DEBUG || (HREG(64) != 1) || (HREG(73) != 0)) {
+ if (!DEBUG_FEATURES || (HREG(64) != 1) || (HREG(73) != 0)) {
Effect_DrawAll(play->state.gfxCtx);
}
- if (!OOT_DEBUG || (HREG(64) != 1) || (HREG(74) != 0)) {
+ if (!DEBUG_FEATURES || (HREG(64) != 1) || (HREG(74) != 0)) {
EffectSs_DrawAll(play);
}
- if (!OOT_DEBUG || (HREG(64) != 1) || (HREG(72) != 0)) {
+ if (!DEBUG_FEATURES || (HREG(64) != 1) || (HREG(72) != 0)) {
if (play->actorCtx.lensActive) {
Actor_DrawLensActors(play, invisibleActorCounter, invisibleActors);
if ((play->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(play)) {
@@ -2762,11 +2972,11 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) {
Lights_DrawGlow(play);
}
- if (!OOT_DEBUG || (HREG(64) != 1) || (HREG(75) != 0)) {
+ if (!DEBUG_FEATURES || (HREG(64) != 1) || (HREG(75) != 0)) {
TitleCard_Draw(play, &actorCtx->titleCtx);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if ((HREG(64) != 1) || (HREG(76) != 0)) {
CollisionCheck_DrawCollision(play, &play->colChkCtx);
}
@@ -2919,7 +3129,7 @@ Actor* Actor_RemoveFromCategory(PlayState* play, ActorContext* actorCtx, Actor*
}
void Actor_FreeOverlay(ActorOverlay* actorOverlay) {
- PRINTF(VT_FGCOL(CYAN));
+ PRINTF_COLOR_CYAN();
if (actorOverlay->numLoaded == 0) {
ACTOR_DEBUG_PRINTF(T("アクタークライアントが0になりました\n", "Actor clients are now 0\n"));
@@ -2942,7 +3152,7 @@ void Actor_FreeOverlay(ActorOverlay* actorOverlay) {
actorOverlay->numLoaded);
}
- PRINTF(VT_RST);
+ PRINTF_RST();
}
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX,
@@ -2959,7 +3169,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
overlayEntry = &gActorOverlayTable[actorId];
ASSERT(actorId < ACTOR_ID_MAX, "profile < ACTOR_DLF_MAX", "../z_actor.c", 6883);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
name = overlayEntry->name != NULL ? overlayEntry->name : "";
#endif
@@ -2968,7 +3178,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
ACTOR_DEBUG_PRINTF(T("アクタークラス追加 [%d:%s]\n", "Actor class addition [%d:%s]\n"), actorId, name);
if (actorCtx->total > ACTOR_NUMBER_MAX) {
- PRINTF(VT_COL(YELLOW, BLACK) T("Actorセット数オーバー\n", "Actor set number exceeded\n") VT_RST);
+ PRINTF(ACTOR_COLOR_WARNING T("Actorセット数オーバー\n", "Actor set number exceeded\n") ACTOR_RST);
return NULL;
}
@@ -3000,21 +3210,21 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
}
if (overlayEntry->loadedRamAddr == NULL) {
- PRINTF(VT_COL(RED, WHITE) T("Actorプログラムメモリが確保できません\n",
- "Cannot reserve actor program memory\n") VT_RST);
+ PRINTF(ACTOR_COLOR_ERROR T("Actorプログラムメモリが確保できません\n",
+ "Cannot reserve actor program memory\n") ACTOR_RST);
return NULL;
}
Overlay_Load(overlayEntry->file.vromStart, overlayEntry->file.vromEnd, overlayEntry->vramStart,
overlayEntry->vramEnd, overlayEntry->loadedRamAddr);
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("OVL(a):Seg:%08x-%08x Ram:%08x-%08x Off:%08x %s\n", overlayEntry->vramStart, overlayEntry->vramEnd,
overlayEntry->loadedRamAddr,
(uintptr_t)overlayEntry->loadedRamAddr + (uintptr_t)overlayEntry->vramEnd -
(uintptr_t)overlayEntry->vramStart,
(uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr, name);
- PRINTF(VT_RST);
+ PRINTF_RST();
overlayEntry->numLoaded = 0;
}
@@ -3030,8 +3240,8 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
if ((objectSlot < 0) ||
((profile->category == ACTORCAT_ENEMY) && Flags_GetClear(play, play->roomCtx.curRoom.num))) {
- PRINTF(VT_COL(RED, WHITE) T("データバンク無し!!<データバンク=%d>(profilep->bank=%d)\n",
- "No data bank!! (profilep->bank=%d)\n") VT_RST,
+ PRINTF(ACTOR_COLOR_ERROR T("データバンク無し!!<データバンク=%d>(profilep->bank=%d)\n",
+ "No data bank!! (profilep->bank=%d)\n") ACTOR_RST,
objectSlot, profile->objectId);
Actor_FreeOverlay(overlayEntry);
return NULL;
@@ -3040,9 +3250,9 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
actor = ZELDA_ARENA_MALLOC(profile->instanceSize, name, 1);
if (actor == NULL) {
- PRINTF(VT_COL(RED, WHITE) T("Actorクラス確保できません! %s <サイズ=%dバイト>\n",
- "Actor class cannot be reserved! %s \n"),
- VT_RST, name, profile->instanceSize);
+ PRINTF(ACTOR_COLOR_ERROR T("Actorクラス確保できません! %s <サイズ=%dバイト>\n",
+ "Actor class cannot be reserved! %s \n"),
+ ACTOR_RST, name, profile->instanceSize);
Actor_FreeOverlay(overlayEntry);
return NULL;
}
@@ -3145,39 +3355,45 @@ Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, PlayStat
}
Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) {
- char* name;
+ PlayState* play2 = (PlayState*)play;
Player* player;
Actor* newHead;
ActorOverlay* overlayEntry;
+ UNUSED_NDEBUG char* name;
player = GET_PLAYER(play);
overlayEntry = actor->overlayEntry;
+
+#if DEBUG_FEATURES
name = overlayEntry->name != NULL ? overlayEntry->name : "";
+#else
+ name = "";
+#endif
ACTOR_DEBUG_PRINTF(T("アクタークラス削除 [%s]\n", "Actor class deleted [%s]\n"), name);
- if ((player != NULL) && (actor == player->focusActor)) {
- func_8008EDF0(player);
- Camera_RequestMode(Play_GetCamera(play, Play_GetActiveCamId(play)), CAM_MODE_NORMAL);
+ if ((player != NULL) && (player->focusActor == actor)) {
+ Player_ReleaseLockOn(player);
+ Camera_RequestMode(Play_GetCamera(play2, Play_GetActiveCamId(play2)), CAM_MODE_NORMAL);
}
- if (actor == actorCtx->attention.naviHoverActor) {
+ if (actorCtx->attention.naviHoverActor == actor) {
actorCtx->attention.naviHoverActor = NULL;
}
- if (actor == actorCtx->attention.forcedLockOnActor) {
+ if (actorCtx->attention.forcedLockOnActor == actor) {
actorCtx->attention.forcedLockOnActor = NULL;
}
- if (actor == actorCtx->attention.bgmEnemy) {
+ if (actorCtx->attention.bgmEnemy == actor) {
actorCtx->attention.bgmEnemy = NULL;
}
Audio_StopSfxByPos(&actor->projectedPos);
- Actor_Destroy(actor, play);
+ Actor_Destroy(actor, play2);
- newHead = Actor_RemoveFromCategory(play, actorCtx, actor);
+ newHead = Actor_RemoveFromCategory(play2, actorCtx, actor);
ZELDA_ARENA_FREE(actor, "../z_actor.c", 7242);
@@ -3250,9 +3466,9 @@ void Attention_FindActorInCategory(PlayState* play, ActorContext* actorCtx, Play
while (actor != NULL) {
if ((actor->update != NULL) && ((Player*)actor != player) &&
- CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED)) {
+ ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_ATTENTION_ENABLED)) {
if ((actorCategory == ACTORCAT_ENEMY) &&
- CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) &&
+ ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) &&
(actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sBgmEnemyDistSq)) {
actorCtx->attention.bgmEnemy = actor;
sBgmEnemyDistSq = actor->xyzDistToPlayerSq;
@@ -3311,16 +3527,14 @@ Actor* Attention_FindActor(PlayState* play, ActorContext* actorCtx, Actor** atte
// Search the first 3 actor categories first for an attention actor
// These are Boss, Enemy, and Bg, in order.
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < 3; i++, category++) {
Attention_FindActorInCategory(play, actorCtx, player, *category);
- category++;
}
// If no actor in the above categories was found, then try searching in the remaining categories
if (sNearestAttentionActor == NULL) {
- for (; i < ARRAY_COUNT(sAttentionCategorySearchOrder); i++) {
+ for (; i < ARRAY_COUNT(sAttentionCategorySearchOrder); i++, category++) {
Attention_FindActorInCategory(play, actorCtx, player, *category);
- category++;
}
}
}
@@ -3341,7 +3555,7 @@ Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory) {
Actor* actor = actorCtx->actorLists[actorCategory].head;
while (actor != NULL) {
- if (actorId == actor->id) {
+ if (actor->id == actorId) {
return actor;
}
actor = actor->next;
@@ -3420,41 +3634,29 @@ s16 FaceChange_UpdateRandomSet(FaceChange* faceChange, s16 changeTimerBase, s16
}
void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play) {
- u32 matricesSize;
- u32 dListsSize;
- u32 objectSlotsSize;
+ if ((bodyBreak->matrices = ZELDA_ARENA_MALLOC((count + 1) * sizeof(*bodyBreak->matrices), "../z_actor.c", 7540)) !=
+ NULL &&
+ (bodyBreak->dLists = ZELDA_ARENA_MALLOC((count + 1) * sizeof(*bodyBreak->dLists), "../z_actor.c", 7543)) !=
+ NULL &&
+ (bodyBreak->objectSlots =
+ ZELDA_ARENA_MALLOC((count + 1) * sizeof(*bodyBreak->objectSlots), "../z_actor.c", 7546)) != NULL) {
- matricesSize = (count + 1) * sizeof(*bodyBreak->matrices);
- bodyBreak->matrices = ZELDA_ARENA_MALLOC(matricesSize, "../z_actor.c", 7540);
-
- if (bodyBreak->matrices != NULL) {
- dListsSize = (count + 1) * sizeof(*bodyBreak->dLists);
- bodyBreak->dLists = ZELDA_ARENA_MALLOC(dListsSize, "../z_actor.c", 7543);
+ Lib_MemSet((u8*)bodyBreak->matrices, (count + 1) * sizeof(*bodyBreak->matrices), 0);
+ Lib_MemSet((u8*)bodyBreak->dLists, (count + 1) * sizeof(*bodyBreak->dLists), 0);
+ Lib_MemSet((u8*)bodyBreak->objectSlots, (count + 1) * sizeof(*bodyBreak->objectSlots), 0);
+ bodyBreak->val = 1;
+ } else {
+ if (bodyBreak->matrices != NULL) {
+ ZELDA_ARENA_FREE(bodyBreak->matrices, "../z_actor.c", 7558);
+ }
if (bodyBreak->dLists != NULL) {
- objectSlotsSize = (count + 1) * sizeof(*bodyBreak->objectSlots);
- bodyBreak->objectSlots = ZELDA_ARENA_MALLOC(objectSlotsSize, "../z_actor.c", 7546);
-
- if (bodyBreak->objectSlots != NULL) {
- Lib_MemSet((u8*)bodyBreak->matrices, matricesSize, 0);
- Lib_MemSet((u8*)bodyBreak->dLists, dListsSize, 0);
- Lib_MemSet((u8*)bodyBreak->objectSlots, objectSlotsSize, 0);
- bodyBreak->val = 1;
- return;
- }
+ ZELDA_ARENA_FREE(bodyBreak->dLists, "../z_actor.c", 7561);
}
- }
- if (bodyBreak->matrices != NULL) {
- ZELDA_ARENA_FREE(bodyBreak->matrices, "../z_actor.c", 7558);
- }
-
- if (bodyBreak->dLists != NULL) {
- ZELDA_ARENA_FREE(bodyBreak->dLists, "../z_actor.c", 7561);
- }
-
- if (bodyBreak->objectSlots != NULL) {
- ZELDA_ARENA_FREE(bodyBreak->objectSlots, "../z_actor.c", 7564);
+ if (bodyBreak->objectSlots != NULL) {
+ ZELDA_ARENA_FREE(bodyBreak->objectSlots, "../z_actor.c", 7564);
+ }
}
}
@@ -3470,7 +3672,7 @@ void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s3
bodyBreak->val++;
}
- if (limbIndex != bodyBreak->prevLimbIndex) {
+ if (bodyBreak->prevLimbIndex != limbIndex) {
bodyBreak->count++;
}
@@ -3485,7 +3687,6 @@ void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s3
s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, PlayState* play, s16 type) {
EnPart* spawnedEnPart;
- MtxF* mtx;
s16 objectSlot;
if (bodyBreak->val != BODYBREAK_STATUS_READY) {
@@ -3505,13 +3706,17 @@ s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, PlayState* play, s1
}
}
- mtx = &bodyBreak->matrices[bodyBreak->count];
-
- spawnedEnPart = (EnPart*)Actor_SpawnAsChild(&play->actorCtx, actor, play, ACTOR_EN_PART, mtx->xw, mtx->yw,
- mtx->zw, 0, 0, objectSlot, type);
+ spawnedEnPart = (EnPart*)Actor_SpawnAsChild(
+ &play->actorCtx, actor, play, ACTOR_EN_PART, bodyBreak->matrices[bodyBreak->count].xw,
+ bodyBreak->matrices[bodyBreak->count].yw, bodyBreak->matrices[bodyBreak->count].zw, 0, 0, objectSlot, type);
if (spawnedEnPart != NULL) {
+#if OOT_VERSION < PAL_1_0
+ //! @bug Wrong rotation order compared to Actor_Draw
+ Matrix_MtxFToZYXRotS(&bodyBreak->matrices[bodyBreak->count], &spawnedEnPart->actor.shape.rot, 0);
+#else
Matrix_MtxFToYXZRotS(&bodyBreak->matrices[bodyBreak->count], &spawnedEnPart->actor.shape.rot, 0);
+#endif
spawnedEnPart->displayList = bodyBreak->dLists[bodyBreak->count];
spawnedEnPart->actor.scale = actor->scale;
}
@@ -3541,8 +3746,8 @@ void Actor_SpawnFloorDustRing(PlayState* play, Actor* actor, Vec3f* posXZ, f32 r
accel.y += (Rand_ZeroOne() - 0.5f) * 0.2f;
for (i = amountMinusOne; i >= 0; i--) {
- pos.x = Math_SinF(angle) * radius + posXZ->x;
- pos.z = Math_CosF(angle) * radius + posXZ->z;
+ pos.x = posXZ->x + Math_SinF(angle) * radius;
+ pos.z = posXZ->z + Math_CosF(angle) * radius;
accel.x = (Rand_ZeroOne() - 0.5f) * randAccelWeight;
accel.z = (Rand_ZeroOne() - 0.5f) * randAccelWeight;
@@ -3574,7 +3779,7 @@ void func_80033480(PlayState* play, Vec3f* posBase, f32 randRangeDiameter, s32 a
pos.y = posBase->y + ((Rand_ZeroOne() - 0.5f) * randRangeDiameter);
pos.z = posBase->z + ((Rand_ZeroOne() - 0.5f) * randRangeDiameter);
- scale = (s16)((Rand_ZeroOne() * scaleBase) * 0.2f) + scaleBase;
+ scale = (s16)((scaleBase * Rand_ZeroOne()) * 0.2f) + scaleBase;
var2 = arg6;
if (var2 != 0) {
@@ -3637,9 +3842,7 @@ void Actor_ChangeCategory(PlayState* play, ActorContext* actorCtx, Actor* actor,
Actor* Actor_GetProjectileActor(PlayState* play, Actor* refActor, f32 radius) {
Actor* actor;
Vec3f spA8;
- f32 deltaX;
- f32 deltaY;
- f32 deltaZ;
+ Vec3f delta;
Vec3f sp90;
Vec3f sp84;
@@ -3656,13 +3859,13 @@ Actor* Actor_GetProjectileActor(PlayState* play, Actor* refActor, f32 radius) {
(((ArmsHook*)actor)->timer == 0)) {
actor = actor->next;
} else {
- deltaX = Math_SinS(actor->world.rot.y) * (actor->speed * 10.0f);
- deltaY = actor->velocity.y + (actor->gravity * 10.0f);
- deltaZ = Math_CosS(actor->world.rot.y) * (actor->speed * 10.0f);
+ delta.x = (actor->speed * 10.0f) * Math_SinS(actor->world.rot.y);
+ delta.y = actor->velocity.y + (actor->gravity * 10.0f);
+ delta.z = (actor->speed * 10.0f) * Math_CosS(actor->world.rot.y);
- spA8.x = actor->world.pos.x + deltaX;
- spA8.y = actor->world.pos.y + deltaY;
- spA8.z = actor->world.pos.z + deltaZ;
+ spA8.x = actor->world.pos.x + delta.x;
+ spA8.y = actor->world.pos.y + delta.y;
+ spA8.z = actor->world.pos.z + delta.z;
if (CollisionCheck_CylSideVsLineSeg(refActor->colChkInfo.cylRadius, refActor->colChkInfo.cylHeight,
0.0f, &refActor->world.pos, &actor->world.pos, &spA8, &sp90,
@@ -3774,8 +3977,8 @@ s16 Actor_TestFloorInDirection(Actor* actor, PlayState* play, f32 distance, s16
Math_Vec3f_Copy(&prevActorPos, &actor->world.pos);
prevBgCheckFlags = actor->bgCheckFlags;
- dx = Math_SinS(angle) * distance;
- dz = Math_CosS(angle) * distance;
+ dx = distance * Math_SinS(angle);
+ dz = distance * Math_CosS(angle);
actor->world.pos.x += dx;
actor->world.pos.z += dz;
@@ -3924,7 +4127,7 @@ void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type) {
f32 chainRotZ;
f32 chainsTranslateX;
f32 chainsTranslateY;
- s32 pad;
+ f32 scale;
entry = &sDoorLocksInfo[type];
chainRotZ = entry->chainsRotZInit;
@@ -3937,8 +4140,8 @@ void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type) {
{
f32 rotZStep;
- chainsTranslateX = sinf(entry->chainAngle - chainRotZ) * -(10 - frame) * 0.1f * entry->chainLength;
- chainsTranslateY = cosf(entry->chainAngle - chainRotZ) * (10 - frame) * 0.1f * entry->chainLength;
+ chainsTranslateX = -(10 - frame) * sinf(entry->chainAngle - chainRotZ) * 0.1f * entry->chainLength;
+ chainsTranslateY = (10 - frame) * cosf(entry->chainAngle - chainRotZ) * 0.1f * entry->chainLength;
for (i = 0; i < 4; i++) {
@@ -3963,8 +4166,9 @@ void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type) {
}
}
+ scale = frame * 0.1f;
Matrix_Put(&baseMtxF);
- Matrix_Scale(frame * 0.1f, frame * 0.1f, frame * 0.1f, MTXMODE_APPLY);
+ Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_actor.c", 8314);
gSPDisplayList(POLY_OPA_DISP++, entry->lockDL);
@@ -3977,6 +4181,7 @@ void func_8003424C(PlayState* play, Vec3f* arg1) {
}
void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 bufFlag, s16 duration) {
+ //! @bug This first comparison is always false as COLORFILTER_COLORFLAG_GRAY is out of range of an s16.
if ((colorFlag == COLORFILTER_COLORFLAG_GRAY) && !(colorIntensityMax & COLORFILTER_INTENSITY_FLAG)) {
Actor_PlaySfx(actor, NA_SE_EN_LIGHT_ARROW_HIT);
}
@@ -4113,7 +4318,7 @@ void Npc_TrackPointWithLimits(Actor* actor, NpcInteractInfo* interactInfo, s16 m
s16 minHeadPitch, s16 maxTorsoYaw, s16 maxTorsoPitch, s16 minTorsoPitch, u8 rotateYaw) {
s16 pitchTowardsTarget;
s16 yawTowardsTarget;
- s16 torsoPitch;
+ s16 pitch;
s16 bodyYawDiff;
s16 temp;
Vec3f offsetActorPos;
@@ -4124,7 +4329,8 @@ void Npc_TrackPointWithLimits(Actor* actor, NpcInteractInfo* interactInfo, s16 m
pitchTowardsTarget = Math_Vec3f_Pitch(&offsetActorPos, &interactInfo->trackPos);
yawTowardsTarget = Math_Vec3f_Yaw(&offsetActorPos, &interactInfo->trackPos);
- bodyYawDiff = Math_Vec3f_Yaw(&actor->world.pos, &interactInfo->trackPos) - actor->shape.rot.y;
+ bodyYawDiff = Math_Vec3f_Yaw(&actor->world.pos, &interactInfo->trackPos);
+ bodyYawDiff -= actor->shape.rot.y;
temp = CLAMP(bodyYawDiff, -maxHeadYaw, maxHeadYaw);
Math_SmoothStepToS(&interactInfo->headRot.y, temp, 6, 2000, 1);
@@ -4144,12 +4350,12 @@ void Npc_TrackPointWithLimits(Actor* actor, NpcInteractInfo* interactInfo, s16 m
Math_SmoothStepToS(&actor->shape.rot.y, yawTowardsTarget, 6, 2000, 1);
}
- temp = CLAMP(pitchTowardsTarget, minHeadPitch, (s16)(u16)maxHeadPitch);
+ pitch = pitchTowardsTarget;
+ temp = CLAMP(pitch, minHeadPitch, maxHeadPitch);
Math_SmoothStepToS(&interactInfo->headRot.x, temp, 6, 2000, 1);
- torsoPitch = pitchTowardsTarget - interactInfo->headRot.x;
-
- temp = CLAMP(torsoPitch, minTorsoPitch, maxTorsoPitch);
+ pitch -= interactInfo->headRot.x;
+ temp = CLAMP(pitch, minTorsoPitch, maxTorsoPitch);
Math_SmoothStepToS(&interactInfo->torsoRot.x, temp, 6, 2000, 1);
}
@@ -4341,25 +4547,25 @@ void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr
CLOSE_DISPS(play->state.gfxCtx, "../z_actor.c", 8904);
}
-s16 func_80034DD4(Actor* actor, PlayState* play, s16 arg2, f32 arg3) {
+s16 Actor_UpdateAlphaByDistance(Actor* actor, PlayState* play, s16 alpha, f32 radius) {
Player* player = GET_PLAYER(play);
- f32 var;
+ f32 distance;
if ((play->csCtx.state != CS_STATE_IDLE) || gDebugCamEnabled) {
- var = Math_Vec3f_DistXYZ(&actor->world.pos, &play->view.eye) * 0.25f;
+ distance = Math_Vec3f_DistXYZ(&actor->world.pos, &play->view.eye) * 0.25f;
} else {
- var = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos);
+ distance = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos);
}
- if (arg3 < var) {
+ if (radius < distance) {
actor->flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- Math_SmoothStepToS(&arg2, 0, 6, 0x14, 1);
+ Math_SmoothStepToS(&alpha, 0, 6, 0x14, 1);
} else {
actor->flags |= ACTOR_FLAG_ATTENTION_ENABLED;
- Math_SmoothStepToS(&arg2, 0xFF, 6, 0x14, 1);
+ Math_SmoothStepToS(&alpha, 0xFF, 6, 0x14, 1);
}
- return arg2;
+ return alpha;
}
void Animation_ChangeByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo, s32 index) {
@@ -4377,13 +4583,24 @@ void Animation_ChangeByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo,
frameCount, animationInfo->mode, animationInfo->morphFrames);
}
-void func_80034F54(PlayState* play, s16* arg1, s16* arg2, s32 arg3) {
+/**
+ * Fills two tables with rotation angles that can be used to simulate idle animations.
+ *
+ * The rotation angles are dependent on the current frame, so should be updated regularly, generally every frame.
+ *
+ * This is done for the desired limb by taking either the `sin` of the yTable value or the `cos` of the zTable value,
+ * multiplying by some scale factor (generally 200), and adding that to the already existing rotation.
+ *
+ * Note: With the common scale factor of 200, this effect is practically unnoticeable if the current animation already
+ * has motion involved.
+ */
+void Actor_UpdateFidgetTables(PlayState* play, s16* fidgetTableY, s16* fidgetTableZ, s32 tableLen) {
u32 frames = play->gameplayFrames;
s32 i;
- for (i = 0; i < arg3; i++) {
- arg1[i] = (0x814 + 50 * i) * frames;
- arg2[i] = (0x940 + 50 * i) * frames;
+ for (i = 0; i < tableLen; i++) {
+ fidgetTableY[i] = frames * (FIDGET_FREQ_Y + FIDGET_FREQ_LIMB * i);
+ fidgetTableZ[i] = frames * (FIDGET_FREQ_Z + FIDGET_FREQ_LIMB * i);
}
}
@@ -4438,7 +4655,7 @@ Actor* Actor_FindNearby(PlayState* play, Actor* refActor, s16 actorId, u8 actorC
Actor* actor = play->actorCtx.actorLists[actorCategory].head;
while (actor != NULL) {
- if (actor == refActor || ((actorId != -1) && (actorId != actor->id))) {
+ if (actor == refActor || ((actorId != -1) && (actor->id != actorId))) {
actor = actor->next;
} else {
if (Actor_WorldDistXYZToActor(refActor, actor) <= range) {
@@ -4510,7 +4727,7 @@ u8 func_800355E4(PlayState* play, Collider* collider) {
}
u8 Actor_ApplyDamage(Actor* actor) {
- if (actor->colChkInfo.damage >= actor->colChkInfo.health) {
+ if (actor->colChkInfo.health <= actor->colChkInfo.damage) {
actor->colChkInfo.health = 0;
} else {
actor->colChkInfo.health -= actor->colChkInfo.damage;
@@ -4520,26 +4737,28 @@ u8 Actor_ApplyDamage(Actor* actor) {
}
void Actor_SetDropFlag(Actor* actor, ColliderElement* elem, s32 freezeFlag) {
- if (elem->acHitElem == NULL) {
+ ColliderElement* acHitElem = elem->acHitElem;
+
+ if (acHitElem == NULL) {
actor->dropFlag = 0x00;
- } else if (freezeFlag && (elem->acHitElem->atDmgInfo.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
- actor->freezeTimer = elem->acHitElem->atDmgInfo.damage;
+ } else if (freezeFlag && (acHitElem->atDmgInfo.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
+ actor->freezeTimer = acHitElem->atDmgInfo.damage;
actor->dropFlag = 0x00;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_FIRE) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_FIRE) {
actor->dropFlag = 0x01;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_ICE) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_ICE) {
actor->dropFlag = 0x02;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK1) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK1) {
actor->dropFlag = 0x04;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK2) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK2) {
actor->dropFlag = 0x08;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK3) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK3) {
actor->dropFlag = 0x10;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_LIGHT) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_LIGHT) {
actor->dropFlag = 0x20;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_MAGIC_LIGHT) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_MAGIC_LIGHT) {
if (freezeFlag) {
- actor->freezeTimer = elem->acHitElem->atDmgInfo.damage;
+ actor->freezeTimer = acHitElem->atDmgInfo.damage;
}
actor->dropFlag = 0x40;
} else {
@@ -4549,6 +4768,7 @@ void Actor_SetDropFlag(Actor* actor, ColliderElement* elem, s32 freezeFlag) {
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph, s32 freezeFlag) {
ColliderElement* elem;
+ ColliderElement* acHitElem;
s32 flag;
s32 i;
@@ -4556,27 +4776,27 @@ void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph, s32 freezeFla
for (i = jntSph->count - 1; i >= 0; i--) {
elem = &jntSph->elements[i].base;
- if (elem->acHitElem == NULL) {
+ acHitElem = elem->acHitElem;
+ if (acHitElem == NULL) {
flag = 0x00;
- } else if (freezeFlag &&
- (elem->acHitElem->atDmgInfo.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
- actor->freezeTimer = elem->acHitElem->atDmgInfo.damage;
+ } else if (freezeFlag && (acHitElem->atDmgInfo.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
+ actor->freezeTimer = acHitElem->atDmgInfo.damage;
flag = 0x00;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_FIRE) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_FIRE) {
flag = 0x01;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_ICE) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_ICE) {
flag = 0x02;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK1) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK1) {
flag = 0x04;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK2) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK2) {
flag = 0x08;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK3) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_UNK3) {
flag = 0x10;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_LIGHT) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_LIGHT) {
flag = 0x20;
- } else if (elem->acHitElem->atDmgInfo.dmgFlags & DMG_MAGIC_LIGHT) {
+ } else if (acHitElem->atDmgInfo.dmgFlags & DMG_MAGIC_LIGHT) {
if (freezeFlag) {
- actor->freezeTimer = elem->acHitElem->atDmgInfo.damage;
+ actor->freezeTimer = acHitElem->atDmgInfo.damage;
}
flag = 0x40;
} else {
@@ -4658,28 +4878,40 @@ void func_80035B18(PlayState* play, Actor* actor, u16 textId) {
* Tests if event_chk_inf flag is set.
*/
s32 Flags_GetEventChkInf(s32 flag) {
- return GET_EVENTCHKINF(flag);
+ s32 mask = EVENTCHKINF_MASK(flag);
+ s32 index = EVENTCHKINF_INDEX(flag);
+
+ return gSaveContext.save.info.eventChkInf[index] & mask;
}
/**
* Sets event_chk_inf flag.
*/
void Flags_SetEventChkInf(s32 flag) {
- SET_EVENTCHKINF(flag);
+ s32 mask = EVENTCHKINF_MASK(flag);
+ s32 index = EVENTCHKINF_INDEX(flag);
+
+ gSaveContext.save.info.eventChkInf[index] |= mask;
}
/**
* Tests if inf_table flag is set.
*/
s32 Flags_GetInfTable(s32 flag) {
- return GET_INFTABLE(flag);
+ s32 mask = INFTABLE_MASK(flag);
+ s32 index = INFTABLE_INDEX(flag);
+
+ return gSaveContext.save.info.infTable[index] & mask;
}
/**
* Sets inf_table flag.
*/
void Flags_SetInfTable(s32 flag) {
- SET_INFTABLE(flag);
+ s32 mask = INFTABLE_MASK(flag);
+ s32 index = INFTABLE_INDEX(flag);
+
+ gSaveContext.save.info.infTable[index] |= mask;
}
u32 func_80035BFC(PlayState* play, s16 arg1) {
@@ -4694,7 +4926,7 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
retTextId = 0x1047;
}
} else {
- if (Flags_GetEventChkInf(EVENTCHKINF_02)) {
+ if (Flags_GetEventChkInf(EVENTCHKINF_MIDO_DENIED_DEKU_TREE_ACCESS)) {
if (Flags_GetInfTable(INFTABLE_03)) {
retTextId = 0x1032;
} else {
@@ -4991,8 +5223,6 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
} else {
retTextId = 0x7007;
}
- } else {
- retTextId = 0;
}
break;
case 19:
@@ -5304,7 +5534,7 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
case 53:
if (Flags_GetEventChkInf(EVENTCHKINF_37)) {
retTextId = 0x402D;
- } else if (Flags_GetEventChkInf(EVENTCHKINF_33)) {
+ } else if (Flags_GetEventChkInf(EVENTCHKINF_GAVE_LETTER_TO_KING_ZORA)) {
retTextId = 0x4010;
} else if (Flags_GetEventChkInf(EVENTCHKINF_30)) {
retTextId = 0x400F;
@@ -5334,8 +5564,6 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
} else {
retTextId = 0x401A;
}
- } else {
- retTextId = 0;
}
break;
case 58:
@@ -5402,8 +5630,6 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
} else {
retTextId = 0x2030;
}
- } else {
- retTextId = 0;
}
}
break;
@@ -5438,7 +5664,7 @@ void func_80036E50(u16 textId, s16 arg1) {
case 1:
switch (textId) {
case 0x102F:
- Flags_SetEventChkInf(EVENTCHKINF_02);
+ Flags_SetEventChkInf(EVENTCHKINF_MIDO_DENIED_DEKU_TREE_ACCESS);
Flags_SetInfTable(INFTABLE_0C);
return;
case 0x1033:
@@ -5650,7 +5876,7 @@ void func_80036E50(u16 textId, s16 arg1) {
return;
case 55:
if (textId == 0x401B) {
- Flags_SetEventChkInf(EVENTCHKINF_33);
+ Flags_SetEventChkInf(EVENTCHKINF_GAVE_LETTER_TO_KING_ZORA);
Flags_SetInfTable(INFTABLE_138);
}
return;
@@ -5790,6 +6016,8 @@ s32 func_800374E0(PlayState* play, Actor* actor, u16 textId) {
Flags_SetInfTable(INFTABLE_9A);
ret = 0;
break;
+ case 0x2035:
+ break;
case 0x2036:
case 0x2037:
if (msgCtx->choiceIndex == 0) {
@@ -5917,7 +6145,7 @@ s32 func_80037CB8(PlayState* play, Actor* actor, s16 arg2) {
return ret;
}
-s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3) {
+s32 func_80037D98(PlayState* play, Actor* actor, s32 arg2, s32* arg3) {
s16 var;
s16 sp2C;
s16 sp2A;
diff --git a/src/code/z_actor_dlftbls.c b/src/code/z_actor_dlftbls.c
index 6e1fdb97cf..1e3c6c96ba 100644
--- a/src/code/z_actor_dlftbls.c
+++ b/src/code/z_actor_dlftbls.c
@@ -1,5 +1,7 @@
-#include "global.h"
#include "fault.h"
+#include "printf.h"
+#include "segment_symbols.h"
+#include "z_actor_dlftbls.h"
// Linker symbol declarations (used in the table below)
#define DEFINE_ACTOR(name, _1, _2, _3) DECLARE_OVERLAY_SEGMENT(name)
@@ -24,7 +26,7 @@
#undef DEFINE_ACTOR_UNSET
// Actor Overlay Table definition
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define DEFINE_ACTOR(name, _1, allocType, nameString) \
{ \
@@ -80,7 +82,7 @@ s32 gMaxActorId = 0;
static FaultClient sFaultClient;
void ActorOverlayTable_LogPrint(void) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
ActorOverlay* overlayEntry;
u32 i;
@@ -100,8 +102,8 @@ void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
u32 overlaySize;
uintptr_t ramStart;
uintptr_t ramEnd;
- u32 offset;
#if PLATFORM_N64
+ u32 offset;
uintptr_t pc = gFaultFaultedThread != NULL ? gFaultFaultedThread->context.pc : 0;
uintptr_t ra = gFaultFaultedThread != NULL ? gFaultFaultedThread->context.ra : 0;
u32 i;
@@ -125,7 +127,9 @@ void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
overlaySize = (uintptr_t)overlayEntry->vramEnd - (uintptr_t)overlayEntry->vramStart;
ramStart = (uintptr_t)overlayEntry->loadedRamAddr;
ramEnd = ramStart + overlaySize;
+#if PLATFORM_N64
offset = (uintptr_t)overlayEntry->vramStart - ramStart;
+#endif
if (ramStart != 0) {
#if PLATFORM_N64
Fault_Printf("%3d %08x-%08x %08x", i, ramStart, ramEnd, offset);
@@ -137,7 +141,7 @@ void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
Fault_Printf("\n");
#else
Fault_Printf("%3d %08x-%08x %3d %s\n", i, ramStart, ramEnd, overlayEntry->numLoaded,
- (OOT_DEBUG && overlayEntry->name != NULL) ? overlayEntry->name : "");
+ (DEBUG_FEATURES && overlayEntry->name != NULL) ? overlayEntry->name : "");
#endif
}
}
diff --git a/src/code/code_800430A0.c b/src/code/z_bg_collect.c
similarity index 92%
rename from src/code/code_800430A0.c
rename to src/code/z_bg_collect.c
index 64c1eee817..68966b74fc 100644
--- a/src/code/code_800430A0.c
+++ b/src/code/z_bg_collect.c
@@ -1,5 +1,11 @@
-#include "global.h"
+#include "printf.h"
#include "terminal.h"
+#include "translation.h"
+#include "ultra64.h"
+#include "z64actor.h"
+#include "z64bgcheck.h"
+#include "z64player.h"
+#include "z64skin_matrix.h"
/**
* Update the `carriedActor`'s position based on the dynapoly actor identified by `bgId`.
@@ -36,18 +42,18 @@ void DynaPolyActor_UpdateCarriedActorPos(CollisionContext* colCtx, s32 bgId, Act
SkinMatrix_Vec3fMtxFMultXYZ(&curTransform, &tempPos, &pos);
carriedActor->world.pos = pos;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BGCHECK_XYZ_ABSMAX <= pos.x || pos.x <= -BGCHECK_XYZ_ABSMAX || BGCHECK_XYZ_ABSMAX <= pos.y ||
pos.y <= -BGCHECK_XYZ_ABSMAX || BGCHECK_XYZ_ABSMAX <= pos.z || pos.z <= -BGCHECK_XYZ_ABSMAX) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
//! @bug file and line are not passed to PRINTF
PRINTF(T("BGCheckCollection_typicalActorPos():位置が妥当ではありません。\n"
"pos (%f,%f,%f) file:%s line:%d\n",
"BGCheckCollection_typicalActorPos(): Position is not valid. \n"
"pos (%f,%f,%f) file:%s line:%d\n"),
pos.x, pos.y, pos.z);
- PRINTF(VT_RST);
+ PRINTF_RST();
}
#endif
}
@@ -76,8 +82,8 @@ void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId) {
if (dynaActor != NULL) {
DynaPolyActor_SetActorOnTop(dynaActor);
- if (CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_26)) {
- func_80043538(dynaActor);
+ if (ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_CAN_PRESS_SWITCHES)) {
+ DynaPolyActor_SetSwitchPressed(dynaActor);
}
}
}
diff --git a/src/code/code_80043480.c b/src/code/z_bg_item.c
similarity index 90%
rename from src/code/code_80043480.c
rename to src/code/z_bg_item.c
index 83ca32149f..43c32eb558 100644
--- a/src/code/code_80043480.c
+++ b/src/code/z_bg_item.c
@@ -1,4 +1,7 @@
-#include "global.h"
+#include "z_lib.h"
+#include "z64actor.h"
+#include "z64bgcheck.h"
+#include "z64play.h"
/**
* @param transformFlags How other actors standing on the dynapoly actor's collision move when the dynapoly actor moves.
@@ -44,8 +47,8 @@ void DynaPoly_SetPlayerAbove(CollisionContext* colCtx, s32 floorBgId) {
}
}
-void func_80043538(DynaPolyActor* dynaActor) {
- dynaActor->interactFlags |= DYNA_INTERACT_3;
+void DynaPolyActor_SetSwitchPressed(DynaPolyActor* dynaActor) {
+ dynaActor->interactFlags |= DYNA_INTERACT_ACTOR_SWITCH_PRESSED;
}
s32 DynaPolyActor_IsActorOnTop(DynaPolyActor* dynaActor) {
@@ -72,8 +75,8 @@ s32 DynaPolyActor_IsPlayerAbove(DynaPolyActor* dynaActor) {
}
}
-s32 func_800435B4(DynaPolyActor* dynaActor) {
- if (dynaActor->interactFlags & DYNA_INTERACT_3) {
+s32 DynaPolyActor_IsSwitchPressed(DynaPolyActor* dynaActor) {
+ if (dynaActor->interactFlags & DYNA_INTERACT_ACTOR_SWITCH_PRESSED) {
return true;
} else {
return false;
diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c
index dcc2a0df33..945051552a 100644
--- a/src/code/z_bgcheck.c
+++ b/src/code/z_bgcheck.c
@@ -1,7 +1,20 @@
-#include "global.h"
+#include "libu64/debug.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "line_numbers.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sys_math3d.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64bgcheck.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64skin_matrix.h"
-#pragma increment_block_number "ntsc-1.2:152"
+#pragma increment_block_number "ntsc-1.0:152 ntsc-1.1:152 ntsc-1.2:152"
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList);
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);
@@ -81,18 +94,18 @@ u16 sSurfaceMaterialToSfxOffset[SURFACE_MATERIAL_MAX] = {
SURFACE_SFX_OFFSET_CARPET, // SURFACE_MATERIAL_CARPET
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
/**
* original name: T_BGCheck_PosErrorCheck
*/
s32 BgCheck_PosErrorCheck(Vec3f* pos, const char* file, int line) {
if (pos->x >= BGCHECK_XYZ_ABSMAX || pos->x <= -BGCHECK_XYZ_ABSMAX || pos->y >= BGCHECK_XYZ_ABSMAX ||
pos->y <= -BGCHECK_XYZ_ABSMAX || pos->z >= BGCHECK_XYZ_ABSMAX || pos->z <= -BGCHECK_XYZ_ABSMAX) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("T_BGCheck_PosErrorCheck():位置が妥当ではありません。pos (%f,%f,%f) file:%s line:%d\n",
"T_BGCheck_PosErrorCheck(): Position is invalid. pos (%f,%f,%f) file:%s line:%d\n"),
pos->x, pos->y, pos->z, file, line);
- PRINTF(VT_RST);
+ PRINTF_RST();
return true;
}
return false;
@@ -306,11 +319,11 @@ void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionCon
Vec3s* vtxList;
if (poly == NULL || bgId > BG_ACTOR_MAX || dest == NULL) {
- PRINTF(VT_COL(RED, WHITE));
+ PRINTF_COLOR_ERROR();
PRINTF(T("T_Polygon_GetVertex_bg_ai(): Error %d %d %d 引数が適切ではありません。処理を終了します。\n",
"T_Polygon_GetVertex_bg_ai(): Error %d %d %d Argument not appropriate. Processing terminated.\n"),
poly == NULL, bgId > BG_ACTOR_MAX, dest == NULL);
- PRINTF(VT_RST);
+ PRINTF_RST();
if (dest != NULL) {
//! @bug: dest[2] x and y are not set to 0
@@ -1541,7 +1554,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
};
u32 tblMax;
u32 memSize;
- u32 lookupTblMemSize;
+ UNUSED_NDEBUG u32 lookupTblMemSize;
s32 customNodeListMax;
SSNodeList* nodeList;
u32 customMemSize;
@@ -1610,9 +1623,11 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
colCtx->subdivAmount.x * sizeof(StaticLookup) * colCtx->subdivAmount.y *
colCtx->subdivAmount.z,
ALIGNOF_MASK(StaticLookup));
+
if (colCtx->lookupTbl == NULL) {
- LogUtils_HungupThread("../z_bgcheck.c", 4176);
+ LogUtils_HungupThread("../z_bgcheck.c", LN1(4173, 4176));
}
+
colCtx->minBounds.x = colCtx->colHeader->minBounds.x;
colCtx->minBounds.y = colCtx->colHeader->minBounds.y;
colCtx->minBounds.z = colCtx->colHeader->minBounds.z;
@@ -1629,13 +1644,14 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
colCtx->colHeader->numPolygons * sizeof(u8) + colCtx->dyna.polyNodesMax * sizeof(SSNode) +
colCtx->dyna.polyListMax * sizeof(CollisionPoly) + colCtx->dyna.vtxListMax * sizeof(Vec3s) +
sizeof(CollisionContext);
+
if (customNodeListMax > 0) {
// tblMax is set without checking if customNodeListMax will result in a memory overflow
// this is a non-issue as long as sceneSubdivisionList.nodeListMax is -1
tblMax = customNodeListMax;
} else {
if (colCtx->memSize < memSize) {
- LogUtils_HungupThread("../z_bgcheck.c", 4230);
+ LogUtils_HungupThread("../z_bgcheck.c", LN1(4227, 4230));
}
tblMax = (colCtx->memSize - memSize) / sizeof(SSNode);
}
@@ -1644,10 +1660,10 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
SSNodeList_Alloc(play, &colCtx->polyNodes, tblMax, colCtx->colHeader->numPolygons);
lookupTblMemSize = BgCheck_InitializeStaticLookup(colCtx, play, colCtx->lookupTbl);
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("/*---結局 BG使用サイズ %dbyte---*/\n", "/*---BG size used in the end %dbyte---*/\n"),
memSize + lookupTblMemSize);
- PRINTF(VT_RST);
+ PRINTF_RST();
DynaPoly_Init(play, &colCtx->dyna);
DynaPoly_Alloc(play, &colCtx->dyna);
@@ -1665,10 +1681,10 @@ CollisionHeader* BgCheck_GetCollisionHeader(CollisionContext* colCtx, s32 bgId)
return NULL;
}
if (!(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE)) {
- PRINTF(VT_COL(YELLOW, BLACK));
+ PRINTF_COLOR_WARNING();
PRINTF(T("T_BGCheck_getBGDataInfo():そのbg_actor_indexは使われておりません。index=%d\n",
"T_BGCheck_getBGDataInfo(): That bg_actor_index is not in use. index=%d\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return NULL;
}
return colCtx->dyna.bgActors[bgId].colHeader;
@@ -1716,7 +1732,7 @@ f32 BgCheck_RaycastDownImpl(PlayState* play, CollisionContext* colCtx, u16 xpFla
break;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BgCheck_PosErrorCheck(&checkPos, "../z_bgcheck.c", 4410)) {
if (actor != NULL) {
PRINTF(T("こいつ,pself_actor->name %d\n", "This guy, pself_actor->name %d\n"), actor->id);
@@ -1968,7 +1984,7 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul
dy = posNext->y - posPrev->y;
dz = posNext->z - posPrev->z;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BgCheck_PosErrorCheck(posNext, "../z_bgcheck.c", 4831) == true ||
BgCheck_PosErrorCheck(posPrev, "../z_bgcheck.c", 4832) == true) {
if (actor != NULL) {
@@ -2162,7 +2178,7 @@ s32 BgCheck_CheckCeilingImpl(CollisionContext* colCtx, u16 xpFlags, f32* outY, V
*outBgId = BGCHECK_SCENE;
*outY = pos->y;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BgCheck_PosErrorCheck(pos, "../z_bgcheck.c", 5206) == true) {
if (actor != NULL) {
PRINTF(T("こいつ,pself_actor->name %d\n", "This guy, pself_actor->name %d\n"), actor->id);
@@ -2235,7 +2251,7 @@ s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
*outBgId = BGCHECK_SCENE;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BgCheck_PosErrorCheck(posA, "../z_bgcheck.c", 5334) == true ||
BgCheck_PosErrorCheck(posB, "../z_bgcheck.c", 5335) == true) {
if (actor != NULL) {
@@ -2458,7 +2474,7 @@ s32 BgCheck_SphVsFirstPolyImpl(CollisionContext* colCtx, u16 xpFlags, CollisionP
*outBgId = BGCHECK_SCENE;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BgCheck_PosErrorCheck(center, "../z_bgcheck.c", 5852) == true) {
if (actor != NULL) {
PRINTF(T("こいつ,pself_actor->name %d\n", "This guy, pself_actor->name %d\n"), actor->id);
@@ -2734,10 +2750,10 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto
}
if (!foundSlot) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("DynaPolyInfo_setActor():ダイナミックポリゴン 空きインデックスはありません\n",
"DynaPolyInfo_setActor(): Dynamic polygon no free indexes\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return BG_ACTOR_MAX;
}
@@ -2745,9 +2761,9 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
dyna->bgActorFlags[bgId] &= ~BGACTOR_1;
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("DynaPolyInfo_setActor():index %d\n", bgId);
- PRINTF(VT_RST);
+ PRINTF_RST();
return bgId;
}
@@ -2797,27 +2813,27 @@ void DynaPoly_EnableCeilingCollision(PlayState* play, DynaCollisionContext* dyna
void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
DynaPolyActor* actor;
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("DynaPolyInfo_delReserve():index %d\n", bgId);
- PRINTF(VT_RST);
+ PRINTF_RST();
if (!DynaPoly_IsBgIdBgActor(bgId)) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (bgId == -1) {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("DynaPolyInfo_delReserve():削除されているはずの(?)\n"
"インデックス(== -1)のため,処理を中止します。\n",
"DynaPolyInfo_delReserve():The index that should have been deleted(?)\n"
" was(== -1), processing aborted.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
} else {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("DynaPolyInfo_delReserve():"
"確保していない/出来なかったインデックスの解放のため、処理を中止します。index == %d\n",
"DynaPolyInfo_delReserve():"
" Unable to deallocate index / index unallocated, processing aborted. index == %d\n"),
bgId);
- PRINTF(VT_RST);
+ PRINTF_RST();
}
#endif
@@ -2874,16 +2890,16 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3
return;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (!(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons)) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("DynaPolyInfo_expandSRT():polygon over %dが%dを越えるとダメ\n",
"DynaPolyInfo_expandSRT():polygon over do not use if %d exceeds %d\n"),
*polyStartIndex + pbgdata->numPolygons, dyna->polyListMax);
}
if (!(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices)) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("DynaPolyInfo_expandSRT():vertex over %dが%dを越えるとダメ\n",
"DynaPolyInfo_expandSRT():vertex over do not use if %d exceeds %d\n"),
*vtxStartIndex + pbgdata->numVertices, dyna->vtxListMax);
@@ -3063,9 +3079,9 @@ void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna) {
for (i = 0; i < BG_ACTOR_MAX; i++) {
if (dyna->bgActorFlags[i] & BGACTOR_1) {
// Initialize BgActor
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("DynaPolyInfo_setup():削除 index=%d\n", "DynaPolyInfo_setup(): Delete index=%d\n"), i);
- PRINTF(VT_RST);
+ PRINTF_RST();
dyna->bgActorFlags[i] = 0;
BgActor_Initialize(play, &dyna->bgActors[i]);
@@ -3073,9 +3089,9 @@ void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna) {
}
if (dyna->bgActors[i].actor != NULL && dyna->bgActors[i].actor->update == NULL) {
// Delete BgActor
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("DynaPolyInfo_setup():削除 index=%d\n", "DynaPolyInfo_setup(): Delete index=%d\n"), i);
- PRINTF(VT_RST);
+ PRINTF_RST();
actor = DynaPoly_GetActor(&play->colCtx, i);
if (actor == NULL) {
return;
@@ -4439,7 +4455,7 @@ s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec
return result;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
/**
* Draw a list of dyna polys, specified by `ssList`
*/
diff --git a/src/code/z_camera.c b/src/code/z_camera.c
index 50485d3bc7..cf18c3634a 100644
--- a/src/code/z_camera.c
+++ b/src/code/z_camera.c
@@ -1,11 +1,33 @@
-#include "ultra64.h"
-#include "global.h"
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "controller.h"
+#include "db_camera.h"
+#include "gfx.h"
+#include "letterbox.h"
+#include "one_point_cutscene.h"
#include "quake.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_math3d.h"
#include "terminal.h"
+#include "translation.h"
+#include "ultra64.h"
+#include "z_lib.h"
+#include "zelda_arena.h"
+#include "z64audio.h"
+#include "z64cutscene_spline.h"
+#include "z64debug.h"
+#include "z64olib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
-#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
- "ntsc-1.2:192"
+#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" \
+ "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags);
s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange);
@@ -17,11 +39,11 @@ s32 Camera_UpdateWater(Camera* camera);
#define CAMERA_CHECK_BTN(input, btn) CHECK_BTN_ALL((input)->press.button, (btn))
#endif
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 Camera_QRegInit(void);
#endif
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define CAM_DEBUG_RELOAD_PREG(camera) \
if (R_RELOAD_CAM_PARAMS) { \
Camera_CopyPREGToModeValues(camera); \
@@ -35,7 +57,7 @@ s32 Camera_QRegInit(void);
// CameraModeValue arrays. Although sometimes some read-write data is reset as well
#define RELOAD_PARAMS(camera) (camera->animState == 0 || camera->animState == 10 || camera->animState == 20)
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define CAM_DEBUG_RELOAD_PARAMS R_RELOAD_CAM_PARAMS
#else
#define CAM_DEBUG_RELOAD_PARAMS true
@@ -53,7 +75,7 @@ s32 Camera_QRegInit(void);
// Load the next value and scale down from camera read-only data stored in CameraModeValue
#define GET_NEXT_SCALED_RO_DATA(values) CAM_DATA_SCALED(GET_NEXT_RO_DATA(values))
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define CAM_GLOBAL_0 OREG(0)
#define CAM_GLOBAL_1 OREG(1)
@@ -399,6 +421,7 @@ s32 Camera_BGCheckInfo(Camera* camera, Vec3f* from, CamColChk* to) {
to->pos.y = to->norm.y + toNewPos.y;
to->pos.z = to->norm.z + toNewPos.z;
+ //! @bug floorBgId is uninitialized if BgCheck_CameraLineTest1 returned true above
return floorBgId + 1;
}
@@ -582,7 +605,7 @@ f32 Camera_GetFloorYLayer(Camera* camera, Vec3f* norm, Vec3f* pos, s32* bgId) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (i == 0) {
PRINTF(VT_COL(YELLOW, BLACK) "camera: foward check: too many layer!\n" VT_RST);
}
@@ -611,10 +634,10 @@ Vec3s* Camera_GetBgCamFuncData(Camera* camera) {
*/
s32 Camera_GetBgCamIndex(Camera* camera, s32* bgId, CollisionPoly* poly) {
s32 bgCamIndex;
- PosRot playerPosRot;
+ UNUSED PosRot playerPosRot;
s32 ret;
- playerPosRot = Actor_GetWorldPosShapeRot(&camera->player->actor); // unused.
+ playerPosRot = Actor_GetWorldPosShapeRot(&camera->player->actor);
bgCamIndex = SurfaceType_GetBgCamIndex(&camera->play->colCtx, poly, *bgId);
if (BgCheck_GetBgCamSettingImpl(&camera->play->colCtx, bgCamIndex, *bgId) == CAM_SET_NONE) {
@@ -867,7 +890,7 @@ void Camera_CopyDataToRegs(Camera* camera, s16 mode) {
CameraModeValue* valueP;
s32 i;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (PREG(82)) {
PRINTF("camera: res: stat (%d/%d/%d)\n", camera->camId, camera->setting, mode);
}
@@ -886,7 +909,7 @@ void Camera_CopyDataToRegs(Camera* camera, s16 mode) {
camera->animState = 0;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 Camera_CopyPREGToModeValues(Camera* camera) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
CameraModeValue* valueP;
@@ -946,10 +969,10 @@ void Camera_UpdateInterface(s16 interfaceField) {
Vec3f Camera_BGCheckCorner(Vec3f* linePointA, Vec3f* linePointB, CamColChk* pointAColChk, CamColChk* pointBColChk) {
Vec3f closestPoint;
- bool result;
+ UNUSED_NDEBUG bool result;
result = func_800427B4(pointAColChk->poly, pointBColChk->poly, linePointA, linePointB, &closestPoint);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (!result) {
PRINTF(VT_COL(YELLOW, BLACK) "camera: corner check no cross point %x %x\n" VT_RST, pointAColChk, pointBColChk);
return pointAColChk->pos;
@@ -2301,7 +2324,7 @@ s32 Camera_Parallel1(Camera* camera) {
camera->fov = Camera_LERPCeilF(roData->fovTarget, camera->fov, camera->fovUpdateRate, 1.0f);
camera->roll = Camera_LERPCeilS(0, camera->roll, 0.5, 0xA);
camera->atLERPStepScale = Camera_ClampLERPScale(camera, sp6A ? roData->unk_1C : roData->unk_14);
- //! @bug doesn't return
+ //! @bug Missing return, but the return value is not used.
}
s32 Camera_Parallel2(Camera* camera) {
@@ -2320,7 +2343,7 @@ s32 Camera_Parallel3(Camera* camera) {
if (interfaceField & PARALLEL3_FLAG_1) {
camera->stateFlags |= CAM_STATE_CAM_FUNC_FINISH;
}
- //! @bug doesn't return
+ //! @bug Missing return, but the return value is not used.
}
s32 Camera_Parallel4(Camera* camera) {
@@ -2346,7 +2369,7 @@ s32 Camera_Jump1(Camera* camera) {
VecGeo eyeDiffGeo;
VecGeo eyeDiffTarget;
PosRot* playerPosRot = &camera->playerPosRot;
- PosRot playerhead;
+ UNUSED PosRot playerhead;
s16 tangle;
Jump1ReadOnlyData* roData = &camera->paramData.jump1.roData;
Jump1ReadWriteData* rwData = &camera->paramData.jump1.rwData;
@@ -2370,7 +2393,6 @@ s32 Camera_Jump1(Camera* camera) {
CAM_DEBUG_RELOAD_PREG(camera);
- // playerhead never gets used.
playerhead = Actor_GetFocus(&camera->player->actor);
eyeAtOffset = OLib_Vec3fDiffToVecGeo(at, eye);
@@ -2489,7 +2511,7 @@ s32 Camera_Jump2(Camera* camera) {
VecGeo adjAtToEyeDir;
VecGeo bgChkPara;
VecGeo atToEyeNextDir;
- VecGeo atToEyeDir;
+ UNUSED VecGeo atToEyeDir;
f32 temp_f14;
f32 temp_f16;
f32 sp90;
@@ -2724,7 +2746,7 @@ s32 Camera_Jump3(Camera* camera) {
roData->interfaceField = GET_NEXT_RO_DATA(values);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (R_RELOAD_CAM_PARAMS) {
prevMode = camera->mode;
camera->mode = rwData->mode;
@@ -2981,7 +3003,7 @@ s32 Camera_Battle1(Camera* camera) {
rwData->target = camera->target;
camera->animState++;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (rwData->target->id > 0) {
PRINTF("camera: battle: target actor name " VT_FGCOL(BLUE) "%d" VT_RST "\n", rwData->target->id);
} else {
@@ -3120,6 +3142,7 @@ s32 Camera_Battle1(Camera* camera) {
: 1.0f) *
(fov - ((fov * 0.05f) * distRatio)),
camera->fov, camera->fovUpdateRate, 1.0f);
+ //! @bug Missing return, but the return value is not used.
}
s32 Camera_Battle2(Camera* camera) {
@@ -3466,13 +3489,13 @@ s32 Camera_KeepOn3(Camera* camera) {
Actor* colChkActors[2];
VecGeo targetToPlayerDir;
VecGeo atToEyeAdj;
- VecGeo atToEyeDir;
+ UNUSED VecGeo atToEyeDir;
VecGeo atToEyeNextDir;
s32 i;
s32 angleCnt;
s16 sp82;
s16 sp80;
- PosRot playerPosRot;
+ UNUSED PosRot playerPosRot;
PosRot* camPlayerPosRot = &camera->playerPosRot;
KeepOn3ReadOnlyData* roData = &camera->paramData.keep3.roData;
KeepOn3ReadWriteData* rwData = &camera->paramData.keep3.rwData;
@@ -3504,7 +3527,7 @@ s32 Camera_KeepOn3(Camera* camera) {
roData->yOffset = GET_NEXT_SCALED_RO_DATA(values) * playerHeight * yNormal;
roData->minDist = GET_NEXT_RO_DATA(values);
roData->maxDist = GET_NEXT_RO_DATA(values);
- roData->swingYawInital = GET_NEXT_RO_DATA(values);
+ roData->swingYawInitial = GET_NEXT_RO_DATA(values);
roData->swingYawFinal = GET_NEXT_RO_DATA(values);
roData->swingPitchInitial = GET_NEXT_RO_DATA(values);
roData->swingPitchFinal = GET_NEXT_RO_DATA(values);
@@ -3536,7 +3559,7 @@ s32 Camera_KeepOn3(Camera* camera) {
spBC = ((1.0f - temp_f0) * targetToPlayerDir.r) / rwData->animTimer;
swingAngle = F32_LERPIMP(roData->swingPitchInitial, roData->swingPitchFinal, temp_f0);
atToEyeAdj.pitch = CAM_DEG_TO_BINANG(swingAngle) + ((s16)(-(targetToPlayerDir.pitch * roData->swingPitchAdj)));
- swingAngle = F32_LERPIMP(roData->swingYawInital, roData->swingYawFinal, temp_f0);
+ swingAngle = F32_LERPIMP(roData->swingYawInitial, roData->swingYawFinal, temp_f0);
if (roData->interfaceField & KEEPON3_FLAG_4) {
if ((s16)(targetToPlayerDir.yaw - atToEyeNextDir.yaw) < 0) {
atToEyeAdj.yaw = targetToPlayerDir.yaw + CAM_DEG_TO_BINANG(swingAngle);
@@ -3638,7 +3661,7 @@ s32 Camera_KeepOn3(Camera* camera) {
}
#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:112"
+ "ique-cn:128 ntsc-1.0:86 ntsc-1.1:86 ntsc-1.2:86 pal-1.0:86 pal-1.1:86"
s32 Camera_KeepOn4(Camera* camera) {
static Vec3f D_8015BD50;
@@ -3652,7 +3675,7 @@ s32 Camera_KeepOn4(Camera* camera) {
f32 temp_f0_2;
CollisionPoly* spC0;
VecGeo spB8;
- VecGeo spB0;
+ UNUSED VecGeo spB0;
VecGeo spA8;
s16* temp_s0 = &camera->data2;
s16 spA2;
@@ -3889,7 +3912,7 @@ s32 Camera_KeepOn4(Camera* camera) {
spB8.pitch = D_8011D3CC[i] + spA2;
D_8015BD70 = Camera_AddVecGeoToVec3f(&D_8015BD50, &spB8);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
PRINTF("camera: item: BG&collision check %d time(s)\n", i);
#endif
}
@@ -3951,6 +3974,7 @@ s32 Camera_KeepOn4(Camera* camera) {
Camera_BGCheck(camera, at, eye);
camera->fov = Camera_LERPCeilF(roData->unk_18, camera->fov, camera->fovUpdateRate, 1.0f);
camera->roll = Camera_LERPCeilS(0, camera->roll, 0.5f, 0xA);
+ //! @bug Missing return, but the return value is not used.
}
/**
@@ -4187,7 +4211,7 @@ s32 Camera_Fixed3(Camera* camera) {
Vec3f* eyeNext = &camera->eyeNext;
VecGeo atGeo;
BgCamFuncData* bgCamFuncData;
- VecGeo eyeAtOffset;
+ UNUSED VecGeo eyeAtOffset;
Fixed3ReadOnlyData* roData = &camera->paramData.fixd3.roData;
Fixed3ReadWriteData* rwData = &camera->paramData.fixd3.rwData;
s32 pad;
@@ -4345,7 +4369,7 @@ s32 Camera_Subj3(Camera* camera) {
Vec3f* at = &camera->at;
Vec3f* eyeNext = &camera->eyeNext;
Vec3f sp98;
- Vec3f sp8C;
+ UNUSED Vec3f sp8C;
VecGeo sp84;
VecGeo sp7C;
VecGeo tGeo;
@@ -4371,7 +4395,7 @@ s32 Camera_Subj3(Camera* camera) {
func_80043ABC(camera);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
Camera_CopyPREGToModeValues(camera);
#endif
@@ -4740,7 +4764,7 @@ s32 Camera_Unique1(Camera* camera) {
VecGeo eyeAtOffset;
VecGeo eyeNextAtOffset;
PosRot* playerPosRot = &camera->playerPosRot;
- PosRot playerhead;
+ UNUSED PosRot playerhead;
Unique1ReadOnlyData* roData = &camera->paramData.uniq1.roData;
Unique1ReadWriteData* rwData = &camera->paramData.uniq1.rwData;
s32 pad;
@@ -4783,7 +4807,7 @@ s32 Camera_Unique1(Camera* camera) {
camera->animState++;
}
- playerhead = Actor_GetFocus(&camera->player->actor); // unused
+ playerhead = Actor_GetFocus(&camera->player->actor);
camera->yawUpdateRateInv = Camera_LERPCeilF(100.0f, camera->yawUpdateRateInv, CAM_UPDATE_RATE_STEP_SCALE_XZ, 0.1f);
camera->pitchUpdateRateInv =
@@ -5074,20 +5098,20 @@ s32 Camera_Unique0(Camera* camera) {
atPlayerOffset.pitch = -bgCamRot.x;
rwData->eyeAndDirection.dir = OLib_VecGeoToVec3f(&atPlayerOffset);
Math3D_LineClosestToPoint(&rwData->eyeAndDirection, &playerPosRot->pos, &camera->at);
- rwData->initalPos = playerPosRot->pos;
+ rwData->initialPos = playerPosRot->pos;
camera->animState++;
}
if (player->stateFlags1 & PLAYER_STATE1_29) {
- rwData->initalPos = playerPosRot->pos;
+ rwData->initialPos = playerPosRot->pos;
}
if (roData->interfaceField & UNIQUE0_FLAG_0) {
if (rwData->animTimer > 0) {
rwData->animTimer--;
- rwData->initalPos = playerPosRot->pos;
+ rwData->initialPos = playerPosRot->pos;
} else if (!(player->stateFlags1 & PLAYER_STATE1_29) &&
- ((OLib_Vec3fDistXZ(&playerPosRot->pos, &rwData->initalPos) >= 10.0f) ||
+ ((OLib_Vec3fDistXZ(&playerPosRot->pos, &rwData->initialPos) >= 10.0f) ||
CAMERA_CHECK_BTN(&D_8015BD7C->state.input[0], BTN_A) ||
CAMERA_CHECK_BTN(&D_8015BD7C->state.input[0], BTN_B) ||
CAMERA_CHECK_BTN(&D_8015BD7C->state.input[0], BTN_CLEFT) ||
@@ -5111,7 +5135,7 @@ s32 Camera_Unique0(Camera* camera) {
sCameraInterfaceField = CAM_INTERFACE_FIELD(CAM_LETTERBOX_NONE, CAM_HUD_VISIBILITY_ALL, 0);
}
} else {
- rwData->initalPos = playerPosRot->pos;
+ rwData->initialPos = playerPosRot->pos;
}
if (!(player->stateFlags1 & PLAYER_STATE1_29) &&
@@ -5743,7 +5767,7 @@ s32 Camera_Unique9(Camera* camera) {
return true;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void Camera_DebugPrintSplineArray(char* name, s16 length, CutsceneCameraPoint cameraPoints[]) {
s32 i;
@@ -5824,7 +5848,7 @@ s32 Camera_Demo1(Camera* camera) {
PRINTF(VT_SGR("1") "%06u:" VT_RST " camera: spline demo: start %s \n", camera->play->state.frames,
*relativeToPlayer == 0 ? T("絶対", "absolute") : T("相対", "relative"));
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (PREG(93)) {
Camera_DebugPrintSplineArray("CENTER", 5, csAtPoints);
Camera_DebugPrintSplineArray(" EYE", 5, csEyePoints);
@@ -5845,7 +5869,7 @@ s32 Camera_Demo1(Camera* camera) {
Camera_RotateAroundPoint(&curPlayerPosRot, &csEyeUpdate, eyeNext);
Camera_RotateAroundPoint(&curPlayerPosRot, &csAtUpdate, at);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
else {
PRINTF(VT_COL(RED, WHITE) "camera: spline demo: owner dead\n" VT_RST);
}
@@ -6609,7 +6633,7 @@ s32 Camera_Demo5(Camera* camera) {
sp4A = playerhead.rot.y - playerTargetGeo.yaw;
if (camera->target->category == ACTORCAT_PLAYER) {
framesDiff = camera->play->state.frames - sDemo5PrevAction12Frame;
- if (player->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) {
+ if (player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
// holding object over head.
Player_SetCsActionWithHaltedActors(camera->play, camera->target, PLAYER_CSACTION_8);
} else if (ABS(framesDiff) > 3000) {
@@ -6718,7 +6742,7 @@ s32 Camera_Demo7(Camera* camera) {
camera->stateFlags |= CAM_STATE_DEMO7;
camera->animState++;
}
- //! @bug doesn't return
+ //! @bug Missing return, but the return value is not used.
}
s32 Camera_Demo8(Camera* camera) {
@@ -6935,11 +6959,11 @@ s32 Camera_Special4(Camera* camera) {
sCameraInterfaceField = CAM_INTERFACE_FIELD(CAM_LETTERBOX_LARGE, CAM_HUD_VISIBILITY_NOTHING_ALT, 0);
camera->fov = 40.0f;
camera->animState++;
- rwData->initalTimer = camera->timer;
+ rwData->initialTimer = camera->timer;
}
camera->fov = Camera_LERPCeilF(80.0f, camera->fov, 1.0f / *timer, 0.1f);
- if ((rwData->initalTimer - *timer) < 0xF) {
+ if ((rwData->initialTimer - *timer) < 0xF) {
(*timer)--;
return false;
} else {
@@ -6974,7 +6998,7 @@ s32 Camera_Special5(Camera* camera) {
CamColChk sp7C;
VecGeo sp74;
VecGeo sp6C;
- VecGeo sp64;
+ UNUSED VecGeo sp64;
VecGeo sp5C;
PosRot* playerPosRot = &camera->playerPosRot;
Special5ReadOnlyData* roData = &camera->paramData.spec5.roData;
@@ -7176,7 +7200,7 @@ s32 Camera_Special6(Camera* camera) {
Vec3f eyePosCalc;
Vec3f eyeAnim;
Vec3f atAnim;
- VecGeo eyeAtOffset;
+ UNUSED VecGeo eyeAtOffset;
PosRot* playerPosRot = &camera->playerPosRot;
BgCamFuncData* bgCamFuncData;
Vec3s bgCamRot;
@@ -7219,7 +7243,7 @@ s32 Camera_Special6(Camera* camera) {
// Overwrite hud visibility to CAM_HUD_VISIBILITY_HEARTS_FORCE
sCameraInterfaceField = (sCameraInterfaceField & (u16)~CAM_HUD_VISIBILITY_MASK) |
CAM_HUD_VISIBILITY(CAM_HUD_VISIBILITY_HEARTS_FORCE);
- rwData->initalPlayerY = playerPosRot->pos.y;
+ rwData->initialPlayerY = playerPosRot->pos.y;
rwData->animTimer = 12;
*eyeNext = bgCamPos;
if (camera->animState == 0) {
@@ -7232,7 +7256,7 @@ s32 Camera_Special6(Camera* camera) {
timerF = rwData->animTimer;
eyePosCalc = *eyeNext;
eyePosCalc.x += (playerPosRot->pos.x - eyePosCalc.x) * 0.5f;
- eyePosCalc.y += (playerPosRot->pos.y - rwData->initalPlayerY) * 0.2f;
+ eyePosCalc.y += (playerPosRot->pos.y - rwData->initialPlayerY) * 0.2f;
eyeAnim = eyePosCalc;
eyeAnim.y = Camera_LERPCeilF(eyePosCalc.y, eye->y, 0.5f, 0.01f);
@@ -7258,7 +7282,7 @@ s32 Camera_Special6(Camera* camera) {
(sCameraInterfaceField & (u16)~CAM_HUD_VISIBILITY_MASK) | CAM_HUD_VISIBILITY(CAM_HUD_VISIBILITY_ALL);
eyePosCalc = *eyeNext;
eyePosCalc.x += (playerPosRot->pos.x - eyePosCalc.x) * 0.5f;
- eyePosCalc.y += (playerPosRot->pos.y - rwData->initalPlayerY) * 0.2f;
+ eyePosCalc.y += (playerPosRot->pos.y - rwData->initialPlayerY) * 0.2f;
*eye = eyePosCalc;
eye->y = Camera_LERPCeilF(eyePosCalc.y, eye->y, 0.5f, 0.01f);
@@ -7457,7 +7481,7 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState
if (sInitRegs) {
s32 i;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
for (i = 0; i < sOREGInitCnt; i++) {
OREG(i) = sOREGInit[i];
}
@@ -7472,7 +7496,7 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState
PREG(88) = -1;
}
camera->play = D_8015BD7C = play;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
DebugCamera_Init(&D_8015BD80, camera);
#endif
curUID = sNextUID;
@@ -7527,10 +7551,10 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState
camera->quakeOffset.z = 0;
camera->atLERPStepScale = 1;
sCameraInterfaceField = CAM_INTERFACE_FIELD(CAM_LETTERBOX_IGNORE, CAM_HUD_VISIBILITY_IGNORE, 0);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
sDbgModeIdx = -1;
#endif
- D_8011D3F0 = 3;
+ sSceneInitLetterboxTimer = 3; // show letterbox for 3 frames at the start of a new scene
PRINTF(VT_FGCOL(BLUE) "camera: initialize --- " VT_RST " UID %d\n", camera->uid);
}
@@ -7539,18 +7563,18 @@ void func_80057FC4(Camera* camera) {
camera->prevSetting = camera->setting = CAM_SET_FREE0;
camera->stateFlags &= ~CAM_STATE_CHECK_BG;
} else if (camera->play->roomCtx.curRoom.roomShape->base.type != ROOM_SHAPE_TYPE_IMAGE) {
- switch (camera->play->roomCtx.curRoom.behaviorType1) {
- case ROOM_BEHAVIOR_TYPE1_1:
+ switch (camera->play->roomCtx.curRoom.type) {
+ case ROOM_TYPE_DUNGEON:
Camera_ChangeDoorCam(camera, NULL, -99, 0, 0, 18, 10);
camera->prevSetting = camera->setting = CAM_SET_DUNGEON0;
break;
- case ROOM_BEHAVIOR_TYPE1_0:
+ case ROOM_TYPE_NORMAL:
PRINTF("camera: room type: default set field\n");
Camera_ChangeDoorCam(camera, NULL, -99, 0, 0, 18, 10);
camera->prevSetting = camera->setting = CAM_SET_NORMAL0;
break;
default:
- PRINTF("camera: room type: default set etc (%d)\n", camera->play->roomCtx.curRoom.behaviorType1);
+ PRINTF("camera: room type: default set etc (%d)\n", camera->play->roomCtx.curRoom.type);
Camera_ChangeDoorCam(camera, NULL, -99, 0, 0, 18, 10);
camera->prevSetting = camera->setting = CAM_SET_NORMAL0;
camera->stateFlags |= CAM_STATE_CHECK_BG;
@@ -7629,7 +7653,7 @@ void Camera_InitDataUsingPlayer(Camera* camera, Player* player) {
camera->nextBgCamIndex = -1;
camera->atLERPStepScale = 1.0f;
Camera_CopyDataToRegs(camera, camera->mode);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
Camera_QRegInit();
#endif
PRINTF(VT_FGCOL(BLUE) "camera: personalize ---" VT_RST "\n");
@@ -7644,7 +7668,7 @@ s16 Camera_ChangeStatus(Camera* camera, s16 status) {
CameraModeValue* valueP;
s32 i;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (PREG(82)) {
PRINTF("camera: change camera status: cond %c%c\n", status == CAM_STAT_ACTIVE ? 'o' : 'x',
camera->status != CAM_STAT_ACTIVE ? 'o' : 'x');
@@ -7670,7 +7694,7 @@ s16 Camera_ChangeStatus(Camera* camera, s16 status) {
return camera->status;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void Camera_PrintSettings(Camera* camera) {
char sp58[8];
char sp50[8];
@@ -7875,19 +7899,19 @@ s32 Camera_UpdateWater(Camera* camera) {
}
Audio_SetExtraFilter(0);
}
- //! @bug: doesn't always return a value, but sometimes does.
+ //! @bug Missing return, but the return value is not used.
}
s32 Camera_UpdateHotRoom(Camera* camera) {
camera->distortionFlags &= ~DISTORTION_HOT_ROOM;
- if (camera->play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_3) {
+ if (camera->play->roomCtx.curRoom.environmentType == ROOM_ENV_HOT) {
camera->distortionFlags |= DISTORTION_HOT_ROOM;
}
return 1;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 Camera_DbgChangeMode(Camera* camera) {
static s16 D_8011DAFC[] = {
CAM_SET_NORMAL0, CAM_SET_NORMAL1, CAM_SET_NORMAL2, CAM_SET_DUNGEON0, CAM_SET_DUNGEON1, CAM_SET_DUNGEON2,
@@ -8006,7 +8030,7 @@ void Camera_UpdateDistortion(Camera* camera) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define ENABLE_DEBUG_CAM_UPDATE R_DEBUG_CAM_UPDATE
#else
#define ENABLE_DEBUG_CAM_UPDATE false
@@ -8107,7 +8131,7 @@ Vec3s Camera_Update(Camera* camera) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
Camera_PrintSettings(camera);
Camera_DbgChangeMode(camera);
#endif
@@ -8139,8 +8163,8 @@ Vec3s Camera_Update(Camera* camera) {
if ((gSaveContext.gameMode != GAMEMODE_NORMAL) && (gSaveContext.gameMode != GAMEMODE_END_CREDITS)) {
sCameraInterfaceField = CAM_INTERFACE_FIELD(CAM_LETTERBOX_NONE, CAM_HUD_VISIBILITY_ALL, 0);
Camera_UpdateInterface(sCameraInterfaceField);
- } else if ((D_8011D3F0 != 0) && (camera->camId == CAM_ID_MAIN)) {
- D_8011D3F0--;
+ } else if ((sSceneInitLetterboxTimer != 0) && (camera->camId == CAM_ID_MAIN)) {
+ sSceneInitLetterboxTimer--;
sCameraInterfaceField = CAM_INTERFACE_FIELD(CAM_LETTERBOX_LARGE, CAM_HUD_VISIBILITY_NOTHING_ALT, 0);
Camera_UpdateInterface(sCameraInterfaceField);
} else if (camera->play->transitionMode != TRANS_MODE_OFF) {
@@ -8167,7 +8191,7 @@ Vec3s Camera_Update(Camera* camera) {
sCameraSettings[camera->setting].cameraModes[camera->mode].funcIdx);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
// enable/disable debug cam
if (CAMERA_CHECK_BTN(&D_8015BD7C->state.input[2], BTN_START)) {
gDebugCamEnabled ^= 1;
@@ -8256,7 +8280,7 @@ Vec3s Camera_Update(Camera* camera) {
CAM_BINANG_TO_DEG(camera->camDir.x), camera->camDir.y, CAM_BINANG_TO_DEG(camera->camDir.y));
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (camera->timer != -1 && CAMERA_CHECK_BTN(&D_8015BD7C->state.input[0], BTN_DRIGHT)) {
camera->timer = 0;
}
@@ -8465,7 +8489,7 @@ s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange
break;
case CAM_REQUEST_MODE_SFX_ATTENTION:
- if (camera->play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_1) {
+ if (camera->play->roomCtx.curRoom.type == ROOM_TYPE_DUNGEON) {
Sfx_PlaySfxCentered(NA_SE_SY_ATTENTION_URGENCY);
} else {
Sfx_PlaySfxCentered(NA_SE_SY_ATTENTION_ON);
@@ -8590,7 +8614,7 @@ s32 Camera_RequestBgCam(Camera* camera, s32 requestedBgCamIndex) {
if (!(camera->behaviorFlags & CAM_BEHAVIOR_BG_PROCESSED)) {
requestedCamSetting = Camera_GetBgCamSetting(camera, requestedBgCamIndex);
camera->behaviorFlags |= CAM_BEHAVIOR_BG_PROCESSED;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
settingChangeSuccessful = Camera_RequestSettingImpl(camera, requestedCamSetting,
CAM_REQUEST_SETTING_PRESERVE_BG_CAM_INDEX |
CAM_REQUEST_SETTING_FORCE_CHANGE) >= 0;
@@ -8616,12 +8640,11 @@ s32 Camera_RequestBgCam(Camera* camera, s32 requestedBgCamIndex) {
#endif
return 0x80000000 | requestedBgCamIndex;
}
-
- //! @note: no return here, but return is unused
+ //! @bug Missing return, but the return value is not used.
}
Vec3s Camera_GetInputDir(Camera* camera) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (gDebugCamEnabled) {
return D_8015BD80.sub.unk_104A;
}
@@ -8643,7 +8666,7 @@ s16 Camera_GetInputDirYaw(Camera* camera) {
}
Vec3s Camera_GetCamDir(Camera* camera) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (gDebugCamEnabled) {
return D_8015BD80.sub.unk_104A;
}
@@ -8840,7 +8863,7 @@ s32 Camera_Copy(Camera* dstCamera, Camera* srcCamera) {
}
s32 Camera_IsDebugCamEnabled(void) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
return gDebugCamEnabled;
#else
return false;
@@ -8874,7 +8897,7 @@ void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* d
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 Camera_QRegInit(void) {
if (!R_RELOAD_CAM_PARAMS) {
QREG(2) = 1;
diff --git a/src/code/z_camera_data.inc.c b/src/code/z_camera_data.inc.c
index 3212173fd7..9a9795f453 100644
--- a/src/code/z_camera_data.inc.c
+++ b/src/code/z_camera_data.inc.c
@@ -1,5 +1,5 @@
+#include "array_count.h"
#include "ultra64.h"
-#include "global.h"
typedef struct CameraModeValue {
s16 val;
@@ -27,7 +27,7 @@ typedef struct CameraSetting {
/*==================================================================*/
// Data
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s16 sOREGInit[] = {
0, // OREG(0)
1, // OREG(1)
@@ -119,7 +119,7 @@ s16 sCamDataRegsInit[CAM_DATA_MAX] = {
s16 sCamDataRegsInitCount = ARRAY_COUNT(sCamDataRegsInit);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
char sCameraSettingNames[][12] = {
"NONE ", // CAM_SET_NONE
"NORMAL0 ", // CAM_SET_NORMAL0
@@ -2562,7 +2562,7 @@ s32 sInitRegs = 1;
s32 gDebugCamEnabled = false;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 sDbgModeIdx = -1;
#endif
@@ -2584,11 +2584,11 @@ s16 D_8011D3CC[] = {
s32 sUpdateCameraDirection = 0;
s32 D_8011D3EC = 0;
-s32 D_8011D3F0 = 0;
+s32 sSceneInitLetterboxTimer = 0;
s32 sDemo5PrevAction12Frame = -16;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
char sCameraFunctionNames[][8] = {
"NONE ", // CAM_FUNC_NONE
"NORM0()", // CAM_FUNC_NORM0
@@ -2681,7 +2681,7 @@ Vec3f D_8011D678[] = {
PlayState* D_8015BD7C;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
DebugCam D_8015BD80;
#endif
diff --git a/src/code/z_cheap_proc.inc.c b/src/code/z_cheap_proc.inc.c
index 059f67c02b..e922c0832c 100644
--- a/src/code/z_cheap_proc.inc.c
+++ b/src/code/z_cheap_proc.inc.c
@@ -1,4 +1,7 @@
-#include "global.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z64play.h"
void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) {
OPEN_DISPS(play->state.gfxCtx, "../z_cheap_proc.c", 214);
diff --git a/src/code/z_collision_btltbls.c b/src/code/z_collision_btltbls.c
index 1039371f7a..5c2a210bcc 100644
--- a/src/code/z_collision_btltbls.c
+++ b/src/code/z_collision_btltbls.c
@@ -1,4 +1,7 @@
-#include "global.h"
+#include "array_count.h"
+#include "printf.h"
+#include "translation.h"
+#include "z64collision_check.h"
static DamageTable sDamageTablePresets[] = {
{ {
diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c
index 1f6bb36cd2..dcf07766e6 100644
--- a/src/code/z_collision_check.c
+++ b/src/code/z_collision_check.c
@@ -1,11 +1,23 @@
-#include "global.h"
+#include "gfx.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
#include "terminal.h"
-
+#include "translation.h"
+#include "versions.h"
+#include "z64collision_check.h"
+#include "z64effect.h"
#include "z64frame_advance.h"
+#include "zelda_arena.h"
+#include "z64play.h"
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
+#include "z_lib.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:224"
+#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
+ "ique-cn:192 ntsc-1.0:168 ntsc-1.1:168 ntsc-1.2:168 pal-1.0:168 pal-1.1:168"
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);
@@ -14,7 +26,7 @@ typedef s32 (*ColChkLineFunc)(PlayState*, CollisionCheckContext*, Collider*, Vec
#define SAC_ENABLE (1 << 0)
-#if OOT_DEBUG
+#if DEBUG_FEATURES
/**
* Draws a red triangle with vertices vA, vB, and vC.
*/
@@ -35,7 +47,7 @@ void Collider_DrawPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC,
OPEN_DISPS(gfxCtx, "../z_collision_check.c", 713);
- gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_OPA_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0xFF, r, g, b, 50);
gDPPipeSync(POLY_OPA_DISP++);
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2);
@@ -356,9 +368,9 @@ s32 Collider_SetJntSphToActor(PlayState* play, ColliderJntSph* dest, ColliderJnt
if (dest->elements == NULL) {
dest->count = 0;
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("ClObjJntSph_set():zelda_malloc()出来ません。\n", "ClObjJntSph_set():zelda_malloc() Can not.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return false;
}
@@ -384,9 +396,9 @@ s32 Collider_SetJntSphAllocType1(PlayState* play, ColliderJntSph* dest, Actor* a
if (dest->elements == NULL) {
dest->count = 0;
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("ClObjJntSph_set3():zelda_malloc_出来ません。\n", "ClObjJntSph_set3():zelda_malloc_ Can not.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return false;
}
@@ -412,9 +424,9 @@ s32 Collider_SetJntSphAlloc(PlayState* play, ColliderJntSph* dest, Actor* actor,
if (dest->elements == NULL) {
dest->count = 0;
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("ClObjJntSph_set5():zelda_malloc出来ません\n", "ClObjJntSph_set5():zelda_malloc Can not\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return false;
}
for (destElem = dest->elements, srcElem = src->elements; destElem < dest->elements + dest->count;
@@ -718,9 +730,9 @@ s32 Collider_SetTrisAllocType1(PlayState* play, ColliderTris* dest, Actor* actor
dest->elements = ZELDA_ARENA_MALLOC(dest->count * sizeof(ColliderTrisElement), "../z_collision_check.c", 2156);
if (dest->elements == NULL) {
dest->count = 0;
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("ClObjTris_set3():zelda_malloc()出来ません\n", "ClObjTris_set3():zelda_malloc() Can not\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return false;
}
for (destElem = dest->elements, srcElem = src->elements; destElem < dest->elements + dest->count;
@@ -744,9 +756,9 @@ s32 Collider_SetTrisAlloc(PlayState* play, ColliderTris* dest, Actor* actor, Col
dest->elements = ZELDA_ARENA_MALLOC(dest->count * sizeof(ColliderTrisElement), "../z_collision_check.c", 2207);
if (dest->elements == NULL) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("ClObjTris_set5():zelda_malloc出来ません\n", "ClObjTris_set5():zelda_malloc Can not\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
dest->count = 0;
return false;
}
@@ -1017,7 +1029,7 @@ void CollisionCheck_InitContext(PlayState* play, CollisionCheckContext* colChkCt
colChkCtx->sacFlags = 0;
CollisionCheck_ClearContext(play, colChkCtx);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
AREG(21) = true;
AREG(22) = true;
AREG(23) = true;
@@ -1071,7 +1083,7 @@ void CollisionCheck_DisableSAC(PlayState* play, CollisionCheckContext* colChkCtx
colChkCtx->sacFlags &= ~SAC_ENABLE;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
/**
* Draws a collider of any shape.
* Math3D_DrawSphere and Math3D_DrawCylinder are noops, so JntSph and Cylinder are not drawn.
@@ -1829,7 +1841,6 @@ void CollisionCheck_ATJntSphVsACCyl(PlayState* play, CollisionCheckContext* colC
Vec3f hitPos;
Vec3f atPos;
Vec3f acPos;
- f32 acToHit;
atPos.x = atJntSphElem->dim.worldSphere.center.x;
atPos.y = atJntSphElem->dim.worldSphere.center.y;
@@ -1838,7 +1849,13 @@ void CollisionCheck_ATJntSphVsACCyl(PlayState* play, CollisionCheckContext* colC
acPos.y = acCyl->dim.pos.y;
acPos.z = acCyl->dim.pos.z;
if (!IS_ZERO(centerDist)) {
- acToHit = acCyl->dim.radius / centerDist;
+ f32 acToHit = acCyl->dim.radius / centerDist;
+
+#if OOT_VERSION < PAL_1_0
+ hitPos.x = ((atPos.x - acPos.x) * acToHit) + acPos.x;
+ hitPos.y = ((atPos.y - acPos.y) * acToHit) + acPos.y;
+ hitPos.z = ((atPos.z - acPos.z) * acToHit) + acPos.z;
+#else
if (acToHit <= 1.0f) {
hitPos.x = ((atPos.x - acPos.x) * acToHit) + acPos.x;
hitPos.y = ((atPos.y - acPos.y) * acToHit) + acPos.y;
@@ -1846,6 +1863,7 @@ void CollisionCheck_ATJntSphVsACCyl(PlayState* play, CollisionCheckContext* colC
} else {
Math_Vec3f_Copy(&hitPos, &atPos);
}
+#endif
} else {
Math_Vec3f_Copy(&hitPos, &atPos);
}
@@ -1890,7 +1908,13 @@ void CollisionCheck_ATCylVsACJntSph(PlayState* play, CollisionCheckContext* colC
acPos.y = acJntSphElem->dim.worldSphere.center.y;
acPos.z = acJntSphElem->dim.worldSphere.center.z;
if (!IS_ZERO(centerDist)) {
- acToHit = acJntSphElem->dim.worldSphere.radius / centerDist;
+ f32 acToHit = acJntSphElem->dim.worldSphere.radius / centerDist;
+
+#if OOT_VERSION < PAL_1_0
+ hitPos.x = ((atPos.x - acPos.x) * acToHit) + acPos.x;
+ hitPos.y = ((atPos.y - acPos.y) * acToHit) + acPos.y;
+ hitPos.z = ((atPos.z - acPos.z) * acToHit) + acPos.z;
+#else
if (acToHit <= 1.0f) {
hitPos.x = ((atPos.x - acPos.x) * acToHit) + acPos.x;
hitPos.y = ((atPos.y - acPos.y) * acToHit) + acPos.y;
@@ -1898,6 +1922,7 @@ void CollisionCheck_ATCylVsACJntSph(PlayState* play, CollisionCheckContext* colC
} else {
Math_Vec3f_Copy(&hitPos, &atPos);
}
+#endif
} else {
Math_Vec3f_Copy(&hitPos, &atPos);
}
@@ -2201,7 +2226,7 @@ void CollisionCheck_ATTrisVsACCyl(PlayState* play, CollisionCheckContext* colChk
}
#pragma increment_block_number "gc-eu:252 gc-eu-mq:252 gc-jp:252 gc-jp-ce:252 gc-jp-mq:252 gc-us:252 gc-us-mq:252" \
- "ntsc-1.2:252"
+ "ique-cn:252 ntsc-1.0:252 ntsc-1.1:252 ntsc-1.2:252 pal-1.0:252 pal-1.1:252"
void CollisionCheck_ATCylVsACQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {
static TriNorm tri1;
@@ -2256,11 +2281,6 @@ void CollisionCheck_ATCylVsACQuad(PlayState* play, CollisionCheckContext* colChk
}
}
-#if OOT_DEBUG
-static s8 sBssDummy0;
-static s8 sBssDummy1;
-#endif
-
void CollisionCheck_ATQuadVsACCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {
static TriNorm tri1;
static TriNorm tri2;
@@ -2320,7 +2340,7 @@ void CollisionCheck_ATQuadVsACCyl(PlayState* play, CollisionCheckContext* colChk
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static s8 sBssDummy3;
static s8 sBssDummy4;
#endif
@@ -3332,7 +3352,7 @@ void Collider_SetTrisDim(PlayState* play, ColliderTris* tris, s32 elemIndex, Col
Collider_SetTrisElementDim(play, &trisElem->dim, src);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
// The two static Vec3f variables in the function below cross a block index rollover, causing a bss order swap.
//! In order to replicate this behavior, we declare a certain amount of sBssDummy variables throughout the file, which
//! we fit inside padding added by the compiler between structs like TriNorm and/or Vec3f, so they don't take space in
@@ -3715,7 +3735,7 @@ u8 CollisionCheck_GetSwordDamage(s32 dmgFlags) {
damage = 8;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
KREG(7) = damage;
#endif
diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c
index dcd0ee4d2e..18bfafbc3a 100644
--- a/src/code/z_common_data.c
+++ b/src/code/z_common_data.c
@@ -1,11 +1,20 @@
-#include "global.h"
+#include "alignment.h"
#include "region.h"
+#include "sequence.h"
#include "versions.h"
+#include "z_locale.h"
+#include "z64environment.h"
+#include "z64save.h"
+#include "z64transition.h"
#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:192"
+ "ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
ALIGNED(16) SaveContext gSaveContext;
+#if PLATFORM_IQUE
+// Unknown bss padding, placed here for matching
+char sUnknownBssPadding[0x20];
+#endif
u32 D_8015FA88;
u32 D_8015FA8C;
@@ -24,7 +33,7 @@ void SaveContext_Init(void) {
gSaveContext.dogIsLost = true;
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL;
-#if OOT_NTSC && OOT_VERSION < GC_US
+#if OOT_NTSC && OOT_VERSION < GC_US || PLATFORM_IQUE
if (gCurrentRegion == REGION_JP) {
gSaveContext.language = LANGUAGE_JPN;
}
diff --git a/src/code/z_construct.c b/src/code/z_construct.c
index 104b048fd5..aa92850b37 100644
--- a/src/code/z_construct.c
+++ b/src/code/z_construct.c
@@ -1,5 +1,14 @@
-#include "global.h"
+#include "map.h"
+#include "printf.h"
+#include "regs.h"
+#include "segment_symbols.h"
+#include "translation.h"
#include "versions.h"
+#include "z64lifemeter.h"
+#include "z64interface.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64save.h"
void Interface_Destroy(PlayState* play) {
Map_Destroy(play);
@@ -19,17 +28,17 @@ void Interface_Init(PlayState* play) {
View_Init(&interfaceCtx->view, play->state.gfxCtx);
interfaceCtx->unk_1EC = interfaceCtx->unk_1EE = interfaceCtx->unk_1F0 = 0;
+ interfaceCtx->unk_1F4 = 0.0f;
interfaceCtx->unk_1FA = interfaceCtx->unk_261 = interfaceCtx->unk_1FC = 0;
interfaceCtx->unk_22E = 0;
interfaceCtx->lensMagicConsumptionTimer = 16;
- interfaceCtx->unk_1F4 = 0.0f;
interfaceCtx->unk_228 = XREG(95);
- interfaceCtx->minimapAlpha = 0;
- interfaceCtx->unk_260 = 0;
interfaceCtx->unk_244 = interfaceCtx->aAlpha = interfaceCtx->bAlpha = interfaceCtx->cLeftAlpha =
interfaceCtx->cDownAlpha = interfaceCtx->cRightAlpha = interfaceCtx->healthAlpha = interfaceCtx->startAlpha =
interfaceCtx->magicAlpha = 0;
+ interfaceCtx->minimapAlpha = 0;
+ interfaceCtx->unk_260 = 0;
parameterSize = (uintptr_t)_parameter_staticSegmentRomEnd - (uintptr_t)_parameter_staticSegmentRomStart;
@@ -52,17 +61,17 @@ void Interface_Init(PlayState* play) {
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
- doActionOffset = LANGUAGE_JPN * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
+ doActionOffset = (LANGUAGE_JPN * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
} else {
- doActionOffset = LANGUAGE_ENG * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
+ doActionOffset = (LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {
- doActionOffset = LANGUAGE_ENG * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
+ doActionOffset = (LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
} else if (gSaveContext.language == LANGUAGE_GER) {
- doActionOffset = LANGUAGE_GER * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
+ doActionOffset = (LANGUAGE_GER * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
} else {
- doActionOffset = LANGUAGE_FRA * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
+ doActionOffset = (LANGUAGE_FRA * DO_ACTION_MAX + DO_ACTION_ATTACK) * DO_ACTION_TEX_SIZE;
}
#endif
@@ -71,17 +80,17 @@ void Interface_Init(PlayState* play) {
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
- doActionOffset = 3 * DO_ACTION_TEX_SIZE + LANGUAGE_JPN * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
+ doActionOffset = (LANGUAGE_JPN * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
} else {
- doActionOffset = 3 * DO_ACTION_TEX_SIZE + LANGUAGE_ENG * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
+ doActionOffset = (LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {
- doActionOffset = 3 * DO_ACTION_TEX_SIZE + LANGUAGE_ENG * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
+ doActionOffset = (LANGUAGE_ENG * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
} else if (gSaveContext.language == LANGUAGE_GER) {
- doActionOffset = 3 * DO_ACTION_TEX_SIZE + LANGUAGE_GER * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
+ doActionOffset = (LANGUAGE_GER * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
} else {
- doActionOffset = 3 * DO_ACTION_TEX_SIZE + LANGUAGE_FRA * DO_ACTION_MAX * DO_ACTION_TEX_SIZE;
+ doActionOffset = (LANGUAGE_FRA * DO_ACTION_MAX + DO_ACTION_RETURN) * DO_ACTION_TEX_SIZE;
}
#endif
@@ -162,8 +171,13 @@ void Interface_Init(PlayState* play) {
gSaveContext.timerY[timerId] = 46; // one row of hearts
}
}
-
- if ((gSaveContext.timerState >= TIMER_STATE_UP_INIT) && (gSaveContext.timerState <= TIMER_STATE_UP_FREEZE)) {
+#if OOT_VERSION < PAL_1_0
+ else if ((gSaveContext.timerState >= TIMER_STATE_UP_INIT) && (gSaveContext.timerState <= TIMER_STATE_UP_FREEZE))
+#else
+ // No "else"
+ if ((gSaveContext.timerState >= TIMER_STATE_UP_INIT) && (gSaveContext.timerState <= TIMER_STATE_UP_FREEZE))
+#endif
+ {
gSaveContext.timerState = TIMER_STATE_OFF;
PRINTF(T("タイマー停止!!!!!!!!!!!!!!!!!!!!! = %d\n",
"Timer Stop!!!!!!!!!!!!!!!!!!!!! = %d\n"),
@@ -199,7 +213,7 @@ void Interface_Init(PlayState* play) {
void Message_Init(PlayState* play) {
MessageContext* msgCtx = &play->msgCtx;
- s32 pad;
+ Font* font = &msgCtx->font;
Message_SetTables();
@@ -219,7 +233,7 @@ void Message_Init(PlayState* play) {
PRINTF(T("吹き出しgame_alloc=%x\n", "Textbox game_alloc=%x\n"), TEXTBOX_SEGMENT_SIZE);
ASSERT(msgCtx->textboxSegment != NULL, "message->fukidashiSegment != NULL", "../z_construct.c", 352);
- Font_LoadOrderedFont(&play->msgCtx.font);
+ Font_LoadOrderedFont(font);
YREG(31) = 0;
}
@@ -321,7 +335,7 @@ void Regs_InitDataImpl(void) {
ZREG(10) = 200;
ZREG(11) = 0;
ZREG(12) = 200;
- ZREG(13) = 0;
+ R_PAUSE_PAGE_SWITCH_FRAME_ADVANCE_ON = false;
ZREG(14) = 110;
ZREG(15) = 56;
ZREG(16) = 1;
@@ -373,12 +387,18 @@ void Regs_InitDataImpl(void) {
R_START_LABEL_X(2) = 119;
#endif
- ZREG(61) = 1;
- R_C_UP_BTN_X = C_UP_BUTTON_X;
- R_C_UP_BTN_Y = C_UP_BUTTON_Y;
- ZREG(64) = 20;
+ R_PAUSE_QUEST_MEDALLION_SHINE_TIME(0) = 1;
+ //! @bug Overlapping reg usage
+ R_C_UP_BTN_X = C_UP_BUTTON_X; // R_PAUSE_QUEST_MEDALLION_SHINE_TIME(1)
+ R_C_UP_BTN_Y = C_UP_BUTTON_Y; // R_PAUSE_QUEST_MEDALLION_SHINE_TIME(2)
+ R_PAUSE_QUEST_MEDALLION_SHINE_TIME(3) = 20;
+
ZREG(65) = 21;
ZREG(66) = 122;
+#if OOT_VERSION < PAL_1_0
+ R_START_BTN_X = 132;
+ R_START_BTN_Y = 17;
+#endif
R_ITEM_BTN_X(1) = C_LEFT_BUTTON_X;
R_ITEM_BTN_X(2) = C_DOWN_BUTTON_X;
R_ITEM_BTN_X(3) = C_RIGHT_BUTTON_X;
@@ -473,7 +493,11 @@ void Regs_InitDataImpl(void) {
R_TEXTBOX_X_TARGET = 54;
R_TEXTBOX_Y_TARGET = 48;
R_TEXTBOX_WIDTH_TARGET = 128;
+#if !PLATFORM_IQUE
R_TEXTBOX_HEIGHT_TARGET = 64;
+#else
+ R_TEXTBOX_HEIGHT_TARGET = 74;
+#endif
R_TEXTBOX_TEXWIDTH_TARGET = 2048;
R_TEXTBOX_TEXHEIGHT_TARGET = 512;
XREG(78) = 96;
@@ -494,8 +518,8 @@ void Regs_InitDataImpl(void) {
XREG(93) = 100;
XREG(94) = 160;
XREG(95) = 200;
- WREG(2) = -6080;
- WREG(3) = 9355;
+ R_PAUSE_PAGES_Y_ORIGIN_2 = -6080;
+ R_PAUSE_DEPTH_OFFSET = 9355;
WREG(4) = 8;
WREG(5) = 3;
WREG(6) = 8;
@@ -608,11 +632,12 @@ void Regs_InitDataImpl(void) {
R_MINIMAP_COLOR(2) = 255;
}
- VREG(21) = 0;
- VREG(22) = 0;
- VREG(23) = 0;
- VREG(24) = 0;
- VREG(25) = 0;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_A) = 0;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_DOWN) = 0;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_RIGHT) = 0;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_LEFT) = 0;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_UP) = 0;
+
VREG(26) = 0;
VREG(27) = 0;
R_OCARINA_BUTTONS_XPOS = 98;
@@ -638,7 +663,7 @@ void Regs_InitDataImpl(void) {
R_OCARINA_BUTTONS_YPOS(2) = 176;
R_OCARINA_BUTTONS_YPOS(3) = 172;
R_OCARINA_BUTTONS_YPOS(4) = 170;
- VREG(50) = 30;
+ R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP = 30;
R_OCARINA_BUTTONS_YPOS_OFFSET = 0;
VREG(52) = -16;
VREG(53) = 230;
diff --git a/src/code/code_800BB0A0.c b/src/code/z_cutscene_spline.c
similarity index 96%
rename from src/code/code_800BB0A0.c
rename to src/code/z_cutscene_spline.c
index 421f9a2809..137f9f544c 100644
--- a/src/code/code_800BB0A0.c
+++ b/src/code/z_cutscene_spline.c
@@ -1,4 +1,7 @@
-#include "global.h"
+#include "ultra64.h"
+#include "z64math.h"
+#include "z64camera.h"
+#include "z64cutscene_spline.h"
// The code in this file is very similar to a spline system used in Super Mario 64 for cutscene camera movement
diff --git a/src/code/z_debug.c b/src/code/z_debug.c
index 4ca9b2071f..d5804cd7ee 100644
--- a/src/code/z_debug.c
+++ b/src/code/z_debug.c
@@ -1,4 +1,15 @@
-#include "global.h"
+#include "libc64/malloc.h"
+#include "libu64/gfxprint.h"
+#include "libu64/pad.h"
+#include "array_count.h"
+#include "color.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfxalloc.h"
+#include "regs.h"
+#include "rumble.h"
+#include "ultra64.h"
+#include "z64debug.h"
typedef struct DebugCamTextBufferEntry {
/* 0x0 */ u8 x;
@@ -12,8 +23,8 @@ typedef struct InputCombo {
/* 0x2 */ u16 press;
} InputCombo; // size = 0x4
-#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"
+#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 ique-cn:0" \
+ "ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
RegEditor* gRegEditor;
@@ -32,7 +43,7 @@ Color_RGBA8 sDebugCamTextColors[] = {
{ 128, 255, 32, 128 }, // DEBUG_CAM_TEXT_GREEN
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
InputCombo sRegGroupInputCombos[REG_GROUPS] = {
{ BTN_L, BTN_CUP }, // REG
{ BTN_L, BTN_CLEFT }, // SREG
@@ -158,7 +169,7 @@ void DebugCamera_DrawScreenText(GfxPrint* printer) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
/**
* Updates the state of the Reg Editor according to user input.
* Also contains a controller rumble test that can be interfaced with via related REGs.
@@ -298,7 +309,7 @@ void Debug_DrawText(GraphicsContext* gfxCtx) {
DebugCamera_DrawScreenText(&printer);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (gRegEditor->regPage != 0) {
Regs_DrawEditor(&printer);
}
diff --git a/src/code/z_debug_display.c b/src/code/z_debug_display.c
index d6b6e0aabc..9d15663a67 100644
--- a/src/code/z_debug_display.c
+++ b/src/code/z_debug_display.c
@@ -1,4 +1,9 @@
-#include "global.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64debug_display.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
typedef struct DebugDispObjectInfo {
diff --git a/src/code/z_demo.c b/src/code/z_demo.c
index 5ae1767b53..d5135b99d1 100644
--- a/src/code/z_demo.c
+++ b/src/code/z_demo.c
@@ -1,9 +1,34 @@
-#include "global.h"
-#include "quake.h"
-#include "z64camera.h"
+#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" \
+ "ique-cn:128 ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
+
+#include "libu64/gfxprint.h"
+#include "array_count.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfxalloc.h"
+#include "letterbox.h"
+#include "memory_utils.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "printf.h"
+#include "regs.h"
+#include "rumble.h"
+#include "quake.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64camera.h"
+#include "z64cutscene.h"
+#include "z64cutscene_flags.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
#include "assets/scenes/indoors/tokinoma/tokinoma_scene.h"
@@ -95,7 +120,7 @@ EntranceCutscene sEntranceCutsceneTable[] = {
{ ENTR_GERUDO_VALLEY_0, 2, EVENTCHKINF_B2, gGerudoValleyIntroCs },
{ ENTR_GERUDOS_FORTRESS_0, 2, EVENTCHKINF_B3, gGerudoFortressIntroCs },
{ ENTR_LON_LON_RANCH_0, 2, EVENTCHKINF_B4, gLonLonRanchIntroCs },
- { ENTR_JABU_JABU_0, 2, EVENTCHKINF_B5, gJabuJabuIntroCs },
+ { ENTR_JABU_JABU_0, 2, EVENTCHKINF_B5, gJabuIntroCs },
{ ENTR_GRAVEYARD_0, 2, EVENTCHKINF_B6, gGraveyardIntroCs },
{ ENTR_ZORAS_FOUNTAIN_2, 2, EVENTCHKINF_B7, gZorasFountainIntroCs },
{ ENTR_DESERT_COLOSSUS_0, 2, EVENTCHKINF_B8, gDesertColossusIntroCs },
@@ -111,11 +136,11 @@ EntranceCutscene sEntranceCutsceneTable[] = {
{ ENTR_SPIRIT_TEMPLE_BOSS_0, 0, EVENTCHKINF_C0, gSpiritBossNabooruKnuckleIntroCs },
{ ENTR_GERUDOS_FORTRESS_17, 0, EVENTCHKINF_C7, gGerudoFortressFirstCaptureCs },
{ ENTR_DEATH_MOUNTAIN_CRATER_1, 2, EVENTCHKINF_B9, gDeathMountainCraterIntroCs },
- { ENTR_KOKIRI_FOREST_12, 2, EVENTCHKINF_C6, gKokiriForestDekuSproutCs },
+ { ENTR_KOKIRI_FOREST_12, 2, EVENTCHKINF_C6, gKokiriForestDekuSproutPart3Cs },
};
void* sCutscenesUnknownList[] = {
- gDekuTreeIntroCs, gJabuJabuIntroCs, gDcOpeningCs, gSpiritBossNabooruKnuckleDefeatCs,
+ gDekuTreeIntroCs, gJabuIntroCs, gDcOpeningCs, gSpiritBossNabooruKnuckleDefeatCs,
gIceCavernSerenadeCs, gTowerBarrierCs,
};
@@ -124,8 +149,8 @@ u16 gCamAtSplinePointsAppliedFrame;
u16 gCamEyePointAppliedFrame;
u16 gCamAtPointAppliedFrame;
-#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
- "ntsc-1.2:96"
+#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" \
+ "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
// Cam ID to return to when a scripted cutscene is finished
s16 sReturnToCamId;
@@ -138,7 +163,7 @@ s16 sQuakeIndex;
void Cutscene_SetupScripted(PlayState* play, CutsceneContext* csCtx);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void Cutscene_DrawDebugInfo(PlayState* play, Gfx** dlist, CutsceneContext* csCtx) {
GfxPrint printer;
s32 pad[2];
@@ -183,7 +208,7 @@ void Cutscene_UpdateManual(PlayState* play, CutsceneContext* csCtx) {
}
void Cutscene_UpdateScripted(PlayState* play, CutsceneContext* csCtx) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
{
Input* input = &play->state.input[0];
@@ -400,12 +425,12 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
SET_EVENTCHKINF(EVENTCHKINF_65);
break;
- case CS_MISC_SET_FLAG_WELL_DRAINED:
- SET_EVENTCHKINF(EVENTCHKINF_67);
+ case CS_MISC_SET_FLAG_DRAINED_WELL:
+ SET_EVENTCHKINF(EVENTCHKINF_DRAINED_WELL);
break;
- case CS_MISC_SET_FLAG_LAKE_HYLIA_RESTORED:
- SET_EVENTCHKINF(EVENTCHKINF_69);
+ case CS_MISC_SET_FLAG_RESTORED_LAKE_HYLIA:
+ SET_EVENTCHKINF(EVENTCHKINF_RESTORED_LAKE_HYLIA);
break;
case CS_MISC_VISMONO_BLACK_AND_WHITE:
@@ -576,7 +601,7 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
}
if ((csCtx->curFrame == cmd->startFrame) || titleDemoSkipped ||
- (OOT_DEBUG && (csCtx->curFrame > 20) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) &&
+ (DEBUG_FEATURES && (csCtx->curFrame > 20) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) &&
(gSaveContext.fileNum != 0xFEDC))) {
csCtx->state = CS_STATE_RUN_UNSTOPPABLE;
Audio_SetCutsceneFlag(0);
@@ -731,8 +756,8 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
break;
case CS_DEST_TEMPLE_OF_TIME_AFTER_LIGHT_MEDALLION:
-#if OOT_DEBUG
- SET_EVENTCHKINF(EVENTCHKINF_WATCHED_SHEIK_AFTER_MASTER_SWORD_CS);
+#if DEBUG_FEATURES
+ SET_EVENTCHKINF(EVENTCHKINF_REVEALED_MASTER_SWORD);
#endif
play->nextEntranceIndex = ENTR_TEMPLE_OF_TIME_4;
play->transitionTrigger = TRANS_TRIGGER_START;
@@ -902,8 +927,8 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
break;
case CS_DEST_TEMPLE_OF_TIME_AFTER_LIGHT_MEDALLION_ALT:
-#if OOT_DEBUG
- SET_EVENTCHKINF(EVENTCHKINF_WATCHED_SHEIK_AFTER_MASTER_SWORD_CS);
+#if DEBUG_FEATURES
+ SET_EVENTCHKINF(EVENTCHKINF_REVEALED_MASTER_SWORD);
#endif
play->nextEntranceIndex = ENTR_TEMPLE_OF_TIME_4;
play->transitionTrigger = TRANS_TRIGGER_START;
@@ -959,7 +984,7 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
break;
case CS_DEST_GERUDO_VALLEY_CREDITS:
-#if OOT_DEBUG
+#if DEBUG_FEATURES
gSaveContext.gameMode = GAMEMODE_END_CREDITS;
Audio_SetSfxBanksMute(0x6F);
#endif
@@ -1134,7 +1159,7 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
play->transitionType = TRANS_TYPE_FADE_BLACK;
break;
- case CS_DEST_LON_LON_RANCH_CREDITS_PART_5:
+ case CS_DEST_LON_LON_RANCH_CREDITS_PART_6:
play->linkAgeOnLoad = LINK_AGE_CHILD;
play->nextEntranceIndex = ENTR_LON_LON_RANCH_0;
play->transitionTrigger = TRANS_TRIGGER_START;
@@ -1142,7 +1167,7 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti
play->transitionType = TRANS_TYPE_FADE_BLACK;
break;
- case CS_DEST_LON_LON_RANCH_CREDITS_PART_6:
+ case CS_DEST_LON_LON_RANCH_CREDITS_PART_5:
play->nextEntranceIndex = ENTR_LON_LON_RANCH_0;
play->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.save.cutsceneIndex = 0xFFF7;
@@ -1802,7 +1827,7 @@ void Cutscene_ProcessScript(PlayState* play, CutsceneContext* csCtx, u8* script)
return;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) {
csCtx->state = CS_STATE_STOP;
return;
@@ -1813,7 +1838,7 @@ void Cutscene_ProcessScript(PlayState* play, CutsceneContext* csCtx, u8* script)
MemCpy(&cmdType, script, sizeof(cmdType));
script += sizeof(cmdType);
- if (cmdType == CS_CAM_STOP) {
+ if (cmdType == CS_CMD_END_OF_SCRIPT) {
return;
}
@@ -2215,7 +2240,7 @@ void Cutscene_ProcessScript(PlayState* play, CutsceneContext* csCtx, u8* script)
void CutsceneHandler_RunScript(PlayState* play, CutsceneContext* csCtx) {
if (gSaveContext.save.cutsceneIndex >= 0xFFF0) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BREG(0) != 0) {
Gfx* displayList;
Gfx* prevDisplayList;
@@ -2236,7 +2261,7 @@ void CutsceneHandler_RunScript(PlayState* play, CutsceneContext* csCtx) {
csCtx->curFrame++;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (R_USE_DEBUG_CUTSCENE) {
Cutscene_ProcessScript(play, csCtx, gDebugCutsceneScript);
} else {
diff --git a/src/code/z_draw.c b/src/code/z_draw.c
index 89b49faf4a..9e0dd236eb 100644
--- a/src/code/z_draw.c
+++ b/src/code/z_draw.c
@@ -1,4 +1,9 @@
-#include "global.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z64draw.h"
+#include "z64play.h"
+
#include "assets/objects/object_gi_key/object_gi_key.h"
#include "assets/objects/object_gi_jewel/object_gi_jewel.h"
#include "assets/objects/object_gi_melody/object_gi_melody.h"
diff --git a/src/code/z_eff_blure.c b/src/code/z_eff_blure.c
index 212f5ee7df..6e2023b67d 100644
--- a/src/code/z_eff_blure.c
+++ b/src/code/z_eff_blure.c
@@ -1,4 +1,14 @@
-#include "global.h"
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
@@ -805,7 +815,7 @@ void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this,
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPVertex(POLY_XLU_DISP++, &vtx[4 * i], 4, 0);
gSP2Triangles(POLY_XLU_DISP++, 0, 1, 3, 0, 0, 3, 2, 0);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
}
}
@@ -932,7 +942,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1596);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (this->numElements != 0) {
if (this->flags == 0) {
diff --git a/src/code/z_eff_shield_particle.c b/src/code/z_eff_shield_particle.c
index c66934a4ff..865bd8ec93 100644
--- a/src/code/z_eff_shield_particle.c
+++ b/src/code/z_eff_shield_particle.c
@@ -1,5 +1,15 @@
-#include "global.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
#include "terminal.h"
+#include "translation.h"
+#include "z64effect.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
static Vtx sVertices[5] = {
@@ -18,10 +28,10 @@ void EffectShieldParticle_Init(void* thisx, void* initParamsx) {
if ((this != NULL) && (initParams != NULL)) {
this->numElements = initParams->numElements;
if (this->numElements > ARRAY_COUNT(this->elements)) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("EffectShieldParticle_ct():パーティクル数がオーバしてます。\n",
"EffectShieldParticle_ct(): Number of particles exceeded.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return;
}
diff --git a/src/code/z_eff_spark.c b/src/code/z_eff_spark.c
index a997caa129..57ce3d9ba1 100644
--- a/src/code/z_eff_spark.c
+++ b/src/code/z_eff_spark.c
@@ -1,4 +1,14 @@
-#include "global.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
// original name: "spark"
@@ -154,7 +164,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx, "../z_eff_spark.c", 293);
if (this != NULL) {
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_38);
gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE);
diff --git a/src/code/z_eff_ss_dead.c b/src/code/z_eff_ss_dead.c
index 3c1adf4cb6..c752738725 100644
--- a/src/code/z_eff_ss_dead.c
+++ b/src/code/z_eff_ss_dead.c
@@ -1,4 +1,6 @@
-#include "global.h"
+#include "gfx.h"
+#include "z_lib.h"
+#include "z64play.h"
void func_80026230(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
f32 cos;
@@ -30,7 +32,7 @@ void func_80026400(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
Gfx* displayListHead;
f32 cos;
-#if !PLATFORM_N64
+#if PLATFORM_GC
if (arg3 == 0) {
return;
}
diff --git a/src/code/z_effect.c b/src/code/z_effect.c
index ac2141db0b..c0a39cc4bd 100644
--- a/src/code/z_effect.c
+++ b/src/code/z_effect.c
@@ -1,6 +1,9 @@
-#include "global.h"
-
+#include "gfx.h"
+#include "printf.h"
+#include "translation.h"
+#include "z64effect.h"
#include "z64frame_advance.h"
+#include "z64play.h"
EffectContext sEffectContext;
diff --git a/src/code/z_effect_soft_sprite.c b/src/code/z_effect_soft_sprite.c
index 2acc362b5e..061b6d70da 100644
--- a/src/code/z_effect_soft_sprite.c
+++ b/src/code/z_effect_soft_sprite.c
@@ -1,7 +1,13 @@
-#include "global.h"
+#include "libu64/overlay.h"
+#include "array_count.h"
+#include "printf.h"
+#include "sfx.h"
#include "terminal.h"
-
+#include "translation.h"
+#include "zelda_arena.h"
#include "z64frame_advance.h"
+#include "z64effect.h"
+#include "z64play.h"
EffectSsInfo sEffectSsInfo = { 0 }; // "EffectSS2Info"
@@ -10,7 +16,7 @@ void EffectSs_InitInfo(PlayState* play, s32 tableSize) {
EffectSs* effectSs;
EffectSsOverlay* overlay;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
for (i = 0; i < ARRAY_COUNT(gEffectSsOverlayTable); i++) {
overlay = &gEffectSsOverlayTable[i];
PRINTF("effect index %3d:size=%6dbyte romsize=%6dbyte\n", i,
@@ -197,7 +203,7 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) {
overlayEntry->loadedRamAddr = ZELDA_ARENA_MALLOC_R(overlaySize, "../z_effect_soft_sprite.c", 585);
if (overlayEntry->loadedRamAddr == NULL) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("EffectSoftSprite2_makeEffect():zelda_malloc_r()により,%dbyteのメモリ確保ができま\n"
"せん。そのため、プログラムのロードも\n"
"出来ません。ただいま危険な状態です!\n"
@@ -207,18 +213,18 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) {
"cannot be loaded. What a dangerous situation!\n"
"Naturally, effects will not be produced either.\n"),
overlaySize);
- PRINTF(VT_RST);
+ PRINTF_RST();
return;
}
Overlay_Load(overlayEntry->file.vromStart, overlayEntry->file.vromEnd, overlayEntry->vramStart,
overlayEntry->vramEnd, overlayEntry->loadedRamAddr);
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("EFFECT SS OVL:SegRom %08x %08x, Seg %08x %08x, RamStart %08x, type: %d\n",
overlayEntry->file.vromStart, overlayEntry->file.vromEnd, overlayEntry->vramStart,
overlayEntry->vramEnd, overlayEntry->loadedRamAddr, type);
- PRINTF(VT_RST);
+ PRINTF_RST();
}
profile = (void*)(uintptr_t)((overlayEntry->profile != NULL)
@@ -246,14 +252,14 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) {
sEffectSsInfo.table[index].priority = priority;
if (profile->init(play, index, &sEffectSsInfo.table[index], initParams) == 0) {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("EffectSoftSprite2_makeEffect():"
"何らかの理由でコンストラクト失敗。コンストラクターがエラーを返しました。"
"エフェクトの追加を中止します。\n",
"EffectSoftSprite2_makeEffect(): "
"Construction failed for some reason. The constructor returned an error. "
"Ceasing effect addition.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
EffectSs_Reset(&sEffectSsInfo.table[index]);
}
}
@@ -313,7 +319,7 @@ void EffectSs_DrawAll(PlayState* play) {
if ((sEffectSsInfo.table[i].pos.x > 32000.0f) || (sEffectSsInfo.table[i].pos.x < -32000.0f) ||
(sEffectSsInfo.table[i].pos.y > 32000.0f) || (sEffectSsInfo.table[i].pos.y < -32000.0f) ||
(sEffectSsInfo.table[i].pos.z > 32000.0f) || (sEffectSsInfo.table[i].pos.z < -32000.0f)) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("EffectSoftSprite2_disp():位置が領域外のため "
"削除します。エフェクトラベルNo.%d:プログラムの方で対応をお願いします。ここです ==> "
"pos(%f, %f, %f)で、ラベルはz_effect_soft_sprite_dlftbls.declにあります。\n",
@@ -322,10 +328,10 @@ void EffectSs_DrawAll(PlayState* play) {
"pos(%f, %f, %f) and the label is in z_effect_soft_sprite_dlftbls.decl.\n"),
sEffectSsInfo.table[i].type, sEffectSsInfo.table[i].pos.x, sEffectSsInfo.table[i].pos.y,
sEffectSsInfo.table[i].pos.z);
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("もし、posを別のことに使っている場合相談に応じます。\n",
"If you are using pos for something else, consult me.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
EffectSs_Delete(&sEffectSsInfo.table[i]);
} else {
diff --git a/src/code/z_effect_soft_sprite_dlftbls.c b/src/code/z_effect_soft_sprite_dlftbls.c
index cb24257c87..7c9e228f63 100644
--- a/src/code/z_effect_soft_sprite_dlftbls.c
+++ b/src/code/z_effect_soft_sprite_dlftbls.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "segment_symbols.h"
+#include "z64effect.h"
// Linker symbol declarations (used in the table below)
#define DEFINE_EFFECT_SS(name, _1) DECLARE_OVERLAY_SEGMENT(name)
diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c
index 253996b625..1654ab3d0d 100644
--- a/src/code/z_effect_soft_sprite_old_init.c
+++ b/src/code/z_effect_soft_sprite_old_init.c
@@ -1,4 +1,17 @@
-#include "global.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64skin_matrix.h"
+
#include "overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.h"
#include "overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.h"
#include "overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.h"
@@ -58,7 +71,7 @@ void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture) {
SkinMatrix_SetScale(&mfScale, scale, scale, scale);
SkinMatrix_MtxFMtxFMult(&mfTrans, &play->billboardMtxF, &mfTransBillboard);
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfScale, &mfResult);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
+ gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
diff --git a/src/code/z_elf_message.c b/src/code/z_elf_message.c
index c90b4ee6f4..bb93099363 100644
--- a/src/code/z_elf_message.c
+++ b/src/code/z_elf_message.c
@@ -1,5 +1,10 @@
-#include "global.h"
+#include "libu64/debug.h"
+#include "rand.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64quest_hint.h"
#include "z64quest_hint_commands.h"
+#include "z64save.h"
QuestHintCmd sChildSariaQuestHints[] = {
QUEST_HINT_STRENGTH_UPG(SKIP, 0, false, 3),
diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c
index c90a7eb3bb..9b2bf7c0b7 100644
--- a/src/code/z_en_a_keep.c
+++ b/src/code/z_en_a_keep.c
@@ -1,8 +1,15 @@
-#include "global.h"
+#include "z_en_a_obj.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_d_hsblock/object_d_hsblock.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnAObj_Init(Actor* thisx, PlayState* play);
void EnAObj_Destroy(Actor* thisx, PlayState* play);
@@ -114,8 +121,8 @@ void EnAObj_Init(Actor* thisx, PlayState* play) {
this->dyna.bgId = BGACTOR_NEG_ONE;
this->dyna.interactFlags = 0;
this->dyna.transformFlags = 0;
- thisx->uncullZoneDownward = 1200.0f;
- thisx->uncullZoneScale = 200.0f;
+ thisx->cullingVolumeDownward = 1200.0f;
+ thisx->cullingVolumeScale = 200.0f;
switch (thisx->params) {
case A_OBJ_BLOCK_LARGE:
@@ -288,8 +295,8 @@ void EnAObj_BoulderFragment(EnAObj* this, PlayState* play) {
}
void EnAObj_SetupBlock(EnAObj* this, s16 type) {
- this->dyna.actor.uncullZoneDownward = 1200.0f;
- this->dyna.actor.uncullZoneScale = 720.0f;
+ this->dyna.actor.cullingVolumeDownward = 1200.0f;
+ this->dyna.actor.cullingVolumeScale = 720.0f;
EnAObj_SetupAction(this, EnAObj_Block);
}
diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c
index 74b05cf067..f0c627b250 100644
--- a/src/code/z_en_item00.c
+++ b/src/code/z_en_item00.c
@@ -1,8 +1,29 @@
-#include "global.h"
+#include "z_en_item00.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64draw.h"
+#include "z64effect.h"
+#include "z64item.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+
+#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-eu-mq-dbg:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128" \
+ "gc-us-mq:128 ique-cn:128 ntsc-1.0:128 ntsc-1.2:128"
+
#define FLAGS 0
void EnItem00_Init(Actor* thisx, PlayState* play);
@@ -72,64 +93,293 @@ static void* sItemDropTex[] = {
};
static u8 sItemDropIds[] = {
- ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_NONE, ITEM00_NONE, ITEM00_RUPEE_BLUE,
- ITEM00_RUPEE_GREEN, ITEM00_MAGIC_SMALL, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_NONE,
- ITEM00_MAGIC_SMALL, ITEM00_FLEXIBLE, ITEM00_SEEDS, ITEM00_SEEDS, ITEM00_NONE,
- ITEM00_RUPEE_BLUE, ITEM00_RUPEE_GREEN, ITEM00_MAGIC_SMALL, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE,
- ITEM00_RECOVERY_HEART, ITEM00_NONE, ITEM00_RECOVERY_HEART, ITEM00_NONE, ITEM00_FLEXIBLE,
- ITEM00_NONE, ITEM00_BOMBS_A, ITEM00_NONE, ITEM00_SEEDS, ITEM00_NONE,
- ITEM00_NONE, ITEM00_MAGIC_SMALL, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_GREEN, ITEM00_MAGIC_SMALL,
- ITEM00_NONE, ITEM00_RECOVERY_HEART, ITEM00_NONE, ITEM00_NONE, ITEM00_RECOVERY_HEART,
- ITEM00_NONE, ITEM00_SEEDS, ITEM00_SEEDS, ITEM00_NONE, ITEM00_BOMBS_A,
- ITEM00_NONE, ITEM00_FLEXIBLE, ITEM00_MAGIC_SMALL, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_GREEN,
- ITEM00_NUTS, ITEM00_NONE, ITEM00_SEEDS, ITEM00_SEEDS, ITEM00_NUTS,
- ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_SEEDS, ITEM00_NONE, ITEM00_FLEXIBLE,
- ITEM00_NONE, ITEM00_NONE, ITEM00_NONE, ITEM00_NONE, ITEM00_RUPEE_GREEN,
- ITEM00_RUPEE_GREEN, ITEM00_SEEDS, ITEM00_BOMBS_A, ITEM00_MAGIC_SMALL, ITEM00_BOMBS_A,
- ITEM00_NONE, ITEM00_NONE, ITEM00_RECOVERY_HEART, ITEM00_NONE, ITEM00_NONE,
- ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_NONE, ITEM00_NONE, ITEM00_MAGIC_SMALL,
- ITEM00_RUPEE_GREEN, ITEM00_MAGIC_SMALL, ITEM00_RUPEE_GREEN, ITEM00_NONE, ITEM00_RUPEE_BLUE,
- ITEM00_NONE, ITEM00_NONE, ITEM00_RECOVERY_HEART, ITEM00_NONE, ITEM00_NONE,
- ITEM00_RECOVERY_HEART, ITEM00_FLEXIBLE, ITEM00_SEEDS, ITEM00_SEEDS, ITEM00_NONE,
- ITEM00_MAGIC_SMALL, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_NONE, ITEM00_RUPEE_GREEN,
- ITEM00_NONE, ITEM00_RECOVERY_HEART, ITEM00_NONE, ITEM00_NONE, ITEM00_BOMBS_A,
- ITEM00_ARROWS_SMALL, ITEM00_NONE, ITEM00_ARROWS_MEDIUM, ITEM00_MAGIC_SMALL, ITEM00_FLEXIBLE,
- ITEM00_NONE, ITEM00_MAGIC_LARGE, ITEM00_RUPEE_GREEN, ITEM00_NONE, ITEM00_RUPEE_BLUE,
- ITEM00_NONE, ITEM00_RUPEE_GREEN, ITEM00_RECOVERY_HEART, ITEM00_FLEXIBLE, ITEM00_BOMBS_A,
- ITEM00_ARROWS_SMALL, ITEM00_NONE, ITEM00_NONE, ITEM00_NONE, ITEM00_MAGIC_SMALL,
- ITEM00_NONE, ITEM00_NONE, ITEM00_MAGIC_LARGE, ITEM00_ARROWS_LARGE, ITEM00_ARROWS_MEDIUM,
- ITEM00_ARROWS_MEDIUM, ITEM00_ARROWS_SMALL, ITEM00_ARROWS_SMALL, ITEM00_FLEXIBLE, ITEM00_ARROWS_SMALL,
- ITEM00_ARROWS_SMALL, ITEM00_ARROWS_SMALL, ITEM00_ARROWS_MEDIUM, ITEM00_ARROWS_SMALL, ITEM00_ARROWS_SMALL,
- ITEM00_ARROWS_SMALL, ITEM00_ARROWS_MEDIUM, ITEM00_ARROWS_LARGE, ITEM00_ARROWS_LARGE, ITEM00_MAGIC_LARGE,
- ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_LARGE,
- ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_LARGE, ITEM00_MAGIC_SMALL,
- ITEM00_MAGIC_LARGE, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_LARGE,
- ITEM00_BOMBS_A, ITEM00_NONE, ITEM00_BOMBS_A, ITEM00_NONE, ITEM00_BOMBS_A,
- ITEM00_FLEXIBLE, ITEM00_BOMBS_A, ITEM00_BOMBS_A, ITEM00_BOMBS_A, ITEM00_NONE,
- ITEM00_NONE, ITEM00_NONE, ITEM00_NONE, ITEM00_BOMBS_A, ITEM00_NONE,
- ITEM00_BOMBS_A, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART,
- ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART,
- ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART,
- ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_RUPEE_RED, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_BLUE,
- ITEM00_RUPEE_RED, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED,
- ITEM00_RUPEE_RED, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED,
- ITEM00_RUPEE_RED, ITEM00_RUPEE_RED, ITEM00_RUPEE_RED, ITEM00_SEEDS, ITEM00_NONE,
- ITEM00_NUTS, ITEM00_NONE, ITEM00_STICK, ITEM00_NONE, ITEM00_NONE,
- ITEM00_SEEDS, ITEM00_NONE, ITEM00_NONE, ITEM00_NONE, ITEM00_NUTS,
- ITEM00_NONE, ITEM00_NUTS, ITEM00_RECOVERY_HEART, ITEM00_SEEDS, ITEM00_RECOVERY_HEART,
- ITEM00_NONE, ITEM00_SEEDS, ITEM00_NONE, ITEM00_RECOVERY_HEART, ITEM00_NONE,
- ITEM00_NONE, ITEM00_RECOVERY_HEART, ITEM00_RECOVERY_HEART, ITEM00_NONE, ITEM00_NONE,
- ITEM00_RECOVERY_HEART, ITEM00_NONE, ITEM00_RECOVERY_HEART, ITEM00_SEEDS, ITEM00_FLEXIBLE,
+ // 0
+ ITEM00_RUPEE_GREEN,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_RUPEE_GREEN,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_FLEXIBLE,
+ ITEM00_SEEDS,
+ ITEM00_SEEDS,
+ ITEM00_NONE,
+ ITEM00_RUPEE_BLUE,
+
+ // 1
+ ITEM00_RUPEE_GREEN,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_RUPEE_GREEN,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_FLEXIBLE,
+ ITEM00_NONE,
+ ITEM00_BOMBS_A,
+ ITEM00_NONE,
+ ITEM00_SEEDS,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_MAGIC_SMALL,
+
+ // 2
+ ITEM00_RUPEE_GREEN,
+ ITEM00_RUPEE_GREEN,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_SEEDS,
+ ITEM00_SEEDS,
+ ITEM00_NONE,
+ ITEM00_BOMBS_A,
+ ITEM00_NONE,
+ ITEM00_FLEXIBLE,
+ ITEM00_MAGIC_SMALL,
+
+ // 3
+ ITEM00_RUPEE_GREEN,
+ ITEM00_RUPEE_GREEN,
+ ITEM00_NUTS,
+ ITEM00_NONE,
+ ITEM00_SEEDS,
+ ITEM00_SEEDS,
+ ITEM00_NUTS,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_SEEDS,
+ ITEM00_NONE,
+ ITEM00_FLEXIBLE,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_NONE,
+
+ // 4
+ ITEM00_RUPEE_GREEN,
+ ITEM00_RUPEE_GREEN,
+ ITEM00_SEEDS,
+ ITEM00_BOMBS_A,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_BOMBS_A,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_MAGIC_SMALL,
+
+ // 5
+ ITEM00_RUPEE_GREEN,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_RUPEE_GREEN,
+ ITEM00_NONE,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_FLEXIBLE,
+ ITEM00_SEEDS,
+ ITEM00_SEEDS,
+ ITEM00_NONE,
+ ITEM00_MAGIC_SMALL,
+
+ // 6
+ ITEM00_RUPEE_GREEN,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_NONE,
+ ITEM00_RUPEE_GREEN,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_BOMBS_A,
+ ITEM00_ARROWS_SMALL,
+ ITEM00_NONE,
+ ITEM00_ARROWS_MEDIUM,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_FLEXIBLE,
+ ITEM00_NONE,
+ ITEM00_MAGIC_LARGE,
+
+ // 7
+ ITEM00_RUPEE_GREEN,
+ ITEM00_NONE,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_NONE,
+ ITEM00_RUPEE_GREEN,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_FLEXIBLE,
+ ITEM00_BOMBS_A,
+ ITEM00_ARROWS_SMALL,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_MAGIC_LARGE,
+
+ // 8
+ ITEM00_ARROWS_LARGE,
+ ITEM00_ARROWS_MEDIUM,
+ ITEM00_ARROWS_MEDIUM,
+ ITEM00_ARROWS_SMALL,
+ ITEM00_ARROWS_SMALL,
+ ITEM00_FLEXIBLE,
+ ITEM00_ARROWS_SMALL,
+ ITEM00_ARROWS_SMALL,
+ ITEM00_ARROWS_SMALL,
+ ITEM00_ARROWS_MEDIUM,
+ ITEM00_ARROWS_SMALL,
+ ITEM00_ARROWS_SMALL,
+ ITEM00_ARROWS_SMALL,
+ ITEM00_ARROWS_MEDIUM,
+ ITEM00_ARROWS_LARGE,
+ ITEM00_ARROWS_LARGE,
+
+ // 9
+ ITEM00_MAGIC_LARGE,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_LARGE,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_LARGE,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_LARGE,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_SMALL,
+ ITEM00_MAGIC_LARGE,
+
+ // 10
+ ITEM00_BOMBS_A,
+ ITEM00_NONE,
+ ITEM00_BOMBS_A,
+ ITEM00_NONE,
+ ITEM00_BOMBS_A,
+ ITEM00_FLEXIBLE,
+ ITEM00_BOMBS_A,
+ ITEM00_BOMBS_A,
+ ITEM00_BOMBS_A,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_BOMBS_A,
+ ITEM00_NONE,
+ ITEM00_BOMBS_A,
+
+ // 11
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+
+ // 12
+ ITEM00_RUPEE_RED,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_RUPEE_RED,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_RUPEE_RED,
+ ITEM00_RUPEE_RED,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_RUPEE_RED,
+ ITEM00_RUPEE_BLUE,
+ ITEM00_RUPEE_RED,
+ ITEM00_RUPEE_RED,
+ ITEM00_RUPEE_RED,
+ ITEM00_RUPEE_RED,
+
+ // 13
+ ITEM00_SEEDS,
+ ITEM00_NONE,
+ ITEM00_NUTS,
+ ITEM00_NONE,
+ ITEM00_STICK,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_SEEDS,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_NUTS,
+ ITEM00_NONE,
+ ITEM00_NUTS,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_SEEDS,
+
+ // 14
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_SEEDS,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_NONE,
+ ITEM00_RECOVERY_HEART,
+ ITEM00_SEEDS,
+ ITEM00_FLEXIBLE,
};
static u8 sDropQuantities[] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
- 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, // 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, // 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, // 5
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, // 10
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 11
+ 3, 3, 3, 1, 3, 3, 3, 1, 1, 3, 1, 3, 1, 1, 1, 3, // 12
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 13
+ 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, // 14
};
void EnItem00_SetupAction(EnItem00* this, EnItem00ActionFunc actionFunc) {
@@ -977,7 +1227,7 @@ EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params) {
(spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) {
spawnedActor->actor.room = -1;
}
- spawnedActor->actor.flags |= ACTOR_FLAG_4;
+ spawnedActor->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
}
}
@@ -1009,7 +1259,7 @@ EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params) {
spawnedActor->actor.speed = 0.0f;
spawnedActor->actor.gravity = param4000 ? 0.0f : -0.9f;
spawnedActor->actor.world.rot.y = Rand_CenteredFloat(65536.0f);
- spawnedActor->actor.flags |= ACTOR_FLAG_4;
+ spawnedActor->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
}
}
@@ -1123,7 +1373,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
spawnedActor->actor.world.rot.y = Rand_ZeroOne() * 40000.0f;
Actor_SetScale(&spawnedActor->actor, 0.0f);
EnItem00_SetupAction(spawnedActor, func_8001E304);
- spawnedActor->actor.flags |= ACTOR_FLAG_4;
+ spawnedActor->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
if ((spawnedActor->actor.params != ITEM00_SMALL_KEY) &&
(spawnedActor->actor.params != ITEM00_HEART_PIECE) &&
(spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) {
diff --git a/src/code/code_8006C3A0.c b/src/code/z_env_flags.c
similarity index 87%
rename from src/code/code_8006C3A0.c
rename to src/code/z_env_flags.c
index 0057128e22..164ff1dde4 100644
--- a/src/code/code_8006C3A0.c
+++ b/src/code/z_env_flags.c
@@ -1,4 +1,7 @@
-#include "global.h"
+#include "array_count.h"
+#include "ultra64.h"
+#include "z64cutscene_flags.h"
+#include "z64play.h"
void CutsceneFlags_UnsetAll(PlayState* play) {
u8 i;
diff --git a/src/code/z_face_reaction.c b/src/code/z_face_reaction.c
index a06bd4dc85..ea6313a762 100644
--- a/src/code/z_face_reaction.c
+++ b/src/code/z_face_reaction.c
@@ -1,4 +1,6 @@
-#include "global.h"
+#include "ultra64.h"
+#include "z64face_reaction.h"
+#include "z64player.h"
u16 sMaskReactionSetTextIds[MASK_REACTION_SET_MAX][PLAYER_MASK_MAX] = {
// MASK_REACTION_SET_CARPENTER_BOSS
@@ -112,67 +114,67 @@ u16 sMaskReactionSetTextIds[MASK_REACTION_SET_MAX][PLAYER_MASK_MAX] = {
// MASK_REACTION_SET_DANCING_COUPLE
{ 0x0000, 0x711C, 0x711E, 0x711C, 0x711F, 0x711E, 0x711C, 0x711D, 0x711F },
- // MASK_REACTION_SET_37
+ // MASK_REACTION_SET_DOG_LADY
{ 0x0000, 0x7104, 0x7105, 0x7107, 0x7107, 0x7105, 0x7106, 0x7107, 0x7107 },
- // MASK_REACTION_SET_38
+ // MASK_REACTION_SET_WOMAN_3
{ 0x0000, 0x7107, 0x7105, 0x7107, 0x7107, 0x7106, 0x7107, 0x7107, 0x7105 },
- // MASK_REACTION_SET_39
+ // MASK_REACTION_SET_MAN_1_BEARD
{ 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 },
- // MASK_REACTION_SET_40
+ // MASK_REACTION_SET_MAN_2_BALD
{ 0x0000, 0x7113, 0x7113, 0x7113, 0x7113, 0x7113, 0x7113, 0x7111, 0x7113 },
- // MASK_REACTION_SET_41
+ // MASK_REACTION_SET_MAN_1_SHAVED_BLACK_SHIRT
{ 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 },
- // MASK_REACTION_SET_42
+ // MASK_REACTION_SET_BEGGAR
{ 0x0000, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7117, 0x7113 },
- // MASK_REACTION_SET_43
+ // MASK_REACTION_SET_OLD_WOMAN
{ 0x0000, 0x7101, 0x7100, 0x7102, 0x7103, 0x7101, 0x7100, 0x7102, 0x7103 },
- // MASK_REACTION_SET_44
+ // MASK_REACTION_SET_OLD_MAN
{ 0x0000, 0x7100, 0x7102, 0x7100, 0x7100, 0x7100, 0x7100, 0x7100, 0x7102 },
- // MASK_REACTION_SET_45
+ // MASK_REACTION_SET_YOUNG_WOMAN_BROWN_HAIR
{ 0x0000, 0x710A, 0x7109, 0x7109, 0x710A, 0x710B, 0x7108, 0x7109, 0x710B },
- // MASK_REACTION_SET_46
+ // MASK_REACTION_SET_MAN_2_MUSTACHE_RED_SHIRT
{ 0x0000, 0x7117, 0x7112, 0x7113, 0x7110, 0x710C, 0x7117, 0x710E, 0x7112 },
- // MASK_REACTION_SET_47
+ // MASK_REACTION_SET_MAN_2_MUSTACHE_BLUE_SHIRT
{ 0x0000, 0x710D, 0x710F, 0x710C, 0x7112, 0x710D, 0x710C, 0x710C, 0x710F },
- // MASK_REACTION_SET_48
+ // MASK_REACTION_SET_YOUNG_WOMAN_ORANGE_HAIR
{ 0x0000, 0x710A, 0x7109, 0x711A, 0x710A, 0x7109, 0x7108, 0x710B, 0x7109 },
- // MASK_REACTION_SET_49
+ // MASK_REACTION_SET_MAN_2_ALT_MUSTACHE
{ 0x0000, 0x710C, 0x710F, 0x7113, 0x7110, 0x710D, 0x7112, 0x7116, 0x710D },
- // MASK_REACTION_SET_50
+ // MASK_REACTION_SET_MAN_1_BOWL_CUT_PURPLE_SHIRT
{ 0x0000, 0x7115, 0x7114, 0x7114, 0x7115, 0x7114, 0x7114, 0x7116, 0x7117 },
- // MASK_REACTION_SET_51
+ // MASK_REACTION_SET_MAN_2_BEARD
{ 0x0000, 0x7113, 0x710F, 0x7113, 0x7110, 0x710C, 0x711A, 0x710D, 0x7112 },
- // MASK_REACTION_SET_52
+ // MASK_REACTION_SET_OLD_MAN_BALD_BROWN_ROBE
{ 0x0000, 0x7101, 0x7102, 0x7103, 0x7101, 0x7100, 0x7100, 0x7102, 0x7100 },
- // MASK_REACTION_SET_53
+ // MASK_REACTION_SET_MAN_2_MUSTACHE_WHITE_SHIRT
{ 0x0000, 0x7112, 0x710E, 0x7112, 0x710E, 0x710D, 0x7112, 0x710E, 0x710F },
- // MASK_REACTION_SET_54
+ // MASK_REACTION_SET_MAN_1_SHAVED_GREEN_SHIRT
{ 0x0000, 0x7142, 0x7141, 0x7142, 0x7143, 0x7140, 0x7140, 0x7141, 0x7143 },
- // MASK_REACTION_SET_55
+ // MASK_REACTION_SET_WOMAN_2
{ 0x0000, 0x713C, 0x713D, 0x713D, 0x713E, 0x713E, 0x713F, 0x713D, 0x713F },
- // MASK_REACTION_SET_56
+ // MASK_REACTION_SET_OLD_MAN_BALD_PURPLE_ROBE
{ 0x0000, 0x7101, 0x7102, 0x7103, 0x7101, 0x7100, 0x7100, 0x7102, 0x7100 },
- // MASK_REACTION_SET_57
+ // MASK_REACTION_SET_MAN_1_BOWL_CUT_GREEN_SHIRT
{ 0x0000, 0x7113, 0x7117, 0x7113, 0x7110, 0x7112, 0x7112, 0x7116, 0x7112 },
// MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_1
@@ -182,7 +184,7 @@ u16 sMaskReactionSetTextIds[MASK_REACTION_SET_MAX][PLAYER_MASK_MAX] = {
{ 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x710C, 0x7105, 0x7107, 0x7107 },
};
-u16 MaskReaction_GetTextId(PlayState* play, u32 maskReactionSet) {
+u16 MaskReaction_GetTextId(struct PlayState* play, u32 maskReactionSet) {
u8 currentMask = Player_GetMask(play);
return sMaskReactionSetTextIds[maskReactionSet][currentMask];
diff --git a/src/code/z_fbdemo.c b/src/code/z_fbdemo.c
index a2b0fb8bf1..2621f1c129 100644
--- a/src/code/z_fbdemo.c
+++ b/src/code/z_fbdemo.c
@@ -9,7 +9,15 @@
* @note The only coded effect has a visual effect to blend the tiles to a single point, which looks like the screen
* gets sucked into.
*/
-#include "global.h"
+#include "transition_tile.h"
+
+#include "libc64/malloc.h"
+#include "libc64/sleep.h"
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "printf.h"
+#include "z64math.h"
+#include "z64transition_instances.h"
// color framebuffer
extern u16 D_0F000000[];
diff --git a/src/code/z_fbdemo_circle.c b/src/code/z_fbdemo_circle.c
index 59f019e952..d8aa81df06 100644
--- a/src/code/z_fbdemo_circle.c
+++ b/src/code/z_fbdemo_circle.c
@@ -1,4 +1,9 @@
-#include "global.h"
+#include "transition_circle.h"
+
+#include "color.h"
+#include "gfx.h"
+#include "sfx.h"
+#include "z64transition.h"
typedef enum TransitionCircleDirection {
/* 0 */ TRANS_CIRCLE_DIR_IN,
@@ -10,34 +15,7 @@ Gfx sTransCircleEmptyDL[] = {
gsSPEndDisplayList(),
};
-#include "assets/code/fbdemo_circle/z_fbdemo_circle.c"
-
-Gfx sTransCircleDL[] = {
- gsDPPipeSync(),
- gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
- G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH),
- gsSPSetGeometryMode(G_SHADE | G_SHADING_SMOOTH),
- gsDPSetOtherMode(G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
- G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
- G_AC_NONE | G_ZS_PIXEL | G_RM_XLU_SURF | G_RM_XLU_SURF2),
- gsDPSetCombineMode(G_CC_BLENDPEDECALA, G_CC_BLENDPEDECALA),
- gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
- gsDPLoadTextureBlock(0x08000000, G_IM_FMT_I, G_IM_SIZ_8b, 16, 64, 0, G_TX_NOMIRROR | G_TX_WRAP,
- G_TX_NOMIRROR | G_TX_CLAMP, 4, 6, G_TX_NOLOD, G_TX_NOLOD),
- gsSPDisplayList(0x09000000),
- gsSPVertex(sTransCircleVtx, 32, 0),
- gsSP2Triangles(0, 1, 2, 0, 1, 3, 4, 0),
- gsSP2Triangles(3, 5, 6, 0, 5, 7, 8, 0),
- gsSP2Triangles(7, 9, 10, 0, 9, 11, 12, 0),
- gsSP2Triangles(11, 13, 14, 0, 13, 15, 16, 0),
- gsSP2Triangles(15, 17, 18, 0, 17, 19, 20, 0),
- gsSP2Triangles(19, 21, 22, 0, 21, 23, 24, 0),
- gsSP2Triangles(23, 25, 26, 0, 25, 27, 28, 0),
- gsSP1Triangle(27, 29, 30, 0),
- gsSPVertex(&sTransCircleVtx[31], 3, 0),
- gsSP1Triangle(0, 1, 2, 0),
- gsSPEndDisplayList(),
-};
+#include "assets/code/fbdemo_circle/code.c"
void TransitionCircle_Start(void* thisx) {
TransitionCircle* this = (TransitionCircle*)thisx;
diff --git a/src/code/z_fbdemo_fade.c b/src/code/z_fbdemo_fade.c
index d2cb382f05..1be97d5f51 100644
--- a/src/code/z_fbdemo_fade.c
+++ b/src/code/z_fbdemo_fade.c
@@ -1,5 +1,13 @@
-#include "global.h"
+#include "transition_fade.h"
+
+#include "main.h"
+#include "printf.h"
+#include "regs.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64save.h"
+#include "z64transition_instances.h"
typedef enum TransitionFadeDirection {
/* 0 */ TRANS_FADE_DIR_IN,
diff --git a/src/code/z_fbdemo_triforce.c b/src/code/z_fbdemo_triforce.c
index 7bb8862b2d..6624a4373c 100644
--- a/src/code/z_fbdemo_triforce.c
+++ b/src/code/z_fbdemo_triforce.c
@@ -1,6 +1,10 @@
-#include "global.h"
+#include "transition_triforce.h"
-#include "assets/code/fbdemo_triforce/z_fbdemo_triforce.c"
+#include "printf.h"
+#include "z64math.h"
+#include "z64transition_instances.h"
+
+#include "assets/code/fbdemo_triforce/code.c"
void TransitionTriforce_Start(void* thisx) {
TransitionTriforce* this = (TransitionTriforce*)thisx;
diff --git a/src/code/z_fbdemo_wipe1.c b/src/code/z_fbdemo_wipe1.c
index e008f68613..25b45e7e2c 100644
--- a/src/code/z_fbdemo_wipe1.c
+++ b/src/code/z_fbdemo_wipe1.c
@@ -1,39 +1,15 @@
-#include "global.h"
+#include "transition_wipe.h"
+
+#include "gfx.h"
+#include "z64save.h"
+#include "z64transition_instances.h"
typedef enum TransitionWipeDirection {
/* 0 */ TRANS_WIPE_DIR_IN,
/* 1 */ TRANS_WIPE_DIR_OUT
} TransitionWipeDirection;
-#include "assets/code/fbdemo_wipe1/z_fbdemo_wipe1.c"
-
-Gfx sTransWipeDL[] = {
- gsDPPipeSync(),
- gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
- G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH),
- gsSPSetGeometryMode(G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH),
- gsDPSetOtherMode(G_AD_DISABLE | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
- G_TD_CLAMP | G_TP_PERSP | G_CYC_2CYCLE | G_PM_1PRIMITIVE,
- G_AC_NONE | G_ZS_PRIM | G_RM_PASS | G_RM_AA_ZB_TEX_EDGE2),
- gsDPSetCombineLERP(TEXEL1, TEXEL0, PRIM_LOD_FRAC, TEXEL0, TEXEL1, TEXEL0, PRIM_LOD_FRAC, TEXEL0, COMBINED, 0,
- PRIMITIVE, 0, COMBINED, 0, PRIMITIVE, 0),
- gsDPSetPrimDepth(0, 0),
- gsDPLoadTextureBlock_4b(sTransWipeTex, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 6,
- 6, 11, G_TX_NOLOD),
- gsDPLoadMultiBlock_4b(sTransWipeTex, 0x0100, 1, G_IM_FMT_I, 64, 64, 0, G_TX_NOMIRROR | G_TX_WRAP,
- G_TX_MIRROR | G_TX_WRAP, 6, 6, 11, 1),
- gsDPSetTextureLUT(G_TT_NONE),
- gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
- gsSPDisplayList(0x08000000),
- gsSPVertex(sTransWipeVtx, 25, 0),
- gsSP2Triangles(0, 1, 2, 0, 1, 3, 4, 0),
- gsSP2Triangles(5, 6, 7, 0, 6, 8, 9, 0),
- gsSP2Triangles(8, 10, 11, 0, 10, 12, 13, 0),
- gsSP2Triangles(12, 14, 15, 0, 14, 16, 17, 0),
- gsSP2Triangles(16, 18, 19, 0, 18, 20, 21, 0),
- gsSP2Triangles(20, 22, 23, 0, 22, 0, 24, 0),
- gsSPEndDisplayList(),
-};
+#include "assets/code/fbdemo_wipe1/code.c"
// unused.
Gfx sTransWipeSyncDL[] = {
diff --git a/src/code/z_fcurve_data.c b/src/code/z_fcurve_data.c
index a1c03a9278..a1950a568b 100644
--- a/src/code/z_fcurve_data.c
+++ b/src/code/z_fcurve_data.c
@@ -2,7 +2,6 @@
* File: z_fcurve_data.c
* Description: Interpolation functions for use with Curve SkelAnime
*/
-#include "global.h"
#include "z64curve.h"
#define FCURVE_INTERP_CUBIC 0 // Interpolate using a Hermite cubic spline
diff --git a/src/code/z_fcurve_data_skelanime.c b/src/code/z_fcurve_data_skelanime.c
index 1086adb2ec..e5d1f1fbb3 100644
--- a/src/code/z_fcurve_data_skelanime.c
+++ b/src/code/z_fcurve_data_skelanime.c
@@ -25,8 +25,16 @@
* - higher detail draws both.
*/
-#include "global.h"
+#include "gfx.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "zelda_arena.h"
+#include "z64actor.h"
#include "z64curve.h"
+#include "z64play.h"
void SkelCurve_Clear(SkelCurve* skelCurve) {
skelCurve->limbCount = 0;
diff --git a/src/code/z_frame_advance.c b/src/code/z_frame_advance.c
index 486717a50f..6ca410a759 100644
--- a/src/code/z_frame_advance.c
+++ b/src/code/z_frame_advance.c
@@ -3,8 +3,7 @@
#include "stdbool.h"
#include "controller.h"
-#include "padmgr.h"
-#include "macros.h"
+#include "libu64/pad.h"
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx) {
frameAdvCtx->timer = 0;
diff --git a/src/code/z_game_dlftbls.c b/src/code/z_game_dlftbls.c
index 2cad84089d..57efe90dfc 100644
--- a/src/code/z_game_dlftbls.c
+++ b/src/code/z_game_dlftbls.c
@@ -1,4 +1,11 @@
-#include "global.h"
+#include "segment_symbols.h"
+#include "console_logo_state.h"
+#include "file_select_state.h"
+#include "map_select_state.h"
+#include "setup_state.h"
+#include "title_setup_state.h"
+#include "z_game_dlftbls.h"
+#include "z64play.h"
// Linker symbol declarations (used in the table below)
#define DEFINE_GAMESTATE(typeName, enumName, name) DECLARE_OVERLAY_SEGMENT(name)
diff --git a/src/code/z_game_over.c b/src/code/z_game_over.c
index e6335307da..f73616116d 100644
--- a/src/code/z_game_over.c
+++ b/src/code/z_game_over.c
@@ -1,7 +1,12 @@
-#include "z64game_over.h"
-
-#include "global.h"
+#include "array_count.h"
+#include "letterbox.h"
+#include "regs.h"
+#include "rumble.h"
+#include "sequence.h"
#include "versions.h"
+#include "z64game_over.h"
+#include "z64play.h"
+#include "z64save.h"
void GameOver_Init(PlayState* play) {
play->gameOverCtx.state = GAMEOVER_INACTIVE;
@@ -102,7 +107,7 @@ void GameOver_Update(PlayState* play) {
sGameOverTimer--;
if (sGameOverTimer == 0) {
- play->pauseCtx.state = PAUSE_STATE_8;
+ play->pauseCtx.state = PAUSE_STATE_GAME_OVER_START;
gameOverCtx->state++;
Rumble_Reset();
}
diff --git a/src/code/z_horse.c b/src/code/z_horse.c
index d3d66c3de6..d61af32e7e 100644
--- a/src/code/z_horse.c
+++ b/src/code/z_horse.c
@@ -1,30 +1,51 @@
-#include "global.h"
+#include "array_count.h"
#include "terminal.h"
-#include "src/overlays/actors/ovl_En_Horse/z_en_horse.h"
+#include "z_lib.h"
+#include "printf.h"
+#include "regs.h"
+#include "translation.h"
+#include "z64horse.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
-s32 func_8006CFC0(s32 sceneId) {
+/**
+ * Tests if the player horse can be spawned
+ *
+ * @param sceneId the checked scene
+ * @return true if the player horse can appear in the scene, else false
+ */
+s32 Horse_CanSpawn(s32 sceneId) {
s32 validSceneIds[] = { SCENE_HYRULE_FIELD, SCENE_LAKE_HYLIA, SCENE_GERUDO_VALLEY, SCENE_GERUDOS_FORTRESS,
SCENE_LON_LON_RANCH };
s32 i;
for (i = 0; i < ARRAY_COUNT(validSceneIds); i++) {
if (sceneId == validSceneIds[i]) {
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
-void func_8006D074(PlayState* play) {
+/**
+ * Sets horseData to a neutral spawn in Hyrule Field
+ */
+void Horse_ResetHorseData(PlayState* play) {
gSaveContext.save.info.horseData.sceneId = SCENE_HYRULE_FIELD;
gSaveContext.save.info.horseData.pos.x = -1840;
gSaveContext.save.info.horseData.pos.y = 72;
gSaveContext.save.info.horseData.pos.z = 5497;
- gSaveContext.save.info.horseData.angle = -27353;
+ gSaveContext.save.info.horseData.angle = -0x6AD9;
}
-void func_8006D0AC(PlayState* play) {
+/**
+ * Forces the player horse to spawn in a safe spot if the current spawn is in Lake Hylia
+ * This prevents the horse from spawning underwater after obtaining the Water Medallion
+ */
+void Horse_FixLakeHyliaPosition(PlayState* play) {
if (gSaveContext.save.info.horseData.sceneId == SCENE_LAKE_HYLIA) {
gSaveContext.save.info.horseData.sceneId = SCENE_LAKE_HYLIA;
gSaveContext.save.info.horseData.pos.x = -2065;
@@ -41,65 +62,78 @@ typedef struct HorseSpawn {
/* 0x0A */ s16 type;
} HorseSpawn;
-void func_8006D0EC(PlayState* play, Player* player) {
+void Horse_SetupInGameplay(PlayState* play, Player* player) {
s32 i;
HorseSpawn horseSpawns[] = {
- { SCENE_HYRULE_FIELD, -460, 100, 6640, 0, 2 }, { SCENE_LAKE_HYLIA, -1929, -1025, 768, 0, 2 },
- { SCENE_GERUDO_VALLEY, 2566, -259, 767, 0, 2 }, { SCENE_GERUDOS_FORTRESS, -328, 10, 953, 0, 2 },
- { SCENE_LON_LON_RANCH, 928, 0, -2280, 0, 2 },
+ { SCENE_HYRULE_FIELD, -460, 100, 6640, 0, HORSE_PTYPE_INACTIVE },
+ { SCENE_LAKE_HYLIA, -1929, -1025, 768, 0, HORSE_PTYPE_INACTIVE },
+ { SCENE_GERUDO_VALLEY, 2566, -259, 767, 0, HORSE_PTYPE_INACTIVE },
+ { SCENE_GERUDOS_FORTRESS, -328, 10, 953, 0, HORSE_PTYPE_INACTIVE },
+ { SCENE_LON_LON_RANCH, 928, 0, -2280, 0, HORSE_PTYPE_INACTIVE },
};
- if ((AREG(6) != 0) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0))) {
- player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, player->actor.world.pos.x,
- player->actor.world.pos.y, player->actor.world.pos.z, player->actor.shape.rot.x,
- player->actor.shape.rot.y, player->actor.shape.rot.z, 9);
+ if (R_EXITED_SCENE_RIDING_HORSE &&
+ (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED)) {
+ // Player entering scene on top of horse
+ player->rideActor =
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, player->actor.world.pos.x, player->actor.world.pos.y,
+ player->actor.world.pos.z, player->actor.shape.rot.x, player->actor.shape.rot.y,
+ player->actor.shape.rot.z, HORSE_PTYPE_PLAYER_SPAWNED_RIDING);
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 343);
Actor_MountHorse(play, player, player->rideActor);
- func_8002DE74(play, player);
+ Actor_RequestHorseCameraSetting(play, player);
gSaveContext.save.info.horseData.sceneId = play->sceneId;
-
if (play->sceneId == SCENE_GERUDOS_FORTRESS) {
player->rideActor->room = -1;
}
} else if ((play->sceneId == SCENE_GERUDOS_FORTRESS) && (gSaveContext.minigameState == 3)) {
+ // Completed Horseback Archery Minigame
Actor* horseActor;
gSaveContext.minigameState = 0;
- horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, 1);
+ horseActor =
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, HORSE_PTYPE_1);
horseActor->room = -1;
} else if ((gSaveContext.save.entranceIndex == ENTR_LON_LON_RANCH_7) &&
GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
+ // Completed Horse Race
Actor* horseActor =
- Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1);
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, HORSE_PTYPE_1);
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 389);
} else if ((play->sceneId == gSaveContext.save.info.horseData.sceneId) &&
- (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || DREG(1) != 0)) {
+ (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED)) {
+ // Player enters a scene where the horse was left previously
PRINTF(T("馬存在によるセット %d %d %d\n", "Set by existence of horse %d %d %d\n"),
- gSaveContext.save.info.horseData.sceneId, Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED), DREG(1));
+ gSaveContext.save.info.horseData.sceneId, Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED),
+ R_DEBUG_FORCE_EPONA_OBTAINED);
- if (func_8006CFC0(gSaveContext.save.info.horseData.sceneId)) {
+ if (Horse_CanSpawn(gSaveContext.save.info.horseData.sceneId)) {
Actor* horseActor =
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, gSaveContext.save.info.horseData.pos.x,
gSaveContext.save.info.horseData.pos.y, gSaveContext.save.info.horseData.pos.z, 0,
- gSaveContext.save.info.horseData.angle, 0, 1);
+ gSaveContext.save.info.horseData.angle, 0, HORSE_PTYPE_1);
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 414);
+
if (play->sceneId == SCENE_GERUDOS_FORTRESS) {
horseActor->room = -1;
}
} else {
- PRINTF(VT_COL(RED, WHITE));
+ PRINTF_COLOR_ERROR();
PRINTF(
T("Horse_SetNormal():%d セットスポットまずいです。\n", "Horse_SetNormal():%d set spot is no good.\n"),
gSaveContext.save.info.horseData.sceneId);
- PRINTF(VT_RST);
- func_8006D074(play);
+ PRINTF_RST();
+ Horse_ResetHorseData(play);
}
- } else if ((play->sceneId == SCENE_LON_LON_RANCH) && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) &&
- (DREG(1) == 0)) {
- Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1);
+ } else if ((play->sceneId == SCENE_LON_LON_RANCH) &&
+ !(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED)) {
+ // Player spawns in Lon-Lon Ranch without owning Epona
+ Actor* horseActor =
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, HORSE_PTYPE_1);
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 443);
- } else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0)) {
+ } else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED) {
+ // Player owns Epona, but isn't riding her and the current scene is not the same as the horse's last location.
for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) {
HorseSpawn* horseSpawn = &horseSpawns[i];
if (horseSpawn->sceneId == play->sceneId) {
@@ -107,134 +141,145 @@ void func_8006D0EC(PlayState* play, Player* player) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseSpawn->pos.x, horseSpawn->pos.y,
horseSpawn->pos.z, 0, horseSpawn->angle, 0, horseSpawn->type);
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 466);
+
if (play->sceneId == SCENE_GERUDOS_FORTRESS) {
horseActor->room = -1;
}
-
break;
}
}
- } else if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)) {
- if ((DREG(1) == 0) && (play->sceneId == SCENE_LON_LON_BUILDINGS) && !IS_DAY) {
- Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -60.0f, 0, 0x7360, 0, 1);
- }
+ } else if (!(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED) &&
+ (play->sceneId == SCENE_LON_LON_BUILDINGS) && !IS_DAY) {
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -60.0f, 0, 0x7360, 0, HORSE_PTYPE_1);
}
}
-typedef struct struct_8011F9B8 {
+typedef struct HorseCutsceneSpawn {
/* 0x00 */ s16 sceneId;
/* 0x04 */ s32 cutsceneIndex;
/* 0x08 */ Vec3s pos;
/* 0x0E */ s16 angle;
/* 0x10 */ s16 type;
-} struct_8011F9B8;
+} HorseCutsceneSpawn;
-void func_8006D684(PlayState* play, Player* player) {
- static struct_8011F9B8 D_8011F9B8[] = {
- { SCENE_GERUDOS_FORTRESS, 0xFFF0, { 3600, 1413, 360 }, 0x8001, 8 },
- { SCENE_LON_LON_RANCH, 0xFFF0, { -250, 1, -1580 }, 0x4000, 6 },
- { SCENE_LON_LON_RANCH, 0xFFF1, { 0, 0, 0 }, 0x0000, 5 },
- { SCENE_LON_LON_RANCH, 0xFFF5, { 0, 0, 0 }, 0x0000, 7 },
- { SCENE_HYRULE_FIELD, 0xFFF3, { -2961, 313, 7700 }, 0x0000, 7 },
- { SCENE_HYRULE_FIELD, 0xFFF4, { -1900, 313, 7015 }, 0x0000, 7 },
- { SCENE_HYRULE_FIELD, 0xFFF5, { -4043, 313, 6933 }, 0x0000, 7 },
- { SCENE_HYRULE_FIELD, 0xFFF6, { -4043, 313, 6933 }, 0x0000, 7 },
+void Horse_SetupInCutscene(PlayState* play, Player* player) {
+ static HorseCutsceneSpawn horseSpawns[] = {
+ { SCENE_GERUDOS_FORTRESS, 0xFFF0, { 3600, 1413, 360 }, 0x8001, HORSE_PTYPE_HORSEBACK_ARCHERY },
+ { SCENE_LON_LON_RANCH, 0xFFF0, { -250, 1, -1580 }, 0x4000, HORSE_PTYPE_6 }, // Horse Race
+ { SCENE_LON_LON_RANCH, 0xFFF1, { 0, 0, 0 }, 0x0000, HORSE_PTYPE_5 }, // Learned Epona's Song
+ { SCENE_LON_LON_RANCH, 0xFFF5, { 0, 0, 0 }, 0x0000, HORSE_PTYPE_7 }, // Credits
+ { SCENE_HYRULE_FIELD, 0xFFF3, { -2961, 313, 7700 }, 0x0000, HORSE_PTYPE_7 }, // Title Screen
+ { SCENE_HYRULE_FIELD, 0xFFF4, { -1900, 313, 7015 }, 0x0000, HORSE_PTYPE_7 },
+ { SCENE_HYRULE_FIELD, 0xFFF5, { -4043, 313, 6933 }, 0x0000, HORSE_PTYPE_7 }, // Credits
+ { SCENE_HYRULE_FIELD, 0xFFF6, { -4043, 313, 6933 }, 0x0000, HORSE_PTYPE_7 }, // Unused. Hopping Lon Lon
+ // Ranch North Gate
};
s32 pad;
s32 i;
- Vec3s spawnPos;
if ((gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_11 ||
gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_12 ||
gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_13 ||
gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_15) &&
(gSaveContext.respawnFlag == 0)) {
+ // Epona hopping over one of the Lon Lon Ranch fences
+ Vec3s spawnPos;
Vec3s spawnPositions[] = {
- { -2961, 313, 7700 },
- { -1900, 313, 7015 },
- { -4043, 313, 6933 },
- { -2313, 313, 5990 },
+ // Note: The east and west positions are paired with the wrong entranceIndex. However, the subsequent
+ // cutscene repositions the horse will override these coordinates while the horse is still obstructed, so no
+ // visual glitch occurs.
+ { -2961, 313, 7700 }, // South
+ { -1900, 313, 7015 }, // East
+ { -4043, 313, 6933 }, // West
+ { -2313, 313, 5990 }, // North-East
};
+ // South of Lon Lon player spawn
if (gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_11) {
spawnPos = spawnPositions[0];
+ // West of Lon Lon player spawn
} else if (gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_12) {
spawnPos = spawnPositions[1];
+ // East of Lon Lon player spawn
} else if (gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_13) {
spawnPos = spawnPositions[2];
+ // Lon Lon exit player spawn
} else {
spawnPos = spawnPositions[3];
}
player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, spawnPos.x, spawnPos.y, spawnPos.z, 0,
- player->actor.world.rot.y, 0, 7);
+ player->actor.world.rot.y, 0, HORSE_PTYPE_7);
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 561);
Actor_MountHorse(play, player, player->rideActor);
- func_8002DE74(play, player);
+ Actor_RequestHorseCameraSetting(play, player);
gSaveContext.save.info.horseData.sceneId = play->sceneId;
- } else if ((play->sceneId == SCENE_LON_LON_RANCH) && (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6) &&
- !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0)) {
+ } else if ((play->sceneId == SCENE_LON_LON_RANCH) &&
+ (GET_EVENTINF_INGO_RACE_STATE() == INGO_RACE_STATE_TRAPPED_WIN_EPONA) &&
+ !(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED)) {
player->rideActor =
- Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5);
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, HORSE_PTYPE_5);
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 582);
Actor_MountHorse(play, player, player->rideActor);
- func_8002DE74(play, player);
+ Actor_RequestHorseCameraSetting(play, player);
gSaveContext.save.info.horseData.sceneId = play->sceneId;
if (play->sceneId == SCENE_GERUDOS_FORTRESS) {
player->rideActor->room = -1;
}
} else {
- for (i = 0; i < ARRAY_COUNT(D_8011F9B8); i++) {
- if ((play->sceneId == D_8011F9B8[i].sceneId) &&
- (((void)0, gSaveContext.save.cutsceneIndex) == D_8011F9B8[i].cutsceneIndex)) {
- if (D_8011F9B8[i].type == 7) {
+ for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) {
+ if ((play->sceneId == horseSpawns[i].sceneId) &&
+ (((void)0, gSaveContext.save.cutsceneIndex) == horseSpawns[i].cutsceneIndex)) {
+ if (horseSpawns[i].type == HORSE_PTYPE_7) {
if ((play->sceneId == SCENE_LON_LON_RANCH) &&
(((void)0, gSaveContext.save.cutsceneIndex) == 0xFFF1)) {
- D_8011F9B8[i].pos.x = player->actor.world.pos.x;
- D_8011F9B8[i].pos.y = player->actor.world.pos.y;
- D_8011F9B8[i].pos.z = player->actor.world.pos.z;
+ horseSpawns[i].pos.x = player->actor.world.pos.x;
+ horseSpawns[i].pos.y = player->actor.world.pos.y;
+ horseSpawns[i].pos.z = player->actor.world.pos.z;
}
player->rideActor =
- Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y,
- D_8011F9B8[i].pos.z, 0, player->actor.world.rot.y, 0, D_8011F9B8[i].type);
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseSpawns[i].pos.x, horseSpawns[i].pos.y,
+ horseSpawns[i].pos.z, 0, player->actor.world.rot.y, 0, horseSpawns[i].type);
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 628);
Actor_MountHorse(play, player, player->rideActor);
- func_8002DE74(play, player);
- } else if ((D_8011F9B8[i].type == 5) || (D_8011F9B8[i].type == 6) || (D_8011F9B8[i].type == 8)) {
- Vec3f sp54;
- s32 temp = 0;
+ Actor_RequestHorseCameraSetting(play, player);
+ } else if ((horseSpawns[i].type == HORSE_PTYPE_5) || (horseSpawns[i].type == HORSE_PTYPE_6) ||
+ (horseSpawns[i].type == HORSE_PTYPE_HORSEBACK_ARCHERY)) {
+ Vec3f eye;
+ s32 paramFlag = 0;
- if (GET_EVENTINF_HORSES_HORSETYPE() != HORSE_EPONA && D_8011F9B8[i].type == 6) {
- temp = 0x8000;
+ if (GET_EVENTINF_INGO_RACE_HORSETYPE() != HORSE_EPONA && horseSpawns[i].type == HORSE_PTYPE_6) {
+ // HORSE_HNI
+ paramFlag = 0x8000;
}
player->rideActor =
- Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y,
- D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type | temp);
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseSpawns[i].pos.x, horseSpawns[i].pos.y,
+ horseSpawns[i].pos.z, 0, horseSpawns[i].angle, 0, horseSpawns[i].type | paramFlag);
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 667);
- player->actor.world.pos.x = D_8011F9B8[i].pos.x;
- player->actor.world.pos.y = D_8011F9B8[i].pos.y;
- player->actor.world.pos.z = D_8011F9B8[i].pos.z;
+ player->actor.world.pos.x = horseSpawns[i].pos.x;
+ player->actor.world.pos.y = horseSpawns[i].pos.y;
+ player->actor.world.pos.z = horseSpawns[i].pos.z;
player->actor.shape.rot.x = player->actor.shape.rot.z = 0;
- player->actor.shape.rot.y = D_8011F9B8[i].angle;
+ player->actor.shape.rot.y = horseSpawns[i].angle;
Actor_MountHorse(play, player, player->rideActor);
- func_8002DE74(play, player);
+ Actor_RequestHorseCameraSetting(play, player);
- sp54.x = player->actor.world.pos.x - 200.0f;
- sp54.y = player->actor.world.pos.y + 100.0f;
- sp54.z = player->actor.world.pos.z;
+ eye.x = player->actor.world.pos.x - 200.0f;
+ eye.y = player->actor.world.pos.y + 100.0f;
+ eye.z = player->actor.world.pos.z;
- Play_SetCameraAtEye(play, play->activeCamId, &player->actor.world.pos, &sp54);
+ Play_SetCameraAtEye(play, play->activeCamId, &player->actor.world.pos, &eye);
} else {
- Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y,
- D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type);
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseSpawns[i].pos.x, horseSpawns[i].pos.y,
+ horseSpawns[i].pos.z, 0, horseSpawns[i].angle, 0, horseSpawns[i].type);
}
break;
}
@@ -242,41 +287,49 @@ void func_8006D684(PlayState* play, Player* player) {
}
}
-void func_8006DC68(PlayState* play, Player* player) {
+/**
+ * Initializes the player's horse, but only if required.
+ *
+ * This function should be called during `Play_Init`.
+ */
+void Horse_InitPlayerHorse(PlayState* play, Player* player) {
if (LINK_IS_ADULT) {
- if (!func_8006CFC0(gSaveContext.save.info.horseData.sceneId)) {
- PRINTF(VT_COL(RED, WHITE));
+ if (!Horse_CanSpawn(gSaveContext.save.info.horseData.sceneId)) {
+ PRINTF_COLOR_ERROR();
PRINTF(
T("Horse_Set_Check():%d セットスポットまずいです。\n", "Horse_Set_Check():%d set spot is no good.\n"),
gSaveContext.save.info.horseData.sceneId);
- PRINTF(VT_RST);
- func_8006D074(play);
+ PRINTF_RST();
+ Horse_ResetHorseData(play);
}
- if (func_8006CFC0(play->sceneId)) {
+ if (Horse_CanSpawn(play->sceneId)) {
if (IS_CUTSCENE_LAYER ||
+ // has hopped over one of the Lon-Lon Ranch fences
((gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_11 ||
gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_12 ||
gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_13 ||
gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_15) &&
(gSaveContext.respawnFlag == 0)) ||
- ((play->sceneId == SCENE_LON_LON_RANCH) && (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6) &&
- !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0))) {
- func_8006D684(play, player);
+ // trapped in Lon Lon Ranch
+ ((play->sceneId == SCENE_LON_LON_RANCH) &&
+ (GET_EVENTINF_INGO_RACE_STATE() == INGO_RACE_STATE_TRAPPED_WIN_EPONA) &&
+ !(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED))) {
+ Horse_SetupInCutscene(play, player);
} else {
- func_8006D0EC(play, player);
+ Horse_SetupInGameplay(play, player);
}
}
}
}
-void func_8006DD9C(Actor* actor, Vec3f* arg1, s16 arg2) {
- s16 x = Math_Vec3f_Yaw(&actor->world.pos, arg1) - actor->world.rot.y;
+void Horse_RotateToPoint(Actor* actor, Vec3f* pos, s16 turnAmount) {
+ s16 x = Math_Vec3f_Yaw(&actor->world.pos, pos) - actor->world.rot.y;
- if (x > arg2) {
- actor->world.rot.y += arg2;
- } else if (x < -arg2) {
- actor->world.rot.y -= arg2;
+ if (x > turnAmount) {
+ actor->world.rot.y += turnAmount;
+ } else if (x < -turnAmount) {
+ actor->world.rot.y -= turnAmount;
} else {
actor->world.rot.y += x;
}
diff --git a/src/code/code_80097A00.c b/src/code/z_inventory.c
similarity index 98%
rename from src/code/code_80097A00.c
rename to src/code/z_inventory.c
index b452a92e16..c31d4d926f 100644
--- a/src/code/code_80097A00.c
+++ b/src/code/z_inventory.c
@@ -1,4 +1,10 @@
-#include "global.h"
+#include "ultra64.h"
+#include "printf.h"
+#include "translation.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/textures/icon_item_static/icon_item_static.h"
#include "assets/textures/icon_item_24_static/icon_item_24_static.h"
#include "assets/textures/parameter_static/parameter_static.h"
@@ -299,7 +305,7 @@ u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) {
if (equipment == EQUIP_TYPE_SWORD) {
gSaveContext.save.info.equips.buttonItems[0] = ITEM_NONE;
- gSaveContext.save.info.infTable[INFTABLE_1DX_INDEX] = 1;
+ gSaveContext.save.info.infTable[INFTABLE_INDEX_1DX] = 1;
}
Player_SetEquipmentData(play, player);
diff --git a/src/code/z_jpeg.c b/src/code/z_jpeg.c
index deee31dfde..4413e8ae69 100644
--- a/src/code/z_jpeg.c
+++ b/src/code/z_jpeg.c
@@ -1,5 +1,13 @@
-#include "global.h"
+#include "jpeg.h"
+
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "printf.h"
+#include "sys_ucode.h"
#include "terminal.h"
+#include "translation.h"
+#include "ultra64.h"
#define MARKER_ESCAPE 0x00
#define MARKER_SOI 0xD8
@@ -40,12 +48,12 @@ void Jpeg_ScheduleDecoderTask(JpegContext* ctx) {
JpegWork* workBuf = ctx->workBuf;
s32 pad[2];
- workBuf->taskData.address = VIRTUAL_TO_PHYSICAL(&workBuf->data);
+ workBuf->taskData.address = OS_K0_TO_PHYSICAL(&workBuf->data);
workBuf->taskData.mode = ctx->mode;
workBuf->taskData.mbCount = 4;
- workBuf->taskData.qTableYPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableY);
- workBuf->taskData.qTableUPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableU);
- workBuf->taskData.qTableVPtr = VIRTUAL_TO_PHYSICAL(&workBuf->qTableV);
+ workBuf->taskData.qTableYPtr = OS_K0_TO_PHYSICAL(&workBuf->qTableY);
+ workBuf->taskData.qTableUPtr = OS_K0_TO_PHYSICAL(&workBuf->qTableU);
+ workBuf->taskData.qTableVPtr = OS_K0_TO_PHYSICAL(&workBuf->qTableV);
sJpegTask.t.flags = 0;
sJpegTask.t.ucode_boot = SysUcode_GetUCodeBoot();
@@ -240,7 +248,7 @@ s32 Jpeg_Decode(void* data, void* zbuffer, void* work, u32 workSize) {
JpegDecoder decoder;
JpegDecoderState state;
JpegWork* workBuff;
- OSTime diff;
+ UNUSED_NDEBUG OSTime diff;
OSTime time;
OSTime curTime;
@@ -337,9 +345,9 @@ s32 Jpeg_Decode(void* data, void* zbuffer, void* work, u32 workSize) {
x = y = 0;
for (i = 0; i < 300; i += 4) {
if (JpegDecoder_Decode(&decoder, (u16*)workBuff->data, 4, i != 0, &state)) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF("Error : Can't decode jpeg\n");
- PRINTF(VT_RST);
+ PRINTF_RST();
} else {
Jpeg_ScheduleDecoderTask(&ctx);
osInvalDCache(&workBuff->data, sizeof(workBuff->data[0]));
diff --git a/src/code/z_kaleido_manager.c b/src/code/z_kaleido_manager.c
index 761d1fb9ec..d9bca732e5 100644
--- a/src/code/z_kaleido_manager.c
+++ b/src/code/z_kaleido_manager.c
@@ -1,5 +1,12 @@
-#include "global.h"
+#include "libu64/debug.h"
+#include "libu64/overlay.h"
+#include "array_count.h"
+#include "kaleido_manager.h"
+#include "printf.h"
+#include "segment_symbols.h"
#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
#define KALEIDO_OVERLAY(name, nameString) \
{ NULL, ROM_FILE(ovl_##name), _ovl_##name##SegmentStart, _ovl_##name##SegmentEnd, 0, nameString, }
@@ -19,11 +26,11 @@ void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl) {
ovl->loadedRamAddr = sKaleidoAreaPtr;
Overlay_Load(ovl->file.vromStart, ovl->file.vromEnd, ovl->vramStart, ovl->vramEnd, ovl->loadedRamAddr);
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("OVL(k):Seg:%08x-%08x Ram:%08x-%08x Off:%08x %s\n", ovl->vramStart, ovl->vramEnd, ovl->loadedRamAddr,
(uintptr_t)ovl->loadedRamAddr + (uintptr_t)ovl->vramEnd - (uintptr_t)ovl->vramStart,
(uintptr_t)ovl->vramStart - (uintptr_t)ovl->loadedRamAddr, ovl->name);
- PRINTF(VT_RST);
+ PRINTF_RST();
ovl->offset = (uintptr_t)ovl->loadedRamAddr - (uintptr_t)ovl->vramStart;
gKaleidoMgrCurOvl = ovl;
@@ -50,17 +57,17 @@ void KaleidoManager_Init(PlayState* play) {
}
}
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("KaleidoArea の最大サイズは %d バイトを確保します\n", "The maximum size of KaleidoArea is %d bytes\n"),
largestSize);
- PRINTF(VT_RST);
+ PRINTF_RST();
sKaleidoAreaPtr = GAME_STATE_ALLOC(&play->state, largestSize, "../z_kaleido_manager.c", 150);
LOG_UTILS_CHECK_NULL_POINTER("KaleidoArea_allocp", sKaleidoAreaPtr, "../z_kaleido_manager.c", 151);
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("KaleidoArea %08x - %08x\n", sKaleidoAreaPtr, (uintptr_t)sKaleidoAreaPtr + largestSize);
- PRINTF(VT_RST);
+ PRINTF_RST();
gKaleidoMgrCurOvl = NULL;
}
diff --git a/src/code/z_kaleido_scope_call.c b/src/code/z_kaleido_scope_call.c
index e97c8a8cf0..2707db8265 100644
--- a/src/code/z_kaleido_scope_call.c
+++ b/src/code/z_kaleido_scope_call.c
@@ -1,8 +1,14 @@
-#include "global.h"
-#include "terminal.h"
+#pragma increment_block_number "gc-eu:80 gc-eu-mq:80 gc-jp:80 gc-jp-ce:80 gc-jp-mq:80 gc-us:80 gc-us-mq:80 ique-cn:80" \
+ "ntsc-1.0:96 ntsc-1.1:96 ntsc-1.2:96 pal-1.0:96 pal-1.1:96"
-#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"
+#include "libu64/debug.h"
+#include "kaleido_manager.h"
+#include "letterbox.h"
+#include "printf.h"
+#include "regs.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
void (*sKaleidoScopeUpdateFunc)(PlayState* play);
void (*sKaleidoScopeDrawFunc)(PlayState* play);
@@ -18,16 +24,16 @@ void KaleidoScopeCall_LoadPlayer(void) {
if (gKaleidoMgrCurOvl != playerActorOvl) {
if (gKaleidoMgrCurOvl != NULL) {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("カレイド領域 強制排除\n", "Kaleido area forced exclusion\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
KaleidoManager_ClearOvl(gKaleidoMgrCurOvl);
}
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("プレイヤーアクター搬入\n", "Player actor import\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
KaleidoManager_LoadOvl(playerActorOvl);
}
@@ -60,7 +66,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
if (IS_PAUSED(&play->pauseCtx)) {
if (pauseCtx->state == PAUSE_STATE_WAIT_LETTERBOX) {
if (Letterbox_GetSize() == 0) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
R_HREG_MODE = HREG_MODE_UCODE_DISAS;
R_UCODE_DISAS_LOG_MODE = 3;
#endif
@@ -70,35 +76,36 @@ void KaleidoScopeCall_Update(PlayState* play) {
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_WAIT_BG_PRERENDER
}
- } else if (pauseCtx->state == PAUSE_STATE_8) {
-#if OOT_DEBUG
+ } else if (pauseCtx->state == PAUSE_STATE_GAME_OVER_START) {
+#if DEBUG_FEATURES
R_HREG_MODE = HREG_MODE_UCODE_DISAS;
R_UCODE_DISAS_LOG_MODE = 3;
#endif
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
- pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
- pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_9
- } else if ((pauseCtx->state == PAUSE_STATE_WAIT_BG_PRERENDER) || (pauseCtx->state == PAUSE_STATE_9)) {
+ pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING; // copied from pause menu, not needed here
+ pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1; // PAUSE_STATE_GAME_OVER_WAIT_BG_PRERENDER
+ } else if ((pauseCtx->state == PAUSE_STATE_WAIT_BG_PRERENDER) ||
+ (pauseCtx->state == PAUSE_STATE_GAME_OVER_WAIT_BG_PRERENDER)) {
PRINTF("PR_KAREIDOSCOPE_MODE=%d\n", R_PAUSE_BG_PRERENDER_STATE);
if (R_PAUSE_BG_PRERENDER_STATE >= PAUSE_BG_PRERENDER_READY) {
- pauseCtx->state++; // PAUSE_STATE_INIT or PAUSE_STATE_10
+ pauseCtx->state++; // PAUSE_STATE_INIT or PAUSE_STATE_GAME_OVER_INIT
}
} else if (pauseCtx->state != PAUSE_STATE_OFF) {
if (gKaleidoMgrCurOvl != kaleidoScopeOvl) {
if (gKaleidoMgrCurOvl != NULL) {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("カレイド領域 プレイヤー 強制排除\n", "Kaleido area Player Forced Elimination\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
KaleidoManager_ClearOvl(gKaleidoMgrCurOvl);
}
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("カレイド領域 カレイドスコープ搬入\n", "Kaleido area Kaleidoscope loading\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
KaleidoManager_LoadOvl(kaleidoScopeOvl);
}
@@ -107,9 +114,9 @@ void KaleidoScopeCall_Update(PlayState* play) {
sKaleidoScopeUpdateFunc(play);
if (!IS_PAUSED(&play->pauseCtx)) {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("カレイド領域 カレイドスコープ排出\n", "Kaleido area Kaleidoscope Emission\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
KaleidoManager_ClearOvl(kaleidoScopeOvl);
KaleidoScopeCall_LoadPlayer();
@@ -124,7 +131,8 @@ void KaleidoScopeCall_Draw(PlayState* play) {
if (R_PAUSE_BG_PRERENDER_STATE >= PAUSE_BG_PRERENDER_READY) {
if (((play->pauseCtx.state >= PAUSE_STATE_OPENING_1) && (play->pauseCtx.state <= PAUSE_STATE_SAVE_PROMPT)) ||
- ((play->pauseCtx.state >= PAUSE_STATE_11) && (play->pauseCtx.state <= PAUSE_STATE_CLOSING))) {
+ ((play->pauseCtx.state >= PAUSE_STATE_GAME_OVER_SHOW_MESSAGE) &&
+ (play->pauseCtx.state <= PAUSE_STATE_CLOSING))) {
if (gKaleidoMgrCurOvl == kaleidoScopeOvl) {
sKaleidoScopeDrawFunc(play);
}
diff --git a/src/code/z_kaleido_setup.c b/src/code/z_kaleido_setup.c
index 1e54071657..2cffb853f5 100644
--- a/src/code/z_kaleido_setup.c
+++ b/src/code/z_kaleido_setup.c
@@ -1,7 +1,13 @@
-#include "global.h"
+#include "controller.h"
+#include "letterbox.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "printf.h"
+#include "regs.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64save.h"
/*
* The following three arrays are effectively unused.
@@ -72,7 +78,7 @@ void KaleidoSetup_Update(PlayState* play) {
(play->sceneId != SCENE_BOMBCHU_BOWLING_ALLEY || !Flags_GetSwitch(play, 0x38))) {
if (CHECK_BTN_ALL(input->cur.button, BTN_L) && CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
- if (OOT_DEBUG && BREG(0)) {
+ if (DEBUG_FEATURES && BREG(0)) {
pauseCtx->debugState = 3;
}
} else if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
@@ -112,7 +118,7 @@ void KaleidoSetup_Update(PlayState* play) {
}
if (pauseCtx->state == PAUSE_STATE_WAIT_LETTERBOX) {
- WREG(2) = -6240;
+ R_PAUSE_PAGES_Y_ORIGIN_2 = PAUSE_PAGES_Y_ORIGIN_2_LOWER;
R_UPDATE_RATE = 2;
if (Letterbox_GetSizeTarget() != 0) {
@@ -132,19 +138,19 @@ void KaleidoSetup_Init(PlayState* play) {
pauseCtx->eye.x = pauseCtx->eye.y = 0.0f;
pauseCtx->eye.z = 64.0f;
- pauseCtx->unk_1F0 = 936.0f;
- pauseCtx->unk_1F4 = pauseCtx->unk_1F8 = pauseCtx->unk_1FC = pauseCtx->unk_200 = 160.0f;
+ pauseCtx->promptDepthOffset = 936.0f;
+ pauseCtx->itemPagePitch = pauseCtx->equipPagePitch = pauseCtx->mapPagePitch = pauseCtx->questPagePitch = 160.0f;
pauseCtx->alpha = 0;
// mainState = PAUSE_MAIN_STATE_IDLE , pageIndex = PAUSE_ITEM
pauseCtx->pageSwitchTimer = pauseCtx->mainState = pauseCtx->nextPageMode = pauseCtx->pageIndex = 0;
- pauseCtx->unk_204 = -314.0f;
+ pauseCtx->promptPitch = -314.0f;
pauseCtx->cursorPoint[PAUSE_ITEM] = 0;
pauseCtx->cursorPoint[PAUSE_MAP] = VREG(30) + 3;
- pauseCtx->cursorPoint[PAUSE_QUEST] = 0;
+ pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_MEDALLION_FOREST;
pauseCtx->cursorPoint[PAUSE_EQUIP] = 1;
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 10;
@@ -154,8 +160,8 @@ void KaleidoSetup_Init(PlayState* play) {
pauseCtx->cursorY[PAUSE_MAP] = 0;
pauseCtx->cursorX[PAUSE_QUEST] = 0;
pauseCtx->cursorY[PAUSE_QUEST] = 0;
- pauseCtx->cursorX[PAUSE_EQUIP] = 1;
- pauseCtx->cursorY[PAUSE_EQUIP] = 0;
+ pauseCtx->cursorX[PAUSE_EQUIP] = EQUIP_VALUE_SWORD_KOKIRI;
+ pauseCtx->cursorY[PAUSE_EQUIP] = EQUIP_TYPE_SWORD;
pauseCtx->cursorItem[PAUSE_ITEM] = PAUSE_ITEM_NONE;
pauseCtx->cursorItem[PAUSE_MAP] = VREG(30) + 3;
diff --git a/src/code/z_kanfont.c b/src/code/z_kanfont.c
index a4ae98c5b1..89f5bbd3b7 100644
--- a/src/code/z_kanfont.c
+++ b/src/code/z_kanfont.c
@@ -1,6 +1,12 @@
-#include "global.h"
+#include "kanread.h"
#include "message_data_static.h"
+#include "printf.h"
+#include "segment_symbols.h"
+#include "translation.h"
#include "versions.h"
+#include "z64dma.h"
+#include "z64font.h"
+#include "z64message.h"
/**
* Loads a texture from kanji for the requested `character` into the character texture buffer
@@ -8,8 +14,9 @@
*/
void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex) {
#if OOT_NTSC
- DmaMgr_RequestSync(&font->charTexBuf[codePointIndex],
- (uintptr_t)_kanjiSegmentRomStart + Kanji_OffsetFromShiftJIS(character), FONT_CHAR_TEX_SIZE);
+ DMA_REQUEST_SYNC(&font->charTexBuf[codePointIndex],
+ (uintptr_t)_kanjiSegmentRomStart + Kanji_OffsetFromShiftJIS(character), FONT_CHAR_TEX_SIZE,
+ "../z_kanfont.c", UNK_LINE);
#endif
}
@@ -18,13 +25,21 @@ void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex) {
* at `codePointIndex`. The value of `character` is the ASCII codepoint subtract ' '/0x20.
*/
void Font_LoadChar(Font* font, u8 character, u16 codePointIndex) {
- u8 charTmp = character;
+ s32 offset = character * FONT_CHAR_TEX_SIZE;
- DMA_REQUEST_SYNC(&font->charTexBuf[codePointIndex],
- (uintptr_t)_nes_font_staticSegmentRomStart + charTmp * FONT_CHAR_TEX_SIZE, FONT_CHAR_TEX_SIZE,
- "../z_kanfont.c", 93);
+ DMA_REQUEST_SYNC(&font->charTexBuf[codePointIndex], (uintptr_t)_nes_font_staticSegmentRomStart + offset,
+ FONT_CHAR_TEX_SIZE, "../z_kanfont.c", 93);
}
+#if PLATFORM_IQUE
+void Font_LoadCharCHN(Font* font, u16 character, u16 codePointIndex) {
+ s32 offset = character * FONT_CHAR_TEX_SIZE;
+
+ DMA_REQUEST_SYNC(&font->charTexBuf[codePointIndex], (uintptr_t)_nes_font_staticSegmentRomStart + offset,
+ FONT_CHAR_TEX_SIZE, "../z_kanfont.c", UNK_LINE);
+}
+#endif
+
/**
* Loads a message box icon from message_static, such as the ending triangle/square or choice arrow into the
* icon buffer.
@@ -47,28 +62,37 @@ void Font_LoadOrderedFont(Font* font) {
s32 codePointIndex;
s32 fontBufIndex;
u32 offset;
+ const char* messageDataStart;
+ u16* msgBufWide;
- font->msgOffset = FONT_MESSAGE_OFFSET;
- size = font->msgLength = FONT_MESSAGE_LENGTH;
-
-#if OOT_NTSC
+#if OOT_NTSC && !PLATFORM_IQUE
+ messageDataStart = (const char*)_jpn_message_data_staticSegmentStart;
+ font->msgOffset = _message_0xFFFC_jpn - messageDataStart;
+ size = font->msgLength = _message_0xFFFD_jpn - _message_0xFFFC_jpn;
len = (u32)size / 2;
- DmaMgr_RequestSync(font->msgBufWide, (uintptr_t)_jpn_message_data_staticSegmentRomStart + font->msgOffset, size);
+ DMA_REQUEST_SYNC(font->msgBufWide, (uintptr_t)_jpn_message_data_staticSegmentRomStart + font->msgOffset, size,
+ "../z_kanfont.c", UNK_LINE);
+
+ PRINTF("msg_data=%x, msg_data0=%x jj=%x\n", font->msgOffset, font->msgLength, len);
fontBufIndex = 0;
for (codePointIndex = 0; font->msgBufWide[codePointIndex] != MESSAGE_WIDE_END; codePointIndex++) {
if (len < codePointIndex) {
+ PRINTF(T("ERROR!! エラー!!! error───!!!!\n", "ERROR!! Error!!! error───!!!!\n"));
return;
}
if (font->msgBufWide[codePointIndex] != MESSAGE_WIDE_NEWLINE) {
offset = Kanji_OffsetFromShiftJIS(font->msgBufWide[codePointIndex]);
- DmaMgr_RequestSync(&font->fontBuf[fontBufIndex * 8], (uintptr_t)_kanjiSegmentRomStart + offset,
- FONT_CHAR_TEX_SIZE);
+ DMA_REQUEST_SYNC(&font->fontBuf[fontBufIndex * 8], (uintptr_t)_kanjiSegmentRomStart + offset,
+ FONT_CHAR_TEX_SIZE, "../z_kanfont.c", UNK_LINE);
fontBufIndex += FONT_CHAR_TEX_SIZE / 8;
}
}
-#else
+#elif OOT_PAL
+ messageDataStart = (const char*)_nes_message_data_staticSegmentStart;
+ font->msgOffset = _message_0xFFFC_nes - messageDataStart;
+ size = font->msgLength = _message_0xFFFD_nes - _message_0xFFFC_nes;
len = size;
DMA_REQUEST_SYNC(font->msgBuf, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset, len,
"../z_kanfont.c", 122);
@@ -91,5 +115,31 @@ void Font_LoadOrderedFont(Font* font) {
fontBufIndex += FONT_CHAR_TEX_SIZE / 8;
}
}
+#elif PLATFORM_IQUE
+ messageDataStart = (const char*)_jpn_message_data_staticSegmentStart;
+ font->msgOffset = _message_0xFFFC_jpn - messageDataStart;
+ size = font->msgLength = _message_0xFFFD_jpn - _message_0xFFFC_jpn;
+ len = (u32)size / 2;
+ DMA_REQUEST_SYNC(font->msgBufWide, (uintptr_t)_jpn_message_data_staticSegmentRomStart + font->msgOffset, size,
+ "../z_kanfont.c", UNK_LINE);
+
+ PRINTF("msg_data=%x, msg_data0=%x jj=%x\n", font->msgOffset, font->msgLength, len);
+
+ // Workaround for EGCS internal compiler error (see docs/compilers.md)
+ msgBufWide = font->msgBufWide;
+ fontBufIndex = 0;
+ for (codePointIndex = 0; msgBufWide[codePointIndex] != MESSAGE_WIDE_END; codePointIndex++) {
+ if (len < codePointIndex) {
+ PRINTF(T("ERROR!! エラー!!! error───!!!!\n", "ERROR!! Error!!! error───!!!!\n"));
+ return;
+ }
+
+ if (msgBufWide[codePointIndex] != MESSAGE_WIDE_NEWLINE) {
+ offset = Kanji_OffsetFromShiftJIS(msgBufWide[codePointIndex]);
+ DMA_REQUEST_SYNC(&font->fontBuf[fontBufIndex * 8], (uintptr_t)_kanjiSegmentRomStart + offset,
+ FONT_CHAR_TEX_SIZE, "../z_kanfont.c", UNK_LINE);
+ fontBufIndex += FONT_CHAR_TEX_SIZE / 8;
+ }
+ }
#endif
}
diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c
index 16ccf3b47b..c78fc5de87 100644
--- a/src/code/z_kankyo.c
+++ b/src/code/z_kankyo.c
@@ -1,15 +1,40 @@
-#include "global.h"
-#include "ultra64.h"
-#include "terminal.h"
+#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
+ "ique-cn:128 ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
+#include "libc64/qrand.h"
+#include "libu64/gfxprint.h"
+#include "array_count.h"
+#include "buffers.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "gfxalloc.h"
+#include "ultra64.h"
+#include "printf.h"
+#include "regs.h"
+#include "rumble.h"
+#include "segment_symbols.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64cutscene.h"
#include "z64frame_advance.h"
+#include "z64environment.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
-#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:0"
-
typedef enum LightningBoltState {
/* 0x00 */ LIGHTNING_BOLT_START,
/* 0x01 */ LIGHTNING_BOLT_WAIT,
@@ -213,8 +238,8 @@ s16 sLightningFlashAlpha;
s16 sSunDepthTestX;
s16 sSunDepthTestY;
-#pragma increment_block_number "gc-eu:112 gc-eu-mq:112 gc-jp:96 gc-jp-ce:96 gc-jp-mq:96 gc-us:96 gc-us-mq:96" \
- "ntsc-1.2:224"
+#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
+ "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:192 pal-1.1:192"
LightNode* sNGameOverLightNode;
LightInfo sNGameOverLightInfo;
@@ -348,7 +373,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
envCtx->sceneTimeSpeed = 0;
gTimeSpeed = envCtx->sceneTimeSpeed;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
R_ENV_TIME_SPEED_OLD = gTimeSpeed;
R_ENV_DISABLE_DBG = true;
@@ -420,7 +445,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
gSkyboxIsChanging = false;
gSaveContext.retainWeatherMode = false;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
R_ENV_LIGHT1_DIR(0) = 80;
R_ENV_LIGHT1_DIR(1) = 80;
R_ENV_LIGHT1_DIR(2) = 80;
@@ -717,7 +742,7 @@ void Environment_UpdateSkybox(u8 skyboxId, EnvironmentContext* envCtx, SkyboxCon
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (newSkybox1Index == 0xFF) {
PRINTF(VT_COL(RED, WHITE) T("\n環境VRデータ取得失敗! ささきまでご報告を!",
"\nEnvironment VR data acquisition failed! Report to Sasaki!") VT_RST);
@@ -834,7 +859,7 @@ void Environment_DisableUnderwaterLights(PlayState* play) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void Environment_PrintDebugInfo(PlayState* play, Gfx** gfx) {
GfxPrint printer;
s32 pad[2];
@@ -881,9 +906,9 @@ void Environment_PrintDebugInfo(PlayState* play, Gfx** gfx) {
GfxPrint_SetPos(&printer, 22, 6);
if (!IS_DAY) {
- GfxPrint_Printf(&printer, "%s", "YORU"); // "night"
+ GfxPrint_Printf(&printer, "%s", T("YORU", "NIGHT"));
} else {
- GfxPrint_Printf(&printer, "%s", "HIRU"); // "day"
+ GfxPrint_Printf(&printer, "%s", T("HIRU", "DAY"));
}
*gfx = GfxPrint_Close(&printer);
@@ -957,9 +982,15 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
}
//! @bug `gTimeSpeed` is unsigned, it can't be negative
+#if OOT_VERSION < PAL_1_0
+ if ((((void)0, gSaveContext.save.dayTime) > ((void)0, gSaveContext.skyboxTime)) ||
+ (((void)0, gSaveContext.save.dayTime) < CLOCK_TIME(1, 0) || gTimeSpeed < 0))
+#else
if (((((void)0, gSaveContext.sceneLayer) >= 5 || gTimeSpeed != 0) &&
- ((void)0, gSaveContext.save.dayTime) > gSaveContext.skyboxTime) ||
- (((void)0, gSaveContext.save.dayTime) < CLOCK_TIME(1, 0) || gTimeSpeed < 0)) {
+ ((void)0, gSaveContext.save.dayTime) > ((void)0, gSaveContext.skyboxTime)) ||
+ (((void)0, gSaveContext.save.dayTime) < CLOCK_TIME(1, 0) || gTimeSpeed < 0))
+#endif
+ {
gSaveContext.skyboxTime = ((void)0, gSaveContext.save.dayTime);
}
@@ -972,7 +1003,7 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
gSaveContext.save.nightFlag = 0;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (R_ENABLE_ARENA_DBG != 0 || CREG(2) != 0) {
Gfx* displayList;
Gfx* prevDisplayList;
@@ -1139,7 +1170,7 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
envCtx->lightSettings.zFar = LERP16(blend16[0], blend16[1], configChangeBlend);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (sTimeBasedLightConfigs[envCtx->changeLightNextConfig][i].nextLightSetting >=
envCtx->numLightSettings) {
PRINTF(VT_COL(RED, WHITE) T("\nカラーパレットの設定がおかしいようです!",
@@ -1219,7 +1250,7 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
lightSettingsList[envCtx->lightSetting].zFar, envCtx->lightBlend);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (envCtx->lightSetting >= envCtx->numLightSettings) {
PRINTF("\n" VT_FGCOL(RED)
T("カラーパレットがおかしいようです!", "The color palette seems to be wrong!"));
@@ -1293,7 +1324,7 @@ void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContex
lightCtx->zFar = ENV_ZFAR_MAX;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
// When environment debug is enabled, various environment related variables can be configured via the reg editor
if (R_ENV_DISABLE_DBG) {
R_ENV_AMBIENT_COLOR(0) = lightCtx->ambientColor[0];
@@ -1724,8 +1755,13 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
Vec3f windDirection = { 0.0f, 0.0f, 0.0f };
Player* player = GET_PLAYER(play);
+#if OOT_VERSION < PAL_1_0
+ if (!(play->cameraPtrs[CAM_ID_MAIN]->stateFlags & CAM_STATE_CAMERA_IN_WATER))
+#else
if (!(play->cameraPtrs[CAM_ID_MAIN]->stateFlags & CAM_STATE_CAMERA_IN_WATER) &&
- (play->envCtx.precipitation[PRECIP_SNOW_CUR] == 0)) {
+ (play->envCtx.precipitation[PRECIP_SNOW_CUR] == 0))
+#endif
+ {
OPEN_DISPS(gfxCtx, "../z_kankyo.c", 2799);
vec.x = view->at.x - view->eye.x;
@@ -2519,7 +2555,7 @@ void Environment_AdjustLights(PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32
f32 temp;
s32 i;
- if (play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_5 && Play_CamIsNotFixed(play)) {
+ if (play->roomCtx.curRoom.type != ROOM_TYPE_BOSS && Play_CamIsNotFixed(play)) {
arg1 = CLAMP_MIN(arg1, 0.0f);
arg1 = CLAMP_MAX(arg1, 1.0f);
diff --git a/src/code/z_lib.c b/src/code/z_lib.c
index d5f59a2a86..e4d56b8dad 100644
--- a/src/code/z_lib.c
+++ b/src/code/z_lib.c
@@ -1,8 +1,8 @@
#include "ultra64.h"
#include "z_lib.h"
#include "ichain.h"
+#include "printf.h"
#include "regs.h"
-#include "macros.h"
#include "sys_math.h"
#include "rand.h"
#include "sfx.h"
diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c
index efe7b92b83..cab9737ff7 100644
--- a/src/code/z_lifemeter.c
+++ b/src/code/z_lifemeter.c
@@ -1,4 +1,13 @@
-#include "global.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64lifemeter.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/textures/parameter_static/parameter_static.h"
static s16 sHeartsPrimColors[3][3] = {
diff --git a/src/code/z_lights.c b/src/code/z_lights.c
index 1d04a59a81..d0b003f77c 100644
--- a/src/code/z_lights.c
+++ b/src/code/z_lights.c
@@ -1,4 +1,11 @@
-#include "global.h"
+#include "avoid_ub.h"
+#include "buffers.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z64light.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define LIGHTS_BUFFER_SIZE 32
@@ -182,8 +189,7 @@ LightNode* Lights_FindBufSlot(void) {
return node;
}
-// return type must not be void to match
-s32 Lights_FreeNode(LightNode* light) {
+BAD_RETURN(s32) Lights_FreeNode(LightNode* light) {
if (light != NULL) {
sLightsBuffer.numOccupied--;
light->info = NULL;
diff --git a/src/code/z_malloc.c b/src/code/z_malloc.c
index 901e7b4e73..513a61b31e 100644
--- a/src/code/z_malloc.c
+++ b/src/code/z_malloc.c
@@ -1,5 +1,6 @@
-#include "global.h"
#include "libc64/os_malloc.h"
+#include "printf.h"
+#include "translation.h"
#define LOG_SEVERITY_NOLOG 0
#define LOG_SEVERITY_ERROR 2
@@ -7,14 +8,16 @@
Arena sZeldaArena;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 gZeldaArenaLogSeverity = LOG_SEVERITY_ERROR;
void ZeldaArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action) {
if (ptr == NULL) {
if (gZeldaArenaLogSeverity >= LOG_SEVERITY_ERROR) {
PRINTF(T("%s: %u バイトの%sに失敗しました\n", "%s: %u bytes %s failed\n"), name, size, action);
+#if PLATFORM_GC
__osDisplayArena(&sZeldaArena);
+#endif
}
} else if (gZeldaArenaLogSeverity >= LOG_SEVERITY_VERBOSE) {
PRINTF(T("%s: %u バイトの%sに成功しました\n", "%s: %u bytes %s succeeded\n"), name, size, action);
@@ -34,7 +37,7 @@ void* ZeldaArena_Malloc(u32 size) {
return ptr;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* ZeldaArena_MallocDebug(u32 size, const char* file, int line) {
void* ptr = __osMallocDebug(&sZeldaArena, size, file, line);
@@ -50,7 +53,7 @@ void* ZeldaArena_MallocR(u32 size) {
return ptr;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* ZeldaArena_MallocRDebug(u32 size, const char* file, int line) {
void* ptr = __osMallocRDebug(&sZeldaArena, size, file, line);
@@ -65,7 +68,7 @@ void* ZeldaArena_Realloc(void* ptr, u32 newSize) {
return ptr;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* ZeldaArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line) {
ptr = __osReallocDebug(&sZeldaArena, ptr, newSize, file, line);
ZELDA_ARENA_CHECK_POINTER(ptr, newSize, "zelda_realloc_DEBUG", T("再確保", "Re-securing"));
@@ -77,7 +80,7 @@ void ZeldaArena_Free(void* ptr) {
__osFree(&sZeldaArena, ptr);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void ZeldaArena_FreeDebug(void* ptr, const char* file, int line) {
__osFreeDebug(&sZeldaArena, ptr, file, line);
}
@@ -96,7 +99,7 @@ void* ZeldaArena_Calloc(u32 num, u32 size) {
return ret;
}
-#if OOT_DEBUG
+#if PLATFORM_GC && DEBUG_FEATURES
void ZeldaArena_Display(void) {
PRINTF(T("ゼルダヒープ表示\n", "Zelda heap display\n"));
__osDisplayArena(&sZeldaArena);
@@ -112,14 +115,14 @@ void ZeldaArena_Check(void) {
}
void ZeldaArena_Init(void* start, u32 size) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
gZeldaArenaLogSeverity = LOG_SEVERITY_NOLOG;
#endif
__osMallocInit(&sZeldaArena, start, size);
}
void ZeldaArena_Cleanup(void) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
gZeldaArenaLogSeverity = LOG_SEVERITY_NOLOG;
#endif
__osMallocCleanup(&sZeldaArena);
diff --git a/src/code/z_map_data.c b/src/code/z_map_data.c
index 24721c6234..502eb43c3c 100644
--- a/src/code/z_map_data.c
+++ b/src/code/z_map_data.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "map.h"
+#include "z64save.h"
static s16 sFloorTexIndexOffset[10][8] = {
{ 0, 0, 0, 0, 2, 4, 6, 8 }, { 0, 0, 0, 0, 0, 0, 0, 2 },
diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c
index ee72c9a501..e46c70bd10 100644
--- a/src/code/z_map_exp.c
+++ b/src/code/z_map_exp.c
@@ -1,10 +1,24 @@
-#include "global.h"
-#include "terminal.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#include "assets/textures/parameter_static/parameter_static.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "controller.h"
+#include "map.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "printf.h"
+#include "regs.h"
+#include "segment_symbols.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64map_mark.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/textures/parameter_static/parameter_static.h"
MapData* gMapData;
@@ -30,12 +44,12 @@ void Map_SetPaletteData(PlayState* play, s16 room) {
interfaceCtx->mapPaletteIndex = paletteIndex;
}
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("PALETEセット 【 i=%x : room=%x 】Room_Inf[%d][4]=%x ( map_palete_no = %d )\n",
"PALETE Set 【 i=%x : room=%x 】Room_Inf[%d][4]=%x ( map_palete_no = %d )\n"),
paletteIndex, room, mapIndex, gSaveContext.save.info.sceneFlags[mapIndex].rooms,
interfaceCtx->mapPaletteIndex);
- PRINTF(VT_RST);
+ PRINTF_RST();
interfaceCtx->mapPalette[paletteIndex * 2] = 2;
interfaceCtx->mapPalette[paletteIndex * 2 + 1] = 0xBF;
@@ -122,17 +136,17 @@ void Map_InitData(PlayState* play, s16 room) {
extendedMapIndex = 0x15;
}
} else if (play->sceneId == SCENE_GERUDO_VALLEY) {
- if ((LINK_AGE_IN_YEARS == YEARS_ADULT) && !GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
+ if ((LINK_AGE_IN_YEARS == YEARS_ADULT) && !GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED()) {
extendedMapIndex = 0x16;
}
} else if (play->sceneId == SCENE_GERUDOS_FORTRESS) {
- if (GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
+ if (GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED()) {
extendedMapIndex = 0x17;
}
}
- PRINTF(VT_FGCOL(BLUE));
+ PRINTF_COLOR_BLUE();
PRINTF("KKK=%d\n", extendedMapIndex);
- PRINTF(VT_RST);
+ PRINTF_RST();
sEntranceIconMapIndex = extendedMapIndex;
DMA_REQUEST_SYNC(interfaceCtx->mapSegment,
(uintptr_t)_map_grand_staticSegmentRomStart +
@@ -158,19 +172,19 @@ void Map_InitData(PlayState* play, s16 room) {
case SCENE_WATER_TEMPLE_BOSS:
case SCENE_SPIRIT_TEMPLE_BOSS:
case SCENE_SHADOW_TEMPLE_BOSS:
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("デクの樹ダンジョンMAP テクスチャDMA(%x) scene_id_offset=%d VREG(30)=%d\n",
"Deku Tree Dungeon MAP Texture DMA(%x) scene_id_offset=%d VREG(30)=%d\n"),
room, mapIndex, VREG(30));
- PRINTF(VT_RST);
+ PRINTF_RST();
#if PLATFORM_N64
if ((B_80121220 != NULL) && (B_80121220->unk_28 != NULL) && B_80121220->unk_28(play)) {
} else {
- DmaMgr_RequestSync(play->interfaceCtx.mapSegment,
- (uintptr_t)_map_i_staticSegmentRomStart +
- ((gMapData->dgnMinimapTexIndexOffset[mapIndex] + room) * MAP_I_TEX_SIZE),
- MAP_I_TEX_SIZE);
+ DMA_REQUEST_SYNC(play->interfaceCtx.mapSegment,
+ (uintptr_t)_map_i_staticSegmentRomStart +
+ ((gMapData->dgnMinimapTexIndexOffset[mapIndex] + room) * MAP_I_TEX_SIZE),
+ MAP_I_TEX_SIZE, "../z_map_exp.c", UNK_LINE);
}
#else
DMA_REQUEST_SYNC(play->interfaceCtx.mapSegment,
@@ -219,9 +233,9 @@ void Map_InitRoomData(PlayState* play, s16 room) {
interfaceCtx->mapRoomNum = room;
interfaceCtx->unk_25A = mapIndex;
Map_SetPaletteData(play, room);
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("部屋部屋=%d\n", "Room Room = %d\n"), room);
- PRINTF(VT_RST);
+ PRINTF_RST();
Map_InitData(play, room);
break;
}
@@ -356,7 +370,7 @@ void Minimap_DrawCompassIcons(PlayState* play) {
if (play->interfaceCtx.minimapAlpha >= 0xAA) {
Gfx_SetupDL_42Overlay(play->state.gfxCtx);
- gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(OVERLAY_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
@@ -496,7 +510,7 @@ void Minimap_Draw(PlayState* play) {
(LINK_AGE_IN_YEARS != YEARS_ADULT)) {
if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) ||
((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) &&
- (gSaveContext.save.info.infTable[INFTABLE_1AX_INDEX] &
+ (gSaveContext.save.info.infTable[INFTABLE_INDEX_1AX] &
gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) {
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
@@ -513,7 +527,7 @@ void Minimap_Draw(PlayState* play) {
}
if ((play->sceneId == SCENE_ZORAS_FOUNTAIN) &&
- (gSaveContext.save.info.infTable[INFTABLE_1AX_INDEX] & gBitFlags[INFTABLE_1A9_SHIFT])) {
+ (gSaveContext.save.info.infTable[INFTABLE_INDEX_1AX] & gBitFlags[INFTABLE_1A9_SHIFT])) {
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8,
8, 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);
@@ -600,9 +614,9 @@ void Map_Update(PlayState* play) {
if ((interfaceCtx->mapRoomNum == gMapData->switchFromRoom[mapIndex][i]) &&
(floor == gMapData->switchFromFloor[mapIndex][i])) {
interfaceCtx->mapRoomNum = gMapData->switchToRoom[mapIndex][i];
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("階層切替=%x\n", "Layer switching = %x\n"), interfaceCtx->mapRoomNum);
- PRINTF(VT_RST);
+ PRINTF_RST();
Map_InitData(play, interfaceCtx->mapRoomNum);
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
Map_SavePlayerInitialInfo(play);
diff --git a/src/code/z_map_mark.c b/src/code/z_map_mark.c
index ae654c22d3..402d942d66 100644
--- a/src/code/z_map_mark.c
+++ b/src/code/z_map_mark.c
@@ -1,9 +1,20 @@
-#include "global.h"
-#include "terminal.h"
-#include "assets/textures/parameter_static/parameter_static.h"
+#include "libu64/debug.h"
+#include "libu64/overlay.h"
+#include "map.h"
+#include "printf.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "regs.h"
+#include "romfile.h"
+#include "segment_symbols.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64map_mark.h"
+#include "z64play.h"
+#include "z64save.h"
+
+#include "assets/textures/parameter_static/parameter_static.h"
typedef struct MapMarkInfo {
/* 0x00 */ void* texture;
@@ -118,8 +129,8 @@ void MapMark_DrawForDungeon(PlayState* play) {
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
- rectLeft = ((OOT_DEBUG ? GREG(94) : 0) + markPoint->x + 204) << 2;
- rectTop = ((OOT_DEBUG ? GREG(95) : 0) + markPoint->y + 140) << 2;
+ rectLeft = ((DEBUG_FEATURES ? GREG(94) : 0) + markPoint->x + 204) << 2;
+ rectTop = ((DEBUG_FEATURES ? GREG(95) : 0) + markPoint->y + 140) << 2;
gSPTextureRectangle(OVERLAY_DISP++, rectLeft, rectTop, markInfo->rectWidth + rectLeft,
rectTop + markInfo->rectHeight, G_TX_RENDERTILE, 0, 0, markInfo->dsdx,
markInfo->dtdy);
diff --git a/src/code/code_80069420.c b/src/code/z_memory_utils.c
similarity index 100%
rename from src/code/code_80069420.c
rename to src/code/z_memory_utils.c
diff --git a/src/code/z_message.c b/src/code/z_message.c
index 86b1e20709..1d6fee156b 100644
--- a/src/code/z_message.c
+++ b/src/code/z_message.c
@@ -1,15 +1,46 @@
-#include "global.h"
+#include "libu64/gfxprint.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "gfxalloc.h"
+#include "language_array.h"
+#include "memory_utils.h"
#include "message_data_static.h"
-#include "terminal.h"
-#include "versions.h"
-#include "assets/textures/parameter_static/parameter_static.h"
-#include "versions.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "printf.h"
+#include "segment_symbols.h"
+#include "sequence.h"
+#include "regs.h"
+#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z64audio.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
-#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
- "ntsc-1.2:112"
+#include "assets/textures/parameter_static/parameter_static.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.0:32" \
+ "ntsc-1.1:32 ntsc-1.2:32 pal-1.0:0 pal-1.1:0"
+
+#if !PLATFORM_IQUE
+#define MSG_BUF_DECODED (msgCtx->msgBufDecoded)
+#define MSG_BUF_DECODED_WIDE (msgCtx->msgBufDecodedWide)
+#define MSG_BUF (font->msgBuf)
+#define MSG_BUF_WIDE (font->msgBufWide)
+#else
+// Workaround for EGCS internal compiler error (see docs/compilers.md)
+#define MSG_BUF_DECODED ((u8*)msgCtx->msgBufDecoded)
+#define MSG_BUF_DECODED_WIDE ((u16*)msgCtx->msgBufDecodedWide)
+#define MSG_BUF ((u8*)font->msgBuf)
+#define MSG_BUF_WIDE ((u16*)font->msgBufWide)
+#endif
#if !PLATFORM_GC
#define OCARINA_BUTTON_A_PRIM_1_R 80
@@ -96,19 +127,19 @@ s32 sCharTexScale;
s16 sTextFade = false; // original name: key_off_flag ?
-u8 D_8014B2F4 = 0;
+char D_8014B2F4 = 0;
s16 sOcarinaButtonIndexBufPos = 0;
s16 sOcarinaButtonIndexBufLen = 0;
-u8 sTextboxSkipped = false;
+char sTextboxSkipped = false;
u16 sNextTextId = 0;
s16 sTextIsCredits = false;
-#if OOT_PAL
+#if PLATFORM_GC && OOT_PAL
UNK_TYPE D_8014B30C = 0;
#endif
@@ -294,9 +325,9 @@ void Message_ResetOcarinaNoteState(void) {
void Message_UpdateOcarinaMemoryGame(PlayState* play) {
MessageContext* msgCtx = &play->msgCtx;
- play->msgCtx.msgMode++;
+ msgCtx->msgMode++;
- if (play->msgCtx.msgMode == MSGMODE_MEMORY_GAME_PLAYER_PLAYING) {
+ if (msgCtx->msgMode == MSGMODE_MEMORY_GAME_PLAYER_PLAYING) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = 0;
@@ -347,7 +378,7 @@ void Message_CloseTextbox(PlayState* play) {
}
}
-void Message_HandleChoiceSelection(PlayState* play, u8 numChoices) {
+void Message_HandleChoiceSelection(PlayState* play, char numChoices) {
static s16 sAnalogStickHeld = false;
MessageContext* msgCtx = &play->msgCtx;
Input* input = &play->state.input[0];
@@ -355,21 +386,23 @@ void Message_HandleChoiceSelection(PlayState* play, u8 numChoices) {
if (input->rel.stick_y >= 30 && !sAnalogStickHeld) {
sAnalogStickHeld = true;
msgCtx->choiceIndex--;
- if (msgCtx->choiceIndex > 128) {
+ // NOLINTBEGIN
+ if (msgCtx->choiceIndex > 128)
msgCtx->choiceIndex = 0;
- } else {
+ else
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- }
+ // NOLINTEND
} else if (input->rel.stick_y <= -30 && !sAnalogStickHeld) {
sAnalogStickHeld = true;
msgCtx->choiceIndex++;
- if (msgCtx->choiceIndex > numChoices) {
+ // NOLINTBEGIN
+ if (msgCtx->choiceIndex > numChoices)
msgCtx->choiceIndex = numChoices;
- } else {
+ else
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- }
+ // NOLINTEND
} else if (ABS(input->rel.stick_y) < 30) {
sAnalogStickHeld = false;
}
@@ -445,7 +478,7 @@ void Message_GrowTextbox(MessageContext* msgCtx) {
R_TEXTBOX_TEXWIDTH = texWidth + 0.5f;
R_TEXTBOX_TEXHEIGHT = texHeight + 0.5f;
// Adjust x pos
- R_TEXTBOX_X = (R_TEXTBOX_X_TARGET + R_TEXTBOX_WIDTH_TARGET) - (R_TEXTBOX_WIDTH / 2);
+ R_TEXTBOX_X = R_TEXTBOX_WIDTH_TARGET - (R_TEXTBOX_WIDTH / 2) + R_TEXTBOX_X_TARGET;
}
#if OOT_NTSC
@@ -467,11 +500,15 @@ void Message_FindMessageJPN(PlayState* play, u16 textId) {
nextSeg = messageTableEntry->segment;
font->msgOffset = foundSeg - seg;
font->msgLength = nextSeg - foundSeg;
+ PRINTF(T(" メッセージが,見つかった!!! = %x (data=%x) (data0=%x) (data1=%x) (data2=%x) (data3=%x)\n",
+ "Message found!!! = %x (data=%x) (data0=%x) (data1=%x) (data2=%x) (data3=%x)\n"),
+ textId, font->msgOffset, font->msgLength, foundSeg, seg, nextSeg);
return;
}
messageTableEntry++;
}
+ PRINTF(T(" メッセージが,見つからなかった!!! = %x\n", "Message not found!!! = %x\n"), textId);
messageTableEntry = sJpnMessageEntryTablePtr;
foundSeg = messageTableEntry->segment;
@@ -499,11 +536,15 @@ void Message_FindMessageNES(PlayState* play, u16 textId) {
nextSeg = messageTableEntry->segment;
font->msgOffset = foundSeg - seg;
font->msgLength = nextSeg - foundSeg;
+ PRINTF(T(" メッセージが,見つかった!!! = %x (data=%x) (data0=%x) (data1=%x) (data2=%x) (data3=%x)\n",
+ "Message found!!! = %x (data=%x) (data0=%x) (data1=%x) (data2=%x) (data3=%x)\n"),
+ textId, font->msgOffset, font->msgLength, foundSeg, seg, nextSeg);
return;
}
messageTableEntry++;
}
+ PRINTF(T(" メッセージが,見つからなかった!!! = %x\n", "Message not found!!! = %x\n"), textId);
messageTableEntry = sNesMessageEntryTablePtr;
foundSeg = messageTableEntry->segment;
@@ -798,6 +839,10 @@ void Message_DrawTextboxIcon(PlayState* play, Gfx** p, s16 x, s16 y) {
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
+#if PLATFORM_IQUE
+ R_TEXT_CHAR_SCALE = 80;
+#endif
+
sCharTexSize = 16.0f * ((f32)R_TEXT_CHAR_SCALE / 100.0f);
sCharTexScale = 1024.0f / ((f32)R_TEXT_CHAR_SCALE / 100.0f);
@@ -906,7 +951,7 @@ f32 sFontWidths[144] = {
5.0f, // '|'
7.0f, // '}'
10.0f, // '~'
- 10.0f, // '‾'
+ 10.0f, // ' '
12.0f, // 'À'
#if OOT_NTSC
12.0f, // 'î'
@@ -1003,7 +1048,7 @@ u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) {
void Message_HandleOcarina(PlayState* play) {
MessageContext* msgCtx = &play->msgCtx;
- if (play->msgCtx.msgMode == MSGMODE_TEXT_DISPLAYING) {
+ if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
play->msgCtx.ocarinaMode = OCARINA_MODE_01;
if (msgCtx->ocarinaAction == OCARINA_ACTION_SCARECROW_LONG_RECORDING) {
@@ -1016,8 +1061,7 @@ void Message_HandleOcarina(PlayState* play) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
- sOcarinaButtonIndexBufPos = sOcarinaButtonIndexBufLen = 0;
- msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos;
+ msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = sOcarinaButtonIndexBufLen = 0;
Message_ResetOcarinaNoteState();
msgCtx->stateTimer = 3;
msgCtx->msgMode = MSGMODE_SCARECROW_LONG_PLAYBACK;
@@ -1031,8 +1075,7 @@ void Message_HandleOcarina(PlayState* play) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
- sOcarinaButtonIndexBufPos = sOcarinaButtonIndexBufLen = 0;
- msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos;
+ msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = sOcarinaButtonIndexBufLen = 0;
Message_ResetOcarinaNoteState();
msgCtx->stateTimer = 3;
msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_PLAYBACK;
@@ -1077,8 +1120,8 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
u16 charTexIdx;
Gfx* gfx = *gfxP;
- play->msgCtx.textPosX = R_TEXT_INIT_XPOS;
- play->msgCtx.textPosY = R_TEXT_INIT_YPOS;
+ msgCtx->textPosX = R_TEXT_INIT_XPOS;
+ msgCtx->textPosY = R_TEXT_INIT_YPOS;
if (msgCtx->textBoxType == TEXTBOX_TYPE_NONE_NO_SHADOW) {
msgCtx->textColorR = msgCtx->textColorG = msgCtx->textColorB = 0;
@@ -1090,7 +1133,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
charTexIdx = 0;
for (i = 0; i < msgCtx->textDrawPos; i++) {
- character = msgCtx->msgBufDecodedWide[i];
+ character = MSG_BUF_DECODED_WIDE[i];
switch (character) {
case MESSAGE_WIDE_NEWLINE:
@@ -1104,7 +1147,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
}
break;
case MESSAGE_WIDE_COLOR:
- Message_SetTextColor(msgCtx, msgCtx->msgBufDecodedWide[++i]);
+ Message_SetTextColor(msgCtx, MSG_BUF_DECODED_WIDE[++i]);
break;
case MESSAGE_WIDE_CHAR_SPACE:
msgCtx->textPosX += MESSAGE_SPACE_WIDTH;
@@ -1125,7 +1168,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
*gfxP = gfx;
return;
case MESSAGE_WIDE_SHIFT:
- msgCtx->textPosX += msgCtx->msgBufDecodedWide[++i];
+ msgCtx->textPosX += MSG_BUF_DECODED_WIDE[++i];
break;
case MESSAGE_WIDE_TEXTID:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
@@ -1141,15 +1184,12 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
if (i + 1 == msgCtx->textDrawPos && (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING ||
(msgCtx->msgMode >= MSGMODE_OCARINA_STARTING &&
msgCtx->msgMode < MSGMODE_SCARECROW_LONG_RECORDING_START))) {
- j = i;
- while (true) {
- character = msgCtx->msgBufDecodedWide[j];
- if ((character != MESSAGE_WIDE_QUICKTEXT_DISABLE) && (character != MESSAGE_WIDE_PERSISTENT) &&
- (character != MESSAGE_WIDE_EVENT) && (character != MESSAGE_WIDE_BOX_BREAK_DELAYED) &&
- (character != MESSAGE_WIDE_AWAIT_BUTTON_PRESS) && (character != MESSAGE_WIDE_BOX_BREAK) &&
- (character != MESSAGE_WIDE_END)) {
- j++;
- } else {
+ for (j = i;; j++) {
+ character = MSG_BUF_DECODED_WIDE[j];
+ if ((character == MESSAGE_WIDE_QUICKTEXT_DISABLE) || (character == MESSAGE_WIDE_PERSISTENT) ||
+ (character == MESSAGE_WIDE_EVENT) || (character == MESSAGE_WIDE_BOX_BREAK_DELAYED) ||
+ (character == MESSAGE_WIDE_AWAIT_BUTTON_PRESS) || (character == MESSAGE_WIDE_BOX_BREAK) ||
+ (character == MESSAGE_WIDE_END)) {
break;
}
}
@@ -1171,7 +1211,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
break;
case MESSAGE_WIDE_BOX_BREAK_DELAYED:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
- msgCtx->stateTimer = msgCtx->msgBufDecodedWide[++i];
+ msgCtx->stateTimer = MSG_BUF_DECODED_WIDE[++i];
msgCtx->msgMode = MSGMODE_TEXT_DELAYED_BREAK;
}
*gfxP = gfx;
@@ -1181,13 +1221,13 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
case MESSAGE_WIDE_SFX:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && !sMessageHasSetSfx) {
sMessageHasSetSfx = true;
- Audio_PlaySfxGeneral(msgCtx->msgBufDecodedWide[i + 1], &gSfxDefaultPos, 4,
- &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+ Audio_PlaySfxGeneral(MSG_BUF_DECODED_WIDE[i + 1], &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
+ &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
i++;
break;
case MESSAGE_WIDE_ITEM_ICON:
- i = Message_DrawItemIcon(play, msgCtx->msgBufDecodedWide[i + 1], &gfx, i);
+ i = Message_DrawItemIcon(play, MSG_BUF_DECODED_WIDE[i + 1], &gfx, i);
break;
case MESSAGE_WIDE_BACKGROUND:
// clang-format off
@@ -1210,7 +1250,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
gfx++, (msgCtx->textPosX + 1) << 2,
(R_TEXTBOX_BG_YPOS + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx]) << 2,
(msgCtx->textPosX + 96 + 1) << 2,
- (R_TEXTBOX_BG_YPOS + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx] + 48) << 2,
+ (R_TEXTBOX_BG_YPOS + 48 + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx]) << 2,
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gDPLoadTextureBlock_4b(gfx++, msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE + 0x900, G_IM_FMT_I, 96,
@@ -1220,7 +1260,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
gfx++, (msgCtx->textPosX + 96 + 1) << 2,
(R_TEXTBOX_BG_YPOS + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx]) << 2,
(msgCtx->textPosX + 96 + 1 + 96 + 1) << 2,
- (R_TEXTBOX_BG_YPOS + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx] + 48) << 2,
+ (R_TEXTBOX_BG_YPOS + 48 + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx]) << 2,
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gDPPipeSync(gfx++);
@@ -1249,7 +1289,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
msgCtx->textPosX += 32;
break;
case MESSAGE_WIDE_TEXT_SPEED:
- msgCtx->textDelay = msgCtx->msgBufDecodedWide[++i];
+ msgCtx->textDelay = MSG_BUF_DECODED_WIDE[++i];
break;
case MESSAGE_WIDE_UNSKIPPABLE:
msgCtx->textUnskippable = true;
@@ -1297,7 +1337,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_FADING;
- msgCtx->stateTimer = msgCtx->msgBufDecodedWide[++i];
+ msgCtx->stateTimer = MSG_BUF_DECODED_WIDE[++i];
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE);
if (play->csCtx.state == CS_STATE_IDLE) {
Interface_SetDoAction(play, DO_ACTION_RETURN);
@@ -1340,7 +1380,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
msgCtx->textPosX -= 2;
break;
}
- if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i + 1 == msgCtx->textDrawPos &&
+ if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i == msgCtx->textDrawPos - 1 &&
msgCtx->textDelayTimer == msgCtx->textDelay) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -1402,7 +1442,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
Font* font = &play->msgCtx.font;
Gfx* gfx = *gfxP;
- play->msgCtx.textPosX = R_TEXT_INIT_XPOS;
+ msgCtx->textPosX = R_TEXT_INIT_XPOS;
if (!sTextIsCredits) {
msgCtx->textPosY = R_TEXT_INIT_YPOS;
} else {
@@ -1419,7 +1459,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
charTexIdx = 0;
for (i = 0; i < msgCtx->textDrawPos; i++) {
- character = msgCtx->msgBufDecoded[i];
+ character = MSG_BUF_DECODED[i];
switch (character) {
case MESSAGE_NEWLINE:
@@ -1433,7 +1473,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
msgCtx->textPosY += R_TEXT_LINE_SPACING;
break;
case MESSAGE_COLOR:
- Message_SetTextColor(msgCtx, msgCtx->msgBufDecoded[++i] & 0xF);
+ Message_SetTextColor(msgCtx, MSG_BUF_DECODED[++i] & 0xF);
break;
case MESSAGE_CHAR_SPACE:
msgCtx->textPosX += MESSAGE_SPACE_WIDTH;
@@ -1454,7 +1494,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
*gfxP = gfx;
return;
case MESSAGE_SHIFT:
- msgCtx->textPosX += msgCtx->msgBufDecoded[++i];
+ msgCtx->textPosX += MSG_BUF_DECODED[++i];
break;
case MESSAGE_TEXTID:
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_HAS_NEXT;
@@ -1470,17 +1510,14 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
if (i + 1 == msgCtx->textDrawPos && (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING ||
(msgCtx->msgMode >= MSGMODE_OCARINA_STARTING &&
msgCtx->msgMode < MSGMODE_SCARECROW_LONG_RECORDING_START))) {
- j = i;
- while (true) {
- character = msgCtx->msgBufDecoded[j];
+ for (j = i;; j++) {
+ character = MSG_BUF_DECODED[j];
if (character == MESSAGE_SHIFT) {
- j += 2;
- } else if ((character != MESSAGE_QUICKTEXT_DISABLE) && (character != MESSAGE_PERSISTENT) &&
- (character != MESSAGE_EVENT) && (character != MESSAGE_BOX_BREAK_DELAYED) &&
- (character != MESSAGE_AWAIT_BUTTON_PRESS) && (character != MESSAGE_BOX_BREAK) &&
- (character != MESSAGE_END)) {
j++;
- } else {
+ } else if ((character == MESSAGE_QUICKTEXT_DISABLE) || (character == MESSAGE_PERSISTENT) ||
+ (character == MESSAGE_EVENT) || (character == MESSAGE_BOX_BREAK_DELAYED) ||
+ (character == MESSAGE_AWAIT_BUTTON_PRESS) || (character == MESSAGE_BOX_BREAK) ||
+ (character == MESSAGE_END)) {
break;
}
}
@@ -1502,7 +1539,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
break;
case MESSAGE_BOX_BREAK_DELAYED:
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
- msgCtx->stateTimer = msgCtx->msgBufDecoded[++i];
+ msgCtx->stateTimer = MSG_BUF_DECODED[++i];
msgCtx->msgMode = MSGMODE_TEXT_DELAYED_BREAK;
}
*gfxP = gfx;
@@ -1511,10 +1548,9 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_FADING;
- PRINTF(T("タイマー (%x) (%x)", "Timer (%x) (%x)"), msgCtx->msgBufDecoded[i + 1],
- msgCtx->msgBufDecoded[i + 2]);
- msgCtx->stateTimer = msgCtx->msgBufDecoded[++i] << 8;
- msgCtx->stateTimer |= msgCtx->msgBufDecoded[++i];
+ PRINTF(T("タイマー (%x) (%x)", "Timer (%x) (%x)"), MSG_BUF_DECODED[i + 1], MSG_BUF_DECODED[i + 2]);
+ msgCtx->stateTimer = MSG_BUF_DECODED[++i] << 8;
+ msgCtx->stateTimer |= MSG_BUF_DECODED[++i];
PRINTF(T("合計wct=%x(%d)\n", " Total wct=%x(%d)\n"), msgCtx->stateTimer, msgCtx->stateTimer);
}
*gfxP = gfx;
@@ -1523,15 +1559,15 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && !sMessageHasSetSfx) {
sMessageHasSetSfx = true;
PRINTF(T("サウンド(SE)\n", "Sound (SE)\n"));
- sfxHi = msgCtx->msgBufDecoded[i + 1];
+ sfxHi = MSG_BUF_DECODED[i + 1];
sfxHi <<= 8;
- Audio_PlaySfxGeneral(sfxHi | msgCtx->msgBufDecoded[i + 2], &gSfxDefaultPos, 4,
+ Audio_PlaySfxGeneral(sfxHi | MSG_BUF_DECODED[i + 2], &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
i += 2;
break;
case MESSAGE_ITEM_ICON:
- i = Message_DrawItemIcon(play, msgCtx->msgBufDecoded[i + 1], &gfx, i);
+ i = Message_DrawItemIcon(play, MSG_BUF_DECODED[i + 1], &gfx, i);
break;
case MESSAGE_BACKGROUND:
// clang-format off
@@ -1554,7 +1590,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
gfx++, (msgCtx->textPosX + 1) << 2,
(R_TEXTBOX_BG_YPOS + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx]) << 2,
(msgCtx->textPosX + 96 + 1) << 2,
- (R_TEXTBOX_BG_YPOS + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx] + 48) << 2,
+ (R_TEXTBOX_BG_YPOS + 48 + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx]) << 2,
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gDPLoadTextureBlock_4b(gfx++, msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE + 0x900, G_IM_FMT_I, 96,
@@ -1564,7 +1600,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
gfx++, (msgCtx->textPosX + 96 + 1) << 2,
(R_TEXTBOX_BG_YPOS + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx]) << 2,
(msgCtx->textPosX + 96 + 1 + 96 + 1) << 2,
- (R_TEXTBOX_BG_YPOS + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx] + 48) << 2,
+ (R_TEXTBOX_BG_YPOS + 48 + sTextboxBackgroundYOffsets[msgCtx->textboxBackgroundYOffsetIdx]) << 2,
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gDPPipeSync(gfx++);
@@ -1593,7 +1629,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
msgCtx->textPosX += 32;
break;
case MESSAGE_TEXT_SPEED:
- msgCtx->textDelay = msgCtx->msgBufDecoded[++i];
+ msgCtx->textDelay = MSG_BUF_DECODED[++i];
break;
case MESSAGE_UNSKIPPABLE:
msgCtx->textUnskippable = true;
@@ -1641,7 +1677,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) {
msgCtx->msgMode = MSGMODE_TEXT_DONE;
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_FADING;
- msgCtx->stateTimer = msgCtx->msgBufDecoded[++i];
+ msgCtx->stateTimer = MSG_BUF_DECODED[++i];
Font_LoadMessageBoxIcon(font, TEXTBOX_ICON_SQUARE);
if (play->csCtx.state == 0) {
Interface_SetDoAction(play, DO_ACTION_RETURN);
@@ -1669,11 +1705,18 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
*gfxP = gfx;
return;
default:
- if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i + 1 == msgCtx->textDrawPos &&
+ if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i == msgCtx->textDrawPos - 1 &&
msgCtx->textDelayTimer == msgCtx->textDelay) {
Audio_PlaySfxGeneral(NA_SE_NONE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
+
+#if PLATFORM_IQUE
+ if (!sTextIsCredits) {
+ R_TEXT_CHAR_SCALE = 100;
+ }
+#endif
+
Message_DrawTextChar(play, &font->charTexBuf[charTexIdx], &gfx);
charTexIdx += FONT_CHAR_TEX_SIZE;
@@ -1697,8 +1740,8 @@ void Message_LoadItemIcon(PlayState* play, u16 itemId, s16 y) {
InterfaceContext* interfaceCtx = &play->interfaceCtx;
if (itemId == ITEM_DUNGEON_MAP) {
- interfaceCtx->mapPalette[30] = 0xFF;
- interfaceCtx->mapPalette[31] = 0xFF;
+ interfaceCtx->mapPalette[30] = -1;
+ interfaceCtx->mapPalette[31] = -1;
}
if (itemId < ITEM_MEDALLION_FOREST) {
R_TEXTBOX_ICON_XPOS = R_TEXT_INIT_XPOS - sIconItem32XOffsets[gSaveContext.language];
@@ -1724,31 +1767,31 @@ void Message_Decode(PlayState* play) {
Font* font = &play->msgCtx.font;
s32 charTexIdx = 0;
s16 i;
-#if OOT_NTSC
+#if !(PLATFORM_GC && OOT_PAL)
s16 j;
#endif
s16 decodedBufPos = 0;
s16 numLines = 0;
s16 digits[4];
- f32 timeInSeconds;
+ s32 pad;
s16 playerNameLen;
s16 loadChar;
u16 value;
u8 curChar;
-#if OOT_NTSC
+#if !(PLATFORM_GC && OOT_PAL)
u16 curCharWide;
u8* fontBuf;
#endif
- play->msgCtx.textDelayTimer = 0;
- play->msgCtx.textUnskippable = play->msgCtx.textDelay = play->msgCtx.textDelayTimer = 0;
+ msgCtx->textDelayTimer = 0;
+ msgCtx->textUnskippable = msgCtx->textDelay = msgCtx->textDelayTimer = 0;
sTextFade = false;
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN && !sTextIsCredits) {
// Japanese text (NTSC only)
- while (true) {
- curCharWide = msgCtx->msgBufDecodedWide[decodedBufPos] = font->msgBufWide[msgCtx->msgBufPos];
+ for (;;) {
+ curCharWide = MSG_BUF_DECODED_WIDE[decodedBufPos] = MSG_BUF_WIDE[msgCtx->msgBufPos];
if (curCharWide == MESSAGE_WIDE_BOX_BREAK || curCharWide == MESSAGE_WIDE_TEXTID ||
curCharWide == MESSAGE_WIDE_BOX_BREAK_DELAYED || curCharWide == MESSAGE_WIDE_EVENT ||
@@ -1765,10 +1808,10 @@ void Message_Decode(PlayState* play) {
}
}
if (curCharWide == MESSAGE_WIDE_TEXTID) {
- sNextTextId = msgCtx->msgBufDecodedWide[++decodedBufPos] = font->msgBufWide[msgCtx->msgBufPos + 1];
+ sNextTextId = MSG_BUF_DECODED_WIDE[++decodedBufPos] = MSG_BUF_WIDE[msgCtx->msgBufPos + 1];
}
if (curCharWide == MESSAGE_WIDE_BOX_BREAK_DELAYED) {
- msgCtx->msgBufDecodedWide[++decodedBufPos] = font->msgBufWide[msgCtx->msgBufPos + 1];
+ MSG_BUF_DECODED_WIDE[++decodedBufPos] = MSG_BUF_WIDE[msgCtx->msgBufPos + 1];
msgCtx->msgBufPos += 2;
}
msgCtx->decodedTextLen = decodedBufPos;
@@ -1776,8 +1819,7 @@ void Message_Decode(PlayState* play) {
msgCtx->textDrawPos = msgCtx->decodedTextLen;
}
break;
- }
- if (curCharWide == MESSAGE_WIDE_NAME) {
+ } else if (curCharWide == MESSAGE_WIDE_NAME) {
// Substitute the player name control character for the file's player name.
for (playerNameLen = ARRAY_COUNT(gSaveContext.save.info.playerData.playerName); playerNameLen > 0;
playerNameLen--) {
@@ -1785,10 +1827,12 @@ void Message_Decode(PlayState* play) {
break;
}
}
+ PRINTF(T("\n名前 = ", "\nName = "));
for (i = 0; i < playerNameLen; i++) {
curCharWide = gSaveContext.save.info.playerData.playerName[i];
+ PRINTF("(%x), ", curCharWide);
+ MSG_BUF_DECODED_WIDE[decodedBufPos + i] = MESSAGE_WIDE_NAME;
fontBuf = &font->fontBuf[(curCharWide * 32) << 2]; // fake
- msgCtx->msgBufDecodedWide[decodedBufPos + i] = MESSAGE_WIDE_NAME;
for (j = 0; j < FONT_CHAR_TEX_SIZE; j += 4) {
font->charTexBuf[charTexIdx + j + 0] = fontBuf[j + 0];
@@ -1802,6 +1846,7 @@ void Message_Decode(PlayState* play) {
} else if (curCharWide == MESSAGE_WIDE_MARATHON_TIME || curCharWide == MESSAGE_WIDE_RACE_TIME) {
// Convert the values of the appropriate timer to digits and add the
// digits to the decoded buffer in place of the control character.
+ PRINTF(T("\nEVENTタイマー = \n", "\nEVENT timer = \n"));
digits[0] = digits[1] = digits[2] = 0;
if (curCharWide == MESSAGE_WIDE_RACE_TIME) {
digits[3] = gSaveContext.timerSeconds;
@@ -1822,24 +1867,26 @@ void Message_Decode(PlayState* play) {
}
for (i = 0; i < 4; i++) {
+ PRINTF("rpc[%d] = %x\n", i, digits[i] + MESSAGE_WIDE_CHAR_ZERO);
Font_LoadCharWide(font, digits[i] + MESSAGE_WIDE_CHAR_ZERO, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
decodedBufPos++;
if (i == 1) {
Font_LoadCharWide(font, MESSAGE_WIDE_CHAR_MINUTES, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = MESSAGE_WIDE_CHAR_MINUTES;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = MESSAGE_WIDE_CHAR_MINUTES;
decodedBufPos++;
} else if (i == 3) {
Font_LoadCharWide(font, MESSAGE_WIDE_CHAR_SECONDS, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = MESSAGE_WIDE_CHAR_SECONDS;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = MESSAGE_WIDE_CHAR_SECONDS;
}
}
} else if (curCharWide == MESSAGE_WIDE_POINTS) {
// Convert the values of the current minigame score to digits and
// add the digits to the decoded buffer in place of the control character.
+ PRINTF(T("\n流鏑馬スコア = ", "\nHorseback archery score = "));
digits[0] = digits[1] = digits[2] = 0;
digits[3] = gSaveContext.minigameScore;
@@ -1863,7 +1910,7 @@ void Message_Decode(PlayState* play) {
if (loadChar) {
Font_LoadCharWide(font, digits[i] + MESSAGE_WIDE_CHAR_ZERO, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
decodedBufPos++;
}
}
@@ -1871,6 +1918,8 @@ void Message_Decode(PlayState* play) {
} else if (curCharWide == MESSAGE_WIDE_TOKENS) {
// Convert the current number of collected gold skulltula tokens to digits and
// add the digits to the decoded buffer in place of the control character.
+ PRINTF(T("\n金スタ合計数 = %d", "\nTotal number of gold skulls = %d"),
+ gSaveContext.save.info.inventory.gsTokens);
digits[0] = digits[1] = 0;
digits[2] = gSaveContext.save.info.inventory.gsTokens;
@@ -1891,12 +1940,13 @@ void Message_Decode(PlayState* play) {
if (loadChar) {
Font_LoadCharWide(font, digits[i] + MESSAGE_WIDE_CHAR_ZERO, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
decodedBufPos++;
}
}
decodedBufPos--;
} else if (curCharWide == MESSAGE_WIDE_FISH_INFO) {
+ PRINTF(T("\n釣り堀魚サイズ = ", "\nFishing hole fish size = "));
digits[0] = 0;
digits[1] = gSaveContext.minigameScore;
@@ -1909,21 +1959,37 @@ void Message_Decode(PlayState* play) {
if (i == 1 || digits[i] != 0) {
Font_LoadCharWide(font, digits[i] + MESSAGE_WIDE_CHAR_ZERO, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
decodedBufPos++;
}
}
decodedBufPos--;
} else if (curCharWide == MESSAGE_WIDE_HIGHSCORE) {
- value = HIGH_SCORE(font->msgBufWide[++msgCtx->msgBufPos] & 0xFF);
- if ((font->msgBufWide[msgCtx->msgBufPos] & 0xFF) == 2) {
+ value = HIGH_SCORE(MSG_BUF_WIDE[++msgCtx->msgBufPos] & 0xFF);
+ if ((MSG_BUF_WIDE[msgCtx->msgBufPos] & 0xFF) == HS_FISHING) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
+#if !PLATFORM_IQUE
+ PRINTF("HI_SCORE(kanfont->mbuff.message_buf[message->rdp]) = %x\n",
+ HIGH_SCORE(MSG_BUF_WIDE[msgCtx->msgBufPos]));
+#else
+ PRINTF("HI_SCORE(((unshort *)(kanfont->mbuff.message_buf))[message->rdp]) = %x\n",
+ HIGH_SCORE(MSG_BUF_WIDE[msgCtx->msgBufPos]));
+#endif
value &= 0x7F;
} else {
- value = ((HIGH_SCORE(font->msgBufWide[msgCtx->msgBufPos]) & 0xFF000000) >> 0x18) & 0x7F;
+#if !PLATFORM_IQUE
+ PRINTF("HI_SCORE( kanfont->mbuff.message_buf[message->rdp]) = %x\n",
+ HIGH_SCORE(MSG_BUF_WIDE[msgCtx->msgBufPos]));
+#else
+ PRINTF(
+ "HI_SCORE( ((unshort *)(kanfont->mbuff.message_buf))[message->rdp]) & 0xff000000 = %x\n",
+ HIGH_SCORE(MSG_BUF_WIDE[msgCtx->msgBufPos]) & 0xFF000000);
+#endif
+ value = ((HIGH_SCORE(MSG_BUF_WIDE[msgCtx->msgBufPos]) & 0xFF000000) >> 0x18);
+ value &= 0x7F;
}
}
- switch (font->msgBufWide[msgCtx->msgBufPos] & 0xFF) {
+ switch (MSG_BUF_WIDE[msgCtx->msgBufPos] & 0xFF) {
case HS_HBA:
case HS_POE_POINTS:
case HS_FISHING:
@@ -1951,7 +2017,7 @@ void Message_Decode(PlayState* play) {
if (loadChar) {
Font_LoadCharWide(font, digits[i] + MESSAGE_WIDE_CHAR_ZERO, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
decodedBufPos++;
}
}
@@ -1981,75 +2047,77 @@ void Message_Decode(PlayState* play) {
for (i = 0; i < 4; i++) {
Font_LoadCharWide(font, digits[i] + MESSAGE_WIDE_CHAR_ZERO, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
decodedBufPos++;
if (i == 1) {
Font_LoadCharWide(font, MESSAGE_WIDE_CHAR_MINUTES, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = MESSAGE_WIDE_CHAR_MINUTES;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = MESSAGE_WIDE_CHAR_MINUTES;
decodedBufPos++;
} else if (i == 3) {
Font_LoadCharWide(font, MESSAGE_WIDE_CHAR_SECONDS, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = MESSAGE_WIDE_CHAR_SECONDS;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = MESSAGE_WIDE_CHAR_SECONDS;
}
}
break;
}
} else if (curCharWide == MESSAGE_WIDE_TIME) {
+ PRINTF(T("\nゼルダ時間 = ", "\nZelda time = "));
digits[0] = 0;
- timeInSeconds = gSaveContext.save.dayTime * (24.0f * 60.0f / 0x10000);
-
- digits[1] = timeInSeconds / 60.0f;
+ digits[1] = (gSaveContext.save.dayTime * (24.0f * 60.0f / 0x10000)) / 60.0f;
while (digits[1] >= 10) {
digits[0]++;
digits[1] -= 10;
}
digits[2] = 0;
- digits[3] = (s16)timeInSeconds % 60;
+ digits[3] = (s16)(gSaveContext.save.dayTime * (24.0f * 60.0f / 0x10000)) % 60;
while (digits[3] >= 10) {
digits[2]++;
digits[3] -= 10;
}
for (i = 0; i < 4; i++) {
+ PRINTF("rpc[%d] = %x\n", i, digits[i] + MESSAGE_WIDE_CHAR_ZERO);
Font_LoadCharWide(font, digits[i] + MESSAGE_WIDE_CHAR_ZERO, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = digits[i] + MESSAGE_WIDE_CHAR_ZERO;
decodedBufPos++;
if (i == 1) {
Font_LoadCharWide(font, MESSAGE_WIDE_CHAR_HOURS, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = MESSAGE_WIDE_CHAR_HOURS;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = MESSAGE_WIDE_CHAR_HOURS;
decodedBufPos++;
} else if (i == 3) {
Font_LoadCharWide(font, MESSAGE_WIDE_CHAR_MINUTES, charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecodedWide[decodedBufPos] = MESSAGE_WIDE_CHAR_MINUTES;
+ MSG_BUF_DECODED_WIDE[decodedBufPos] = MESSAGE_WIDE_CHAR_MINUTES;
}
}
} else if (curCharWide == MESSAGE_WIDE_ITEM_ICON) {
- msgCtx->msgBufDecodedWide[++decodedBufPos] = font->msgBufWide[msgCtx->msgBufPos + 1];
- Message_LoadItemIcon(play, font->msgBufWide[msgCtx->msgBufPos + 1], R_TEXTBOX_Y + 10);
+ MSG_BUF_DECODED_WIDE[++decodedBufPos] = MSG_BUF_WIDE[msgCtx->msgBufPos + 1];
+ PRINTF("ITEM_NO=(%d) (%d)\n", MSG_BUF_DECODED_WIDE[decodedBufPos], MSG_BUF_WIDE[msgCtx->msgBufPos + 1]);
+ Message_LoadItemIcon(play, MSG_BUF_WIDE[msgCtx->msgBufPos + 1], R_TEXTBOX_Y + 10);
} else if (curCharWide == MESSAGE_WIDE_BACKGROUND) {
- msgCtx->textboxBackgroundIdx = font->msgBufWide[msgCtx->msgBufPos + 1] * 2;
- msgCtx->textboxBackgroundForeColorIdx = (font->msgBufWide[msgCtx->msgBufPos + 2] & 0xF000) >> 12;
- msgCtx->textboxBackgroundBackColorIdx = (font->msgBufWide[msgCtx->msgBufPos + 2] & 0xF00) >> 8;
- msgCtx->textboxBackgroundYOffsetIdx = (font->msgBufWide[msgCtx->msgBufPos + 2] & 0xF0) >> 4;
- msgCtx->textboxBackgroundUnkArg = font->msgBufWide[msgCtx->msgBufPos + 2] & 0xF;
- DmaMgr_RequestSync(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE,
- (uintptr_t)_message_texture_staticSegmentRomStart +
- msgCtx->textboxBackgroundIdx * MESSAGE_TEXTURE_STATIC_TEX_SIZE,
- MESSAGE_TEXTURE_STATIC_TEX_SIZE);
- DmaMgr_RequestSync(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE + MESSAGE_TEXTURE_STATIC_TEX_SIZE,
- (uintptr_t)_message_texture_staticSegmentRomStart +
- (msgCtx->textboxBackgroundIdx + 1) * MESSAGE_TEXTURE_STATIC_TEX_SIZE,
- MESSAGE_TEXTURE_STATIC_TEX_SIZE);
+ msgCtx->textboxBackgroundIdx = MSG_BUF_WIDE[msgCtx->msgBufPos + 1] * 2;
+ PRINTF("mes_board=%d\n", msgCtx->textboxBackgroundIdx);
+ msgCtx->textboxBackgroundForeColorIdx = (MSG_BUF_WIDE[msgCtx->msgBufPos + 2] & 0xF000) >> 12;
+ msgCtx->textboxBackgroundBackColorIdx = (MSG_BUF_WIDE[msgCtx->msgBufPos + 2] & 0xF00) >> 8;
+ msgCtx->textboxBackgroundYOffsetIdx = (MSG_BUF_WIDE[msgCtx->msgBufPos + 2] & 0xF0) >> 4;
+ msgCtx->textboxBackgroundUnkArg = MSG_BUF_WIDE[msgCtx->msgBufPos + 2] & 0xF;
+ DMA_REQUEST_SYNC(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE,
+ (uintptr_t)_message_texture_staticSegmentRomStart +
+ msgCtx->textboxBackgroundIdx * MESSAGE_TEXTURE_STATIC_TEX_SIZE,
+ MESSAGE_TEXTURE_STATIC_TEX_SIZE, "../z_message_PAL.c", UNK_LINE);
+ DMA_REQUEST_SYNC(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE + MESSAGE_TEXTURE_STATIC_TEX_SIZE,
+ (uintptr_t)_message_texture_staticSegmentRomStart +
+ (msgCtx->textboxBackgroundIdx + 1) * MESSAGE_TEXTURE_STATIC_TEX_SIZE,
+ MESSAGE_TEXTURE_STATIC_TEX_SIZE, "../z_message_PAL.c", UNK_LINE);
numLines = 2;
msgCtx->msgBufPos += 2;
R_TEXTBOX_BG_YPOS = R_TEXTBOX_Y + 8;
} else if (curCharWide == MESSAGE_WIDE_COLOR) {
- msgCtx->msgBufDecodedWide[++decodedBufPos] = font->msgBufWide[++msgCtx->msgBufPos] & 0xF;
+ MSG_BUF_DECODED_WIDE[++decodedBufPos] = MSG_BUF_WIDE[++msgCtx->msgBufPos] & 0xF;
} else if (curCharWide == MESSAGE_WIDE_NEWLINE) {
numLines++;
} else if (curCharWide != MESSAGE_WIDE_QUICKTEXT_ENABLE && curCharWide != MESSAGE_WIDE_QUICKTEXT_DISABLE &&
@@ -2057,11 +2125,12 @@ void Message_Decode(PlayState* play) {
curCharWide != MESSAGE_WIDE_PERSISTENT && curCharWide != MESSAGE_WIDE_UNSKIPPABLE) {
if (curCharWide == MESSAGE_WIDE_FADE) {
sTextFade = true;
- msgCtx->msgBufDecodedWide[++decodedBufPos] = font->msgBufWide[++msgCtx->msgBufPos] & 0xFF;
+ PRINTF("Z_TIMER_END (key_off_flag=%d)\n", sTextFade);
+ MSG_BUF_DECODED_WIDE[++decodedBufPos] = MSG_BUF_WIDE[++msgCtx->msgBufPos] & 0xFF;
} else if (curCharWide == MESSAGE_WIDE_SHIFT || curCharWide == MESSAGE_WIDE_TEXT_SPEED) {
- msgCtx->msgBufDecodedWide[++decodedBufPos] = font->msgBufWide[++msgCtx->msgBufPos] & 0xFF;
+ MSG_BUF_DECODED_WIDE[++decodedBufPos] = MSG_BUF_WIDE[++msgCtx->msgBufPos] & 0xFF;
} else if (curCharWide == MESSAGE_WIDE_SFX) {
- msgCtx->msgBufDecodedWide[++decodedBufPos] = font->msgBufWide[++msgCtx->msgBufPos];
+ MSG_BUF_DECODED_WIDE[++decodedBufPos] = MSG_BUF_WIDE[++msgCtx->msgBufPos];
} else if (curCharWide == MESSAGE_WIDE_TWO_CHOICE) {
msgCtx->choiceNum = 2;
} else if (curCharWide == MESSAGE_WIDE_THREE_CHOICE) {
@@ -2075,17 +2144,20 @@ void Message_Decode(PlayState* play) {
decodedBufPos++;
msgCtx->msgBufPos++;
}
- } else {
+ } else
#endif
+ {
// English text for NTSC, eng/ger/fra text for PAL
- while (true) {
- curChar = msgCtx->msgBufDecoded[decodedBufPos] = font->msgBuf[msgCtx->msgBufPos];
+ for (;;) {
+ curChar = MSG_BUF_DECODED[decodedBufPos] = MSG_BUF[msgCtx->msgBufPos];
if (curChar == MESSAGE_BOX_BREAK || curChar == MESSAGE_TEXTID || curChar == MESSAGE_BOX_BREAK_DELAYED ||
curChar == MESSAGE_EVENT || curChar == MESSAGE_END) {
// Textbox decoding ends with any of the above text control characters
msgCtx->msgMode = MSGMODE_TEXT_DISPLAYING;
msgCtx->textDrawPos = 1;
+
+#if !PLATFORM_IQUE
R_TEXT_INIT_YPOS = R_TEXTBOX_Y + 8;
PRINTF("JJ=%d\n", numLines);
if (msgCtx->textBoxType != TEXTBOX_TYPE_NONE_BOTTOM) {
@@ -2097,16 +2169,30 @@ void Message_Decode(PlayState* play) {
R_TEXT_INIT_YPOS = (u16)(R_TEXTBOX_Y + 16);
}
}
+#else
+ R_TEXT_INIT_YPOS = R_TEXTBOX_Y + 6;
+ PRINTF("JJ=%d\n", numLines);
+ if (msgCtx->textBoxType != TEXTBOX_TYPE_NONE_BOTTOM) {
+ if (numLines == 0) {
+ R_TEXT_INIT_YPOS = (u16)(R_TEXTBOX_Y + 18);
+ } else if (numLines == 1) {
+ R_TEXT_INIT_YPOS = (u16)(R_TEXTBOX_Y + 12);
+ } else if (numLines == 2) {
+ R_TEXT_INIT_YPOS = (u16)(R_TEXTBOX_Y + 8);
+ }
+ }
+#endif
+
if (curChar == MESSAGE_TEXTID) {
- PRINTF("NZ_NEXTMSG=%x, %x, %x\n", font->msgBuf[msgCtx->msgBufPos],
- font->msgBuf[msgCtx->msgBufPos + 1], font->msgBuf[msgCtx->msgBufPos + 2]);
- value = msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[msgCtx->msgBufPos + 1];
- msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[msgCtx->msgBufPos + 2];
+ PRINTF("NZ_NEXTMSG=%x, %x, %x\n", MSG_BUF[msgCtx->msgBufPos], MSG_BUF[msgCtx->msgBufPos + 1],
+ MSG_BUF[msgCtx->msgBufPos + 2]);
+ value = MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[msgCtx->msgBufPos + 1];
+ MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[msgCtx->msgBufPos + 2];
value <<= 8;
- sNextTextId = msgCtx->msgBufDecoded[decodedBufPos] | value;
+ sNextTextId = MSG_BUF_DECODED[decodedBufPos] | value;
}
if (curChar == MESSAGE_BOX_BREAK_DELAYED) {
- msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[msgCtx->msgBufPos + 1];
+ MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[msgCtx->msgBufPos + 1];
msgCtx->msgBufPos += 2;
}
msgCtx->decodedTextLen = decodedBufPos;
@@ -2146,7 +2232,7 @@ void Message_Decode(PlayState* play) {
charTexIdx += FONT_CHAR_TEX_SIZE;
}
PRINTF("%x ", curChar);
- msgCtx->msgBufDecoded[decodedBufPos] = curChar;
+ MSG_BUF_DECODED[decodedBufPos] = curChar;
decodedBufPos++;
}
decodedBufPos--;
@@ -2177,23 +2263,23 @@ void Message_Decode(PlayState* play) {
for (i = 0; i < 4; i++) {
Font_LoadChar(font, digits[i] + '0' - ' ', charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecoded[decodedBufPos] = digits[i] + '0';
+ MSG_BUF_DECODED[decodedBufPos] = digits[i] + '0';
decodedBufPos++;
if (i == 1) {
Font_LoadChar(font, '"' - ' ', charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecoded[decodedBufPos] = '"';
+ MSG_BUF_DECODED[decodedBufPos] = '"';
decodedBufPos++;
} else if (i == 3) {
Font_LoadChar(font, '"' - ' ', charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecoded[decodedBufPos] = '"';
+ MSG_BUF_DECODED[decodedBufPos] = '"';
}
}
} else if (curChar == MESSAGE_POINTS) {
// Convert the values of the current minigame score to digits and
// add the digits to the decoded buffer in place of the control character.
- PRINTF(T("\n流鏑馬スコア = %d\n", "\nYabusame score = %d\n"), gSaveContext.minigameScore);
+ PRINTF(T("\n流鏑馬スコア = %d\n", "\nHorseback archery score = %d\n"), gSaveContext.minigameScore);
digits[0] = digits[1] = digits[2] = 0;
digits[3] = gSaveContext.minigameScore;
@@ -2217,7 +2303,7 @@ void Message_Decode(PlayState* play) {
}
if (loadChar) {
Font_LoadChar(font, digits[i] + '0' - ' ', charTexIdx);
- msgCtx->msgBufDecoded[decodedBufPos] = digits[i] + '0';
+ MSG_BUF_DECODED[decodedBufPos] = digits[i] + '0';
charTexIdx += FONT_CHAR_TEX_SIZE;
decodedBufPos++;
}
@@ -2226,7 +2312,7 @@ void Message_Decode(PlayState* play) {
} else if (curChar == MESSAGE_TOKENS) {
// Convert the current number of collected gold skulltula tokens to digits and
// add the digits to the decoded buffer in place of the control character.
- PRINTF(T("\n金スタ合計数 = %d", "\nTotal number of gold stars = %d"),
+ PRINTF(T("\n金スタ合計数 = %d", "\nTotal number of gold skulls = %d"),
gSaveContext.save.info.inventory.gsTokens);
digits[0] = digits[1] = 0;
digits[2] = gSaveContext.save.info.inventory.gsTokens;
@@ -2248,7 +2334,7 @@ void Message_Decode(PlayState* play) {
if (loadChar) {
Font_LoadChar(font, digits[i] + '0' - ' ', charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecoded[decodedBufPos] = digits[i] + '0';
+ MSG_BUF_DECODED[decodedBufPos] = digits[i] + '0';
PRINTF("%x(%x) ", digits[i] + '0' - ' ', digits[i]);
decodedBufPos++;
}
@@ -2268,27 +2354,37 @@ void Message_Decode(PlayState* play) {
if (i == 1 || digits[i] != 0) {
Font_LoadChar(font, digits[i] + '0' - ' ', charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecoded[decodedBufPos] = digits[i] + '0';
+ MSG_BUF_DECODED[decodedBufPos] = digits[i] + '0';
PRINTF("%x(%x) ", digits[i] + '0' - ' ', digits[i]);
decodedBufPos++;
}
}
decodedBufPos--;
} else if (curChar == MESSAGE_HIGHSCORE) {
- value = HIGH_SCORE((u8)font->msgBuf[++msgCtx->msgBufPos]);
- PRINTF(T("ランキング=%d\n", "Highscore=%d\n"), font->msgBuf[msgCtx->msgBufPos]);
- if ((font->msgBuf[msgCtx->msgBufPos] & 0xFF) == 2) {
+ value = HIGH_SCORE((u8)MSG_BUF[++msgCtx->msgBufPos]);
+ PRINTF(T("ランキング=%d\n", "Highscore=%d\n"), MSG_BUF[msgCtx->msgBufPos]);
+ if ((MSG_BUF[msgCtx->msgBufPos] & 0xFF) == HS_FISHING) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
value &= 0x7F;
} else {
+ //! @bug Should use msgBuf instead of msgBufWide (copy-paste error from Japanese text
+ //! handling?), and the mask is applied to the high score index instead of the high score value
+ //! so this always shows HIGH_SCORE(0). Only the PRINTF is wrong, the following line is correct.
+#if !PLATFORM_IQUE
PRINTF("HI_SCORE( kanfont->mbuff.nes_mes_buf[message->rdp] & 0xff000000 ) = %x\n",
- HIGH_SCORE(font->msgBufWide[msgCtx->msgBufPos] & 0xFF000000));
- value = ((HIGH_SCORE((u8)font->msgBuf[msgCtx->msgBufPos]) & 0xFF000000) >> 0x18) & 0x7F;
+ HIGH_SCORE(MSG_BUF_WIDE[msgCtx->msgBufPos] & 0xFF000000));
+#else
+ PRINTF("HI_SCORE( ((unsigned char*)(kanfont->mbuff.nes_mes_buf))[message->rdp] & 0xff000000 ) "
+ "= %x\n",
+ HIGH_SCORE(MSG_BUF_WIDE[msgCtx->msgBufPos] & 0xFF000000));
+#endif
+ value = ((HIGH_SCORE((u8)MSG_BUF[msgCtx->msgBufPos]) & 0xFF000000) >> 0x18);
+ value &= 0x7F;
}
value = SQ((f32)value) * 0.0036f + 0.5f;
PRINTF("score=%d\n", value);
}
- switch (font->msgBuf[msgCtx->msgBufPos] & 0xFF) {
+ switch (MSG_BUF[msgCtx->msgBufPos] & 0xFF) {
case HS_HBA:
case HS_POE_POINTS:
case HS_FISHING:
@@ -2315,7 +2411,7 @@ void Message_Decode(PlayState* play) {
}
if (loadChar) {
Font_LoadChar(font, digits[i] + '0' - ' ', charTexIdx);
- msgCtx->msgBufDecoded[decodedBufPos] = digits[i] + '0';
+ MSG_BUF_DECODED[decodedBufPos] = digits[i] + '0';
charTexIdx += FONT_CHAR_TEX_SIZE;
decodedBufPos++;
}
@@ -2346,17 +2442,17 @@ void Message_Decode(PlayState* play) {
for (i = 0; i < 4; i++) {
Font_LoadChar(font, digits[i] + '0' - ' ', charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecoded[decodedBufPos] = digits[i] + '0';
+ MSG_BUF_DECODED[decodedBufPos] = digits[i] + '0';
decodedBufPos++;
if (i == 1) {
Font_LoadChar(font, '"' - ' ', charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecoded[decodedBufPos] = '"';
+ MSG_BUF_DECODED[decodedBufPos] = '"';
decodedBufPos++;
} else if (i == 3) {
Font_LoadChar(font, '"' - ' ', charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecoded[decodedBufPos] = '"';
+ MSG_BUF_DECODED[decodedBufPos] = '"';
}
}
break;
@@ -2364,15 +2460,13 @@ void Message_Decode(PlayState* play) {
} else if (curChar == MESSAGE_TIME) {
PRINTF(T("\nゼルダ時間 = ", "\nZelda time = "));
digits[0] = 0;
- timeInSeconds = gSaveContext.save.dayTime * (24.0f * 60.0f / 0x10000);
-
- digits[1] = timeInSeconds / 60.0f;
+ digits[1] = (gSaveContext.save.dayTime * (24.0f * 60.0f / 0x10000)) / 60.0f;
while (digits[1] >= 10) {
digits[0]++;
digits[1] -= 10;
}
digits[2] = 0;
- digits[3] = (s16)timeInSeconds % 60;
+ digits[3] = (s16)(gSaveContext.save.dayTime * (24.0f * 60.0f / 0x10000)) % 60;
while (digits[3] >= 10) {
digits[2]++;
digits[3] -= 10;
@@ -2381,27 +2475,33 @@ void Message_Decode(PlayState* play) {
for (i = 0; i < 4; i++) {
Font_LoadChar(font, digits[i] + '0' - ' ', charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecoded[decodedBufPos] = digits[i] + '0';
+ MSG_BUF_DECODED[decodedBufPos] = digits[i] + '0';
decodedBufPos++;
if (i == 1) {
Font_LoadChar(font, ':' - ' ', charTexIdx);
charTexIdx += FONT_CHAR_TEX_SIZE;
- msgCtx->msgBufDecoded[decodedBufPos] = ':';
+ MSG_BUF_DECODED[decodedBufPos] = ':';
decodedBufPos++;
}
}
decodedBufPos--;
} else if (curChar == MESSAGE_ITEM_ICON) {
- msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[msgCtx->msgBufPos + 1];
- PRINTF("ITEM_NO=(%d) (%d)\n", msgCtx->msgBufDecoded[decodedBufPos],
- font->msgBuf[msgCtx->msgBufPos + 1]);
- Message_LoadItemIcon(play, font->msgBuf[msgCtx->msgBufPos + 1], R_TEXTBOX_Y + 10);
+ MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[msgCtx->msgBufPos + 1];
+ PRINTF("ITEM_NO=(%d) (%d)\n", MSG_BUF_DECODED[decodedBufPos], MSG_BUF[msgCtx->msgBufPos + 1]);
+ Message_LoadItemIcon(play, MSG_BUF[msgCtx->msgBufPos + 1], R_TEXTBOX_Y + 10);
} else if (curChar == MESSAGE_BACKGROUND) {
- msgCtx->textboxBackgroundIdx = font->msgBuf[msgCtx->msgBufPos + 1] * 2;
- msgCtx->textboxBackgroundForeColorIdx = (font->msgBuf[msgCtx->msgBufPos + 2] & 0xF0) >> 4;
- msgCtx->textboxBackgroundBackColorIdx = font->msgBuf[msgCtx->msgBufPos + 2] & 0xF;
- msgCtx->textboxBackgroundYOffsetIdx = (font->msgBuf[msgCtx->msgBufPos + 3] & 0xF0) >> 4;
- msgCtx->textboxBackgroundUnkArg = font->msgBuf[msgCtx->msgBufPos + 3] & 0xF;
+ msgCtx->textboxBackgroundIdx = MSG_BUF[msgCtx->msgBufPos + 1] * 2;
+#if OOT_VERSION < PAL_1_0
+ //! @bug Wrong shift amounts cause textboxBackgroundForeColorIdx and textboxBackgroundBackColorIdx
+ //! to always be 0. Fortunately MESSAGE_BACKGROUND is only present in unused messages.
+ msgCtx->textboxBackgroundForeColorIdx = (MSG_BUF[msgCtx->msgBufPos + 2] & 0xF0) >> 12;
+ msgCtx->textboxBackgroundBackColorIdx = (MSG_BUF[msgCtx->msgBufPos + 2] & 0xF) >> 8;
+#else
+ msgCtx->textboxBackgroundForeColorIdx = (MSG_BUF[msgCtx->msgBufPos + 2] & 0xF0) >> 4;
+ msgCtx->textboxBackgroundBackColorIdx = MSG_BUF[msgCtx->msgBufPos + 2] & 0xF;
+#endif
+ msgCtx->textboxBackgroundYOffsetIdx = (MSG_BUF[msgCtx->msgBufPos + 3] & 0xF0) >> 4;
+ msgCtx->textboxBackgroundUnkArg = MSG_BUF[msgCtx->msgBufPos + 3] & 0xF;
DMA_REQUEST_SYNC(msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE,
(uintptr_t)_message_texture_staticSegmentRomStart +
msgCtx->textboxBackgroundIdx * MESSAGE_TEXTURE_STATIC_TEX_SIZE,
@@ -2417,7 +2517,7 @@ void Message_Decode(PlayState* play) {
R_TEXT_INIT_XPOS = 50;
#endif
} else if (curChar == MESSAGE_COLOR) {
- msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[++msgCtx->msgBufPos];
+ MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[++msgCtx->msgBufPos];
} else if (curChar == MESSAGE_NEWLINE) {
numLines++;
} else if (curChar != MESSAGE_QUICKTEXT_ENABLE && curChar != MESSAGE_QUICKTEXT_DISABLE &&
@@ -2426,32 +2526,44 @@ void Message_Decode(PlayState* play) {
if (curChar == MESSAGE_FADE) {
sTextFade = true;
PRINTF("NZ_TIMER_END (key_off_flag=%d)\n", sTextFade);
- msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[++msgCtx->msgBufPos];
+ MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[++msgCtx->msgBufPos];
} else if (curChar == MESSAGE_FADE2) {
sTextFade = true;
PRINTF("NZ_BGM (key_off_flag=%d)\n", sTextFade);
- msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[++msgCtx->msgBufPos];
- msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[++msgCtx->msgBufPos];
+ MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[++msgCtx->msgBufPos];
+ MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[++msgCtx->msgBufPos];
} else if (curChar == MESSAGE_SHIFT || curChar == MESSAGE_TEXT_SPEED) {
- msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[++msgCtx->msgBufPos] & 0xFF;
+ MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[++msgCtx->msgBufPos] & 0xFF;
} else if (curChar == MESSAGE_SFX) {
- msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[++msgCtx->msgBufPos];
- msgCtx->msgBufDecoded[++decodedBufPos] = font->msgBuf[++msgCtx->msgBufPos];
+ MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[++msgCtx->msgBufPos];
+ MSG_BUF_DECODED[++decodedBufPos] = MSG_BUF[++msgCtx->msgBufPos];
} else if (curChar == MESSAGE_TWO_CHOICE) {
msgCtx->choiceNum = 2;
} else if (curChar == MESSAGE_THREE_CHOICE) {
msgCtx->choiceNum = 3;
} else if (curChar != MESSAGE_CHAR_SPACE) {
+#if !PLATFORM_IQUE
Font_LoadChar(font, curChar - ' ', charTexIdx);
+#else
+ u8 nextChar;
+
+ if (curChar == 0xAA) {
+ nextChar = MSG_BUF[++msgCtx->msgBufPos];
+ Font_LoadChar(font, nextChar - ' ', charTexIdx);
+ } else if (curChar >= 0xA0) {
+ nextChar = MSG_BUF[++msgCtx->msgBufPos];
+ Font_LoadCharCHN(font, ((curChar << 8) | nextChar) - 0xA001, charTexIdx);
+ } else {
+ Font_LoadChar(font, curChar - ' ', charTexIdx);
+ }
+#endif
charTexIdx += FONT_CHAR_TEX_SIZE;
}
}
decodedBufPos++;
msgCtx->msgBufPos++;
}
-#if OOT_NTSC
}
-#endif
}
void Message_OpenText(PlayState* play, u16 textId) {
@@ -2484,8 +2596,13 @@ void Message_OpenText(PlayState* play, u16 textId) {
#endif
} else {
R_TEXT_CHAR_SCALE = 75;
+#if !PLATFORM_IQUE
R_TEXT_LINE_SPACING = 12;
R_TEXT_INIT_XPOS = 65;
+#else
+ R_TEXT_LINE_SPACING = 16;
+ R_TEXT_INIT_XPOS = 60;
+#endif
}
if (textId == 0xC2 || textId == 0xFA) {
// Increments text id based on piece of heart count, assumes the piece of heart text is all
@@ -2507,9 +2624,9 @@ void Message_OpenText(PlayState* play, u16 textId) {
msgCtx->textId = textId;
if (textId == 0x2030) { // Talking to Ingo as adult in Lon Lon Ranch for the first time before freeing Epona
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("???????????????? z_message.c ??????????????????\n");
- PRINTF(VT_RST);
+ PRINTF_RST();
gSaveContext.eventInf[0] = gSaveContext.eventInf[1] = gSaveContext.eventInf[2] = gSaveContext.eventInf[3] = 0;
}
@@ -2520,11 +2637,11 @@ void Message_OpenText(PlayState* play, u16 textId) {
if ((B_80121220 != NULL) && (B_80121220->unk_60 != NULL) && B_80121220->unk_60(&play->msgCtx.font)) {
} else {
- DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_staff_message_data_staticSegmentRomStart + font->msgOffset,
- font->msgLength);
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_staff_message_data_staticSegmentRomStart + font->msgOffset,
+ font->msgLength, "../z_message_PAL.c", UNK_LINE);
}
#else
- DMA_REQUEST_SYNC(font->msgBuf, (uintptr_t)_staff_message_data_staticSegmentRomStart + font->msgOffset,
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_staff_message_data_staticSegmentRomStart + font->msgOffset,
font->msgLength, "../z_message_PAL.c", 1954);
#endif
} else {
@@ -2536,12 +2653,12 @@ void Message_OpenText(PlayState* play, u16 textId) {
if ((B_80121220 != NULL) && (B_80121220->unk_64 != NULL) && B_80121220->unk_64(&play->msgCtx.font)) {
} else {
- DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_jpn_message_data_staticSegmentRomStart + font->msgOffset,
- font->msgLength);
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_jpn_message_data_staticSegmentRomStart + font->msgOffset,
+ font->msgLength, "../z_message_PAL.c", UNK_LINE);
}
#else
- DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_jpn_message_data_staticSegmentRomStart + font->msgOffset,
- font->msgLength);
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_jpn_message_data_staticSegmentRomStart + font->msgOffset,
+ font->msgLength, "../z_message_PAL.c", UNK_LINE);
#endif
} else {
Message_FindMessageNES(play, textId);
@@ -2550,30 +2667,59 @@ void Message_OpenText(PlayState* play, u16 textId) {
if ((B_80121220 != NULL) && (B_80121220->unk_68 != NULL) && B_80121220->unk_68(&play->msgCtx.font)) {
} else {
- DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
- font->msgLength);
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
+ font->msgLength, "../z_message_PAL.c", UNK_LINE);
}
#else
- DmaMgr_RequestSync(font->msgBuf, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
- font->msgLength);
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
+ font->msgLength, "../z_message_PAL.c", UNK_LINE);
#endif
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {
Message_FindMessagePAL(play, textId);
msgCtx->msgLength = font->msgLength;
- DMA_REQUEST_SYNC(font->msgBuf, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
+#if PLATFORM_N64
+ if ((B_80121220 != NULL) && (B_80121220->unk_64 != NULL) && B_80121220->unk_64(&play->msgCtx.font)) {
+
+ } else {
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
+ font->msgLength, "../z_message_PAL.c", UNK_LINE);
+ }
+#else
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_nes_message_data_staticSegmentRomStart + font->msgOffset,
font->msgLength, "../z_message_PAL.c", 1966);
+#endif
} else if (gSaveContext.language == LANGUAGE_GER) {
Message_FindMessagePAL(play, textId);
msgCtx->msgLength = font->msgLength;
- DMA_REQUEST_SYNC(font->msgBuf, (uintptr_t)_ger_message_data_staticSegmentRomStart + font->msgOffset,
+#if PLATFORM_N64
+ //! @bug checks unk_64 != NULL instead of unk_68 != NULL
+ if ((B_80121220 != NULL) && (B_80121220->unk_64 != NULL) && B_80121220->unk_68(&play->msgCtx.font)) {
+
+ } else {
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_ger_message_data_staticSegmentRomStart + font->msgOffset,
+ font->msgLength, "../z_message_PAL.c", UNK_LINE);
+ }
+#else
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_ger_message_data_staticSegmentRomStart + font->msgOffset,
font->msgLength, "../z_message_PAL.c", 1978);
+#endif
} else {
Message_FindMessagePAL(play, textId);
msgCtx->msgLength = font->msgLength;
- DMA_REQUEST_SYNC(font->msgBuf, (uintptr_t)_fra_message_data_staticSegmentRomStart + font->msgOffset,
+#if PLATFORM_N64
+ //! @bug checks unk_64 != NULL instead of unk_6C_PAL != NULL
+ if ((B_80121220 != NULL) && (B_80121220->unk_64 != NULL) && B_80121220->unk_6C_PAL(&play->msgCtx.font)) {
+
+ } else {
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_fra_message_data_staticSegmentRomStart + font->msgOffset,
+ font->msgLength, "../z_message_PAL.c", UNK_LINE);
+ }
+#else
+ DMA_REQUEST_SYNC(MSG_BUF, (uintptr_t)_fra_message_data_staticSegmentRomStart + font->msgOffset,
font->msgLength, "../z_message_PAL.c", 1990);
+#endif
}
#endif
}
@@ -2620,9 +2766,9 @@ void Message_OpenText(PlayState* play, u16 textId) {
void Message_StartTextbox(PlayState* play, u16 textId, Actor* actor) {
MessageContext* msgCtx = &play->msgCtx;
- PRINTF(VT_FGCOL(BLUE));
+ PRINTF_COLOR_BLUE();
PRINTF(T("めっせーじ=%x(%d)\n", "Message=%x(%d)\n"), textId, actor);
- PRINTF(VT_RST);
+ PRINTF_RST();
msgCtx->ocarinaAction = 0xFFFF;
Message_OpenText(play, textId);
@@ -2634,15 +2780,15 @@ void Message_StartTextbox(PlayState* play, u16 textId, Actor* actor) {
}
void Message_ContinueTextbox(PlayState* play, u16 textId) {
- s32 pad;
MessageContext* msgCtx = &play->msgCtx;
+ InterfaceContext* interfaceCtx = &play->interfaceCtx;
#if PLATFORM_N64
s32 pad2[3];
#endif
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("めっせーじ=%x message->msg_data\n", "Message=%x message->msg_data\n"), textId, msgCtx->msgLength);
- PRINTF(VT_RST);
+ PRINTF_RST();
msgCtx->msgLength = 0;
Message_OpenText(play, textId);
@@ -2653,7 +2799,7 @@ void Message_ContinueTextbox(PlayState* play, u16 textId) {
msgCtx->textboxEndType = msgCtx->msgBufPos = msgCtx->unk_E3D0 = msgCtx->textDrawPos = msgCtx->textDelayTimer = 0;
msgCtx->textColorAlpha = 255;
- if (YREG(31) == 0 && play->interfaceCtx.unk_1FA == 0) {
+ if (YREG(31) == 0 && interfaceCtx->unk_1FA == 0) {
Interface_SetDoAction(play, DO_ACTION_NEXT);
}
msgCtx->textboxColorAlphaCurrent = msgCtx->textboxColorAlphaTarget;
@@ -2676,13 +2822,13 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
(1 << OCARINA_SONG_SCARECROW_SPAWN),
};
MessageContext* msgCtx = &play->msgCtx;
- s32 textId;
+ Font* font = &msgCtx->font;
s16 j;
s16 i;
s16 noStopDoAction;
s32 k;
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
for (i = sOcarinaSongBitFlags = 0; i <= (QUEST_SONG_STORMS - QUEST_SONG_MINUET); i++) {
if (CHECK_QUEST_ITEM(QUEST_SONG_MINUET + i)) {
@@ -2694,7 +2840,7 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
sOcarinaSongBitFlags |= (1 << OCARINA_SONG_SCARECROW_SPAWN);
}
PRINTF("ocarina_bit = %x\n", sOcarinaSongBitFlags);
- PRINTF(VT_RST);
+ PRINTF_RST();
sHasSunsSong = CHECK_QUEST_ITEM(QUEST_SONG_SUN);
msgCtx->ocarinaStaff = AudioOcarina_GetRecordingStaff();
@@ -2708,11 +2854,9 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
noStopDoAction = false;
if (ocarinaActionId >= 0x893) {
Message_OpenText(play, ocarinaActionId); // You played the [song name]
- textId = ocarinaActionId + 0x86E;
} else if (ocarinaActionId == OCARINA_ACTION_MEMORY_GAME) {
msgCtx->ocarinaAction = ocarinaActionId;
Message_OpenText(play, 0x86D); // Play using [A] and [C].
- textId = ocarinaActionId + 0x86E;
} else if (ocarinaActionId == OCARINA_ACTION_FREE_PLAY || ocarinaActionId >= OCARINA_ACTION_CHECK_SARIA) {
PRINTF("ocarina_set 000000000000000000 = %d\n", ocarinaActionId);
msgCtx->ocarinaAction = ocarinaActionId;
@@ -2722,10 +2866,8 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
}
if (ocarinaActionId == OCARINA_ACTION_SCARECROW_SPAWN_PLAYBACK) {
Message_OpenText(play, 0x86F); // Ocarina
- textId = ocarinaActionId + 0x86E;
} else {
Message_OpenText(play, 0x86E); // Play using [A] and [C]; [B] to Stop.
- textId = ocarinaActionId + 0x86E;
}
} else {
msgCtx->ocarinaAction = ocarinaActionId;
@@ -2733,15 +2875,14 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
if (ocarinaActionId >= OCARINA_ACTION_PLAYBACK_MINUET) {
PRINTF("222222222\n");
Message_OpenText(play, 0x86D); // Play using [A] and [C].
- textId = ocarinaActionId + 0x86E;
} else {
PRINTF("333333333\n");
- textId = ocarinaActionId + 0x86E;
- Message_OpenText(play, textId); // Play using [A] and [C]; [B] to Stop.
+ Message_OpenText(play, ocarinaActionId + 0x86E); // Play using [A] and [C]; [B] to Stop.
}
}
msgCtx->talkActor = NULL;
- PRINTF(T("オカリナモード = %d (%x)\n", "Ocarina Mode = %d (%x)\n"), msgCtx->ocarinaAction, textId);
+ PRINTF(T("オカリナモード = %d (%x)\n", "Ocarina Mode = %d (%x)\n"), msgCtx->ocarinaAction,
+ ocarinaActionId + 0x86E);
msgCtx->textDelayTimer = 0;
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
R_TEXTBOX_X = 34;
@@ -2751,12 +2892,14 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
R_TEXTBOX_WIDTH = 256;
R_TEXTBOX_HEIGHT = 64;
msgCtx->stateTimer = 0;
- if (YREG(12) != 0) {
+ // NOLINTBEGIN
+ if (YREG(12) != 0)
msgCtx->msgMode = MSGMODE_TEXT_NEXT_MSG;
- } else {
+ else {
msgCtx->stateTimer = 2;
msgCtx->msgMode = MSGMODE_TEXT_CONTINUING;
}
+ // NOLINTEND
msgCtx->textboxColorAlphaCurrent = msgCtx->textboxColorAlphaTarget;
if (!noStopDoAction) {
Interface_LoadActionLabelB(play, DO_ACTION_STOP);
@@ -2781,8 +2924,7 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
- sOcarinaButtonIndexBufPos = sOcarinaButtonIndexBufLen = 0;
- msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos;
+ msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = sOcarinaButtonIndexBufLen = 0;
Message_ResetOcarinaNoteState();
msgCtx->stateTimer = 3;
msgCtx->msgMode = MSGMODE_SCARECROW_LONG_PLAYBACK;
@@ -2790,8 +2932,9 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) {
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
}
- for (k = 0, j = 0; j < 48; j++, k += FONT_CHAR_TEX_SIZE) {
- Font_LoadCharWide(&play->msgCtx.font, MESSAGE_WIDE_CHAR_SPACE, k);
+ for (k = 0, j = 0; j < 48; j++) {
+ Font_LoadCharWide(font, MESSAGE_WIDE_CHAR_SPACE, k);
+ k += FONT_CHAR_TEX_SIZE;
}
}
@@ -2862,6 +3005,10 @@ void Message_DrawTextBox(PlayState* play, Gfx** p) {
G_TX_NOLOD, G_TX_NOLOD);
}
+#if PLATFORM_IQUE
+ R_TEXTBOX_TEXHEIGHT = 442;
+#endif
+
gSPTextureRectangle(gfx++, R_TEXTBOX_X << 2, R_TEXTBOX_Y << 2, (R_TEXTBOX_X + R_TEXTBOX_WIDTH) << 2,
(R_TEXTBOX_Y + R_TEXTBOX_HEIGHT) << 2, G_TX_RENDERTILE, 0, 0, R_TEXTBOX_TEXWIDTH << 1,
R_TEXTBOX_TEXHEIGHT << 1);
@@ -2933,18 +3080,18 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
NA_BGM_OCA_NOCTURNE, NA_BGM_OCA_LIGHT, NA_BGM_OCA_SARIA, NA_BGM_OCA_EPONA,
NA_BGM_OCA_ZELDA, NA_BGM_OCA_SUNS, NA_BGM_OCA_TIME, NA_BGM_OCA_STORM,
};
- InterfaceContext* interfaceCtx = &play->interfaceCtx;
MessageContext* msgCtx = &play->msgCtx;
- u16 buttonIndexPos;
+ InterfaceContext* interfaceCtx = &play->interfaceCtx;
+ Font* font = &msgCtx->font;
Player* player = GET_PLAYER(play);
- s32 pad;
+ Input* input = &play->state.input[0];
Gfx* gfx = *p;
s16 r;
s16 g;
s16 b;
u16 i;
u16 notePosX;
- u16 pad1;
+ u16 buttonIndexPos;
u16 j;
gSPSegment(gfx++, 0x02, play->interfaceCtx.parameterSegment);
@@ -2973,8 +3120,9 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
break;
case MSGMODE_TEXT_CONTINUING:
if (msgCtx->stateTimer == 1) {
- for (j = 0, i = 0; i < 48; i++, j += FONT_CHAR_TEX_SIZE) {
- Font_LoadCharWide(&play->msgCtx.font, MESSAGE_WIDE_CHAR_SPACE, j);
+ for (j = 0, i = 0; i < 48; i++) {
+ Font_LoadCharWide(font, MESSAGE_WIDE_CHAR_SPACE, j);
+ j += FONT_CHAR_TEX_SIZE;
}
DRAW_TEXT(play, &gfx, sTextIsCredits);
}
@@ -2996,8 +3144,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->ocarinaStaff->pos = sOcarinaButtonIndexBufPos = 0;
play->msgCtx.ocarinaMode = OCARINA_MODE_01;
Message_ResetOcarinaNoteState();
- sOcarinaNoteFlashTimer = 3;
sOcarinaNoteFlashColorIndex = 1;
+ sOcarinaNoteFlashTimer = 3;
if (msgCtx->msgMode == MSGMODE_OCARINA_STARTING) {
if (msgCtx->ocarinaAction == OCARINA_ACTION_UNK_0 ||
msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY ||
@@ -3033,10 +3181,14 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
case MSGMODE_OCARINA_PLAYING:
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (msgCtx->ocarinaStaff->pos) {
+#if DEBUG_FEATURES
PRINTF("locate=%d onpu_pt=%d\n", msgCtx->ocarinaStaff->pos, sOcarinaButtonIndexBufPos);
+#endif
+#if OOT_VERSION >= PAL_1_0
if (msgCtx->ocarinaStaff->pos == 1 && sOcarinaButtonIndexBufPos == 8) {
sOcarinaButtonIndexBufPos = 0;
}
+#endif
if (sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1) {
msgCtx->lastOcarinaButtonIndex = sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos - 1] =
msgCtx->ocarinaStaff->buttonIndex;
@@ -3122,7 +3274,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
msgCtx->stateTimer = 10;
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
- } else if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B)) {
+ } else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
Message_CloseTextbox(play);
@@ -3313,11 +3465,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->stateTimer--;
if (msgCtx->stateTimer == 0) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("Na_StopOcarinaMode();\n");
PRINTF("Na_StopOcarinaMode();\n");
PRINTF("Na_StopOcarinaMode();\n");
- PRINTF(VT_RST);
+ PRINTF_RST();
Message_Decode(play);
msgCtx->msgMode = MSGMODE_SETUP_DISPLAY_SONG_PLAYED;
msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
@@ -3405,7 +3557,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->disableWarpSongs || interfaceCtx->restrictions.warpSongs == 3) {
Message_StartTextbox(play, 0x88C, NULL); // "You can't warp here!"
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
- } else if (GET_EVENTINF_HORSES_STATE() != EVENTINF_HORSES_STATE_1) {
+ } else if (GET_EVENTINF_INGO_RACE_STATE() != INGO_RACE_STATE_HORSE_RENTAL_PERIOD) {
Message_StartTextbox(play, msgCtx->lastPlayedSong + 0x88D,
NULL); // "Warp to [place name]?"
play->msgCtx.ocarinaMode = OCARINA_MODE_01;
@@ -3417,7 +3569,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->lastPlayedSong == OCARINA_SONG_EPONAS) {
R_EPONAS_SONG_PLAYED = true;
}
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("☆☆☆ocarina=%d message->ocarina_no=%d ", msgCtx->lastPlayedSong,
msgCtx->ocarinaAction);
if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY_DONE) {
@@ -3426,16 +3578,17 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
play->msgCtx.ocarinaMode = OCARINA_MODE_0B;
}
} else if (msgCtx->ocarinaAction >= OCARINA_ACTION_CHECK_MINUET) {
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("Ocarina_PC_Wind=%d(%d) ☆☆☆ ", OCARINA_ACTION_CHECK_MINUET,
msgCtx->ocarinaAction - OCARINA_ACTION_CHECK_MINUET);
- if (msgCtx->lastPlayedSong == (msgCtx->ocarinaAction - OCARINA_ACTION_CHECK_MINUET)) {
+ // NOLINTBEGIN
+ if (msgCtx->lastPlayedSong == (msgCtx->ocarinaAction - OCARINA_ACTION_CHECK_MINUET))
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
- } else {
+ else
play->msgCtx.ocarinaMode = msgCtx->lastPlayedSong - 1;
- }
+ // NOLINTEND
} else {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("Ocarina_C_Wind=%d(%d) ☆☆☆ ", OCARINA_ACTION_PLAYBACK_MINUET,
msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET);
if (msgCtx->lastPlayedSong == (msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET)) {
@@ -3444,7 +3597,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
}
}
- PRINTF(VT_RST);
+ PRINTF_RST();
PRINTF("→ OCARINA_MODE=%d\n", play->msgCtx.ocarinaMode);
}
}
@@ -3453,11 +3606,12 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
case MSGMODE_SONG_DEMONSTRATION:
msgCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (msgCtx->ocarinaStaff->state == 0) {
- if (msgCtx->msgMode == MSGMODE_DISPLAY_SONG_PLAYED) {
+ // NOLINTBEGIN
+ if (msgCtx->msgMode == MSGMODE_DISPLAY_SONG_PLAYED)
msgCtx->msgMode = MSGMODE_DISPLAY_SONG_PLAYED_TEXT_BEGIN;
- } else {
+ else
msgCtx->msgMode = MSGMODE_SONG_DEMONSTRATION_DONE;
- }
+ // NOLINTEND
PRINTF("onpu_buff[%d]=%x\n", msgCtx->ocarinaStaff->pos,
sOcarinaButtonIndexBuf[msgCtx->ocarinaStaff->pos]);
} else {
@@ -3490,10 +3644,10 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->lastPlayedSong = msgCtx->ocarinaStaff->state;
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_SUCCESS;
Item_Give(play, ITEM_SONG_MINUET + gOcarinaSongItemMap[msgCtx->ocarinaStaff->state]);
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("z_message.c 取得メロディ=%d\n", "z_message.c Song Acquired = %d\n"),
ITEM_SONG_MINUET + msgCtx->ocarinaStaff->state);
- PRINTF(VT_RST);
+ PRINTF_RST();
msgCtx->stateTimer = 20;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -3528,7 +3682,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
if (sOcarinaButtonIndexBufLen >= 8) {
- for (buttonIndexPos = sOcarinaButtonIndexBufLen - 8, i = 0; i < 8; i++, buttonIndexPos++) {
+ for (i = 0, buttonIndexPos = sOcarinaButtonIndexBufLen - 8; i < 8; i++, buttonIndexPos++) {
sOcarinaButtonIndexBuf[buttonIndexPos] = sOcarinaButtonIndexBuf[buttonIndexPos + 1];
}
sOcarinaButtonIndexBufLen--;
@@ -3544,8 +3698,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
sOcarinaButtonIndexBufPos = 0;
}
}
- if (msgCtx->ocarinaStaff->state == OCARINA_RECORD_OFF ||
- CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B)) {
+ if (msgCtx->ocarinaStaff->state == OCARINA_RECORD_OFF || CHECK_BTN_ALL(input->press.button, BTN_B)) {
if (sOcarinaButtonIndexBufLen != 0) {
PRINTF(T("録音終了!!!!!!!!! message->info->status=%d \n",
"Recording complete!!!!!!!!! message->info->status=%d \n"),
@@ -3561,14 +3714,14 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
Message_CloseTextbox(play);
PRINTF(
T("録音終了!!!!!!!!!録音終了\n", "Recording complete!!!!!!!!! Recording Complete\n"));
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("\n====================================================================\n");
MemCpy(gSaveContext.save.info.scarecrowLongSong, gScarecrowLongSongPtr,
sizeof(gSaveContext.save.info.scarecrowLongSong));
for (i = 0; i < ARRAY_COUNT(gSaveContext.save.info.scarecrowLongSong); i++) {
PRINTF("%d, ", gSaveContext.save.info.scarecrowLongSong[i]);
}
- PRINTF(VT_RST);
+ PRINTF_RST();
PRINTF("\n====================================================================\n");
}
DRAW_TEXT(play, &gfx, false);
@@ -3579,7 +3732,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (((u32)msgCtx->ocarinaStaff->pos != 0) &&
(sOcarinaButtonIndexBufPos == msgCtx->ocarinaStaff->pos - 1)) {
if (sOcarinaButtonIndexBufLen >= 8) {
- for (buttonIndexPos = sOcarinaButtonIndexBufLen - 8, i = 0; i < 8; i++, buttonIndexPos++) {
+ for (i = 0, buttonIndexPos = sOcarinaButtonIndexBufLen - 8; i < 8; i++, buttonIndexPos++) {
sOcarinaButtonIndexBuf[buttonIndexPos] = sOcarinaButtonIndexBuf[buttonIndexPos + 1];
}
sOcarinaButtonIndexBufLen--;
@@ -3626,17 +3779,17 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_DONE;
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("\n====================================================================\n");
MemCpy(gSaveContext.save.info.scarecrowSpawnSong, gScarecrowSpawnSongPtr,
sizeof(gSaveContext.save.info.scarecrowSpawnSong));
for (i = 0; i < ARRAY_COUNT(gSaveContext.save.info.scarecrowSpawnSong); i++) {
PRINTF("%d, ", gSaveContext.save.info.scarecrowSpawnSong[i]);
}
- PRINTF(VT_RST);
+ PRINTF_RST();
PRINTF("\n====================================================================\n");
} else if (msgCtx->ocarinaStaff->state == OCARINA_RECORD_REJECTED ||
- CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B)) {
+ CHECK_BTN_ALL(input->press.button, BTN_B)) {
PRINTF(T("すでに存在する曲吹いた!!! \n", "Played an existing song!!! \n"));
AudioOcarina_SetRecordingState(OCARINA_RECORD_OFF);
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
@@ -3824,7 +3977,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->msgMode == MSGMODE_SONG_PLAYBACK) {
g = msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET;
r = gOcarinaSongButtons[g].numButtons;
- for (notePosX = R_OCARINA_BUTTONS_XPOS, i = 0; i < r; i++, notePosX += R_OCARINA_BUTTONS_XPOS_OFFSET) {
+ for (notePosX = R_OCARINA_BUTTONS_XPOS, i = 0; i < r; i++) {
gDPPipeSync(gfx++);
gDPSetPrimColor(gfx++, 0, 0, 150, 150, 150, 150);
gDPSetEnvColor(gfx++, 10, 10, 10, 0);
@@ -3838,19 +3991,20 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
(notePosX + 16) << 2,
(R_OCARINA_BUTTONS_YPOS(gOcarinaSongButtons[g].buttonsIndex[i]) + 16) << 2,
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+ notePosX += R_OCARINA_BUTTONS_XPOS_OFFSET;
}
}
if (msgCtx->msgMode != MSGMODE_SCARECROW_LONG_RECORDING_START &&
msgCtx->msgMode != MSGMODE_MEMORY_GAME_START) {
- for (notePosX = R_OCARINA_BUTTONS_XPOS, i = 0; i < 8; i++, notePosX += R_OCARINA_BUTTONS_XPOS_OFFSET) {
+ for (notePosX = R_OCARINA_BUTTONS_XPOS, i = 0; i < 8; i++) {
if (sOcarinaButtonIndexBuf[i] == OCARINA_BTN_INVALID) {
break;
}
if (1) {}
if (sOcarinaButtonAlphaValues[i] != 255) {
- sOcarinaButtonAlphaValues[i] += VREG(50);
+ sOcarinaButtonAlphaValues[i] += R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP;
if (sOcarinaButtonAlphaValues[i] >= 255) {
sOcarinaButtonAlphaValues[i] = 255;
}
@@ -3875,6 +4029,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
(notePosX + 16) << 2,
(R_OCARINA_BUTTONS_YPOS(sOcarinaButtonIndexBuf[i]) + 16) << 2, G_TX_RENDERTILE,
0, 0, 1 << 10, 1 << 10);
+ notePosX += R_OCARINA_BUTTONS_XPOS_OFFSET;
}
}
}
@@ -3882,7 +4037,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
*p = gfx;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
/**
* 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
@@ -3942,13 +4097,13 @@ void Message_Draw(PlayState* play) {
#if OOT_VERSION < GC_US
s32 pad;
#endif
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s16 watchVar;
#endif
OPEN_DISPS(play->state.gfxCtx, "../z_message_PAL.c", 3554);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
watchVar = gSaveContext.save.info.scarecrowLongSongSet;
Message_DrawDebugVariableChanged(&watchVar, play->state.gfxCtx);
if (BREG(0) != 0 && play->msgCtx.textId != 0) {
@@ -3993,8 +4148,10 @@ void Message_Update(PlayState* play) {
};
#if OOT_VERSION < GC_US
static s32 sUnknown = 0;
+#elif PLATFORM_IQUE
+ static u16 sUnknown = 0;
#endif
- static u8 D_80153D74 = 0;
+ static char D_80153D74 = 0;
MessageContext* msgCtx = &play->msgCtx;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
Player* player = GET_PLAYER(play);
@@ -4005,10 +4162,13 @@ void Message_Update(PlayState* play) {
s16 playerFocusScreenPosY;
s16 actorFocusScreenPosY;
#if OOT_VERSION < GC_US
- s32 pad[2];
+ s32 pad1;
+#endif
+#if OOT_NTSC && OOT_VERSION < GC_US
+ s32 pad2;
#endif
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BREG(0) != 0) {
static u16 sMessageDebuggerTextboxCount = 0;
@@ -4105,9 +4265,9 @@ void Message_Update(PlayState* play) {
R_TEXTBOX_Y_TARGET = sTextboxLowerYPositions[var];
}
+#if OOT_NTSC && !PLATFORM_IQUE
R_TEXTBOX_X_TARGET = sTextboxXPositions[var];
R_TEXTBOX_END_YPOS = sTextboxEndIconYOffset[var] + R_TEXTBOX_Y_TARGET;
-#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN && !sTextIsCredits) {
R_TEXT_CHOICE_YPOS(0) = R_TEXTBOX_Y_TARGET + 7;
R_TEXT_CHOICE_YPOS(1) = R_TEXTBOX_Y_TARGET + 25;
@@ -4118,11 +4278,28 @@ void Message_Update(PlayState* play) {
R_TEXT_CHOICE_YPOS(1) = R_TEXTBOX_Y_TARGET + 32;
R_TEXT_CHOICE_YPOS(2) = R_TEXTBOX_Y_TARGET + 44;
}
-#else
+#elif OOT_PAL
+ R_TEXTBOX_X_TARGET = sTextboxXPositions[var];
+ R_TEXTBOX_END_YPOS = sTextboxEndIconYOffset[var] + R_TEXTBOX_Y_TARGET;
R_TEXT_CHOICE_YPOS(0) = R_TEXTBOX_Y_TARGET + 20;
R_TEXT_CHOICE_YPOS(1) = R_TEXTBOX_Y_TARGET + 32;
R_TEXT_CHOICE_YPOS(2) = R_TEXTBOX_Y_TARGET + 44;
+#elif PLATFORM_IQUE
+ R_TEXTBOX_END_YPOS = sTextboxEndIconYOffset[var] + R_TEXTBOX_Y_TARGET;
+ R_TEXTBOX_Y_TARGET -= 10;
+ R_TEXTBOX_X_TARGET = sTextboxXPositions[var];
+ if (gSaveContext.language == LANGUAGE_JPN && !sTextIsCredits) {
+ R_TEXT_CHOICE_YPOS(0) = R_TEXTBOX_Y_TARGET + 7;
+ R_TEXT_CHOICE_YPOS(1) = R_TEXTBOX_Y_TARGET + 25;
+ R_TEXT_CHOICE_YPOS(2) = R_TEXTBOX_Y_TARGET + 43;
+
+ } else {
+ R_TEXT_CHOICE_YPOS(0) = R_TEXTBOX_Y_TARGET + 23;
+ R_TEXT_CHOICE_YPOS(1) = R_TEXTBOX_Y_TARGET + 39;
+ R_TEXT_CHOICE_YPOS(2) = R_TEXTBOX_Y_TARGET + 55;
+ }
#endif
+
PRINTF("message->msg_disp_type=%x\n", msgCtx->textBoxProperties & 0xF0);
if (msgCtx->textBoxType == TEXTBOX_TYPE_NONE_BOTTOM ||
msgCtx->textBoxType == TEXTBOX_TYPE_NONE_NO_SHADOW) {
@@ -4168,7 +4345,7 @@ void Message_Update(PlayState* play) {
break;
case MSGMODE_TEXT_DISPLAYING:
if (msgCtx->textBoxType != TEXTBOX_TYPE_NONE_BOTTOM && YREG(31) == 0 &&
- CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B) && !msgCtx->textUnskippable) {
+ CHECK_BTN_ALL(input->press.button, BTN_B) && !msgCtx->textUnskippable) {
sTextboxSkipped = true;
msgCtx->textDrawPos = msgCtx->decodedTextLen;
}
@@ -4205,7 +4382,7 @@ void Message_Update(PlayState* play) {
if (Message_ShouldAdvance(play)) {
PRINTF("OCARINA_MODE=%d -> ", play->msgCtx.ocarinaMode);
play->msgCtx.ocarinaMode = (msgCtx->choiceIndex == 0) ? OCARINA_MODE_02 : OCARINA_MODE_04;
- PRINTF("InRaceSeq=%d(%d) OCARINA_MODE=%d --> ", GET_EVENTINF_HORSES_STATE(), 1,
+ PRINTF("InRaceSeq=%d(%d) OCARINA_MODE=%d --> ", GET_EVENTINF_INGO_RACE_STATE(), 1,
play->msgCtx.ocarinaMode);
Message_CloseTextbox(play);
PRINTF("OCARINA_MODE=%d\n", play->msgCtx.ocarinaMode);
@@ -4217,7 +4394,7 @@ void Message_Update(PlayState* play) {
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN && !sTextIsCredits) {
- Message_ContinueTextbox(play, msgCtx->msgBufDecodedWide[msgCtx->textDrawPos]);
+ Message_ContinueTextbox(play, MSG_BUF_DECODED_WIDE[msgCtx->textDrawPos]);
} else {
Message_ContinueTextbox(play, sNextTextId);
}
@@ -4247,7 +4424,7 @@ void Message_Update(PlayState* play) {
gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL;
}
if (play->csCtx.state == 0) {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("day_time=%x active_camera=%d ", gSaveContext.save.cutsceneIndex, play->activeCamId);
if (msgCtx->textId != 0x2061 && msgCtx->textId != 0x2025 && msgCtx->textId != 0x208C &&
@@ -4265,7 +4442,7 @@ void Message_Update(PlayState* play) {
}
}
}
- PRINTF(VT_RST);
+ PRINTF_RST();
msgCtx->msgLength = 0;
msgCtx->msgMode = MSGMODE_NONE;
interfaceCtx->unk_1FA = interfaceCtx->unk_1FC = 0;
@@ -4289,7 +4466,7 @@ void Message_Update(PlayState* play) {
// Later, if the ocarina has not been played and another textbox is closed, this handling
// for Saria's song will be carried out.
player->naviTextId = -0xE0;
- player->naviActor->flags |= ACTOR_FLAG_16;
+ player->naviActor->flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY_DONE &&
(play->msgCtx.ocarinaMode == OCARINA_MODE_01 || play->msgCtx.ocarinaMode == OCARINA_MODE_0B)) {
@@ -4323,9 +4500,14 @@ void Message_SetTables(void) {
sStaffMessageEntryTablePtr = sStaffMessageEntryTable;
-#if PLATFORM_N64
+#if PLATFORM_N64 && OOT_NTSC
if ((B_80121220 != NULL) && (B_80121220->unk_58 != NULL)) {
B_80121220->unk_58(&sJpnMessageEntryTablePtr, &sNesMessageEntryTablePtr, &sStaffMessageEntryTablePtr);
}
+#elif PLATFORM_N64 && OOT_PAL
+ if ((B_80121220 != NULL) && (B_80121220->unk_58 != NULL)) {
+ B_80121220->unk_58(&sNesMessageEntryTablePtr, &sGerMessageEntryTablePtr, &sFraMessageEntryTablePtr,
+ &sStaffMessageEntryTablePtr);
+ }
#endif
}
diff --git a/src/code/z_moji.c b/src/code/z_moji.c
index c9cbbdda88..e26ce68e7f 100644
--- a/src/code/z_moji.c
+++ b/src/code/z_moji.c
@@ -2,7 +2,8 @@
* Unused. A very simple utility for drawing text on screen.
*/
-#include "global.h"
+#include "gfx.h"
+#include "printf.h"
// how big to draw the characters on screen
#define DISP_CHAR_WIDTH 8
diff --git a/src/code/z_nulltask.c b/src/code/z_nulltask.c
index 1f7dae689e..42ba3d86f9 100644
--- a/src/code/z_nulltask.c
+++ b/src/code/z_nulltask.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "ultra64.h"
+#include "sched.h"
/**
* Blocks the current thread until all queued scheduler tasks have completed.
diff --git a/src/code/z_olib.c b/src/code/z_olib.c
index 298f151e2c..66c767f68b 100644
--- a/src/code/z_olib.c
+++ b/src/code/z_olib.c
@@ -1,5 +1,6 @@
#include "z64math.h"
#include "libc64/math64.h"
+#include "z64olib.h"
#include "z_lib.h"
/**
diff --git a/src/code/z_onepointdemo.c b/src/code/z_onepointdemo.c
index a3e1111138..640c2ab1f8 100644
--- a/src/code/z_onepointdemo.c
+++ b/src/code/z_onepointdemo.c
@@ -1,6 +1,18 @@
-#include "global.h"
+#include "one_point_cutscene.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "printf.h"
#include "quake.h"
+#include "sfx.h"
#include "terminal.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64olib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
#include "overlays/actors/ovl_En_Sw/z_en_sw.h"
static s16 sDisableAttention = false;
@@ -1858,7 +1870,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
Play_RequestCameraSetting(play, subCamId, CAM_SET_CS_3);
Player_SetCsActionWithHaltedActors(play, &player->actor, PLAYER_CSACTION_5);
OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C);
+#if OOT_VERSION >= PAL_1_0
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
+#endif
OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos);
OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_8012021C[D_801202FC - 2].pos);
D_8012013C[D_801202FC - 3].pos.x +=
@@ -1874,10 +1888,22 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
D_8012021C[D_801202FC - 3].pos.z +=
(D_8012021C[D_801202FC - 2].pos.z - D_8012021C[D_801202FC - 3].pos.z) / 2;
+#if OOT_VERSION < PAL_1_0
+ i = Quake_Request(subCam, QUAKE_TYPE_1);
+ Quake_SetSpeed(i, 30000);
+ Quake_SetPerturbations(i, 3, 1, 1, 0);
+ Quake_SetDuration(i, D_80120300);
+
+ i = Quake_Request(mainCam, QUAKE_TYPE_3);
+ Quake_SetSpeed(i, 30000);
+ Quake_SetPerturbations(i, 3, 1, 1, 0);
+ Quake_SetDuration(i, D_80120300 + 50);
+#else
i = Quake_Request(mainCam, QUAKE_TYPE_3);
Quake_SetSpeed(i, 30000);
Quake_SetPerturbations(i, 2, 1, 1, 0);
Quake_SetDuration(i, 200);
+#endif
break;
}
@@ -5240,7 +5266,7 @@ s32 OnePointCutscene_Attention(PlayState* play, Actor* actor) {
s32 temp2;
s32 timer;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (sDisableAttention) {
PRINTF(VT_COL(YELLOW, BLACK) "actor attention demo camera: canceled by other camera\n" VT_RST);
return CAM_ID_NONE;
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c
index b1bbf7c8a3..b6d5c911a2 100644
--- a/src/code/z_parameter.c
+++ b/src/code/z_parameter.c
@@ -1,6 +1,30 @@
-#include "global.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "controller.h"
+#include "flag_set.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "language_array.h"
+#include "main.h"
+#include "map.h"
+#include "printf.h"
+#include "regs.h"
+#include "segment_symbols.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
#include "versions.h"
+#include "z64audio.h"
+#include "z64lifemeter.h"
+#include "z64horse.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/textures/parameter_static/parameter_static.h"
#include "assets/textures/do_action_static/do_action_static.h"
#include "assets/textures/icon_item_static/icon_item_static.h"
@@ -632,15 +656,15 @@ void Interface_UpdateHudAlphas(PlayState* play, s16 dimmingAlpha) {
break;
}
- if ((play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_1) && (interfaceCtx->minimapAlpha >= 255)) {
+ if ((play->roomCtx.curRoom.type == ROOM_TYPE_DUNGEON) && (interfaceCtx->minimapAlpha >= 255)) {
interfaceCtx->minimapAlpha = 255;
}
}
void func_80083108(PlayState* play) {
- MessageContext* msgCtx = &play->msgCtx;
- Player* player = GET_PLAYER(play);
InterfaceContext* interfaceCtx = &play->interfaceCtx;
+ Player* player = GET_PLAYER(play);
+ MessageContext* msgCtx = &play->msgCtx;
s16 i;
s16 sp28 = false;
@@ -790,7 +814,7 @@ void func_80083108(PlayState* play) {
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
}
- } else if (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_1) {
+ } else if (GET_EVENTINF_INGO_RACE_STATE() == INGO_RACE_STATE_HORSE_RENTAL_PERIOD) {
if (player->stateFlags1 & PLAYER_STATE1_23) {
if ((gSaveContext.save.info.equips.buttonItems[0] != ITEM_NONE) &&
(gSaveContext.save.info.equips.buttonItems[0] != ITEM_BOW)) {
@@ -851,7 +875,7 @@ void func_80083108(PlayState* play) {
(gSaveContext.save.info.equips.buttonItems[0] == ITEM_BOMBCHU) ||
(gSaveContext.save.info.equips.buttonItems[0] == ITEM_NONE)) {
if ((gSaveContext.save.info.equips.buttonItems[0] != ITEM_NONE) ||
- (gSaveContext.save.info.infTable[INFTABLE_1DX_INDEX] == 0)) {
+ (gSaveContext.save.info.infTable[INFTABLE_INDEX_1DX] == 0)) {
gSaveContext.save.info.equips.buttonItems[0] = gSaveContext.buttonStatus[0];
sp28 = true;
@@ -875,7 +899,7 @@ void func_80083108(PlayState* play) {
(gSaveContext.save.info.equips.buttonItems[0] == ITEM_BOMBCHU) ||
(gSaveContext.save.info.equips.buttonItems[0] == ITEM_NONE)) {
if ((gSaveContext.save.info.equips.buttonItems[0] != ITEM_NONE) ||
- (gSaveContext.save.info.infTable[INFTABLE_1DX_INDEX] == 0)) {
+ (gSaveContext.save.info.infTable[INFTABLE_INDEX_1DX] == 0)) {
gSaveContext.save.info.equips.buttonItems[0] = gSaveContext.buttonStatus[0];
sp28 = true;
@@ -1099,7 +1123,9 @@ void Interface_SetSceneRestrictions(PlayState* play) {
InterfaceContext* interfaceCtx = &play->interfaceCtx;
s16 i = 0;
u8 sceneId;
- s32 pad[3];
+ s32 pad1;
+ s32 pad2;
+ s32 pad3;
interfaceCtx->restrictions.all = 0;
interfaceCtx->restrictions.dinsNayrus = 0;
@@ -1134,7 +1160,7 @@ void Interface_SetSceneRestrictions(PlayState* play) {
interfaceCtx->restrictions.dinsNayrus = (sRestrictionFlags[i].flags3 & 0x0C) >> 2;
interfaceCtx->restrictions.all = (sRestrictionFlags[i].flags3 & 0x03) >> 0;
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("parameter->button_status = %x,%x,%x\n", sRestrictionFlags[i].flags1, sRestrictionFlags[i].flags2,
sRestrictionFlags[i].flags3);
PRINTF("h_gage=%d, b_button=%d, a_button=%d, c_bottle=%d\n", interfaceCtx->restrictions.hGauge,
@@ -1146,8 +1172,8 @@ void Interface_SetSceneRestrictions(PlayState* play) {
PRINTF("c_sunmoon=%d, m_wind=%d, m_magic=%d, another=%d\n", interfaceCtx->restrictions.sunsSong,
interfaceCtx->restrictions.farores, interfaceCtx->restrictions.dinsNayrus,
interfaceCtx->restrictions.all);
- PRINTF(VT_RST);
- return;
+ PRINTF_RST();
+ break;
}
i++;
} while (sRestrictionFlags[i].sceneId != 0xFF);
@@ -1277,7 +1303,7 @@ void Inventory_SwapAgeEquipment(void) {
}
}
- shieldEquipValue = gEquipMasks[EQUIP_TYPE_SHIELD] & gSaveContext.save.info.equips.equipment;
+ shieldEquipValue = gSaveContext.save.info.equips.equipment & gEquipMasks[EQUIP_TYPE_SHIELD];
if (shieldEquipValue) {
shieldEquipValue >>= gEquipShifts[EQUIP_TYPE_SHIELD];
if (!CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SHIELD, shieldEquipValue - 1)) {
@@ -1345,7 +1371,7 @@ void func_80084BF4(PlayState* play, u16 flag) {
}
} else if (gSaveContext.save.info.equips.buttonItems[0] == ITEM_NONE) {
if ((gSaveContext.save.info.equips.buttonItems[0] != ITEM_NONE) ||
- (gSaveContext.save.info.infTable[INFTABLE_1DX_INDEX] == 0)) {
+ (gSaveContext.save.info.infTable[INFTABLE_INDEX_1DX] == 0)) {
gSaveContext.save.info.equips.buttonItems[0] = gSaveContext.buttonStatus[0];
Interface_LoadItemIcon1(play, 0);
}
@@ -1375,57 +1401,57 @@ u8 Item_Give(PlayState* play, u8 item) {
slot = SLOT(sExtraItemBases[item - ITEM_DEKU_STICKS_5]);
}
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("item_get_setting=%d pt=%d z=%x\n", item, slot, gSaveContext.save.info.inventory.items[slot]);
- PRINTF(VT_RST);
+ PRINTF_RST();
if ((item >= ITEM_MEDALLION_FOREST) && (item <= ITEM_MEDALLION_LIGHT)) {
gSaveContext.save.info.inventory.questItems |= gBitFlags[item - ITEM_MEDALLION_FOREST + QUEST_MEDALLION_FOREST];
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("封印 = %x\n", "Seals = %x\n"), gSaveContext.save.info.inventory.questItems);
- PRINTF(VT_RST);
+ PRINTF_RST();
if (item == ITEM_MEDALLION_WATER) {
- func_8006D0AC(play);
+ Horse_FixLakeHyliaPosition(play);
}
return ITEM_NONE;
} else if ((item >= ITEM_SONG_MINUET) && (item <= ITEM_SONG_STORMS)) {
gSaveContext.save.info.inventory.questItems |= gBitFlags[item - ITEM_SONG_MINUET + QUEST_SONG_MINUET];
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("楽譜 = %x\n", "Musical scores = %x\n"), gSaveContext.save.info.inventory.questItems);
PRINTF(T("楽譜 = %x (%x) (%x)\n", "Musical scores = %x (%x) (%x)\n"),
gSaveContext.save.info.inventory.questItems, gBitFlags[item - ITEM_SONG_MINUET + QUEST_SONG_MINUET],
gBitFlags[item - ITEM_SONG_MINUET]);
- PRINTF(VT_RST);
+ PRINTF_RST();
return ITEM_NONE;
} else if ((item >= ITEM_KOKIRI_EMERALD) && (item <= ITEM_ZORA_SAPPHIRE)) {
gSaveContext.save.info.inventory.questItems |= gBitFlags[item - ITEM_KOKIRI_EMERALD + QUEST_KOKIRI_EMERALD];
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("精霊石 = %x\n", "Spiritual Stones = %x\n"), gSaveContext.save.info.inventory.questItems);
- PRINTF(VT_RST);
+ PRINTF_RST();
return ITEM_NONE;
} else if ((item == ITEM_STONE_OF_AGONY) || (item == ITEM_GERUDOS_CARD)) {
gSaveContext.save.info.inventory.questItems |= gBitFlags[item - ITEM_STONE_OF_AGONY + QUEST_STONE_OF_AGONY];
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("アイテム = %x\n", "Items = %x\n"), gSaveContext.save.info.inventory.questItems);
- PRINTF(VT_RST);
+ PRINTF_RST();
return ITEM_NONE;
} else if (item == ITEM_SKULL_TOKEN) {
gSaveContext.save.info.inventory.questItems |= gBitFlags[item - ITEM_SKULL_TOKEN + QUEST_SKULL_TOKEN];
gSaveContext.save.info.inventory.gsTokens++;
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("Nコイン = %x(%d)\n", "N Coins = %x(%d)\n"), gSaveContext.save.info.inventory.questItems,
gSaveContext.save.info.inventory.gsTokens);
- PRINTF(VT_RST);
+ PRINTF_RST();
return ITEM_NONE;
} else if ((item >= ITEM_SWORD_KOKIRI) && (item <= ITEM_SWORD_BIGGORON)) {
@@ -1640,8 +1666,7 @@ u8 Item_Give(PlayState* play, u8 item) {
AMMO(ITEM_BOMBCHU) = 10;
return ITEM_NONE;
} else {
- AMMO(ITEM_BOMBCHU) += 10;
- if (AMMO(ITEM_BOMBCHU) > 50) {
+ if ((AMMO(ITEM_BOMBCHU) += 10) > 50) {
AMMO(ITEM_BOMBCHU) = 50;
}
return ITEM_NONE;
@@ -1652,8 +1677,7 @@ u8 Item_Give(PlayState* play, u8 item) {
AMMO(ITEM_BOMBCHU) += sBombchuRefillCounts[item - ITEM_BOMBCHUS_5];
return ITEM_NONE;
} else {
- AMMO(ITEM_BOMBCHU) += sBombchuRefillCounts[item - ITEM_BOMBCHUS_5];
- if (AMMO(ITEM_BOMBCHU) > 50) {
+ if ((AMMO(ITEM_BOMBCHU) += sBombchuRefillCounts[item - ITEM_BOMBCHUS_5]) > 50) {
AMMO(ITEM_BOMBCHU) = 50;
}
return ITEM_NONE;
@@ -1733,12 +1757,16 @@ u8 Item_Give(PlayState* play, u8 item) {
Health_ChangeBy(play, 0x10);
return item;
} else if (item == ITEM_MAGIC_JAR_SMALL) {
+ // Magic_Fill is only used to store the magicState.
+ // Setting the state to FILL gets immediately overwritten in Magic_RequestChange.
+ // I.e. magic is added not filled.
+#if OOT_VERSION < PAL_1_0
+ Magic_Fill(play);
+#else
if (gSaveContext.magicState != MAGIC_STATE_ADD) {
- // This function is only used to store the magicState.
- // Setting the state to FILL gets immediately overwritten in Magic_RequestChange.
- // I.e. magic is added not filled
Magic_Fill(play);
}
+#endif
Magic_RequestChange(play, 12, MAGIC_ADD);
@@ -1749,12 +1777,16 @@ u8 Item_Give(PlayState* play, u8 item) {
return item;
} else if (item == ITEM_MAGIC_JAR_BIG) {
+ // Magic_Fill is only used to store the magicState.
+ // Setting the state to FILL gets immediately overwritten in Magic_RequestChange.
+ // I.e. magic is added not filled.
+#if OOT_VERSION < PAL_1_0
+ Magic_Fill(play);
+#else
if (gSaveContext.magicState != MAGIC_STATE_ADD) {
- // This function is only used to store the magicState.
- // Setting the state to FILL gets immediately overwritten in Magic_RequestChange.
- // I.e. magic is added not filled.
Magic_Fill(play);
}
+#endif
Magic_RequestChange(play, 24, MAGIC_ADD);
@@ -1792,15 +1824,15 @@ u8 Item_Give(PlayState* play, u8 item) {
gSaveContext.save.info.equips.cButtonSlots[0], gSaveContext.save.info.equips.cButtonSlots[1],
gSaveContext.save.info.equips.cButtonSlots[2], temp + i, item);
- if ((temp + i) == gSaveContext.save.info.equips.cButtonSlots[0]) {
+ if (gSaveContext.save.info.equips.cButtonSlots[0] == temp + i) {
gSaveContext.save.info.equips.buttonItems[1] = item;
Interface_LoadItemIcon2(play, 1);
gSaveContext.buttonStatus[1] = BTN_ENABLED;
- } else if ((temp + i) == gSaveContext.save.info.equips.cButtonSlots[1]) {
+ } else if (gSaveContext.save.info.equips.cButtonSlots[1] == temp + i) {
gSaveContext.save.info.equips.buttonItems[2] = item;
Interface_LoadItemIcon2(play, 2);
gSaveContext.buttonStatus[2] = BTN_ENABLED;
- } else if ((temp + i) == gSaveContext.save.info.equips.cButtonSlots[2]) {
+ } else if (gSaveContext.save.info.equips.cButtonSlots[2] == temp + i) {
gSaveContext.save.info.equips.buttonItems[3] = item;
Interface_LoadItemIcon1(play, 3);
gSaveContext.buttonStatus[3] = BTN_ENABLED;
@@ -1820,7 +1852,8 @@ u8 Item_Give(PlayState* play, u8 item) {
}
} else if ((item >= ITEM_WEIRD_EGG) && (item <= ITEM_CLAIM_CHECK)) {
if (item == ITEM_POACHERS_SAW) {
- SET_ITEMGETINF(ITEMGETINF_1F);
+ //! @bug Setting this shared flag makes getting the Deku Nut upgrade impossible
+ SET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_NUT_UPGRADE);
}
temp = INV_CONTENT(item);
@@ -1828,7 +1861,7 @@ u8 Item_Give(PlayState* play, u8 item) {
if (temp != ITEM_NONE) {
for (i = 1; i < 4; i++) {
- if (temp == gSaveContext.save.info.equips.buttonItems[i]) {
+ if (gSaveContext.save.info.equips.buttonItems[i] == temp) {
if (item != ITEM_SOLD_OUT) {
gSaveContext.save.info.equips.buttonItems[i] = item;
Interface_LoadItemIcon1(play, i);
@@ -1859,9 +1892,9 @@ u8 Item_CheckObtainability(u8 item) {
slot = SLOT(sExtraItemBases[item - ITEM_DEKU_STICKS_5]);
}
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("item_get_non_setting=%d pt=%d z=%x\n", item, slot, gSaveContext.save.info.inventory.items[slot]);
- PRINTF(VT_RST);
+ PRINTF_RST();
if ((item >= ITEM_MEDALLION_FOREST) && (item <= ITEM_MEDALLION_LIGHT)) {
return ITEM_NONE;
@@ -2007,7 +2040,7 @@ s32 Inventory_ReplaceItem(PlayState* play, u16 oldItem, u16 newItem) {
if (gSaveContext.save.info.equips.buttonItems[i] == oldItem) {
gSaveContext.save.info.equips.buttonItems[i] = newItem;
Interface_LoadItemIcon1(play, i);
- break;
+ return true;
}
}
return true;
@@ -2110,12 +2143,19 @@ void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 l
action += DO_ACTION_MAX;
}
+#if OOT_VERSION >= PAL_1_0
if (gSaveContext.language == 2) { // LANGUAGE_FRA for PAL versions
action += DO_ACTION_MAX;
}
+#endif
- if ((action != DO_ACTION_NONE) && (action != DO_ACTION_MAX + DO_ACTION_NONE) &&
- (action != 2 * DO_ACTION_MAX + DO_ACTION_NONE)) {
+#if OOT_VERSION < PAL_1_0
+ if ((action != 0 * DO_ACTION_MAX + DO_ACTION_NONE) && (action != 1 * DO_ACTION_MAX + DO_ACTION_NONE))
+#else
+ if ((action != 0 * DO_ACTION_MAX + DO_ACTION_NONE) && (action != 1 * DO_ACTION_MAX + DO_ACTION_NONE) &&
+ (action != 2 * DO_ACTION_MAX + DO_ACTION_NONE))
+#endif
+ {
osCreateMesgQueue(&interfaceCtx->loadQueue, &interfaceCtx->loadMsg, 1);
DMA_REQUEST_ASYNC(&interfaceCtx->dmaRequest_160,
interfaceCtx->doActionSegment + (loadOffset * DO_ACTION_TEX_SIZE),
@@ -2123,7 +2163,7 @@ void Interface_LoadActionLabel(InterfaceContext* interfaceCtx, u16 action, s16 l
DO_ACTION_TEX_SIZE, 0, &interfaceCtx->loadQueue, NULL, "../z_parameter.c", 2145);
osRecvMesg(&interfaceCtx->loadQueue, NULL, OS_MESG_BLOCK);
} else {
- gSegments[7] = VIRTUAL_TO_PHYSICAL(interfaceCtx->doActionSegment);
+ gSegments[7] = OS_K0_TO_PHYSICAL(interfaceCtx->doActionSegment);
func_80086D5C(SEGMENTED_TO_VIRTUAL(sDoActionTextures[loadOffset]), DO_ACTION_TEX_SIZE / 4);
}
}
@@ -2174,9 +2214,11 @@ void Interface_LoadActionLabelB(PlayState* play, u16 action) {
action += DO_ACTION_MAX;
}
+#if OOT_VERSION >= PAL_1_0
if (gSaveContext.language == 2) { // LANGUAGE_FRA for PAL versions
action += DO_ACTION_MAX;
}
+#endif
interfaceCtx->unk_1FC = action;
@@ -2194,7 +2236,7 @@ void Interface_LoadActionLabelB(PlayState* play, u16 action) {
*/
s32 Health_ChangeBy(PlayState* play, s16 amount) {
u16 heartCount;
- u16 healthLevel;
+ UNUSED_NDEBUG u16 healthLevel;
PRINTF(T("***** 増減=%d (now=%d, max=%d) ***", "***** Fluctuation=%d (now=%d, max=%d) ***"), amount,
gSaveContext.save.info.playerData.health, gSaveContext.save.info.playerData.healthCapacity);
@@ -2330,6 +2372,8 @@ void Magic_Reset(PlayState* play) {
* @return false if the request failed
*/
s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
+ InterfaceContext* interfaceCtx = &play->interfaceCtx;
+
if (!gSaveContext.save.info.playerData.isMagicAcquired) {
return false;
}
@@ -2381,7 +2425,7 @@ s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type) {
case MAGIC_CONSUME_LENS:
if (gSaveContext.magicState == MAGIC_STATE_IDLE) {
if (gSaveContext.save.info.playerData.magic != 0) {
- play->interfaceCtx.lensMagicConsumptionTimer = 80;
+ interfaceCtx->lensMagicConsumptionTimer = 80;
gSaveContext.magicState = MAGIC_STATE_CONSUME_LENS;
return true;
} else {
@@ -2438,8 +2482,8 @@ void Magic_Update(PlayState* play) {
static s16 sMagicBorderIndices[] = { 0, 1, 1, 0 };
static s16 sMagicBorderRatio = 2;
static s16 sMagicBorderStep = 1;
- MessageContext* msgCtx = &play->msgCtx;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
+ MessageContext* msgCtx = &play->msgCtx;
s16 borderChangeR;
s16 borderChangeG;
s16 borderChangeB;
@@ -2450,7 +2494,7 @@ void Magic_Update(PlayState* play) {
// Step magicCapacity to the capacity determined by magicLevel
// This changes the width of the magic meter drawn
temp = gSaveContext.save.info.playerData.magicLevel * MAGIC_NORMAL_METER;
- if (gSaveContext.magicCapacity != temp) {
+ if (temp != gSaveContext.magicCapacity) {
if (gSaveContext.magicCapacity < temp) {
gSaveContext.magicCapacity += 8;
if (gSaveContext.magicCapacity > temp) {
@@ -2640,11 +2684,12 @@ void Magic_DrawMeter(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_parameter.c", 2650);
if (gSaveContext.save.info.playerData.magicLevel != 0) {
- if (gSaveContext.save.info.playerData.healthCapacity > 0xA0) {
+ // NOLINTBEGIN
+ if (gSaveContext.save.info.playerData.healthCapacity > 0xA0)
magicMeterY = R_MAGIC_METER_Y_LOWER; // two rows of hearts
- } else {
+ else
magicMeterY = R_MAGIC_METER_Y_HIGHER; // one row of hearts
- }
+ // NOLINTEND
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
@@ -2660,8 +2705,8 @@ void Magic_DrawMeter(PlayState* play) {
gDPLoadTextureBlock(OVERLAY_DISP++, gMagicMeterEndTex, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 16, 0,
G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 3, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
- gSPTextureRectangle(OVERLAY_DISP++, (R_MAGIC_METER_X + gSaveContext.magicCapacity + 8) << 2, magicMeterY << 2,
- (R_MAGIC_METER_X + gSaveContext.magicCapacity + 16) << 2, (magicMeterY + 16) << 2,
+ gSPTextureRectangle(OVERLAY_DISP++, (R_MAGIC_METER_X + 8 + gSaveContext.magicCapacity) << 2, magicMeterY << 2,
+ (R_MAGIC_METER_X + 8 + gSaveContext.magicCapacity + 8) << 2, (magicMeterY + 16) << 2,
G_TX_RENDERTILE, 256, 0, 1 << 10, 1 << 10);
gDPPipeSync(OVERLAY_DISP++);
@@ -2765,7 +2810,9 @@ void Interface_DrawActionLabel(GraphicsContext* gfxCtx, void* texture) {
void Interface_DrawItemButtons(PlayState* play) {
static void* cUpLabelTextures[] = LANGUAGE_ARRAY(gNaviCUpJPNTex, gNaviCUpENGTex, gNaviCUpENGTex, gNaviCUpENGTex);
+#if OOT_VERSION >= PAL_1_0
static s16 startButtonLeftPos[] = { 132, 130, 130 };
+#endif
InterfaceContext* interfaceCtx = &play->interfaceCtx;
Player* player = GET_PLAYER(play);
PauseContext* pauseCtx = &play->pauseCtx;
@@ -2817,13 +2864,17 @@ void Interface_DrawItemButtons(PlayState* play) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, START_BUTTON_R, START_BUTTON_G, START_BUTTON_B,
interfaceCtx->startAlpha);
-#if OOT_NTSC
- gSPTextureRectangle(OVERLAY_DISP++, 132 << 2, 17 << 2, (132 + 22) << 2, 39 << 2, G_TX_RENDERTILE, 0, 0,
- (s32)(1.4277344 * (1 << 10)), (s32)(1.4277344 * (1 << 10)));
+#if OOT_VERSION < PAL_1_0
+ gSPTextureRectangle(OVERLAY_DISP++, R_START_BTN_X << 2, R_START_BTN_Y << 2, (R_START_BTN_X + 22) << 2,
+ (R_START_BTN_Y + 22) << 2, G_TX_RENDERTILE, 0, 0, (s32)(1.4277344 * (1 << 10)),
+ (s32)(1.4277344 * (1 << 10)));
+#elif OOT_NTSC
+ gSPTextureRectangle(OVERLAY_DISP++, 132 << 2, 17 << 2, (132 + 22) << 2, (17 + 22) << 2, G_TX_RENDERTILE, 0,
+ 0, (s32)(1.4277344 * (1 << 10)), (s32)(1.4277344 * (1 << 10)));
#else
gSPTextureRectangle(OVERLAY_DISP++, startButtonLeftPos[gSaveContext.language] << 2, 17 << 2,
- (startButtonLeftPos[gSaveContext.language] + 22) << 2, 39 << 2, G_TX_RENDERTILE, 0, 0,
- (s32)(1.4277344 * (1 << 10)), (s32)(1.4277344 * (1 << 10)));
+ (startButtonLeftPos[gSaveContext.language] + 22) << 2, (17 + 22) << 2, G_TX_RENDERTILE,
+ 0, 0, (s32)(1.4277344 * (1 << 10)), (s32)(1.4277344 * (1 << 10)));
#endif
gDPPipeSync(OVERLAY_DISP++);
@@ -2885,12 +2936,20 @@ void Interface_DrawItemButtons(PlayState* play) {
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
+#if !PLATFORM_IQUE
gDPLoadTextureBlock_4b(OVERLAY_DISP++, cUpLabelTextures[gSaveContext.language], G_IM_FMT_IA, 32, 8, 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);
-
gSPTextureRectangle(OVERLAY_DISP++, R_C_UP_ICON_X << 2, R_C_UP_ICON_Y << 2, (R_C_UP_ICON_X + 32) << 2,
(R_C_UP_ICON_Y + 8) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+#else
+ gDPLoadTextureBlock_4b(OVERLAY_DISP++, cUpLabelTextures[gSaveContext.language], G_IM_FMT_IA, 48, 16, 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);
+ gSPTextureRectangle(OVERLAY_DISP++, (R_C_UP_ICON_X - 8) << 2, (R_C_UP_ICON_Y - 4) << 2,
+ (R_C_UP_ICON_X + 40) << 2, (R_C_UP_ICON_Y + 12) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
+ 1 << 10);
+#endif
}
sCUpTimer--;
@@ -2981,7 +3040,9 @@ void Interface_DrawAmmoCount(PlayState* play, s16 button, s16 alpha) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 100, 100, alpha);
}
- for (i = 0; ammo >= 10; i++) {
+ i = 0;
+ while (ammo >= 10) {
+ i++;
ammo -= 10;
}
@@ -3391,7 +3452,7 @@ void Interface_Draw(PlayState* play) {
gSPSegment(OVERLAY_DISP++, 0x08, pauseCtx->iconItemSegment);
Gfx_SetupDL_42Overlay(play->state.gfxCtx);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
- gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(OVERLAY_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
// PAUSE_CURSOR_QUAD_4
pauseCtx->cursorVtx[16].v.ob[0] = pauseCtx->cursorVtx[18].v.ob[0] = pauseCtx->equipAnimX / 10;
@@ -3421,15 +3482,16 @@ void Interface_Draw(PlayState* play) {
pauseCtx->cursorVtx[16].v.ob[0] = pauseCtx->cursorVtx[18].v.ob[0] =
pauseCtx->cursorVtx[16].v.ob[0] - svar1;
pauseCtx->cursorVtx[17].v.ob[0] = pauseCtx->cursorVtx[19].v.ob[0] =
- pauseCtx->cursorVtx[16].v.ob[0] + svar1 * 2 + 32;
+ pauseCtx->cursorVtx[16].v.ob[0] + 32 + svar1 * 2;
pauseCtx->cursorVtx[16].v.ob[1] = pauseCtx->cursorVtx[17].v.ob[1] =
pauseCtx->cursorVtx[16].v.ob[1] + svar1;
pauseCtx->cursorVtx[18].v.ob[1] = pauseCtx->cursorVtx[19].v.ob[1] =
- pauseCtx->cursorVtx[16].v.ob[1] - svar1 * 2 - 32;
+ pauseCtx->cursorVtx[16].v.ob[1] - 32 - svar1 * 2;
}
gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[PAUSE_CURSOR_QUAD_4 * 4], 4, 0);
- gDPLoadTextureBlock(OVERLAY_DISP++, gMagicArrowEquipEffectTex, G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0,
+ gDPLoadTextureBlock(OVERLAY_DISP++, gMagicArrowEquipEffectTex, G_IM_FMT_IA, G_IM_SIZ_8b,
+ gMagicArrowEquipEffectTex_WIDTH, gMagicArrowEquipEffectTex_HEIGHT, 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);
}
@@ -3519,10 +3581,13 @@ void Interface_Draw(PlayState* play) {
// Revert any spoiling trade quest items
for (svar1 = 0; svar1 < ARRAY_COUNT(gSpoilingItems); svar1++) {
if (INV_CONTENT(ITEM_TRADE_ADULT) == gSpoilingItems[svar1]) {
- gSaveContext.eventInf[EVENTINF_HORSES_INDEX] &=
- (u16) ~(EVENTINF_HORSES_STATE_MASK | EVENTINF_HORSES_HORSETYPE_MASK | EVENTINF_HORSES_05_MASK |
- EVENTINF_HORSES_06_MASK | EVENTINF_HORSES_0F_MASK);
- PRINTF("EVENT_INF=%x\n", gSaveContext.eventInf[EVENTINF_HORSES_INDEX]);
+#if OOT_VERSION >= NTSC_1_1
+ gSaveContext.eventInf[EVENTINF_INDEX_HORSES] &=
+ (u16) ~(EVENTINF_INGO_RACE_STATE_MASK | EVENTINF_MASK(EVENTINF_INGO_RACE_HORSETYPE) |
+ EVENTINF_MASK(EVENTINF_INGO_RACE_LOST_ONCE) |
+ EVENTINF_MASK(EVENTINF_INGO_RACE_SECOND_RACE) | EVENTINF_MASK(EVENTINF_INGO_RACE_0F));
+ PRINTF("EVENT_INF=%x\n", gSaveContext.eventInf[EVENTINF_INDEX_HORSES]);
+#endif
play->nextEntranceIndex = spoilingItemEntrances[svar1];
INV_CONTENT(gSpoilingItemReverts[svar1]) = gSpoilingItemReverts[svar1];
@@ -3626,8 +3691,7 @@ void Interface_Draw(PlayState* play) {
}
if ((gSaveContext.timerState >= TIMER_STATE_ENV_HAZARD_MOVE) && (msgCtx->msgLength == 0)) {
- sTimerNextSecondTimer--;
- if (sTimerNextSecondTimer == 0) {
+ if (--sTimerNextSecondTimer == 0) {
if (gSaveContext.timerSeconds != 0) {
gSaveContext.timerSeconds--;
}
@@ -3822,7 +3886,12 @@ void Interface_Draw(PlayState* play) {
gSaveContext.subTimerSeconds--;
PRINTF("TOTAL_EVENT_TM=%d\n", gSaveContext.subTimerSeconds);
- if (gSaveContext.subTimerSeconds <= 0) {
+#if OOT_VERSION < PAL_1_0
+ if (gSaveContext.subTimerSeconds == 0)
+#else
+ if (gSaveContext.subTimerSeconds <= 0)
+#endif
+ {
// Out of time
if (!Flags_GetSwitch(play, 0x37) ||
((play->sceneId != SCENE_GANON_BOSS) &&
@@ -3956,7 +4025,7 @@ void Interface_Draw(PlayState* play) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (pauseCtx->debugState == 3) {
FlagSet_Update(play);
}
@@ -3975,14 +4044,14 @@ void Interface_Draw(PlayState* play) {
void Interface_Update(PlayState* play) {
static u8 D_80125B60 = false;
static s16 sPrevTimeSpeed = 0;
- MessageContext* msgCtx = &play->msgCtx;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
+ MessageContext* msgCtx = &play->msgCtx;
Player* player = GET_PLAYER(play);
s16 dimmingAlpha;
s16 risingAlpha;
u16 action;
-#if OOT_DEBUG
+#if OOT_PAL && DEBUG_FEATURES
{
Input* debugInput = &play->state.input[2];
@@ -4244,13 +4313,13 @@ void Interface_Update(PlayState* play) {
if (gSaveContext.save.info.playerData.isMagicAcquired && (gSaveContext.save.info.playerData.magicLevel == 0)) {
gSaveContext.save.info.playerData.magicLevel = gSaveContext.save.info.playerData.isDoubleMagicAcquired + 1;
gSaveContext.magicState = MAGIC_STATE_STEP_CAPACITY;
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("魔法スター─────ト!!!!!!!!!\n", "Magic Start!!!!!!!!!\n"));
PRINTF("MAGIC_MAX=%d\n", gSaveContext.save.info.playerData.magicLevel);
PRINTF("MAGIC_NOW=%d\n", gSaveContext.save.info.playerData.magic);
PRINTF("Z_MAGIC_NOW_NOW=%d\n", gSaveContext.magicFillTarget);
PRINTF("Z_MAGIC_NOW_MAX=%d\n", gSaveContext.magicCapacity);
- PRINTF(VT_RST);
+ PRINTF_RST();
}
Magic_Update(play);
@@ -4338,8 +4407,7 @@ void Interface_Update(PlayState* play) {
gTimeSpeed = sPrevTimeSpeed;
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
}
- } else if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_1) &&
- (interfaceCtx->restrictions.sunsSong != 3)) {
+ } else if ((play->roomCtx.curRoom.type != ROOM_TYPE_DUNGEON) && (interfaceCtx->restrictions.sunsSong != 3)) {
if ((gSaveContext.save.dayTime >= CLOCK_TIME(6, 30)) &&
(gSaveContext.save.dayTime < CLOCK_TIME(18, 0) + 1)) {
gSaveContext.nextDayTime = NEXT_TIME_NIGHT;
@@ -4362,9 +4430,11 @@ void Interface_Update(PlayState* play) {
play->nextEntranceIndex = gSaveContext.save.entranceIndex;
play->transitionTrigger = TRANS_TRIGGER_START;
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
+#if OOT_VERSION >= PAL_1_0
func_800F6964(30);
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.natureAmbienceId = NATURE_ID_DISABLED;
+#endif
} else {
gSaveContext.sunsSongState = SUNSSONG_SPECIAL;
}
diff --git a/src/code/z_path.c b/src/code/z_path.c
index d27530eb3a..29b51a8f17 100644
--- a/src/code/z_path.c
+++ b/src/code/z_path.c
@@ -1,4 +1,9 @@
-#include "global.h"
+#include "ultra64.h"
+#include "libc64/math64.h"
+#include "segmented_address.h"
+#include "z64actor.h"
+#include "z64path.h"
+#include "z64play.h"
Path* Path_GetByIndex(PlayState* play, s16 index, s16 max) {
Path* path;
diff --git a/src/code/z_play.c b/src/code/z_play.c
index 99bb024681..d4d28422c3 100644
--- a/src/code/z_play.c
+++ b/src/code/z_play.c
@@ -1,29 +1,67 @@
-
-#include "global.h"
+#include "libc64/malloc.h"
+#include "libc64/qrand.h"
+#include "libu64/debug.h"
+#include "array_count.h"
+#include "buffers.h"
+#include "color.h"
+#include "controller.h"
#include "fault.h"
-#include "quake.h"
-#include "terminal.h"
-#include "versions.h"
+#include "file_select_state.h"
+#include "gfx.h"
+#include "gfxalloc.h"
+#include "kaleido_manager.h"
+#include "letterbox.h"
+#include "line_numbers.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
-
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "quake.h"
+#include "regs.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "title_setup_state.h"
+#include "transition_circle.h"
+#include "transition_fade.h"
+#include "transition_tile.h"
+#include "transition_triforce.h"
+#include "transition_wipe.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_actor_dlftbls.h"
+#include "zelda_arena.h"
+#include "z64audio.h"
+#include "z64cutscene_flags.h"
+#include "z64debug_display.h"
+#include "z64effect.h"
#include "z64frame_advance.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "z64vis.h"
-#pragma increment_block_number "gc-eu:8 gc-eu-mq:8 gc-jp:8 gc-jp-ce:8 gc-jp-mq:8 gc-us:8 gc-us-mq:8"
+#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 ique-cn:224" \
+ "ntsc-1.0:240 ntsc-1.1:240 ntsc-1.2:240 pal-1.0:240 pal-1.1:240"
TransitionTile gTransitionTile;
s32 gTransitionTileState;
VisMono gPlayVisMono;
Color_RGBA8_u32 gVisMonoColor;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
FaultClient D_801614B8;
#endif
s16 sTransitionFillTimer;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* gDebugCutsceneScript = NULL;
UNK_TYPE D_8012D1F4 = 0; // unused
#endif
@@ -34,7 +72,7 @@ void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn);
// This macro prints the number "1" with a file and line number if R_ENABLE_PLAY_LOGS is enabled.
// For example, it can be used to trace the play state execution at a high level.
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define PLAY_LOG(line) \
do { \
if (R_ENABLE_PLAY_LOGS) { \
@@ -176,15 +214,7 @@ void Play_SetupTransition(PlayState* this, s32 transitionType) {
break;
default:
-#if PLATFORM_N64
- HUNGUP_AND_CRASH("../z_play.c", 2269);
-#elif OOT_VERSION < GC_EU_MQ_DBG
- HUNGUP_AND_CRASH("../z_play.c", 2287);
-#elif OOT_VERSION < GC_JP_CE
- HUNGUP_AND_CRASH("../z_play.c", 2290);
-#else
- HUNGUP_AND_CRASH("../z_play.c", 2293);
-#endif
+ HUNGUP_AND_CRASH("../z_play.c", LN5(2263, 2266, 2269, 2272, 2282, 2287, 2290, 2293));
break;
}
}
@@ -248,7 +278,7 @@ void Play_Destroy(GameState* thisx) {
}
#endif
-#if OOT_DEBUG
+#if DEBUG_FEATURES
Fault_RemoveClient(&D_801614B8);
#endif
}
@@ -272,7 +302,7 @@ void Play_Init(GameState* thisx) {
return;
}
-#if OOT_DEBUG
+#if PLATFORM_GC && DEBUG_FEATURES
SystemArena_Display();
#endif
@@ -307,7 +337,7 @@ void Play_Init(GameState* thisx) {
Camera_OverwriteStateFlags(&this->mainCamera, CAM_STATE_CHECK_BG_ALT | CAM_STATE_CHECK_WATER | CAM_STATE_CHECK_BG |
CAM_STATE_EXTERNAL_FINISHED | CAM_STATE_CAM_FUNC_FINISH |
CAM_STATE_LOCK_MODE | CAM_STATE_DISTORTION | CAM_STATE_PLAY_INIT);
- Sram_Init(this, &this->sramCtx);
+ Sram_Init(&this->state, &this->sramCtx);
Regs_InitData(this);
Message_Init(this);
GameOver_Init(this);
@@ -462,7 +492,7 @@ void Play_Init(GameState* thisx) {
PRINTF(T("ゼルダヒープ %08x-%08x\n", "Zelda Heap %08x-%08x\n"), zAllocAligned,
(u8*)zAllocAligned + zAllocSize - (s32)(zAllocAligned - zAlloc));
-#if OOT_DEBUG
+#if PLATFORM_GC && DEBUG_FEATURES
Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL);
#endif
@@ -477,8 +507,9 @@ void Play_Init(GameState* thisx) {
Camera_InitDataUsingPlayer(&this->mainCamera, player);
Camera_RequestMode(&this->mainCamera, CAM_MODE_NORMAL);
- playerStartBgCamIndex = PARAMS_GET_U(player->actor.params, 0, 8);
- if (playerStartBgCamIndex != 0xFF) {
+ playerStartBgCamIndex = PLAYER_GET_START_BG_CAM_INDEX(&player->actor);
+
+ if (playerStartBgCamIndex != PLAYER_START_BG_CAM_DEFAULT) {
PRINTF("player has start camera ID (" VT_FGCOL(BLUE) "%d" VT_RST ")\n", playerStartBgCamIndex);
Camera_RequestBgCam(&this->mainCamera, playerStartBgCamIndex);
}
@@ -495,11 +526,11 @@ void Play_Init(GameState* thisx) {
Environment_PlaySceneSequence(this);
gSaveContext.seqId = this->sceneSequences.seqId;
gSaveContext.natureAmbienceId = this->sceneSequences.natureAmbienceId;
- func_8002DF18(this, GET_PLAYER(this));
+ Actor_InitPlayerHorse(this, GET_PLAYER(this));
AnimTaskQueue_Update(this, &this->animTaskQueue);
gSaveContext.respawnFlag = 0;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (R_USE_DEBUG_CUTSCENE) {
static u64 sDebugCutsceneScriptBuf[0xA00];
@@ -518,10 +549,12 @@ void Play_Update(PlayState* this) {
s32 isPaused;
s32 pad1;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if ((SREG(1) < 0) || (DREG(0) != 0)) {
SREG(1) = 0;
+#if PLATFORM_GC
ZeldaArena_Display();
+#endif
}
if ((R_HREG_MODE == HREG_MODE_PRINT_OBJECT_TABLE) && (R_PRINT_OBJECT_TABLE_TRIGGER < 0)) {
@@ -551,9 +584,9 @@ void Play_Update(PlayState* this) {
}
#endif
- gSegments[4] = VIRTUAL_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
- gSegments[5] = VIRTUAL_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
- gSegments[2] = VIRTUAL_TO_PHYSICAL(this->sceneSegment);
+ gSegments[4] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
+ gSegments[5] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
+ gSegments[2] = OS_K0_TO_PHYSICAL(this->sceneSegment);
if (FrameAdvance_Update(&this->frameAdvCtx, &input[1])) {
if ((this->transitionMode == TRANS_MODE_OFF) && (this->transitionTrigger != TRANS_TRIGGER_OFF)) {
@@ -607,7 +640,7 @@ void Play_Update(PlayState* this) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (!R_TRANS_DBG_ENABLED) {
Play_SetupTransition(this, this->transitionType);
} else {
@@ -925,7 +958,7 @@ void Play_Update(PlayState* this) {
PLAY_LOG(3555);
AnimTaskQueue_Reset(&this->animTaskQueue);
- if (!OOT_DEBUG) {}
+ if (!DEBUG_FEATURES) {}
PLAY_LOG(3561);
Object_UpdateEntries(&this->objectCtx);
@@ -1060,6 +1093,7 @@ void Play_Update(PlayState* this) {
skip:
PLAY_LOG(3801);
+ //! @bug If frame advancing or during tile transitions, isPaused will be used uninitialized.
if (!isPaused || gDebugCamEnabled) {
s32 i;
@@ -1111,9 +1145,9 @@ void Play_Draw(PlayState* this) {
OPEN_DISPS(gfxCtx, "../z_play.c", 3907);
- gSegments[4] = VIRTUAL_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
- gSegments[5] = VIRTUAL_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
- gSegments[2] = VIRTUAL_TO_PHYSICAL(this->sceneSegment);
+ gSegments[4] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.mainKeepSlot].segment);
+ gSegments[5] = OS_K0_TO_PHYSICAL(this->objectCtx.slots[this->objectCtx.subKeepSlot].segment);
+ gSegments[2] = OS_K0_TO_PHYSICAL(this->sceneSegment);
gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
gSPSegment(POLY_XLU_DISP++, 0x00, NULL);
@@ -1133,7 +1167,7 @@ void Play_Draw(PlayState* this) {
Gfx_SetupFrame(gfxCtx, 0, 0, 0);
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_RUN_DRAW) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_RUN_DRAW) {
POLY_OPA_DISP = Play_SetFog(this, POLY_OPA_DISP);
POLY_XLU_DISP = Play_SetFog(this, POLY_XLU_DISP);
@@ -1156,7 +1190,7 @@ void Play_Draw(PlayState* this) {
gSPSegment(POLY_OPA_DISP++, 0x01, this->billboardMtx);
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_COVER_ELEMENTS) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_COVER_ELEMENTS) {
Gfx* gfxP;
Gfx* sp1CC = POLY_OPA_DISP;
@@ -1225,7 +1259,7 @@ void Play_Draw(PlayState* this) {
goto Play_Draw_DrawOverlayElements;
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_SKYBOX) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_SKYBOX) {
if (this->skyboxId && (this->skyboxId != SKYBOX_UNSET_1D) && !this->envCtx.skyboxDisabled) {
if ((this->skyboxId == SKYBOX_NORMAL_SKY) || (this->skyboxId == SKYBOX_CUTSCENE_MAP)) {
Environment_UpdateSkybox(this->skyboxId, &this->envCtx, &this->skyboxCtx);
@@ -1238,32 +1272,34 @@ void Play_Draw(PlayState* this) {
}
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_SUN_AND_MOON)) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) ||
+ (R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_SUN_AND_MOON)) {
if (!this->envCtx.sunMoonDisabled) {
Environment_DrawSunAndMoon(this);
}
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_SKYBOX_FILTERS)) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) ||
+ (R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_SKYBOX_FILTERS)) {
Environment_DrawSkyboxFilters(this);
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_LIGHTNING)) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_LIGHTNING)) {
Environment_UpdateLightningStrike(this);
Environment_DrawLightning(this, 0);
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_LIGHTS)) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_LIGHTS)) {
sp228 = LightContext_NewLights(&this->lightCtx, gfxCtx);
Lights_BindAll(sp228, this->lightCtx.listHead, NULL);
Lights_Draw(sp228, gfxCtx);
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ROOM_FLAGS != 0)) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ROOM_FLAGS != 0)) {
if (VREG(94) == 0) {
s32 roomDrawFlags;
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY)) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY)) {
roomDrawFlags = ROOM_DRAW_OPA | ROOM_DRAW_XLU;
} else {
roomDrawFlags = R_PLAY_DRAW_ROOM_FLAGS;
@@ -1274,7 +1310,7 @@ void Play_Draw(PlayState* this) {
}
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_SKYBOX) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_SKYBOX) {
if ((this->skyboxCtx.drawType != SKYBOX_DRAW_128) &&
(GET_ACTIVE_CAM(this)->setting != CAM_SET_PREREND_FIXED)) {
Vec3f quakeOffset;
@@ -1289,15 +1325,15 @@ void Play_Draw(PlayState* this) {
Environment_DrawRain(this, &this->view, gfxCtx);
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ROOM_FLAGS != 0)) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ROOM_FLAGS != 0)) {
Environment_FillScreen(gfxCtx, 0, 0, 0, this->bgCoverAlpha, FILL_SCREEN_OPA);
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_ACTORS) {
- func_800315AC(this, &this->actorCtx);
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_ACTORS) {
+ Actor_DrawAll(this, &this->actorCtx);
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_LENS_FLARES) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_LENS_FLARES) {
if (!this->envCtx.sunMoonDisabled) {
sp21C.x = this->view.eye.x + this->envCtx.sunPos.x;
sp21C.y = this->view.eye.y + this->envCtx.sunPos.y;
@@ -1307,7 +1343,7 @@ void Play_Draw(PlayState* this) {
Environment_DrawCustomLensFlare(this);
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_SCREEN_FILLS) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_SCREEN_FILLS) {
if (MREG(64) != 0) {
Environment_FillScreen(gfxCtx, MREG(65), MREG(66), MREG(67), MREG(68),
FILL_SCREEN_OPA | FILL_SCREEN_XLU);
@@ -1324,13 +1360,13 @@ void Play_Draw(PlayState* this) {
}
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_SANDSTORM) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_SANDSTORM) {
if (this->envCtx.sandstormState != SANDSTORM_OFF) {
Environment_DrawSandstorm(this, this->envCtx.sandstormState);
}
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_DEBUG_OBJECTS) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_DEBUG_OBJECTS) {
DebugDisplay_DrawObjects(this);
}
@@ -1357,7 +1393,7 @@ void Play_Draw(PlayState* this) {
}
Play_Draw_DrawOverlayElements:
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_OVERLAY_ELEMENTS) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_OVERLAY_ELEMENTS) {
Play_DrawOverlayElements(this);
}
}
@@ -1387,7 +1423,7 @@ void Play_Main(GameState* thisx) {
PLAY_LOG(4556);
- if (OOT_DEBUG && (R_HREG_MODE == HREG_MODE_PLAY) && (R_PLAY_INIT != HREG_MODE_PLAY)) {
+ if (DEBUG_FEATURES && (R_HREG_MODE == HREG_MODE_PLAY) && (R_PLAY_INIT != HREG_MODE_PLAY)) {
R_PLAY_RUN_UPDATE = true;
R_PLAY_RUN_DRAW = true;
R_PLAY_DRAW_SKYBOX = true;
@@ -1405,7 +1441,7 @@ void Play_Main(GameState* thisx) {
R_PLAY_INIT = HREG_MODE_PLAY;
}
- if (!OOT_DEBUG || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_RUN_UPDATE) {
+ if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_RUN_UPDATE) {
Play_Update(this);
}
@@ -1499,7 +1535,7 @@ void* Play_LoadFileFromDiskDrive(PlayState* this, RomFile* file) {
void* allocp;
size = file->vromEnd - file->vromStart;
- allocp = THA_AllocTailAlign16(&this->state.tha, size);
+ allocp = GAME_STATE_ALLOC(&this->state, size, "../z_play.c", UNK_LINE);
func_801C7C1C(allocp, file->vromStart, size);
return allocp;
@@ -1535,7 +1571,7 @@ void Play_InitScene(PlayState* this, s32 spawn) {
void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn) {
SceneTableEntry* scene;
- u32 size;
+ UNUSED_NDEBUG u32 size;
#if PLATFORM_N64
if ((B_80121220 != NULL) && (B_80121220->unk_48 != NULL)) {
@@ -1570,7 +1606,7 @@ void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn) {
ASSERT(this->sceneSegment != NULL, "this->sceneSegment != NULL", "../z_play.c", 4960);
- gSegments[2] = VIRTUAL_TO_PHYSICAL(this->sceneSegment);
+ gSegments[2] = OS_K0_TO_PHYSICAL(this->sceneSegment);
Play_InitScene(this, spawn);
@@ -1623,7 +1659,7 @@ s16 Play_CreateSubCamera(PlayState* this) {
return camId;
}
-s16 Play_GetActiveCamId(PlayState* this) {
+s32 Play_GetActiveCamId(PlayState* this) {
return this->activeCamId;
}
@@ -1880,6 +1916,7 @@ void Play_LoadToLastEntrance(PlayState* this) {
(gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_12) ||
(gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_13) ||
(gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_15)) {
+ // Avoid re-triggering the hop over Lon Lon fence cutscenes
this->nextEntranceIndex = ENTR_HYRULE_FIELD_6;
#endif
} else {
@@ -1890,7 +1927,7 @@ void Play_LoadToLastEntrance(PlayState* this) {
}
void Play_TriggerRespawn(PlayState* this) {
- Play_SetupRespawnPoint(this, RESPAWN_MODE_DOWN, 0xDFF);
+ Play_SetupRespawnPoint(this, RESPAWN_MODE_DOWN, PLAYER_PARAMS(PLAYER_START_MODE_IDLE, PLAYER_START_BG_CAM_DEFAULT));
Play_LoadToLastEntrance(this);
}
diff --git a/src/code/z_player_call.c b/src/code/z_player_call.c
index a004f0b534..eb52aff798 100644
--- a/src/code/z_player_call.c
+++ b/src/code/z_player_call.c
@@ -1,10 +1,15 @@
-#include "global.h"
+#include "kaleido_manager.h"
+#include "z64actor.h"
+#include "z64actor_profile.h"
+#include "z64play.h"
+#include "z64player.h"
-#define FLAGS \
- (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25 | ACTOR_FLAG_26)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA | ACTOR_FLAG_CAN_PRESS_SWITCHES)
-#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"
+#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 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"
void (*sPlayerCallInitFunc)(Actor* thisx, PlayState* play);
void (*sPlayerCallDestroyFunc)(Actor* thisx, PlayState* play);
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index 84236ef123..1ac27fdb6c 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -1,9 +1,24 @@
-#include "global.h"
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64draw.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_link_boy/object_link_boy.h"
#include "assets/objects/object_link_child/object_link_child.h"
-#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
+#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
+ "pal-1.0:0 pal-1.1:0"
typedef struct BowSlingshotStringData {
/* 0x00 */ Gfx* dList;
@@ -13,12 +28,126 @@ typedef struct BowSlingshotStringData {
FlexSkeletonHeader* gPlayerSkelHeaders[] = { &gLinkAdultSkel, &gLinkChildSkel };
s16 sBootData[PLAYER_BOOTS_MAX][17] = {
- { 200, 1000, 300, 700, 550, 270, 600, 350, 800, 600, -100, 600, 590, 750, 125, 200, 130 },
- { 200, 1000, 300, 700, 550, 270, 1000, 0, 800, 300, -160, 600, 590, 750, 125, 200, 130 },
- { 200, 1000, 300, 700, 550, 270, 600, 600, 800, 550, -100, 600, 540, 270, 25, 0, 130 },
- { 200, 1000, 300, 700, 380, 400, 0, 300, 800, 500, -100, 600, 590, 750, 125, 200, 130 },
- { 80, 800, 150, 700, 480, 270, 600, 50, 800, 550, -40, 400, 540, 270, 25, 0, 80 },
- { 200, 1000, 300, 800, 500, 400, 800, 400, 800, 550, -100, 600, 540, 750, 125, 400, 200 },
+ // PLAYER_BOOTS_KOKIRI
+ {
+ 200, // REG(19)
+ FRAMERATE_CONST(1000, 1200), // REG(30)
+ FRAMERATE_CONST(300, 360), // REG(32)
+ 700, // REG(34)
+ FRAMERATE_CONST(550, 660), // REG(35)
+ FRAMERATE_CONST(270, 324), // REG(36)
+ 600, // REG(37)
+ FRAMERATE_CONST(350, 420), // REG(38)
+ 800, // R_DECELERATE_RATE
+ 600, // R_RUN_SPEED_LIMIT
+ -100, // REG(68)
+ 600, // REG(69)
+ 590, // IREG(66)
+ 750, // IREG(67)
+ 125, // IREG(68)
+ 200, // IREG(69)
+ FRAMERATE_CONST(130, 156), // MREG(95)
+ },
+ // PLAYER_BOOTS_IRON
+ {
+ 200, // REG(19)
+ FRAMERATE_CONST(1000, 1200), // REG(30)
+ FRAMERATE_CONST(300, 360), // REG(32)
+ 700, // REG(34)
+ FRAMERATE_CONST(550, 660), // REG(35)
+ FRAMERATE_CONST(270, 324), // REG(36)
+ 1000, // REG(37)
+ FRAMERATE_CONST(0, 0), // REG(38)
+ 800, // R_DECELERATE_RATE
+ 300, // R_RUN_SPEED_LIMIT
+ -160, // REG(68)
+ 600, // REG(69)
+ 590, // IREG(66)
+ 750, // IREG(67)
+ 125, // IREG(68)
+ 200, // IREG(69)
+ FRAMERATE_CONST(130, 156), // MREG(95)
+ },
+ // PLAYER_BOOTS_HOVER
+ {
+ 200, // REG(19)
+ FRAMERATE_CONST(1000, 1200), // REG(30)
+ FRAMERATE_CONST(300, 360), // REG(32)
+ 700, // REG(34)
+ FRAMERATE_CONST(550, 660), // REG(35)
+ FRAMERATE_CONST(270, 324), // REG(36)
+ 600, // REG(37)
+ FRAMERATE_CONST(600, 720), // REG(38)
+ 800, // R_DECELERATE_RATE
+ 550, // R_RUN_SPEED_LIMIT
+ -100, // REG(68)
+ 600, // REG(69)
+ 540, // IREG(66)
+ 270, // IREG(67)
+ 25, // IREG(68)
+ 0, // IREG(69)
+ FRAMERATE_CONST(130, 156), // MREG(95)
+ },
+ // PLAYER_BOOTS_INDOOR
+ {
+ 200, // REG(19)
+ FRAMERATE_CONST(1000, 1200), // REG(30)
+ FRAMERATE_CONST(300, 360), // REG(32)
+ 700, // REG(34)
+ FRAMERATE_CONST(380, 456), // REG(35)
+ FRAMERATE_CONST(400, 480), // REG(36)
+ 0, // REG(37)
+ FRAMERATE_CONST(300, 360), // REG(38)
+ 800, // R_DECELERATE_RATE
+ 500, // R_RUN_SPEED_LIMIT
+ -100, // REG(68)
+ 600, // REG(69)
+ 590, // IREG(66)
+ 750, // IREG(67)
+ 125, // IREG(68)
+ 200, // IREG(69)
+ FRAMERATE_CONST(130, 156), // MREG(95)
+ },
+ // PLAYER_BOOTS_IRON_UNDERWATER
+ {
+ 80, // REG(19)
+ FRAMERATE_CONST(800, 960), // REG(30)
+ FRAMERATE_CONST(150, 180), // REG(32)
+ 700, // REG(34)
+ FRAMERATE_CONST(480, 576), // REG(35)
+ FRAMERATE_CONST(270, 324), // REG(36)
+ 600, // REG(37)
+ FRAMERATE_CONST(50, 60), // REG(38)
+ 800, // R_DECELERATE_RATE
+ 550, // R_RUN_SPEED_LIMIT
+ -40, // REG(68)
+ 400, // REG(69)
+ 540, // IREG(66)
+ 270, // IREG(67)
+ 25, // IREG(68)
+ 0, // IREG(69)
+ FRAMERATE_CONST(80, 96), // MREG(95)
+ },
+ // PLAYER_BOOTS_KOKIRI_CHILD
+ {
+ 200, // REG(19)
+ FRAMERATE_CONST(1000, 1200), // REG(30)
+ FRAMERATE_CONST(300, 360), // REG(32)
+ 800, // REG(34)
+ FRAMERATE_CONST(500, 600), // REG(35)
+ FRAMERATE_CONST(400, 480), // REG(36)
+ 800, // REG(37)
+ FRAMERATE_CONST(400, 480), // REG(38)
+ 800, // R_DECELERATE_RATE
+ 550, // R_RUN_SPEED_LIMIT
+ -100, // REG(68)
+ 600, // REG(69)
+ 540, // IREG(66)
+ 750, // IREG(67)
+ 125, // IREG(68)
+ 400, // IREG(69)
+ FRAMERATE_CONST(200, 240), // MREG(95)
+ },
};
// Used to map item actions to model groups
@@ -474,8 +603,8 @@ void Player_SetBootData(PlayState* play, Player* this) {
REG(36) = bootRegs[5];
REG(37) = bootRegs[6];
REG(38) = bootRegs[7];
- REG(43) = bootRegs[8];
- REG(45) = bootRegs[9];
+ R_DECELERATE_RATE = bootRegs[8];
+ R_RUN_SPEED_LIMIT = bootRegs[9];
REG(68) = bootRegs[10];
REG(69) = bootRegs[11];
IREG(66) = bootRegs[12];
@@ -484,8 +613,8 @@ void Player_SetBootData(PlayState* play, Player* this) {
IREG(69) = bootRegs[15];
MREG(95) = bootRegs[16];
- if (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_2) {
- REG(45) = 500;
+ if (play->roomCtx.curRoom.type == ROOM_TYPE_INDOORS) {
+ R_RUN_SPEED_LIMIT = 500;
}
}
@@ -529,7 +658,7 @@ s32 Player_ActionToModelGroup(Player* this, s32 itemAction) {
}
void Player_SetModelsForHoldingShield(Player* this) {
- if ((this->stateFlags1 & PLAYER_STATE1_22) &&
+ if ((this->stateFlags1 & PLAYER_STATE1_SHIELDING) &&
((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) {
if (!Player_HoldsTwoHandedWeapon(this) && !Player_IsChildWithHylianShield(this)) {
this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD;
@@ -608,12 +737,17 @@ void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 itemAc
this->itemAction = itemAction;
}
-void func_8008EDF0(Player* this) {
+void Player_ReleaseLockOn(Player* this) {
this->focusActor = NULL;
this->stateFlags2 &= ~PLAYER_STATE2_LOCK_ON_WITH_SWITCH;
}
-void func_8008EE08(Player* this) {
+/**
+ * This function aims to clear Z-Target related state when it isn't in use.
+ * It also handles setting a specific free fall related state that is interntwined with Z-Targeting.
+ * TODO: Learn more about this and give a name to PLAYER_STATE1_19
+ */
+void Player_ClearZTargeting(Player* this) {
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
(this->stateFlags1 & (PLAYER_STATE1_21 | PLAYER_STATE1_23 | PLAYER_STATE1_27)) ||
(!(this->stateFlags1 & (PLAYER_STATE1_18 | PLAYER_STATE1_19)) &&
@@ -624,15 +758,29 @@ void func_8008EE08(Player* this) {
this->stateFlags1 |= PLAYER_STATE1_19;
}
- func_8008EDF0(this);
+ Player_ReleaseLockOn(this);
}
-void func_8008EEAC(PlayState* play, Actor* actor) {
+/**
+ * Sets the "auto lock-on actor" to lock onto an actor without Player's input.
+ * This function will first release any existing lock-on or (try to) release parallel.
+ *
+ * When using Switch Targeting, it is not possible to carry an auto lock-on actor into a normal
+ * lock-on when the auto lock-on is finished.
+ * This is because the `PLAYER_STATE2_LOCK_ON_WITH_SWITCH` flag is never set with an auto lock-on.
+ * With Hold Targeting it is possible to keep the auto lock-on going by keeping the Z button held down.
+ *
+ * The auto lock-on is considered "friendly" even if the actor is actually hostile. If the auto lock-on is hostile,
+ * Player's battle response will not occur (if he is actionable) and the camera behaves differently.
+ * When transitioning from auto lock-on to normal lock-on (with Hold Targeting) there will be a noticeable change
+ * when it switches from "friendly" mode to "hostile" mode.
+ */
+void Player_SetAutoLockOnActor(PlayState* play, Actor* actor) {
Player* this = GET_PLAYER(play);
- func_8008EE08(this);
+ Player_ClearZTargeting(this);
this->focusActor = actor;
- this->unk_684 = actor;
+ this->autoLockOnActor = actor;
this->stateFlags1 |= PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS;
Camera_SetViewParam(Play_GetCamera(play, CAM_ID_MAIN), CAM_VIEW_TARGET, actor);
Camera_RequestMode(Play_GetCamera(play, CAM_ID_MAIN), CAM_MODE_Z_TARGET_FRIENDLY);
@@ -794,7 +942,7 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
EnvHazardTextTriggerEntry* triggerEntry;
s32 envHazard;
- if (play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_3) { // Room is hot
+ if (play->roomCtx.curRoom.environmentType == ROOM_ENV_HOT) { // Room is hot
envHazard = PLAYER_ENV_HAZARD_HOTROOM - 1;
} else if ((this->underwaterTimer > 80) &&
((this->currentBoots == PLAYER_BOOTS_IRON) || (this->underwaterTimer >= 300))) {
@@ -1134,14 +1282,14 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
sCurBodyPartPos = &this->bodyPartsPos[0] - 1;
if (!LINK_IS_ADULT) {
- if (!(this->skelAnime.moveFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT) ||
- (this->skelAnime.moveFlags & ANIM_FLAG_UPDATE_XZ)) {
+ if (!(this->skelAnime.movementFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT) ||
+ (this->skelAnime.movementFlags & ANIM_FLAG_UPDATE_XZ)) {
pos->x *= 0.64f;
pos->z *= 0.64f;
}
- if (!(this->skelAnime.moveFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT) ||
- (this->skelAnime.moveFlags & ANIM_FLAG_UPDATE_Y)) {
+ if (!(this->skelAnime.movementFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT) ||
+ (this->skelAnime.movementFlags & ANIM_FLAG_UPDATE_Y)) {
pos->y *= 0.64f;
}
}
@@ -1161,22 +1309,22 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
}
if (limbIndex == PLAYER_LIMB_HEAD) {
- rot->x += this->unk_6BA;
- rot->y -= this->unk_6B8;
- rot->z += this->unk_6B6;
+ rot->x += this->headLimbRot.z;
+ rot->y -= this->headLimbRot.y;
+ rot->z += this->headLimbRot.x;
} else if (limbIndex == PLAYER_LIMB_UPPER) {
- if (this->unk_6B0 != 0) {
+ if (this->upperLimbYawSecondary != 0) {
Matrix_RotateZ(BINANG_TO_RAD(0x44C), MTXMODE_APPLY);
- Matrix_RotateY(BINANG_TO_RAD(this->unk_6B0), MTXMODE_APPLY);
+ Matrix_RotateY(BINANG_TO_RAD(this->upperLimbYawSecondary), MTXMODE_APPLY);
}
- if (this->unk_6BE != 0) {
- Matrix_RotateY(BINANG_TO_RAD(this->unk_6BE), MTXMODE_APPLY);
+ if (this->upperLimbRot.y != 0) {
+ Matrix_RotateY(BINANG_TO_RAD(this->upperLimbRot.y), MTXMODE_APPLY);
}
- if (this->unk_6BC != 0) {
- Matrix_RotateX(BINANG_TO_RAD(this->unk_6BC), MTXMODE_APPLY);
+ if (this->upperLimbRot.x != 0) {
+ Matrix_RotateX(BINANG_TO_RAD(this->upperLimbRot.x), MTXMODE_APPLY);
}
- if (this->unk_6C0 != 0) {
- Matrix_RotateZ(BINANG_TO_RAD(this->unk_6C0), MTXMODE_APPLY);
+ if (this->upperLimbRot.z != 0) {
+ Matrix_RotateZ(BINANG_TO_RAD(this->upperLimbRot.z), MTXMODE_APPLY);
}
} else if (limbIndex == PLAYER_LIMB_L_THIGH) {
s32 pad;
@@ -1326,7 +1474,7 @@ void Player_UpdateShieldCollider(PlayState* play, Player* this, ColliderQuad* co
COL_MATERIAL_METAL,
};
- if (this->stateFlags1 & PLAYER_STATE1_22) {
+ if (this->stateFlags1 & PLAYER_STATE1_SHIELDING) {
Vec3f quadDest[4];
this->shieldQuad.base.colMaterial = shieldColMaterials[this->currentShield];
@@ -1360,7 +1508,7 @@ void func_800906D4(PlayState* play, Player* this, Vec3f* newTipPos) {
Matrix_MultVec3f(&D_801260A4[2], &newBasePos[2]);
if (func_80090480(play, NULL, &this->meleeWeaponInfo[0], &newTipPos[0], &newBasePos[0]) &&
- !(this->stateFlags1 & PLAYER_STATE1_22)) {
+ !(this->stateFlags1 & PLAYER_STATE1_SHIELDING)) {
EffectBlure_AddVertex(Effect_GetByIndex(this->meleeWeaponEffectIndex), &this->meleeWeaponInfo[0].tip,
&this->meleeWeaponInfo[0].base);
}
@@ -1377,7 +1525,7 @@ void Player_DrawGetItemImpl(PlayState* play, Player* this, Vec3f* refPos, s32 dr
OPEN_DISPS(play->state.gfxCtx, "../z_player_lib.c", 2401);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(this->giObjectSegment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(this->giObjectSegment);
gSPSegment(POLY_OPA_DISP++, 0x06, this->giObjectSegment);
gSPSegment(POLY_XLU_DISP++, 0x06, this->giObjectSegment);
@@ -1491,8 +1639,8 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
}
if (limbIndex == PLAYER_LIMB_L_HAND) {
- MtxF sp14C;
- Actor* hookedActor;
+ MtxF leftHandMtx;
+ Actor* heldActor;
Math_Vec3f_Copy(&this->leftHandPos, sCurBodyPartPos);
@@ -1548,25 +1696,25 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
}
if (this->actor.scale.y >= 0.0f) {
- if (!Player_HoldsHookshot(this) && ((hookedActor = this->heldActor) != NULL)) {
+ if (!Player_HoldsHookshot(this) && ((heldActor = this->heldActor) != NULL)) {
if (this->stateFlags1 & PLAYER_STATE1_9) {
static Vec3f D_80126128 = { 398.0f, 1419.0f, 244.0f };
- Matrix_MultVec3f(&D_80126128, &hookedActor->world.pos);
+ Matrix_MultVec3f(&D_80126128, &heldActor->world.pos);
Matrix_RotateZYX(0x69E8, -0x5708, 0x458E, MTXMODE_APPLY);
- Matrix_Get(&sp14C);
- Matrix_MtxFToYXZRotS(&sp14C, &hookedActor->world.rot, 0);
- hookedActor->shape.rot = hookedActor->world.rot;
- } else if (this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) {
- Vec3s spB8;
+ Matrix_Get(&leftHandMtx);
+ Matrix_MtxFToYXZRotS(&leftHandMtx, &heldActor->world.rot, 0);
+ heldActor->shape.rot = heldActor->world.rot;
+ } else if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
+ Vec3s leftHandRot;
- Matrix_Get(&sp14C);
- Matrix_MtxFToYXZRotS(&sp14C, &spB8, 0);
+ Matrix_Get(&leftHandMtx);
+ Matrix_MtxFToYXZRotS(&leftHandMtx, &leftHandRot, 0);
- if (hookedActor->flags & ACTOR_FLAG_17) {
- hookedActor->world.rot.x = hookedActor->shape.rot.x = spB8.x - this->unk_3BC.x;
+ if (heldActor->flags & ACTOR_FLAG_CARRY_X_ROT_INFLUENCE) {
+ heldActor->world.rot.x = heldActor->shape.rot.x = leftHandRot.x - this->unk_3BC.x;
} else {
- hookedActor->world.rot.y = hookedActor->shape.rot.y = this->actor.shape.rot.y + this->unk_3BC.y;
+ heldActor->world.rot.y = heldActor->shape.rot.y = this->actor.shape.rot.y + this->unk_3BC.y;
}
}
} else {
@@ -1654,7 +1802,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
Matrix_MtxFToYXZRotS(&sp44, &heldActor->world.rot, 0);
heldActor->shape.rot = heldActor->world.rot;
- if (func_8002DD78(this) != 0) {
+ if (func_8002DD78(this)) {
Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
Player_DrawHookshotReticle(play, this,
(this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f);
@@ -1731,9 +1879,9 @@ u32 Player_InitPauseDrawData(PlayState* play, u8* segment, SkelAnime* skelAnime)
ptr = (void*)ALIGN16((uintptr_t)ptr + size);
- gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE);
+ gSegments[4] = OS_K0_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE);
gSegments[6] =
- VIRTUAL_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE + PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE);
+ OS_K0_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE + PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE);
SkelAnime_InitLink(play, skelAnime, gPlayerSkelHeaders[(void)0, gSaveContext.save.linkAge],
&gPlayerAnim_link_normal_wait, 9, ptr, ptr, PLAYER_LIMB_MAX);
@@ -1909,9 +2057,9 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
Vec3s* srcTable;
s32 i;
- gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE);
+ gSegments[4] = OS_K0_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE);
gSegments[6] =
- VIRTUAL_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE + PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE);
+ OS_K0_TO_PHYSICAL(segment + PAUSE_EQUIP_BUFFER_SIZE + PAUSE_PLAYER_SEGMENT_GAMEPLAY_KEEP_BUFFER_SIZE);
if (!LINK_IS_ADULT) {
if (shield == PLAYER_SHIELD_DEKU) {
diff --git a/src/code/z_prenmi.c b/src/code/z_prenmi.c
index 29ea097d68..6bf73b0577 100644
--- a/src/code/z_prenmi.c
+++ b/src/code/z_prenmi.c
@@ -1,5 +1,11 @@
-#include "global.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "prenmi_state.h"
+#include "printf.h"
+#include "regs.h"
#include "terminal.h"
+#include "versions.h"
+#include "vi_mode.h"
void func_80092320(PreNMIState* this) {
this->state.running = false;
@@ -17,7 +23,12 @@ void PreNMI_Update(PreNMIState* this) {
}
if (this->timer == 0) {
+#if OOT_VERSION < PAL_1_0
+ osViSetYScale(1.0f);
+ osViBlack(true);
+#else
ViConfig_UpdateVi(true);
+#endif
func_80092320(this);
return;
}
diff --git a/src/code/z_prenmi_buff.c b/src/code/z_prenmi_buff.c
index c00d0513c0..3c45d7e540 100644
--- a/src/code/z_prenmi_buff.c
+++ b/src/code/z_prenmi_buff.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "prenmi_buff.h"
#define COLD_RESET 0
#define NMI 1
diff --git a/src/code/z_quake.c b/src/code/z_quake.c
index 4c318b9386..d3ba17810d 100644
--- a/src/code/z_quake.c
+++ b/src/code/z_quake.c
@@ -1,6 +1,11 @@
-#include "global.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "printf.h"
#include "quake.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64olib.h"
+#include "z64play.h"
typedef struct QuakeRequest {
/* 0x00 */ s16 index;
diff --git a/src/code/z_rcp.c b/src/code/z_rcp.c
index a4100700b5..6228b51cf1 100644
--- a/src/code/z_rcp.c
+++ b/src/code/z_rcp.c
@@ -1,4 +1,11 @@
-#include "global.h"
+#include "buffers.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "gfxalloc.h"
+#include "letterbox.h"
+#include "main.h"
+#include "regs.h"
+#include "z64play.h"
Gfx sSetupDL[SETUPDL_MAX][6] = {
{
@@ -1012,7 +1019,7 @@ void func_80093C80(PlayState* play) {
Gfx_SetupDL_25Opa(gfxCtx);
- if (play->roomCtx.curRoom.behaviorType1 == ROOM_BEHAVIOR_TYPE1_3) {
+ if (play->roomCtx.curRoom.type == ROOM_TYPE_3) {
OPEN_DISPS(gfxCtx, "../z_rcp.c", 1460);
gDPSetColorDither(POLY_OPA_DISP++, G_CD_DISABLE);
@@ -1246,7 +1253,7 @@ Gfx* Gfx_SetupDL_69NoCD(Gfx* gfx) {
return gfx;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define HREG_21 HREG(21)
#define HREG_22 HREG(22)
#else
@@ -1482,7 +1489,7 @@ void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_SETUP) && (gTransitionTileState <= TRANS_TILE_SETUP)) {
s32 letterboxSize = Letterbox_GetSize();
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (R_HREG_MODE == HREG_MODE_SETUP_FRAME) {
if (R_SETUP_FRAME_INIT != HREG_MODE_SETUP_FRAME) {
R_SETUP_FRAME_GET = (SETUP_FRAME_LETTERBOX_SIZE_FLAG | SETUP_FRAME_BASE_COLOR_FLAG);
diff --git a/src/code/z_room.c b/src/code/z_room.c
index a9fa462fda..7bc9e4801d 100644
--- a/src/code/z_room.c
+++ b/src/code/z_room.c
@@ -1,9 +1,30 @@
-#include "global.h"
+#include "libu64/debug.h"
+#include "ultra64/gs2dex.h"
+#include "array_count.h"
+#include "buffers.h"
#include "fault.h"
-#include "terminal.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "jpeg.h"
+#include "line_numbers.h"
+#include "map.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "sys_ucode.h"
+#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64room.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
Vec3f D_801270A0 = { 0.0f, 0.0f, 0.0f };
@@ -46,14 +67,14 @@ void Room_DrawNormal(PlayState* play, Room* room, u32 flags) {
func_800342EC(&D_801270A0, play);
gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
func_80093C80(play);
- gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_OPA_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
if (flags & ROOM_DRAW_XLU) {
func_8003435C(&D_801270A0, play);
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
roomShape = &room->roomShape->normal;
@@ -120,7 +141,7 @@ void Room_DrawCullable(PlayState* play, Room* room, u32 flags) {
func_800342EC(&D_801270A0, play);
gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
func_80093C80(play);
- gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_OPA_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
if (1) {}
@@ -129,7 +150,7 @@ void Room_DrawCullable(PlayState* play, Room* room, u32 flags) {
func_8003435C(&D_801270A0, play);
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
roomShape = &room->roomShape->cullable;
@@ -350,6 +371,14 @@ void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 hei
*gfxP = gfx;
}
+#if OOT_VERSION < PAL_1_0
+void func_8007FF50(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tlutMode,
+ u16 tlutCount) {
+ if (1) {}
+ Room_DrawBackground2D(gfxP, tex, tlut, width, height, fmt, siz, tlutMode, tlutCount, 0.0f, 0.0f);
+}
+#endif
+
#define ROOM_IMAGE_NODRAW_BACKGROUND (1 << 0)
#define ROOM_IMAGE_NODRAW_OPA (1 << 1)
#define ROOM_IMAGE_NODRAW_XLU (1 << 2)
@@ -380,7 +409,7 @@ void Room_DrawImageSingle(PlayState* play, Room* room, u32 flags) {
if (drawOpa) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_OPA_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, entry->opa);
}
@@ -389,6 +418,9 @@ void Room_DrawImageSingle(PlayState* play, Room* room, u32 flags) {
gfx = POLY_OPA_DISP;
+#if OOT_VERSION < PAL_1_0
+ if (1)
+#endif
{
Vec3f quakeOffset;
@@ -408,7 +440,7 @@ void Room_DrawImageSingle(PlayState* play, Room* room, u32 flags) {
if (drawXlu) {
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, entry->xlu);
}
@@ -444,10 +476,11 @@ RoomShapeImageMultiBgEntry* Room_GetImageMultiBgEntry(RoomShapeImageMulti* roomS
PRINTF(VT_COL(RED, WHITE) T("z_room.c:カメラIDに一致するデータが存在しません camid=%d\n",
"z_room.c: Data consistent with camera id does not exist camid=%d\n") VT_RST,
bgCamIndex);
-#if PLATFORM_N64
- Fault_AddHungupAndCrash("../z_room.c", 721);
-#else
+
+#if !PLATFORM_N64
LogUtils_HungupThread("../z_room.c", 726);
+#else
+ Fault_AddHungupAndCrash("../z_room.c", LN2(724, 727, 721));
#endif
return NULL;
@@ -485,7 +518,7 @@ void Room_DrawImageMulti(PlayState* play, Room* room, u32 flags) {
if (drawOpa) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_OPA_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, dListsEntry->opa);
}
@@ -494,6 +527,9 @@ void Room_DrawImageMulti(PlayState* play, Room* room, u32 flags) {
gfx = POLY_OPA_DISP;
+#if OOT_VERSION < PAL_1_0
+ if (1)
+#endif
{
Vec3f quakeOffset;
@@ -513,7 +549,7 @@ void Room_DrawImageMulti(PlayState* play, Room* room, u32 flags) {
if (drawXlu) {
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, dListsEntry->xlu);
}
@@ -528,10 +564,10 @@ void Room_DrawImage(PlayState* play, Room* room, u32 flags) {
} else if (roomShape->amountType == ROOM_SHAPE_IMAGE_AMOUNT_MULTI) {
Room_DrawImageMulti(play, room, flags);
} else {
-#if PLATFORM_N64
- Fault_AddHungupAndCrash("../z_room.c", 836);
-#else
+#if !PLATFORM_N64
LogUtils_HungupThread("../z_room.c", 841);
+#else
+ Fault_AddHungupAndCrash("../z_room.c", LN2(849, 852, 836));
#endif
}
}
@@ -594,14 +630,14 @@ u32 Room_SetupFirstRoom(PlayState* play, RoomContext* roomCtx) {
}
}
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF(T("部屋バッファサイズ=%08x(%5.1fK)\n", "Room buffer size=%08x(%5.1fK)\n"), roomBufferSize,
roomBufferSize / 1024.0f);
roomCtx->bufPtrs[0] = GAME_STATE_ALLOC(&play->state, roomBufferSize, "../z_room.c", 946);
PRINTF(T("部屋バッファ開始ポインタ=%08x\n", "Room buffer initial pointer=%08x\n"), roomCtx->bufPtrs[0]);
roomCtx->bufPtrs[1] = (void*)((uintptr_t)roomCtx->bufPtrs[0] + roomBufferSize);
PRINTF(T("部屋バッファ終了ポインタ=%08x\n", "Room buffer end pointer=%08x\n"), roomCtx->bufPtrs[1]);
- PRINTF(VT_RST);
+ PRINTF_RST();
roomCtx->activeBufPage = 0;
roomCtx->status = 0;
@@ -680,7 +716,7 @@ s32 Room_ProcessRoomRequest(PlayState* play, RoomContext* roomCtx) {
if (osRecvMesg(&roomCtx->loadQueue, NULL, OS_MESG_NOBLOCK) == 0) {
roomCtx->status = 0;
roomCtx->curRoom.segment = roomCtx->roomRequestAddr;
- gSegments[3] = VIRTUAL_TO_PHYSICAL(roomCtx->curRoom.segment);
+ gSegments[3] = OS_K0_TO_PHYSICAL(roomCtx->curRoom.segment);
Scene_ExecuteCommands(play, roomCtx->curRoom.segment);
Player_SetBootData(play, GET_PLAYER(play));
@@ -695,7 +731,7 @@ s32 Room_ProcessRoomRequest(PlayState* play, RoomContext* roomCtx) {
void Room_Draw(PlayState* play, Room* room, u32 flags) {
if (room->segment != NULL) {
- gSegments[3] = VIRTUAL_TO_PHYSICAL(room->segment);
+ gSegments[3] = OS_K0_TO_PHYSICAL(room->segment);
ASSERT(room->roomShape->base.type < ARRAY_COUNTU(sRoomDrawHandlers),
"this->ground_shape->polygon.type < number(Room_Draw_Proc)", "../z_room.c", 1125);
sRoomDrawHandlers[room->roomShape->base.type](play, room, flags);
diff --git a/src/code/z_rumble.c b/src/code/z_rumble.c
index 49a54e7aab..fc811cfccb 100644
--- a/src/code/z_rumble.c
+++ b/src/code/z_rumble.c
@@ -11,8 +11,11 @@
*
* @note Original filename is likely z_vibrate.c or similar as it is ordered after z_ss_sram.c and before z_view.c
*/
-#include "global.h"
+#include "rumble.h"
+#include "padmgr.h"
+#include "z64math.h"
+static s32 sUnused[4];
RumbleMgr sRumbleMgr;
/**
diff --git a/src/code/z_sample.c b/src/code/z_sample.c
index 541771432b..63e0836bbc 100644
--- a/src/code/z_sample.c
+++ b/src/code/z_sample.c
@@ -1,4 +1,11 @@
-#include "global.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "controller.h"
+#include "regs.h"
+#include "sample_state.h"
+#include "segment_symbols.h"
+#include "z64dma.h"
+#include "z64play.h"
void Sample_HandleStateChange(SampleState* this) {
if (CHECK_BTN_ALL(this->state.input[0].press.button, BTN_START)) {
diff --git a/src/code/z_scene.c b/src/code/z_scene.c
index f72c06cada..feef5ffc62 100644
--- a/src/code/z_scene.c
+++ b/src/code/z_scene.c
@@ -1,6 +1,22 @@
-#include "global.h"
+#include "array_count.h"
+#include "avoid_ub.h"
+#include "printf.h"
+#include "regs.h"
+#include "romfile.h"
+#include "seqcmd.h"
+#include "segment_symbols.h"
+#include "segmented_address.h"
#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_actor_dlftbls.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "z64scene.h"
+SceneCmdHandlerFunc sSceneCmdHandlers[SCENE_CMD_ID_MAX];
RomFile sNaviQuestHintFiles[];
/**
@@ -45,6 +61,15 @@ s32 Object_SpawnPersistent(ObjectContext* objectCtx, s16 objectId) {
return objectCtx->numEntries - 1;
}
+// PAL N64 versions reduce the size of object space by 4 KiB in order to give some space back to
+// the Zelda arena, which can help prevent an issue where actors fail to spawn in specific areas
+// (sometimes referred to as the "Hyrule Field Glitch" although it can happen in more places than Hyrule Field).
+#if !OOT_PAL_N64
+#define OBJECT_SPACE_ADJUSTMENT 0
+#else
+#define OBJECT_SPACE_ADJUSTMENT (4 * 1024)
+#endif
+
void Object_InitContext(PlayState* play, ObjectContext* objectCtx) {
PlayState* play2 = play;
s32 pad;
@@ -52,21 +77,21 @@ void Object_InitContext(PlayState* play, ObjectContext* objectCtx) {
s32 i;
if (play2->sceneId == SCENE_HYRULE_FIELD) {
- spaceSize = 1000 * 1024;
+ spaceSize = 1000 * 1024 - OBJECT_SPACE_ADJUSTMENT;
} else if (play2->sceneId == SCENE_GANON_BOSS) {
if (gSaveContext.sceneLayer != 4) {
- spaceSize = 1150 * 1024;
+ spaceSize = 1150 * 1024 - OBJECT_SPACE_ADJUSTMENT;
} else {
- spaceSize = 1000 * 1024;
+ spaceSize = 1000 * 1024 - OBJECT_SPACE_ADJUSTMENT;
}
} else if (play2->sceneId == SCENE_SPIRIT_TEMPLE_BOSS) {
- spaceSize = 1050 * 1024;
+ spaceSize = 1050 * 1024 - OBJECT_SPACE_ADJUSTMENT;
} else if (play2->sceneId == SCENE_CHAMBER_OF_THE_SAGES) {
- spaceSize = 1050 * 1024;
+ spaceSize = 1050 * 1024 - OBJECT_SPACE_ADJUSTMENT;
} else if (play2->sceneId == SCENE_GANONDORF_BOSS) {
- spaceSize = 1050 * 1024;
+ spaceSize = 1050 * 1024 - OBJECT_SPACE_ADJUSTMENT;
} else {
- spaceSize = 1000 * 1024;
+ spaceSize = 1000 * 1024 - OBJECT_SPACE_ADJUSTMENT;
}
objectCtx->numEntries = objectCtx->numPersistentEntries = 0;
@@ -76,16 +101,16 @@ void Object_InitContext(PlayState* play, ObjectContext* objectCtx) {
objectCtx->slots[i].id = OBJECT_INVALID;
}
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF(T("オブジェクト入れ替えバンク情報 %8.3fKB\n", "Object exchange bank data %8.3fKB\n"), spaceSize / 1024.0f);
- PRINTF(VT_RST);
+ PRINTF_RST();
objectCtx->spaceStart = objectCtx->slots[0].segment =
GAME_STATE_ALLOC(&play->state, spaceSize, "../z_scene.c", 219);
objectCtx->spaceEnd = (void*)((uintptr_t)objectCtx->spaceStart + spaceSize);
objectCtx->mainKeepSlot = Object_SpawnPersistent(objectCtx, OBJECT_GAMEPLAY_KEEP);
- gSegments[4] = VIRTUAL_TO_PHYSICAL(objectCtx->slots[objectCtx->mainKeepSlot].segment);
+ gSegments[4] = OS_K0_TO_PHYSICAL(objectCtx->slots[objectCtx->mainKeepSlot].segment);
}
void Object_UpdateEntries(ObjectContext* objectCtx) {
@@ -181,12 +206,12 @@ s32 Scene_ExecuteCommands(PlayState* play, SceneCmd* sceneCmd) {
break;
}
- if (cmdCode < ARRAY_COUNT(gSceneCmdHandlers)) {
- gSceneCmdHandlers[cmdCode](play, sceneCmd);
+ if (cmdCode < ARRAY_COUNT(sSceneCmdHandlers)) {
+ sSceneCmdHandlers[cmdCode](play, sceneCmd);
} else {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("code の値が異常です\n", "code variable is abnormal\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
}
sceneCmd++;
@@ -241,7 +266,7 @@ BAD_RETURN(s32) Scene_CommandSpawnList(PlayState* play, SceneCmd* cmd) {
BAD_RETURN(s32) Scene_CommandSpecialFiles(PlayState* play, SceneCmd* cmd) {
if (cmd->specialFiles.keepObjectId != OBJECT_INVALID) {
play->objectCtx.subKeepSlot = Object_SpawnPersistent(&play->objectCtx, cmd->specialFiles.keepObjectId);
- gSegments[5] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[play->objectCtx.subKeepSlot].segment);
+ gSegments[5] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[play->objectCtx.subKeepSlot].segment);
}
if (cmd->specialFiles.naviQuestHintFileId != NAVI_QUEST_HINTS_NONE) {
@@ -250,8 +275,8 @@ BAD_RETURN(s32) Scene_CommandSpecialFiles(PlayState* play, SceneCmd* cmd) {
}
BAD_RETURN(s32) Scene_CommandRoomBehavior(PlayState* play, SceneCmd* cmd) {
- play->roomCtx.curRoom.behaviorType1 = cmd->roomBehavior.gpFlag1;
- play->roomCtx.curRoom.behaviorType2 = cmd->roomBehavior.gpFlag2 & 0xFF;
+ play->roomCtx.curRoom.type = cmd->roomBehavior.gpFlag1;
+ play->roomCtx.curRoom.environmentType = cmd->roomBehavior.gpFlag2 & 0xFF;
play->roomCtx.curRoom.lensMode = (cmd->roomBehavior.gpFlag2 >> 8) & 1;
play->msgCtx.disableWarpSongs = (cmd->roomBehavior.gpFlag2 >> 0xA) & 1;
}
@@ -373,12 +398,21 @@ BAD_RETURN(s32) Scene_CommandTimeSettings(PlayState* play, SceneCmd* cmd) {
if (((play->envCtx.sceneTimeSpeed == 0) && (gSaveContext.save.cutsceneIndex < 0xFFF0)) ||
(gSaveContext.save.entranceIndex == ENTR_LAKE_HYLIA_8)) {
+#if OOT_VERSION >= PAL_1_0
gSaveContext.skyboxTime = ((void)0, gSaveContext.save.dayTime);
+#endif
+#if OOT_VERSION < PAL_1_0
+ if ((gSaveContext.skyboxTime > CLOCK_TIME(4, 0)) && (gSaveContext.skyboxTime <= CLOCK_TIME(5, 0))) {
+ gSaveContext.skyboxTime = CLOCK_TIME(5, 0) + 1;
+ } else if ((gSaveContext.skyboxTime >= CLOCK_TIME(6, 0)) && (gSaveContext.skyboxTime <= CLOCK_TIME(8, 0))) {
+ gSaveContext.skyboxTime = CLOCK_TIME(8, 0) + 1;
+#else
if ((gSaveContext.skyboxTime > CLOCK_TIME(4, 0)) && (gSaveContext.skyboxTime < CLOCK_TIME(6, 30))) {
gSaveContext.skyboxTime = CLOCK_TIME(5, 0) + 1;
} else if ((gSaveContext.skyboxTime >= CLOCK_TIME(6, 30)) && (gSaveContext.skyboxTime <= CLOCK_TIME(8, 0))) {
gSaveContext.skyboxTime = CLOCK_TIME(8, 0) + 1;
+#endif
} else if ((gSaveContext.skyboxTime >= CLOCK_TIME(16, 0)) && (gSaveContext.skyboxTime <= CLOCK_TIME(17, 0))) {
gSaveContext.skyboxTime = CLOCK_TIME(17, 0) + 1;
} else if ((gSaveContext.skyboxTime >= CLOCK_TIME(18, 0) + 1) &&
@@ -496,7 +530,7 @@ void Scene_SetTransitionForNextEntrance(PlayState* play) {
play->transitionType = ENTRANCE_INFO_START_TRANS_TYPE(gEntranceTable[entranceIndex].field);
}
-SceneCmdHandlerFunc gSceneCmdHandlers[SCENE_CMD_ID_MAX] = {
+SceneCmdHandlerFunc sSceneCmdHandlers[SCENE_CMD_ID_MAX] = {
Scene_CommandPlayerEntryList, // SCENE_CMD_ID_SPAWN_LIST
Scene_CommandActorEntryList, // SCENE_CMD_ID_ACTOR_LIST
Scene_CommandUnused2, // SCENE_CMD_ID_UNUSED_2
diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c
index d9e238e759..5e096a262e 100644
--- a/src/code/z_scene_table.c
+++ b/src/code/z_scene_table.c
@@ -1,10 +1,20 @@
-#include "global.h"
-#include "quake.h"
-#include "versions.h"
-#include "z64frame_advance.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "quake.h"
+#include "regs.h"
+#include "segment_symbols.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64frame_advance.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
#include "assets/scenes/indoors/miharigoya/miharigoya_scene.h"
#include "assets/scenes/indoors/souko/souko_scene.h"
@@ -215,9 +225,9 @@ void Scene_DrawConfigDefault(PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4735);
}
-void* D_8012A2F8[] = {
- gYdanTex_00BA18,
- gYdanTex_00CA18,
+void* sDekuTreeEntranceTextures[] = {
+ gDekuTreeDayEntranceTex,
+ gDekuTreeNightEntranceTex,
};
void Scene_DrawConfigDekuTree(PlayState* play) {
@@ -233,7 +243,8 @@ void Scene_DrawConfigDekuTree(PlayState* play) {
gDPPipeSync(POLY_XLU_DISP++);
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A2F8[((void)0, gSaveContext.save.nightFlag)]));
+ gSPSegment(POLY_OPA_DISP++, 0x08,
+ SEGMENTED_TO_VIRTUAL(sDekuTreeEntranceTextures[((void)0, gSaveContext.save.nightFlag)]));
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4783);
}
@@ -527,7 +538,7 @@ void Scene_DrawConfigThievesHideout(PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 5507);
}
-void* D_8012A330[] = {
+void* sWaterTempleEntranceTextures[] = {
gWaterTempleDayEntranceTex,
gWaterTempleNightEntranceTex,
};
@@ -544,9 +555,11 @@ void Scene_DrawConfigWaterTemple(PlayState* play) {
gameplayFrames = play->gameplayFrames;
#if !OOT_MQ
- gSPSegment(POLY_XLU_DISP++, 0x06, SEGMENTED_TO_VIRTUAL(D_8012A330[((void)0, gSaveContext.save.nightFlag)]));
+ gSPSegment(POLY_XLU_DISP++, 0x06,
+ SEGMENTED_TO_VIRTUAL(sWaterTempleEntranceTextures[((void)0, gSaveContext.save.nightFlag)]));
#else
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A330[((void)0, gSaveContext.save.nightFlag)]));
+ gSPSegment(POLY_XLU_DISP++, 0x08,
+ SEGMENTED_TO_VIRTUAL(sWaterTempleEntranceTextures[((void)0, gSaveContext.save.nightFlag)]));
#endif
if (spB0 == 1) {
@@ -966,11 +979,11 @@ void Scene_DrawConfigLonLonBuildings(PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 6528);
}
-void* sGuardHouseView2Textures[] = {
+void* sGuardHouseView1Textures[] = {
gGuardHouseOutSideView1DayTex,
gGuardHouseOutSideView1NightTex,
};
-void* sGuardHouseView1Textures[] = {
+void* sGuardHouseView2Textures[] = {
gGuardHouseOutSideView2DayTex,
gGuardHouseOutSideView2NightTex,
};
@@ -986,8 +999,8 @@ void Scene_DrawConfigMarketGuardHouse(PlayState* play) {
var = gSaveContext.save.nightFlag;
}
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGuardHouseView1Textures[var]));
- gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sGuardHouseView2Textures[var]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGuardHouseView2Textures[var]));
+ gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sGuardHouseView1Textures[var]));
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
@@ -1190,7 +1203,13 @@ void Scene_DrawConfigKokiriForest(PlayState* play) {
spA3 = 255 - (u8)play->roomCtx.drawParams[0];
} else if (gSaveContext.sceneLayer == 6) {
spA0 = play->roomCtx.drawParams[0] + 500;
- } else if ((!IS_CUTSCENE_LAYER || LINK_IS_ADULT) && GET_EVENTCHKINF(EVENTCHKINF_07)) {
+ } else if (
+#if OOT_VERSION < PAL_1_0
+ !IS_CUTSCENE_LAYER && GET_EVENTCHKINF(EVENTCHKINF_07)
+#else
+ (!IS_CUTSCENE_LAYER || LINK_IS_ADULT) && GET_EVENTCHKINF(EVENTCHKINF_07)
+#endif
+ ) {
spA0 = 2150;
}
@@ -1217,7 +1236,7 @@ void Scene_DrawConfigLakeHylia(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7058);
- if (IS_CUTSCENE_LAYER || (LINK_IS_ADULT && !GET_EVENTCHKINF(EVENTCHKINF_69))) {
+ if (IS_CUTSCENE_LAYER || (LINK_IS_ADULT && !GET_EVENTCHKINF(EVENTCHKINF_RESTORED_LAKE_HYLIA))) {
play->roomCtx.drawParams[0] = 87;
}
@@ -1371,15 +1390,16 @@ void Scene_DrawConfigDesertColossus(PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7339);
}
-void* D_8012A380[] = {
- gSpot12_009678Tex,
- gSpot12_00DE78Tex,
+void* sGerudoFortressWallTextures[] = {
+ gGerudoFortressNightWallTex,
+ gGerudoFortressDayWallTex,
};
void Scene_DrawConfigGerudosFortress(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7363);
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A380[((void)0, gSaveContext.save.nightFlag)]));
+ gSPSegment(POLY_OPA_DISP++, 0x08,
+ SEGMENTED_TO_VIRTUAL(sGerudoFortressWallTextures[((void)0, gSaveContext.save.nightFlag)]));
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7371);
}
@@ -1752,7 +1772,7 @@ SceneDrawConfigFunc sSceneDrawConfigs[SDC_MAX] = {
};
void Scene_Draw(PlayState* play) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (R_HREG_MODE == HREG_MODE_SCENE_CONFIG) {
if (R_SCENE_CONFIG_INIT != HREG_MODE_SCENE_CONFIG) {
R_SCENE_CONFIG_INIT = HREG_MODE_SCENE_CONFIG;
diff --git a/src/code/z_sfx_source.c b/src/code/z_sfx_source.c
index 1dad386594..785afcde35 100644
--- a/src/code/z_sfx_source.c
+++ b/src/code/z_sfx_source.c
@@ -1,6 +1,9 @@
#include "z64sfx_source.h"
-#include "global.h"
+#include "array_count.h"
+#include "sfx.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
void SfxSource_InitAll(PlayState* play) {
SfxSource* sources = &play->sfxSources[0];
diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c
index f8929d6cd4..4e4fd97e9a 100644
--- a/src/code/z_skelanime.c
+++ b/src/code/z_skelanime.c
@@ -1,5 +1,18 @@
-#include "global.h"
+#include "libu64/debug.h"
+#include "avoid_ub.h"
+#include "gfx.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "segment_symbols.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "zelda_arena.h"
+#include "z64animation.h"
+#include "z64animation_legacy.h"
+#include "z64play.h"
#define ANIM_INTERP 1
@@ -71,9 +84,9 @@ void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable, Over
Vec3s rot;
if (skeleton == NULL) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("Si2_Lod_draw():skelがNULLです。\n", "Si2_Lod_draw(): skel is NULL.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return;
}
@@ -184,9 +197,9 @@ void SkelAnime_DrawFlexLod(PlayState* play, void** skeleton, Vec3s* jointTable,
Mtx* mtx = GRAPH_ALLOC(play->state.gfxCtx, dListCount * sizeof(Mtx));
if (skeleton == NULL) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("Si2_Lod_draw_SV():skelがNULLです。\n", "Si2_Lod_draw_SV(): skel is NULL.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return;
}
@@ -287,9 +300,9 @@ void SkelAnime_DrawOpa(PlayState* play, void** skeleton, Vec3s* jointTable, Over
Vec3s rot;
if (skeleton == NULL) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("Si2_draw():skelがNULLです。\n", "Si2_draw(): skel is NULL.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return;
}
@@ -400,9 +413,9 @@ void SkelAnime_DrawFlexOpa(PlayState* play, void** skeleton, Vec3s* jointTable,
Mtx* mtx = GRAPH_ALLOC(play->state.gfxCtx, dListCount * sizeof(Mtx));
if (skeleton == NULL) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("Si2_draw_SV():skelがNULLです。\n", "Si2_draw_SV(): skel is NULL.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return;
}
@@ -553,9 +566,9 @@ Gfx* SkelAnime_Draw(PlayState* play, void** skeleton, Vec3s* jointTable, Overrid
Vec3s rot;
if (skeleton == NULL) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("Si2_draw2():skelがNULLです。NULLを返します。\n", "Si2_draw2(): skel is NULL. Returns NULL.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return NULL;
}
@@ -661,9 +674,9 @@ Gfx* SkelAnime_DrawFlex(PlayState* play, void** skeleton, Vec3s* jointTable, s32
Mtx* mtx = GRAPH_ALLOC(play->state.gfxCtx, dListCount * sizeof(*mtx));
if (skeleton == NULL) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("Si2_draw2_SV():skelがNULLです。NULLを返します。\n", "Si2_draw2_SV(): skel is NULL. Returns NULL.\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return NULL;
}
@@ -818,7 +831,7 @@ void AnimTaskQueue_SetNextGroup(PlayState* play) {
* A transformative task is one that will alter the appearance of an animation.
* These include Copy, Interp, CopyUsingMap, and CopyUsingMapInverted.
*
- * LoadPlayerFrame and ActorMove, which don't alter the appearance of an existing animation,
+ * LoadPlayerFrame and ActorMovement, which don't alter the appearance of an existing animation,
* will always run even if a group has its transformative tasks disabled.
*/
void AnimTaskQueue_DisableTransformTasksForGroup(PlayState* play) {
@@ -849,7 +862,7 @@ AnimTask* AnimTaskQueue_NewTask(AnimTaskQueue* animTaskQueue, s32 type) {
return task;
}
-#if PLATFORM_N64
+#if !PLATFORM_GC
#define LINK_ANIMATION_OFFSET(addr, offset) \
(((uintptr_t)_link_animetionSegmentRomStart) + SEGMENT_OFFSET(addr) + (offset))
#else
@@ -960,13 +973,13 @@ void AnimTaskQueue_AddCopyUsingMapInverted(PlayState* play, s32 vecCount, Vec3s*
/**
* Creates a task which will move an actor according to the translation of its root limb for the current frame.
*/
-void AnimTaskQueue_AddActorMove(PlayState* play, Actor* actor, SkelAnime* skelAnime, f32 moveDiffScaleY) {
+void AnimTaskQueue_AddActorMovement(PlayState* play, Actor* actor, SkelAnime* skelAnime, f32 moveDiffScaleY) {
AnimTask* task = AnimTaskQueue_NewTask(&play->animTaskQueue, ANIMTASK_ACTOR_MOVE);
if (task != NULL) {
- task->data.actorMove.actor = actor;
- task->data.actorMove.skelAnime = skelAnime;
- task->data.actorMove.diffScaleY = moveDiffScaleY;
+ task->data.actorMovement.actor = actor;
+ task->data.actorMovement.skelAnime = skelAnime;
+ task->data.actorMovement.diffScaleY = moveDiffScaleY;
}
}
@@ -1049,9 +1062,10 @@ void AnimTask_CopyUsingMapInverted(PlayState* play, AnimTaskData* data) {
/**
* Move an actor according to the translation of its root limb for the current animation frame.
+ * The actor's current shape yaw will factor into the resulting movement.
*/
-void AnimTask_ActorMove(PlayState* play, AnimTaskData* data) {
- AnimTaskActorMove* task = &data->actorMove;
+void AnimTask_ActorMovement(PlayState* play, AnimTaskData* data) {
+ AnimTaskActorMovement* task = &data->actorMovement;
Actor* actor = task->actor;
Vec3f diff;
@@ -1070,8 +1084,8 @@ typedef void (*AnimTaskFunc)(struct PlayState* play, AnimTaskData* data);
*/
void AnimTaskQueue_Update(PlayState* play, AnimTaskQueue* animTaskQueue) {
static AnimTaskFunc animTaskFuncs[] = {
- AnimTask_LoadPlayerFrame, AnimTask_Copy, AnimTask_Interp, AnimTask_CopyUsingMap,
- AnimTask_CopyUsingMapInverted, AnimTask_ActorMove,
+ AnimTask_LoadPlayerFrame, AnimTask_Copy, AnimTask_Interp, AnimTask_CopyUsingMap,
+ AnimTask_CopyUsingMapInverted, AnimTask_ActorMovement,
};
AnimTask* task = animTaskQueue->tasks;
@@ -1128,10 +1142,10 @@ void SkelAnime_InitLink(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeade
}
if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n",
"Skeleton_Info_Rom_SV_ct Memory allocation error\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
}
LinkAnimation_Change(play, skelAnime, animation, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f);
@@ -1442,9 +1456,9 @@ BAD_RETURN(s32) SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHe
skelAnime->morphTable = morphTable;
}
if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("Skeleton_Info2_ct メモリアロケーションエラー\n", "Skeleton_Info2_ct Memory allocation error\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
}
if (animation != NULL) {
@@ -1475,10 +1489,10 @@ BAD_RETURN(s32) SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSk
skelAnime->morphTable = morphTable;
}
if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n",
"Skeleton_Info_Rom_SV_ct Memory allocation error\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
}
if (animation != NULL) {
@@ -1500,10 +1514,10 @@ BAD_RETURN(s32) SkelAnime_InitSkin(PlayState* play, SkelAnime* skelAnime, Skelet
skelAnime->morphTable =
ZELDA_ARENA_MALLOC(skelAnime->limbCount * sizeof(*skelAnime->morphTable), "../z_skelanime.c", 3121);
if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("Skeleton_Info2_skin2_ct メモリアロケーションエラー\n",
"Skeleton_Info2_skin2_ct Memory allocation error\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
}
if (animation != NULL) {
@@ -1838,7 +1852,7 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) {
f32 cos;
// If `ANIM_FLAG_UPDATE_XZ` behaved as expected, it would also be checked here
- if (skelAnime->moveFlags & ANIM_FLAG_ADJUST_STARTING_POS) {
+ if (skelAnime->movementFlags & ANIM_FLAG_ADJUST_STARTING_POS) {
diff->x = diff->z = 0.0f;
} else {
x = skelAnime->jointTable[0].x;
@@ -1864,8 +1878,8 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) {
skelAnime->prevTransl.z = skelAnime->jointTable[0].z;
skelAnime->jointTable[0].z = skelAnime->baseTransl.z;
- if (skelAnime->moveFlags & ANIM_FLAG_UPDATE_Y) {
- if (skelAnime->moveFlags & ANIM_FLAG_ADJUST_STARTING_POS) {
+ if (skelAnime->movementFlags & ANIM_FLAG_UPDATE_Y) {
+ if (skelAnime->movementFlags & ANIM_FLAG_ADJUST_STARTING_POS) {
diff->y = 0.0f;
} else {
diff->y = skelAnime->jointTable[0].y - skelAnime->prevTransl.y;
@@ -1878,7 +1892,7 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) {
skelAnime->prevTransl.y = skelAnime->jointTable[0].y;
}
- skelAnime->moveFlags &= ~ANIM_FLAG_ADJUST_STARTING_POS;
+ skelAnime->movementFlags &= ~ANIM_FLAG_ADJUST_STARTING_POS;
}
/**
diff --git a/src/code/z_skin.c b/src/code/z_skin.c
index 77b7aedc45..7861acb897 100644
--- a/src/code/z_skin.c
+++ b/src/code/z_skin.c
@@ -1,11 +1,13 @@
-#include "global.h"
-
-#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"
+#include "gfx.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64math.h"
+#include "z64play.h"
+#include "z64skin.h"
+#include "z64skin_matrix.h"
MtxF gSkinLimbMatrices[60]; // holds matrices for each limb of the skeleton currently being drawn
-static s32 sUnused;
-
void Skin_UpdateVertices(MtxF* mtx, SkinVertex* skinVertices, SkinLimbModif* modifEntry, Vtx* vtxBuf, Vec3f* pos) {
Vtx* vtx;
SkinVertex* vertexEntry;
@@ -206,7 +208,7 @@ void Skin_DrawImpl(Actor* actor, PlayState* play, Skin* skin, SkinPostDraw postD
skeleton = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
if (!(drawFlags & SKIN_DRAW_FLAG_CUSTOM_MATRIX)) {
- gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_OPA_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &skin->mtx);
if (mtx == NULL) {
diff --git a/src/code/z_skin_awb.c b/src/code/z_skin_awb.c
index 55633bc872..196ce9aae4 100644
--- a/src/code/z_skin_awb.c
+++ b/src/code/z_skin_awb.c
@@ -1,4 +1,11 @@
-#include "global.h"
+#include "array_count.h"
+#include "segmented_address.h"
+#include "zelda_arena.h"
+#include "z64actor.h"
+#include "z64play.h"
+#include "z64skin.h"
+#include "z64skin_matrix.h"
+
#include "overlays/actors/ovl_En_fHG/z_en_fhg.h"
/**
diff --git a/src/code/z_skin_matrix.c b/src/code/z_skin_matrix.c
index e5d0dfe99b..36d7a02791 100644
--- a/src/code/z_skin_matrix.c
+++ b/src/code/z_skin_matrix.c
@@ -1,5 +1,10 @@
-#include "global.h"
+#include "z64skin_matrix.h"
+
+#include "gfx.h"
+#include "printf.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
// clang-format off
MtxF sMtxFClear = {
@@ -252,10 +257,10 @@ s32 SkinMatrix_Invert(MtxF* src, MtxF* dest) {
// Reaching row = 4 means the column is either all 0 or a duplicate column.
// Therefore src is a singular matrix (0 determinant).
- PRINTF(VT_COL(YELLOW, BLACK));
+ PRINTF_COLOR_WARNING();
PRINTF(T("Skin_Matrix_InverseMatrix():逆行列つくれません\n",
"Skin_Matrix_InverseMatrix(): Cannot create inverse matrix\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
return 2;
}
diff --git a/src/code/z_sram.c b/src/code/z_sram.c
index b5d93f9902..2eef6db036 100644
--- a/src/code/z_sram.c
+++ b/src/code/z_sram.c
@@ -1,6 +1,21 @@
-#include "global.h"
+#include "z64sram.h"
+
+#include "array_count.h"
+#include "file_select_state.h"
+#include "controller.h"
+#include "memory_utils.h"
+#include "printf.h"
#include "terminal.h"
+#include "translation.h"
#include "versions.h"
+#include "z64audio.h"
+#include "z64game.h"
+#include "z64interface.h"
+#include "z64message.h"
+#include "z64ocarina.h"
+#include "z64save.h"
+#include "z64scene.h"
+#include "z64ss_sram.h"
#define SLOT_SIZE (sizeof(SaveContext) + 0x28)
#define CHECKSUM_SIZE (sizeof(Save) / 2)
@@ -17,6 +32,30 @@
#define SLOT_OFFSET(index) (SRAM_HEADER_SIZE + 0x10 + (index * SLOT_SIZE))
+#if !PLATFORM_IQUE
+
+#define SRAM_READ(addr, dramAddr, size) SsSram_ReadWrite(addr, dramAddr, size, OS_READ)
+#define SRAM_WRITE(addr, dramAddr, size) SsSram_ReadWrite(addr, dramAddr, size, OS_WRITE)
+
+#else
+
+void Sram_ReadWriteIQue(s32 addr, void* dramAddr, size_t size, s32 direction) {
+ void* sramAddr;
+
+ addr -= OS_K1_TO_PHYSICAL(0xA8000000);
+ sramAddr = (void*)(__osBbSramAddress + addr);
+ if (direction == OS_READ) {
+ bcopy(sramAddr, dramAddr, size);
+ } else if (direction == OS_WRITE) {
+ bcopy(dramAddr, sramAddr, size);
+ }
+}
+
+#define SRAM_READ(addr, dramAddr, size) Sram_ReadWriteIQue(addr, dramAddr, size, OS_READ)
+#define SRAM_WRITE(addr, dramAddr, size) Sram_ReadWriteIQue(addr, dramAddr, size, OS_WRITE)
+
+#endif
+
u16 gSramSlotOffsets[] = {
SLOT_OFFSET(0),
SLOT_OFFSET(1),
@@ -27,7 +66,26 @@ u16 gSramSlotOffsets[] = {
SLOT_OFFSET(5),
};
-static char sZeldaMagic[] = { '\0', '\0', '\0', '\x98', '\x09', '\x10', '\x21', 'Z', 'E', 'L', 'D', 'A' };
+static u8 sSramDefaultHeader[] = {
+ SOUND_SETTING_STEREO, // SRAM_HEADER_SOUND
+ Z_TARGET_SETTING_SWITCH, // SRAM_HEADER_Z_TARGET
+#if OOT_NTSC
+ LANGUAGE_JPN, // SRAM_HEADER_LANGUAGE
+#else
+ LANGUAGE_ENG, // SRAM_HEADER_LANGUAGE
+#endif
+
+ // SRAM_HEADER_MAGIC
+ 0x98,
+ 0x09,
+ 0x10,
+ 0x21,
+ 'Z',
+ 'E',
+ 'L',
+ 'D',
+ 'A',
+};
static SavePlayerData sNewSavePlayerData = {
{ '\0', '\0', '\0', '\0', '\0', '\0' }, // newf
@@ -138,15 +196,13 @@ static Inventory sNewSaveInventory = {
0, // gsTokens
};
-static u16 sNewSaveChecksum = 0;
+static Checksum sNewSaveChecksum = { 0 };
/**
* Initialize new save.
* This save has an empty inventory with 3 hearts and single magic.
*/
void Sram_InitNewSave(void) {
- SaveContext* temp = &gSaveContext;
-
bzero(&gSaveContext.save.info, sizeof(SaveInfo));
gSaveContext.save.totalDays = 0;
gSaveContext.save.bgsDayCount = 0;
@@ -154,21 +210,33 @@ void Sram_InitNewSave(void) {
gSaveContext.save.info.playerData = sNewSavePlayerData;
gSaveContext.save.info.equips = sNewSaveEquips;
gSaveContext.save.info.inventory = sNewSaveInventory;
+ gSaveContext.save.info.checksum = sNewSaveChecksum;
- temp->save.info.checksum = sNewSaveChecksum;
gSaveContext.save.info.horseData.sceneId = SCENE_HYRULE_FIELD;
gSaveContext.save.info.horseData.pos.x = -1840;
gSaveContext.save.info.horseData.pos.y = 72;
gSaveContext.save.info.horseData.pos.z = 5497;
gSaveContext.save.info.horseData.angle = -0x6AD9;
gSaveContext.save.info.playerData.magicLevel = 0;
- gSaveContext.save.info.infTable[INFTABLE_1DX_INDEX] = 1;
+ gSaveContext.save.info.infTable[INFTABLE_INDEX_1DX] = 1;
gSaveContext.save.info.sceneFlags[SCENE_WATER_TEMPLE].swch = 0x40000000;
}
static SavePlayerData sDebugSavePlayerData = {
{ 'Z', 'E', 'L', 'D', 'A', 'Z' }, // newf
0, // deaths
+#if OOT_VERSION < PAL_1_0
+ {
+ 0x81, // リ
+ 0x87, // ン
+ 0x61, // ク
+ FILENAME_SPACE,
+ FILENAME_SPACE,
+ FILENAME_SPACE,
+ FILENAME_SPACE,
+ FILENAME_SPACE,
+ }, // playerName
+#else
{
FILENAME_UPPERCASE('L'),
FILENAME_UPPERCASE('I'),
@@ -178,7 +246,8 @@ static SavePlayerData sDebugSavePlayerData = {
FILENAME_SPACE,
FILENAME_SPACE,
FILENAME_SPACE,
- }, // playerName
+ }, // playerName
+#endif
0, // n64ddFlag
0xE0, // healthCapacity
0xE0, // health
@@ -284,7 +353,7 @@ static Inventory sDebugSaveInventory = {
0, // gsTokens
};
-static u16 sDebugSaveChecksum = 0;
+static Checksum sDebugSaveChecksum = { 0 };
/**
* Initialize debug save. This is also used on the Title Screen
@@ -296,8 +365,6 @@ static u16 sDebugSaveChecksum = 0;
* and set water level in Water Temple to lowest level.
*/
void Sram_InitDebugSave(void) {
- SaveContext* temp = &gSaveContext;
-
bzero(&gSaveContext.save.info, sizeof(SaveInfo));
gSaveContext.save.totalDays = 0;
gSaveContext.save.bgsDayCount = 0;
@@ -305,15 +372,22 @@ void Sram_InitDebugSave(void) {
gSaveContext.save.info.playerData = sDebugSavePlayerData;
gSaveContext.save.info.equips = sDebugSaveEquips;
gSaveContext.save.info.inventory = sDebugSaveInventory;
+ gSaveContext.save.info.checksum = sDebugSaveChecksum;
- temp->save.info.checksum = sDebugSaveChecksum;
gSaveContext.save.info.horseData.sceneId = SCENE_HYRULE_FIELD;
gSaveContext.save.info.horseData.pos.x = -1840;
gSaveContext.save.info.horseData.pos.y = 72;
gSaveContext.save.info.horseData.pos.z = 5497;
gSaveContext.save.info.horseData.angle = -0x6AD9;
- gSaveContext.save.info.infTable[0] |= 0x5009;
- gSaveContext.save.info.eventChkInf[0] |= 0x123F;
+ gSaveContext.save.info.infTable[INFTABLE_INDEX_0] |= INFTABLE_MASK(INFTABLE_00) | INFTABLE_MASK(INFTABLE_03) |
+ INFTABLE_MASK(INFTABLE_0C) | INFTABLE_MASK(INFTABLE_0E);
+
+ gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_0] |=
+ EVENTCHKINF_MASK(EVENTCHKINF_00_UNUSED) | EVENTCHKINF_MASK(EVENTCHKINF_01_UNUSED) |
+ EVENTCHKINF_MASK(EVENTCHKINF_MIDO_DENIED_DEKU_TREE_ACCESS) | EVENTCHKINF_MASK(EVENTCHKINF_03) |
+ EVENTCHKINF_MASK(EVENTCHKINF_04) | EVENTCHKINF_MASK(EVENTCHKINF_05) | EVENTCHKINF_MASK(EVENTCHKINF_09) |
+ EVENTCHKINF_MASK(EVENTCHKINF_0C);
+
SET_EVENTCHKINF(EVENTCHKINF_80);
SET_EVENTCHKINF(EVENTCHKINF_C4);
@@ -372,7 +446,7 @@ void Sram_OpenSave(SramContext* sramCtx) {
MemCpy(&gSaveContext, sramCtx->readBuff + i, sizeof(Save));
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("SCENE_DATA_ID = %d SceneNo = %d\n", gSaveContext.save.info.playerData.savedSceneId,
((void)0, gSaveContext.save.entranceIndex));
@@ -436,8 +510,11 @@ void Sram_OpenSave(SramContext* sramCtx) {
default:
if (gSaveContext.save.info.playerData.savedSceneId != SCENE_LINKS_HOUSE) {
- gSaveContext.save.entranceIndex =
- (LINK_AGE_IN_YEARS == YEARS_CHILD) ? ENTR_LINKS_HOUSE_0 : ENTR_TEMPLE_OF_TIME_7;
+ if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
+ gSaveContext.save.entranceIndex = ENTR_LINKS_HOUSE_0;
+ } else {
+ gSaveContext.save.entranceIndex = ENTR_TEMPLE_OF_TIME_7;
+ }
} else {
gSaveContext.save.entranceIndex = ENTR_LINKS_HOUSE_0;
}
@@ -445,14 +522,14 @@ void Sram_OpenSave(SramContext* sramCtx) {
}
PRINTF("scene_no = %d\n", gSaveContext.save.entranceIndex);
- PRINTF(VT_RST);
+ PRINTF_RST();
if (gSaveContext.save.info.playerData.health < 0x30) {
gSaveContext.save.info.playerData.health = 0x30;
}
if (gSaveContext.save.info.scarecrowLongSongSet) {
- PRINTF(VT_FGCOL(BLUE));
+ PRINTF_COLOR_BLUE();
PRINTF("\n====================================================================\n");
MemCpy(gScarecrowLongSongPtr, gSaveContext.save.info.scarecrowLongSong,
@@ -464,11 +541,11 @@ void Sram_OpenSave(SramContext* sramCtx) {
}
PRINTF("\n====================================================================\n");
- PRINTF(VT_RST);
+ PRINTF_RST();
}
if (gSaveContext.save.info.scarecrowSpawnSongSet) {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("\n====================================================================\n");
MemCpy(gScarecrowSpawnSongPtr, gSaveContext.save.info.scarecrowSpawnSong,
@@ -480,13 +557,14 @@ void Sram_OpenSave(SramContext* sramCtx) {
}
PRINTF("\n====================================================================\n");
- PRINTF(VT_RST);
+ PRINTF_RST();
}
// if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter
if (GET_EVENTCHKINF(EVENTCHKINF_40) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY)) {
- i = gSaveContext.save.info.eventChkInf[EVENTCHKINF_40_INDEX] & ~EVENTCHKINF_40_MASK;
- gSaveContext.save.info.eventChkInf[EVENTCHKINF_40_INDEX] = i;
+ i = gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_40];
+ i &= ~EVENTCHKINF_MASK(EVENTCHKINF_40);
+ gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_40] = i;
INV_CONTENT(ITEM_ZELDAS_LETTER) = ITEM_CHICKEN;
@@ -499,9 +577,11 @@ void Sram_OpenSave(SramContext* sramCtx) {
if (LINK_AGE_IN_YEARS == YEARS_ADULT && !CHECK_OWNED_EQUIP(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_MASTER)) {
gSaveContext.save.info.inventory.equipment |= OWNED_EQUIP_FLAG(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_MASTER);
+#if OOT_VERSION >= NTSC_1_1
gSaveContext.save.info.equips.buttonItems[0] = ITEM_SWORD_MASTER;
gSaveContext.save.info.equips.equipment &= ~(0xF << (EQUIP_TYPE_SWORD * 4));
gSaveContext.save.info.equips.equipment |= EQUIP_VALUE_SWORD_MASTER << (EQUIP_TYPE_SWORD * 4);
+#endif
}
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
@@ -529,7 +609,7 @@ void Sram_WriteSave(SramContext* sramCtx) {
u16 j;
u16* ptr;
- gSaveContext.save.info.checksum = 0;
+ gSaveContext.save.info.checksum.value = 0;
ptr = (u16*)&gSaveContext;
checksum = j = 0;
@@ -541,7 +621,7 @@ void Sram_WriteSave(SramContext* sramCtx) {
checksum += *ptr++;
}
- gSaveContext.save.info.checksum = checksum;
+ gSaveContext.save.info.checksum.value = checksum;
ptr = (u16*)&gSaveContext;
checksum = 0;
@@ -554,7 +634,7 @@ void Sram_WriteSave(SramContext* sramCtx) {
}
offset = gSramSlotOffsets[gSaveContext.fileNum];
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000) + offset, &gSaveContext, SLOT_SIZE, OS_WRITE);
+ SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000) + offset, &gSaveContext, SLOT_SIZE);
ptr = (u16*)&gSaveContext;
checksum = 0;
@@ -567,7 +647,7 @@ void Sram_WriteSave(SramContext* sramCtx) {
}
offset = gSramSlotOffsets[gSaveContext.fileNum + 3];
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000) + offset, &gSaveContext, SLOT_SIZE, OS_WRITE);
+ SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000) + offset, &gSaveContext, SLOT_SIZE);
}
/**
@@ -588,7 +668,7 @@ void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCt
PRINTF("SRAM START─LOAD\n");
bzero(sramCtx->readBuff, SRAM_SIZE);
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_READ);
+ SRAM_READ(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE);
dayTime = ((void)0, gSaveContext.save.dayTime);
@@ -598,12 +678,19 @@ void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCt
sizeof(Save));
MemCpy(&gSaveContext, sramCtx->readBuff + offset, sizeof(Save));
- oldChecksum = gSaveContext.save.info.checksum;
- gSaveContext.save.info.checksum = 0;
+ oldChecksum = gSaveContext.save.info.checksum.value;
+ gSaveContext.save.info.checksum.value = 0;
ptr = (u16*)&gSaveContext;
PRINTF("\n============= S(%d) =============\n", slotNum);
for (i = newChecksum = j = 0; i < CHECKSUM_SIZE; i++, offset += 2) {
+#if OOT_VERSION < PAL_1_0
+ if (j) {}
+ j += 2;
+ if (j == 0x20) {
+ j = 0;
+ }
+#endif
newChecksum += *ptr++;
}
@@ -616,12 +703,19 @@ void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCt
offset = gSramSlotOffsets[slotNum + 3];
MemCpy(&gSaveContext, sramCtx->readBuff + offset, sizeof(Save));
- oldChecksum = gSaveContext.save.info.checksum;
- gSaveContext.save.info.checksum = 0;
+ oldChecksum = gSaveContext.save.info.checksum.value;
+ gSaveContext.save.info.checksum.value = 0;
ptr = (u16*)&gSaveContext;
PRINTF("================= BACK─UP ========================\n");
for (i = newChecksum = j = 0; i < CHECKSUM_SIZE; i++, offset += 2) {
+#if OOT_VERSION < PAL_1_0
+ if (j) {}
+ j += 2;
+ if (j == 0x20) {
+ j = 0;
+ }
+#endif
newChecksum += *ptr++;
}
PRINTF(T("\n(B)SAVEチェックサム計算 j=%x mmm=%x ",
@@ -642,7 +736,7 @@ void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCt
bzero(&gSaveContext.save.totalDays, sizeof(s32));
bzero(&gSaveContext.save.bgsDayCount, sizeof(s32));
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (!slotNum) {
Sram_InitDebugSave();
gSaveContext.save.info.playerData.newf[0] = 'Z';
@@ -674,32 +768,33 @@ void Sram_VerifyAndLoadAllSaves(FileSelectState* fileSelect, SramContext* sramCt
newChecksum += *ptr++;
}
- gSaveContext.save.info.checksum = newChecksum;
- PRINTF("\nCheck_Sum=%x(%x)\n", gSaveContext.save.info.checksum, newChecksum);
+ gSaveContext.save.info.checksum.value = newChecksum;
+ PRINTF("\nCheck_Sum=%x(%x)\n", gSaveContext.save.info.checksum.value, newChecksum);
i = gSramSlotOffsets[slotNum + 3];
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000) + i, &gSaveContext, SLOT_SIZE, OS_WRITE);
+ SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000) + i, &gSaveContext, SLOT_SIZE);
- PRINTF("????#%x,%x,%x,%x,%x,%x\n", gSaveContext.save.info.playerData.newf[0],
+ //! @bug The ??= below is interpreted as a trigraph for # by IDO
+ PRINTF("??????=%x,%x,%x,%x,%x,%x\n", gSaveContext.save.info.playerData.newf[0],
gSaveContext.save.info.playerData.newf[1], gSaveContext.save.info.playerData.newf[2],
gSaveContext.save.info.playerData.newf[3], gSaveContext.save.info.playerData.newf[4],
gSaveContext.save.info.playerData.newf[5]);
PRINTF(T("\nぽいんと=%x(%d+3) check_sum=%x(%x)\n", "\npoints=%x(%d+3) check_sum=%x(%x)\n"), i,
- slotNum, gSaveContext.save.info.checksum, newChecksum);
+ slotNum, gSaveContext.save.info.checksum.value, newChecksum);
}
i = gSramSlotOffsets[slotNum];
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000) + i, &gSaveContext, SLOT_SIZE, OS_WRITE);
+ SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000) + i, &gSaveContext, SLOT_SIZE);
PRINTF(T("ぽいんと=%x(%d) check_sum=%x(%x)\n", "point=%x(%d) check_sum=%x(%x)\n"), i, slotNum,
- gSaveContext.save.info.checksum, newChecksum);
+ gSaveContext.save.info.checksum.value, newChecksum);
} else {
PRINTF(T("\nSAVEデータ OK!!!!\n", "\nSAVE data OK!!!!\n"));
}
}
bzero(sramCtx->readBuff, SRAM_SIZE);
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_READ);
+ SRAM_READ(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE);
gSaveContext.save.dayTime = dayTime;
PRINTF("SAVECT=%x, NAME=%x, LIFE=%x, ITEM=%x, 64DD=%x, HEART=%x\n", DEATHS, NAME, HEALTH_CAP, QUEST, N64DD,
@@ -751,7 +846,7 @@ void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx) {
u16* ptr;
u16 checksum;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (fileSelect->buttonIndex != 0) {
Sram_InitNewSave();
} else {
@@ -766,14 +861,21 @@ void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx) {
gSaveContext.save.dayTime = CLOCK_TIME(10, 0);
gSaveContext.save.cutsceneIndex = 0xFFF1;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (fileSelect->buttonIndex == 0) {
gSaveContext.save.cutsceneIndex = 0;
}
#endif
for (offset = 0; offset < 8; offset++) {
+#if !PLATFORM_IQUE
gSaveContext.save.info.playerData.playerName[offset] = fileSelect->fileNames[fileSelect->buttonIndex][offset];
+#else
+ // Workaround for EGCS internal compiler error (see docs/compilers.md)
+ u8* fileName = fileSelect->fileNames[fileSelect->buttonIndex];
+
+ gSaveContext.save.info.playerData.playerName[offset] = fileName[offset];
+#endif
}
gSaveContext.save.info.playerData.newf[0] = 'Z';
@@ -802,8 +904,8 @@ void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx) {
}
}
- gSaveContext.save.info.checksum = checksum;
- PRINTF(T("\nチェックサム=%x\n", "\nChecksum = %x\n"), gSaveContext.save.info.checksum);
+ gSaveContext.save.info.checksum.value = checksum;
+ PRINTF(T("\nチェックサム=%x\n", "\nChecksum = %x\n"), gSaveContext.save.info.checksum.value);
offset = gSramSlotOffsets[gSaveContext.fileNum];
PRINTF("I=%x no=%d\n", offset, gSaveContext.fileNum);
@@ -813,7 +915,7 @@ void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx) {
PRINTF("I=%x no=%d\n", offset, gSaveContext.fileNum + 3);
MemCpy(sramCtx->readBuff + offset, &gSaveContext, sizeof(Save));
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_WRITE);
+ SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE);
PRINTF(T("SAVE終了\n", "SAVE end\n"));
PRINTF("z_common_data.file_no = %d\n", gSaveContext.fileNum);
@@ -843,26 +945,26 @@ void Sram_InitSave(FileSelectState* fileSelect, SramContext* sramCtx) {
}
void Sram_EraseSave(FileSelectState* fileSelect, SramContext* sramCtx) {
- s32 offset;
+ u16 offset;
Sram_InitNewSave();
offset = gSramSlotOffsets[fileSelect->selectedFileIndex];
MemCpy(sramCtx->readBuff + offset, &gSaveContext, sizeof(Save));
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000) + offset, &gSaveContext, SLOT_SIZE, OS_WRITE);
+ SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000) + offset, &gSaveContext, SLOT_SIZE);
MemCpy(&fileSelect->n64ddFlags[fileSelect->selectedFileIndex], sramCtx->readBuff + offset + N64DD,
sizeof(fileSelect->n64ddFlags[0]));
offset = gSramSlotOffsets[fileSelect->selectedFileIndex + 3];
MemCpy(sramCtx->readBuff + offset, &gSaveContext, sizeof(Save));
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000) + offset, &gSaveContext, SLOT_SIZE, OS_WRITE);
+ SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000) + offset, &gSaveContext, SLOT_SIZE);
PRINTF(T("CLEAR終了\n", "CLEAR END\n"));
}
void Sram_CopySave(FileSelectState* fileSelect, SramContext* sramCtx) {
- s32 offset;
+ u16 offset;
PRINTF("READ=%d(%x) COPY=%d(%x)\n", fileSelect->selectedFileIndex,
gSramSlotOffsets[fileSelect->selectedFileIndex], fileSelect->copyDestFileIndex,
@@ -877,7 +979,7 @@ void Sram_CopySave(FileSelectState* fileSelect, SramContext* sramCtx) {
offset = gSramSlotOffsets[fileSelect->copyDestFileIndex + 3];
MemCpy(sramCtx->readBuff + offset, &gSaveContext, sizeof(Save));
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_WRITE);
+ SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE);
offset = gSramSlotOffsets[fileSelect->copyDestFileIndex];
@@ -907,33 +1009,33 @@ void Sram_CopySave(FileSelectState* fileSelect, SramContext* sramCtx) {
* Write the first 16 bytes of the read buffer to the SRAM header
*/
void Sram_WriteSramHeader(SramContext* sramCtx) {
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_HEADER_SIZE, OS_WRITE);
+ SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_HEADER_SIZE);
}
void Sram_InitSram(GameState* gameState, SramContext* sramCtx) {
u16 i;
PRINTF("sram_initialize( Game *game, Sram *sram )\n");
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_READ);
+ SRAM_READ(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE);
- for (i = 0; i < ARRAY_COUNTU(sZeldaMagic) - 3; i++) {
- if (sZeldaMagic[i + SRAM_HEADER_MAGIC] != sramCtx->readBuff[i + SRAM_HEADER_MAGIC]) {
+ for (i = 0; i < ARRAY_COUNTU(sSramDefaultHeader) - SRAM_HEADER_MAGIC; i++) {
+ if (sSramDefaultHeader[i + SRAM_HEADER_MAGIC] != sramCtx->readBuff[i + SRAM_HEADER_MAGIC]) {
PRINTF(T("SRAM破壊!!!!!!\n", "SRAM destruction!!!!!!\n"));
-#if OOT_PAL
+#if PLATFORM_GC && OOT_PAL
gSaveContext.language = sramCtx->readBuff[SRAM_HEADER_LANGUAGE];
#endif
- MemCpy(sramCtx->readBuff, sZeldaMagic, sizeof(sZeldaMagic));
+ MemCpy(sramCtx->readBuff, sSramDefaultHeader, sizeof(sSramDefaultHeader));
-#if OOT_PAL
+#if PLATFORM_GC && OOT_PAL
sramCtx->readBuff[SRAM_HEADER_LANGUAGE] = gSaveContext.language;
#endif
Sram_WriteSramHeader(sramCtx);
}
}
- gSaveContext.audioSetting = sramCtx->readBuff[SRAM_HEADER_SOUND] & 3;
- gSaveContext.zTargetSetting = sramCtx->readBuff[SRAM_HEADER_ZTARGET] & 1;
+ gSaveContext.soundSetting = sramCtx->readBuff[SRAM_HEADER_SOUND] & 3;
+ gSaveContext.zTargetSetting = sramCtx->readBuff[SRAM_HEADER_Z_TARGET] & 1;
#if OOT_PAL
gSaveContext.language = sramCtx->readBuff[SRAM_HEADER_LANGUAGE];
@@ -944,25 +1046,25 @@ void Sram_InitSram(GameState* gameState, SramContext* sramCtx) {
}
#endif
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (CHECK_BTN_ANY(gameState->input[2].cur.button, BTN_DRIGHT)) {
bzero(sramCtx->readBuff, SRAM_SIZE);
for (i = 0; i < CHECKSUM_SIZE; i++) {
sramCtx->readBuff[i] = i;
}
- SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_WRITE);
+ SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE);
PRINTF(T("SRAM破壊!!!!!!\n", "SRAM destruction!!!!!!\n"));
}
#endif
PRINTF(T("GOOD!GOOD! サイズ=%d + %d = %d\n", "GOOD! GOOD! Size = %d + %d = %d\n"), sizeof(SaveInfo), 4,
sizeof(SaveInfo) + 4);
- PRINTF(VT_FGCOL(BLUE));
- PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting);
- PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting);
- PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting);
- PRINTF(VT_RST);
- func_800F6700(gSaveContext.audioSetting);
+ PRINTF_COLOR_BLUE();
+ PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting);
+ PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting);
+ PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting);
+ PRINTF_RST();
+ Audio_SetSoundOutputMode(gSaveContext.soundSetting);
}
void Sram_Alloc(GameState* gameState, SramContext* sramCtx) {
@@ -970,5 +1072,5 @@ void Sram_Alloc(GameState* gameState, SramContext* sramCtx) {
ASSERT(sramCtx->readBuff != NULL, "sram->read_buff != NULL", "../z_sram.c", 1295);
}
-void Sram_Init(PlayState* play, SramContext* sramCtx) {
+void Sram_Init(GameState* gameState, SramContext* sramCtx) {
}
diff --git a/src/code/z_ss_sram.c b/src/code/z_ss_sram.c
index dd26d695cb..94e97639aa 100644
--- a/src/code/z_ss_sram.c
+++ b/src/code/z_ss_sram.c
@@ -1,5 +1,6 @@
#include "ultra64.h"
-#include "global.h"
+#include "printf.h"
+#include "z64ss_sram.h"
typedef struct SsSramContext {
/* 0x00 */ OSPiHandle piHandle;
diff --git a/src/code/z_view.c b/src/code/z_view.c
index 1c27679e20..6fe82aaeb3 100644
--- a/src/code/z_view.c
+++ b/src/code/z_view.c
@@ -1,5 +1,16 @@
-#include "global.h"
+#include "z64view.h"
+
+#include "libc64/malloc.h"
+#include "libu64/debug.h"
+#include "avoid_ub.h"
+#include "gfx.h"
+#include "letterbox.h"
+#include "main.h"
+#include "printf.h"
+#include "regs.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
vu32 sLogOnNextViewInit = true;
@@ -201,7 +212,7 @@ void View_SetDistortionScale(View* view, f32 scaleX, f32 scaleY, f32 scaleZ) {
view->distortionScale.z = scaleZ;
}
-s32 View_SetDistortionSpeed(View* view, f32 speed) {
+BAD_RETURN(s32) View_SetDistortionSpeed(View* view, f32 speed) {
view->distortionSpeed = speed;
}
@@ -316,7 +327,7 @@ s32 View_ApplyPerspective(View* view) {
height = view->viewport.bottomY - view->viewport.topY;
aspect = (f32)width / (f32)height;
- if (OOT_DEBUG && R_HREG_MODE == HREG_MODE_PERSPECTIVE) {
+ if (DEBUG_FEATURES && R_HREG_MODE == HREG_MODE_PERSPECTIVE) {
if (R_PERSPECTIVE_INIT != HREG_MODE_PERSPECTIVE) {
R_PERSPECTIVE_INIT = HREG_MODE_PERSPECTIVE;
R_PERSPECTIVE_FOVY = 60;
@@ -331,7 +342,7 @@ s32 View_ApplyPerspective(View* view) {
guPerspective(projection, &view->normal, view->fovy, aspect, view->zNear, view->zFar, view->scale);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (QREG(88) & 1) {
s32 i;
MtxF mf;
@@ -375,7 +386,7 @@ s32 View_ApplyPerspective(View* view) {
view->viewing = *viewing;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
// Debug print view matrix
if (QREG(88) & 2) {
s32 i;
@@ -625,7 +636,7 @@ s32 View_ApplyTo(View* view, s32 mask, Gfx** gfxP) {
return 1;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
/**
* Logs an error and returns nonzero if camera is too far from the origin.
*/
@@ -647,11 +658,11 @@ s32 View_ErrorCheckEyePosition(f32 eyeX, f32 eyeY, f32 eyeZ) {
}
if (error != 0) {
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
PRINTF(T("eye が大きすぎます eye=[%8.3f %8.3f %8.3f] error=%d\n",
"eye is too large eye=[%8.3f %8.3f %8.3f] error=%d\n"),
eyeX, eyeY, eyeZ, error);
- PRINTF(VT_RST);
+ PRINTF_RST();
}
return error;
diff --git a/src/code/z_vimode.c b/src/code/z_vimode.c
index 8abcb62e79..6eceeaa7e7 100644
--- a/src/code/z_vimode.c
+++ b/src/code/z_vimode.c
@@ -1,5 +1,13 @@
-#include "global.h"
+#include "vi_mode.h"
+
+#include "libu64/debug.h"
#include "ultra64/viint.h"
+#include "controller.h"
+#include "gfx.h"
+#include "main.h"
+#include "printf.h"
+#include "regs.h"
+#include "versions.h"
void ViMode_LogPrint(OSViMode* osViMode) {
LOG_ADDRESS("osvimodep", osViMode, "../z_vimode.c", 87);
@@ -85,7 +93,7 @@ void ViMode_Configure(ViMode* viMode, s32 type, s32 tvType, s32 loRes, s32 antia
yScaleHiOddField = modeF ? (loResInterlaced ? (F210(0.75) << 16) : (F210(0.5) << 16)) : 0;
viMode->customViMode.type = type;
- viMode->customViMode.comRegs.ctrl = VI_CTRL_PIXEL_ADV_3 | VI_CTRL_GAMMA_ON | VI_CTRL_GAMMA_DITHER_ON |
+ viMode->customViMode.comRegs.ctrl = VI_CTRL_PIXEL_ADV(3) | VI_CTRL_GAMMA_ON | VI_CTRL_GAMMA_DITHER_ON |
(!loResDeinterlaced ? VI_CTRL_SERRATE_ON : 0) |
(antialiasOn ? VI_CTRL_DIVOT_ON : 0) |
(fb32Bit ? VI_CTRL_TYPE_32 : VI_CTRL_TYPE_16);
@@ -148,15 +156,15 @@ void ViMode_Configure(ViMode* viMode, s32 type, s32 tvType, s32 loRes, s32 antia
viMode->customViMode.comRegs.hSync += HSYNC(1, 4);
}
if (tvType == OS_TV_MPAL) {
- viMode->customViMode.comRegs.leap += LEAP((u16)-4, (u16)-2);
+ viMode->customViMode.comRegs.leap += LEAP(-4, -2);
}
} else {
- viMode->customViMode.fldRegs[0].vStart += START((u16)-3, (u16)-2);
+ viMode->customViMode.fldRegs[0].vStart += START(-3, -2);
if (tvType == OS_TV_MPAL) {
- viMode->customViMode.fldRegs[0].vBurst += BURST((u8)-2, (u8)-1, 12, -1);
+ viMode->customViMode.fldRegs[0].vBurst += BURST(-2, -1, 12, -1);
}
if (tvType == OS_TV_PAL) {
- viMode->customViMode.fldRegs[1].vBurst += BURST((u8)-2, (u8)-1, 2, 0);
+ viMode->customViMode.fldRegs[1].vBurst += BURST(-2, -1, 2, 0);
}
}
@@ -182,6 +190,7 @@ void ViMode_Save(ViMode* viMode) {
R_VI_MODE_EDIT_ULX_ADJ = viMode->leftAdjust;
R_VI_MODE_EDIT_LRX_ADJ = viMode->rightAdjust;
+#if OOT_VERSION >= PAL_1_0
if (SREG(58) == 1) {
SREG(58) = 0;
@@ -200,6 +209,7 @@ void ViMode_Save(ViMode* viMode) {
break;
}
}
+#endif
}
void ViMode_Load(ViMode* viMode) {
@@ -270,8 +280,18 @@ void ViMode_Update(ViMode* viMode, Input* input) {
// Load state from REGs
ViMode_Load(viMode);
+#if OOT_VERSION < PAL_1_0
+ if (viMode->editState == VI_MODE_EDIT_STATE_NEGATIVE_2) {
+ // Log comparison between the NTSC LAN1 mode and the custom mode
+ ViMode_LogPrint(&osViModeNtscLan1);
+ ViMode_LogPrint(&viMode->customViMode);
+ viMode->editState = VI_MODE_EDIT_STATE_NEGATIVE_1;
+ } else if ((viMode->editState == VI_MODE_EDIT_STATE_2) || (viMode->editState == VI_MODE_EDIT_STATE_3))
+#else
if ((viMode->editState == VI_MODE_EDIT_STATE_ACTIVE) || (viMode->editState == VI_MODE_EDIT_STATE_2) ||
- (viMode->editState == VI_MODE_EDIT_STATE_3)) {
+ (viMode->editState == VI_MODE_EDIT_STATE_3))
+#endif
+ {
gScreenWidth = viMode->viWidth;
gScreenHeight = viMode->viHeight;
@@ -333,6 +353,21 @@ void ViMode_Update(ViMode* viMode, Input* input) {
}
// Clamp adjustments
+#if OOT_VERSION < PAL_1_0
+ // Do not allow parts of the framebuffer to end up offscreen
+ if (viMode->leftAdjust < 0) {
+ viMode->leftAdjust = 0;
+ }
+ if (viMode->upperAdjust < 0) {
+ viMode->upperAdjust = 0;
+ }
+ if (viMode->rightAdjust > 0) {
+ viMode->rightAdjust = 0;
+ }
+ if (viMode->lowerAdjust > 0) {
+ viMode->lowerAdjust = 0;
+ }
+#else
if (viMode->editState >= VI_MODE_EDIT_STATE_2) {
// Allow parts of the framebuffer to possibly be offscreen by a small margin
if (viMode->leftAdjust < -16) {
@@ -362,11 +397,21 @@ void ViMode_Update(ViMode* viMode, Input* input) {
viMode->lowerAdjust = 0;
}
}
+#endif
// Configure the custom VI mode with the selected settings
ViMode_Configure(viMode, OS_VI_MPAL_LPN1, osTvType, viMode->loRes, viMode->antialiasOff, viMode->modeN,
viMode->fb16Bit, viMode->viWidth, viMode->viHeight, viMode->leftAdjust, viMode->rightAdjust,
viMode->upperAdjust, viMode->lowerAdjust);
+
+#if OOT_VERSION < PAL_1_0
+ if (viMode->editState == VI_MODE_EDIT_STATE_3) {
+ // Log comparison between the NTSC LAN1 mode and the custom mode
+ ViMode_LogPrint(&osViModeNtscLan1);
+ ViMode_LogPrint(&viMode->customViMode);
+ }
+#endif
+
ViMode_ConfigureFeatures(viMode, viMode->viFeatures);
if (viMode->editState == VI_MODE_EDIT_STATE_3) {
diff --git a/src/code/z_viscvg.c b/src/code/z_viscvg.c
index 9caf39a3f8..51fc6f8e5d 100644
--- a/src/code/z_viscvg.c
+++ b/src/code/z_viscvg.c
@@ -20,7 +20,8 @@
* before the filter is applied.
*/
-#include "global.h"
+#include "gfx.h"
+#include "z64vis.h"
/**
* Draws only coverage: does not retain any of the original pixel RGB, primColor is used as background color.
diff --git a/src/code/z_vismono.c b/src/code/z_vismono.c
index b169f5b026..517f2ada60 100644
--- a/src/code/z_vismono.c
+++ b/src/code/z_vismono.c
@@ -8,7 +8,12 @@
* comments.
*/
-#include "global.h"
+#include "libc64/malloc.h"
+#include "libu64/debug.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfxalloc.h"
+#include "z64vis.h"
// Height of the fragments the color frame buffer (CFB) is split into.
// It is the maximum amount of lines such that all rgba16 SCREEN_WIDTH-long lines fit into
@@ -183,7 +188,7 @@ void VisMono_Draw(VisMono* this, Gfx** gfxP) {
}
void VisMono_DrawOld(VisMono* this) {
- Gfx* dListEnd;
+ UNUSED_NDEBUG Gfx* dListEnd;
if (this->tlut == NULL) {
this->tlut = SYSTEM_ARENA_MALLOC(256 * G_IM_SIZ_16b_BYTES, "../z_vismono.c", 283);
diff --git a/src/code/z_viszbuf.c b/src/code/z_viszbuf.c
index 5a542bc124..431d7f6d9a 100644
--- a/src/code/z_viszbuf.c
+++ b/src/code/z_viszbuf.c
@@ -32,7 +32,8 @@
* again ignored by the RenderMode.
*/
-#include "global.h"
+#include "gfx.h"
+#include "z64vis.h"
// Height of the fragments the z-buffer is split into.
// It is the maximum amount of lines such that all rgba16 SCREEN_WIDTH-long lines fit into TMEM.
diff --git a/src/code/z_vr_box.c b/src/code/z_vr_box.c
index d2aac8c1f3..2fa2122acf 100644
--- a/src/code/z_vr_box.c
+++ b/src/code/z_vr_box.c
@@ -1,6 +1,14 @@
-#include "global.h"
+#include "z64skybox.h"
+
+#include "array_count.h"
+#include "printf.h"
+#include "segment_symbols.h"
#include "terminal.h"
+#include "ultra64.h"
#include "z64environment.h"
+#include "z64game.h"
+#include "z64play.h"
+#include "z64save.h"
typedef struct SkyboxFaceParams {
/* 0x000 */ s32 xStart;
@@ -1030,7 +1038,7 @@ void Skybox_Init(GameState* state, SkyboxContext* skyboxCtx, s16 skyboxId) {
// Precompute vertices and display lists for drawing the skybox
if (skyboxId != SKYBOX_NONE) {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
if (skyboxCtx->drawType != SKYBOX_DRAW_128) {
skyboxCtx->dListBuf = GAME_STATE_ALLOC(state, 8 * 150 * sizeof(Gfx), "../z_vr_box.c", 1636);
@@ -1056,6 +1064,6 @@ void Skybox_Init(GameState* state, SkyboxContext* skyboxCtx, s16 skyboxId) {
Skybox_Calculate128(skyboxCtx, 5); // compute 5 faces, excludes the bottom face
}
}
- PRINTF(VT_RST);
+ PRINTF_RST();
}
}
diff --git a/src/code/z_vr_box_draw.c b/src/code/z_vr_box_draw.c
index 45e3237deb..aa7fa1dae0 100644
--- a/src/code/z_vr_box_draw.c
+++ b/src/code/z_vr_box_draw.c
@@ -1,4 +1,7 @@
-#include "global.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z64skybox.h"
Mtx* sSkyboxDrawMatrix;
diff --git a/src/elf_message/elf_message_field.c b/src/elf_message/elf_message_field.c
index bcdb71caf8..8c672ad50b 100644
--- a/src/elf_message/elf_message_field.c
+++ b/src/elf_message/elf_message_field.c
@@ -1,5 +1,5 @@
-#include "global.h"
#include "z64quest_hint_commands.h"
+#include "z64save.h"
QuestHintCmd gOverworldNaviQuestHints[] = {
QUEST_HINT_FLAG(CHECK, EVENTCHKINF_05, false, 0x40),
@@ -11,7 +11,7 @@ QuestHintCmd gOverworldNaviQuestHints[] = {
QUEST_HINT_STRENGTH_UPG(CHECK, 0, true, 0x46),
QUEST_HINT_FLAG(CHECK, EVENTCHKINF_25, false, 0x47),
QUEST_HINT_MAGIC(CHECK, false, 0x48),
- QUEST_HINT_FLAG(CHECK, EVENTCHKINF_33, false, 0x49),
+ QUEST_HINT_FLAG(CHECK, EVENTCHKINF_GAVE_LETTER_TO_KING_ZORA, false, 0x49),
QUEST_HINT_FLAG(CHECK, EVENTCHKINF_37, false, 0x4A),
QUEST_HINT_FLAG(CHECK, EVENTCHKINF_80, false, 0x4B),
QUEST_HINT_FLAG(CHECK, EVENTCHKINF_43, false, 0x4C),
diff --git a/src/elf_message/elf_message_ydan.c b/src/elf_message/elf_message_ydan.c
index 21b5fe89fa..cde6410b22 100644
--- a/src/elf_message/elf_message_ydan.c
+++ b/src/elf_message/elf_message_ydan.c
@@ -1,4 +1,3 @@
-#include "global.h"
#include "z64quest_hint_commands.h"
QuestHintCmd gDungeonNaviQuestHints[] = {
diff --git a/src/gcc_fix/missing_gcc_functions.c b/src/gcc_fix/missing_gcc_functions.c
index 76bf8e9db6..615dd23549 100644
--- a/src/gcc_fix/missing_gcc_functions.c
+++ b/src/gcc_fix/missing_gcc_functions.c
@@ -5,7 +5,7 @@
/* This file is NOT a part of the original game and only exists to help gcc work. */
/* --------------------------------------------------------------------------------*/
-#include "global.h"
+#include "ultra64.h"
// Self-hosted libc memory functions, gcc assumes these exist even in a freestanding
// environment and there is no way to tell it otherwise.
diff --git a/src/libc/absf.s b/src/libc/absf.s
deleted file mode 100644
index 9df0c0a380..0000000000
--- a/src/libc/absf.s
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "ultra64/asm.h"
-
-#if OOT_DEBUG
-.set noreorder
-#endif
-
-.section .text
-
-.balign 16
-
-LEAF(absf)
- abs.s $f0, $f12
- jr $ra
- nop
-END(absf)
diff --git a/src/libc/fabsf.s b/src/libc/fabsf.s
new file mode 100644
index 0000000000..6f27b4ca1b
--- /dev/null
+++ b/src/libc/fabsf.s
@@ -0,0 +1,9 @@
+#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
+
+.text
+
+LEAF(fabsf)
+ abs.s fv0, fa0
+ jr ra
+END(fabsf)
diff --git a/src/libc/sqrt.s b/src/libc/sqrt.s
index b4246ec865..1d69d3adb2 100644
--- a/src/libc/sqrt.s
+++ b/src/libc/sqrt.s
@@ -1,15 +1,9 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-#if OOT_DEBUG
-.set noreorder
-#endif
-
-.section .text
-
-.balign 16
+.text
LEAF(sqrt)
- sqrt.d $f0, $f12
- jr $ra
- nop
+ sqrt.d fv0, fa0
+ jr ra
END(sqrt)
diff --git a/src/libc64/__osMalloc_gc.c b/src/libc64/__osMalloc_gc.c
index 8d903f5ae5..d6e4e17d13 100644
--- a/src/libc64/__osMalloc_gc.c
+++ b/src/libc64/__osMalloc_gc.c
@@ -1,9 +1,10 @@
-#include "global.h"
-#include "fault.h"
#include "libc64/os_malloc.h"
-#include "terminal.h"
-#if PLATFORM_GC
+#include "alignment.h"
+#include "fault.h"
+#include "printf.h"
+#include "terminal.h"
+#include "translation.h"
#define FILL_ALLOC_BLOCK_FLAG (1 << 0)
#define FILL_FREE_BLOCK_FLAG (1 << 1)
@@ -20,7 +21,7 @@
#define NODE_IS_VALID(node) (((node) != NULL) && ((node)->magic == NODE_MAGIC))
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define NODE_GET_NEXT(node) ArenaImpl_GetNextBlock(node)
#define NODE_GET_PREV(node) ArenaImpl_GetPrevBlock(node)
@@ -76,7 +77,7 @@ OSMesg sArenaLockMsg;
void __osMallocAddBlock(Arena* arena, void* start, s32 size);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u32 __osMalloc_FreeBlockTest_Enable;
u32 ArenaImpl_GetFillAllocBlock(Arena* arena) {
@@ -130,7 +131,7 @@ void ArenaImpl_Unlock(Arena* arena) {
osRecvMesg(&arena->lockQueue, NULL, OS_MESG_BLOCK);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
ArenaNode* ArenaImpl_GetNextBlock(ArenaNode* node) {
ArenaNode* next = node->next;
@@ -211,7 +212,7 @@ void __osMallocAddBlock(Arena* arena, void* start, s32 size) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void ArenaImpl_RemoveAllBlocks(Arena* arena) {
ArenaNode* iter;
ArenaNode* next;
@@ -230,7 +231,7 @@ void ArenaImpl_RemoveAllBlocks(Arena* arena) {
#endif
void __osMallocCleanup(Arena* arena) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
ArenaImpl_RemoveAllBlocks(arena);
#endif
bzero(arena, sizeof(*arena));
@@ -240,7 +241,7 @@ s32 __osMallocIsInitialized(Arena* arena) {
return arena->isInit;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void __osMalloc_FreeBlockTest(Arena* arena, ArenaNode* node) {
ArenaNode* node2 = node;
u32* start;
@@ -497,7 +498,7 @@ void __osFree_NoLock(Arena* arena, void* ptr) {
PRINTF(VT_COL(RED, WHITE) T("__osFree:二重解放(%08x)\n", "__osFree: Double release (%08x)\n") VT_RST, ptr);
return;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (arena != node->arena && arena != NULL) {
PRINTF(VT_COL(RED, WHITE)
T("__osFree:確保時と違う方法で解放しようとした (%08x:%08x)\n",
@@ -542,7 +543,7 @@ void __osFree(Arena* arena, void* ptr) {
ArenaImpl_Unlock(arena);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void __osFree_NoLockDebug(Arena* arena, void* ptr, const char* file, int line) {
ArenaNode* node;
ArenaNode* next;
@@ -711,7 +712,7 @@ void* __osRealloc(Arena* arena, void* ptr, u32 newSize) {
return ptr;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* __osReallocDebug(Arena* arena, void* ptr, u32 newSize, const char* file, int line) {
return __osRealloc(arena, ptr, newSize);
}
@@ -743,7 +744,7 @@ void ArenaImpl_GetSizes(Arena* arena, u32* outMaxFree, u32* outFree, u32* outAll
ArenaImpl_Unlock(arena);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void __osDisplayArena(Arena* arena) {
u32 freeSize;
u32 allocatedSize;
@@ -867,7 +868,7 @@ s32 __osCheckArena(Arena* arena) {
while (iter != NULL) {
//! @bug: Probably intended to be `!NODE_IS_VALID(iter)`
if (NODE_IS_VALID(iter)) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
osSyncPrintf(VT_COL(RED, WHITE) T("おおっと!! (%08x %08x)\n", "Oops!! (%08x %08x)\n") VT_RST, iter,
iter->magic);
#else
@@ -886,10 +887,8 @@ s32 __osCheckArena(Arena* arena) {
return error;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
u8 ArenaImpl_GetAllocFailures(Arena* arena) {
return arena->allocFailures;
}
#endif
-
-#endif
diff --git a/src/libc64/__osMalloc_n64.c b/src/libc64/__osMalloc_n64.c
index 8efb4ec6c8..6b81212963 100644
--- a/src/libc64/__osMalloc_n64.c
+++ b/src/libc64/__osMalloc_n64.c
@@ -1,8 +1,8 @@
-#include "global.h"
-#include "fault.h"
#include "libc64/os_malloc.h"
-#if PLATFORM_N64
+#include "alignment.h"
+#include "fault.h"
+#include "translation.h"
#define NODE_MAGIC 0x7373
@@ -470,5 +470,3 @@ s32 __osCheckArena(Arena* arena) {
u8 ArenaImpl_GetAllocFailures(Arena* arena) {
return arena->allocFailures;
}
-
-#endif
diff --git a/src/libc64/fp.s b/src/libc64/fp.s
index d5b42094a3..32c084ef56 100644
--- a/src/libc64/fp.s
+++ b/src/libc64/fp.s
@@ -1,12 +1,26 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noreorder
-
-.section .data
-
-.balign 16
+.data
#if !PLATFORM_N64
+
+DATA(gPositiveInfinity)
+ .word 0x7F800000
+ENDDATA(gPositiveInfinity)
+
+DATA(gNegativeInfinity)
+ .word 0xFF800000
+ENDDATA(gNegativeInfinity)
+
+DATA(gPositiveZero)
+ .word 0x00000000
+ENDDATA(gPositiveZero)
+
+DATA(gNegativeZero)
+ .word 0x80000000
+ENDDATA(gNegativeZero)
+
DATA(qNaN0x3FFFFF)
.word 0x7FBFFFFF
ENDDATA(qNaN0x3FFFFF)
@@ -18,150 +32,135 @@ ENDDATA(qNaN0x10000)
DATA(sNaN0x3FFFFF)
.word 0x7FFFFFFF
ENDDATA(sNaN0x3FFFFF)
+
#endif
-.section .text
-
-.balign 16
+.text
LEAF(floorf)
- floor.w.s $f12, $f12
- jr $ra
- cvt.s.w $f0, $f12
+ floor.w.s fa0, fa0
+ cvt.s.w fv0, fa0
+ jr ra
END(floorf)
LEAF(floor)
- floor.w.d $f12, $f12
- jr $ra
- cvt.d.w $f0, $f12
+ floor.w.d fa0, fa0
+ cvt.d.w fv0, fa0
+ jr ra
END(floor)
LEAF(lfloorf)
- floor.w.s $f4, $f12
- mfc1 $v0, $f4
- jr $ra
- nop
+ floor.w.s ft0, fa0
+ mfc1 v0, ft0
+ jr ra
END(lfloorf)
LEAF(lfloor)
- floor.w.d $f4, $f12
- mfc1 $v0, $f4
- jr $ra
- nop
+ floor.w.d ft0, fa0
+ mfc1 v0, ft0
+ jr ra
END(lfloor)
LEAF(ceilf)
- ceil.w.s $f12, $f12
- jr $ra
- cvt.s.w $f0, $f12
+ ceil.w.s fa0, fa0
+ cvt.s.w fv0, fa0
+ jr ra
END(ceilf)
LEAF(ceil)
- ceil.w.d $f12, $f12
- jr $ra
- cvt.d.w $f0, $f12
+ ceil.w.d fa0, fa0
+ cvt.d.w fv0, fa0
+ jr ra
END(ceil)
LEAF(lceilf)
- ceil.w.s $f4, $f12
- mfc1 $v0, $f4
- jr $ra
- nop
+ ceil.w.s ft0, fa0
+ mfc1 v0, ft0
+ jr ra
END(lceilf)
LEAF(lceil)
- ceil.w.d $f4, $f12
- mfc1 $v0, $f4
- jr $ra
- nop
+ ceil.w.d ft0, fa0
+ mfc1 v0, ft0
+ jr ra
END(lceil)
LEAF(truncf)
- trunc.w.s $f12, $f12
- jr $ra
- cvt.s.w $f0, $f12
+ trunc.w.s fa0, fa0
+ cvt.s.w fv0, fa0
+ jr ra
END(truncf)
LEAF(trunc)
- trunc.w.d $f12, $f12
- jr $ra
- cvt.d.w $f0, $f12
+ trunc.w.d fa0, fa0
+ cvt.d.w fv0, fa0
+ jr ra
END(trunc)
LEAF(ltruncf)
- trunc.w.s $f4, $f12
- mfc1 $v0, $f4
- jr $ra
- nop
+ trunc.w.s ft0, fa0
+ mfc1 v0, ft0
+ jr ra
END(ltruncf)
LEAF(ltrunc)
- trunc.w.d $f4, $f12
- mfc1 $v0, $f4
- jr $ra
- nop
+ trunc.w.d ft0, fa0
+ mfc1 v0, ft0
+ jr ra
END(ltrunc)
LEAF(nearbyintf)
- round.w.s $f12, $f12
- jr $ra
- cvt.s.w $f0, $f12
+ round.w.s fa0, fa0
+ cvt.s.w fv0, fa0
+ jr ra
END(nearbyintf)
LEAF(nearbyint)
- round.w.d $f12, $f12
- jr $ra
- cvt.d.w $f0, $f12
+ round.w.d fa0, fa0
+ cvt.d.w fv0, fa0
+ jr ra
END(nearbyint)
LEAF(lnearbyintf)
- round.w.s $f4, $f12
- mfc1 $v0, $f4
- jr $ra
- nop
+ round.w.s ft0, fa0
+ mfc1 v0, ft0
+ jr ra
END(lnearbyintf)
LEAF(lnearbyint)
- round.w.d $f4, $f12
- mfc1 $v0, $f4
- jr $ra
- nop
+ round.w.d ft0, fa0
+ mfc1 v0, ft0
+ jr ra
END(lnearbyint)
LEAF(roundf)
- li.s $f4, 0.5
- nop
- add.s $f0, $f12, $f4
- floor.w.s $f0, $f0
- jr $ra
- cvt.s.w $f0, $f0
+ li.s ft0, 0.5
+ add.s fv0, fa0, ft0
+ floor.w.s fv0, fv0
+ cvt.s.w fv0, fv0
+ jr ra
END(roundf)
LEAF(round)
- li.d $f4, 0.5
- nop
- add.d $f0, $f12, $f4
- floor.w.d $f0, $f0
- jr $ra
- cvt.d.w $f0, $f0
+ li.d ft0, 0.5
+ add.d fv0, fa0, ft0
+ floor.w.d fv0, fv0
+ cvt.d.w fv0, fv0
+ jr ra
END(round)
LEAF(lroundf)
- li.s $f4, 0.5
- nop
- add.s $f0, $f12, $f4
- floor.w.s $f0, $f0
- mfc1 $v0, $f0
- jr $ra
- nop
+ li.s ft0, 0.5
+ add.s fv0, fa0, ft0
+ floor.w.s fv0, fv0
+ mfc1 v0, fv0
+ jr ra
END(lroundf)
LEAF(lround)
- li.d $f4, 0.5
- nop
- add.d $f0, $f12, $f4
- floor.w.d $f0, $f0
- mfc1 $v0, $f0
- jr $ra
- nop
+ li.d ft0, 0.5
+ add.d fv0, fa0, ft0
+ floor.w.d fv0, fv0
+ mfc1 v0, fv0
+ jr ra
END(lround)
diff --git a/src/libc64/malloc.c b/src/libc64/malloc.c
index 57dd88e282..8b9c9b6705 100644
--- a/src/libc64/malloc.c
+++ b/src/libc64/malloc.c
@@ -1,7 +1,9 @@
#include "libc64/malloc.h"
-#include "ultra64.h"
-#include "macros.h"
+
#include "libc64/os_malloc.h"
+#include "printf.h"
+#include "translation.h"
+#include "ultra64.h"
#define LOG_SEVERITY_NOLOG 0
#define LOG_SEVERITY_ERROR 2
@@ -9,14 +11,16 @@
Arena gSystemArena;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 gSystemArenaLogSeverity = LOG_SEVERITY_NOLOG;
void SystemArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action) {
if (ptr == NULL) {
if (gSystemArenaLogSeverity >= LOG_SEVERITY_ERROR) {
PRINTF(T("%s: %u バイトの%sに失敗しました\n", "%s: %u bytes %s failed\n"), name, size, action);
+#if PLATFORM_GC
__osDisplayArena(&gSystemArena);
+#endif
return;
}
} else if (gSystemArenaLogSeverity >= LOG_SEVERITY_VERBOSE) {
@@ -41,7 +45,7 @@ void* SystemArena_Malloc(u32 size) {
return ptr;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* SystemArena_MallocDebug(u32 size, const char* file, int line) {
DECLARE_INTERRUPT_MASK
void* ptr;
@@ -67,7 +71,7 @@ void* SystemArena_MallocR(u32 size) {
return ptr;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* SystemArena_MallocRDebug(u32 size, const char* file, int line) {
DECLARE_INTERRUPT_MASK
void* ptr;
@@ -92,7 +96,7 @@ void* SystemArena_Realloc(void* ptr, u32 newSize) {
return ptr;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void* SystemArena_ReallocDebug(void* ptr, u32 newSize, const char* file, int line) {
DECLARE_INTERRUPT_MASK
@@ -113,7 +117,7 @@ void SystemArena_Free(void* ptr) {
RESTORE_INTERRUPTS();
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void SystemArena_FreeDebug(void* ptr, const char* file, int line) {
DECLARE_INTERRUPT_MASK
@@ -140,7 +144,7 @@ void* SystemArena_Calloc(u32 num, u32 size) {
return ret;
}
-#if OOT_DEBUG
+#if PLATFORM_GC && DEBUG_FEATURES
void SystemArena_Display(void) {
PRINTF(T("システムヒープ表示\n", "System heap display\n"));
__osDisplayArena(&gSystemArena);
@@ -156,14 +160,14 @@ void SystemArena_Check(void) {
}
void SystemArena_Init(void* start, u32 size) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
gSystemArenaLogSeverity = LOG_SEVERITY_NOLOG;
#endif
__osMallocInit(&gSystemArena, start, size);
}
void SystemArena_Cleanup(void) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
gSystemArenaLogSeverity = LOG_SEVERITY_NOLOG;
#endif
__osMallocCleanup(&gSystemArena);
diff --git a/src/libc64/math64.c b/src/libc64/math64.c
index 85fb4cedf3..b51eb333ed 100644
--- a/src/libc64/math64.c
+++ b/src/libc64/math64.c
@@ -1,5 +1,5 @@
+#include "libc64/math64.h"
#include "z64math.h"
-#include "macros.h"
#if !PLATFORM_N64
s32 gUseAtanContFrac;
diff --git a/src/libc64/sleep.c b/src/libc64/sleep.c
index 2b67088a1b..17fd3b1e24 100644
--- a/src/libc64/sleep.c
+++ b/src/libc64/sleep.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void Sleep_Cycles(OSTime cycles) {
OSMesgQueue mq;
diff --git a/src/libgcc/__cmpdi2.c b/src/libgcc/__cmpdi2.c
new file mode 100644
index 0000000000..4c477f8263
--- /dev/null
+++ b/src/libgcc/__cmpdi2.c
@@ -0,0 +1,2 @@
+#define L_cmpdi2
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/__divdi3.c b/src/libgcc/__divdi3.c
new file mode 100644
index 0000000000..26cc049c2f
--- /dev/null
+++ b/src/libgcc/__divdi3.c
@@ -0,0 +1,2 @@
+#define L_divdi3
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/__fixdfdi.c b/src/libgcc/__fixdfdi.c
new file mode 100644
index 0000000000..a0c73d0b8f
--- /dev/null
+++ b/src/libgcc/__fixdfdi.c
@@ -0,0 +1,2 @@
+#define L_fixdfdi
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/__fixsfdi.c b/src/libgcc/__fixsfdi.c
new file mode 100644
index 0000000000..4e6d6baf7b
--- /dev/null
+++ b/src/libgcc/__fixsfdi.c
@@ -0,0 +1,2 @@
+#define L_fixsfdi
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/__fixunsdfdi.c b/src/libgcc/__fixunsdfdi.c
new file mode 100644
index 0000000000..9940267102
--- /dev/null
+++ b/src/libgcc/__fixunsdfdi.c
@@ -0,0 +1,2 @@
+#define L_fixunsdfdi
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/__fixunssfdi.c b/src/libgcc/__fixunssfdi.c
new file mode 100644
index 0000000000..34b123e48f
--- /dev/null
+++ b/src/libgcc/__fixunssfdi.c
@@ -0,0 +1,2 @@
+#define L_fixunssfdi
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/__floatdidf.c b/src/libgcc/__floatdidf.c
new file mode 100644
index 0000000000..996973fe0f
--- /dev/null
+++ b/src/libgcc/__floatdidf.c
@@ -0,0 +1,2 @@
+#define L_floatdidf
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/__floatdisf.c b/src/libgcc/__floatdisf.c
new file mode 100644
index 0000000000..433988fa63
--- /dev/null
+++ b/src/libgcc/__floatdisf.c
@@ -0,0 +1,2 @@
+#define L_floatdisf
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/__moddi3.c b/src/libgcc/__moddi3.c
new file mode 100644
index 0000000000..f40a11ec73
--- /dev/null
+++ b/src/libgcc/__moddi3.c
@@ -0,0 +1,2 @@
+#define L_moddi3
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/__udivdi3.c b/src/libgcc/__udivdi3.c
new file mode 100644
index 0000000000..7c2e52eb78
--- /dev/null
+++ b/src/libgcc/__udivdi3.c
@@ -0,0 +1,2 @@
+#define L_udivdi3
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/__umoddi3.c b/src/libgcc/__umoddi3.c
new file mode 100644
index 0000000000..4cb7dec926
--- /dev/null
+++ b/src/libgcc/__umoddi3.c
@@ -0,0 +1,2 @@
+#define L_umoddi3
+#include "src/libgcc/libgcc2.inc.c"
diff --git a/src/libgcc/libgcc2.inc.c b/src/libgcc/libgcc2.inc.c
new file mode 100644
index 0000000000..d8b89b75ef
--- /dev/null
+++ b/src/libgcc/libgcc2.inc.c
@@ -0,0 +1,464 @@
+/* More subroutines needed by GCC output code on some machines. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* As a special exception, if you link this library with other files,
+ some of which are compiled with GCC, to produce an executable,
+ this library does not by itself cause the resulting executable
+ to be covered by the GNU General Public License.
+ This exception does not however invalidate any other reasons why
+ the executable file might be covered by the GNU General Public License. */
+
+/* Modified by ZeldaRET to keep only the parts that are relevant to the iQue build of OoT. */
+
+#include "ultra64/ultratypes.h"
+
+typedef u8 UQItype;
+typedef s32 SItype;
+typedef u32 USItype;
+typedef s64 DItype;
+typedef u64 UDItype;
+
+typedef f32 SFtype;
+typedef f64 DFtype;
+
+typedef s32 word_type;
+
+#define SI_TYPE_SIZE 32
+
+#define DI_SIZE 64
+#define DF_SIZE 53
+#define SF_SIZE 24
+
+#define WORD_SIZE 32
+#define HIGH_HALFWORD_COEFF (((UDItype)1) << (WORD_SIZE / 2))
+#define HIGH_WORD_COEFF (((UDItype)1) << WORD_SIZE)
+
+/* DIstructs are pairs of SItype values in big-endian order. */
+
+struct DIstruct {
+ SItype high, low;
+};
+
+/* We need this union to unpack/pack DImode values, since we don't have
+ any arithmetic yet. Incoming DImode parameters are stored into the
+ `ll' field, and the unpacked result is read from the struct `s'. */
+
+typedef union {
+ struct DIstruct s;
+ DItype ll;
+} DIunion;
+
+extern DItype __fixunssfdi(SFtype original_a);
+extern DItype __fixunsdfdi(DFtype a);
+
+#if defined(L_divdi3) || defined(L_moddi3)
+static inline DItype __negdi2(DItype u) {
+ DIunion w;
+ DIunion uu;
+
+ uu.ll = u;
+
+ w.s.low = -uu.s.low;
+ w.s.high = -uu.s.high - ((USItype)w.s.low > 0);
+
+ return w.ll;
+}
+#endif
+
+#if defined(L_udivdi3) || defined(L_divdi3) || defined(L_umoddi3) || defined(L_moddi3)
+static const UQItype __clz_tab[] = {
+ 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+};
+
+#include "src/libgcc/longlong.h"
+
+static inline UDItype __udivmoddi4(UDItype n, UDItype d, UDItype* rp) {
+ DIunion ww;
+ DIunion nn, dd;
+ DIunion rr;
+ USItype d0, d1, n0, n1, n2;
+ USItype q0, q1;
+ USItype b, bm;
+
+ nn.ll = n;
+ dd.ll = d;
+
+ d0 = dd.s.low;
+ d1 = dd.s.high;
+ n0 = nn.s.low;
+ n1 = nn.s.high;
+
+ if (d1 == 0) {
+ if (d0 > n1) {
+ /* 0q = nn / 0D */
+
+ count_leading_zeros(bm, d0);
+
+ if (bm != 0) {
+ /* Normalize, i.e. make the most significant bit of the
+ denominator set. */
+
+ d0 = d0 << bm;
+ n1 = (n1 << bm) | (n0 >> (SI_TYPE_SIZE - bm));
+ n0 = n0 << bm;
+ }
+
+ udiv_qrnnd(q0, n0, n1, n0, d0);
+ q1 = 0;
+
+ /* Remainder in n0 >> bm. */
+ } else {
+ /* qq = NN / 0d */
+
+ if (d0 == 0) {
+ d0 = 1 / d0; /* Divide intentionally by zero. */
+ }
+
+ count_leading_zeros(bm, d0);
+
+ if (bm == 0) {
+ /* From (n1 >= d0) /\ (the most significant bit of d0 is set),
+ conclude (the most significant bit of n1 is set) /\ (the
+ leading quotient digit q1 = 1).
+
+ This special case is necessary, not an optimization.
+ (Shifts counts of SI_TYPE_SIZE are undefined.) */
+
+ n1 -= d0;
+ q1 = 1;
+ } else {
+ /* Normalize. */
+
+ b = SI_TYPE_SIZE - bm;
+
+ d0 = d0 << bm;
+ n2 = n1 >> b;
+ n1 = (n1 << bm) | (n0 >> b);
+ n0 = n0 << bm;
+
+ udiv_qrnnd(q1, n1, n2, n1, d0);
+ }
+
+ /* n1 != d0... */
+
+ udiv_qrnnd(q0, n0, n1, n0, d0);
+
+ /* Remainder in n0 >> bm. */
+ }
+
+ if (rp != 0) {
+ rr.s.low = n0 >> bm;
+ rr.s.high = 0;
+ *rp = rr.ll;
+ }
+ } else {
+ if (d1 > n1) {
+ /* 00 = nn / DD */
+
+ q0 = 0;
+ q1 = 0;
+
+ /* Remainder in n1n0. */
+ if (rp != 0) {
+ rr.s.low = n0;
+ rr.s.high = n1;
+ *rp = rr.ll;
+ }
+ } else {
+ /* 0q = NN / dd */
+
+ count_leading_zeros(bm, d1);
+ if (bm == 0) {
+ /* From (n1 >= d1) /\ (the most significant bit of d1 is set),
+ conclude (the most significant bit of n1 is set) /\ (the
+ quotient digit q0 = 0 or 1).
+
+ This special case is necessary, not an optimization. */
+
+ /* The condition on the next line takes advantage of that
+ n1 >= d1 (true due to program flow). */
+ if (n1 > d1 || n0 >= d0) {
+ q0 = 1;
+ sub_ddmmss(n1, n0, n1, n0, d1, d0);
+ } else {
+ q0 = 0;
+ }
+
+ q1 = 0;
+
+ if (rp != 0) {
+ rr.s.low = n0;
+ rr.s.high = n1;
+ *rp = rr.ll;
+ }
+ } else {
+ USItype m1, m0;
+ /* Normalize. */
+
+ b = SI_TYPE_SIZE - bm;
+
+ d1 = (d1 << bm) | (d0 >> b);
+ d0 = d0 << bm;
+ n2 = n1 >> b;
+ n1 = (n1 << bm) | (n0 >> b);
+ n0 = n0 << bm;
+
+ udiv_qrnnd(q0, n1, n2, n1, d1);
+ umul_ppmm(m1, m0, q0, d0);
+
+ if (m1 > n1 || (m1 == n1 && m0 > n0)) {
+ q0--;
+ sub_ddmmss(m1, m0, m1, m0, d1, d0);
+ }
+
+ q1 = 0;
+
+ /* Remainder in (n1n0 - m1m0) >> bm. */
+ if (rp != 0) {
+ sub_ddmmss(n1, n0, n1, n0, m1, m0);
+ rr.s.low = (n1 << b) | (n0 >> bm);
+ rr.s.high = n1 >> bm;
+ *rp = rr.ll;
+ }
+ }
+ }
+ }
+
+ ww.s.low = q0;
+ ww.s.high = q1;
+ return ww.ll;
+}
+#endif
+
+#ifdef L_divdi3
+DItype __divdi3(DItype u, DItype v) {
+ word_type c = 0;
+ DIunion uu, vv;
+ DItype w;
+
+ uu.ll = u;
+ vv.ll = v;
+
+ if (uu.s.high < 0) {
+ c = ~c, uu.ll = __negdi2(uu.ll);
+ }
+ if (vv.s.high < 0) {
+ c = ~c, vv.ll = __negdi2(vv.ll);
+ }
+
+ w = __udivmoddi4(uu.ll, vv.ll, (UDItype*)0);
+ if (c) {
+ w = __negdi2(w);
+ }
+
+ return w;
+}
+#endif
+
+#ifdef L_moddi3
+DItype __moddi3(DItype u, DItype v) {
+ word_type c = 0;
+ DIunion uu, vv;
+ DItype w;
+
+ uu.ll = u;
+ vv.ll = v;
+
+ if (uu.s.high < 0) {
+ c = ~c, uu.ll = __negdi2(uu.ll);
+ }
+ if (vv.s.high < 0) {
+ vv.ll = __negdi2(vv.ll);
+ }
+
+ (void)__udivmoddi4(uu.ll, vv.ll, (UDItype*)&w);
+ if (c) {
+ w = __negdi2(w);
+ }
+
+ return w;
+}
+#endif
+
+#ifdef L_umoddi3
+UDItype __umoddi3(UDItype u, UDItype v) {
+ UDItype w;
+
+ (void)__udivmoddi4(u, v, &w);
+
+ return w;
+}
+#endif
+
+#ifdef L_udivdi3
+UDItype __udivdi3(UDItype n, UDItype d) {
+ return __udivmoddi4(n, d, (UDItype*)0);
+}
+#endif
+
+#ifdef L_cmpdi2
+word_type __cmpdi2(DItype a, DItype b) {
+ DIunion au, bu;
+
+ au.ll = a, bu.ll = b;
+
+ if (au.s.high < bu.s.high) {
+ return 0;
+ } else if (au.s.high > bu.s.high) {
+ return 2;
+ }
+ if ((USItype)au.s.low < (USItype)bu.s.low) {
+ return 0;
+ } else if ((USItype)au.s.low > (USItype)bu.s.low) {
+ return 2;
+ }
+ return 1;
+}
+#endif
+
+#ifdef L_fixunsdfdi
+DItype __fixunsdfdi(DFtype a) {
+ DFtype b;
+ UDItype v;
+
+ if (a < 0) {
+ return 0;
+ }
+
+ /* Compute high word of result, as a flonum. */
+ b = (a / HIGH_WORD_COEFF);
+ /* Convert that to fixed (but not to DItype!),
+ and shift it into the high word. */
+ v = (USItype)b;
+ v <<= WORD_SIZE;
+ /* Remove high part from the DFtype, leaving the low part as flonum. */
+ a -= (DFtype)v;
+ /* Convert that to fixed (but not to DItype!) and add it in.
+ Sometimes A comes out negative. This is significant, since
+ A has more bits than a long int does. */
+ if (a < 0) {
+ v -= (USItype)(-a);
+ } else {
+ v += (USItype)a;
+ }
+ return v;
+}
+#endif
+
+#ifdef L_fixdfdi
+DItype __fixdfdi(DFtype a) {
+ if (a < 0) {
+ return -__fixunsdfdi(-a);
+ }
+ return __fixunsdfdi(a);
+}
+#endif
+
+#ifdef L_fixunssfdi
+DItype __fixunssfdi(SFtype original_a) {
+ /* Convert the SFtype to a DFtype, because that is surely not going
+ to lose any bits. Some day someone else can write a faster version
+ that avoids converting to DFtype, and verify it really works right. */
+ DFtype a = original_a;
+ DFtype b;
+ UDItype v;
+
+ if (a < 0) {
+ return 0;
+ }
+
+ /* Compute high word of result, as a flonum. */
+ b = (a / HIGH_WORD_COEFF);
+ /* Convert that to fixed (but not to DItype!),
+ and shift it into the high word. */
+ v = (USItype)b;
+ v <<= WORD_SIZE;
+ /* Remove high part from the DFtype, leaving the low part as flonum. */
+ a -= (DFtype)v;
+ /* Convert that to fixed (but not to DItype!) and add it in.
+ Sometimes A comes out negative. This is significant, since
+ A has more bits than a long int does. */
+ if (a < 0) {
+ v -= (USItype)(-a);
+ } else {
+ v += (USItype)a;
+ }
+ return v;
+}
+#endif
+
+#ifdef L_fixsfdi
+DItype __fixsfdi(SFtype a) {
+ if (a < 0) {
+ return -__fixunssfdi(-a);
+ }
+ return __fixunssfdi(a);
+}
+#endif
+
+#ifdef L_floatdidf
+DFtype __floatdidf(DItype u) {
+ DFtype d;
+
+ d = (SItype)(u >> WORD_SIZE);
+ d *= HIGH_HALFWORD_COEFF;
+ d *= HIGH_HALFWORD_COEFF;
+ d += (USItype)(u & (HIGH_WORD_COEFF - 1));
+
+ return d;
+}
+#endif
+
+#ifdef L_floatdisf
+SFtype __floatdisf(DItype u) {
+ /* Do the calculation in DFmode
+ so that we don't lose any of the precision of the high word
+ while multiplying it. */
+ DFtype f;
+
+ /* Protect against double-rounding error.
+ Represent any low-order bits, that might be truncated in DFmode,
+ by a bit that won't be lost. The bit can go in anywhere below the
+ rounding position of the SFmode. A fixed mask and bit position
+ handles all usual configurations. It doesn't handle the case
+ of 128-bit DImode, however. */
+ if (DF_SIZE < DI_SIZE && DF_SIZE > (DI_SIZE - DF_SIZE + SF_SIZE)) {
+#define REP_BIT ((USItype)1 << (DI_SIZE - DF_SIZE))
+ if (!(-((DItype)1 << DF_SIZE) < u && u < ((DItype)1 << DF_SIZE))) {
+ if ((USItype)u & (REP_BIT - 1)) {
+ u |= REP_BIT;
+ }
+ }
+ }
+ f = (SItype)(u >> WORD_SIZE);
+ f *= HIGH_HALFWORD_COEFF;
+ f *= HIGH_HALFWORD_COEFF;
+ f += (USItype)(u & (HIGH_WORD_COEFF - 1));
+
+ return (SFtype)f;
+}
+#endif
diff --git a/src/libgcc/longlong.h b/src/libgcc/longlong.h
new file mode 100644
index 0000000000..fb6ebb15e5
--- /dev/null
+++ b/src/libgcc/longlong.h
@@ -0,0 +1,150 @@
+/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
+ Copyright (C) 1991, 92, 94, 95, 96, 1997 Free Software Foundation, Inc.
+
+ This definition file is free software; you can redistribute it
+ and/or modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2, or (at your option) any later version.
+
+ This definition file is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Modified by ZeldaRET to keep only the parts that are relevant to the iQue build of OoT. */
+
+#define __BITS4 (SI_TYPE_SIZE / 4)
+#define __ll_B (1L << (SI_TYPE_SIZE / 2))
+#define __ll_lowpart(t) ((USItype)(t) % __ll_B)
+#define __ll_highpart(t) ((USItype)(t) / __ll_B)
+
+/* Define auxiliary asm macros.
+
+ 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand)
+ multiplies two USItype integers MULTIPLER and MULTIPLICAND,
+ and generates a two-part USItype product in HIGH_PROD and
+ LOW_PROD.
+
+ 2) __umulsidi3(a,b) multiplies two USItype integers A and B,
+ and returns a UDItype product. This is just a variant of umul_ppmm.
+
+ 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
+ denominator) divides a two-word unsigned integer, composed by the
+ integers HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and
+ places the quotient in QUOTIENT and the remainder in REMAINDER.
+ HIGH_NUMERATOR must be less than DENOMINATOR for correct operation.
+ If, in addition, the most significant bit of DENOMINATOR must be 1,
+ then the pre-processor symbol UDIV_NEEDS_NORMALIZATION is defined to 1.
+
+ 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
+ denominator). Like udiv_qrnnd but the numbers are signed. The
+ quotient is rounded towards 0.
+
+ 5) count_leading_zeros(count, x) counts the number of zero-bits from
+ the msb to the first non-zero bit. This is the number of steps X
+ needs to be shifted left to set the msb. Undefined for X == 0.
+
+ 6) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1,
+ high_addend_2, low_addend_2) adds two two-word unsigned integers,
+ composed by HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and
+ LOW_ADDEND_2 respectively. The result is placed in HIGH_SUM and
+ LOW_SUM. Overflow (i.e. carry out) is not stored anywhere, and is
+ lost.
+
+ 7) sub_ddmmss(high_difference, low_difference, high_minuend,
+ low_minuend, high_subtrahend, low_subtrahend) subtracts two
+ two-word unsigned integers, composed by HIGH_MINUEND_1 and
+ LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and LOW_SUBTRAHEND_2
+ respectively. The result is placed in HIGH_DIFFERENCE and
+ LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere,
+ and is lost.
+
+ If any of these macros are left undefined for a particular CPU,
+ C macros are used. */
+
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ USItype __x; \
+ __x = (al) + (bl); \
+ (sh) = (ah) + (bh) + (__x < (al)); \
+ (sl) = __x; \
+ } while (0)
+
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ USItype __x; \
+ __x = (al) - (bl); \
+ (sh) = (ah) - (bh) - (__x > (al)); \
+ (sl) = __x; \
+ } while (0)
+
+#if __GNUC__ < 3
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__("multu %2,%3" : "=l"((USItype)(w0)), "=h"((USItype)(w1)) : "d"((USItype)(u)), "d"((USItype)(v)))
+#else
+/* Non-matching version for modern GCC */
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__("multu %2,%3\n\t" \
+ "mflo %0\n\t" \
+ "mfhi %1" \
+ : "=d"(w0), "=d"(w1) \
+ : "d"((USItype)(u)), "d"((USItype)(v)))
+#endif
+
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ USItype __d1, __d0, __q1, __q0; \
+ USItype __r1, __r0, __m; \
+ __d1 = __ll_highpart(d); \
+ __d0 = __ll_lowpart(d); \
+ \
+ __r1 = (n1) % __d1; \
+ __q1 = (n1) / __d1; \
+ __m = (USItype)__q1 * __d0; \
+ __r1 = __r1 * __ll_B | __ll_highpart(n0); \
+ if (__r1 < __m) { \
+ __q1--, __r1 += (d); \
+ if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */ \
+ if (__r1 < __m) \
+ __q1--, __r1 += (d); \
+ } \
+ __r1 -= __m; \
+ \
+ __r0 = __r1 % __d1; \
+ __q0 = __r1 / __d1; \
+ __m = (USItype)__q0 * __d0; \
+ __r0 = __r0 * __ll_B | __ll_lowpart(n0); \
+ if (__r0 < __m) { \
+ __q0--, __r0 += (d); \
+ if (__r0 >= (d)) \
+ if (__r0 < __m) \
+ __q0--, __r0 += (d); \
+ } \
+ __r0 -= __m; \
+ \
+ (q) = (USItype)__q1 * __ll_B | __q0; \
+ (r) = __r0; \
+ } while (0)
+
+#define count_leading_zeros(count, x) \
+ do { \
+ USItype __xr = (x); \
+ USItype __a; \
+ \
+ if (SI_TYPE_SIZE <= 32) { \
+ __a = __xr < ((USItype)1 << 2 * __BITS4) \
+ ? (__xr < ((USItype)1 << __BITS4) ? 0 : __BITS4) \
+ : (__xr < ((USItype)1 << 3 * __BITS4) ? 2 * __BITS4 : 3 * __BITS4); \
+ } else { \
+ for (__a = SI_TYPE_SIZE - 8; __a > 0; __a -= 8) \
+ if (((__xr >> __a) & 0xff) != 0) \
+ break; \
+ } \
+ \
+ (count) = SI_TYPE_SIZE - (__clz_tab[__xr >> __a] + __a); \
+ } while (0)
diff --git a/src/libleo/api/bytetolba.c b/src/libleo/api/bytetolba.c
index 9b28baf2f1..9b25ac840f 100644
--- a/src/libleo/api/bytetolba.c
+++ b/src/libleo/api/bytetolba.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/api/cacreateleomanager.c b/src/libleo/api/cacreateleomanager.c
index 1f2caf6d97..4ae1c7bd9e 100644
--- a/src/libleo/api/cacreateleomanager.c
+++ b/src/libleo/api/cacreateleomanager.c
@@ -1,13 +1,15 @@
-#include "global.h"
#include "ultra64/asm.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
-#include "libc/stdint.h"
+#include "stdint.h"
+#include "attributes.h"
+
+#include "ultra64.h"
s32 LeoCACreateLeoManager(s32 comPri, s32 intPri, OSMesg* cmdBuf, s32 cmdMsgCnt) {
OSPiHandle* driveRomHandle;
- OSPiHandle* leoDiskHandle;
+ UNUSED OSPiHandle* leoDiskHandle;
volatile LEOCmdInquiry cmdBlockInq;
volatile LEOCmd cmdBlockID;
LEODiskID thisID;
diff --git a/src/libleo/api/cjcreateleomanager.c b/src/libleo/api/cjcreateleomanager.c
index e3a5183005..1daf54ca12 100644
--- a/src/libleo/api/cjcreateleomanager.c
+++ b/src/libleo/api/cjcreateleomanager.c
@@ -1,13 +1,15 @@
-#include "global.h"
#include "ultra64/asm.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
-#include "libc/stdint.h"
+#include "stdint.h"
+#include "attributes.h"
+
+#include "ultra64.h"
s32 LeoCJCreateLeoManager(s32 comPri, s32 intPri, OSMesg* cmdBuf, s32 cmdMsgCnt) {
OSPiHandle* driveRomHandle;
- OSPiHandle* leoDiskHandle;
+ UNUSED OSPiHandle* leoDiskHandle;
volatile LEOCmdInquiry cmdBlockInq;
volatile LEOCmd cmdBlockID;
LEODiskID thisID;
diff --git a/src/libleo/api/clearqueue.c b/src/libleo/api/clearqueue.c
index ed5b623280..1972b6080f 100644
--- a/src/libleo/api/clearqueue.c
+++ b/src/libleo/api/clearqueue.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/api/driveexist.c b/src/libleo/api/driveexist.c
index 314a67064e..f658817a3d 100644
--- a/src/libleo/api/driveexist.c
+++ b/src/libleo/api/driveexist.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/api/getaadr.s b/src/libleo/api/getaadr.s
index a36d27a5b3..95c1cfb14d 100644
--- a/src/libleo/api/getaadr.s
+++ b/src/libleo/api/getaadr.s
@@ -1,42 +1,33 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(LeoGetAAdr)
- bltz $a0, .out_of_range
- slti $at, $a0, 0x908
- beqz $at, .out_of_range
- nop
- lui $v1, %hi(asc2tbl)
- sll $t0, $a0, 2
- addiu $v1, %lo(asc2tbl)
- add $t1, $t0, $v1
- lbu $t8, 2($t1)
- lhu $t9, 0($t1)
- li $at, 0x70000
- andi $t2, $t8, 0xF
- addi $t3, $t2, 1
- sw $t3, ($a2)
- lb $t0, 3($t1)
- srl $t4, $t8, 4
- ori $at, $at, 0xEE80
- andi $t5, $t0, 1
- sll $t6, $t5, 4
- or $t7, $t6, $t4
- sw $t7, ($a1)
- sll $v0, $t9, 1
- sra $v1, $t0, 1
- sw $v1, ($a3)
- jr $ra
- add $v0, $v0, $at
+ bltz a0, .out_of_range
+ bge a0, 0x908, .out_of_range
+ sll t0, a0, 2
+ la v1, asc2tbl
+ add t1, t0, v1
+ lbu t8, 2(t1)
+ lhu t9, 0(t1)
+ andi t2, t8, 0xF
+ addi t3, t2, 1
+ sw t3, (a2)
+ lb t0, 3(t1)
+ srl t4, t8, 4
+ andi t5, t0, 1
+ sll t6, t5, 4
+ or t7, t6, t4
+ sw t7, (a1)
+ sll v0, t9, 1
+ sra v1, t0, 1
+ sw v1, (a3)
+ add v0, v0, 0x7EE80
+ jr ra
.out_of_range:
- jr $ra
- li $v0, -1
+ li v0, -1
+ jr ra
END(LeoGetAAdr)
DATA(asc2tbl)
diff --git a/src/libleo/api/getaadr2.s b/src/libleo/api/getaadr2.s
index e3ea0868bb..cac52cd90b 100644
--- a/src/libleo/api/getaadr2.s
+++ b/src/libleo/api/getaadr2.s
@@ -1,33 +1,25 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(LeoGetAAdr2)
- li $at, 0x10000
- srl $t8, $a0, 0xF
- ori $at, $at, 0xFFFE
- and $v1, $t8, $at
- li $at, 0x70000
- ori $at, $at, 0xEE80
- srl $t2, $a0, 0x8
- add $v0, $v1, $at
- andi $t3, $t2, 0xF
- andi $t5, $a0, 0xFE
- addi $t4, $t3, 1
- sll $t6, $t5, 0x18
- andi $t9, $a0, 0x1
- srl $v1, $a0, 0xC
- sw $t4, ($a2)
- sra $t7, $t6, 0x19
- sll $t8, $t9, 0x4
- andi $t1, $v1, 0xF
- sw $t7, ($a3)
- or $t2, $t1, $t8
- jr $ra
- sw $t2, ($a1)
+ srl t8, a0, 15
+ and v1, t8, 0x1FFFE
+ add v0, v1, 0x7EE80
+ srl t2, a0, 8
+ andi t3, t2, 0xF
+ andi t5, a0, 0xFE
+ addi t4, t3, 1
+ sll t6, t5, 24
+ andi t9, a0, 1
+ srl v1, a0, 12
+ sw t4, (a2)
+ sra t7, t6, 25
+ sll t8, t9, 4
+ andi t1, v1, 0xF
+ sw t7, (a3)
+ or t2, t1, t8
+ sw t2, (a1)
+ jr ra
END(LeoGetAAdr2)
diff --git a/src/libleo/api/getkadr.s b/src/libleo/api/getkadr.s
index 22d85cb593..d71719525a 100644
--- a/src/libleo/api/getkadr.s
+++ b/src/libleo/api/getkadr.s
@@ -1,11 +1,7 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
/**
* int LeoGetKAdr(int sjis);
@@ -22,74 +18,61 @@
* @return int Storage offset address into the N64 Disk Drive mask ROM.
*/
LEAF(LeoGetKAdr)
- // Check if the codepoint is in the range 0x8140 to 0x9872.
- li $at, 0x8140
- slt $at, $a0, $at
- bnez $at, .out_of_range
- li $at, 0x9873
- slt $at, $a0, $at
- beqz $at, .out_of_range
- // Characters with codepoints >= 0x8800 are kanji. Arrangement is regular,
- // so convert index directly.
- li $at, 0x8800
- slt $at, $a0, $at
- bnez $at, .nonkanji
- // 0xBC is number of glyphs in one block in the `kanji` file:
- // 0x100 possible codepoints with the same byte1
- // - 0x40 unused at beginning
- // - 1 unused at 0x7F
- // - 3 unused at 0xFD, 0xFE, 0xFF
- li $a2, 0xBC
- // Get byte1 and adjust so starts at 0
- srl $a1, $a0, 8
- addi $a1, $a1, -0x88
- multu $a2, $a1
- // Get byte2 and adjust so starts at 0
- andi $a3, $a0, 0xFF
- addi $a3, $a3, -0x40
- slti $at, $a3, (0x80 - 0x40)
- mflo $a2
- // 0x__7F is always empty and elided in the file, so decrement if larger
- bnezl $at, .kanji_lower_halfblock
- mflo $a2
- addi $a3, $a3, -1
- mflo $a2
+ /* Check if the codepoint is in the range 0x8140 to 0x9872. */
+ blt a0, 0x8140, .out_of_range
+ bge a0, 0x9873, .out_of_range
+ /* Characters with codepoints >= 0x8800 are kanji. Arrangement is regular,
+ * so convert index directly. */
+ li a2, 0xBC
+ blt a0, 0x8800, .nonkanji
+ /* 0xBC is number of glyphs in one block in the `kanji` file:
+ * 0x100 possible codepoints with the same byte1
+ * - 0x40 unused at beginning
+ * - 1 unused at 0x7F
+ * - 3 unused at 0xFD, 0xFE, 0xFF */
+ /* Get byte1 and adjust so starts at 0 */
+ srl a1, a0, 8
+ addi a1, a1, -0x88
+ mul a2, a2, a1
+ /* Get byte2 and adjust so starts at 0 */
+ andi a3, a0, 0xFF
+ addi a3, a3, -0x40
+ /* 0x__7F is always empty and elided in the file, so decrement if larger */
+ blt a3, 0x40, .kanji_lower_halfblock
+ addi a3, a3, -1
.kanji_lower_halfblock:
- addi $a3, $a3, 0x30A
- add $a3, $a3, $a2
- jr $ra
- sll $v0, $a3, 7
- // returns (0x30A + (adjusted byte2) + (adjusted byte1) * 0xBC) * FONT_CHAR_TEX_SIZE
+ mflo a2
+ addi a3, a3, 0x30A
+ add a3, a3, a2
+ sll v0, a3, 7
+ jr ra
+ /* returns (0x30A + (adjusted byte2) + (adjusted byte1) * 0xBC) * FONT_CHAR_TEX_SIZE */
-// Non-kanji are arranged with irregular gaps, use the lookup table.
+/* Non-kanji are arranged with irregular gaps, use the lookup table. */
.nonkanji:
- // Get byte1 and adjust so starts at 0
- srl $a1, $a0, 8
- addi $a1, $a1, -0x81
- multu $a2, $a1
- // Get byte2 and adjust so starts at 0
- andi $a3, $a0, 0xFF
- addi $a3, $a3, -0x40
- slti $at, $a3, (0x80 - 0x40)
- mflo $a2
- // 0x__7F is always empty and elided in the file, so decrement if larger
- bnezl $at, .nonkanji_lower_halfblock
- mflo $a2
- addi $a3, $a3, -1
- mflo $a2
+ /* Get byte1 and adjust so starts at 0 */
+ srl a1, a0, 8
+ addi a1, a1, -0x81
+ mul a2, a2, a1
+ /* Get byte2 and adjust so starts at 0 */
+ andi a3, a0, 0xFF
+ addi a3, a3, -0x40
+ /* 0x__7F is always empty and elided in the file, so decrement if larger */
+ blt a3, 0x40, .nonkanji_lower_halfblock
+ addi a3, a3, -1
.nonkanji_lower_halfblock:
- add $a3, $a3, $a2
- lui $a2, %hi(kantbl)
- sll $a3, $a3, 1
- addiu $a2, %lo(kantbl)
- add $a3, $a3, $a2
- lh $a2, ($a3)
- jr $ra
- sll $v0, $a2, 7
- // returns kantbl[(adjusted byte2) + (adjusted byte1) * 0xBC] * FONT_CHAR_TEX_SIZE
+ mflo a2
+ add a3, a3, a2
+ sll a3, a3, 1
+ la a2, kantbl
+ add a3, a3, a2
+ lh a2, (a3)
+ sll v0, a2, 7
+ jr ra
+ /* returns kantbl[(adjusted byte2) + (adjusted byte1) * 0xBC] * FONT_CHAR_TEX_SIZE */
.out_of_range:
- jr $ra
- li $v0, -1
+ li v0, -1
+ jr ra
END(LeoGetKAdr)
/**
@@ -129,7 +112,7 @@ END(LeoGetKAdr)
* into blocks by high byte.
*/
DATA(kantbl)
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x814_ */ .half 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F
/* 0x815_ */ .half 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F
/* 0x816_ */ .half 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F
@@ -143,7 +126,7 @@ DATA(kantbl)
/* 0x81E_ */ .half 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x81F_ */ .half 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0000, 0x0000, 0x0000, 0x0000, 0x0091
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x824_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0092
/* 0x825_ */ .half 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x826_ */ .half 0x009C, 0x009D, 0x009E, 0x009F, 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB
@@ -157,7 +140,7 @@ DATA(kantbl)
/* 0x82E_ */ .half 0x0111, 0x0112, 0x0113, 0x0114, 0x0115, 0x0116, 0x0117, 0x0118, 0x0119, 0x011A, 0x011B, 0x011C, 0x011D, 0x011E, 0x011F, 0x0120
/* 0x82F_ */ .half 0x0121, 0x0122, 0x0123, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x834_ */ .half 0x0124, 0x0125, 0x0126, 0x0127, 0x0128, 0x0129, 0x012A, 0x012B, 0x012C, 0x012D, 0x012E, 0x012F, 0x0130, 0x0131, 0x0132, 0x0133
/* 0x835_ */ .half 0x0134, 0x0135, 0x0136, 0x0137, 0x0138, 0x0139, 0x013A, 0x013B, 0x013C, 0x013D, 0x013E, 0x013F, 0x0140, 0x0141, 0x0142, 0x0143
/* 0x836_ */ .half 0x0144, 0x0145, 0x0146, 0x0147, 0x0148, 0x0149, 0x014A, 0x014B, 0x014C, 0x014D, 0x014E, 0x014F, 0x0150, 0x0151, 0x0152, 0x0153
@@ -171,7 +154,7 @@ DATA(kantbl)
/* 0x83E_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x83F_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x844_ */ .half 0x01AB, 0x01AC, 0x01AD, 0x01AE, 0x01AF, 0x01B0, 0x01B1, 0x01B2, 0x01B3, 0x01B4, 0x01B5, 0x01B6, 0x01B7, 0x01B8, 0x01B9, 0x01BA
/* 0x845_ */ .half 0x01BB, 0x01BC, 0x01BD, 0x01BE, 0x01BF, 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C4, 0x01C5, 0x01C6, 0x01C7, 0x01C8, 0x01C9, 0x01CA
/* 0x846_ */ .half 0x01CB, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
@@ -185,7 +168,7 @@ DATA(kantbl)
/* 0x84E_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x84F_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x854_ */ .half 0x020E, 0x020F, 0x0210, 0x0211, 0x0212, 0x0213, 0x0214, 0x0215, 0x0216, 0x0217, 0x0218, 0x0219, 0x021A, 0x021B, 0x021C, 0x021D
/* 0x855_ */ .half 0x021E, 0x021F, 0x0220, 0x0221, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0222, 0x0223
/* 0x856_ */ .half 0x0224, 0x0225, 0x0226, 0x0227, 0x0228, 0x0229, 0x022A, 0x022B, 0x022C, 0x022D, 0x022E, 0x022F, 0x0230, 0x0231, 0x0232, 0x0233
@@ -199,7 +182,7 @@ DATA(kantbl)
/* 0x85E_ */ .half 0x026C, 0x026D, 0x026E, 0x026F, 0x0270, 0x0271, 0x0272, 0x0273, 0x0274, 0x0275, 0x0276, 0x0277, 0x0278, 0x0279, 0x027A, 0x027B
/* 0x85F_ */ .half 0x027C, 0x027D, 0x027E, 0x027F, 0x0280, 0x0281, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x864_ */ .half 0x0282, 0x0283, 0x0284, 0x0285, 0x0286, 0x0287, 0x0288, 0x0289, 0x028A, 0x028B, 0x028C, 0x028D, 0x028E, 0x028F, 0x0290, 0x0291
/* 0x865_ */ .half 0x0292, 0x0293, 0x0294, 0x0295, 0x0296, 0x0297, 0x0298, 0x0299, 0x029A, 0x029B, 0x029C, 0x029D, 0x029E, 0x029F, 0x0000, 0x0000
/* 0x866_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
@@ -213,7 +196,7 @@ DATA(kantbl)
/* 0x86E_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x86F_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
-// 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F
+/* 0x___0 0x___1 0x___2 0x___3 0x___4 0x___5 0x___6 0x___7 0x___8 0x___9 0x___A 0x___B 0x___C 0x___D 0x___E 0x___F */
/* 0x874_ */ .half 0x02C0, 0x02C1, 0x02C2, 0x02C3, 0x02C4, 0x02C5, 0x02C6, 0x02C7, 0x02C8, 0x02C9, 0x02CA, 0x02CB, 0x02CC, 0x02CD, 0x02CE, 0x02CF
/* 0x875_ */ .half 0x02D0, 0x02D1, 0x02D2, 0x02D3, 0x02D4, 0x02D5, 0x02D6, 0x02D7, 0x02D8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
/* 0x876_ */ .half 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
diff --git a/src/libleo/api/lbatobyte.c b/src/libleo/api/lbatobyte.c
index dc5b1f5dbe..e260fced18 100644
--- a/src/libleo/api/lbatobyte.c
+++ b/src/libleo/api/lbatobyte.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/api/readwrite.c b/src/libleo/api/readwrite.c
index a4c27d26f9..570b94b203 100644
--- a/src/libleo/api/readwrite.c
+++ b/src/libleo/api/readwrite.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/api/seek.c b/src/libleo/api/seek.c
index dbbc4651ac..8abbb0f0a5 100644
--- a/src/libleo/api/seek.c
+++ b/src/libleo/api/seek.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/api/spdlmotor.c b/src/libleo/api/spdlmotor.c
index 8c0ffa9ffa..21ef2b0223 100644
--- a/src/libleo/api/spdlmotor.c
+++ b/src/libleo/api/spdlmotor.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/api/testunitready.c b/src/libleo/api/testunitready.c
index f5770f86b7..2116bc9e2a 100644
--- a/src/libleo/api/testunitready.c
+++ b/src/libleo/api/testunitready.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leo_tbl.c b/src/libleo/leo/leo_tbl.c
index f4093fbd53..083fabb728 100644
--- a/src/libleo/leo/leo_tbl.c
+++ b/src/libleo/leo/leo_tbl.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leoc2ecc.c b/src/libleo/leo/leoc2ecc.c
index 4d268df51b..5b770b138d 100644
--- a/src/libleo/leo/leoc2ecc.c
+++ b/src/libleo/leo/leoc2ecc.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leocmdex.c b/src/libleo/leo/leocmdex.c
index ca3101fb0a..d7887d4944 100644
--- a/src/libleo/leo/leocmdex.c
+++ b/src/libleo/leo/leocmdex.c
@@ -1,7 +1,9 @@
-#include "global.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
+#include "attributes.h"
+
+#include "ultra64.h"
extern vu16 LEOrw_flags;
diff --git a/src/libleo/leo/leodiskinit.c b/src/libleo/leo/leodiskinit.c
index 6c11f728e2..92020029ea 100644
--- a/src/libleo/leo/leodiskinit.c
+++ b/src/libleo/leo/leodiskinit.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leofunc.c b/src/libleo/leo/leofunc.c
index 20809e55f6..35ba14005f 100644
--- a/src/libleo/leo/leofunc.c
+++ b/src/libleo/leo/leofunc.c
@@ -1,7 +1,8 @@
-#include "global.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
+#include "array_count.h"
+#include "ultra64.h"
static s32 __leoResetCalled = false;
static s32 __leoQueuesCreated = false;
diff --git a/src/libleo/leo/leoglobals.c b/src/libleo/leo/leoglobals.c
index ca11ec6c4e..28a99f626d 100644
--- a/src/libleo/leo/leoglobals.c
+++ b/src/libleo/leo/leoglobals.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leoinquiry.c b/src/libleo/leo/leoinquiry.c
index cfa4f1c27f..b23a9ab454 100644
--- a/src/libleo/leo/leoinquiry.c
+++ b/src/libleo/leo/leoinquiry.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leoint.c b/src/libleo/leo/leoint.c
index f337b15080..33ac3d2010 100644
--- a/src/libleo/leo/leoint.c
+++ b/src/libleo/leo/leoint.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leointerrupt.c b/src/libleo/leo/leointerrupt.c
index d9e2175ad3..fc547cfd5c 100644
--- a/src/libleo/leo/leointerrupt.c
+++ b/src/libleo/leo/leointerrupt.c
@@ -1,11 +1,11 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
#include "ultra64/internal.h"
extern OSThread* __osRunQueue;
-extern OSHWIntr __OSGlobalIntMask;
+extern OSIntMask __OSGlobalIntMask;
void __osLeoAbnormalResume(void);
void __osLeoResume(void);
diff --git a/src/libleo/leo/leomecha.c b/src/libleo/leo/leomecha.c
index 861b2970fb..d0804f033c 100644
--- a/src/libleo/leo/leomecha.c
+++ b/src/libleo/leo/leomecha.c
@@ -1,7 +1,9 @@
-#include "global.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
+#include "attributes.h"
+
+#include "ultra64.h"
extern s32 currentCommand;
@@ -52,6 +54,7 @@ u8 leoChk_asic_ready(u32 asic_cmd) {
if (asic_cmd == 0x80000) {
return 0;
}
+ FALLTHROUGH;
case 43:
if (!(asic_cur_status & 0x800000)) {
if (asic_cmd == 0x90000) {
@@ -65,6 +68,7 @@ u8 leoChk_asic_ready(u32 asic_cmd) {
return 37;
}
}
+ FALLTHROUGH;
default:
break;
@@ -72,7 +76,7 @@ u8 leoChk_asic_ready(u32 asic_cmd) {
if (asic_cmd & 1) {
break;
}
-
+ FALLTHROUGH;
case 21:
return 0;
}
@@ -265,6 +269,7 @@ u32 leoChk_err_retry(u32 sense) {
switch (sense) {
case LEO_SENSE_POWERONRESET_DEVICERESET_OCCURED:
unit_atten |= 2;
+ FALLTHROUGH;
case LEO_SENSE_DIAGNOSTIC_FAILURE:
case LEO_SENSE_COMMAND_PHASE_ERROR:
case LEO_SENSE_WAITING_NMI:
@@ -278,8 +283,10 @@ u32 leoChk_err_retry(u32 sense) {
switch (sense) {
case LEO_SENSE_POWERONRESET_DEVICERESET_OCCURED:
unit_atten |= 2;
+ FALLTHROUGH;
case LEO_SENSE_MEDIUM_MAY_HAVE_CHANGED:
unit_atten |= 1;
+ FALLTHROUGH;
case LEO_SENSE_DIAGNOSTIC_FAILURE:
case LEO_SENSE_COMMAND_PHASE_ERROR:
case LEO_SENSE_WAITING_NMI:
diff --git a/src/libleo/leo/leomode_sel.c b/src/libleo/leo/leomode_sel.c
index cd45fd8350..fe36bc16af 100644
--- a/src/libleo/leo/leomode_sel.c
+++ b/src/libleo/leo/leomode_sel.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leomotor.c b/src/libleo/leo/leomotor.c
index 251ac2a95b..652b626ee0 100644
--- a/src/libleo/leo/leomotor.c
+++ b/src/libleo/leo/leomotor.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leomseq_tbl.c b/src/libleo/leo/leomseq_tbl.c
index 4944e63336..f94979f623 100644
--- a/src/libleo/leo/leomseq_tbl.c
+++ b/src/libleo/leo/leomseq_tbl.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leoram.c b/src/libleo/leo/leoram.c
index 7600632482..159aaaae27 100644
--- a/src/libleo/leo/leoram.c
+++ b/src/libleo/leo/leoram.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leord_capa.c b/src/libleo/leo/leord_capa.c
index d060a64936..86b71ac903 100644
--- a/src/libleo/leo/leord_capa.c
+++ b/src/libleo/leo/leord_capa.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leord_diskid.c b/src/libleo/leo/leord_diskid.c
index fde59bcc9c..df4d6bf24b 100644
--- a/src/libleo/leo/leord_diskid.c
+++ b/src/libleo/leo/leord_diskid.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leoread.c b/src/libleo/leo/leoread.c
index 62017cd159..11dc28c41c 100644
--- a/src/libleo/leo/leoread.c
+++ b/src/libleo/leo/leoread.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leoreset.c b/src/libleo/leo/leoreset.c
index ff6e0f9439..40eb56482c 100644
--- a/src/libleo/leo/leoreset.c
+++ b/src/libleo/leo/leoreset.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leorezero.c b/src/libleo/leo/leorezero.c
index 73b58df765..9e28bf13a3 100644
--- a/src/libleo/leo/leorezero.c
+++ b/src/libleo/leo/leorezero.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leoseek.c b/src/libleo/leo/leoseek.c
index 566866255e..2f530ac726 100644
--- a/src/libleo/leo/leoseek.c
+++ b/src/libleo/leo/leoseek.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leotestunit.c b/src/libleo/leo/leotestunit.c
index a6a6dbdb62..4c81d7970a 100644
--- a/src/libleo/leo/leotestunit.c
+++ b/src/libleo/leo/leotestunit.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leotimer.c b/src/libleo/leo/leotimer.c
index 9ac64bb2bb..f6c7fdfc05 100644
--- a/src/libleo/leo/leotimer.c
+++ b/src/libleo/leo/leotimer.c
@@ -1,7 +1,9 @@
-#include "global.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
+#include "attributes.h"
+
+#include "ultra64.h"
typedef struct {
/* 0x0 */ u8 year;
@@ -78,6 +80,7 @@ void leoSetTimer(void) {
LEOcur_command->header.status = LEO_STATUS_CHECK_CONDITION;
return;
}
+ FALLTHROUGH;
case 1:
// Month value cannot be 0
if (temp == 0) {
@@ -85,6 +88,7 @@ void leoSetTimer(void) {
LEOcur_command->header.status = LEO_STATUS_CHECK_CONDITION;
return;
}
+ FALLTHROUGH;
default:
// Verify max value of each time info
if (ymdupper[ymd] < temp) {
diff --git a/src/libleo/leo/leotranslat.c b/src/libleo/leo/leotranslat.c
index 1f297a792b..6eb2011367 100644
--- a/src/libleo/leo/leotranslat.c
+++ b/src/libleo/leo/leotranslat.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/libleo/leo/leoutil.c b/src/libleo/leo/leoutil.c
index 08f88938cf..e90ea1f678 100644
--- a/src/libleo/leo/leoutil.c
+++ b/src/libleo/leo/leoutil.c
@@ -1,7 +1,8 @@
-#include "global.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
+#include "array_count.h"
+#include "ultra64.h"
u16 leoLba_to_phys(u32 lba) {
u16 vzone_num;
diff --git a/src/libleo/leo/leowrite.c b/src/libleo/leo/leowrite.c
index deeafc9ad8..91b2163f0b 100644
--- a/src/libleo/leo/leowrite.c
+++ b/src/libleo/leo/leowrite.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
diff --git a/src/boot/logutils.c b/src/libu64/debug.c
similarity index 95%
rename from src/boot/logutils.c
rename to src/libu64/debug.c
index aa67313134..e1ed15fe45 100644
--- a/src/boot/logutils.c
+++ b/src/libu64/debug.c
@@ -1,8 +1,9 @@
-#include "global.h"
#include "fault.h"
+#include "printf.h"
#include "terminal.h"
+#include "translation.h"
-#if PLATFORM_N64 || OOT_DEBUG
+#if PLATFORM_N64 || DEBUG_FEATURES
f32 LogUtils_CheckFloatRange(const char* exp, int line, const char* valueName, f32 value, const char* minName, f32 min,
const char* maxName, f32 max) {
if (value < min || max < value) {
@@ -13,7 +14,7 @@ f32 LogUtils_CheckFloatRange(const char* exp, int line, const char* valueName, f
}
#endif
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 LogUtils_CheckIntRange(const char* exp, int line, const char* valueName, s32 value, const char* minName, s32 min,
const char* maxName, s32 max) {
if (value < min || max < value) {
@@ -113,14 +114,14 @@ void LogUtils_LogThreadId(const char* name, int line) {
void LogUtils_HungupThread(const char* name, int line) {
OSId threadId = osGetThreadId(NULL);
-#if PLATFORM_N64 || OOT_DEBUG
+#if PLATFORM_N64 || DEBUG_FEATURES
osSyncPrintf("*** HungUp in thread %d, [%s:%d] ***\n", threadId, name, line);
#endif
Fault_AddHungupAndCrash(name, line);
}
void LogUtils_ResetHungup(void) {
-#if PLATFORM_N64 || OOT_DEBUG
+#if PLATFORM_N64 || DEBUG_FEATURES
osSyncPrintf("*** Reset ***\n");
#endif
Fault_AddHungupAndCrash("Reset", 0);
diff --git a/src/code/gfxprint.c b/src/libu64/gfxprint.c
similarity index 99%
rename from src/code/gfxprint.c
rename to src/libu64/gfxprint.c
index db586a8513..c47d52a3a5 100644
--- a/src/code/gfxprint.c
+++ b/src/libu64/gfxprint.c
@@ -1,4 +1,7 @@
-#include "global.h"
+#include "libc64/aprintf.h"
+#include "libu64/gfxprint.h"
+#include "attributes.h"
+#include "translation.h"
u16 sGfxPrintFontTLUT[64] = {
0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000,
@@ -382,7 +385,7 @@ void GfxPrint_Open(GfxPrint* this, Gfx* dList) {
this->dList = dList;
GfxPrint_Setup(this);
} else {
-#if PLATFORM_N64 || OOT_DEBUG
+#if PLATFORM_N64 || DEBUG_FEATURES
osSyncPrintf(T("gfxprint_open:2重オープンです\n", "gfxprint_open: Double open\n"));
#endif
}
diff --git a/src/code/load_gc.c b/src/libu64/load_gc.c
similarity index 96%
rename from src/code/load_gc.c
rename to src/libu64/load_gc.c
index 39662cbcef..340780a130 100644
--- a/src/code/load_gc.c
+++ b/src/libu64/load_gc.c
@@ -1,4 +1,8 @@
-#include "global.h"
+#include "libu64/overlay.h"
+#include "ultra64.h"
+#include "printf.h"
+#include "translation.h"
+#include "z64dma.h"
size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd, void* allocatedRamAddr) {
s32 pad[3];
diff --git a/src/code/loadfragment2_gc.c b/src/libu64/loadfragment2_gc.c
similarity index 90%
rename from src/code/loadfragment2_gc.c
rename to src/libu64/loadfragment2_gc.c
index 6befb8c9b9..5ad556e506 100644
--- a/src/code/loadfragment2_gc.c
+++ b/src/libu64/loadfragment2_gc.c
@@ -1,4 +1,6 @@
-#include "global.h"
+#include "libc64/malloc.h"
+#include "libu64/overlay.h"
+#include "printf.h"
void* Overlay_AllocateAndLoad(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd) {
void* allocatedRamAddr = SYSTEM_ARENA_MALLOC_R((intptr_t)vramEnd - (intptr_t)vramStart, "../loadfragment2.c", 31);
diff --git a/src/code/loadfragment2_n64.c b/src/libu64/loadfragment2_n64.c
similarity index 99%
rename from src/code/loadfragment2_n64.c
rename to src/libu64/loadfragment2_n64.c
index 6a06b1ba09..be0e5295d9 100644
--- a/src/code/loadfragment2_n64.c
+++ b/src/libu64/loadfragment2_n64.c
@@ -6,7 +6,10 @@
*
* @see Overlay_Relocate
*/
-#include "global.h"
+#include "libc64/malloc.h"
+#include "libu64/overlay.h"
+#include "translation.h"
+#include "z64dma.h"
s32 gOverlayLogSeverity = 2;
diff --git a/src/code/logseverity_gc.c b/src/libu64/logseverity_gc.c
similarity index 51%
rename from src/code/logseverity_gc.c
rename to src/libu64/logseverity_gc.c
index 940aa87cc8..50c2eb4ab8 100644
--- a/src/code/logseverity_gc.c
+++ b/src/libu64/logseverity_gc.c
@@ -1,3 +1,3 @@
-#include "global.h"
+#include "libu64/overlay.h"
s32 gOverlayLogSeverity = 2;
diff --git a/src/code/mtxuty-cvt.c b/src/libu64/mtxuty-cvt.c
similarity index 88%
rename from src/code/mtxuty-cvt.c
rename to src/libu64/mtxuty-cvt.c
index 10f88f7827..759c686d95 100644
--- a/src/code/mtxuty-cvt.c
+++ b/src/libu64/mtxuty-cvt.c
@@ -1,4 +1,6 @@
-#include "global.h"
+#include "ultra64.h"
+#include "libu64/debug.h"
+#include "libu64/mtxuty-cvt.h"
void MtxConv_F2L(Mtx* m1, MtxF* m2) {
s32 i;
diff --git a/src/code/padutils.c b/src/libu64/pad.c
similarity index 97%
rename from src/code/padutils.c
rename to src/libu64/pad.c
index 7a0407ef96..551cd495b9 100644
--- a/src/code/padutils.c
+++ b/src/libu64/pad.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "ultra64.h"
+#include "libu64/pad.h"
void PadUtils_Init(Input* input) {
bzero(input, sizeof(Input));
diff --git a/src/code/padsetup.c b/src/libu64/padsetup.c
similarity index 93%
rename from src/code/padsetup.c
rename to src/libu64/padsetup.c
index 20a546ae3f..fde25418f6 100644
--- a/src/code/padsetup.c
+++ b/src/libu64/padsetup.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "ultra64.h"
+#include "libu64/padsetup.h"
s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status) {
s32 ret;
diff --git a/src/code/rcp_utils.c b/src/libu64/rcp_utils.c
similarity index 94%
rename from src/code/rcp_utils.c
rename to src/libu64/rcp_utils.c
index 574a1a5df8..27e929f7d1 100644
--- a/src/code/rcp_utils.c
+++ b/src/libu64/rcp_utils.c
@@ -1,6 +1,8 @@
-#include "global.h"
+#include "libu64/rcp_utils.h"
+#include "ultra64.h"
+#include "printf.h"
-#if PLATFORM_N64 || OOT_DEBUG
+#if PLATFORM_N64 || DEBUG_FEATURES
#define RCP_UTILS_PRINTF osSyncPrintf
#elif IDO_PRINTF_WORKAROUND
#define RCP_UTILS_PRINTF(args) (void)0
@@ -55,9 +57,12 @@ void RcpUtils_PrintRegisterStatus(void) {
void RcpUtils_Reset(void) {
RcpUtils_PrintRegisterStatus();
+
// Flush the RDP pipeline and freeze clock counter
osDpSetStatus(DPC_SET_FREEZE | DPC_SET_FLUSH);
+
// Halt the RSP, disable interrupt on break and set "task done" signal
__osSpSetStatus(SP_SET_HALT | SP_SET_TASKDONE | SP_CLR_INTR_BREAK);
+
RcpUtils_PrintRegisterStatus();
}
diff --git a/src/code/relocation_gc.c b/src/libu64/relocation_gc.c
similarity index 98%
rename from src/code/relocation_gc.c
rename to src/libu64/relocation_gc.c
index f178121c19..91d7eaf790 100644
--- a/src/code/relocation_gc.c
+++ b/src/libu64/relocation_gc.c
@@ -6,7 +6,10 @@
*
* @see Overlay_Relocate
*/
-#include "global.h"
+#include "libu64/overlay.h"
+#include "attributes.h"
+#include "printf.h"
+#include "ultra64.h"
// Extract MIPS register rs from an instruction word
#define MIPS_REG_RS(insn) (((insn) >> 0x15) & 0x1F)
@@ -58,7 +61,7 @@ void Overlay_Relocate(void* allocatedRamAddr, OverlayRelocationSection* ovlReloc
u32 dbg;
s32 relocOffset = 0;
u32 relocatedValue = 0;
- uintptr_t unrelocatedAddress = 0;
+ UNUSED_NDEBUG uintptr_t unrelocatedAddress = 0;
uintptr_t relocatedAddress = 0;
uintptr_t vramu32 = (uintptr_t)vramStart;
diff --git a/src/code/code_800FC620.c b/src/libu64/runtime.c
similarity index 70%
rename from src/code/code_800FC620.c
rename to src/libu64/runtime.c
index 8bed1af23c..aa0c507b7d 100644
--- a/src/code/code_800FC620.c
+++ b/src/libu64/runtime.c
@@ -1,4 +1,6 @@
-#include "global.h"
+#include "libu64/runtime.h"
+
+#include "libc64/malloc.h"
#include "libc64/os_malloc.h"
typedef void (*arg3_800FC868)(void*);
@@ -6,29 +8,20 @@ typedef void (*arg3_800FC8D8)(void*, u32);
typedef void (*arg3_800FC948)(void*, u32, u32, u32, u32, u32, u32, u32, u32);
typedef void (*arg3_800FCA18)(void*, u32);
-typedef struct InitFunc {
+typedef struct CtorEntry {
s32 nextOffset;
void (*func)(void);
-} InitFunc;
+} CtorEntry;
-// .data
-void* sInitFuncs = NULL;
+void* sGlobalCtorEntries = NULL;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
char sNew[] = "new";
#else
char sNew[] = "";
#endif
-#if !PLATFORM_N64
-char D_80134488[0x18] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00,
- 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
-};
-#endif
-
-// possibly some kind of new() function
-void* func_800FC800(u32 size) {
+void* Runtime_New(u32 size) {
DECLARE_INTERRUPT_MASK
void* ptr;
@@ -38,7 +31,7 @@ void* func_800FC800(u32 size) {
size = 1;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
ptr = __osMallocDebug(&gSystemArena, size, sNew, 0);
#else
ptr = __osMalloc(&gSystemArena, size);
@@ -48,8 +41,7 @@ void* func_800FC800(u32 size) {
return ptr;
}
-// possibly some kind of delete() function
-void func_800FC83C(void* ptr) {
+void Runtime_Delete(void* ptr) {
DECLARE_INTERRUPT_MASK
DISABLE_INTERRUPTS();
@@ -88,7 +80,7 @@ void* func_800FC948(void* blk, u32 nBlk, u32 blkSize, arg3_800FC948 arg3) {
DISABLE_INTERRUPTS();
if (blk == NULL) {
- blk = func_800FC800(nBlk * blkSize);
+ blk = Runtime_New(nBlk * blkSize);
}
if (blk != NULL && arg3 != NULL) {
@@ -122,39 +114,39 @@ void func_800FCA18(void* blk, u32 nBlk, u32 blkSize, arg3_800FCA18 arg3, s32 arg
}
if (arg4 != 0) {
- func_800FC83C(blk);
+ Runtime_Delete(blk);
}
}
RESTORE_INTERRUPTS();
}
-void func_800FCB34(void) {
- InitFunc* initFunc = (InitFunc*)&sInitFuncs;
- u32 nextOffset = initFunc->nextOffset;
- InitFunc* prev = NULL;
+void Runtime_ExecuteGlobalCtors(void) {
+ CtorEntry* ctorEntry = (CtorEntry*)&sGlobalCtorEntries;
+ u32 nextOffset = ctorEntry->nextOffset;
+ CtorEntry* prevEntry = NULL;
while (nextOffset != 0) {
- initFunc = (InitFunc*)((s32)initFunc + nextOffset);
+ ctorEntry = (CtorEntry*)((s32)ctorEntry + nextOffset);
- if (initFunc->func != NULL) {
- initFunc->func();
+ if (ctorEntry->func != NULL) {
+ ctorEntry->func();
}
- nextOffset = initFunc->nextOffset;
- initFunc->nextOffset = (s32)prev;
- prev = initFunc;
+ nextOffset = ctorEntry->nextOffset;
+ ctorEntry->nextOffset = (s32)prevEntry;
+ prevEntry = ctorEntry;
}
- sInitFuncs = prev;
+ sGlobalCtorEntries = prevEntry;
}
-void SystemHeap_Init(void* start, u32 size) {
+void Runtime_Init(void* start, u32 size) {
#if PLATFORM_N64
__osMallocInit(&gSystemArena, start, size);
#else
SystemArena_Init(start, size);
#endif
- func_800FCB34();
+ Runtime_ExecuteGlobalCtors();
}
diff --git a/src/boot/stackcheck.c b/src/libu64/stackcheck.c
similarity index 93%
rename from src/boot/stackcheck.c
rename to src/libu64/stackcheck.c
index 399b6c051b..69fe224ee8 100644
--- a/src/boot/stackcheck.c
+++ b/src/libu64/stackcheck.c
@@ -1,5 +1,9 @@
-#include "global.h"
+#include "libu64/debug.h"
+#include "attributes.h"
+#include "printf.h"
+#include "stackcheck.h"
#include "terminal.h"
+#include "translation.h"
StackEntry* sStackInfoListStart = NULL;
StackEntry* sStackInfoListEnd = NULL;
@@ -111,7 +115,7 @@ u32 StackCheck_Check(StackEntry* entry) {
return ret;
} else {
u32* last;
- u32 used;
+ UNUSED_NDEBUG u32 used;
u32 free;
u32 ret;
@@ -143,7 +147,7 @@ u32 StackCheck_Check(StackEntry* entry) {
u32 StackCheck_GetState(StackEntry* entry) {
u32* last;
- u32 used;
+ UNUSED_NDEBUG u32 used;
u32 free;
u32 ret;
@@ -158,25 +162,25 @@ u32 StackCheck_GetState(StackEntry* entry) {
if (free == 0) {
ret = STACK_STATUS_OVERFLOW;
- PRINTF(VT_FGCOL(RED));
+ PRINTF_COLOR_RED();
} else if (free < (u32)entry->minSpace && entry->minSpace != -1) {
ret = STACK_STATUS_WARNING;
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
} else {
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
ret = STACK_STATUS_OK;
}
-#if !OOT_DEBUG
+#if !DEBUG_FEATURES
// This string is still in .rodata for retail builds
(void)"(null)";
#endif
PRINTF("head=%08x tail=%08x last=%08x used=%08x free=%08x [%s]\n", entry->head, entry->tail, last, used, free,
entry->name != NULL ? entry->name : "(null)");
- PRINTF(VT_RST);
+ PRINTF_RST();
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (ret != STACK_STATUS_OK) {
LogUtils_LogHexDump(entry->head, (uintptr_t)entry->tail - (uintptr_t)entry->head);
}
diff --git a/src/libultra/audio/auxbus.c b/src/libultra/audio/auxbus.c
new file mode 100644
index 0000000000..d6e827d217
--- /dev/null
+++ b/src/libultra/audio/auxbus.c
@@ -0,0 +1,33 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+
+Acmd* alAuxBusPull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p) {
+ Acmd* ptr = p;
+ ALAuxBus* m = (ALAuxBus*)filter;
+ ALFilter** sources = m->sources;
+ s32 i;
+
+ // clear the output buffers here
+ aClearBuffer(ptr++, AL_AUX_L_OUT, outCount << 1);
+ aClearBuffer(ptr++, AL_AUX_R_OUT, outCount << 1);
+
+ for (i = 0; i < m->sourceCount; i++) {
+ ptr = sources[i]->handler(sources[i], outp, outCount, sampleOffset, ptr);
+ }
+ return ptr;
+}
+
+s32 alAuxBusParam(void* filter, s32 paramID, void* param) {
+ ALAuxBus* m = (ALAuxBus*)filter;
+ ALFilter** sources = m->sources;
+
+ switch (paramID) {
+ case AL_FILTER_ADD_SOURCE:
+ sources[m->sourceCount++] = (ALFilter*)param;
+ break;
+
+ default:
+ break;
+ }
+ return 0;
+}
diff --git a/src/libultra/audio/copy.c b/src/libultra/audio/copy.c
new file mode 100644
index 0000000000..1da435cc9e
--- /dev/null
+++ b/src/libultra/audio/copy.c
@@ -0,0 +1,11 @@
+#include "libaudio.h"
+
+void alCopy(void* src, void* dest, s32 len) {
+ s32 i;
+ u8* s = (u8*)src;
+ u8* d = (u8*)dest;
+
+ for (i = 0; i < len; i++) {
+ *d++ = *s++;
+ }
+}
diff --git a/src/libultra/audio/drvrnew.c b/src/libultra/audio/drvrnew.c
new file mode 100644
index 0000000000..e549347e0f
--- /dev/null
+++ b/src/libultra/audio/drvrnew.c
@@ -0,0 +1,266 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+#include "stdbool.h"
+#include "stddef.h"
+
+// WARNING: THE FOLLOWING CONSTANT MUST BE KEPT IN SYNC WITH SCALING IN MICROCODE!!!
+#define SCALE 16384
+
+// the following arrays contain default parameters for a few hopefully useful effects.
+#define ms *(((s32)(44.1f)) & ~7)
+
+// clang-format off
+static s32 SMALLROOM_PARAMS[2 + 3 * 8] = {
+ /* sections */ 3,
+ /* length */ 100 ms,
+ /* input output fbcoef ffcoef gain rate depth coef */
+ 0, 54 ms, 9830, -9830, 0, 0, 0, 0,
+ 19 ms, 38 ms, 3276, -3276, 0x3FFF, 0, 0, 0,
+ 0, 60 ms, 5000, 0, 0, 0, 0, 0x5000
+};
+
+static s32 BIGROOM_PARAMS[2 + 4 * 8] = {
+ /* sections */ 4,
+ /* length */ 100 ms,
+ /* input output fbcoef ffcoef gain rate depth coef */
+ 0, 66 ms, 9830, -9830, 0, 0, 0, 0,
+ 22 ms, 54 ms, 3276, -3276, 0x3FFF, 0, 0, 0,
+ 66 ms, 91 ms, 3276, -3276, 0x3FFF, 0, 0, 0,
+ 0, 94 ms, 8000, 0, 0, 0, 0, 0x5000,
+};
+
+static s32 ECHO_PARAMS[2 + 1 * 8] = {
+ /* sections */ 1,
+ /* length */ 200 ms,
+ /* input output fbcoef ffcoef gain rate depth coef */
+ 0, 179 ms, 12000, 0, 0x7FFF, 0, 0, 0,
+};
+
+static s32 CHORUS_PARAMS[2 + 1 * 8] = {
+ /* sections */ 1,
+ /* length */ 20 ms,
+ /* input output fbcoef ffcoef gain rate depth coef */
+ 0, 5 ms, 0x4000, 0, 0x7FFF, 7600, 700, 0,
+};
+
+static s32 FLANGE_PARAMS[2 + 1 * 8] = {
+ /* sections */ 1,
+ /* length */ 20 ms,
+ /* input output fbcoef ffcoef gain rate depth coef */
+ 0, 5 ms, 0, 0x5FFF, 0x7FFF, 380, 500, 0,
+};
+
+static s32 NULL_PARAMS[2 + 1 * 8] = {
+ /* sections */ 0,
+ /* length */ 0,
+ /* input output fbcoef ffcoef gain rate depth coef */
+ 0, 0, 0, 0, 0, 0, 0, 0,
+};
+// clang-format on
+
+void _init_lpfilter(ALLowPass* lp) {
+ s32 i;
+ s32 temp;
+ s16 fc;
+ f64 ffc;
+ f64 fcoef;
+
+ temp = lp->fc * SCALE;
+ fc = temp >> 15;
+ lp->fgain = SCALE - fc;
+
+ lp->first = true;
+ for (i = 0; i < 8; i++) {
+ lp->fcvec.fccoef[i] = 0;
+ }
+
+ lp->fcvec.fccoef[i++] = fc;
+ fcoef = ffc = (f64)fc / SCALE;
+
+ for (; i < 16; i++) {
+ fcoef *= ffc;
+ lp->fcvec.fccoef[i] = (s16)(s32)(fcoef * SCALE);
+ }
+}
+
+void alFxNew(ALFx* r, ALSynConfig* c, ALHeap* hp) {
+ u16 i;
+ u16 j;
+ u16 k;
+ s32* param = NULL;
+ ALFilter* f = &r->filter;
+ ALDelay* d;
+
+ alFilterNew(f, NULL, alFxParam, AL_FX);
+ f->handler = alFxPull;
+ r->paramHdl = (ALSetFXParam)alFxParamHdl;
+
+ switch (c->fxType) {
+ case AL_FX_SMALLROOM:
+ param = SMALLROOM_PARAMS;
+ break;
+
+ case AL_FX_BIGROOM:
+ param = BIGROOM_PARAMS;
+ break;
+
+ case AL_FX_ECHO:
+ param = ECHO_PARAMS;
+ break;
+
+ case AL_FX_CHORUS:
+ param = CHORUS_PARAMS;
+ break;
+
+ case AL_FX_FLANGE:
+ param = FLANGE_PARAMS;
+ break;
+
+ case AL_FX_CUSTOM:
+ param = c->params;
+ break;
+
+ default:
+ param = NULL_PARAMS;
+ break;
+ }
+
+ j = 0;
+
+ r->section_count = param[j++];
+ r->length = param[j++];
+
+ r->delay = alHeapAlloc(hp, r->section_count, sizeof(ALDelay));
+ r->base = alHeapAlloc(hp, r->length, sizeof(s16));
+ r->input = r->base;
+
+ for (k = 0; k < r->length; k++) {
+ r->base[k] = 0;
+ }
+
+ for (i = 0; i < r->section_count; i++) {
+ d = &r->delay[i];
+ d->input = param[j++];
+ d->output = param[j++];
+ d->fbcoef = param[j++];
+ d->ffcoef = param[j++];
+ d->gain = param[j++];
+
+ if (param[j] != 0) {
+#define RANGE 2.0
+ d->rsinc = ((((f32)param[j++]) / 1000.0f) * RANGE) / c->outputRate;
+
+ // the following constant is derived from:
+ //
+ // ratio = 2^(cents/1200)
+ //
+ // and therefore for hundredths of a cent
+ // x
+ // ln(ratio) = ---------------
+ // (120,000)/ln(2)
+ // where
+ // 120,000/ln(2) = 173123.40...
+#define CONVERT 173123.404906676
+ d->rsgain = (((f32)param[j++]) / CONVERT) * (d->output - d->input);
+ d->rsval = 1.0f;
+ d->rsdelta = 0.0f;
+ d->rs = alHeapAlloc(hp, 1, sizeof(ALResampler));
+ d->rs->state = alHeapAlloc(hp, 1, sizeof(RESAMPLE_STATE));
+ d->rs->delta = 0.0f;
+ d->rs->first = true;
+ } else {
+ d->rs = NULL;
+ j++;
+ j++;
+ }
+
+ if (param[j] != 0) {
+ d->lp = alHeapAlloc(hp, 1, sizeof(ALLowPass));
+ d->lp->fstate = alHeapAlloc(hp, 1, sizeof(POLEF_STATE));
+ d->lp->fc = param[j++];
+ _init_lpfilter(d->lp);
+ } else {
+ d->lp = NULL;
+ j++;
+ }
+ }
+}
+
+void alEnvmixerNew(ALEnvMixer* e, ALHeap* hp) {
+ alFilterNew(&e->filter, alEnvmixerPull, alEnvmixerParam, AL_ENVMIX);
+ e->state = alHeapAlloc(hp, 1, sizeof(ENVMIX_STATE));
+ e->first = true;
+ e->motion = AL_STOPPED;
+ e->volume = 1;
+ e->ltgt = 1;
+ e->rtgt = 1;
+ e->cvolL = 1;
+ e->cvolR = 1;
+ e->dryamt = 0;
+ e->wetamt = 0;
+ e->lratm = 1;
+ e->lratl = 0;
+ e->lratm = 1;
+ e->lratl = 0;
+ e->delta = 0;
+ e->segEnd = 0;
+ e->pan = 0;
+ e->ctrlList = NULL;
+ e->ctrlTail = NULL;
+ e->sources = NULL;
+}
+
+void alLoadNew(ALLoadFilter* f, ALDMANew dmaNew, ALHeap* hp) {
+ s32 i;
+
+ // init filter superclass
+ alFilterNew(&f->filter, alAdpcmPull, alLoadParam, AL_ADPCM);
+
+ f->state = alHeapAlloc(hp, 1, sizeof(ADPCM_STATE));
+ f->lstate = alHeapAlloc(hp, 1, sizeof(ADPCM_STATE));
+
+ f->dma = dmaNew(&f->dmaState);
+
+ // init the adpcm state
+ f->lastsam = 0;
+ f->first = true;
+ f->memin = 0;
+}
+
+void alResampleNew(ALResampler* r, ALHeap* hp) {
+ alFilterNew(&r->filter, alResamplePull, alResampleParam, AL_RESAMPLE);
+
+ // Init resampler state
+ r->state = alHeapAlloc(hp, 1, sizeof(RESAMPLE_STATE));
+ r->delta = 0.0f;
+ r->first = true;
+ r->motion = AL_STOPPED;
+ r->ratio = 1.0f;
+ r->upitch = 0;
+ r->ctrlList = NULL;
+ r->ctrlTail = NULL;
+ // state in the ucode is initialized by the A_INIT flag
+}
+
+void alAuxBusNew(ALAuxBus* m, void* sources, s32 maxSources) {
+ alFilterNew(&m->filter, alAuxBusPull, alAuxBusParam, AL_AUXBUS);
+ m->sourceCount = 0;
+ m->maxSources = maxSources;
+ m->sources = (ALFilter**)sources;
+}
+
+void alMainBusNew(ALMainBus* m, void* sources, s32 maxSources) {
+ alFilterNew(&m->filter, alMainBusPull, alMainBusParam, AL_MAINBUS);
+ m->sourceCount = 0;
+ m->maxSources = maxSources;
+ m->sources = (ALFilter**)sources;
+}
+
+void alSaveNew(ALSave* f) {
+ // init filter superclass
+ alFilterNew(&f->filter, alSavePull, alSaveParam, AL_SAVE);
+
+ // init the save state, which is a virtual dram address
+ f->dramout = 0;
+ f->first = true;
+}
diff --git a/src/libultra/audio/env.c b/src/libultra/audio/env.c
new file mode 100644
index 0000000000..654c682ab3
--- /dev/null
+++ b/src/libultra/audio/env.c
@@ -0,0 +1,421 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+#include "stdbool.h"
+#include "stddef.h"
+#include "ultra64/convert.h"
+
+#define EQPOWER_LENGTH 128
+static s16 eqpower[EQPOWER_LENGTH] = {
+ 32767, 32764, 32757, 32744, 32727, 32704, 32677, 32644, 32607, 32564, 32517, 32464, 32407, 32344, 32277, 32205,
+ 32127, 32045, 31958, 31866, 31770, 31668, 31561, 31450, 31334, 31213, 31087, 30957, 30822, 30682, 30537, 30388,
+ 30234, 30075, 29912, 29744, 29572, 29395, 29214, 29028, 28838, 28643, 28444, 28241, 28033, 27821, 27605, 27385,
+ 27160, 26931, 26698, 26461, 26220, 25975, 25726, 25473, 25216, 24956, 24691, 24423, 24151, 23875, 23596, 23313,
+ 23026, 22736, 22442, 22145, 21845, 21541, 21234, 20924, 20610, 20294, 19974, 19651, 19325, 18997, 18665, 18331,
+ 17993, 17653, 17310, 16965, 16617, 16266, 15913, 15558, 15200, 14840, 14477, 14113, 13746, 13377, 13006, 12633,
+ 12258, 11881, 11503, 11122, 10740, 10357, 9971, 9584, 9196, 8806, 8415, 8023, 7630, 7235, 6839, 6442,
+ 6044, 5646, 5246, 4845, 4444, 4042, 3640, 3237, 2833, 2429, 2025, 1620, 1216, 810, 405, 0
+};
+
+static Acmd* _pullSubFrame(void* filter, s16* inp, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p);
+static s16 _getRate(f64 vol, f64 tgt, s32 count, u16* ratel);
+static f32 _getVol(f32 ivol, s32 samples, s16 ratem, u16 ratel);
+
+Acmd* alEnvmixerPull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p) {
+ Acmd* ptr = p;
+ ALEnvMixer* e = (ALEnvMixer*)filter;
+ s16 inp;
+ s32 lastOffset;
+ s32 thisOffset = sampleOffset;
+ s32 samples;
+ s16 loutp = 0;
+ s32 fVol;
+ ALParam* thisParam;
+
+ // Force the input to be the resampler output
+ inp = AL_RESAMPLER_OUT;
+
+ while (e->ctrlList != NULL) {
+ lastOffset = thisOffset;
+ thisOffset = e->ctrlList->delta;
+ samples = thisOffset - lastOffset;
+ if (samples > outCount) {
+ break;
+ }
+
+ switch (e->ctrlList->type) {
+ case AL_FILTER_START_VOICE_ALT: {
+ ALStartParamAlt* param = (ALStartParamAlt*)e->ctrlList;
+ ALFilter* f = &e->filter;
+ s32 tmp;
+
+ if (param->unity != 0) {
+ (*e->filter.setParam)(&e->filter, AL_FILTER_SET_UNITY_PITCH, 0);
+ }
+
+ (*e->filter.setParam)(&e->filter, AL_FILTER_SET_WAVETABLE, param->wave);
+ (*e->filter.setParam)(&e->filter, AL_FILTER_START, 0);
+
+ e->first = true;
+
+ e->delta = 0;
+ e->segEnd = param->samples;
+
+ tmp = ((s32)param->volume * (s32)param->volume) >> 15;
+ e->volume = (s16)tmp;
+ e->pan = param->pan;
+ e->dryamt = eqpower[param->fxMix];
+ e->wetamt = eqpower[EQPOWER_LENGTH - param->fxMix - 1];
+
+ if (param->samples != 0) {
+ e->cvolL = 1;
+ e->cvolR = 1;
+ } else {
+ // Attack time is zero. Simply set the volume. We don't want an attack segment.
+ e->cvolL = (e->volume * eqpower[e->pan]) >> 15;
+ e->cvolR = (e->volume * eqpower[EQPOWER_LENGTH - e->pan - 1]) >> 15;
+ }
+
+ if (f->source != NULL) {
+ union {
+ f32 f;
+ s32 i;
+ } data;
+ data.f = param->pitch;
+ (*f->source->setParam)(f->source, AL_FILTER_SET_PITCH, (void*)data.i);
+ }
+ } break;
+
+ case AL_FILTER_SET_FXAMT:
+ case AL_FILTER_SET_PAN:
+ case AL_FILTER_SET_VOLUME:
+ ptr = _pullSubFrame(e, &inp, &loutp, samples, sampleOffset, ptr);
+
+ if (e->delta >= e->segEnd) {
+ // We should have reached our target, calculate target in case e->segEnd was 0
+ e->ltgt = (e->volume * eqpower[e->pan]) >> 15;
+ e->rtgt = (e->volume * eqpower[EQPOWER_LENGTH - e->pan - 1]) >> 15;
+ e->delta = e->segEnd; // To prevent overflow
+ e->cvolL = e->ltgt;
+ e->cvolR = e->rtgt;
+ } else {
+ // Estimate the current volume
+ e->cvolL = _getVol(e->cvolL, e->delta, e->lratm, e->lratl);
+ e->cvolR = _getVol(e->cvolR, e->delta, e->rratm, e->rratl);
+ }
+
+ // We can't have volume of zero, because the envelope would never go anywhere from there
+ if (e->cvolL == 0) {
+ e->cvolL = 1;
+ }
+ if (e->cvolR == 0) {
+ e->cvolR = 1;
+ }
+
+ if (e->ctrlList->type == AL_FILTER_SET_PAN) {
+ // This should result in a change to the current segment rate and target
+ e->pan = (s16)e->ctrlList->data.i;
+ }
+
+ if (e->ctrlList->type == AL_FILTER_SET_VOLUME) {
+ // Switching to a new segment
+ e->delta = 0;
+
+ // Map volume non-linearly to give something close to loudness
+ fVol = (e->ctrlList->data.i);
+ fVol = (fVol * fVol) >> 15;
+ e->volume = (s16)fVol;
+ e->segEnd = e->ctrlList->moredata.i;
+ }
+
+ if (e->ctrlList->type == AL_FILTER_SET_FXAMT) {
+ e->dryamt = eqpower[e->ctrlList->data.i];
+ e->wetamt = eqpower[EQPOWER_LENGTH - e->ctrlList->data.i - 1];
+ }
+
+ // Force a volume update
+ e->first = true;
+ break;
+
+ case AL_FILTER_START_VOICE: {
+ ALStartParam* p = (ALStartParam*)e->ctrlList;
+
+ // Changing to PLAYING (since the previous state was persumable STOPPED, we'll just bump the output
+ // pointer rather than pull a subframe of zeros).
+ if (p->unity != 0) {
+ (*e->filter.setParam)(&e->filter, AL_FILTER_SET_UNITY_PITCH, 0);
+ }
+
+ (*e->filter.setParam)(&e->filter, AL_FILTER_SET_WAVETABLE, p->wave);
+ (*e->filter.setParam)(&e->filter, AL_FILTER_START, 0);
+ } break;
+
+ case AL_FILTER_STOP_VOICE: {
+ // Changing to STOPPED and reset the filter
+ ptr = _pullSubFrame(e, &inp, &loutp, samples, sampleOffset, ptr);
+ (*e->filter.setParam)(&e->filter, AL_FILTER_RESET, 0);
+ } break;
+
+ case AL_FILTER_FREE_VOICE: {
+ ALSynth* drvr = &alGlobals->drvr;
+ ALFreeParam* param = (ALFreeParam*)e->ctrlList;
+ param->pvoice->offset = 0;
+ _freePVoice(drvr, param->pvoice);
+ } break;
+
+ default:
+ // Pull the reuired number of samples and then pass the message on down the chain
+ ptr = _pullSubFrame(e, &inp, &loutp, samples, sampleOffset, ptr);
+ (*e->filter.setParam)(&e->filter, e->ctrlList->type, (void*)e->ctrlList->data.i);
+ break;
+ }
+ loutp += samples << 1;
+ outCount -= samples;
+
+ // put the param record back on the free list
+ thisParam = e->ctrlList;
+ e->ctrlList = e->ctrlList->next;
+ if (e->ctrlList == NULL) {
+ e->ctrlTail = NULL;
+ }
+
+ __freeParam(thisParam);
+ }
+
+ ptr = _pullSubFrame(e, &inp, &loutp, outCount, sampleOffset, ptr);
+
+ // Prevent overflow in e->delta
+ if (e->delta > e->segEnd) {
+ e->delta = e->segEnd;
+ }
+
+ return ptr;
+}
+
+s32 alEnvmixerParam(void* filter, s32 paramID, void* param) {
+ ALFilter* f = (ALFilter*)filter;
+ ALEnvMixer* e = (ALEnvMixer*)filter;
+
+ switch (paramID) {
+ case AL_FILTER_ADD_UPDATE:
+ if (e->ctrlTail != NULL) {
+ e->ctrlTail->next = (ALParam*)param;
+ } else {
+ e->ctrlList = (ALParam*)param;
+ }
+ e->ctrlTail = (ALParam*)param;
+ break;
+
+ case AL_FILTER_RESET:
+ e->first = true;
+ e->motion = AL_STOPPED;
+ e->volume = 1;
+ if (f->source != NULL) {
+ (*f->source->setParam)(f->source, AL_FILTER_RESET, param);
+ }
+ break;
+
+ case AL_FILTER_START:
+ e->motion = AL_PLAYING;
+ if (f->source != NULL) {
+ (*f->source->setParam)(f->source, AL_FILTER_START, param);
+ }
+ break;
+
+ case AL_FILTER_SET_SOURCE:
+ f->source = (ALFilter*)param;
+ break;
+
+ default:
+ if (f->source != NULL) {
+ (*f->source->setParam)(f->source, paramID, param);
+ }
+ break;
+ }
+ return 0;
+}
+
+static Acmd* _pullSubFrame(void* filter, s16* inp, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p) {
+ Acmd* ptr = p;
+ ALEnvMixer* e = (ALEnvMixer*)filter;
+ ALFilter* source = e->filter.source;
+
+ // filter must be playing and request non-zero output samples to pull.
+ if (e->motion != AL_PLAYING || !outCount) {
+ return ptr;
+ }
+
+ // ask all filters upstream from us to build their command lists.
+ ptr = (*source->handler)(source, inp, outCount, sampleOffset, p);
+
+ // construct our portion of the command list
+ aSetBuffer(ptr++, A_MAIN, *inp, AL_MAIN_L_OUT + *outp, outCount << 1);
+ aSetBuffer(ptr++, A_AUX, AL_MAIN_R_OUT + *outp, AL_AUX_L_OUT + *outp, AL_AUX_R_OUT + *outp);
+
+ if (e->first) {
+ e->first = false;
+
+ // Calculate derived parameters
+ e->ltgt = (e->volume * eqpower[e->pan]) >> 15;
+ e->lratm = _getRate((f64)e->cvolL, (f64)e->ltgt, e->segEnd, &e->lratl);
+ e->rtgt = (e->volume * eqpower[EQPOWER_LENGTH - e->pan - 1]) >> 15;
+ e->rratm = _getRate((f64)e->cvolR, (f64)e->rtgt, e->segEnd, &e->rratl);
+
+ aSetVolume(ptr++, A_LEFT | A_VOL, e->cvolL, 0, 0);
+ aSetVolume(ptr++, A_RIGHT | A_VOL, e->cvolR, 0, 0);
+ aSetVolume(ptr++, A_LEFT | A_RATE, e->ltgt, e->lratm, e->lratl);
+ aSetVolume(ptr++, A_RIGHT | A_RATE, e->rtgt, e->rratm, e->rratl);
+ aSetVolume(ptr++, A_AUX, e->dryamt, 0, e->wetamt);
+ aEnvMixer(ptr++, A_INIT | A_AUX, osVirtualToPhysical(e->state));
+ } else
+ aEnvMixer(ptr++, A_CONTINUE | A_AUX, osVirtualToPhysical(e->state));
+
+ // bump the input buffer pointer
+ *inp += outCount << 1;
+ e->delta += outCount;
+
+ return ptr;
+}
+
+f64 _frexpf(f64 value, s32* eptr) {
+ f64 absvalue;
+
+ *eptr = 0;
+ if (value == 0.0) {
+ // nothing to do for zero
+ return value;
+ }
+ absvalue = (value > 0.0) ? value : -value;
+ for (; absvalue >= 1.0; absvalue *= 0.5) {
+ (*eptr)++;
+ }
+ for (; absvalue < 0.5; absvalue += absvalue) {
+ (*eptr)--;
+ }
+ return (value > 0.0 ? absvalue : -absvalue);
+}
+
+f64 _ldexpf(f64 in, s32 ex) {
+ s32 exp;
+
+ if (ex != 0) {
+ exp = 1 << ex;
+ in *= (f64)exp;
+ }
+ return in;
+}
+
+/**
+ * This function determines how to go from the current volume level (vol) to the target volume level (tgt) in some
+ * number of steps (count). Two values are returned that are used as multipliers to incrementally scale the volume.
+ * Some tricky math is used and is explained below.
+ * RWW 28jun95
+ */
+static s16 _getRate(f64 vol, f64 tgt, s32 count, u16* ratel) {
+ s16 s;
+ f64 invn = 1.0 / count;
+ f64 eps;
+ f64 a;
+ f64 fs;
+ f64 mant;
+ s32 i_invn;
+ s32 ex;
+ s32 indx;
+
+ if (count == 0) {
+ if (tgt >= vol) {
+ *ratel = 0xFFFF;
+ return 0x7FFF;
+ } else {
+ *ratel = 0;
+ return 0;
+ }
+ }
+
+ if (tgt < 1.0) {
+ tgt = 1.0;
+ }
+ if (vol <= 0.0) {
+ vol = 1.0; // zero and neg values not allowed
+ }
+
+#define NBITS 3
+#define NPOS (1 << NBITS)
+#define NFRACBITS 30
+#define M_LN2 0.69314718055994530942
+ // rww's parametric pow()
+ // Goal: compute a = (tgt/vol)^(1/count)
+ //
+ // Approach:
+ // (tgt/vol)^(1/count) = ((tgt/vol)^(1/2^30))^(2^30*1/count)
+ //
+ // (tgt/vol)^(1/2^30) ~= 1 + eps
+ //
+ // where
+ //
+ // eps ~= ln(tgt/vol)/2^30
+ //
+ // ln(tgt/vol) = ln2(tgt/vol) * ln(2)
+ //
+ // ln2(tgt/vol) = fp_exponent( tgt/vol ) + ln2( fp_mantissa( tgt/vol ) )
+ //
+ // fp_mantissa() and fp_exponent() are calculated via tricky bit manipulations of
+ // the floating point number. ln2() is approximated by a look up table.
+ //
+ // Note that this final (1+eps) value needs to be raised to the 2^30/count power. This
+ // is done by operating on the binary representaion of this number in the final while loop.
+ //
+ // Enjoy!
+ {
+ f64 logtab[] = { -0.912537, -0.752072, -0.607683, -0.476438, -0.356144, -0.245112, -0.142019, -0.045804 };
+
+ i_invn = (s32)_ldexpf(invn, NFRACBITS);
+ mant = _frexpf(tgt / vol, &ex);
+ indx = (s32)_ldexpf(mant, NBITS + 1); // NPOS <= indx < 2*NPOS
+ eps = (logtab[indx - NPOS] + ex) * M_LN2;
+ eps /= _ldexpf(1, NFRACBITS); // eps / 2^NFRACBITS
+ fs = 1.0 + eps;
+ a = 1.0;
+ while (i_invn != 0) {
+ if (i_invn & 1) {
+ a = a * fs;
+ }
+ fs *= fs;
+ i_invn >>= 1;
+ }
+ }
+
+ a *= a;
+ a *= a;
+ a *= a;
+ s = (s16)a;
+ *ratel = (s16)(0xFFFF * (a - (f32)s));
+
+ return (s16)a;
+}
+
+static f32 _getVol(f32 ivol, s32 samples, s16 ratem, u16 ratel) {
+ f32 r;
+ f32 a;
+ s32 i;
+
+ // Rate values are actually rate^8
+ samples >>= 3;
+ if (samples == 0) {
+ return ivol;
+ }
+ r = ((f32)(ratem << 16) + (f32)ratel) / 65536;
+
+ a = 1.0f;
+ for (i = 0; i < 32; i++) {
+ if (samples & 1) {
+ a *= r;
+ }
+ samples >>= 1;
+ if (samples == 0) {
+ break;
+ }
+ r *= r;
+ }
+ ivol *= a;
+ return ivol;
+}
diff --git a/src/libultra/audio/filter.c b/src/libultra/audio/filter.c
new file mode 100644
index 0000000000..20e5d7e606
--- /dev/null
+++ b/src/libultra/audio/filter.c
@@ -0,0 +1,12 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+#include "stddef.h"
+
+void alFilterNew(ALFilter* f, ALCmdHandler h, ALSetParam s, s32 type) {
+ f->source = NULL;
+ f->handler = h;
+ f->setParam = s;
+ f->inp = 0;
+ f->outp = 0;
+ f->type = type;
+}
diff --git a/src/libultra/audio/heapalloc.c b/src/libultra/audio/heapalloc.c
new file mode 100644
index 0000000000..708134ec2b
--- /dev/null
+++ b/src/libultra/audio/heapalloc.c
@@ -0,0 +1,16 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+#include "stddef.h"
+
+void* alHeapDBAlloc(u8* file, s32 line, ALHeap* hp, s32 num, s32 size) {
+ s32 bytes;
+ u8* ptr = NULL;
+
+ bytes = (num * size + AL_CACHE_ALIGN) & ~AL_CACHE_ALIGN;
+
+ if (hp->cur + bytes <= hp->base + hp->len) {
+ ptr = hp->cur;
+ hp->cur += bytes;
+ }
+ return ptr;
+}
diff --git a/src/libultra/audio/libaudio.h b/src/libultra/audio/libaudio.h
new file mode 100644
index 0000000000..4d30b0161e
--- /dev/null
+++ b/src/libultra/audio/libaudio.h
@@ -0,0 +1,839 @@
+#ifndef __LIB_AUDIO__
+#define __LIB_AUDIO__
+
+#include "ultra64/ultratypes.h"
+
+#include "libaudio_abi.h"
+
+/***********************************************************************
+ * misc defines
+ ***********************************************************************/
+
+#define AL_FX_BUFFER_SIZE 8192
+#define AL_FRAME_INIT -1
+#define AL_USEC_PER_FRAME 16000
+#define AL_MAX_PRIORITY 127
+#define AL_GAIN_CHANGE_TIME 1000
+
+typedef s32 ALMicroTime;
+typedef u8 ALPan;
+
+#define AL_PAN_CENTER 64
+#define AL_PAN_LEFT 0
+#define AL_PAN_RIGHT 127
+#define AL_VOL_FULL 127
+#define AL_KEY_MIN 0
+#define AL_KEY_MAX 127
+#define AL_DEFAULT_FXMIX 0
+#define AL_SUSTAIN 63
+
+/***********************************************************************
+ * Audio Library global routines
+ ***********************************************************************/
+typedef struct ALLink_s {
+ struct ALLink_s* next;
+ struct ALLink_s* prev;
+} ALLink;
+
+void alUnlink(ALLink* ln);
+void alLink(ALLink* ln, ALLink* to);
+
+typedef s32 (*ALDMAproc)(s32 addr, s32 len, void* state);
+typedef ALDMAproc (*ALDMANew)(void* state);
+
+void alCopy(void* src, void* dest, s32 len);
+
+typedef struct {
+ u8* base;
+ u8* cur;
+ s32 len;
+ s32 count;
+} ALHeap;
+
+#define AL_HEAP_DEBUG 1
+#define AL_HEAP_MAGIC 0x20736A73 // ' sjs'
+#define AL_HEAP_INIT 0
+
+void alHeapInit(ALHeap* hp, u8* base, s32 len);
+void* alHeapDBAlloc(u8* file, s32 line, ALHeap* hp, s32 num, s32 size);
+s32 alHeapCheck(ALHeap* hp);
+
+#define alHeapAlloc(hp, elem ,size) alHeapDBAlloc(0, 0,(hp),(elem),(size))
+
+/***********************************************************************
+ * FX Stuff
+ ***********************************************************************/
+#define AL_FX_NONE 0
+#define AL_FX_SMALLROOM 1
+#define AL_FX_BIGROOM 2
+#define AL_FX_CHORUS 3
+#define AL_FX_FLANGE 4
+#define AL_FX_ECHO 5
+#define AL_FX_CUSTOM 6
+
+typedef u8 ALFxId;
+typedef void* ALFxRef;
+
+/***********************************************************************
+ * data structures for sound banks
+ ***********************************************************************/
+
+#define AL_BANK_VERSION 0x4231 // 'B1'
+
+// Possible wavetable types
+enum {
+ AL_ADPCM_WAVE = 0,
+ AL_RAW16_WAVE
+};
+
+typedef struct {
+ s32 order;
+ s32 npredictors;
+ s16 book[1]; // Actually variable size. Must be 8-byte aligned
+} ALADPCMBook;
+
+typedef struct {
+ u32 start;
+ u32 end;
+ u32 count;
+ ADPCM_STATE state;
+} ALADPCMloop;
+
+typedef struct {
+ u32 start;
+ u32 end;
+ u32 count;
+} ALRawLoop;
+
+typedef struct {
+ ALMicroTime attackTime;
+ ALMicroTime decayTime;
+ ALMicroTime releaseTime;
+ u8 attackVolume;
+ u8 decayVolume;
+} ALEnvelope;
+
+typedef struct {
+ u8 velocityMin;
+ u8 velocityMax;
+ u8 keyMin;
+ u8 keyMax;
+ u8 keyBase;
+ s8 detune;
+} ALKeyMap;
+
+typedef struct {
+ ALADPCMloop* loop;
+ ALADPCMBook* book;
+} ALADPCMWaveInfo;
+
+typedef struct {
+ ALRawLoop* loop;
+} ALRAWWaveInfo;
+
+typedef struct ALWaveTable_s {
+ u8* base; // ptr to start of wave data
+ s32 len; // length of data in bytes
+ u8 type; // compression type
+ u8 flags; // offset/address flags
+ union {
+ ALADPCMWaveInfo adpcmWave;
+ ALRAWWaveInfo rawWave;
+ } waveInfo;
+} ALWaveTable;
+
+typedef struct ALSound_s {
+ ALEnvelope* envelope;
+ ALKeyMap* keyMap;
+ ALWaveTable* wavetable; // offset to wavetable struct
+ ALPan samplePan;
+ u8 sampleVolume;
+ u8 flags;
+} ALSound;
+
+typedef struct {
+ u8 volume; // overall volume for this instrument
+ ALPan pan; // 0 = hard left, 127 = hard right
+ u8 priority; // voice priority for this instrument
+ u8 flags;
+ u8 tremType; // the type of tremelo osc. to use
+ u8 tremRate; // the rate of the tremelo osc.
+ u8 tremDepth; // the depth of the tremelo osc
+ u8 tremDelay; // the delay for the tremelo osc
+ u8 vibType; // the type of tremelo osc. to use
+ u8 vibRate; // the rate of the tremelo osc.
+ u8 vibDepth; // the depth of the tremelo osc
+ u8 vibDelay; // the delay for the tremelo osc
+ s16 bendRange; // pitch bend range in cents
+ s16 soundCount; // number of sounds in this array
+ ALSound* soundArray[1];
+} ALInstrument;
+
+typedef struct ALBank_s {
+ s16 instCount; // number of programs in this bank
+ u8 flags;
+ u8 pad;
+ s32 sampleRate; // e.g. 44100, 22050, etc...
+ ALInstrument* percussion; // default percussion for GM
+ ALInstrument* instArray[1]; // ARRAY of instruments
+} ALBank;
+
+typedef struct { // Note: sizeof won't be correct
+ s16 revision; // format revision of this file
+ s16 bankCount; // number of banks
+ ALBank* bankArray[1]; // ARRAY of bank offsets
+} ALBankFile;
+
+void alBnkfNew(ALBankFile* f, u8* table);
+
+/***********************************************************************
+ * Sequence Files
+ ***********************************************************************/
+#define AL_SEQBANK_VERSION 'S1'
+
+typedef struct {
+ u8* offset;
+ s32 len;
+} ALSeqData;
+
+typedef struct { // Note: sizeof won't be correct
+ s16 revision; // format revision of this file
+ s16 seqCount; // number of sequences
+ ALSeqData seqArray[1]; // ARRAY of sequence info
+} ALSeqFile;
+
+void alSeqFileNew(ALSeqFile* f, u8* base);
+
+/***********************************************************************
+ * Synthesis driver stuff
+ ***********************************************************************/
+typedef ALMicroTime (*ALVoiceHandler)(void*);
+
+typedef struct {
+ s32 maxVVoices; // obsolete
+ s32 maxPVoices;
+ s32 maxUpdates;
+ s32 maxFXbusses;
+ void* dmaproc;
+ ALHeap* heap;
+ s32 outputRate; // output sample rate
+ ALFxId fxType;
+ s32* params;
+} ALSynConfig;
+
+typedef struct ALPlayer_s {
+ struct ALPlayer_s* next;
+ void* clientData; // storage for client callback
+ ALVoiceHandler handler; // voice handler for player
+ ALMicroTime callTime; // usec requested callback
+ s32 samplesLeft; // usec remaining to callback
+} ALPlayer;
+
+typedef struct ALVoice_s {
+ ALLink node;
+ struct PVoice_s* pvoice;
+ ALWaveTable* table;
+ void* clientPrivate;
+ s16 state;
+ s16 priority;
+ s16 fxBus;
+ s16 unityPitch;
+} ALVoice;
+
+typedef struct ALVoiceConfig_s {
+ s16 priority; // voice priority
+ s16 fxBus; // bus assignment
+ u8 unityPitch; // unity pitch flag
+} ALVoiceConfig;
+
+typedef struct {
+ ALPlayer* head; // client list head
+ ALLink pFreeList; // list of free physical voices
+ ALLink pAllocList; // list of allocated physical voices
+ ALLink pLameList; // list of voices ready to be freed
+ s32 paramSamples;
+ s32 curSamples; // samples from start of game
+ ALDMANew dma;
+ ALHeap* heap;
+
+ struct ALParam_s* paramList;
+
+ struct ALMainBus_s* mainBus;
+ struct ALAuxBus_s* auxBus; // ptr to array of aux bus structs
+ struct ALFilter_s* outputFilter; // last filter in the filter chain
+
+ s32 numPVoices;
+ s32 maxAuxBusses;
+ s32 outputRate; // output sample rate
+ s32 maxOutSamples; // Maximum samples rsp can generate at one time at output rate
+} ALSynth;
+
+void alSynNew(ALSynth* drvr, ALSynConfig* c);
+void alSynDelete(ALSynth* drvr);
+
+void alSynAddPlayer(ALSynth* s, ALPlayer* client);
+void alSynRemovePlayer(ALSynth* s, ALPlayer* client);
+
+s32 alSynAllocVoice(ALSynth* s, ALVoice* v, ALVoiceConfig* vc);
+void alSynFreeVoice(ALSynth* s, ALVoice* voice);
+
+void alSynStartVoice(ALSynth* s, ALVoice* voice, ALWaveTable* w);
+void alSynStartVoiceParams(ALSynth* s, ALVoice* voice, ALWaveTable* w, f32 pitch, s16 vol, ALPan pan, u8 fxmix, ALMicroTime t);
+void alSynStopVoice(ALSynth* s, ALVoice* voice);
+
+void alSynSetVol(ALSynth* s, ALVoice* v, s16 vol, ALMicroTime delta);
+void alSynSetPitch(ALSynth* s, ALVoice* voice, f32 ratio);
+void alSynSetPan(ALSynth* s, ALVoice* voice, ALPan pan);
+void alSynSetFXMix(ALSynth* s, ALVoice* voice, u8 fxmix);
+void alSynSetPriority(ALSynth* s, ALVoice* voice, s16 priority);
+s16 alSynGetPriority(ALSynth* s, ALVoice* voice);
+
+ALFxRef* alSynAllocFX(ALSynth* s, s16 bus, ALSynConfig* c, ALHeap* hp);
+ALFxRef alSynGetFXRef(ALSynth* s, s16 bus, s16 index);
+void alSynFreeFX(ALSynth* s, ALFxRef* fx);
+void alSynSetFXParam(ALSynth* s, ALFxRef fx, s16 paramID, void* param);
+
+/***********************************************************************
+ * Audio Library (AL) stuff
+ ***********************************************************************/
+typedef struct {
+ ALSynth drvr;
+} ALGlobals;
+
+extern ALGlobals* alGlobals;
+
+void alInit(ALGlobals* g, ALSynConfig* c);
+void alClose(ALGlobals* glob);
+
+Acmd* alAudioFrame(Acmd* cmdList, s32* cmdLen, s16* outBuf, s32 outLen);
+
+/***********************************************************************
+ * Sequence Player stuff
+ ***********************************************************************/
+
+/**
+ * Play states
+ */
+#define AL_STOPPED 0
+#define AL_PLAYING 1
+#define AL_STOPPING 2
+
+#define AL_DEFAULT_PRIORITY 5
+#define AL_DEFAULT_VOICE 0
+#define AL_MAX_CHANNELS 16
+
+/**
+ * Audio Library event type definitions
+ */
+enum ALMsg {
+ AL_SEQ_REF_EVT, // Reference to a pending event in the sequence.
+ AL_SEQ_MIDI_EVT,
+ AL_SEQP_MIDI_EVT,
+ AL_TEMPO_EVT,
+ AL_SEQ_END_EVT,
+ AL_NOTE_END_EVT,
+ AL_SEQP_ENV_EVT,
+ AL_SEQP_META_EVT,
+ AL_SEQP_PROG_EVT,
+ AL_SEQP_API_EVT,
+ AL_SEQP_VOL_EVT,
+ AL_SEQP_LOOP_EVT,
+ AL_SEQP_PRIORITY_EVT,
+ AL_SEQP_SEQ_EVT,
+ AL_SEQP_BANK_EVT,
+ AL_SEQP_PLAY_EVT,
+ AL_SEQP_STOP_EVT,
+ AL_SEQP_STOPPING_EVT,
+ AL_TRACK_END,
+ AL_CSP_LOOPSTART,
+ AL_CSP_LOOPEND,
+ AL_CSP_NOTEOFF_EVT,
+ AL_TREM_OSC_EVT,
+ AL_VIB_OSC_EVT
+};
+
+/**
+ * Midi event definitions
+ */
+#define AL_EVTQ_END 0x7FFFFFFF
+
+enum AL_MIDIstatus {
+ // For distinguishing channel number from status
+ AL_MIDI_ChannelMask = 0x0F,
+ AL_MIDI_StatusMask = 0xF0,
+
+ // Channel voice messages
+ AL_MIDI_ChannelVoice = 0x80,
+ AL_MIDI_NoteOff = 0x80,
+ AL_MIDI_NoteOn = 0x90,
+ AL_MIDI_PolyKeyPressure = 0xA0,
+ AL_MIDI_ControlChange = 0xB0,
+ AL_MIDI_ChannelModeSelect = 0xB0,
+ AL_MIDI_ProgramChange = 0xC0,
+ AL_MIDI_ChannelPressure = 0xD0,
+ AL_MIDI_PitchBendChange = 0xE0,
+
+ // System messages
+ AL_MIDI_SysEx = 0xF0, // System Exclusive
+ // System common
+ AL_MIDI_SystemCommon = 0xF1,
+ AL_MIDI_TimeCodeQuarterFrame = 0xF1,
+ AL_MIDI_SongPositionPointer = 0xF2,
+ AL_MIDI_SongSelect = 0xF3,
+ AL_MIDI_Undefined1 = 0xF4,
+ AL_MIDI_Undefined2 = 0xF5,
+ AL_MIDI_TuneRequest = 0xF6,
+ AL_MIDI_EOX = 0xF7, // End of System Exclusive
+
+ // System real time
+ AL_MIDI_SystemRealTime = 0xF8,
+ AL_MIDI_TimingClock = 0xF8,
+ AL_MIDI_Undefined3 = 0xF9,
+ AL_MIDI_Start = 0xFA,
+ AL_MIDI_Continue = 0xFB,
+ AL_MIDI_Stop = 0xFC,
+ AL_MIDI_Undefined4 = 0xFD,
+ AL_MIDI_ActiveSensing = 0xFE,
+ AL_MIDI_SystemReset = 0xFF,
+ AL_MIDI_Meta = 0xFF // MIDI Files only
+};
+
+enum AL_MIDIctrl {
+ AL_MIDI_VOLUME_CTRL = 0x07,
+ AL_MIDI_PAN_CTRL = 0x0A,
+ AL_MIDI_PRIORITY_CTRL = 0x10, // use general purpose controller for priority
+ AL_MIDI_FX_CTRL_0 = 0x14,
+ AL_MIDI_FX_CTRL_1 = 0x15,
+ AL_MIDI_FX_CTRL_2 = 0x16,
+ AL_MIDI_FX_CTRL_3 = 0x17,
+ AL_MIDI_FX_CTRL_4 = 0x18,
+ AL_MIDI_FX_CTRL_5 = 0x19,
+ AL_MIDI_FX_CTRL_6 = 0x1A,
+ AL_MIDI_FX_CTRL_7 = 0x1B,
+ AL_MIDI_FX_CTRL_8 = 0x1C,
+ AL_MIDI_FX_CTRL_9 = 0x1D,
+ AL_MIDI_SUSTAIN_CTRL = 0x40,
+ AL_MIDI_FX1_CTRL = 0x5B,
+ AL_MIDI_FX3_CTRL = 0x5D
+};
+
+enum AL_MIDImeta {
+ AL_MIDI_META_TEMPO = 0x51,
+ AL_MIDI_META_EOT = 0x2F
+};
+
+
+#define AL_CMIDI_BLOCK_CODE 0xFE
+#define AL_CMIDI_LOOPSTART_CODE 0x2E
+#define AL_CMIDI_LOOPEND_CODE 0x2D
+
+#define AL_CMIDI_CNTRL_LOOPSTART 102
+#define AL_CMIDI_CNTRL_LOOPEND 103
+#define AL_CMIDI_CNTRL_LOOPCOUNT_SM 104
+#define AL_CMIDI_CNTRL_LOOPCOUNT_BIG 105
+
+typedef struct {
+ u8* curPtr; // ptr to the next event
+ s32 lastTicks; // sequence clock ticks (used by alSeqSetLoc)
+ s32 curTicks; // sequence clock ticks of next event (used by loop end test)
+ s16 lastStatus; // the last status msg
+} ALSeqMarker;
+
+typedef struct {
+ s32 ticks; // MIDI, Tempo and End events must start with ticks
+ u8 status;
+ u8 byte1;
+ u8 byte2;
+ u32 duration;
+} ALMIDIEvent;
+
+typedef struct {
+ s32 ticks;
+ u8 status;
+ u8 type;
+ u8 len;
+ u8 byte1;
+ u8 byte2;
+ u8 byte3;
+} ALTempoEvent;
+
+typedef struct {
+ s32 ticks;
+ u8 status;
+ u8 type;
+ u8 len;
+} ALEndEvent;
+
+typedef struct {
+ struct ALVoice_s* voice;
+} ALNoteEvent;
+
+typedef struct {
+ struct ALVoice_s* voice;
+ ALMicroTime delta;
+ u8 vol;
+} ALVolumeEvent;
+
+typedef struct {
+ s16 vol;
+} ALSeqpVolEvent;
+
+typedef struct {
+ ALSeqMarker* start;
+ ALSeqMarker* end;
+ s32 count;
+} ALSeqpLoopEvent;
+
+typedef struct {
+ u8 chan;
+ u8 priority;
+} ALSeqpPriorityEvent;
+
+typedef struct {
+ void* seq; // pointer to a seq (could be an ALSeq or an ALCSeq).
+} ALSeqpSeqEvent;
+
+typedef struct {
+ ALBank* bank;
+} ALSeqpBankEvent;
+
+typedef struct {
+ struct ALVoiceState_s* vs;
+ void* oscState;
+ u8 chan;
+} ALOscEvent;
+
+typedef struct {
+ s16 type;
+ union {
+ ALMIDIEvent midi;
+ ALTempoEvent tempo;
+ ALEndEvent end;
+ ALNoteEvent note;
+ ALVolumeEvent vol;
+ ALSeqpLoopEvent loop;
+ ALSeqpVolEvent spvol;
+ ALSeqpPriorityEvent sppriority;
+ ALSeqpSeqEvent spseq;
+ ALSeqpBankEvent spbank;
+ ALOscEvent osc;
+ } msg;
+} ALEvent;
+
+typedef struct {
+ ALLink node;
+ ALMicroTime delta;
+ ALEvent evt;
+} ALEventListItem;
+
+typedef struct {
+ ALLink freeList;
+ ALLink allocList;
+ s32 eventCount;
+} ALEventQueue;
+
+void alEvtqNew(ALEventQueue* evtq, ALEventListItem* items, s32 itemCount);
+ALMicroTime alEvtqNextEvent(ALEventQueue* evtq, ALEvent* evt);
+void alEvtqPostEvent(ALEventQueue* evtq, ALEvent* evt, ALMicroTime delta);
+void alEvtqFlush(ALEventQueue* evtq);
+void alEvtqFlushType(ALEventQueue* evtq, s16 type);
+
+#define AL_PHASE_ATTACK 0
+#define AL_PHASE_NOTEON 0
+#define AL_PHASE_DECAY 1
+#define AL_PHASE_SUSTAIN 2
+#define AL_PHASE_RELEASE 3
+#define AL_PHASE_SUSTREL 4
+
+typedef struct ALVoiceState_s {
+ struct ALVoiceState_s* next; // MUST be first
+ ALVoice voice;
+ ALSound* sound;
+ ALMicroTime envEndTime; // time of envelope segment end
+ f32 pitch; // currect pitch ratio
+ f32 vibrato; // current value of the vibrato
+ u8 envGain; // current envelope gain
+ u8 channel; // channel assignment
+ u8 key; // note on key number
+ u8 velocity; // note on velocity
+ u8 envPhase; // what envelope phase
+ u8 phase;
+ u8 tremelo; // current value of the tremelo
+ u8 flags; // bit 0 tremelo flag, bit 1 vibrato flag
+} ALVoiceState;
+
+typedef struct {
+ ALInstrument* instrument; // instrument assigned to this chan
+ s16 bendRange; // pitch bend range in cents
+ ALFxId fxId; // type of fx assigned to this chan
+ ALPan pan; // overall pan for this chan
+ u8 priority; // priority for this chan
+ u8 vol; // current volume for this chan
+ u8 fxmix; // current fx mix for this chan
+ u8 sustain; // current sustain pedal state
+ f32 pitchBend; // current pitch bend val in cents
+} ALChanState;
+
+typedef struct ALSeq_s {
+ u8* base; // ptr to start of sequence file
+ u8* trackStart; // ptr to first MIDI event
+ u8* curPtr; // ptr to next event to read
+ s32 lastTicks; // MIDI ticks for last event
+ s32 len; // length of sequence in bytes
+ f32 qnpt; // qrter notes / tick (1/division)
+ s16 division; // ticks per quarter note
+ s16 lastStatus; // for running status
+} ALSeq;
+
+typedef struct {
+ u32 trackOffset[16];
+ u32 division;
+} ALCMidiHdr;
+
+typedef struct ALCSeq_s {
+ ALCMidiHdr* base; // ptr to start of sequence file
+ u32 validTracks; // set of flags, showing valid tracks
+ f32 qnpt; // qrter notes / tick (1/division)
+ u32 lastTicks; // keep track of ticks incase app wants
+ u32 lastDeltaTicks; // number of delta ticks of last event
+ u32 deltaFlag; // flag: set if delta's not subtracted
+ u8* curLoc[16]; // ptr to current track location, may point to next event, or may point to a backup code
+ u8* curBUPtr[16]; // ptr to next event if in backup mode
+ u8 curBULen[16]; // if > 0, then in backup mode
+ u8 lastStatus[16]; // for running status
+ u32 evtDeltaTicks[16]; // delta time to next event
+} ALCSeq;
+
+typedef struct {
+ u32 validTracks;
+ s32 lastTicks;
+ u32 lastDeltaTicks;
+ u8* curLoc[16];
+ u8* curBUPtr[16];
+ u8 curBULen[16];
+ u8 lastStatus[16];
+ u32 evtDeltaTicks[16];
+} ALCSeqMarker;
+
+#define NO_SOUND_ERR_MASK (1 << 0)
+#define NOTE_OFF_ERR_MASK (1 << 1)
+#define NO_VOICE_ERR_MASK (1 << 2)
+
+typedef struct {
+ s32 maxVoices; // max number of voices to alloc
+ s32 maxEvents; // max internal events to support
+ u8 maxChannels; // max MIDI channels to support (16)
+ u8 debugFlags; // control which error get reported
+ ALHeap* heap; // ptr to initialized heap
+ void* initOsc;
+ void* updateOsc;
+ void* stopOsc;
+} ALSeqpConfig;
+
+typedef ALMicroTime (*ALOscInit)(void** oscState, f32* initVal, u8 oscType, u8 oscRate, u8 oscDepth, u8 oscDelay);
+typedef ALMicroTime (*ALOscUpdate)(void* oscState, f32* updateVal);
+typedef void (*ALOscStop)(void* oscState);
+
+typedef struct {
+ ALPlayer node; // note: must be first in structure
+ ALSynth* drvr; // reference to the client driver
+ ALSeq* target; // current sequence
+ ALMicroTime curTime;
+ ALBank* bank; // current ALBank
+ s32 uspt; // microseconds per tick
+ s32 nextDelta; // microseconds to next callback
+ s32 state;
+ u16 chanMask; // active channels
+ s16 vol; // overall sequence volume
+ u8 maxChannels; // number of MIDI channels
+ u8 debugFlags; // control which error get reported
+ ALEvent nextEvent;
+ ALEventQueue evtq;
+ ALMicroTime frameTime;
+ ALChanState* chanState; // 16 channels for MIDI
+ ALVoiceState* vAllocHead; // list head for allocated voices
+ ALVoiceState* vAllocTail; // list tail for allocated voices
+ ALVoiceState* vFreeList; // list of free voice state structs
+ ALOscInit initOsc;
+ ALOscUpdate updateOsc;
+ ALOscStop stopOsc;
+ ALSeqMarker* loopStart;
+ ALSeqMarker* loopEnd;
+ s32 loopCount; // -1 = loop forever, 0 = no loop
+} ALSeqPlayer;
+
+typedef struct {
+ ALPlayer node; // note: must be first in structure
+ ALSynth* drvr; // reference to the client driver
+ ALCSeq* target; // current sequence
+ ALMicroTime curTime;
+ ALBank* bank; // current ALBank
+ s32 uspt; // microseconds per tick
+ s32 nextDelta; // microseconds to next callback
+ s32 state;
+ u16 chanMask; // active channels
+ s16 vol; // overall sequence volume
+ u8 maxChannels; // number of MIDI channels
+ u8 debugFlags; // control which error get reported
+ ALEvent nextEvent;
+ ALEventQueue evtq;
+ ALMicroTime frameTime;
+ ALChanState* chanState; // 16 channels for MIDI
+ ALVoiceState* vAllocHead; // list head for allocated voices
+ ALVoiceState* vAllocTail; // list tail for allocated voices
+ ALVoiceState* vFreeList; // list of free voice state structs
+ ALOscInit initOsc;
+ ALOscUpdate updateOsc;
+ ALOscStop stopOsc;
+} ALCSPlayer;
+
+// Sequence data representation routines
+
+void alSeqNew(ALSeq* seq, u8* ptr, s32 len);
+void alSeqNextEvent(ALSeq* seq, ALEvent* event);
+s32 alSeqGetTicks(ALSeq* seq);
+f32 alSeqTicksToSec(ALSeq* seq, s32 ticks, u32 tempo);
+u32 alSeqSecToTicks(ALSeq* seq, f32 sec, u32 tempo);
+void alSeqNewMarker(ALSeq* seq, ALSeqMarker* m, u32 ticks);
+void alSeqSetLoc(ALSeq* seq, ALSeqMarker* marker);
+void alSeqGetLoc(ALSeq* seq, ALSeqMarker* marker);
+
+// Compact Sequence data representation routines
+
+void alCSeqNew(ALCSeq* seq, u8* ptr);
+void alCSeqNextEvent(ALCSeq* seq,ALEvent* evt);
+s32 alCSeqGetTicks(ALCSeq* seq);
+f32 alCSeqTicksToSec(ALCSeq* seq, s32 ticks, u32 tempo);
+u32 alCSeqSecToTicks(ALCSeq* seq, f32 sec, u32 tempo);
+void alCSeqNewMarker(ALCSeq* seq, ALCSeqMarker* m, u32 ticks);
+void alCSeqSetLoc(ALCSeq* seq, ALCSeqMarker* marker);
+void alCSeqGetLoc(ALCSeq* seq, ALCSeqMarker* marker);
+
+// Sequence Player routines
+
+f32 alCents2Ratio(s32 cents);
+
+void alSeqpNew(ALSeqPlayer* seqp, ALSeqpConfig* config);
+void alSeqpDelete(ALSeqPlayer* seqp);
+void alSeqpSetSeq(ALSeqPlayer* seqp, ALSeq* seq);
+ALSeq* alSeqpGetSeq(ALSeqPlayer* seqp);
+void alSeqpPlay(ALSeqPlayer* seqp);
+void alSeqpStop(ALSeqPlayer* seqp);
+s32 alSeqpGetState(ALSeqPlayer* seqp);
+void alSeqpSetBank(ALSeqPlayer* seqp, ALBank* b);
+void alSeqpSetTempo(ALSeqPlayer* seqp, s32 tempo);
+s32 alSeqpGetTempo(ALSeqPlayer* seqp);
+s16 alSeqpGetVol(ALSeqPlayer* seqp); // Master volume control
+void alSeqpSetVol(ALSeqPlayer* seqp, s16 vol);
+void alSeqpLoop(ALSeqPlayer* seqp, ALSeqMarker* start, ALSeqMarker* end, s32 count);
+
+void alSeqpSetChlProgram(ALSeqPlayer* seqp, u8 chan, u8 prog);
+s32 alSeqpGetChlProgram(ALSeqPlayer* seqp, u8 chan);
+void alSeqpSetChlFXMix(ALSeqPlayer* seqp, u8 chan, u8 fxmix);
+u8 alSeqpGetChlFXMix(ALSeqPlayer* seqp, u8 chan);
+void alSeqpSetChlVol(ALSeqPlayer* seqp, u8 chan, u8 vol);
+u8 alSeqpGetChlVol(ALSeqPlayer* seqp, u8 chan);
+void alSeqpSetChlPan(ALSeqPlayer* seqp, u8 chan, ALPan pan);
+ALPan alSeqpGetChlPan(ALSeqPlayer* seqp, u8 chan);
+void alSeqpSetChlPriority(ALSeqPlayer* seqp, u8 chan, u8 priority);
+u8 alSeqpGetChlPriority(ALSeqPlayer* seqp, u8 chan);
+void alSeqpSendMidi(ALSeqPlayer* seqp, s32 ticks, u8 status, u8 byte1, u8 byte2);
+
+// Maintain backwards compatibility with old routine names.
+
+#define alSeqpSetProgram alSeqpSetChlProgram
+#define alSeqpGetProgram alSeqpGetChlProgram
+#define alSeqpSetFXMix alSeqpSetChlFXMix
+#define alSeqpGetFXMix alSeqpGetChlFXMix
+#define alSeqpSetPan alSeqpSetChlPan
+#define alSeqpGetPan alSeqpGetChlPan
+#define alSeqpSetChannelPriority alSeqpSetChlPriority
+#define alSeqpGetChannelPriority alSeqpGetChlPriority
+
+// Compressed Sequence Player routines
+
+void alCSPNew(ALCSPlayer* seqp, ALSeqpConfig* config);
+void alCSPDelete(ALCSPlayer* seqp);
+void alCSPSetSeq(ALCSPlayer* seqp, ALCSeq* seq);
+ALCSeq* alCSPGetSeq(ALCSPlayer* seqp);
+void alCSPPlay(ALCSPlayer* seqp);
+void alCSPStop(ALCSPlayer* seqp);
+s32 alCSPGetState(ALCSPlayer* seqp);
+void alCSPSetBank(ALCSPlayer* seqp, ALBank* b);
+void alCSPSetTempo(ALCSPlayer* seqp, s32 tempo);
+s32 alCSPGetTempo(ALCSPlayer* seqp);
+s16 alCSPGetVol(ALCSPlayer* seqp);
+void alCSPSetVol(ALCSPlayer* seqp, s16 vol);
+
+void alCSPSetChlProgram(ALCSPlayer* seqp, u8 chan, u8 prog);
+s32 alCSPGetChlProgram(ALCSPlayer* seqp, u8 chan);
+void alCSPSetChlFXMix(ALCSPlayer* seqp, u8 chan, u8 fxmix);
+u8 alCSPGetChlFXMix(ALCSPlayer* seqp, u8 chan);
+void alCSPSetChlPan(ALCSPlayer* seqp, u8 chan, ALPan pan);
+ALPan alCSPGetChlPan(ALCSPlayer* seqp, u8 chan);
+void alCSPSetChlVol(ALCSPlayer* seqp, u8 chan, u8 vol);
+u8 alCSPGetChlVol(ALCSPlayer* seqp, u8 chan);
+void alCSPSetChlPriority(ALCSPlayer* seqp, u8 chan, u8 priority);
+u8 alCSPGetChlPriority(ALCSPlayer* seqp, u8 chan);
+void alCSPSendMidi(ALCSPlayer* seqp, s32 ticks, u8 status, u8 byte1, u8 byte2);
+
+// Maintain backwards compatibility with old routine names.
+
+#define alCSPSetProgram alCSPSetChlProgram
+#define alCSPGetProgram alCSPGetChlProgram
+#define alCSPSetFXMix alCSPSetChlFXMix
+#define alCSPGetFXMix alCSPGetChlFXMix
+#define alCSPSetPan alCSPSetChlPan
+#define alCSPGetPan alCSPGetChlPan
+#define alCSPSetChannelPriority alCSPSetChlPriority
+#define alCSPGetChannelPriority alCSPGetChlPriority
+
+
+
+/***********************************************************************
+ * Sound Player stuff
+ ***********************************************************************/
+
+typedef struct {
+ s32 maxSounds;
+ s32 maxEvents;
+ ALHeap* heap;
+} ALSndpConfig;
+
+typedef struct {
+ ALPlayer node; // note: must be first in structure
+ ALEventQueue evtq;
+ ALEvent nextEvent;
+ ALSynth* drvr; // reference to the client driver
+ s32 target;
+ void* sndState;
+ s32 maxSounds;
+ ALMicroTime frameTime;
+ ALMicroTime nextDelta; // microseconds to next callback
+ ALMicroTime curTime;
+} ALSndPlayer;
+
+typedef s16 ALSndId;
+
+void alSndpNew(ALSndPlayer* sndp, ALSndpConfig* c);
+void alSndpDelete(ALSndPlayer* sndp);
+
+ALSndId alSndpAllocate(ALSndPlayer* sndp, ALSound* sound);
+void alSndpDeallocate(ALSndPlayer* sndp, ALSndId id);
+
+void alSndpSetSound(ALSndPlayer* sndp, ALSndId id);
+ALSndId alSndpGetSound(ALSndPlayer* sndp);
+
+void alSndpPlay(ALSndPlayer* sndp);
+void alSndpPlayAt(ALSndPlayer* sndp, ALMicroTime delta);
+void alSndpStop(ALSndPlayer* sndp);
+
+void alSndpSetVol(ALSndPlayer* sndp, s16 vol);
+void alSndpSetPitch(ALSndPlayer* sndp, f32 pitch);
+void alSndpSetPan(ALSndPlayer* sndp, ALPan pan);
+void alSndpSetPriority(ALSndPlayer* sndp, ALSndId id, u8 priority);
+
+void alSndpSetFXMix(ALSndPlayer* sndp, u8 mix);
+s32 alSndpGetState(ALSndPlayer* sndp);
+
+#endif
diff --git a/src/libultra/audio/libaudio_abi.h b/src/libultra/audio/libaudio_abi.h
new file mode 100644
index 0000000000..725101796c
--- /dev/null
+++ b/src/libultra/audio/libaudio_abi.h
@@ -0,0 +1,383 @@
+#ifndef _ABI_H_
+#define _ABI_H_
+
+#define _SHIFTL(v, s, w) \
+ ((u32) (((u32)(v) & ((1 << (w)) - 1)) << (s)))
+
+#define _SHIFTR(v, s, w) \
+ ((u32)(((u32)(v) >> (s)) & ((1 << (w)) - 1)))
+
+/* Audio commands: */
+#define A_SPNOOP 0
+#define A_ADPCM 1
+#define A_CLEARBUFF 2
+#define A_ENVMIXER 3
+#define A_LOADBUFF 4
+#define A_RESAMPLE 5
+#define A_SAVEBUFF 6
+#define A_SEGMENT 7
+#define A_SETBUFF 8
+#define A_SETVOL 9
+#define A_DMEMMOVE 10
+#define A_LOADADPCM 11
+#define A_MIXER 12
+#define A_INTERLEAVE 13
+#define A_POLEF 14
+#define A_SETLOOP 15
+
+#define ACMD_SIZE 32
+
+/**
+ * Audio flags
+ */
+
+#define A_INIT 0x01
+#define A_CONTINUE 0x00
+#define A_LOOP 0x02
+#define A_OUT 0x02
+#define A_LEFT 0x02
+#define A_RIGHT 0x00
+#define A_VOL 0x04
+#define A_RATE 0x00
+#define A_AUX 0x08
+#define A_NOAUX 0x00
+#define A_MAIN 0x00
+#define A_MIX 0x10
+
+#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
+
+/**
+ * Data Structures.
+ */
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int flags : 8;
+ unsigned int gain : 16;
+ unsigned int addr;
+} Aadpcm;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int flags : 8;
+ unsigned int gain : 16;
+ unsigned int addr;
+} Apolef;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int flags : 8;
+ unsigned int pad1 : 16;
+ unsigned int addr;
+} Aenvelope;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int pad1 : 8;
+ unsigned int dmem : 16;
+ unsigned int pad2 : 16;
+ unsigned int count : 16;
+} Aclearbuff;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int pad1 : 8;
+ unsigned int pad2 : 16;
+ unsigned int inL : 16;
+ unsigned int inR : 16;
+} Ainterleave;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int pad1 : 24;
+ unsigned int addr;
+} Aloadbuff;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int flags : 8;
+ unsigned int pad1 : 16;
+ unsigned int addr;
+} Aenvmixer;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int flags : 8;
+ unsigned int gain : 16;
+ unsigned int dmemi : 16;
+ unsigned int dmemo : 16;
+} Amixer;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int flags : 8;
+ unsigned int dmem2 : 16;
+ unsigned int addr;
+} Apan;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int flags : 8;
+ unsigned int pitch : 16;
+ unsigned int addr;
+} Aresample;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int flags : 8;
+ unsigned int pad1 : 16;
+ unsigned int addr;
+} Areverb;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int pad1 : 24;
+ unsigned int addr;
+} Asavebuff;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int pad1 : 24;
+ unsigned int pad2 : 2;
+ unsigned int number : 4;
+ unsigned int base : 24;
+} Asegment;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int flags : 8;
+ unsigned int dmemin : 16;
+ unsigned int dmemout : 16;
+ unsigned int count : 16;
+} Asetbuff;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int flags : 8;
+ unsigned int vol : 16;
+ unsigned int voltgt : 16;
+ unsigned int volrate : 16;
+} Asetvol;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int pad1 : 8;
+ unsigned int dmemin : 16;
+ unsigned int dmemout : 16;
+ unsigned int count : 16;
+} Admemmove;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int pad1 : 8;
+ unsigned int count : 16;
+ unsigned int addr;
+} Aloadadpcm;
+
+typedef struct {
+ unsigned int cmd : 8;
+ unsigned int pad1 : 8;
+ unsigned int pad2 : 16;
+ unsigned int addr;
+} Asetloop;
+
+/**
+ * Generic Acmd Packet
+ */
+
+typedef struct {
+ unsigned int w0;
+ unsigned int w1;
+} Awords;
+
+typedef union {
+ Awords words;
+ Aadpcm adpcm;
+ Apolef polef;
+ Aclearbuff clearbuff;
+ Aenvelope envelope;
+ Ainterleave interleave;
+ Aloadbuff loadbuff;
+ Aenvmixer envmixer;
+ Aresample resample;
+ Areverb reverb;
+ Asavebuff savebuff;
+ Asegment segment;
+ Asetbuff setbuff;
+ Asetvol setvol;
+ Admemmove dmemmove;
+ Aloadadpcm loadadpcm;
+ Amixer mixer;
+ Asetloop setloop;
+ long long int force_union_align; /* dummy, force alignment */
+} Acmd;
+
+/**
+ * ADPCM State
+ */
+
+#define ADPCMVSIZE 8
+#define ADPCMFSIZE 16
+typedef short ADPCM_STATE[ADPCMFSIZE];
+
+/**
+ * Pole filter state
+ */
+typedef short POLEF_STATE[4];
+
+/**
+ * Resampler state
+ */
+typedef short RESAMPLE_STATE[16];
+
+/**
+ * Resampler constants
+ */
+#define UNITY_PITCH 0x8000
+#define MAX_RATIO 1.99996 /* within .03 cents of +1 octave */
+
+/**
+ * Enveloper/Mixer state
+ */
+typedef short ENVMIX_STATE[40];
+
+/**
+ * Macros to assemble the audio command list
+ */
+
+#define aADPCMdec(pkt, f, s) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = _SHIFTL(A_ADPCM, 24, 8) | _SHIFTL(f, 16, 8); \
+ _a->words.w1 = (unsigned int)(s); \
+}
+
+#define aPoleFilter(pkt, f, g, s) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = (_SHIFTL(A_POLEF, 24, 8) | _SHIFTL(f, 16, 8) | \
+ _SHIFTL(g, 0, 16)); \
+ _a->words.w1 = (unsigned int)(s); \
+}
+
+#define aClearBuffer(pkt, d, c) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(d, 0, 24); \
+ _a->words.w1 = (unsigned int)(c); \
+}
+
+#define aEnvMixer(pkt, f, s) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = _SHIFTL(A_ENVMIXER, 24, 8) | _SHIFTL(f, 16, 8); \
+ _a->words.w1 = (unsigned int)(s); \
+}
+
+#define aInterleave(pkt, l, r) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = _SHIFTL(A_INTERLEAVE, 24, 8); \
+ _a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
+}
+
+#define aLoadBuffer(pkt, s) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8); \
+ _a->words.w1 = (unsigned int)(s); \
+}
+
+#define aMix(pkt, f, g, i, o) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = (_SHIFTL(A_MIXER, 24, 8) | _SHIFTL(f, 16, 8) | \
+ _SHIFTL(g, 0, 16)); \
+ _a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
+}
+
+#define aPan(pkt, f, d, s) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = (_SHIFTL(A_PAN, 24, 8) | _SHIFTL(f, 16, 8) | \
+ _SHIFTL(d, 0, 16)); \
+ _a->words.w1 = (unsigned int)(s); \
+}
+
+#define aResample(pkt, f, p, s) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = (_SHIFTL(A_RESAMPLE, 24, 8) | _SHIFTL(f, 16, 8) | \
+ _SHIFTL(p, 0, 16)); \
+ _a->words.w1 = (unsigned int)(s); \
+}
+
+#define aSaveBuffer(pkt, s) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = _SHIFTL(A_SAVEBUFF, 24, 8); \
+ _a->words.w1 = (unsigned int)(s); \
+}
+
+#define aSegment(pkt, s, b) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = _SHIFTL(A_SEGMENT, 24, 8); \
+ _a->words.w1 = _SHIFTL(s, 24, 8) | _SHIFTL(b, 0, 24); \
+}
+
+#define aSetBuffer(pkt, f, i, o, c) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = (_SHIFTL(A_SETBUFF, 24, 8) | _SHIFTL(f, 16, 8) | \
+ _SHIFTL(i, 0, 16)); \
+ _a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
+}
+
+#define aSetVolume(pkt, f, v, t, r) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \
+ _SHIFTL(v, 0, 16)); \
+ _a->words.w1 = _SHIFTL(t, 16, 16) | _SHIFTL(r, 0, 16); \
+}
+
+#define aSetLoop(pkt, a) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ _a->words.w0 = _SHIFTL(A_SETLOOP, 24, 8); \
+ _a->words.w1 = (unsigned int)(a); \
+}
+
+#define aDMEMMove(pkt, i, o, c) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = _SHIFTL(A_DMEMMOVE, 24, 8) | _SHIFTL(i, 0, 24); \
+ _a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
+}
+
+#define aLoadADPCM(pkt, c, d) \
+{ \
+ Acmd* _a = (Acmd*)pkt; \
+ \
+ _a->words.w0 = _SHIFTL(A_LOADADPCM, 24, 8) | _SHIFTL(c, 0, 24); \
+ _a->words.w1 = (unsigned int)(d); \
+}
+
+#endif
+
+#endif
diff --git a/src/libultra/audio/load.c b/src/libultra/audio/load.c
new file mode 100644
index 0000000000..02be1f47cd
--- /dev/null
+++ b/src/libultra/audio/load.c
@@ -0,0 +1,378 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+#include "stdbool.h"
+#include "stddef.h"
+#include "stdint.h"
+#include "ultra64/R4300.h"
+
+#ifndef MIN
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+
+#define ADPCMFBYTES 9
+#define LFSAMPLES 4
+
+static Acmd* _decodeChunk(Acmd* ptr, ALLoadFilter* f, s32 tsam, s32 nbytes, s16 outp, s16 inp, u32 flags);
+
+Acmd* alAdpcmPull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p) {
+ Acmd* ptr = p;
+ s16 inp;
+ s32 tsam;
+ s32 nframes;
+ s32 nbytes;
+ s32 overFlow;
+ s32 startZero;
+ s32 nOver;
+ s32 nSam;
+ s32 op;
+ s32 nLeft;
+ s32 bEnd;
+ s32 decoded = false;
+ s32 looped = false;
+
+ ALLoadFilter* f = (ALLoadFilter*)filter;
+
+ if (outCount == 0) {
+ return ptr;
+ }
+
+ inp = AL_DECODER_IN;
+ aLoadADPCM(ptr++, f->bookSize, K0_TO_PHYS(f->table->waveInfo.adpcmWave.book->book));
+
+ looped = ((u32)(outCount + f->sample) > f->loop.end) && (f->loop.count != 0);
+ if (looped) {
+ nSam = f->loop.end - f->sample;
+ } else {
+ nSam = outCount;
+ }
+
+ if (f->lastsam != 0) {
+ nLeft = ADPCMFSIZE - f->lastsam;
+ } else {
+ nLeft = 0;
+ }
+ tsam = nSam - nLeft;
+ if (tsam < 0) {
+ tsam = 0;
+ }
+
+ nframes = (tsam + ADPCMFSIZE - 1) >> LFSAMPLES;
+ nbytes = nframes * ADPCMFBYTES;
+
+ if (looped) {
+ ptr = _decodeChunk(ptr, f, tsam, nbytes, *outp, inp, f->first);
+
+ // Fix up output pointer, which will be used as the input pointer by the following module.
+ if (f->lastsam != 0) {
+ *outp += f->lastsam << 1;
+ } else {
+ *outp += ADPCMFSIZE << 1;
+ }
+
+ // Now fix up state info to reflect the loop start point
+ f->lastsam = f->loop.start & 0xF;
+ f->memin = (uintptr_t)f->table->base + ADPCMFBYTES * ((s32)(f->loop.start >> LFSAMPLES) + 1);
+ f->sample = f->loop.start;
+
+ bEnd = *outp;
+ while (outCount > nSam) {
+ outCount -= nSam;
+
+ // Put next one after the end of the last lot - on the frame boundary (32 byte) after the end.
+ op = (bEnd + ((nframes + 1) << (LFSAMPLES + 1))) & ~0x1F;
+
+ // The actual end of data
+ bEnd += nSam << 1;
+
+ // -1 is loop forever - the loop count is not exact now for small loops!
+ if (f->loop.count != -1u && f->loop.count != 0) {
+ f->loop.count--;
+ }
+
+ // What's left to compute.
+ nSam = MIN((u32)outCount, f->loop.end - f->loop.start);
+ tsam = nSam - ADPCMFSIZE + f->lastsam;
+ if (tsam < 0) {
+ tsam = 0;
+ }
+ nframes = (tsam + ADPCMFSIZE - 1) >> LFSAMPLES;
+ nbytes = nframes * ADPCMFBYTES;
+ ptr = _decodeChunk(ptr, f, tsam, nbytes, op, inp, f->first | A_LOOP);
+ // Merge the two sections in DMEM.
+ aDMEMMove(ptr++, op + (f->lastsam << 1), bEnd, nSam << 1);
+ }
+
+ f->lastsam = (outCount + f->lastsam) & 0xF;
+ f->sample += outCount;
+ f->memin += ADPCMFBYTES * nframes;
+ return ptr;
+ }
+
+ // The unlooped case, which is executed most of the time
+
+ nSam = nframes << LFSAMPLES;
+
+ // overFlow is the number of bytes past the end of the bitstream I try to generate
+ overFlow = f->memin + nbytes - ((uintptr_t)f->table->base + f->table->len);
+ if (overFlow < 0) {
+ overFlow = 0;
+ }
+ nOver = (overFlow / ADPCMFBYTES) << LFSAMPLES;
+ if (nOver > nSam + nLeft) {
+ nOver = nSam + nLeft;
+ }
+
+ nbytes -= overFlow;
+
+ if (nOver - (nOver & 0xF) < outCount) {
+ decoded = true;
+ ptr = _decodeChunk(ptr, f, nSam - nOver, nbytes, *outp, inp, f->first);
+
+ if (f->lastsam != 0) {
+ *outp += f->lastsam << 1;
+ } else {
+ *outp += ADPCMFSIZE << 1;
+ }
+
+ f->lastsam = (outCount + f->lastsam) & 0xF;
+ f->sample += outCount;
+ f->memin += ADPCMFBYTES * nframes;
+ } else {
+ f->lastsam = 0;
+ f->memin += ADPCMFBYTES * nframes;
+ }
+
+ // Put zeros in if necessary
+ if (nOver != 0) {
+ f->lastsam = 0;
+ if (decoded) {
+ startZero = (nLeft + nSam - nOver) << 1;
+ } else {
+ startZero = 0;
+ }
+ aClearBuffer(ptr++, startZero + *outp, nOver << 1);
+ }
+ return ptr;
+}
+
+Acmd* alRaw16Pull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p) {
+ Acmd* ptr = p;
+ s32 nbytes;
+ s32 dramLoc;
+ s32 dramAlign;
+ s32 dmemAlign;
+ s32 overFlow;
+ s32 startZero;
+ s32 nSam;
+ s32 op;
+ ALLoadFilter* f = (ALLoadFilter*)filter;
+ ALFilter* a = (ALFilter*)filter;
+
+ if (outCount == 0) {
+ return ptr;
+ }
+
+ if ((u32)(outCount + f->sample) > f->loop.end && f->loop.count != 0) {
+ nSam = f->loop.end - f->sample;
+ nbytes = nSam << 1;
+
+ if (nSam > 0) {
+ dramLoc = (f->dma)(f->memin, nbytes, f->dmaState);
+
+ // Make sure enough is loaded into DMEM to take care of 8 byte alignment
+ dramAlign = dramLoc & 7;
+ nbytes += dramAlign;
+ aSetBuffer(ptr++, 0, *outp, 0, nbytes + 8 - (nbytes & 7));
+ aLoadBuffer(ptr++, dramLoc - dramAlign);
+ } else {
+ dramAlign = 0;
+ }
+
+ // Fix up output pointer to allow for dram alignment
+ *outp += dramAlign;
+
+ f->memin = (uintptr_t)f->table->base + (f->loop.start << 1);
+ f->sample = f->loop.start;
+ op = *outp;
+
+ while (outCount > nSam) {
+ op += (nSam << 1);
+ outCount -= nSam;
+
+ // -1 is loop forever
+ if (f->loop.count != -1u && f->loop.count != 0) {
+ f->loop.count--;
+ }
+
+ // What to compute.
+ nSam = MIN((u32)outCount, f->loop.end - f->loop.start);
+ nbytes = nSam << 1;
+
+ // Do the next section, same as last.
+ dramLoc = (f->dma)(f->memin, nbytes, f->dmaState);
+
+ // Make sure enough is loaded into DMEM to take care of 8 byte alignment
+ dramAlign = dramLoc & 7;
+ nbytes += dramAlign;
+ if (op & 7) {
+ dmemAlign = 8 - (op & 7);
+ } else {
+ dmemAlign = 0;
+ }
+
+ aSetBuffer(ptr++, 0, op + dmemAlign, 0, nbytes + 8 - (nbytes & 7));
+ aLoadBuffer(ptr++, dramLoc - dramAlign);
+
+ // Merge the two sections in DMEM.
+ if (dramAlign || dmemAlign)
+ aDMEMMove(ptr++, op + dramAlign + dmemAlign, op, nSam << 1);
+ }
+
+ f->sample += outCount;
+ f->memin += outCount << 1;
+
+ return ptr;
+ }
+
+ // The unlooped case, which is executed most of the time
+ //
+ // overFlow is the number of bytes past the end
+ // of the bitstream I try to generate
+
+ nbytes = outCount << 1;
+ overFlow = f->memin + nbytes - ((uintptr_t)f->table->base + f->table->len);
+ if (overFlow < 0) {
+ overFlow = 0;
+ }
+ if (overFlow > nbytes) {
+ overFlow = nbytes;
+ }
+
+ if (overFlow < nbytes) {
+ if (outCount > 0) {
+ nbytes -= overFlow;
+ dramLoc = f->dma(f->memin, nbytes, f->dmaState);
+
+ // Make sure enough is loaded into DMEM to take care of 8 byte alignment
+ dramAlign = dramLoc & 7;
+ nbytes += dramAlign;
+ aSetBuffer(ptr++, 0, *outp, 0x000, nbytes + 8 - (nbytes & 7));
+ aLoadBuffer(ptr++, dramLoc - dramAlign);
+ } else {
+ dramAlign = 0;
+ }
+ *outp += dramAlign;
+
+ f->sample += outCount;
+ f->memin += outCount << 1;
+ } else {
+ f->memin += outCount << 1;
+ }
+
+ // Put zeros in if necessary
+ if (overFlow != 0) {
+ startZero = (outCount << 1) - overFlow;
+ if (startZero < 0) {
+ startZero = 0;
+ }
+ aClearBuffer(ptr++, startZero + *outp, overFlow);
+ }
+ return ptr;
+}
+
+s32 alLoadParam(void* filter, s32 paramID, void* param) {
+ ALLoadFilter* a = (ALLoadFilter*)filter;
+ ALFilter* f = (ALFilter*)filter;
+
+ switch (paramID) {
+ case AL_FILTER_SET_WAVETABLE:
+ a->table = (ALWaveTable*)param;
+ a->memin = (uintptr_t)a->table->base;
+ a->sample = 0;
+
+ switch (a->table->type) {
+ case AL_ADPCM_WAVE:
+ // Set up the correct handler
+ f->handler = alAdpcmPull;
+
+ // Make sure the table length is an integer number of frames
+ a->table->len = ADPCMFBYTES * (s32)(a->table->len / ADPCMFBYTES);
+
+ a->bookSize = 2 * a->table->waveInfo.adpcmWave.book->order *
+ a->table->waveInfo.adpcmWave.book->npredictors * ADPCMVSIZE;
+ if (a->table->waveInfo.adpcmWave.loop != NULL) {
+ a->loop.start = a->table->waveInfo.adpcmWave.loop->start;
+ a->loop.end = a->table->waveInfo.adpcmWave.loop->end;
+ a->loop.count = a->table->waveInfo.adpcmWave.loop->count;
+ alCopy(a->table->waveInfo.adpcmWave.loop->state, a->lstate, sizeof(ADPCM_STATE));
+ } else {
+ a->loop.start = a->loop.end = a->loop.count = 0;
+ }
+ break;
+
+ case AL_RAW16_WAVE:
+ f->handler = alRaw16Pull;
+ if (a->table->waveInfo.rawWave.loop != NULL) {
+ a->loop.start = a->table->waveInfo.rawWave.loop->start;
+ a->loop.end = a->table->waveInfo.rawWave.loop->end;
+ a->loop.count = a->table->waveInfo.rawWave.loop->count;
+ } else {
+ a->loop.start = a->loop.end = a->loop.count = 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case AL_FILTER_RESET:
+ a->lastsam = 0;
+ a->first = true;
+ a->sample = 0;
+
+ // sct 2/14/96 - Check table since it is initialized to null and get loop info according to table type.
+ if (a->table != NULL) {
+ a->memin = (uintptr_t)a->table->base;
+ if (a->table->type == AL_ADPCM_WAVE) {
+ if (a->table->waveInfo.adpcmWave.loop != NULL) {
+ a->loop.count = a->table->waveInfo.adpcmWave.loop->count;
+ }
+ } else if (a->table->type == AL_RAW16_WAVE) {
+ if (a->table->waveInfo.rawWave.loop != NULL) {
+ a->loop.count = a->table->waveInfo.rawWave.loop->count;
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+static Acmd* _decodeChunk(Acmd* ptr, ALLoadFilter* f, s32 tsam, s32 nbytes, s16 outp, s16 inp, u32 flags) {
+ s32 dramAlign;
+ s32 dramLoc;
+
+ if (nbytes > 0) {
+ dramLoc = f->dma(f->memin, nbytes, f->dmaState);
+ // Make sure enough is loaded into DMEM to take care of 8 byte alignment
+ dramAlign = dramLoc & 7;
+ nbytes += dramAlign;
+ aSetBuffer(ptr++, 0, inp, 0, nbytes + 8 - (nbytes & 7));
+ aLoadBuffer(ptr++, dramLoc - dramAlign);
+ } else {
+ dramAlign = 0;
+ }
+
+ if (flags & A_LOOP) {
+ aSetLoop(ptr++, K0_TO_PHYS(f->lstate));
+ }
+
+ aSetBuffer(ptr++, 0, inp + dramAlign, outp, tsam << 1);
+ aADPCMdec(ptr++, flags, K0_TO_PHYS(f->state));
+ f->first = false;
+
+ return ptr;
+}
diff --git a/src/libultra/audio/mainbus.c b/src/libultra/audio/mainbus.c
new file mode 100644
index 0000000000..57a86d0d54
--- /dev/null
+++ b/src/libultra/audio/mainbus.c
@@ -0,0 +1,38 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+
+Acmd* alMainBusPull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p) {
+ Acmd* ptr = p;
+ ALMainBus* m = (ALMainBus*)filter;
+ ALFilter** sources = m->sources;
+ s32 i;
+
+ // clear the output buffers here
+ aClearBuffer(ptr++, AL_MAIN_L_OUT, outCount << 1);
+ aClearBuffer(ptr++, AL_MAIN_R_OUT, outCount << 1);
+
+ for (i = 0; i < m->sourceCount; i++) {
+ ptr = sources[i]->handler(sources[i], outp, outCount, sampleOffset, ptr);
+ aSetBuffer(ptr++, 0, 0x000, 0x000, outCount << 1);
+ aMix(ptr++, 0, 0x7FFF, AL_AUX_L_OUT, AL_MAIN_L_OUT);
+ aMix(ptr++, 0, 0x7FFF, AL_AUX_R_OUT, AL_MAIN_R_OUT);
+ }
+
+ return ptr;
+}
+
+s32 alMainBusParam(void* filter, s32 paramID, void* param) {
+ ALMainBus* m = (ALMainBus*)filter;
+ ALFilter** sources = m->sources;
+
+ switch (paramID) {
+ case AL_FILTER_ADD_SOURCE:
+ sources[m->sourceCount++] = (ALFilter*)param;
+ break;
+
+ default:
+ break;
+ }
+
+ return 0;
+}
diff --git a/src/libultra/audio/resample.c b/src/libultra/audio/resample.c
new file mode 100644
index 0000000000..8001eb151b
--- /dev/null
+++ b/src/libultra/audio/resample.c
@@ -0,0 +1,100 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+#include "stdbool.h"
+#include "stddef.h"
+#include "ultra64/convert.h"
+
+Acmd* alResamplePull(void* filter, s16* outp, s32 outCnt, s32 sampleOffset, Acmd* p) {
+ ALResampler* f = (ALResampler*)filter;
+ Acmd* ptr = p;
+ s16 inp;
+ s32 inCount;
+ ALFilter* source = f->filter.source;
+ s32 incr;
+ f32 finCount;
+
+ inp = AL_DECODER_OUT;
+
+ if (outCnt == 0) {
+ return ptr;
+ }
+
+ // check if resampler is required
+ if (f->upitch != 0) {
+ ptr = (*source->handler)(source, &inp, outCnt, sampleOffset, p);
+ aDMEMMove(ptr++, inp, *outp, outCnt << 1);
+ } else {
+ // clip to maximum allowable pitch
+ // FIXME: should we check for some minimum as well?
+ if (f->ratio > MAX_RATIO) {
+ f->ratio = MAX_RATIO;
+ }
+
+ // quantize the pitch
+ f->ratio = (s32)(f->ratio * UNITY_PITCH);
+ f->ratio = f->ratio / UNITY_PITCH;
+
+ // determine how many samples to generate
+ finCount = f->delta + f->ratio * (f32)outCnt;
+ inCount = (s32)finCount;
+ f->delta = finCount - (f32)inCount;
+
+ // ask all filters upstream from us to build their command lists.
+ ptr = (*source->handler)(source, &inp, inCount, sampleOffset, p);
+
+ // construct our portion of the command list
+ incr = (s32)(f->ratio * UNITY_PITCH);
+ aSetBuffer(ptr++, 0, inp, *outp, outCnt << 1);
+ aResample(ptr++, f->first, incr, osVirtualToPhysical(f->state));
+ f->first = false;
+ }
+ return ptr;
+}
+
+s32 alResampleParam(void* filter, s32 paramID, void* param) {
+ ALFilter* f = (ALFilter*)filter;
+ ALResampler* r = (ALResampler*)filter;
+ union {
+ f32 f;
+ s32 i;
+ } data;
+
+ switch (paramID) {
+ case AL_FILTER_SET_SOURCE:
+ f->source = (ALFilter*)param;
+ break;
+
+ case AL_FILTER_RESET:
+ r->delta = 0.0f;
+ r->first = true;
+ r->motion = AL_STOPPED;
+ r->upitch = 0;
+ if (f->source != NULL) {
+ (*f->source->setParam)(f->source, AL_FILTER_RESET, 0);
+ }
+ break;
+
+ case AL_FILTER_START:
+ r->motion = AL_PLAYING;
+ if (f->source != NULL) {
+ (*f->source->setParam)(f->source, AL_FILTER_START, 0);
+ }
+ break;
+
+ case AL_FILTER_SET_PITCH:
+ data.i = (s32)param;
+ r->ratio = data.f;
+ break;
+
+ case AL_FILTER_SET_UNITY_PITCH:
+ r->upitch = 1;
+ break;
+
+ default:
+ if (f->source != NULL) {
+ (*f->source->setParam)(f->source, paramID, param);
+ }
+ break;
+ }
+ return 0;
+}
diff --git a/src/libultra/audio/reverb.c b/src/libultra/audio/reverb.c
new file mode 100644
index 0000000000..9edf3ab9a6
--- /dev/null
+++ b/src/libultra/audio/reverb.c
@@ -0,0 +1,348 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+#include "stdbool.h"
+#include "stddef.h"
+#include "stdint.h"
+#include "ultra64/convert.h"
+
+#define RANGE 2.0
+
+extern ALGlobals* alGlobals;
+
+Acmd* _loadOutputBuffer(ALFx* r, ALDelay* d, s32 buff, s32 incount, Acmd* p);
+Acmd* _loadBuffer(ALFx* r, s16* curr_ptr, s32 buff, s32 count, Acmd* p);
+Acmd* _saveBuffer(ALFx* r, s16* curr_ptr, s32 buff, s32 count, Acmd* p);
+Acmd* _filterBuffer(ALLowPass* lp, s32 buff, s32 count, Acmd* p);
+f32 _doModFunc(ALDelay* d, s32 count);
+
+Acmd* alFxPull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p) {
+ Acmd* ptr = p;
+ ALFx* r = (ALFx*)filter;
+ ALFilter* source = r->filter.source;
+ s16 i;
+ s16 buff1;
+ s16 buff2;
+ s16 input;
+ s16 output;
+ s16* in_ptr;
+ s16* out_ptr;
+ s16 gain;
+ s16* prev_out_ptr = NULL;
+ ALDelay* d;
+ ALDelay* pd;
+
+ // pull channels going into this effect first
+ ptr = (*source->handler)(source, outp, outCount, sampleOffset, p);
+
+ input = AL_AUX_L_OUT;
+ output = AL_AUX_R_OUT;
+ buff1 = AL_TEMP_0;
+ buff2 = AL_TEMP_1;
+
+ aSetBuffer(ptr++, 0, 0x000, 0x000, outCount << 1); // set the buffer size
+ aMix(ptr++, 0, 0xDA83, AL_AUX_L_OUT, input); // .707L = L - .293L
+ aMix(ptr++, 0, 0x5A82, AL_AUX_R_OUT, input); // mix the AuxL and AuxR into the AuxL
+ // and write the mixed value to the delay line at r->input
+ ptr = _saveBuffer(r, r->input, input, outCount, ptr);
+
+ // clear the AL_AUX_R_OUT
+ aClearBuffer(ptr++, output, outCount << 1);
+
+ for (i = 0; i < r->section_count; i++) {
+ d = &r->delay[i]; // get the ALDelay structure
+ in_ptr = &r->input[-d->input];
+ out_ptr = &r->input[-d->output];
+
+ if (in_ptr == prev_out_ptr) {
+ s16 t = buff2;
+ buff2 = buff1;
+ buff1 = t;
+ } else {
+ // load data at in_ptr into buff1
+ ptr = _loadBuffer(r, in_ptr, buff1, outCount, ptr);
+ }
+ ptr = _loadOutputBuffer(r, d, buff2, outCount, ptr);
+
+ if (d->ffcoef != 0) {
+ aMix(ptr++, 0, (u16)d->ffcoef, buff1, buff2);
+ if (d->rs == NULL && d->lp == NULL) {
+ ptr = _saveBuffer(r, out_ptr, buff2, outCount, ptr);
+ }
+ }
+
+ if (d->fbcoef != 0) {
+ aMix(ptr++, 0, (u16)d->fbcoef, buff2, buff1);
+ ptr = _saveBuffer(r, in_ptr, buff1, outCount, ptr);
+ }
+
+ if (d->lp != NULL) {
+ ptr = _filterBuffer(d->lp, buff2, outCount, ptr);
+ }
+
+ if (d->rs == NULL) {
+ ptr = _saveBuffer(r, out_ptr, buff2, outCount, ptr);
+ }
+
+ if (d->gain != 0) {
+ aMix(ptr++, 0, (u16)d->gain, buff2, output);
+ }
+
+ prev_out_ptr = &r->input[d->output];
+ }
+
+ // bump the master delay line input pointer modulo the length
+ r->input += outCount;
+ if (r->input > &r->base[r->length]) {
+ r->input -= r->length;
+ }
+
+ // output already in AL_AUX_R_OUT, just copy to AL_AUX_L_OUT
+ aDMEMMove(ptr++, output, AL_AUX_L_OUT, outCount << 1);
+ return ptr;
+}
+
+s32 alFxParam(void* filter, s32 paramID, void* param) {
+ if (paramID == AL_FILTER_SET_SOURCE) {
+ ALFilter* f = (ALFilter*)filter;
+ f->source = (ALFilter*)param;
+ }
+ return 0;
+}
+
+/**
+ * This routine gets called by alSynSetFXParam. No checking takes place to
+ * verify the validity of the paramID or the param value. input and output
+ * values must be 8 byte aligned, so round down any param passed.
+ */
+s32 alFxParamHdl(void* filter, s32 paramID, void* param) {
+ ALFx* f = (ALFx*)filter;
+ s32 p = (paramID - 2) % 8;
+ s32 s = (paramID - 2) / 8;
+ s32 val = *(s32*)param;
+
+#define INPUT_PARAM 0
+#define OUTPUT_PARAM 1
+#define FBCOEF_PARAM 2
+#define FFCOEF_PARAM 3
+#define GAIN_PARAM 4
+#define CHORUSRATE_PARAM 5
+#define CHORUSDEPTH_PARAM 6
+#define LPFILT_PARAM 7
+
+ switch (p) {
+ case INPUT_PARAM:
+ f->delay[s].input = (u32)val & 0xFFFFFFF8;
+ break;
+
+ case OUTPUT_PARAM:
+ f->delay[s].output = (u32)val & 0xFFFFFFF8;
+ break;
+
+ case FFCOEF_PARAM:
+ f->delay[s].ffcoef = (s16)val;
+ break;
+
+ case FBCOEF_PARAM:
+ f->delay[s].fbcoef = (s16)val;
+ break;
+
+ case GAIN_PARAM:
+ f->delay[s].gain = (s16)val;
+ break;
+
+ case CHORUSRATE_PARAM:
+ f->delay[s].rsinc = (((f32)val / 1000) * RANGE) / alGlobals->drvr.outputRate;
+ break;
+
+ // the following constant is derived from:
+ //
+ // ratio = 2^(cents/1200)
+ //
+ // and therefore for hundredths of a cent
+ // x
+ // ln(ratio) = ---------------
+ // (120,000)/ln(2)
+ // where
+ // 120,000/ln(2) = 173123.40...
+#define CONVERT 173123.404906676
+
+ case CHORUSDEPTH_PARAM:
+ f->delay[s].rsgain = ((f32)val / CONVERT) * (f->delay[s].output - f->delay[s].input);
+ break;
+
+ case LPFILT_PARAM:
+ if (f->delay[s].lp != NULL) {
+ f->delay[s].lp->fc = (s16)val;
+ _init_lpfilter(f->delay[s].lp);
+ }
+ break;
+ }
+ return 0;
+}
+
+Acmd* _loadOutputBuffer(ALFx* r, ALDelay* d, s32 buff, s32 incount, Acmd* p) {
+ Acmd* ptr = p;
+ s32 ratio;
+ s32 count;
+ s32 rbuff = AL_TEMP_2;
+ s16* out_ptr;
+ f32 fincount;
+ f32 fratio;
+ f32 delta;
+ s32 ramalign = 0;
+ s32 length;
+
+ // The following section implements the chorus resampling. Modulate where you pull
+ // the samples from, since you need varying amounts of samples.
+ if (d->rs != NULL) {
+ length = d->output - d->input;
+ // get the number of samples to modulate by
+ delta = _doModFunc(d, incount);
+ // find ratio of delta to delay length and quantize to same resolution as resampler
+ delta /= length; // convert delta from number of samples to a pitch ratio
+ delta = (s32)(delta * UNITY_PITCH); // quantize to value microcode will use
+ delta = delta / UNITY_PITCH;
+ // pitch ratio needs to be centered around 1, not zero
+ fratio = 1.0 - delta;
+
+ // d->rs->delta is the difference between the fractional and integer value of the samples needed.
+ // fratio * incount + rs->delta gives the number of samples needed for this frame.
+ fincount = d->rs->delta + (fratio * (f32)incount);
+ count = (s32)fincount; // quantize to s32
+ d->rs->delta = fincount - (f32)count; // calculate the round off and store
+
+ // d->rsdelta is amount the out_ptr has deviated from its starting position.
+ // You calc the out_ptr by taking d->output - d->rsdelta, and then using the
+ // negative of that as an index into the delay buffer. loadBuffer that uses this
+ // value then bumps it up if it is below the delay buffer.
+ out_ptr = &r->input[-(d->output - d->rsdelta)];
+ // calculate the number of samples needed to align the buffer
+ ramalign = ((intptr_t)out_ptr & 7) >> 1;
+
+ // load the rbuff with samples, note that there will be ramalign worth of samples at the
+ // begining which you don't care about.
+ ptr = _loadBuffer(r, out_ptr - ramalign, rbuff, count + ramalign, ptr);
+
+ // convert fratio to 16 bit fraction for microcode use
+ ratio = (s32)(fratio * UNITY_PITCH);
+ // set the buffers, and do the resample
+ aSetBuffer(ptr++, 0, rbuff + (ramalign << 1), buff, incount << 1);
+ aResample(ptr++, d->rs->first, ratio, osVirtualToPhysical(d->rs->state));
+
+ d->rs->first = false; // turn off first time flag
+ d->rsdelta += count - incount; // add the number of samples to d->rsdelta
+ } else {
+ out_ptr = &r->input[-d->output];
+ ptr = _loadBuffer(r, out_ptr, buff, incount, ptr);
+ }
+ return ptr;
+}
+
+/**
+ * This routine is for loading data from the delay line buff. If the
+ * address of curr_ptr < r->base, it will force it to be within r->base
+ * space, If the load goes past the end of r->base it will wrap around.
+ * Cause count bytes of data at curr_ptr (within the delay line) to be
+ * loaded into buff. (Buff is a dmem buffer)
+ */
+Acmd* _loadBuffer(ALFx* r, s16* curr_ptr, s32 buff, s32 count, Acmd* p) {
+ Acmd* ptr = p;
+ s32 after_end;
+ s32 before_end;
+ s16* updated_ptr;
+ s16* delay_end;
+
+ delay_end = &r->base[r->length];
+
+ if (curr_ptr < r->base) {
+ curr_ptr += r->length;
+ }
+ updated_ptr = curr_ptr + count;
+
+ if (updated_ptr > delay_end) {
+ after_end = updated_ptr - delay_end;
+ before_end = delay_end - curr_ptr;
+
+ aSetBuffer(ptr++, 0, buff, 0x000, before_end << 1);
+ aLoadBuffer(ptr++, osVirtualToPhysical(curr_ptr));
+ aSetBuffer(ptr++, 0, buff + (before_end << 1), 0, after_end << 1);
+ aLoadBuffer(ptr++, osVirtualToPhysical(r->base));
+ } else {
+ aSetBuffer(ptr++, 0, buff, 0x000, count << 1);
+ aLoadBuffer(ptr++, osVirtualToPhysical(curr_ptr));
+ }
+ aSetBuffer(ptr++, 0, 0x000, 0x000, count << 1);
+ return ptr;
+}
+
+/**
+ * This routine is for writing data to the delay line buff. If the
+ * address of curr_ptr < r->base, it will force it to be within r->base
+ * space. If the write goes past the end of r->base, it will wrap around
+ * Cause count bytes of data at buff to be written to delay line, curr_ptr.
+ */
+Acmd* _saveBuffer(ALFx* r, s16* curr_ptr, s32 buff, s32 count, Acmd* p) {
+ Acmd* ptr = p;
+ s32 after_end;
+ s32 before_end;
+ s16* updated_ptr;
+ s16* delay_end;
+
+ delay_end = &r->base[r->length];
+ if (curr_ptr < r->base) {
+ // probably just security, shouldn't occur
+ curr_ptr += r->length;
+ }
+ updated_ptr = curr_ptr + count;
+
+ if (updated_ptr > delay_end) { // if the data wraps past end of r->base
+ after_end = updated_ptr - delay_end;
+ before_end = delay_end - curr_ptr;
+
+ aSetBuffer(ptr++, 0, 0x000, buff, before_end << 1);
+ aSaveBuffer(ptr++, osVirtualToPhysical(curr_ptr));
+ aSetBuffer(ptr++, 0, 0x000, buff + (before_end << 1), after_end << 1);
+ aSaveBuffer(ptr++, osVirtualToPhysical(r->base));
+ aSetBuffer(ptr++, 0, 0x000, 0x000, count << 1);
+ } else {
+ aSetBuffer(ptr++, 0, 0x000, buff, count << 1);
+ aSaveBuffer(ptr++, osVirtualToPhysical(curr_ptr));
+ }
+ return ptr;
+}
+
+Acmd* _filterBuffer(ALLowPass* lp, s32 buff, s32 count, Acmd* p) {
+ Acmd* ptr = p;
+
+ aSetBuffer(ptr++, 0, buff, buff, count << 1);
+ aLoadADPCM(ptr++, 32, osVirtualToPhysical(lp->fcvec.fccoef));
+ aPoleFilter(ptr++, lp->first, lp->fgain, osVirtualToPhysical(lp->fstate));
+ lp->first = false;
+
+ return ptr;
+}
+
+/**
+ * Generate a triangle wave from -1 to 1, and find the current position
+ * in the wave. (Rate of the wave is controlled by d->rsinc, which is chorus
+ * rate) Multiply the current triangle wave value by d->rsgain, (chorus depth)
+ * which is expressed in number of samples back from output pointer the chorus
+ * should go at it's full chorus. In otherwords, this function returns a number
+ * of samples the output pointer should modulate backwards.
+ */
+f32 _doModFunc(ALDelay* d, s32 count) {
+ f32 val;
+
+ // generate bipolar sawtooth from -RANGE to +RANGE
+ d->rsval += d->rsinc * count;
+ d->rsval = (d->rsval > RANGE) ? (d->rsval - RANGE * 2) : d->rsval;
+
+ // convert to monopolar triangle from 0 to RANGE
+ val = d->rsval;
+ val = (val < 0) ? -val : val;
+
+ // convert to bipolar triangle from -1 to 1
+ val -= RANGE / 2;
+
+ return d->rsgain * val;
+}
diff --git a/src/libultra/audio/save.c b/src/libultra/audio/save.c
new file mode 100644
index 0000000000..a6d25f6dc4
--- /dev/null
+++ b/src/libultra/audio/save.c
@@ -0,0 +1,36 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+
+Acmd* alSavePull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p) {
+ Acmd* ptr = p;
+ ALSave* f = (ALSave*)filter;
+ ALFilter* source = f->filter.source;
+
+ ptr = (*source->handler)(source, outp, outCount, sampleOffset, ptr);
+
+ aSetBuffer(ptr++, 0, 0x000, 0x000, outCount << 1);
+ aInterleave(ptr++, AL_MAIN_L_OUT, AL_MAIN_R_OUT);
+ aSetBuffer(ptr++, 0, 0x000, 0x000, outCount << 2);
+ aSaveBuffer(ptr++, f->dramout);
+ return ptr;
+}
+
+s32 alSaveParam(void* filter, s32 paramID, void* param) {
+ ALSave* a = (ALSave*)filter;
+ ALFilter* f = (ALFilter*)filter;
+ s32 pp = (s32)param;
+
+ switch (paramID) {
+ case AL_FILTER_SET_SOURCE:
+ f->source = (ALFilter*)param;
+ break;
+
+ case AL_FILTER_SET_DRAM:
+ a->dramout = pp;
+ break;
+
+ default:
+ break;
+ }
+ return 0;
+}
diff --git a/src/libultra/audio/sl.c b/src/libultra/audio/sl.c
new file mode 100644
index 0000000000..ad9949d114
--- /dev/null
+++ b/src/libultra/audio/sl.c
@@ -0,0 +1,36 @@
+#include "libaudio.h"
+#include "stddef.h"
+
+ALGlobals* alGlobals = NULL;
+
+void alInit(ALGlobals* g, ALSynConfig* c) {
+ if (alGlobals == NULL) {
+ alGlobals = g;
+ alSynNew(&alGlobals->drvr, c);
+ }
+}
+
+void alClose(ALGlobals* glob) {
+ if (alGlobals != NULL) {
+ alSynDelete(&glob->drvr);
+ alGlobals = NULL;
+ }
+}
+
+void alLink(ALLink* ln, ALLink* to) {
+ ln->next = to->next;
+ ln->prev = to;
+ if (to->next != NULL) {
+ to->next->prev = ln;
+ }
+ to->next = ln;
+}
+
+void alUnlink(ALLink* ln) {
+ if (ln->next != NULL) {
+ ln->next->prev = ln->prev;
+ }
+ if (ln->prev != NULL) {
+ ln->prev->next = ln->next;
+ }
+}
diff --git a/src/libultra/audio/synallocfx.c b/src/libultra/audio/synallocfx.c
new file mode 100644
index 0000000000..55c8267e14
--- /dev/null
+++ b/src/libultra/audio/synallocfx.c
@@ -0,0 +1,9 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+
+ALFxRef* alSynAllocFX(ALSynth* s, s16 bus, ALSynConfig* c, ALHeap* hp) {
+ alFxNew(&s->auxBus[bus].fx[0], c, hp);
+ alFxParam(&s->auxBus[bus].fx[0], AL_FILTER_SET_SOURCE, &s->auxBus[bus]);
+ alMainBusParam(s->mainBus, AL_FILTER_ADD_SOURCE, &s->auxBus[bus].fx[0]);
+ return (ALFxRef)&s->auxBus[bus].fx[0];
+}
diff --git a/src/libultra/audio/syndelete.c b/src/libultra/audio/syndelete.c
new file mode 100644
index 0000000000..96299af32f
--- /dev/null
+++ b/src/libultra/audio/syndelete.c
@@ -0,0 +1,6 @@
+#include "libaudio.h"
+#include "stddef.h"
+
+void alSynDelete(ALSynth* drvr) {
+ drvr->head = NULL;
+}
diff --git a/src/libultra/audio/synthInternals.h b/src/libultra/audio/synthInternals.h
new file mode 100644
index 0000000000..5fa8108f57
--- /dev/null
+++ b/src/libultra/audio/synthInternals.h
@@ -0,0 +1,312 @@
+#ifndef __audioInternals__
+#define __audioInternals__
+
+#include "libaudio.h"
+
+/**
+ * filter message ids
+ */
+enum {
+ AL_FILTER_FREE_VOICE,
+ AL_FILTER_SET_SOURCE,
+ AL_FILTER_ADD_SOURCE,
+ AL_FILTER_ADD_UPDATE,
+ AL_FILTER_RESET,
+ AL_FILTER_SET_WAVETABLE,
+ AL_FILTER_SET_DRAM,
+ AL_FILTER_SET_PITCH,
+ AL_FILTER_SET_UNITY_PITCH,
+ AL_FILTER_START,
+ AL_FILTER_SET_STATE,
+ AL_FILTER_SET_VOLUME,
+ AL_FILTER_SET_PAN,
+ AL_FILTER_START_VOICE_ALT,
+ AL_FILTER_START_VOICE,
+ AL_FILTER_STOP_VOICE,
+ AL_FILTER_SET_FXAMT
+};
+
+#define AL_MAX_RSP_SAMPLES 160
+
+/**
+ * buffer locations based on AL_MAX_RSP_SAMPLES
+ */
+#define AL_DECODER_IN 0x000
+#define AL_RESAMPLER_OUT 0x000
+#define AL_TEMP_0 0x000
+#define AL_DECODER_OUT 0x140
+#define AL_TEMP_1 0x140
+#define AL_TEMP_2 0x280
+#define AL_MAIN_L_OUT 0x440
+#define AL_MAIN_R_OUT 0x580
+#define AL_AUX_L_OUT 0x6C0
+#define AL_AUX_R_OUT 0x800
+
+/**
+ * filter types
+ */
+enum {
+ AL_ADPCM,
+ AL_RESAMPLE,
+ AL_BUFFER,
+ AL_SAVE,
+ AL_ENVMIX,
+ AL_FX,
+ AL_AUXBUS,
+ AL_MAINBUS
+};
+
+typedef struct ALParam_s {
+ struct ALParam_s* next;
+ s32 delta;
+ s16 type;
+ union {
+ f32 f;
+ s32 i;
+ } data;
+ union {
+ f32 f;
+ s32 i;
+ } moredata;
+ union {
+ f32 f;
+ s32 i;
+ } stillmoredata;
+ union {
+ f32 f;
+ s32 i;
+ } yetstillmoredata;
+} ALParam;
+
+typedef struct {
+ struct ALParam_s* next;
+ s32 delta;
+ s16 type;
+ s16 unity; // disable resampler
+ f32 pitch;
+ s16 volume;
+ ALPan pan;
+ u8 fxMix;
+ s32 samples;
+ struct ALWaveTable_s* wave;
+} ALStartParamAlt;
+
+typedef struct {
+ struct ALParam_s* next;
+ s32 delta;
+ s16 type;
+ s16 unity; // disable resampler
+ struct ALWaveTable_s* wave;
+} ALStartParam;
+
+typedef struct {
+ struct ALParam_s* next;
+ s32 delta;
+ s16 type;
+ struct PVoice_s* pvoice;
+} ALFreeParam;
+
+typedef Acmd* (*ALCmdHandler)(void*, s16*, s32, s32, Acmd*);
+typedef s32 (*ALSetParam)(void*, s32, void*);
+
+typedef struct ALFilter_s {
+ struct ALFilter_s* source;
+ ALCmdHandler handler;
+ ALSetParam setParam;
+ s16 inp;
+ s16 outp;
+ s32 type;
+} ALFilter;
+
+void alFilterNew(ALFilter* f, ALCmdHandler h, ALSetParam s, s32 type);
+
+// Depends on number of subframes per frame and loop length
+#define AL_MAX_ADPCM_STATES 3
+
+typedef struct {
+ ALFilter filter;
+ ADPCM_STATE* state;
+ ADPCM_STATE* lstate;
+ ALRawLoop loop;
+ struct ALWaveTable_s* table;
+ s32 bookSize;
+ ALDMAproc dma;
+ void* dmaState;
+ s32 sample;
+ s32 lastsam;
+ s32 first;
+ s32 memin;
+} ALLoadFilter;
+
+void alLoadNew(ALLoadFilter* f, ALDMANew dmaNew, ALHeap* hp);
+Acmd* alAdpcmPull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p);
+Acmd* alRaw16Pull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p);
+s32 alLoadParam(void* filter, s32 paramID, void* param);
+
+typedef struct ALResampler_s {
+ ALFilter filter;
+ RESAMPLE_STATE* state;
+ f32 ratio;
+ s32 upitch;
+ f32 delta;
+ s32 first;
+ ALParam* ctrlList;
+ ALParam* ctrlTail;
+ s32 motion;
+} ALResampler;
+
+typedef struct {
+ s16 fc;
+ s16 fgain;
+ union {
+ s16 fccoef[16];
+ s64 force_aligned;
+ } fcvec;
+ POLEF_STATE* fstate;
+ s32 first;
+} ALLowPass;
+
+typedef struct {
+ u32 input;
+ u32 output;
+ s16 ffcoef;
+ s16 fbcoef;
+ s16 gain;
+ f32 rsinc;
+ f32 rsval;
+ s32 rsdelta;
+ f32 rsgain;
+ ALLowPass* lp;
+ ALResampler* rs;
+} ALDelay;
+
+typedef s32 (*ALSetFXParam)(void*, s32, void*);
+typedef struct {
+ struct ALFilter_s filter;
+ s16* base;
+ s16* input;
+ u32 length;
+ ALDelay* delay;
+ u8 section_count;
+ ALSetFXParam paramHdl;
+} ALFx;
+
+void alFxNew(ALFx* r, ALSynConfig* c, ALHeap* hp);
+Acmd* alFxPull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p);
+s32 alFxParam(void* filter, s32 paramID, void* param);
+s32 alFxParamHdl(void* filter, s32 paramID, void* param);
+
+#define AL_MAX_MAIN_BUS_SOURCES 1
+typedef struct ALMainBus_s {
+ ALFilter filter;
+ s32 sourceCount;
+ s32 maxSources;
+ ALFilter** sources;
+} ALMainBus;
+
+void alMainBusNew(ALMainBus* m, void* sources, s32 maxSources);
+Acmd* alMainBusPull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p);
+s32 alMainBusParam(void* filter, s32 paramID, void* param);
+
+#define AL_MAX_AUX_BUS_SOURCES 8
+#define AL_MAX_AUX_BUS_FX 1
+typedef struct ALAuxBus_s {
+ ALFilter filter;
+ s32 sourceCount;
+ s32 maxSources;
+ ALFilter** sources;
+ ALFx fx[AL_MAX_AUX_BUS_FX];
+} ALAuxBus;
+
+void alAuxBusNew(ALAuxBus* m, void* sources, s32 maxSources);
+Acmd* alAuxBusPull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p);
+s32 alAuxBusParam(void* filter, s32 paramID, void* param);
+
+void alResampleNew(ALResampler* r, ALHeap* hp);
+Acmd* alResamplePull(void* filter, s16* outp, s32 outCnt, s32 sampleOffset, Acmd* p);
+s32 alResampleParam(void* filter, s32 paramID, void* param);
+
+typedef struct ALSave_s {
+ ALFilter filter;
+ s32 dramout;
+ s32 first;
+} ALSave;
+
+void alSaveNew(ALSave* f);
+Acmd* alSavePull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p);
+s32 alSaveParam(void* filter, s32 paramID, void* param);
+
+typedef struct ALEnvMixer_s {
+ ALFilter filter;
+ ENVMIX_STATE* state;
+ s16 pan;
+ s16 volume;
+ s16 cvolL;
+ s16 cvolR;
+ s16 dryamt;
+ s16 wetamt;
+ u16 lratl;
+ s16 lratm;
+ s16 ltgt;
+ u16 rratl;
+ s16 rratm;
+ s16 rtgt;
+ s32 delta;
+ s32 segEnd;
+ s32 first;
+ ALParam* ctrlList;
+ ALParam* ctrlTail;
+ ALFilter** sources;
+ s32 motion;
+} ALEnvMixer;
+
+void alEnvmixerNew(ALEnvMixer* e, ALHeap* hp);
+Acmd* alEnvmixerPull(void* filter, s16* outp, s32 outCount, s32 sampleOffset, Acmd* p);
+s32 alEnvmixerParam(void* filter, s32 paramID, void* param);
+
+
+/**
+ * heap stuff
+ */
+
+typedef struct {
+ s32 magic; // check structure integrety
+ s32 size; // size of this allocated block
+ u8* file; // file that this alloc was called from
+ s32 line; // line that it was called from
+ s32 count; // heap call number
+ s32 pad0;
+ s32 pad1;
+ s32 pad2; // Make it 32 bytes
+} HeapInfo;
+
+// DCache line size (-1)
+#define AL_CACHE_ALIGN 15
+
+/**
+ * synth stuff
+ */
+
+typedef struct PVoice_s {
+ ALLink node;
+ struct ALVoice_s* vvoice;
+ ALFilter* channelKnob;
+ ALLoadFilter decoder;
+ ALResampler resampler;
+ ALEnvMixer envmixer;
+ s32 offset;
+} PVoice;
+
+// prototypes for private driver functions
+
+ALParam* __allocParam(void);
+void __freeParam(ALParam* param);
+void _freePVoice(ALSynth* drvr, PVoice* pvoice);
+void _collectPVoices(ALSynth* drvr);
+
+s32 _timeToSamples(ALSynth* synth, s32 micros);
+ALMicroTime _samplesToTime(ALSynth* synth, s32 samples);
+
+void _init_lpfilter(ALLowPass* lp);
+
+#endif
diff --git a/src/libultra/audio/synthesizer.c b/src/libultra/audio/synthesizer.c
new file mode 100644
index 0000000000..62c07582ed
--- /dev/null
+++ b/src/libultra/audio/synthesizer.c
@@ -0,0 +1,221 @@
+#include "libaudio.h"
+#include "synthInternals.h"
+#include "stddef.h"
+
+#ifndef MIN
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+
+static s32 __nextSampleTime(ALSynth* drvr, ALPlayer** client);
+static s32 _timeToSamplesNoRound(ALSynth* synth, s32 micros);
+
+void alSynNew(ALSynth* drvr, ALSynConfig* c) {
+ s32 i;
+ ALVoice* vv;
+ PVoice* pv;
+ ALVoice* vvoices;
+ PVoice* pvoices;
+ ALHeap* hp = c->heap;
+ ALSave* save;
+ ALFilter* sources;
+ ALParam* params;
+ ALParam* paramPtr;
+
+ drvr->head = NULL;
+ drvr->numPVoices = c->maxPVoices;
+ drvr->curSamples = 0;
+ drvr->paramSamples = 0;
+ drvr->outputRate = c->outputRate;
+ drvr->maxOutSamples = AL_MAX_RSP_SAMPLES;
+ drvr->dma = (ALDMANew)c->dmaproc;
+
+ save = alHeapAlloc(hp, 1, sizeof(ALSave));
+ alSaveNew(save);
+ drvr->outputFilter = &save->filter;
+
+ // allocate and initialize the auxilliary effects bus. at present we only support 1 effects bus.
+ drvr->auxBus = alHeapAlloc(hp, 1, sizeof(ALAuxBus));
+ drvr->maxAuxBusses = 1;
+ sources = alHeapAlloc(hp, c->maxPVoices, sizeof(ALFilter*));
+ alAuxBusNew(drvr->auxBus, sources, c->maxPVoices);
+
+ // allocate and initialize the main bus.
+ drvr->mainBus = alHeapAlloc(hp, 1, sizeof(ALMainBus));
+ sources = alHeapAlloc(hp, c->maxPVoices, sizeof(ALFilter*));
+ alMainBusNew(drvr->mainBus, sources, c->maxPVoices);
+
+ if (c->fxType != AL_FX_NONE) {
+ // Allocate an effect and set parameters
+ alSynAllocFX(drvr, 0, c, hp);
+ } else {
+ // Connect the aux bus to the main bus
+ alMainBusParam(drvr->mainBus, AL_FILTER_ADD_SOURCE, &drvr->auxBus[0]);
+ }
+
+ // Build the physical voice lists
+ drvr->pFreeList.next = NULL;
+ drvr->pFreeList.prev = NULL;
+ drvr->pLameList.next = NULL;
+ drvr->pLameList.prev = NULL;
+ drvr->pAllocList.next = NULL;
+ drvr->pAllocList.prev = NULL;
+
+ pvoices = alHeapAlloc(hp, c->maxPVoices, sizeof(PVoice));
+ for (i = 0; i < c->maxPVoices; i++) {
+ pv = &pvoices[i];
+ alLink(&pv->node, &drvr->pFreeList);
+ pv->vvoice = NULL;
+
+ alLoadNew(&pv->decoder, drvr->dma, hp);
+ alLoadParam(&pv->decoder, AL_FILTER_SET_SOURCE, NULL);
+
+ alResampleNew(&pv->resampler, hp);
+ alResampleParam(&pv->resampler, AL_FILTER_SET_SOURCE, &pv->decoder);
+
+ alEnvmixerNew(&pv->envmixer, hp);
+ alEnvmixerParam(&pv->envmixer, AL_FILTER_SET_SOURCE, &pv->resampler);
+
+ alAuxBusParam(drvr->auxBus, AL_FILTER_ADD_SOURCE, &pv->envmixer);
+
+ pv->channelKnob = &pv->envmixer.filter;
+ }
+
+ alSaveParam(save, AL_FILTER_SET_SOURCE, drvr->mainBus);
+
+ // build the parameter update list
+ params = alHeapAlloc(hp, c->maxUpdates, sizeof(ALParam));
+ drvr->paramList = NULL;
+ for (i = 0; i < c->maxUpdates; i++) {
+ paramPtr = ¶ms[i];
+ paramPtr->next = drvr->paramList;
+ drvr->paramList = paramPtr;
+ }
+ drvr->heap = hp;
+}
+
+/**
+ * slAudioFrame() is called every video frame, and is based on the video
+ * frame interrupt. It is assumed to be an accurate time source for the
+ * clients.
+ */
+Acmd* alAudioFrame(Acmd* cmdList, s32* cmdLen, s16* outBuf, s32 outLen) {
+ ALPlayer* client;
+ ALFilter* output;
+ ALSynth* drvr = &alGlobals->drvr;
+ s16 tmp = 0; // Starting buffer in DMEM
+ Acmd* cmdlEnd = cmdList;
+ Acmd* cmdPtr;
+ s32 nOut;
+ s16* lOutBuf = outBuf;
+
+ if (drvr->head == NULL) {
+ // nothing to do
+ *cmdLen = 0;
+ return cmdList;
+ }
+
+ // run down list of clients and execute callback if needed this
+ // subframe. Here we do all the work for the frame at the
+ // start. Time offsets that occur before the next frame are
+ // executed "early".
+ //
+ // paramSamples = time of next parameter change.
+ // curSamples = current sample time.
+ // so paramSamples - curSamples is the time until the next parameter change.
+ // if the next parameter change occurs within this frame time (outLen),
+ // then call back the client that contains the parameter change.
+ // Note, paramSamples must be rounded down to 16 sample boundary for use
+ // during the client handler.
+
+ for (drvr->paramSamples = __nextSampleTime(drvr, &client); drvr->paramSamples - drvr->curSamples < outLen;
+ drvr->paramSamples = __nextSampleTime(drvr, &client)) {
+ drvr->paramSamples &= ~0xF;
+ client->samplesLeft += _timeToSamplesNoRound(drvr, (*client->handler)(client));
+ }
+
+ // for safety's sake, always store paramSamples aligned to 16 sample boundary.
+ // this way, if an voice handler routine gets called outside the ALVoiceHandler
+ // routine (alSynAllocVoice) it will get timestamped with an aligned value and
+ // will be processed immediately next audio frame.
+ drvr->paramSamples &= ~0xF;
+
+ // Now build the command list in small chunks
+ while (outLen > 0) {
+ nOut = MIN(drvr->maxOutSamples, outLen);
+
+ // construct the command list for each physical voice by calling the head of the filter chain.
+ cmdPtr = cmdlEnd;
+ aSegment(cmdPtr++, 0, 0);
+ output = drvr->outputFilter;
+ (*output->setParam)(output, AL_FILTER_SET_DRAM, lOutBuf);
+ cmdlEnd = (*output->handler)(output, &tmp, nOut, drvr->curSamples, cmdPtr);
+
+ outLen -= nOut;
+ lOutBuf += nOut << 1; // For Stereo
+ drvr->curSamples += nOut;
+ }
+ *cmdLen = (s32)(cmdlEnd - cmdList);
+
+ _collectPVoices(drvr); // collect free physical voices
+ return cmdlEnd;
+}
+
+ALParam* __allocParam(void) {
+ ALParam* update = NULL;
+ ALSynth* drvr = &alGlobals->drvr;
+
+ if (drvr->paramList != NULL) {
+ update = drvr->paramList;
+ drvr->paramList = drvr->paramList->next;
+ update->next = NULL;
+ }
+ return update;
+}
+
+void __freeParam(ALParam* param) {
+ ALSynth* drvr = &alGlobals->drvr;
+ param->next = drvr->paramList;
+ drvr->paramList = param;
+}
+
+void _collectPVoices(ALSynth* drvr) {
+ ALLink* dl;
+ PVoice* pv;
+
+ while ((dl = drvr->pLameList.next) != NULL) {
+ pv = (PVoice*)dl;
+ alUnlink(&pv->node);
+ alLink(&pv->node, &drvr->pFreeList);
+ }
+}
+
+void _freePVoice(ALSynth* drvr, PVoice* pvoice) {
+ // move the voice from the allocated list to the lame list
+ alUnlink(&pvoice->node);
+ alLink(&pvoice->node, &drvr->pLameList);
+}
+
+static s32 _timeToSamplesNoRound(ALSynth* synth, s32 micros) {
+ // Add 0.5 to adjust the average affect of the truncation error produced by casting a float to an int.
+ f32 tmp = ((f32)micros) * synth->outputRate / 1000000.0 + 0.5;
+ return (s32)tmp;
+}
+
+s32 _timeToSamples(ALSynth* synth, s32 micros) {
+ return _timeToSamplesNoRound(synth, micros) & ~0xF;
+}
+
+static s32 __nextSampleTime(ALSynth* drvr, ALPlayer** client) {
+ ALMicroTime delta = 0x7FFFFFFF; // max delta for s32
+ ALPlayer* cl;
+
+ *client = NULL;
+
+ for (cl = drvr->head; cl != NULL; cl = cl->next) {
+ if (cl->samplesLeft - drvr->curSamples < delta) {
+ *client = cl;
+ delta = cl->samplesLeft - drvr->curSamples;
+ }
+ }
+ return (*client)->samplesLeft;
+}
diff --git a/src/libultra/bb/sa/common.c b/src/libultra/bb/sa/common.c
new file mode 100644
index 0000000000..a18735f4a5
--- /dev/null
+++ b/src/libultra/bb/sa/common.c
@@ -0,0 +1,42 @@
+#include "stddef.h"
+
+int strcmp(const char* s, const char* t) {
+ while (*s == *t) {
+ if (*s == '\0') {
+ return 0;
+ }
+ s++;
+ t++;
+ }
+
+ return *s - *t;
+}
+
+void* memset(char* s, int c, size_t n) {
+ size_t i;
+
+ for (i = 0; i < n; i++) {
+ s[i] = c;
+ }
+
+ return s;
+}
+
+int strncmp(const char* s, const char* t, int n) {
+ int i;
+
+ for (i = 0; (*s == *t) && (i < n); i++) {
+ if (*s == '\0') {
+ if (*t == '\0') {
+ return 0;
+ }
+ break;
+ }
+ if (*t == '\0') {
+ break;
+ }
+ s++;
+ t++;
+ }
+ return (i != n) ? *s - *t : 0;
+}
diff --git a/src/libultra/bb/sk/skapi.s b/src/libultra/bb/sk/skapi.s
new file mode 100644
index 0000000000..3e80adfcd1
--- /dev/null
+++ b/src/libultra/bb/sk/skapi.s
@@ -0,0 +1,48 @@
+#ifdef BBPLAYER
+#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
+#include "ultra64/bcp.h"
+
+.text
+
+#define SKC(name, num) \
+ LEAF(name) ;\
+ .set noreorder ;\
+ /* Load syscall number into v0 */ ;\
+ li v0, num ;\
+ /* Read from MI_SECURE_EXCEPTION_REG to */ ;\
+ /* transfer control to the Secure Kernel */ ;\
+ li t0, PHYS_TO_K1(MI_SECURE_EXCEPTION_REG) ;\
+ lw t1, (t0) ;\
+ nop ;\
+ jr ra ;\
+ nop ;\
+ .set reorder ;\
+ END(name)
+
+SKC(skGetId, 0)
+SKC(skLaunchSetup, 1)
+SKC(skLaunch, 2)
+SKC(skRecryptListValid, 3)
+SKC(skRecryptBegin, 4)
+SKC(skRecryptData, 5)
+SKC(skRecryptComputeState, 6)
+SKC(skRecryptEnd, 7)
+SKC(skSignHash, 8)
+SKC(skVerifyHash, 9)
+SKC(skGetConsumption, 10)
+SKC(skAdvanceTicketWindow, 11)
+SKC(skSetLimit, 12)
+SKC(skExit, 13)
+SKC(skKeepAlive, 14)
+
+/* These are not valid for a retail Secure Kernel, their usage pattern is unknown. */
+
+SKC(skGetRandomKeyData, 15)
+SKC(skDumpVirage, 16)
+SKC(skTest2, 17)
+SKC(skTest3, 18)
+SKC(skResetWindow, 19)
+SKC(skValidateRls, 20)
+
+#endif
diff --git a/src/libultra/gu/cosf.c b/src/libultra/gu/cosf.c
index 639084093f..f217eec13a 100644
--- a/src/libultra/gu/cosf.c
+++ b/src/libultra/gu/cosf.c
@@ -1,5 +1,5 @@
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h" // TODO: libultra should not have access to game-side headers
static const du P[] = {
{ 0x3FF00000, 0x00000000 }, { 0xBFC55554, 0xBC83656D }, { 0x3F8110ED, 0x3804C2A0 },
diff --git a/src/libultra/gu/libm_vals.s b/src/libultra/gu/libm_vals.s
index 18de1ae4f2..91f2cadb37 100644
--- a/src/libultra/gu/libm_vals.s
+++ b/src/libultra/gu/libm_vals.s
@@ -1,8 +1,6 @@
#include "ultra64/asm.h"
-.section .rodata
-
-.balign 16
+.rdata
DATA(__libm_qnan_f)
.word 0x7F810000
diff --git a/src/libultra/gu/lookat.c b/src/libultra/gu/lookat.c
index e1c7500cf1..8d1df6bbe1 100644
--- a/src/libultra/gu/lookat.c
+++ b/src/libultra/gu/lookat.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "ultra64.h"
+#include "z64math.h" // TODO: libultra should not have access to game-side headers
void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp) {
f32 length;
diff --git a/src/libultra/gu/lookathil.c b/src/libultra/gu/lookathil.c
index e9cf650a6e..5d14e59aba 100644
--- a/src/libultra/gu/lookathil.c
+++ b/src/libultra/gu/lookathil.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#define FTOFRAC8(x) ((s32)MIN(((x) * (128.0f)), 127.0f) & 0xFF)
diff --git a/src/libultra/gu/mtxutil.c b/src/libultra/gu/mtxutil.c
index e9e327f740..a6a3defa00 100644
--- a/src/libultra/gu/mtxutil.c
+++ b/src/libultra/gu/mtxutil.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void guMtxF2L(f32 mf[4][4], Mtx* m) {
s32 i, j;
diff --git a/src/libultra/gu/normalize.c b/src/libultra/gu/normalize.c
index 6a0cac0200..8b20110c8c 100644
--- a/src/libultra/gu/normalize.c
+++ b/src/libultra/gu/normalize.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "ultra64.h"
+#include "z64math.h" // TODO: libultra should not have access to game-side headers
void guNormalize(f32* x, f32* y, f32* z) {
f32 m = 1 / sqrtf(SQ(*x) + SQ(*y) + SQ(*z));
diff --git a/src/libultra/gu/ortho.c b/src/libultra/gu/ortho.c
index 62b6d79503..4ed717acfd 100644
--- a/src/libultra/gu/ortho.c
+++ b/src/libultra/gu/ortho.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void guOrthoF(f32 mf[4][4], f32 left, f32 right, f32 bottom, f32 top, f32 near, f32 far, f32 scale) {
s32 i, j;
diff --git a/src/libultra/gu/perspective.c b/src/libultra/gu/perspective.c
index 3f700a814a..e7a6bad2f5 100644
--- a/src/libultra/gu/perspective.c
+++ b/src/libultra/gu/perspective.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void guPerspectiveF(f32 mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale) {
f32 yscale;
diff --git a/src/libultra/gu/position.c b/src/libultra/gu/position.c
index 1b9a3525b2..b016c29a7c 100644
--- a/src/libultra/gu/position.c
+++ b/src/libultra/gu/position.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
/**
* guPositionF
diff --git a/src/libultra/gu/rotate.c b/src/libultra/gu/rotate.c
index b9108e1bc5..3f068f9417 100644
--- a/src/libultra/gu/rotate.c
+++ b/src/libultra/gu/rotate.c
@@ -1,14 +1,14 @@
-#include "global.h"
+#include "ultra64.h"
void guRotateF(f32 m[4][4], f32 a, f32 x, f32 y, f32 z) {
- static f32 D_80134D10 = M_PI / 180.0f;
+ static f32 dtor = M_PI / 180.0f;
f32 sine;
f32 cosine;
f32 ab;
f32 bc;
f32 ca;
f32 t;
-#if !PLATFORM_N64
+#if LIBULTRA_VERSION >= LIBULTRA_VERSION_K
f32 xs;
f32 ys;
f32 zs;
@@ -16,37 +16,38 @@ void guRotateF(f32 m[4][4], f32 a, f32 x, f32 y, f32 z) {
guNormalize(&x, &y, &z);
- a *= D_80134D10;
+ a *= dtor;
sine = sinf(a);
cosine = cosf(a);
- ab = x * y * (1 - cosine);
- bc = y * z * (1 - cosine);
- ca = z * x * (1 - cosine);
+ t = 1.0f - cosine;
+ ab = x * y * t;
+ bc = y * z * t;
+ ca = z * x * t;
guMtxIdentF(m);
-#if PLATFORM_N64
-#define xs (x * sine)
-#define ys (y * sine)
-#define zs (z * sine)
-#else
+#if LIBULTRA_VERSION >= LIBULTRA_VERSION_K
xs = x * sine;
ys = y * sine;
zs = z * sine;
+#else
+#define xs (x * sine)
+#define ys (y * sine)
+#define zs (z * sine)
#endif
t = x * x;
- m[0][0] = (1 - t) * cosine + t;
+ m[0][0] = t + cosine * (1.0f - t);
m[2][1] = bc - xs;
m[1][2] = bc + xs;
t = y * y;
- m[1][1] = (1 - t) * cosine + t;
+ m[1][1] = t + cosine * (1.0f - t);
m[2][0] = ca + ys;
m[0][2] = ca - ys;
t = z * z;
- m[2][2] = (1 - t) * cosine + t;
+ m[2][2] = t + cosine * (1.0f - t);
m[1][0] = ab - zs;
m[0][1] = ab + zs;
}
diff --git a/src/libultra/gu/scale.c b/src/libultra/gu/scale.c
index 525f2fb4c5..6bfcd98c30 100644
--- a/src/libultra/gu/scale.c
+++ b/src/libultra/gu/scale.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void guScaleF(f32 m[4][4], f32 x, f32 y, f32 z) {
guMtxIdentF(m);
diff --git a/src/libultra/gu/sinf.c b/src/libultra/gu/sinf.c
index 49929e8436..23013731c4 100644
--- a/src/libultra/gu/sinf.c
+++ b/src/libultra/gu/sinf.c
@@ -1,5 +1,5 @@
-#include "global.h"
#include "ultra64.h"
+#include "z64math.h" // TODO: libultra should not have access to game-side headers
static const du P[] = {
{ 0x3FF00000, 0x00000000 }, { 0xBFC55554, 0xBC83656D }, { 0x3F8110ED, 0x3804C2A0 },
diff --git a/src/libultra/gu/sqrtf.c b/src/libultra/gu/sqrtf.c
deleted file mode 100644
index 5e5fa233cc..0000000000
--- a/src/libultra/gu/sqrtf.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "global.h"
-
-#ifndef __GNUC__
-#define __builtin_sqrtf sqrtf
-#endif
-
-f32 sqrtf(f32 f) {
- return __builtin_sqrtf(f);
-}
diff --git a/src/libultra/gu/sqrtf.s b/src/libultra/gu/sqrtf.s
new file mode 100644
index 0000000000..aaf5023593
--- /dev/null
+++ b/src/libultra/gu/sqrtf.s
@@ -0,0 +1,9 @@
+#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
+
+.text
+
+LEAF(sqrtf)
+ sqrt.s fv0, fa0
+ j ra
+END(sqrtf)
diff --git a/src/libultra/gu/translate.c b/src/libultra/gu/translate.c
index 2753063d5d..9843890628 100644
--- a/src/libultra/gu/translate.c
+++ b/src/libultra/gu/translate.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void guTranslateF(f32 m[4][4], f32 x, f32 y, f32 z) {
guMtxIdentF(m);
diff --git a/src/libultra/gu/us2dex.c b/src/libultra/gu/us2dex.c
index d2e5a2b043..bb2f50ae82 100644
--- a/src/libultra/gu/us2dex.c
+++ b/src/libultra/gu/us2dex.c
@@ -1,25 +1,27 @@
-#include "global.h"
+#include "ultra64/ultratypes.h"
+#include "ultra64/gbi.h"
+#include "ultra64/gs2dex.h"
void guS2DInitBg(uObjBg* bg) {
- u32 size;
- s32 tmem = (bg->b.imageFmt == G_IM_FMT_CI) ? 0x100 : 0x200;
- u16 shift = (6 - bg->b.imageSiz);
+ u16 tmem = (bg->b.imageFmt == G_IM_FMT_CI) ? 0x100 : 0x200;
+ u16 shift = 6 - bg->b.imageSiz;
+ u32 tsize;
if (bg->b.imageLoad == G_BGLT_LOADBLOCK) {
bg->b.tmemW = bg->b.imageW >> shift;
- bg->b.tmemH = (tmem / bg->b.tmemW) * 4;
- bg->b.tmemSizeW = bg->b.tmemW * 2;
+ bg->b.tmemH = (tmem / bg->b.tmemW) << 2;
+ bg->b.tmemSizeW = bg->b.tmemW << 1;
bg->b.tmemSize = bg->b.tmemH * bg->b.tmemSizeW;
bg->b.tmemLoadSH = (bg->b.tmemSize >> 1) - 1;
- bg->b.tmemLoadTH = (0x7FF / bg->b.tmemW) + 1;
+ bg->b.tmemLoadTH = GS_CALC_DXT(bg->b.tmemW);
} else { // G_BGLT_LOADTILE
bg->b.tmemW = (bg->b.frameW >> shift) + 3;
- bg->b.tmemH = (tmem / bg->b.tmemW) * 4;
- bg->b.tmemSizeW = (bg->b.imageW >> shift) * 2;
+ bg->b.tmemH = (tmem / bg->b.tmemW) << 2;
+ bg->b.tmemSizeW = (bg->b.imageW >> shift) << 1;
- size = bg->b.tmemH * bg->b.tmemSizeW;
- bg->b.tmemSize = (size >> 16);
- bg->b.tmemLoadSH = (size >> 0) & 0xFFFF;
+ tsize = bg->b.tmemH * bg->b.tmemSizeW;
+ bg->b.tmemSize = tsize >> 16;
+ bg->b.tmemLoadSH = tsize & 0xFFFF;
bg->b.tmemLoadTH = bg->b.tmemH - 1;
}
}
diff --git a/src/libultra/io/aigetlen.c b/src/libultra/io/aigetlen.c
index 45be442516..5787f10e33 100644
--- a/src/libultra/io/aigetlen.c
+++ b/src/libultra/io/aigetlen.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
/**
* Returns the number of bytes remaining in a currently ongoing audio DMA.
diff --git a/src/libultra/io/aisetfreq.c b/src/libultra/io/aisetfreq.c
index 9e1b8c44e2..ce79191e11 100644
--- a/src/libultra/io/aisetfreq.c
+++ b/src/libultra/io/aisetfreq.c
@@ -1,4 +1,6 @@
-#include "global.h"
+#include "ultra64.h"
+
+extern s32 osViClock;
/**
* Programs the operating frequency of the Audio DAC.
diff --git a/src/libultra/io/cartrominit.c b/src/libultra/io/cartrominit.c
index b2cf1d1e17..22dd36e631 100644
--- a/src/libultra/io/cartrominit.c
+++ b/src/libultra/io/cartrominit.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
OSPiHandle __CartRomHandle;
diff --git a/src/libultra/io/contpfs.c b/src/libultra/io/contpfs.c
index 20b2ea63ff..0506ca5d5a 100644
--- a/src/libultra/io/contpfs.c
+++ b/src/libultra/io/contpfs.c
@@ -1,5 +1,5 @@
+#include "array_count.h"
#include "ultra64.h"
-#include "global.h"
s32 __osPfsInodeCacheChannel = -1;
u8 __osPfsInodeCacheBank = 250;
diff --git a/src/libultra/io/contquery.c b/src/libultra/io/contquery.c
index 660e2dcd42..b90ea2ff68 100644
--- a/src/libultra/io/contquery.c
+++ b/src/libultra/io/contquery.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
/**
* osContStartQuery:
@@ -15,7 +15,11 @@ s32 osContStartQuery(OSMesgQueue* mq) {
osRecvMesg(mq, NULL, OS_MESG_BLOCK);
}
ret = __osSiRawStartDma(OS_READ, &__osContPifRam);
+#ifdef BBPLAYER
+ __osContLastCmd = CONT_CMD_CHANNEL_RESET;
+#else
__osContLastCmd = CONT_CMD_REQUEST_STATUS;
+#endif
__osSiRelAccess();
return ret;
}
diff --git a/src/libultra/io/contramread.c b/src/libultra/io/contramread.c
index 058f58e80f..d631d2fb6a 100644
--- a/src/libultra/io/contramread.c
+++ b/src/libultra/io/contramread.c
@@ -1,10 +1,13 @@
-#include "global.h"
+#include "ultra64.h"
#define BLOCKSIZE 32
+#ifndef BBPLAYER
s32 __osPfsLastChannel = -1;
+#endif
s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data) {
+#ifndef BBPLAYER
s32 ret;
s32 i;
u8* ptr;
@@ -60,4 +63,26 @@ s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data) {
__osSiRelAccess();
return ret;
+#else
+ s32 ret;
+
+ __osSiGetAccess();
+
+ ret = 0;
+ if (__osBbPakAddress[channel] != 0) {
+ if (__osBbPakSize - 0x20 >= addr * 0x20) {
+ s32 i;
+
+ for (i = 0; i < 0x20; i++) {
+ data[i] = *(u8*)(__osBbPakAddress[channel] + addr * 0x20 + i);
+ }
+ }
+ } else {
+ ret = PFS_ERR_NOPACK;
+ }
+
+ __osSiRelAccess();
+
+ return ret;
+#endif
}
diff --git a/src/libultra/io/contramwrite.c b/src/libultra/io/contramwrite.c
index 6a776a13b8..b71a3d48b1 100644
--- a/src/libultra/io/contramwrite.c
+++ b/src/libultra/io/contramwrite.c
@@ -1,7 +1,9 @@
#include "ultra64.h"
-#include "global.h"
+
+extern s32 __osPfsLastChannel;
s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force) {
+#ifndef BBPLAYER
s32 ret = 0;
s32 i;
u8* ptr;
@@ -65,4 +67,28 @@ s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32
__osSiRelAccess();
return ret;
+#else
+ s32 ret = 0;
+
+ if ((force != true) && (address < PFS_LABEL_AREA) && (address != 0)) {
+ return 0;
+ }
+
+ __osSiGetAccess();
+
+ if (__osBbPakAddress[channel] != 0) {
+ if (__osBbPakSize - 0x20 >= address * 0x20) {
+ s32 i;
+
+ for (i = 0; i < 0x20; i++) {
+ *(u8*)(__osBbPakAddress[channel] + address * 0x20 + i) = buffer[i];
+ }
+ }
+ } else {
+ ret = 1;
+ }
+
+ __osSiRelAccess();
+ return ret;
+#endif
}
diff --git a/src/libultra/io/contreaddata.c b/src/libultra/io/contreaddata.c
index ff44bc15b8..bafb2ad40a 100644
--- a/src/libultra/io/contreaddata.c
+++ b/src/libultra/io/contreaddata.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "array_count.h"
+#include "ultra64.h"
s32 osContStartReadData(OSMesgQueue* mq) {
s32 ret;
@@ -10,7 +11,11 @@ s32 osContStartReadData(OSMesgQueue* mq) {
osRecvMesg(mq, NULL, OS_MESG_BLOCK);
}
ret = __osSiRawStartDma(OS_READ, &__osContPifRam);
+#ifdef BBPLAYER
+ __osContLastCmd = CONT_CMD_CHANNEL_RESET;
+#else
__osContLastCmd = CONT_CMD_READ_BUTTON;
+#endif
__osSiRelAccess();
return ret;
}
@@ -29,7 +34,18 @@ void osContGetReadData(OSContPad* contData) {
contData->stick_x = read.joyX;
contData->stick_y = read.joyY;
}
- };
+ }
+
+#ifdef BBPLAYER
+ if (__osBbIsBb && __osBbHackFlags != 0) {
+ OSContPad tmp;
+ contData -= __osMaxControllers;
+
+ tmp = contData[0];
+ contData[0] = contData[__osBbHackFlags];
+ contData[__osBbHackFlags] = tmp;
+ }
+#endif
}
void __osPackReadData(void) {
diff --git a/src/libultra/io/controller.c b/src/libultra/io/controller.c
index 290f1b5854..588e2ae9ac 100644
--- a/src/libultra/io/controller.c
+++ b/src/libultra/io/controller.c
@@ -1,10 +1,13 @@
-#include "global.h"
+#include "array_count.h"
+#include "ultra64.h"
OSPifRam __osContPifRam;
u8 __osContLastCmd;
u8 __osMaxControllers; // always 4
+#ifndef BBPLAYER
OSTimer __osEepromTimer;
+#endif
OSMesgQueue __osEepromTimerMsgQueue;
OSMesg __osEepromTimerMsg;
@@ -41,7 +44,11 @@ s32 osContInit(OSMesgQueue* mq, u8* ctlBitfield, OSContStatus* status) {
osRecvMesg(mq, &msg, OS_MESG_BLOCK);
__osContGetInitData(ctlBitfield, status);
+#ifdef BBPLAYER
+ __osContLastCmd = CONT_CMD_CHANNEL_RESET;
+#else
__osContLastCmd = CONT_CMD_REQUEST_STATUS;
+#endif
__osSiCreateAccessQueue();
osCreateMesgQueue(&__osEepromTimerMsgQueue, &__osEepromTimerMsg, 1);
@@ -52,7 +59,7 @@ void __osContGetInitData(u8* ctlBitfield, OSContStatus* data) {
u8* ptr;
__OSContRequesFormat req;
s32 i;
- u8 bitfieldTemp = 0;
+ u8 bits = 0;
ptr = (u8*)&__osContPifRam;
@@ -63,10 +70,30 @@ void __osContGetInitData(u8* ctlBitfield, OSContStatus* data) {
continue;
}
data->type = req.typel << 8 | req.typeh;
+#ifdef BBPLAYER
+ data->status = __osBbPakAddress[i] != 0;
+#else
data->status = req.status;
- bitfieldTemp |= 1 << i;
+#endif
+ bits |= 1 << i;
}
- *ctlBitfield = bitfieldTemp;
+
+#ifdef BBPLAYER
+ if (__osBbIsBb && __osBbHackFlags != 0) {
+ OSContStatus tmp;
+
+ bits = (bits & ~((1 << __osBbHackFlags) | 1)) | ((bits & 1) << __osBbHackFlags) |
+ ((bits & (1 << __osBbHackFlags)) >> __osBbHackFlags);
+
+ data -= __osMaxControllers;
+
+ tmp = data[0];
+ data[0] = data[__osBbHackFlags];
+ data[__osBbHackFlags] = tmp;
+ }
+#endif
+
+ *ctlBitfield = bits;
}
void __osPackRequestData(u8 poll) {
diff --git a/src/libultra/io/contsetch.c b/src/libultra/io/contsetch.c
index 5ced5b6de4..c5002ce6ac 100644
--- a/src/libultra/io/contsetch.c
+++ b/src/libultra/io/contsetch.c
@@ -1,5 +1,4 @@
#include "ultra64.h"
-#include "global.h"
/*
* s32 osContSetCh(u8 ch)
diff --git a/src/libultra/io/crc.c b/src/libultra/io/crc.c
index c1af0b12c5..485b6c0f54 100644
--- a/src/libultra/io/crc.c
+++ b/src/libultra/io/crc.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
// Valid addr up to 0x7FF
// It's the address of a block of 0x20 bytes in the mempak
diff --git a/src/libultra/io/devmgr.c b/src/libultra/io/devmgr.c
index d0e7d5289a..7eb3197f81 100644
--- a/src/libultra/io/devmgr.c
+++ b/src/libultra/io/devmgr.c
@@ -1,7 +1,9 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/internal.h"
#include "ultra64/leodrive.h"
+#define TEMP_BUFFER ((void*)0x80600000)
+
// os.h
#define LEO_BLOCK_MODE 1
#define LEO_TRACK_MODE 2
@@ -14,6 +16,9 @@ void __osDevMgrMain(void* arg) {
s32 ret;
OSDevMgr* dm = (OSDevMgr*)arg;
s32 messageSend;
+#ifdef BBPLAYER
+ s32 check = false;
+#endif
while (true) {
osRecvMesg(dm->cmdQueue, (OSMesg*)&ioMesg, OS_MESG_BLOCK);
@@ -78,6 +83,13 @@ void __osDevMgrMain(void* arg) {
switch (ioMesg->hdr.type) {
case OS_MESG_TYPE_DMAREAD:
osRecvMesg(dm->acsQueue, &dummy, OS_MESG_BLOCK);
+#ifdef BBPLAYER
+ if (__osBbIsBb == 1 && ((u32)ioMesg->dramAddr & 0x7F) >= 0x60) {
+ check = true;
+ ret = dm->dma(OS_READ, ioMesg->devAddr, TEMP_BUFFER, ioMesg->size);
+ break;
+ }
+#endif
ret = dm->dma(OS_READ, ioMesg->devAddr, ioMesg->dramAddr, ioMesg->size);
break;
case OS_MESG_TYPE_DMAWRITE:
@@ -86,6 +98,13 @@ void __osDevMgrMain(void* arg) {
break;
case OS_MESG_TYPE_EDMAREAD:
osRecvMesg(dm->acsQueue, &dummy, OS_MESG_BLOCK);
+#ifdef BBPLAYER
+ if (__osBbIsBb == 1 && ((u32)ioMesg->dramAddr & 0x7F) >= 0x60) {
+ check = true;
+ ret = dm->edma(ioMesg->piHandle, OS_READ, ioMesg->devAddr, TEMP_BUFFER, ioMesg->size);
+ break;
+ }
+#endif
ret = dm->edma(ioMesg->piHandle, OS_READ, ioMesg->devAddr, ioMesg->dramAddr, ioMesg->size);
break;
case OS_MESG_TYPE_EDMAWRITE:
@@ -103,6 +122,14 @@ void __osDevMgrMain(void* arg) {
if (ret == 0) {
osRecvMesg(dm->evtQueue, &em, OS_MESG_BLOCK);
+#ifdef BBPLAYER
+ if (__osBbIsBb == 1 && check) {
+ osInvalDCache(TEMP_BUFFER, (ioMesg->size + DCACHE_LINEMASK) & ~DCACHE_LINEMASK);
+ bcopy(TEMP_BUFFER, ioMesg->dramAddr, ioMesg->size);
+ check = false;
+ osWritebackDCache(ioMesg->dramAddr, ioMesg->size);
+ }
+#endif
osSendMesg(ioMesg->hdr.retQueue, (OSMesg)ioMesg, OS_MESG_NOBLOCK);
osSendMesg(dm->acsQueue, NULL, OS_MESG_NOBLOCK);
}
diff --git a/src/libultra/io/dpgetstat.c b/src/libultra/io/dpgetstat.c
index 1a944b2c7a..1dbf5e09b8 100644
--- a/src/libultra/io/dpgetstat.c
+++ b/src/libultra/io/dpgetstat.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
u32 osDpGetStatus(void) {
return IO_READ(DPC_STATUS_REG);
diff --git a/src/libultra/io/dpsetstat.c b/src/libultra/io/dpsetstat.c
index 4275e1fde6..cfaa644b8d 100644
--- a/src/libultra/io/dpsetstat.c
+++ b/src/libultra/io/dpsetstat.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void osDpSetStatus(u32 status) {
IO_WRITE(DPC_STATUS_REG, status);
diff --git a/src/libultra/io/epidma.c b/src/libultra/io/epidma.c
index ca57a9d170..f2a073cb48 100644
--- a/src/libultra/io/epidma.c
+++ b/src/libultra/io/epidma.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/internal.h"
s32 osEPiStartDma(OSPiHandle* handle, OSIoMesg* mb, s32 direction) {
diff --git a/src/libultra/io/epirawdma.c b/src/libultra/io/epirawdma.c
index ff6bb9a653..3f238dd3fc 100644
--- a/src/libultra/io/epirawdma.c
+++ b/src/libultra/io/epirawdma.c
@@ -1,8 +1,18 @@
-#include "global.h"
+#include "ultra64.h"
+#include "ultra64/bcp.h"
s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size) {
- s32 status;
+#ifdef BBPLAYER
+ u64 dummybuf[2];
+#endif
+ u32 status;
OSPiHandle* curHandle;
+#ifdef BBPLAYER
+ u32 buffer;
+ u32 pgsize;
+ u16* adr;
+ u32 i;
+#endif
status = IO_READ(PI_STATUS_REG);
while (status & (PI_STATUS_DMA_BUSY | PI_STATUS_IO_BUSY)) {
@@ -53,9 +63,102 @@ s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dr
curHandle->pulse = handle->pulse;
}
+#ifdef BBPLAYER
+ if (direction == OS_READ) {
+ // Device page size in bytes
+ pgsize = 1;
+ for (i = 1; i <= (u32)handle->pageSize + 2; i++) {
+ pgsize *= 2;
+ }
+
+ // If the initial cart address mod pgsize is at the last u16 in the page,
+ // need to do some manual DMAs?
+ if ((cartAddr & (pgsize - 1)) == pgsize - sizeof(u16)) {
+ // Read 32 bits starting 2 bytes before the target DMA address,
+ // so that the lower 16 bits of the result are the first 2 bytes
+ // of the requested data.
+ __osEPiRawReadIo(handle, cartAddr - sizeof(u16), &buffer);
+
+ // Poke the lower 16 bits into the destination address
+ adr = (u16*)PHYS_TO_K1(dramAddr);
+ *(adr++) = (u16)buffer;
+
+ // Update DMA parameters
+ cartAddr += sizeof(u16);
+ dramAddr = adr;
+ size -= sizeof(u16);
+
+ // If the remaining size is >= 4
+ if (size >= sizeof(u32)) {
+ // Read another 32 bits at the cart addr
+ __osEPiRawReadIo(handle, cartAddr, &buffer);
+
+ // Store all 32 bits to RAM
+ adr = (u16*)dramAddr;
+ *(adr++) = buffer >> 16;
+ *(adr++) = (u16)buffer;
+
+ // Update DMA parameters again
+ cartAddr += sizeof(u32);
+ dramAddr = adr;
+ size -= sizeof(u32);
+
+ // If we're not at the end of the DMA
+ if (size != 0) {
+ // Read 32 bits again
+ __osEPiRawReadIo(handle, cartAddr, &buffer);
+
+ // Store just the upper 16 bits
+ adr = (u16*)PHYS_TO_K1(dramAddr);
+ *(adr++) = buffer >> 16;
+
+ // Update DMA parameters once more
+ cartAddr += sizeof(u16);
+ dramAddr = adr;
+ size -= sizeof(u16);
+ }
+ }
+ }
+
+ // If the end cart address mod pgsize is just 2 bytes into a page or the remaining data size is just 1x u16
+ if (((((cartAddr + size) & (pgsize - 1)) == sizeof(u16)) | (size == sizeof(u16))) != 0) {
+ if ((cartAddr + size) & 2) {
+ // Read 32 bits at end - 2, store the upper 16 bits
+ __osEPiRawReadIo(handle, cartAddr + size - sizeof(u16), &buffer);
+ adr = (u16*)PHYS_TO_K1(dramAddr) + (size - sizeof(u16)) / sizeof(u16);
+ *adr = buffer >> 16;
+ } else {
+ // Read 32 bits at end - 4, store the lower 16 bits
+ __osEPiRawReadIo(handle, cartAddr + size - sizeof(u32), &buffer);
+ adr = (u16*)PHYS_TO_K1(dramAddr) + (size - sizeof(u16)) / sizeof(u16);
+ *adr = (u16)buffer;
+ }
+ size -= sizeof(u16);
+ }
+
+ if (size == 0) {
+ // If size ended up 0 following the adjustments, run an 8-byte dummy DMA anyway
+ size = 8;
+ dramAddr = (void*)dummybuf;
+ cartAddr = 0;
+ }
+ }
+#endif
+
IO_WRITE(PI_DRAM_ADDR_REG, osVirtualToPhysical(dramAddr));
IO_WRITE(PI_CART_ADDR_REG, K1_TO_PHYS(handle->baseAddress | cartAddr));
+#ifdef BBPLAYER
+ if (direction != OS_READ && direction != OS_WRITE) {
+ return -1;
+ }
+
+ if ((handle->baseAddress | cartAddr) <= 0x400) {
+ IO_WRITE((direction == OS_READ) ? PI_EX_WR_LEN_REG : PI_EX_RD_LEN_REG, size - 1);
+ } else {
+ IO_WRITE((direction == OS_READ) ? PI_WR_LEN_REG : PI_RD_LEN_REG, size - 1);
+ }
+#else
switch (direction) {
case OS_READ:
IO_WRITE(PI_WR_LEN_REG, size - 1);
@@ -66,5 +169,6 @@ s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dr
default:
return -1;
}
+#endif
return 0;
}
diff --git a/src/libultra/io/epirawread.c b/src/libultra/io/epirawread.c
index 41997df66d..77d558958c 100644
--- a/src/libultra/io/epirawread.c
+++ b/src/libultra/io/epirawread.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data) {
s32 status;
diff --git a/src/libultra/io/epirawwrite.c b/src/libultra/io/epirawwrite.c
index 4d704a1923..d9b1377656 100644
--- a/src/libultra/io/epirawwrite.c
+++ b/src/libultra/io/epirawwrite.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data) {
s32 status;
diff --git a/src/libultra/io/epiread.c b/src/libultra/io/epiread.c
index d05604a589..a102bbc7e0 100644
--- a/src/libultra/io/epiread.c
+++ b/src/libultra/io/epiread.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 osEPiReadIo(OSPiHandle* handle, u32 devAddr, u32* data) {
register s32 ret;
diff --git a/src/libultra/io/epiwrite.c b/src/libultra/io/epiwrite.c
index 0547e69991..c06e71f7a8 100644
--- a/src/libultra/io/epiwrite.c
+++ b/src/libultra/io/epiwrite.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data) {
register s32 ret;
diff --git a/src/libultra/io/motor.c b/src/libultra/io/motor.c
index 252e93875a..78ce191b7b 100644
--- a/src/libultra/io/motor.c
+++ b/src/libultra/io/motor.c
@@ -1,10 +1,13 @@
-#include "global.h"
+#include "ultra64.h"
#define MOTOR_ID 0x80
+#ifndef BBPLAYER
OSPifRam __MotorDataBuf[MAXCONTROLLERS];
+#endif
s32 __osMotorAccess(OSPfs* pfs, s32 vibrate) {
+#ifndef BBPLAYER
s32 i;
s32 ret;
u8* ptr = (u8*)&__MotorDataBuf[pfs->channel];
@@ -43,8 +46,12 @@ s32 __osMotorAccess(OSPfs* pfs, s32 vibrate) {
__osSiRelAccess();
return ret;
+#else
+ return PFS_ERR_INVALID;
+#endif
}
+#ifndef BBPLAYER
void _MakeMotorData(s32 channel, OSPifRam* mdata) {
u8* ptr = (u8*)mdata;
__OSContRamReadFormat ramreadformat;
@@ -67,8 +74,10 @@ void _MakeMotorData(s32 channel, OSPifRam* mdata) {
ptr += sizeof(ramreadformat);
*ptr = CONT_CMD_END;
}
+#endif
s32 osMotorInit(OSMesgQueue* ctrlrqueue, OSPfs* pfs, s32 channel) {
+#ifndef BBPLAYER
s32 ret;
u8 temp[BLOCKSIZE];
@@ -123,4 +132,7 @@ s32 osMotorInit(OSMesgQueue* ctrlrqueue, OSPfs* pfs, s32 channel) {
pfs->status = PFS_MOTOR_INITIALIZED;
return 0; // "Recognized rumble pak"
+#else
+ return PFS_ERR_DEVICE;
+#endif
}
diff --git a/src/libultra/io/pfsallocatefile.c b/src/libultra/io/pfsallocatefile.c
index c20531224e..10684cc736 100644
--- a/src/libultra/io/pfsallocatefile.c
+++ b/src/libultra/io/pfsallocatefile.c
@@ -1,5 +1,4 @@
#include "ultra64.h"
-#include "global.h"
#include "ultra64/pfs.h"
s32 osPfsAllocateFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32 fileSize, s32* fileNo) {
diff --git a/src/libultra/io/pfschecker.c b/src/libultra/io/pfschecker.c
index b0a94f1ad4..fddb150d53 100644
--- a/src/libultra/io/pfschecker.c
+++ b/src/libultra/io/pfschecker.c
@@ -1,5 +1,4 @@
#include "ultra64.h"
-#include "global.h"
#include "ultra64/pfs.h"
#define CHECK_IPAGE(p) \
diff --git a/src/libultra/io/pfsdeletefile.c b/src/libultra/io/pfsdeletefile.c
index 573af6a724..864dbd6b81 100644
--- a/src/libultra/io/pfsdeletefile.c
+++ b/src/libultra/io/pfsdeletefile.c
@@ -1,5 +1,5 @@
#include "ultra64/pfs.h"
-#include "global.h"
+#include "ultra64.h"
s32 osPfsDeleteFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName) {
s32 file_no;
diff --git a/src/libultra/io/pfsfilestate.c b/src/libultra/io/pfsfilestate.c
index 367a7f27d6..489e4b300e 100644
--- a/src/libultra/io/pfsfilestate.c
+++ b/src/libultra/io/pfsfilestate.c
@@ -1,5 +1,4 @@
#include "ultra64.h"
-#include "global.h"
s32 osPfsFileState(OSPfs* pfs, s32 fileNo, OSPfsState* state) {
s32 ret;
diff --git a/src/libultra/io/pfsfindfile.c b/src/libultra/io/pfsfindfile.c
index ad0bde885a..06e6d57f3f 100644
--- a/src/libultra/io/pfsfindfile.c
+++ b/src/libultra/io/pfsfindfile.c
@@ -1,5 +1,4 @@
#include "ultra64.h"
-#include "global.h"
s32 osPfsFindFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32* fileNo) {
s32 j;
diff --git a/src/libultra/io/pfsfreeblocks.c b/src/libultra/io/pfsfreeblocks.c
index 7210c65815..6bf8678bc1 100644
--- a/src/libultra/io/pfsfreeblocks.c
+++ b/src/libultra/io/pfsfreeblocks.c
@@ -1,5 +1,4 @@
#include "ultra64.h"
-#include "global.h"
#include "ultra64/pfs.h"
s32 osPfsFreeBlocks(OSPfs* pfs, s32* leftoverBytes) {
diff --git a/src/libultra/io/pfsgetstatus.c b/src/libultra/io/pfsgetstatus.c
index 0ec3bd7b4d..a6f09fa63b 100644
--- a/src/libultra/io/pfsgetstatus.c
+++ b/src/libultra/io/pfsgetstatus.c
@@ -1,7 +1,7 @@
#include "ultra64.h"
-#include "global.h"
s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel) {
+#ifndef BBPLAYER
s32 ret = 0;
OSMesg msg;
OSContStatus data;
@@ -24,6 +24,12 @@ s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel) {
return PFS_ERR_CONTRFAIL;
}
return ret;
+#else
+ if (__osBbPakAddress[channel] != 0) {
+ return 0;
+ }
+ return PFS_ERR_NOPACK;
+#endif
}
void __osPfsRequestOneChannel(s32 channel, u8 cmd) {
diff --git a/src/libultra/io/pfsinitpak.c b/src/libultra/io/pfsinitpak.c
index 59fb8eda9b..9e03188dca 100644
--- a/src/libultra/io/pfsinitpak.c
+++ b/src/libultra/io/pfsinitpak.c
@@ -1,5 +1,4 @@
#include "ultra64.h"
-#include "global.h"
s32 osPfsInitPak(OSMesgQueue* queue, OSPfs* pfs, s32 channel) {
s32 ret;
diff --git a/src/libultra/io/pfsisplug.c b/src/libultra/io/pfsisplug.c
index d5630fccc5..faa0752172 100644
--- a/src/libultra/io/pfsisplug.c
+++ b/src/libultra/io/pfsisplug.c
@@ -1,5 +1,4 @@
#include "ultra64.h"
-#include "global.h"
OSPifRam __osPfsPifRam;
@@ -88,8 +87,28 @@ void __osPfsGetInitData(u8* pattern, OSContStatus* contData) {
}
contData->type = ((req.typel << 8) | req.typeh);
+#ifdef BBPLAYER
+ contData->status = __osBbPakAddress[i] != 0;
+#else
contData->status = req.status;
+#endif
bits |= (1 << i);
}
+
+#ifdef BBPLAYER
+ if (__osBbIsBb && __osBbHackFlags != 0) {
+ OSContStatus tmp;
+
+ bits = (bits & ~((1 << __osBbHackFlags) | 1)) | ((bits & 1) << __osBbHackFlags) |
+ ((bits & (1 << __osBbHackFlags)) >> __osBbHackFlags);
+
+ contData -= __osMaxControllers;
+
+ tmp = contData[0];
+ contData[0] = contData[__osBbHackFlags];
+ contData[__osBbHackFlags] = tmp;
+ }
+#endif
+
*pattern = bits;
}
diff --git a/src/libultra/io/pfsreadwritefile.c b/src/libultra/io/pfsreadwritefile.c
index b2c78a7464..b2579839ff 100644
--- a/src/libultra/io/pfsreadwritefile.c
+++ b/src/libultra/io/pfsreadwritefile.c
@@ -1,5 +1,4 @@
#include "ultra64.h"
-#include "global.h"
#define CHECK_IPAGE(p, pfs) \
(((p).ipage >= (pfs).inodeStartPage) && ((p).inode_t.bank < (pfs).banks) && ((p).inode_t.page >= 0x01) && \
diff --git a/src/libultra/io/pfsselectbank.c b/src/libultra/io/pfsselectbank.c
index d257e04911..1c89138546 100644
--- a/src/libultra/io/pfsselectbank.c
+++ b/src/libultra/io/pfsselectbank.c
@@ -1,5 +1,5 @@
#include "ultra64/pfs.h"
-#include "global.h"
+#include "ultra64.h"
s32 __osPfsSelectBank(OSPfs* pfs, u8 bank) {
u8 temp[BLOCKSIZE];
diff --git a/src/libultra/io/piacs.c b/src/libultra/io/piacs.c
index 0ffa3448c4..84cc4246be 100644
--- a/src/libultra/io/piacs.c
+++ b/src/libultra/io/piacs.c
@@ -1,7 +1,8 @@
-#include "global.h"
+#include "array_count.h"
+#include "ultra64.h"
u32 __osPiAccessQueueEnabled = false;
-OSMesg piAccessBuf[1];
+static OSMesg piAccessBuf[1];
OSMesgQueue __osPiAccessQueue;
void __osPiCreateAccessQueue(void) {
diff --git a/src/libultra/io/pigetcmdq.c b/src/libultra/io/pigetcmdq.c
index 3f6f173580..c0de3d088b 100644
--- a/src/libultra/io/pigetcmdq.c
+++ b/src/libultra/io/pigetcmdq.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/internal.h"
OSMesgQueue* osPiGetCmdQueue(void) {
diff --git a/src/libultra/io/pimgr.c b/src/libultra/io/pimgr.c
index e8aa98d01b..58f5def6e9 100644
--- a/src/libultra/io/pimgr.c
+++ b/src/libultra/io/pimgr.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "stack.h"
#include "ultra64/internal.h"
@@ -6,11 +6,10 @@ OSDevMgr __osPiDevMgr = { 0 };
OSPiHandle __Dom1SpeedParam;
OSPiHandle __Dom2SpeedParam;
-OSThread piThread;
-STACK(piStackThread, 0x1000);
-OSMesgQueue piEventQueue;
-OSMesg piEventBuf[2];
-OSThread __osThreadSave;
+static OSThread piThread;
+static STACK(piThreadStack, 0x1000);
+static OSMesgQueue piEventQueue;
+static OSMesg piEventBuf[2];
OSPiHandle* __osPiTable = NULL;
OSPiHandle* __osCurrentHandle[] = {
@@ -40,14 +39,14 @@ void osCreatePiManager(OSPri pri, OSMesgQueue* cmdQueue, OSMesg* cmdBuf, s32 cmd
prevInt = __osDisableInt();
__osPiDevMgr.active = true;
- __osPiDevMgr.cmdQueue = cmdQueue;
__osPiDevMgr.thread = &piThread;
+ __osPiDevMgr.cmdQueue = cmdQueue;
__osPiDevMgr.evtQueue = &piEventQueue;
__osPiDevMgr.acsQueue = &__osPiAccessQueue;
__osPiDevMgr.dma = __osPiRawStartDma;
__osPiDevMgr.edma = __osEPiRawStartDma;
- osCreateThread(&piThread, 0, __osDevMgrMain, (void*)&__osPiDevMgr, STACK_TOP(piStackThread), pri);
+ osCreateThread(&piThread, 0, __osDevMgrMain, (void*)&__osPiDevMgr, STACK_TOP(piThreadStack), pri);
osStartThread(&piThread);
__osRestoreInt(prevInt);
diff --git a/src/libultra/io/pirawdma.c b/src/libultra/io/pirawdma.c
index 84f809c9c9..20a0e18a9b 100644
--- a/src/libultra/io/pirawdma.c
+++ b/src/libultra/io/pirawdma.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 __osPiRawStartDma(s32 dir, u32 cartAddr, void* dramAddr, size_t size) {
s32 status;
diff --git a/src/libultra/io/si.c b/src/libultra/io/si.c
index 4afee03405..65cab5e898 100644
--- a/src/libultra/io/si.c
+++ b/src/libultra/io/si.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 __osSiDeviceBusy(void) {
register u32 status = IO_READ(SI_STATUS_REG);
diff --git a/src/libultra/io/siacs.c b/src/libultra/io/siacs.c
index c814867bd8..8359c1bdda 100644
--- a/src/libultra/io/siacs.c
+++ b/src/libultra/io/siacs.c
@@ -1,6 +1,7 @@
-#include "global.h"
+#include "array_count.h"
+#include "ultra64.h"
-OSMesg siAccessBuf[1];
+static OSMesg siAccessBuf[1];
OSMesgQueue __osSiAccessQueue;
u32 __osSiAccessQueueEnabled = false;
diff --git a/src/libultra/io/sirawdma.c b/src/libultra/io/sirawdma.c
index 9bf499cc6a..4e7d082fd7 100644
--- a/src/libultra/io/sirawdma.c
+++ b/src/libultra/io/sirawdma.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "ultra64.h"
+#include "ultra64/bbskapi.h"
#define PIF_RAM_SIZE (PIF_RAM_END + 1 - PIF_RAM_START)
@@ -11,6 +12,13 @@ s32 __osSiRawStartDma(s32 dir, void* addr) {
}
IO_WRITE(SI_DRAM_ADDR_REG, osVirtualToPhysical(addr));
if (dir == OS_READ) {
+#ifdef BBPLAYER
+ if (__osBbIsBb) {
+ register u32 mask = __osDisableInt();
+ skKeepAlive();
+ __osRestoreInt(mask);
+ }
+#endif
IO_WRITE(SI_PIF_ADDR_RD64B_REG, PIF_RAM_START);
} else {
IO_WRITE(SI_PIF_ADDR_WR64B_REG, PIF_RAM_START);
diff --git a/src/libultra/io/sirawread.c b/src/libultra/io/sirawread.c
index 8efa071efb..71646f0324 100644
--- a/src/libultra/io/sirawread.c
+++ b/src/libultra/io/sirawread.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 __osSiRawReadIo(void* devAddr, u32* dst) {
if (__osSiDeviceBusy()) {
diff --git a/src/libultra/io/sirawwrite.c b/src/libultra/io/sirawwrite.c
index f0e4514d77..c4b688813d 100644
--- a/src/libultra/io/sirawwrite.c
+++ b/src/libultra/io/sirawwrite.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 __osSiRawWriteIo(void* devAddr, u32 val) {
if (__osSiDeviceBusy()) {
diff --git a/src/libultra/io/sp.c b/src/libultra/io/sp.c
index 1796dc8f6e..3f4bbca704 100644
--- a/src/libultra/io/sp.c
+++ b/src/libultra/io/sp.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
u32 __osSpDeviceBusy(void) {
register u32 status = IO_READ(SP_STATUS_REG);
diff --git a/src/libultra/io/spgetstat.c b/src/libultra/io/spgetstat.c
index e1545bdb7c..5b749e03f6 100644
--- a/src/libultra/io/spgetstat.c
+++ b/src/libultra/io/spgetstat.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
u32 __osSpGetStatus(void) {
return IO_READ(SP_STATUS_REG);
diff --git a/src/libultra/io/sprawdma.c b/src/libultra/io/sprawdma.c
index 795282c4a0..2faee64ca0 100644
--- a/src/libultra/io/sprawdma.c
+++ b/src/libultra/io/sprawdma.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 __osSpRawStartDma(s32 direction, void* devAddr, void* dramAddr, u32 size) {
if (__osSpDeviceBusy()) {
diff --git a/src/libultra/io/spsetpc.c b/src/libultra/io/spsetpc.c
index 944fc98631..5ffae42652 100644
--- a/src/libultra/io/spsetpc.c
+++ b/src/libultra/io/spsetpc.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 __osSpSetPc(void* pc) {
register u32 spStatus = IO_READ(SP_STATUS_REG);
diff --git a/src/libultra/io/spsetstat.c b/src/libultra/io/spsetstat.c
index 3fa7a49188..9becdb0ebe 100644
--- a/src/libultra/io/spsetstat.c
+++ b/src/libultra/io/spsetstat.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void __osSpSetStatus(u32 status) {
IO_WRITE(SP_STATUS_REG, status);
diff --git a/src/libultra/io/sptask.c b/src/libultra/io/sptask.c
index be805ab5ce..b728146bda 100644
--- a/src/libultra/io/sptask.c
+++ b/src/libultra/io/sptask.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#define _osVirtualToPhysical(ptr) \
if (ptr != NULL) { \
diff --git a/src/libultra/io/sptaskyield.c b/src/libultra/io/sptaskyield.c
index ec7a248bbb..1aaf3773b5 100644
--- a/src/libultra/io/sptaskyield.c
+++ b/src/libultra/io/sptaskyield.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void osSpTaskYield(void) {
__osSpSetStatus(SP_SET_SIG0);
diff --git a/src/libultra/io/sptaskyielded.c b/src/libultra/io/sptaskyielded.c
index d04f673c54..13acd4a5ff 100644
--- a/src/libultra/io/sptaskyielded.c
+++ b/src/libultra/io/sptaskyielded.c
@@ -1,19 +1,14 @@
-#include "global.h"
+#include "ultra64.h"
u32 osSpTaskYielded(OSTask* task) {
u32 status = __osSpGetStatus();
- u32 ret;
+ u32 result;
- if (status & SP_STATUS_YIELDED) {
- ret = OS_TASK_YIELDED;
- } else {
- ret = 0;
- }
+ result = (status & SP_STATUS_YIELDED) ? OS_TASK_YIELDED : 0;
if (status & SP_STATUS_YIELD) {
- task->t.flags |= ret;
+ task->t.flags |= result;
task->t.flags &= ~OS_TASK_DP_WAIT;
}
-
- return ret;
+ return result;
}
diff --git a/src/libultra/io/vi.c b/src/libultra/io/vi.c
index dac56ed812..c2c91ba276 100644
--- a/src/libultra/io/vi.c
+++ b/src/libultra/io/vi.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
OSViContext vi[2] = { 0 };
diff --git a/src/libultra/io/viblack.c b/src/libultra/io/viblack.c
index 491522fb1f..7866f3fc9d 100644
--- a/src/libultra/io/viblack.c
+++ b/src/libultra/io/viblack.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
void osViBlack(u8 active) {
diff --git a/src/libultra/io/viextendvstart.c b/src/libultra/io/viextendvstart.c
index 9efb9dbc3a..a28a8386d5 100644
--- a/src/libultra/io/viextendvstart.c
+++ b/src/libultra/io/viextendvstart.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void osViExtendVStart(u32 value) {
__additional_scanline = value;
diff --git a/src/libultra/io/vigetcurrcontext.c b/src/libultra/io/vigetcurrcontext.c
index 1e3c6ffa3c..24ebcc5745 100644
--- a/src/libultra/io/vigetcurrcontext.c
+++ b/src/libultra/io/vigetcurrcontext.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
OSViContext* __osViGetCurrentContext(void) {
return __osViCurr;
diff --git a/src/libultra/io/vigetcurrframebuf.c b/src/libultra/io/vigetcurrframebuf.c
index 442a1afa9d..3c7ec71183 100644
--- a/src/libultra/io/vigetcurrframebuf.c
+++ b/src/libultra/io/vigetcurrframebuf.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void* osViGetCurrentFramebuffer(void) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/io/vigetnextframebuf.c b/src/libultra/io/vigetnextframebuf.c
index 5e6bd2ac74..8c782ca54f 100644
--- a/src/libultra/io/vigetnextframebuf.c
+++ b/src/libultra/io/vigetnextframebuf.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void* osViGetNextFramebuffer(void) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/io/vimgr.c b/src/libultra/io/vimgr.c
index d9b3fc4355..b4857c334a 100644
--- a/src/libultra/io/vimgr.c
+++ b/src/libultra/io/vimgr.c
@@ -1,13 +1,14 @@
-#include "global.h"
-#include "stack.h"
#include "ultra64/internal.h"
+#include "array_count.h"
+#include "stack.h"
+#include "ultra64.h"
-OSThread viThread;
-STACK(viThreadStack, 0x1000);
-OSMesgQueue viEventQueue;
-OSMesg viEventBuf[5];
-OSIoMesg viRetraceMsg;
-OSIoMesg viCounterMsg;
+static OSThread viThread;
+static STACK(viThreadStack, 0x1000);
+static OSMesgQueue viEventQueue;
+static OSMesg viEventBuf[5];
+static OSIoMesg viRetraceMsg;
+static OSIoMesg viCounterMsg;
OSDevMgr __osViDevMgr = { 0 };
u32 __additional_scanline = 0;
diff --git a/src/libultra/io/vimodefpalhaf1.c b/src/libultra/io/vimodefpalhaf1.c
new file mode 100644
index 0000000000..6444c97a4d
--- /dev/null
+++ b/src/libultra/io/vimodefpalhaf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpalhaf1.c
+ *
+ * FPAL HAF1 Video Mode
+ *
+ * H = High Resolution
+ * A = Anti-Aliased
+ * F = Deflickered Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalHaf1 = {
+ OS_VI_FPAL_HAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpalhan1.c b/src/libultra/io/vimodefpalhan1.c
new file mode 100644
index 0000000000..e6243a01f6
--- /dev/null
+++ b/src/libultra/io/vimodefpalhan1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpalhan1.c
+ *
+ * FPAL HAN1 Video Mode
+ *
+ * H = High Resolution
+ * A = Anti-Aliased
+ * N = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalHan1 = {
+ OS_VI_FPAL_HAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpalhpf1.c b/src/libultra/io/vimodefpalhpf1.c
new file mode 100644
index 0000000000..af827fa466
--- /dev/null
+++ b/src/libultra/io/vimodefpalhpf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpalhpf1.c
+ *
+ * FPAL HPF1 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * F = Deflickered Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalHpf1 = {
+ OS_VI_FPAL_HPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpalhpf2.c b/src/libultra/io/vimodefpalhpf2.c
new file mode 100644
index 0000000000..3ce09602ab
--- /dev/null
+++ b/src/libultra/io/vimodefpalhpf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpalhpf2.c
+ *
+ * FPAL HPF2 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * F = Deflickered Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalHpf2 = {
+ OS_VI_FPAL_HPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpalhpn1.c b/src/libultra/io/vimodefpalhpn1.c
new file mode 100644
index 0000000000..f789c3baf0
--- /dev/null
+++ b/src/libultra/io/vimodefpalhpn1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpalhpn1.c
+ *
+ * FPAL HPN1 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * N = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalHpn1 = {
+ OS_VI_FPAL_HPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpalhpn2.c b/src/libultra/io/vimodefpalhpn2.c
new file mode 100644
index 0000000000..483dbd8f74
--- /dev/null
+++ b/src/libultra/io/vimodefpalhpn2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpalhpn2.c
+ *
+ * FPAL HPN2 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * N = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalHpn2 = {
+ OS_VI_FPAL_HPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpallaf1.c b/src/libultra/io/vimodefpallaf1.c
new file mode 100644
index 0000000000..cd508f053b
--- /dev/null
+++ b/src/libultra/io/vimodefpallaf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpallaf1.c
+ *
+ * FPAL LAF1 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * F = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalLaf1 = {
+ OS_VI_FPAL_LAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpallaf2.c b/src/libultra/io/vimodefpallaf2.c
new file mode 100644
index 0000000000..5dd7b99b29
--- /dev/null
+++ b/src/libultra/io/vimodefpallaf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpallaf2.c
+ *
+ * FPAL LAF2 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * F = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalLaf2 = {
+ OS_VI_FPAL_LAF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpallan1.c b/src/libultra/io/vimodefpallan1.c
index 37cb5ff557..aad8d8a5ff 100644
--- a/src/libultra/io/vimodefpallan1.c
+++ b/src/libultra/io/vimodefpallan1.c
@@ -8,7 +8,7 @@
* N = Deinterlaced
* 1 = 16-bit Framebuffer
*/
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
OSViMode osViModeFpalLan1 = {
@@ -16,31 +16,33 @@ OSViMode osViModeFpalLan1 = {
{
// comRegs
VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_ANTIALIAS_MODE_1 |
- VI_CTRL_PIXEL_ADV_3, // ctrl
- WIDTH(320), // width
- BURST(58, 30, 4, 69), // burst
- VSYNC(625), // vSync
- HSYNC(3177, 23), // hSync
- LEAP(3183, 3181), // leap
- HSTART(128, 768), // hStart
- SCALE(2, 0), // xScale
- VCURRENT(0), // vCurrent
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
},
- { // fldRegs
- {
- // [0]
- ORIGIN(640), // origin
- SCALE(1, 0), // yScale
- START(47, 617), // vStart
- BURST(107, 2, 9, 0), // vBurst
- VINTR(2), // vIntr
- },
- {
- // [1]
- ORIGIN(640), // origin
- SCALE(1, 0), // yScale
- START(47, 617), // vStart
- BURST(107, 2, 9, 0), // vBurst
- VINTR(2), // vIntr
- } },
};
diff --git a/src/libultra/io/vimodefpallan2.c b/src/libultra/io/vimodefpallan2.c
new file mode 100644
index 0000000000..a1224f5e73
--- /dev/null
+++ b/src/libultra/io/vimodefpallan2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpallan2.c
+ *
+ * FPAL LAN2 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * N = Deinterlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalLan2 = {
+ OS_VI_FPAL_LAN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpallpf1.c b/src/libultra/io/vimodefpallpf1.c
new file mode 100644
index 0000000000..ed14626d8c
--- /dev/null
+++ b/src/libultra/io/vimodefpallpf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpallpf1.c
+ *
+ * FPAL LPF1 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * F = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalLpf1 = {
+ OS_VI_FPAL_LPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpallpf2.c b/src/libultra/io/vimodefpallpf2.c
new file mode 100644
index 0000000000..9603b26192
--- /dev/null
+++ b/src/libultra/io/vimodefpallpf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpallpf2.c
+ *
+ * FPAL LPF2 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * F = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalLpf2 = {
+ OS_VI_FPAL_LPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpallpn1.c b/src/libultra/io/vimodefpallpn1.c
new file mode 100644
index 0000000000..2aa76cfff4
--- /dev/null
+++ b/src/libultra/io/vimodefpallpn1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpallpn1.c
+ *
+ * FPAL LPN1 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * N = Deinterlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalLpn1 = {
+ OS_VI_FPAL_LPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodefpallpn2.c b/src/libultra/io/vimodefpallpn2.c
new file mode 100644
index 0000000000..7f6938a323
--- /dev/null
+++ b/src/libultra/io/vimodefpallpn2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodefpallpn2.c
+ *
+ * FPAL LPN2 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * N = Deinterlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeFpalLpn2 = {
+ OS_VI_FPAL_LPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempalhaf1.c b/src/libultra/io/vimodempalhaf1.c
new file mode 100644
index 0000000000..7eb17048e0
--- /dev/null
+++ b/src/libultra/io/vimodempalhaf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempalhaf1.c
+ *
+ * MPAL HAF1 Video Mode
+ *
+ * H = High Resolution
+ * A = Anti-Aliased
+ * F = Deflickered Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalHaf1 = {
+ OS_VI_MPAL_HAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ //[0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ //[1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempalhan1.c b/src/libultra/io/vimodempalhan1.c
new file mode 100644
index 0000000000..57e594b3d9
--- /dev/null
+++ b/src/libultra/io/vimodempalhan1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempalhan1.c
+ *
+ * MPAL HAN1 Video Mode
+ *
+ * H = High Resolution
+ * A = Anti-Aliased
+ * N = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalHan1 = {
+ OS_VI_MPAL_HAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempalhpf1.c b/src/libultra/io/vimodempalhpf1.c
new file mode 100644
index 0000000000..6441ef2800
--- /dev/null
+++ b/src/libultra/io/vimodempalhpf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempalhpf1.c
+ *
+ * MPAL HPF1 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * F = Deflickered Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalHpf1 = {
+ OS_VI_MPAL_HPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempalhpf2.c b/src/libultra/io/vimodempalhpf2.c
new file mode 100644
index 0000000000..e853874fb4
--- /dev/null
+++ b/src/libultra/io/vimodempalhpf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempalhpf2.c
+ *
+ * MPAL HPF2 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * F = Deflickered Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalHpf2 = {
+ OS_VI_MPAL_HPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempalhpn1.c b/src/libultra/io/vimodempalhpn1.c
new file mode 100644
index 0000000000..4a4c22e229
--- /dev/null
+++ b/src/libultra/io/vimodempalhpn1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempalhpn1.c
+ *
+ * MPAL HPN1 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * N = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalHpn1 = {
+ OS_VI_MPAL_HPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempalhpn2.c b/src/libultra/io/vimodempalhpn2.c
new file mode 100644
index 0000000000..fe8f7f6f30
--- /dev/null
+++ b/src/libultra/io/vimodempalhpn2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempalhpn2.c
+ *
+ * MPAL HPN2 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * N = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalHpn2 = {
+ OS_VI_MPAL_HPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempallaf1.c b/src/libultra/io/vimodempallaf1.c
new file mode 100644
index 0000000000..29f35cd454
--- /dev/null
+++ b/src/libultra/io/vimodempallaf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempallaf1.c
+ *
+ * MPAL LAF1 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * F = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalLaf1 = {
+ OS_VI_MPAL_LAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempallaf2.c b/src/libultra/io/vimodempallaf2.c
new file mode 100644
index 0000000000..783440a4ed
--- /dev/null
+++ b/src/libultra/io/vimodempallaf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempallaf2.c
+ *
+ * MPAL LAF2 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * F = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalLaf2 = {
+ OS_VI_MPAL_LAF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempallan1.c b/src/libultra/io/vimodempallan1.c
index bcc4273afb..5140c50e55 100644
--- a/src/libultra/io/vimodempallan1.c
+++ b/src/libultra/io/vimodempallan1.c
@@ -8,7 +8,7 @@
* N = Deinterlaced
* 1 = 16-bit Framebuffer
*/
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
OSViMode osViModeMpalLan1 = {
@@ -16,31 +16,33 @@ OSViMode osViModeMpalLan1 = {
{
// comRegs
VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_ANTIALIAS_MODE_1 |
- VI_CTRL_PIXEL_ADV_3, // ctrl
- WIDTH(320), // width
- BURST(57, 30, 5, 70), // burst
- VSYNC(525), // vSync
- HSYNC(3089, 4), // hSync
- LEAP(3097, 3098), // leap
- HSTART(108, 748), // hStart
- SCALE(2, 0), // xScale
- VCURRENT(0), // vCurrent
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(525), // vSync
+ HSYNC(3089, 4), // hSync
+ LEAP(3097, 3098), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
},
- { // fldRegs
- {
- // [0]
- ORIGIN(640), // origin
- SCALE(1, 0), // yScale
- START(37, 511), // vStart
- BURST(4, 2, 14, 0), // vBurst
- VINTR(2), // vIntr
- },
- {
- // [1]
- ORIGIN(640), // origin
- SCALE(1, 0), // yScale
- START(37, 511), // vStart
- BURST(4, 2, 14, 0), // vBurst
- VINTR(2), // vIntr
- } },
};
diff --git a/src/libultra/io/vimodempallan2.c b/src/libultra/io/vimodempallan2.c
new file mode 100644
index 0000000000..b3717e6c74
--- /dev/null
+++ b/src/libultra/io/vimodempallan2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempallan2.c
+ *
+ * MPAL LAN2 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * N = Deinterlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalLan2 = {
+ OS_VI_MPAL_LAN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(525), // vSync
+ HSYNC(3089, 4), // hSync
+ LEAP(3097, 3098), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempallpf1.c b/src/libultra/io/vimodempallpf1.c
new file mode 100644
index 0000000000..52e927bfab
--- /dev/null
+++ b/src/libultra/io/vimodempallpf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempallpf1.c
+ *
+ * MPAL LPF1 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * F = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalLpf1 = {
+ OS_VI_MPAL_LPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempallpf2.c b/src/libultra/io/vimodempallpf2.c
new file mode 100644
index 0000000000..14a918a53d
--- /dev/null
+++ b/src/libultra/io/vimodempallpf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempallpf2.c
+ *
+ * MPAL LPF2 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * F = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalLpf2 = {
+ OS_VI_MPAL_LPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempallpn1.c b/src/libultra/io/vimodempallpn1.c
new file mode 100644
index 0000000000..ce35838b9e
--- /dev/null
+++ b/src/libultra/io/vimodempallpn1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempallpn1.c
+ *
+ * MPAL LPN1 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * N = Deinterlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalLpn1 = {
+ OS_VI_MPAL_LPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(525), // vSync
+ HSYNC(3089, 4), // hSync
+ LEAP(3097, 3098), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodempallpn2.c b/src/libultra/io/vimodempallpn2.c
new file mode 100644
index 0000000000..1f35696e82
--- /dev/null
+++ b/src/libultra/io/vimodempallpn2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodempallpn2.c
+ *
+ * MPAL LPN2 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * N = Deinterlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeMpalLpn2 = {
+ OS_VI_MPAL_LPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(525), // vSync
+ HSYNC(3089, 4), // hSync
+ LEAP(3097, 3098), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentschaf1.c b/src/libultra/io/vimodentschaf1.c
new file mode 100644
index 0000000000..79b3987a0f
--- /dev/null
+++ b/src/libultra/io/vimodentschaf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentschaf1.c
+ *
+ * NTSC HAF1 Video Mode
+ *
+ * H = High Resolution
+ * A = Anti-Aliased
+ * F = Deflickered Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscHaf1 = {
+ OS_VI_NTSC_HAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentschan1.c b/src/libultra/io/vimodentschan1.c
new file mode 100644
index 0000000000..994937aa75
--- /dev/null
+++ b/src/libultra/io/vimodentschan1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentschan1.c
+ *
+ * NTSC HAN1 Video Mode
+ *
+ * H = High Resolution
+ * A = Anti-Aliased
+ * N = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscHan1 = {
+ OS_VI_NTSC_HAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentschpf1.c b/src/libultra/io/vimodentschpf1.c
new file mode 100644
index 0000000000..a91addf6e2
--- /dev/null
+++ b/src/libultra/io/vimodentschpf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentschpf1.c
+ *
+ * NTSC HPF1 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * F = Deflickered Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscHpf1 = {
+ OS_VI_NTSC_HPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentschpf2.c b/src/libultra/io/vimodentschpf2.c
new file mode 100644
index 0000000000..54b15f31be
--- /dev/null
+++ b/src/libultra/io/vimodentschpf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentschpf2.c
+ *
+ * NTSC HPF2 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * F = Deflickered Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscHpf2 = {
+ OS_VI_NTSC_HPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentschpn1.c b/src/libultra/io/vimodentschpn1.c
new file mode 100644
index 0000000000..83ffa0fd54
--- /dev/null
+++ b/src/libultra/io/vimodentschpn1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentschpn1.c
+ *
+ * NTSC HPN1 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * N = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscHpn1 = {
+ OS_VI_NTSC_HPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentschpn2.c b/src/libultra/io/vimodentschpn2.c
new file mode 100644
index 0000000000..5f3fbdf2d9
--- /dev/null
+++ b/src/libultra/io/vimodentschpn2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentschpn2.c
+ *
+ * NTSC HPN2 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * N = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscHpn2 = {
+ OS_VI_NTSC_HPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentsclaf1.c b/src/libultra/io/vimodentsclaf1.c
new file mode 100644
index 0000000000..236200044d
--- /dev/null
+++ b/src/libultra/io/vimodentsclaf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentsclaf1.c
+ *
+ * NTSC LAF1 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * F = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscLaf1 = {
+ OS_VI_NTSC_LAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentsclaf2.c b/src/libultra/io/vimodentsclaf2.c
new file mode 100644
index 0000000000..5b8d9194f1
--- /dev/null
+++ b/src/libultra/io/vimodentsclaf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentsclaf2.c
+ *
+ * NTSC LAF2 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * F = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscLaf2 = {
+ OS_VI_NTSC_LAF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentsclan1.c b/src/libultra/io/vimodentsclan1.c
index a29d15129f..44f038a02c 100644
--- a/src/libultra/io/vimodentsclan1.c
+++ b/src/libultra/io/vimodentsclan1.c
@@ -8,7 +8,7 @@
* N = Deinterlaced
* 1 = 16-bit Framebuffer
*/
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
OSViMode osViModeNtscLan1 = {
@@ -16,31 +16,33 @@ OSViMode osViModeNtscLan1 = {
{
// comRegs
VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_ANTIALIAS_MODE_1 |
- VI_CTRL_PIXEL_ADV_3, // ctrl
- WIDTH(320), // width
- BURST(57, 34, 5, 62), // burst
- VSYNC(525), // vSync
- HSYNC(3093, 0), // hSync
- LEAP(3093, 3093), // leap
- HSTART(108, 748), // hStart
- SCALE(2, 0), // xScale
- VCURRENT(0), // vCurrent
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(525), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
},
- { // fldRegs
- {
- // [0]
- ORIGIN(640), // origin
- SCALE(1, 0), // yScale
- START(37, 511), // vStart
- BURST(4, 2, 14, 0), // vBurst
- VINTR(2), // vIntr
- },
- {
- // [1]
- ORIGIN(640), // origin
- SCALE(1, 0), // yScale
- START(37, 511), // vStart
- BURST(4, 2, 14, 0), // vBurst
- VINTR(2), // vIntr
- } },
};
diff --git a/src/libultra/io/vimodentsclan2.c b/src/libultra/io/vimodentsclan2.c
new file mode 100644
index 0000000000..a34f8ec300
--- /dev/null
+++ b/src/libultra/io/vimodentsclan2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentsclan2.c
+ *
+ * NTSC LAN2 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * N = Deinterlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscLan2 = {
+ OS_VI_NTSC_LAN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(525), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentsclpf1.c b/src/libultra/io/vimodentsclpf1.c
new file mode 100644
index 0000000000..0824a29184
--- /dev/null
+++ b/src/libultra/io/vimodentsclpf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentsclpf1.c
+ *
+ * NTSC LPF1 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * F = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscLpf1 = {
+ OS_VI_NTSC_LPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentsclpf2.c b/src/libultra/io/vimodentsclpf2.c
new file mode 100644
index 0000000000..fccfcbbd33
--- /dev/null
+++ b/src/libultra/io/vimodentsclpf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentsclpf2.c
+ *
+ * NTSC LPF2 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * F = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscLpf2 = {
+ OS_VI_NTSC_LPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentsclpn1.c b/src/libultra/io/vimodentsclpn1.c
new file mode 100644
index 0000000000..aabe7af792
--- /dev/null
+++ b/src/libultra/io/vimodentsclpn1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentsclpn1.c
+ *
+ * NTSC LPN1 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * N = Deinterlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscLpn1 = {
+ OS_VI_NTSC_LPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(525), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodentsclpn2.c b/src/libultra/io/vimodentsclpn2.c
new file mode 100644
index 0000000000..ce05176c3e
--- /dev/null
+++ b/src/libultra/io/vimodentsclpn2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodentsclpn2.c
+ *
+ * NTSC LPN2 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * N = Deinterlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeNtscLpn2 = {
+ OS_VI_NTSC_LPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(525), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepalhaf1.c b/src/libultra/io/vimodepalhaf1.c
new file mode 100644
index 0000000000..af4d5de616
--- /dev/null
+++ b/src/libultra/io/vimodepalhaf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepalhaf1.c
+ *
+ * PAL HAF1 Video Mode
+ *
+ * H = High Resolution
+ * A = Anti-Aliased
+ * F = Deflickered Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalHaf1 = {
+ OS_VI_PAL_HAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepalhan1.c b/src/libultra/io/vimodepalhan1.c
new file mode 100644
index 0000000000..7831490814
--- /dev/null
+++ b/src/libultra/io/vimodepalhan1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepalhan1.c
+ *
+ * PAL HAN1 Video Mode
+ *
+ * H = High Resolution
+ * A = Anti-Aliased
+ * N = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalHan1 = {
+ OS_VI_PAL_HAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepalhpf1.c b/src/libultra/io/vimodepalhpf1.c
new file mode 100644
index 0000000000..954c3a1199
--- /dev/null
+++ b/src/libultra/io/vimodepalhpf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepalhpf1.c
+ *
+ * PAL HPF1 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * F = Deflickered Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalHpf1 = {
+ OS_VI_PAL_HPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepalhpf2.c b/src/libultra/io/vimodepalhpf2.c
new file mode 100644
index 0000000000..e87290f306
--- /dev/null
+++ b/src/libultra/io/vimodepalhpf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepalhpf2.c
+ *
+ * PAL HPF2 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * F = Deflickered Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalHpf2 = {
+ OS_VI_PAL_HPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepalhpn1.c b/src/libultra/io/vimodepalhpn1.c
new file mode 100644
index 0000000000..680e48bea8
--- /dev/null
+++ b/src/libultra/io/vimodepalhpn1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepalhpn1.c
+ *
+ * PAL HPN1 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * N = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalHpn1 = {
+ OS_VI_PAL_HPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepalhpn2.c b/src/libultra/io/vimodepalhpn2.c
new file mode 100644
index 0000000000..ca4d33c2c6
--- /dev/null
+++ b/src/libultra/io/vimodepalhpn2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepalhpn2.c
+ *
+ * PAL HPN2 Video Mode
+ *
+ * H = High Resolution
+ * P = Point-Sampled
+ * N = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalHpn2 = {
+ OS_VI_PAL_HPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepallaf1.c b/src/libultra/io/vimodepallaf1.c
new file mode 100644
index 0000000000..de645b2919
--- /dev/null
+++ b/src/libultra/io/vimodepallaf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepallaf1.c
+ *
+ * PAL LAF1 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * F = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalLaf1 = {
+ OS_VI_PAL_LAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepallaf2.c b/src/libultra/io/vimodepallaf2.c
new file mode 100644
index 0000000000..a1a4d8c9d3
--- /dev/null
+++ b/src/libultra/io/vimodepallaf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepallaf2.c
+ *
+ * PAL LAF2 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * F = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalLaf2 = {
+ OS_VI_PAL_LAF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepallan1.c b/src/libultra/io/vimodepallan1.c
index d656dc4f94..f129073406 100644
--- a/src/libultra/io/vimodepallan1.c
+++ b/src/libultra/io/vimodepallan1.c
@@ -8,7 +8,7 @@
* N = Deinterlaced
* 1 = 16-bit Framebuffer
*/
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
OSViMode osViModePalLan1 = {
@@ -16,31 +16,33 @@ OSViMode osViModePalLan1 = {
{
// comRegs
VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_ANTIALIAS_MODE_1 |
- VI_CTRL_PIXEL_ADV_3, // ctrl
- WIDTH(320), // width
- BURST(58, 30, 4, 69), // burst
- VSYNC(625), // vSync
- HSYNC(3177, 23), // hSync
- LEAP(3183, 3181), // leap
- HSTART(128, 768), // hStart
- SCALE(2, 0), // xScale
- VCURRENT(0), // vCurrent
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
},
- { // fldRegs
- {
- // [0]
- ORIGIN(640), // origin
- SCALE(1, 0), // yScale
- START(95, 569), // vStart
- BURST(107, 2, 9, 0), // vBurst
- VINTR(2), // vIntr
- },
- {
- // [1]
- ORIGIN(640), // origin
- SCALE(1, 0), // yScale
- START(95, 569), // vStart
- BURST(107, 2, 9, 0), // vBurst
- VINTR(2), // vIntr
- } },
};
diff --git a/src/libultra/io/vimodepallan2.c b/src/libultra/io/vimodepallan2.c
new file mode 100644
index 0000000000..310ab266c9
--- /dev/null
+++ b/src/libultra/io/vimodepallan2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepallan2.c
+ *
+ * PAL LAN2 Video Mode
+ *
+ * L = Low Resolution
+ * A = Anti-Aliased
+ * N = Deinterlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalLan2 = {
+ OS_VI_PAL_LAN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepallpf1.c b/src/libultra/io/vimodepallpf1.c
new file mode 100644
index 0000000000..5d10214ac9
--- /dev/null
+++ b/src/libultra/io/vimodepallpf1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepallpf1.c
+ *
+ * PAL LPF1 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * F = Interlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalLpf1 = {
+ OS_VI_PAL_LPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepallpf2.c b/src/libultra/io/vimodepallpf2.c
new file mode 100644
index 0000000000..076b3199c3
--- /dev/null
+++ b/src/libultra/io/vimodepallpf2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepallpf2.c
+ *
+ * PAL LPF2 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * F = Interlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalLpf2 = {
+ OS_VI_PAL_LPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepallpn1.c b/src/libultra/io/vimodepallpn1.c
new file mode 100644
index 0000000000..7eeb37f9e2
--- /dev/null
+++ b/src/libultra/io/vimodepallpn1.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepallpn1.c
+ *
+ * PAL LPN1 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * N = Deinterlaced
+ * 1 = 16-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalLpn1 = {
+ OS_VI_PAL_LPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/vimodepallpn2.c b/src/libultra/io/vimodepallpn2.c
new file mode 100644
index 0000000000..e460b87234
--- /dev/null
+++ b/src/libultra/io/vimodepallpn2.c
@@ -0,0 +1,48 @@
+/**
+ * @file vimodepallpn2.c
+ *
+ * PAL LPN2 Video Mode
+ *
+ * L = Low Resolution
+ * P = Point-Sampled
+ * N = Deinterlaced
+ * 2 = 32-bit Framebuffer
+ */
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModePalLpn2 = {
+ OS_VI_PAL_LPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+};
diff --git a/src/libultra/io/visetevent.c b/src/libultra/io/visetevent.c
index 89e482cf84..789e044a60 100644
--- a/src/libultra/io/visetevent.c
+++ b/src/libultra/io/visetevent.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void osViSetEvent(OSMesgQueue* mq, OSMesg msg, u32 retraceCount) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/io/visetmode.c b/src/libultra/io/visetmode.c
index ab5b3b0e18..38eae7522b 100644
--- a/src/libultra/io/visetmode.c
+++ b/src/libultra/io/visetmode.c
@@ -1,9 +1,15 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
void osViSetMode(OSViMode* mode) {
register u32 prevInt = __osDisableInt();
+#ifdef BBPLAYER
+ if (__osBbIsBb) {
+ mode->comRegs.ctrl &= ~VI_CTRL_PIXEL_ADV(2);
+ }
+#endif
+
__osViNext->modep = mode;
__osViNext->state = VI_STATE_MODE_SET;
__osViNext->features = __osViNext->modep->comRegs.ctrl;
diff --git a/src/libultra/io/visetspecial.c b/src/libultra/io/visetspecial.c
index d51e3479d3..ef053fee1f 100644
--- a/src/libultra/io/visetspecial.c
+++ b/src/libultra/io/visetspecial.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
/**
diff --git a/src/libultra/io/visetxscale.c b/src/libultra/io/visetxscale.c
index 5e5e04ee47..765ac43844 100644
--- a/src/libultra/io/visetxscale.c
+++ b/src/libultra/io/visetxscale.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
void osViSetXScale(f32 value) {
diff --git a/src/libultra/io/visetyscale.c b/src/libultra/io/visetyscale.c
index adea96fd23..95c3273580 100644
--- a/src/libultra/io/visetyscale.c
+++ b/src/libultra/io/visetyscale.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
void osViSetYScale(f32 scale) {
diff --git a/src/libultra/io/viswapbuf.c b/src/libultra/io/viswapbuf.c
index 99259c03c3..e1e42922d2 100644
--- a/src/libultra/io/viswapbuf.c
+++ b/src/libultra/io/viswapbuf.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
void osViSwapBuffer(void* frameBufPtr) {
diff --git a/src/libultra/io/viswapcontext.c b/src/libultra/io/viswapcontext.c
index d1a7d0c0e6..19892ece36 100644
--- a/src/libultra/io/viswapcontext.c
+++ b/src/libultra/io/viswapcontext.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/viint.h"
void __osViSwapContext(void) {
diff --git a/src/libultra/io/vitbl.c b/src/libultra/io/vitbl.c
new file mode 100644
index 0000000000..8779396bbc
--- /dev/null
+++ b/src/libultra/io/vitbl.c
@@ -0,0 +1,1967 @@
+#include "ultra64.h"
+#include "ultra64/viint.h"
+
+OSViMode osViModeTable[] = {
+ {
+ OS_VI_NTSC_LPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(525), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_LPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_LAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_ANTIALIAS_MODE_1 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(525), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_LAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_LPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(525), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_LPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_LAN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(525), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_LAF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_HPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_HPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_HAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_HAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_HPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_3 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_NTSC_HPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 34, 5, 62), // burst
+ VSYNC(524), // vSync
+ HSYNC(3093, 0), // hSync
+ LEAP(3093, 3093), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_LPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_LPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_LAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_ANTIALIAS_MODE_1 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_LAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_LPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_LPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_LAN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_LAF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_HPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_HPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_HAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_HAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_HPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_3 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(1, 0), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_PAL_HPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(93, 567), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(95, 569), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_LPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(525), // vSync
+ HSYNC(3089, 4), // hSync
+ LEAP(3097, 3098), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_LPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_LAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_ANTIALIAS_MODE_1 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(525), // vSync
+ HSYNC(3089, 4), // hSync
+ LEAP(3097, 3098), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_LAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_LPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(525), // vSync
+ HSYNC(3089, 4), // hSync
+ LEAP(3097, 3098), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_LPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_LAN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(525), // vSync
+ HSYNC(3089, 4), // hSync
+ LEAP(3097, 3098), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_LAF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_HPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_HPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_HAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_HAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ //[0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ //[1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_HPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_3 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(1, 0), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_MPAL_HPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(57, 30, 5, 70), // burst
+ VSYNC(524), // vSync
+ HSYNC(3088, 0), // hSync
+ LEAP(3100, 3100), // leap
+ HSTART(108, 748), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(35, 509), // vStart
+ BURST(2, 2, 11, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(37, 511), // vStart
+ BURST(4, 2, 14, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+#if BUILD_VERSION >= VERSION_J
+ {
+ OS_VI_FPAL_LPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_2 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_LPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_LAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_ANTIALIAS_MODE_1 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_LAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(640), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(640), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_LPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_ANTIALIAS_MODE_3 |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_LPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_LAN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(625), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_LAF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(320), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(2, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.25), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(1280), // origin
+ SCALE(1, 0.75), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_HPN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_HPF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_HAN1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(1, 0), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_HAF1, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_16 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_DIVOT_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(1280), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_HPN2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_3 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(1280), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(1, 0), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(1, 0), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+ {
+ OS_VI_FPAL_HPF2, // type
+ {
+ // comRegs
+ VI_CTRL_TYPE_32 | VI_CTRL_GAMMA_DITHER_ON | VI_CTRL_GAMMA_ON | VI_CTRL_SERRATE_ON |
+ VI_CTRL_ANTIALIAS_MODE_2 | VI_CTRL_PIXEL_ADV_DEFAULT, // ctrl
+ WIDTH(640), // width
+ BURST(58, 30, 4, 69), // burst
+ VSYNC(624), // vSync
+ HSYNC(3177, 23), // hSync
+ LEAP(3183, 3181), // leap
+ HSTART(128, 768), // hStart
+ SCALE(1, 0), // xScale
+ VCURRENT(0), // vCurrent
+ },
+ {
+ // fldRegs
+ {
+ // [0]
+ ORIGIN(2560), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(45, 615), // vStart
+ BURST(107, 2, 9, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ {
+ // [1]
+ ORIGIN(5120), // origin
+ SCALE(0.5, 0.5), // yScale
+ VSTART(47, 617), // vStart
+ BURST(105, 2, 13, 0), // vBurst
+ VINTR(2), // vIntr
+ },
+ },
+ },
+#endif
+};
diff --git a/src/libultra/libc/bcmp.s b/src/libultra/libc/bcmp.s
index df6692feb5..9ef0746cf3 100644
--- a/src/libultra/libc/bcmp.s
+++ b/src/libultra/libc/bcmp.s
@@ -1,93 +1,89 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(bcmp)
- slti $at, $a2, 0x10
- bnez $at, bytecmp
- xor $v0, $a0, $a1
- andi $v0, $v0, 3
- bnez $v0, unaligncmp
- negu $t8, $a0
- andi $t8, $t8, 3
- beqz $t8, wordcmp
- subu $a2, $a2, $t8
- move $v0, $v1
- lwl $v0, ($a0)
- lwl $v1, ($a1)
- addu $a0, $a0, $t8
- addu $a1, $a1, $t8
- bne $v0, $v1, cmpne
+ xor v0, a0, a1
+ blt a2, 0x10, bytecmp
+
+ and v0, v0, 3
+ negu t8, a0
+ bnez v0, unaligncmp
+
+ and t8, t8, 3
+ subu a2, a2, t8
+ beqz t8, wordcmp
+
+ move v0, v1
+ lwl v0, (a0)
+ lwl v1, (a1)
+ addu a0, a0, t8
+ addu a1, a1, t8
+ bne v0, v1, cmpne
+
wordcmp:
- li $at, ~3
- and $a3, $a2, $at
- beqz $a3, bytecmp
- subu $a2, $a2, $a3
- addu $a3, $a3, $a0
- lw $v0, ($a0)
+ and a3, a2, ~3
+ subu a2, a2, a3
+ beqz a3, bytecmp
+
+ addu a3, a3, a0
1:
- lw $v1, ($a1)
- addiu $a0, $a0, 4
- addiu $a1, $a1, 4
- bne $v0, $v1, cmpne
- nop
- bnel $a0, $a3, 1b
- lw $v0, ($a0)
+ lw v0, (a0)
+ lw v1, (a1)
+ addu a0, a0, 4
+ addu a1, a1, 4
+ bne v0, v1, cmpne
+ bne a0, a3, 1b
+
b bytecmp
- nop
+
unaligncmp:
- negu $a3, $a1
- andi $a3, $a3, 3
- beqz $a3, partaligncmp
- subu $a2, $a2, $a3
- addu $a3, $a3, $a0
- lbu $v0, ($a0)
+ negu a3, a1
+ and a3, a3, 3
+ subu a2, a2, a3
+ beqz a3, partaligncmp
+
+ addu a3, a3, a0
1:
- lbu $v1, ($a1)
- addiu $a0, $a0, 1
- addiu $a1, $a1, 1
- bne $v0, $v1, cmpne
- nop
- bnel $a0, $a3, 1b
- lbu $v0, ($a0)
+ lbu v0, (a0)
+ lbu v1, (a1)
+ addu a0, a0, 1
+ addu a1, a1, 1
+ bne v0, v1, cmpne
+ bne a0, a3, 1b
+
partaligncmp:
- li $at, ~3
- and $a3, $a2, $at
- beqz $a3, bytecmp
- subu $a2, $a2, $a3
- addu $a3, $a3, $a0
- lwl $v0, ($a0)
+ and a3, a2, ~3
+ subu a2, a2, a3
+ beqz a3, bytecmp
+
+ addu a3, a3, a0
1:
- lw $v1, ($a1)
- lwr $v0, 3($a0)
- addiu $a0, $a0, 4
- addiu $a1, $a1, 4
- bne $v0, $v1, cmpne
- nop
- bnel $a0, $a3, 1b
- lwl $v0, ($a0)
+ lwl v0, (a0)
+ lwr v0, 3(a0)
+ lw v1, (a1)
+ addu a0, a0, 4
+ addu a1, a1, 4
+ bne v0, v1, cmpne
+ bne a0, a3, 1b
+
bytecmp:
- blez $a2, cmpdone
- addu $a3, $a2, $a0
- lbu $v0, ($a0)
+ addu a3, a2, a0
+ blez a2, cmpdone
1:
- lbu $v1, ($a1)
- addiu $a0, $a0, 1
- addiu $a1, $a1, 1
- bne $v0, $v1, cmpne
- nop
- bnel $a0, $a3, 1b
- lbu $v0, ($a0)
+ lbu v0, (a0)
+ lbu v1, (a1)
+ addu a0, a0, 1
+ addu a1, a1, 1
+ bne v0, v1, cmpne
+ bne a0, a3, 1b
+
cmpdone:
- jr $ra
- move $v0, $zero
+ move v0, zero
+ jr ra
cmpne:
- jr $ra
- li $v0, 1
+ li v0, 1
+ jr ra
END(bcmp)
diff --git a/src/libultra/libc/bcopy.s b/src/libultra/libc/bcopy.s
index e1240f113a..dcb6ad13c3 100644
--- a/src/libultra/libc/bcopy.s
+++ b/src/libultra/libc/bcopy.s
@@ -1,233 +1,211 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(bcopy)
- beqz $a2, ret
- move $a3, $a1
- beq $a0, $a1, ret
- slt $at, $a1, $a0
- bnezl $at, goforwards
- slti $at, $a2, 0x10
- add $v0, $a0, $a2
- slt $at, $a1, $v0
- beql $at, $zero, goforwards
- slti $at, $a2, 0x10
+ move a3, a1
+ beqz a2, ret
+ beq a0, a1, ret
+ blt a1, a0, goforwards
+ add v0, a0, a2
+ bge a1, v0, goforwards
b gobackwards
- slti $at, $a2, 0x10
- slti $at, $a2, 0x10
+
goforwards:
- bnez $at, forwards_bytecopy
- nop
- andi $v0, $a0, 3
- andi $v1, $a1, 3
- beq $v0, $v1, forwalignable
- nop
+ blt a2, 0x10, forwards_bytecopy
+ and v0, a0, 3
+ and v1, a1, 3
+ beq v0, v1, forwalignable
+
forwards_bytecopy:
- beqz $a2, ret
- nop
- addu $v1, $a0, $a2
+ beqz a2, ret
+ addu v1, a0, a2
99:
- lb $v0, ($a0)
- addiu $a0, $a0, 1
- addiu $a1, $a1, 1
- bne $a0, $v1, 99b
- sb $v0, -1($a1)
+ lb v0, (a0)
+ addu a0, a0, 1
+ sb v0, (a1)
+ addu a1, a1, 1
+ bne a0, v1, 99b
ret:
- jr $ra
- move $v0, $a3
+ move v0, a3
+ jr ra
forwalignable:
- beqz $v0, forwards_32
- li $at, 1
- beq $v0, $at, forw_copy3
- li $at, 2
- beql $v0, $at, forw_copy2
- lh $v0, ($a0)
- lb $v0, ($a0)
- addiu $a0, $a0, 1
- addiu $a1, $a1, 1
- addiu $a2, $a2, -1
+ beqz v0, forwards_32
+ beq v0, 1, forw_copy3
+ beq v0, 2, forw_copy2
+
+ lb v0, (a0)
+ addu a0, a0, 1
+ sb v0, (a1)
+ addu a1, a1, 1
+ addu a2, a2, -1
b forwards_32
- sb $v0, -1($a1)
- lh $v0, ($a0)
+
forw_copy2:
- addiu $a0, $a0, 2
- addiu $a1, $a1, 2
- addiu $a2, $a2, -2
+ lh v0, (a0)
+ addu a0, a0, 2
+ sh v0, (a1)
+ addu a1, a1, 2
+ addu a2, a2, -2
b forwards_32
- sh $v0, -2($a1)
+
forw_copy3:
- lb $v0, ($a0)
- lh $v1, 1($a0)
- addiu $a0, $a0, 3
- addiu $a1, $a1, 3
- addiu $a2, $a2, -3
- sb $v0, -3($a1)
- sh $v1, -2($a1)
+ lb v0, (a0)
+ lh v1, 1(a0)
+ addiu a0, a0, 3
+ sb v0, (a1)
+ sh v1, 1(a1)
+ addiu a1, a1, 3
+ addiu a2, a2, -3
forwards:
forwards_32:
- slti $at, $a2, 0x20
- bnezl $at, forwards_16_
- slti $at, $a2, 0x10
- lw $v0, ($a0)
- lw $v1, 4($a0)
- lw $t0, 8($a0)
- lw $t1, 0xC($a0)
- lw $t2, 0x10($a0)
- lw $t3, 0x14($a0)
- lw $t4, 0x18($a0)
- lw $t5, 0x1C($a0)
- addiu $a0, $a0, 0x20
- addiu $a1, $a1, 0x20
- addiu $a2, $a2, -0x20
- sw $v0, -0x20($a1)
- sw $v1, -0x1C($a1)
- sw $t0, -0x18($a1)
- sw $t1, -0x14($a1)
- sw $t2, -0x10($a1)
- sw $t3, -0xC($a1)
- sw $t4, -8($a1)
+ blt a2, 32, forwards_16
+ lw v0, 0(a0)
+ lw v1, 4(a0)
+ lw t0, 8(a0)
+ lw t1, 12(a0)
+ lw t2, 16(a0)
+ lw t3, 20(a0)
+ lw t4, 24(a0)
+ lw t5, 28(a0)
+ addiu a0, a0, 32
+ sw v0, 0(a1)
+ sw v1, 4(a1)
+ sw t0, 8(a1)
+ sw t1, 12(a1)
+ sw t2, 16(a1)
+ sw t3, 20(a1)
+ sw t4, 24(a1)
+ sw t5, 28(a1)
+ addiu a1, a1, 32
+ addiu a2, a2, -32
b forwards_32
- sw $t5, -4($a1)
+
forwards_16:
- slti $at, $a2, 0x10
-forwards_16_: // fake label due to branch likely optimization
- bnezl $at, forwards_4_
- slti $at, $a2, 4
- lw $v0, ($a0)
- lw $v1, 4($a0)
- lw $t0, 8($a0)
- lw $t1, 0xC($a0)
- addiu $a0, $a0, 0x10
- addiu $a1, $a1, 0x10
- addiu $a2, $a2, -0x10
- sw $v0, -0x10($a1)
- sw $v1, -0xC($a1)
- sw $t0, -8($a1)
+ blt a2, 16, forwards_4
+ lw v0, 0(a0)
+ lw v1, 4(a0)
+ lw t0, 8(a0)
+ lw t1, 12(a0)
+ addiu a0, a0, 16
+ sw v0, 0(a1)
+ sw v1, 4(a1)
+ sw t0, 8(a1)
+ sw t1, 12(a1)
+ addiu a1, a1, 16
+ addiu a2, a2, -16
b forwards_16
- sw $t1, -4($a1)
+
forwards_4:
- slti $at, $a2, 4
-forwards_4_: // fake label due to branch likely optimization
- bnez $at, forwards_bytecopy
- nop
- lw $v0, ($a0)
- addiu $a0, $a0, 4
- addiu $a1, $a1, 4
- addiu $a2, $a2, -4
+ blt a2, 4, forwards_bytecopy
+
+ lw v0, 0(a0)
+ addiu a0, a0, 4
+ sw v0, 0(a1)
+ addiu a1, a1, 4
+ addiu a2, a2, -4
b forwards_4
- sw $v0, -4($a1)
- slti $at, $a2, 0x10
+
gobackwards:
- add $a0, $a0, $a2
- bnez $at, backwards_bytecopy
- add $a1, $a1, $a2
- andi $v0, $a0, 3
- andi $v1, $a1, 3
- beq $v0, $v1, backalignable
- nop
+ add a0, a0,a2
+ add a1, a1,a2
+ blt a2, 16, backwards_bytecopy
+
+ andi v0, a0, 0x3
+ andi v1, a1, 0x3
+ beq v0, v1, backalignable
+
backwards_bytecopy:
- beqz $a2, ret
- nop
- addiu $a0, $a0, -1
- addiu $a1, $a1, -1
- subu $v1, $a0, $a2
+ beqz a2, ret
+ addiu a0, a0, -1
+ addiu a1, a1, -1
+ subu v1, a0,a2
99:
- lb $v0, ($a0)
- addiu $a0, $a0, -1
- addiu $a1, $a1, -1
- bne $a0, $v1, 99b
- sb $v0, 1($a1)
- jr $ra
- move $v0, $a3
+ lb v0, 0(a0)
+ addiu a0, a0, -1
+ sb v0, 0(a1)
+ addiu a1, a1, -1
+ bne a0, v1,99b
+
+ move v0, a3
+ jr ra
backalignable:
- beqz $v0, backwards_32
- li $at, 3
- beq $v0, $at, back_copy3
- li $at, 2
- beql $v0, $at, back_copy2
- lh $v0, -2($a0)
- lb $v0, -1($a0)
- addiu $a0, $a0, -1
- addiu $a1, $a1, -1
- addiu $a2, $a2, -1
- b backwards_32
- sb $v0, ($a1)
- lh $v0, -2($a0)
+ beqz v0, backwards
+ beq v0, 3, back_copy3
+ beq v0, 2, back_copy2
+ lb v0, -1(a0)
+ addiu a0, a0, -1
+ sb v0, -1(a1)
+ addiu a1, a1, -1
+ addiu a2, a2, -1
+ b backwards
+
back_copy2:
- addiu $a0, $a0, -2
- addiu $a1, $a1, -2
- addiu $a2, $a2, -2
- b backwards_32
- sh $v0, ($a1)
+ lh v0, -2(a0)
+ addiu a0, a0, -2
+ sh v0, -2(a1)
+ addiu a1, a1, -2
+ addiu a2, a2, -2
+ b backwards
+
back_copy3:
- lb $v0, -1($a0)
- lh $v1, -3($a0)
- addiu $a0, $a0, -3
- addiu $a1, $a1, -3
- addiu $a2, $a2, -3
- sb $v0, 2($a1)
- sh $v1, ($a1)
+ lb v0, -1(a0)
+ lh v1, -3(a0)
+ addiu a0, a0, -3
+ sb v0, -1(a1)
+ sh v1, -3(a1)
+ addiu a1, a1, -3
+ addiu a2, a2, -3
backwards:
backwards_32:
- slti $at, $a2, 0x20
- bnezl $at, backwards_16_
- slti $at, $a2, 0x10
- lw $v0, -4($a0)
- lw $v1, -8($a0)
- lw $t0, -0xc($a0)
- lw $t1, -0x10($a0)
- lw $t2, -0x14($a0)
- lw $t3, -0x18($a0)
- lw $t4, -0x1c($a0)
- lw $t5, -0x20($a0)
- addiu $a0, $a0, -0x20
- addiu $a1, $a1, -0x20
- addiu $a2, $a2, -0x20
- sw $v0, 0x1C($a1)
- sw $v1, 0x18($a1)
- sw $t0, 0x14($a1)
- sw $t1, 0x10($a1)
- sw $t2, 0xC($a1)
- sw $t3, 8($a1)
- sw $t4, 4($a1)
+ blt a2, 32, backwards_16
+ lw v0, -4(a0)
+ lw v1, -8(a0)
+ lw t0, -12(a0)
+ lw t1, -16(a0)
+ lw t2, -20(a0)
+ lw t3, -24(a0)
+ lw t4, -28(a0)
+ lw t5, -32(a0)
+ addiu a0, a0, -32
+ sw v0, -4(a1)
+ sw v1, -8(a1)
+ sw t0, -12(a1)
+ sw t1, -16(a1)
+ sw t2, -20(a1)
+ sw t3, -24(a1)
+ sw t4, -28(a1)
+ sw t5, -32(a1)
+ addiu a1, a1, -32
+ addiu a2, a2, -32
b backwards_32
- sw $t5, ($a1)
+
backwards_16:
- slti $at, $a2, 0x10
-backwards_16_: // fake label due to branch likely optimization
- bnezl $at, backwards_4_
- slti $at, $a2, 4
- lw $v0, -4($a0)
- lw $v1, -8($a0)
- lw $t0, -0xC($a0)
- lw $t1, -0x10($a0)
- addiu $a0, $a0, -0x10
- addiu $a1, $a1, -0x10
- addiu $a2, $a2, -0x10
- sw $v0, 0xC($a1)
- sw $v1, 8($a1)
- sw $t0, 4($a1)
+ blt a2, 16, backwards_4
+ lw v0, -4(a0)
+ lw v1, -8(a0)
+ lw t0, -12(a0)
+ lw t1, -16(a0)
+ addiu a0, a0, -16
+ sw v0, -4(a1)
+ sw v1, -8(a1)
+ sw t0, -12(a1)
+ sw t1, -16(a1)
+ addiu a1, a1, -16
+ addiu a2, a2, -16
b backwards_16
- sw $t1, ($a1)
+
backwards_4:
- slti $at, $a2, 4
-backwards_4_: // fake label due to branch likely optimization
- bnez $at, backwards_bytecopy
- nop
- lw $v0, -4($a0)
- addiu $a0, $a0, -4
- addiu $a1, $a1, -4
- addiu $a2, $a2, -4
+ blt a2, 4, backwards_bytecopy
+ lw v0, -4(a0)
+ addiu a0, a0, -4
+ sw v0, -4(a1)
+ addiu a1, a1, -4
+ addiu a2, a2, -4
b backwards_4
- sw $v0, ($a1)
END(bcopy)
diff --git a/src/libultra/libc/bzero.s b/src/libultra/libc/bzero.s
index 5323a92d7d..e1ee69e89a 100644
--- a/src/libultra/libc/bzero.s
+++ b/src/libultra/libc/bzero.s
@@ -1,65 +1,59 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(bzero)
- slti $at, $a1, 0xC
- bnez $at, bytezero
- negu $v1, $a0
- andi $v1, $v1, 3
- beqz $v1, blkzero
- subu $a1, $a1, $v1
- swl $zero, ($a0)
- addu $a0, $a0, $v1
+ negu v1, a0
+ blt a1, 0xC, bytezero
+
+ and v1, v1, 3
+ subu a1, a1, v1
+ beqz v1, blkzero
+
+ swl zero, (a0)
+ addu a0, a0, v1
blkzero:
- // align backwards to 0x20
- li $at, ~0x1F
- and $a3, $a1, $at
- // If the result is zero, the amount to zero is less than 0x20 bytes
- beqz $a3, wordzero
- subu $a1, $a1, $a3
- // zero in blocks of 0x20 at a time
- addu $a3, $a3, $a0
+ /* align backwards to 0x20 */
+ and a3, a1, ~(0x20 - 1)
+ /* If the result is zero, the amount to zero is less than 0x20 bytes */
+ subu a1, a1, a3
+ beqz a3, wordzero
+ /* zero in blocks of 0x20 at a time */
+ addu a3, a3, a0
1:
- addiu $a0, $a0, 0x20
- sw $zero, -0x20($a0)
- sw $zero, -0x1C($a0)
- sw $zero, -0x18($a0)
- sw $zero, -0x14($a0)
- sw $zero, -0x10($a0)
- sw $zero, -0xC($a0)
- sw $zero, -8($a0)
- bne $a0, $a3, 1b
- sw $zero, -4($a0)
+ sw zero, 0(a0)
+ sw zero, 4(a0)
+ sw zero, 8(a0)
+ sw zero, 12(a0)
+ addiu a0, a0, 0x20
+ sw zero, -16(a0)
+ sw zero, -12(a0)
+ sw zero, -8(a0)
+ sw zero, -4(a0)
+ bne a0, a3, 1b
+
wordzero:
- // align backwards to 0x4
- li $at, ~3
- and $a3, $a1, $at
- // If the result is zero, the amount to zero is less than 0x4 bytes
- beqz $a3, bytezero
- subu $a1, $a1, $a3
- // zero one word at a time
- addu $a3, $a3, $a0
+ /* align backwards to 0x4 */
+ and a3, a1, ~3
+ /* If the result is zero, the amount to zero is less than 0x4 bytes */
+ subu a1, a1, a3
+ beqz a3, bytezero
+ /* zero one word at a time */
+ addu a3, a3, a0
1:
- addiu $a0, $a0, 4
- bne $a0, $a3, 1b
- sw $zero, -4($a0)
+ addu a0, a0, 4
+ sw zero, -4(a0)
+ bne a0, a3, 1b
bytezero:
- // test if nothing left to zero
- blez $a1, zerodone
- nop
- // zero one byte at a time
- addu $a1, $a1, $a0
+ /* test if nothing left to zero */
+ blez a1, zerodone
+ /* zero one byte at a time */
+ addu a1, a1, a0
1:
- addiu $a0, $a0, 1
- bne $a0, $a1, 1b
- sb $zero, -1($a0)
+ addiu a0, a0, 1
+ sb zero, -1(a0)
+ bne a0, a1, 1b
zerodone:
- jr $ra
- nop
+ jr ra
END(bzero)
diff --git a/src/libultra/libc/xldtob.c b/src/libultra/libc/xldtob.c
index a0ebe5d2d8..1a64baf041 100644
--- a/src/libultra/libc/xldtob.c
+++ b/src/libultra/libc/xldtob.c
@@ -56,7 +56,7 @@ void _Ldtob(_Pft* args, char code) {
} else if (args->prec == 0 && (code == 'g' || code == 'G')) {
args->prec = 1;
}
- err = _Ldunscale(&exp, (_Pft*)args);
+ err = _Ldunscale(&exp, args);
if (err > 0) {
memcpy(args->s, err == 2 ? "NaN" : "Inf", args->n1 = 3);
return;
@@ -76,7 +76,7 @@ void _Ldtob(_Pft* args, char code) {
exp = exp * 30103 / 100000 - 4;
if (exp < 0) {
- n = (3 - exp) & ~3;
+ n = (-exp + 3) & ~3;
exp = -n;
for (i = 0; n > 0; n >>= 1, i++) {
if ((n & 1) != 0) {
@@ -95,7 +95,7 @@ void _Ldtob(_Pft* args, char code) {
val /= factor;
}
- gen = ((code == 'f') ? exp + 10 : 6) + args->prec;
+ gen = args->prec + ((code == 'f') ? exp + 10 : 6);
if (gen > 0x13) {
gen = 0x13;
}
@@ -128,20 +128,14 @@ void _Ldtob(_Pft* args, char code) {
--gen, --exp;
}
- nsig = ((code == 'f') ? exp + 1 : ((code == 'e' || code == 'E') ? 1 : 0)) + args->prec;
+ nsig = args->prec + ((code == 'f') ? exp + 1 : ((code == 'e' || code == 'E') ? 1 : 0));
if (gen < nsig) {
nsig = gen;
}
if (nsig > 0) {
- char drop;
+ char drop = (nsig < gen && ptr[nsig] > '4') ? '9' : '0';
int n2;
- if (nsig < gen && ptr[nsig] > '4') {
- drop = '9';
- } else {
- drop = '0';
- }
-
for (n2 = nsig; ptr[--n2] == drop;) {
nsig--;
}
diff --git a/src/libultra/libc/xprintf.c b/src/libultra/libc/xprintf.c
index 7fba40b4c4..32a25d383c 100644
--- a/src/libultra/libc/xprintf.c
+++ b/src/libultra/libc/xprintf.c
@@ -11,7 +11,7 @@
#define ATOI(i, a) \
for (i = 0; isdigit(*a); a++) \
if (i < 999) \
- i = *a + i * 10 - '0';
+ i = i * 10 + *a - '0';
#define PUT(fmt, _size) \
if (_size > 0) { \
@@ -93,11 +93,7 @@ int _Printf(PrintCallback pfn, void* arg, const char* fmt, va_list ap) {
}
}
- if (strchr("hlL", *s) != NULL) {
- x.qual = *s++;
- } else {
- x.qual = '\0';
- }
+ x.qual = (strchr("hlL", *s) != NULL) ? *s++ : '\0';
if (x.qual == 'l' && *s == 'l') {
x.qual = 'L';
@@ -126,7 +122,7 @@ static void _Putfld(_Pft* px, va_list* pap, char code, char* ac) {
switch (code) {
case 'c':
- ac[px->n0++] = va_arg(*pap, unsigned int);
+ ac[px->n0++] = va_arg(*pap, int);
break;
case 'd':
diff --git a/src/libultra/mgu/mtxf2l.s b/src/libultra/mgu/mtxf2l.s
index edbb675a8e..0268a323ef 100644
--- a/src/libultra/mgu/mtxf2l.s
+++ b/src/libultra/mgu/mtxf2l.s
@@ -1,40 +1,36 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 32
+.text
+.align 5
#define MTX_INTPART 0
#define MTX_FRACPART 0x20
LEAF(guMtxF2L)
- li $at, 0x47800000 // 65536.0f
- mtc1 $at, $f0
- li $t9, 0xFFFF0000
- addiu $t8, $a1, MTX_FRACPART
+ li.s fv0, 65536.0
+ li t9, 0xFFFF0000
+ addu t8, a1, MTX_FRACPART
1:
- lwc1 $f4, ($a0)
- lwc1 $f10, 4($a0)
- addiu $a1, $a1, 4
- mul.s $f6, $f4, $f0
- addiu $a0, $a0, 8
- mul.s $f16, $f10, $f0
- trunc.w.s $f8, $f6
- trunc.w.s $f18, $f16
- mfc1 $t0, $f8
- mfc1 $t1, $f18
- and $t2, $t0, $t9
- sll $t5, $t0, 0x10
- srl $t3, $t1, 0x10
- andi $t6, $t1, 0xFFFF
- or $t4, $t2, $t3
- or $t7, $t5, $t6
- sw $t4, (MTX_INTPART-4)($a1)
- bne $a1, $t8, 1b
- sw $t7, (MTX_FRACPART-4)($a1)
- jr $ra
- nop
+ lwc1 ft0, 0(a0)
+ mul.s ft1, ft0, fv0
+ trunc.w.s ft2, ft1
+ lwc1 ft3, 4(a0)
+ mul.s ft4, ft3, fv0
+ trunc.w.s ft5, ft4
+ mfc1 t0, ft2
+ mfc1 t1, ft5
+ and t2, t0, t9
+ srl t3, t1, 0x10
+ or t4, t2, t3
+ sw t4, (MTX_INTPART)(a1)
+ sll t5, t0, 0x10
+ and t6, t1, 0xFFFF
+ or t7, t5, t6
+ sw t7, (MTX_FRACPART)(a1)
+ addu a1, a1, 4
+ addu a0, a0, 8
+ bne a1, t8, 1b
+
+ jr ra
END(guMtxF2L)
diff --git a/src/libultra/mgu/mtxident.s b/src/libultra/mgu/mtxident.s
index fb0e4c44ad..7f074a5526 100644
--- a/src/libultra/mgu/mtxident.s
+++ b/src/libultra/mgu/mtxident.s
@@ -1,29 +1,27 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noreorder
-
-.section .text
-
-.balign 32
+.text
+.align 5
LEAF(guMtxIdent)
- addi $t0, $zero, 1
- sll $t1, $t0, 0x10
- sw $t1, ($a0)
- sw $zero, 4($a0)
- sw $t0, 8($a0)
- sw $zero, 0xc($a0)
- sw $zero, 0x10($a0)
- sw $t1, 0x14($a0)
- sw $zero, 0x18($a0)
- sw $t0, 0x1C($a0)
- sw $zero, 0x20($a0)
- sw $zero, 0x24($a0)
- sw $zero, 0x28($a0)
- sw $zero, 0x2c($a0)
- sw $zero, 0x30($a0)
- sw $zero, 0x34($a0)
- sw $zero, 0x38($a0)
- jr $ra
- sw $zero, 0x3C($a0)
+ add t0, zero, 1
+ sll t1, t0, 0x10
+ sw t1, 0x00(a0)
+ sw zero, 0x04(a0)
+ sw t0, 0x08(a0)
+ sw zero, 0x0C(a0)
+ sw zero, 0x10(a0)
+ sw t1, 0x14(a0)
+ sw zero, 0x18(a0)
+ sw t0, 0x1C(a0)
+ sw zero, 0x20(a0)
+ sw zero, 0x24(a0)
+ sw zero, 0x28(a0)
+ sw zero, 0x2c(a0)
+ sw zero, 0x30(a0)
+ sw zero, 0x34(a0)
+ sw zero, 0x38(a0)
+ sw zero, 0x3C(a0)
+ jr ra
END(guMtxIdent)
diff --git a/src/libultra/mgu/mtxidentf.s b/src/libultra/mgu/mtxidentf.s
index 583fc22184..490b79e4b4 100644
--- a/src/libultra/mgu/mtxidentf.s
+++ b/src/libultra/mgu/mtxidentf.s
@@ -1,28 +1,26 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noreorder
-
-.section .text
-
-.balign 32
+.text
+.align 5
LEAF(guMtxIdentF)
- li $t0, 0x3F800000 // 1.0f
- sw $t0, ($a0)
- sw $zero, 4($a0)
- sw $zero, 8($a0)
- sw $zero, 0xC($a0)
- sw $zero, 0x10($a0)
- sw $t0, 0x14($a0)
- sw $zero, 0x18($a0)
- sw $zero, 0x1C($a0)
- sw $zero, 0x20($a0)
- sw $zero, 0x24($a0)
- sw $t0, 0x28($a0)
- sw $zero, 0x2C($a0)
- sw $zero, 0x30($a0)
- sw $zero, 0x34($a0)
- sw $zero, 0x38($a0)
- jr $ra
- sw $t0, 0x3C($a0)
+ li.s t0, 1.0
+ sw t0, 0x00(a0)
+ sw zero, 0x04(a0)
+ sw zero, 0x08(a0)
+ sw zero, 0x0C(a0)
+ sw zero, 0x10(a0)
+ sw t0, 0x14(a0)
+ sw zero, 0x18(a0)
+ sw zero, 0x1C(a0)
+ sw zero, 0x20(a0)
+ sw zero, 0x24(a0)
+ sw t0, 0x28(a0)
+ sw zero, 0x2C(a0)
+ sw zero, 0x30(a0)
+ sw zero, 0x34(a0)
+ sw zero, 0x38(a0)
+ sw t0, 0x3C(a0)
+ jr ra
END(guMtxIdentF)
diff --git a/src/libultra/mgu/mtxl2f.s b/src/libultra/mgu/mtxl2f.s
index 9298da37cc..b95e3aca7f 100644
--- a/src/libultra/mgu/mtxl2f.s
+++ b/src/libultra/mgu/mtxl2f.s
@@ -1,41 +1,43 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 32
+.text
+.align 5
#define MTX_INTPART 0
#define MTX_FRACPART 0x20
+#define FIXTOF 0.0000152587890625 /* 1.0f / 65536.0f */
+
LEAF(guMtxL2F)
- li $at, 0x37800000 // 1.0f / 65536.0f
- mtc1 $at, $f0
- li $t9, 0xFFFF0000
- addiu $t8, $a1, MTX_FRACPART
+ li.s fv0, FIXTOF
+ li t9, 0xFFFF0000
+ addiu t8, a1, MTX_FRACPART
1:
- lw $t0, MTX_INTPART($a1)
- lw $t1, MTX_FRACPART($a1)
- addiu $a1, $a1, 4
- and $t2, $t0, $t9
- srl $t3, $t1, 0x10
- or $t4, $t2, $t3
- mtc1 $t4, $f4
- sll $t5, $t0, 0x10
- andi $t6, $t1, 0xFFFF
- or $t7, $t5, $t6
- cvt.s.w $f6, $f4
- mtc1 $t7, $f10
- addiu $a0, $a0, 8
- cvt.s.w $f16, $f10
- mul.s $f8, $f6, $f0
- nop
- mul.s $f18, $f16, $f0
- swc1 $f8, -8($a0)
- bne $a1, $t8, 1b
- swc1 $f18, -4($a0)
- jr $ra
- nop
+ lw t0, MTX_INTPART(a1)
+ lw t1, MTX_FRACPART(a1)
+
+ and t2, t0, t9
+ srl t3, t1, 0x10
+ or t4, t2, t3
+
+ sll t5, t0, 0x10
+ and t6, t1, 0xFFFF
+ or t7, t5, t6
+
+ mtc1 t4, ft0
+ cvt.s.w ft1, ft0
+ mul.s ft2, ft1, fv0
+
+ mtc1 t7, ft3
+ cvt.s.w ft4, ft3
+ mul.s ft5, ft4, fv0
+
+ swc1 ft2, 0(a0)
+ swc1 ft5, 4(a0)
+ addu a0, a0, 8
+ addu a1, a1, 4
+ bne a1, t8, 1b
+
+ jr ra
END(guMtxL2F)
diff --git a/src/libultra/mgu/normalize.s b/src/libultra/mgu/normalize.s
index 7686317ea2..d94748bced 100644
--- a/src/libultra/mgu/normalize.s
+++ b/src/libultra/mgu/normalize.s
@@ -1,31 +1,33 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noreorder
-
-.section .text
-
-.balign 32
+.text
+.align 5
LEAF(guNormalize)
- lwc1 $f4, ($a0)
- lwc1 $f6, ($a1)
- lwc1 $f8, ($a2)
- mul.s $f10, $f4, $f4
- li $t0, 0x3F800000 // 1.0f
- mul.s $f16, $f6, $f6
- add.s $f18, $f10, $f16
- mul.s $f16, $f8, $f8
- add.s $f10, $f16, $f18
- mtc1 $t0, $f18
- sqrt.s $f16, $f10
- div.s $f10, $f18, $f16
- mul.s $f16, $f4, $f10
+ lwc1 ft0, (a0)
+ lwc1 ft1, (a1)
+ lwc1 ft2, (a2)
+.set noreorder
+ mul.s ft3, ft0, ft0
+ li.s t0, 1.0
+ mul.s ft4, ft1, ft1
+ add.s ft5, ft3, ft4
+ mul.s ft4, ft2, ft2
+.set reorder
+ add.s ft3, ft4, ft5
+ mtc1 t0, ft5
+ sqrt.s ft4, ft3
+ div.s ft3, ft5, ft4
+.set noreorder
+ mul.s ft4, ft0, ft3
nop
- mul.s $f18, $f6, $f10
+ mul.s ft5, ft1, ft3
nop
- mul.s $f4, $f8, $f10
- swc1 $f16, ($a0)
- swc1 $f18, ($a1)
- jr $ra
- swc1 $f4, ($a2)
+ mul.s ft0, ft2, ft3
+.set reorder
+ swc1 ft4, (a0)
+ swc1 ft5, (a1)
+ swc1 ft0, (a2)
+ jr ra
END(guNormalize)
diff --git a/src/libultra/mgu/scale.s b/src/libultra/mgu/scale.s
index 80199c0621..5661b940cc 100644
--- a/src/libultra/mgu/scale.s
+++ b/src/libultra/mgu/scale.s
@@ -1,52 +1,56 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 32
+.text
+.align 5
LEAF(guScale)
- li $at, 0x47800000 // 65536.0f
- mtc1 $at, $f4
- mtc1 $a1, $f6
- sw $zero, 4($a0)
- sw $zero, 0xC($a0)
- mul.s $f8, $f6, $f4
- mtc1 $a2, $f6
- sw $zero, 0x10($a0)
- sw $zero, 0x18($a0)
- sw $zero, 0x24($a0)
- sw $zero, 0x2C($a0)
- sw $zero, 0x30($a0)
- trunc.w.s $f10, $f8
- mul.s $f8, $f6, $f4
- mtc1 $a3, $f6
- sw $zero, 0x38($a0)
- mfc1 $t1, $f10
- sw $zero, 0x3C($a0)
- srl $t2, $t1, 0x10
- trunc.w.s $f10, $f8
- mul.s $f8, $f6, $f4
- sll $t0, $t2, 0x10
- sll $t2, $t1, 0x10
- mfc1 $t1, $f10
- sw $t0, ($a0)
- sw $t2, 0x20($a0)
- srl $t0, $t1, 0x10
- trunc.w.s $f10, $f8
- andi $t2, $t1, 0xFFFF
- sw $t2, 0x28($a0)
- sw $t0, 8($a0)
- mfc1 $t1, $f10
- nop
- srl $t2, $t1, 0x10
- sll $t0, $t2, 0x10
- sw $t0, 0x14($a0)
- li $t0, 1
- sll $t2, $t1, 0x10
- sw $t2, 0x34($a0)
- jr $ra
- sw $t0, 0x1C($a0)
+ li.s ft0, 65536.0
+
+ mtc1 a1, ft1
+ mul.s ft2, ft1, ft0
+ trunc.w.s ft3, ft2
+ mfc1 t1, ft3
+
+ srl t2, t1, 0x10
+ sll t0, t2, 0x10
+ sw t0, 0x00(a0)
+ sll t2, t1, 0x10
+ sw t2, 0x20(a0)
+
+ mtc1 a2, ft1
+ mul.s ft2, ft1, ft0
+ trunc.w.s ft3, ft2
+ mfc1 t1, ft3
+
+ srl t0, t1, 0x10
+ sw t0, 0x08(a0)
+ andi t2, t1, 0xFFFF
+ sw t2, 0x28(a0)
+
+ mtc1 a3, ft1
+ mul.s ft2, ft1, ft0
+ trunc.w.s ft3, ft2
+ mfc1 t1, ft3
+
+ srl t2, t1, 0x10
+ sll t0, t2, 0x10
+ sw t0, 0x14(a0)
+ sll t2, t1, 0x10
+ sw t2, 0x34(a0)
+
+ li t0, 1
+ sw t0, 0x1C(a0)
+
+ sw zero, 0x04(a0)
+ sw zero, 0x0C(a0)
+ sw zero, 0x10(a0)
+ sw zero, 0x18(a0)
+ sw zero, 0x24(a0)
+ sw zero, 0x2C(a0)
+ sw zero, 0x30(a0)
+ sw zero, 0x38(a0)
+ sw zero, 0x3C(a0)
+
+ jr ra
END(guScale)
diff --git a/src/libultra/mgu/translate.s b/src/libultra/mgu/translate.s
index d059ad5692..cf2d246434 100644
--- a/src/libultra/mgu/translate.s
+++ b/src/libultra/mgu/translate.s
@@ -1,61 +1,68 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 32
+.text
+.align 5
LEAF(guTranslate)
- li $at, 0x47800000 // 65536.0f
- mtc1 $at, $f4
- mtc1 $a1, $f6
- sw $zero, ($a0)
- sw $zero, 0x14($a0)
- mul.s $f8, $f6, $f4
- mtc1 $a2, $f6
- sw $zero, 8($a0)
- sw $zero, 4($a0)
- sw $zero, 0xC($a0)
- sw $zero, 0x10($a0)
- sw $zero, 0x20($a0)
- trunc.w.s $f10, $f8
- mul.s $f8, $f6, $f4
- mtc1 $a3, $f6
- sw $zero, 0x24($a0)
- mfc1 $t1, $f10
- sw $zero, 0x28($a0)
- sw $zero, 0x2C($a0)
- srl $t2, $t1, 0x10
- trunc.w.s $f10, $f8
- mul.s $f8, $f6, $f4
- sll $t0, $t2, 0x10
- sw $zero, 0x30($a0)
- mfc1 $t3, $f10
- sw $zero, 0x34($a0)
- srl $t2, $t3, 0x10
- trunc.w.s $f10, $f8
- or $t0, $t0, $t2
- sw $t0, 0x18($a0)
- sll $t0, $t1, 0x10
- sll $t2, $t3, 0x10
- mfc1 $t1, $f10
- srl $t2, $t2, 0x10
- or $t0, $t0, $t2
- sw $t0, 0x38($a0)
- srl $t2, $t1, 0x10
- sll $t0, $t2, 0x10
- addiu $t0, $t0, 1
- sw $t0, 0x1C($a0)
- lui $t0, 1
- ori $t0, $t0, 0
- sw $t0, ($a0)
- sw $t0, 0x14($a0)
- lui $t0, (0x00000001 >> 16)
- ori $t0, (0x00000001 & 0xFFFF)
- sll $t2, $t1, 0x10
- sw $t2, 0x3C($a0)
- jr $ra
- sw $t0, 8($a0)
+ li.s ft0, 65536.0
+
+ mtc1 a1, ft1
+ mul.s ft2, ft1, ft0
+ trunc.w.s ft3, ft2
+ mfc1 t1, ft3
+
+ mtc1 a2, ft1
+ mul.s ft2, ft1, ft0
+ trunc.w.s ft3, ft2
+ mfc1 t3, ft3
+
+ srl t2, t1, 0x10
+ sll t0, t2, 0x10
+ srl t2, t3, 0x10
+ or t0, t0, t2
+ sw t0, 0x18(a0)
+
+ sll t0, t1, 0x10
+ sll t2, t3, 0x10
+ srl t2, t2, 0x10
+ or t0, t0, t2
+ sw t0, 0x38(a0)
+
+ mtc1 a3, ft1
+ mul.s ft2, ft1, ft0
+ trunc.w.s ft3, ft2
+ mfc1 t1, ft3
+
+ srl t2, t1, 0x10
+ sll t0, t2, 0x10
+ addiu t0, t0, 1
+ sw t0, 0x1C(a0)
+
+ sll t2, t1, 0x10
+ sw t2, 0x3C(a0)
+
+ sw zero, 0x00(a0)
+ sw zero, 0x04(a0)
+ sw zero, 0x08(a0)
+ sw zero, 0x0C(a0)
+ sw zero, 0x10(a0)
+ sw zero, 0x14(a0)
+ sw zero, 0x20(a0)
+ sw zero, 0x24(a0)
+ sw zero, 0x28(a0)
+ sw zero, 0x2C(a0)
+ sw zero, 0x30(a0)
+ sw zero, 0x34(a0)
+
+ lui t0, (0x00010000 >> 16)
+ ori t0, (0x00010000 & 0xFFFF)
+ sw t0, (a0)
+ sw t0, 0x14(a0)
+
+ lui t0, (0x00000001 >> 16)
+ ori t0, (0x00000001 & 0xFFFF)
+ sw t0, 8(a0)
+
+ jr ra
END(guTranslate)
diff --git a/src/libultra/os/afterprenmi.c b/src/libultra/os/afterprenmi.c
index b59814763f..6a9a83de33 100644
--- a/src/libultra/os/afterprenmi.c
+++ b/src/libultra/os/afterprenmi.c
@@ -1,5 +1,4 @@
#include "ultra64.h"
-#include "global.h"
s32 osAfterPreNMI(void) {
return __osSpSetPc(0);
diff --git a/src/libultra/os/createmesgqueue.c b/src/libultra/os/createmesgqueue.c
index a85eadb0d7..4598de6aaa 100644
--- a/src/libultra/os/createmesgqueue.c
+++ b/src/libultra/os/createmesgqueue.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 count) {
mq->mtqueue = (OSThread*)&__osThreadTail;
diff --git a/src/libultra/os/createthread.c b/src/libultra/os/createthread.c
index 8d54fb9871..9332207971 100644
--- a/src/libultra/os/createthread.c
+++ b/src/libultra/os/createthread.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/asm.h"
void osCreateThread(OSThread* thread, OSId id, void (*entry)(void*), void* arg, void* sp, OSPri pri) {
diff --git a/src/libultra/os/destroythread.c b/src/libultra/os/destroythread.c
index a3273cadee..0b74a4fcbc 100644
--- a/src/libultra/os/destroythread.c
+++ b/src/libultra/os/destroythread.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void osDestroyThread(OSThread* thread) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/os/exceptasm.s b/src/libultra/os/exceptasm.s
index 6b8003fd28..cdadef1f7f 100644
--- a/src/libultra/os/exceptasm.s
+++ b/src/libultra/os/exceptasm.s
@@ -1,21 +1,24 @@
+#ifdef __GNUC__
+.set gp=64
+#endif
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
#include "ultra64/rcp.h"
+#include "ultra64/bcp.h"
#include "ultra64/message.h"
#include "ultra64/thread.h"
#include "ultra64/exception.h"
+#include "ultra64/version.h"
-.set noat
-.set noreorder
-.set gp=64
+#define MESG(x) ((x) << 3)
-.section .data
-
-.balign 16
+.data
+.align 2
DATA(__osHwIntTable)
.word 0, 0
- .word 0, 0 // cart
+ .word 0, 0 /* cart */
.word 0, 0
.word 0, 0
.word 0, 0
@@ -25,9 +28,8 @@ DATA(__osPiIntTable)
.word 0, 0
ENDDATA(__osPiIntTable)
-.section .rodata
-
-.balign 16
+.rdata
+.align 2
__osIntOffTable:
.byte 0x00 /* redispatch */
@@ -74,215 +76,197 @@ __osIntTable:
.word IP7_Hdlr
.word counter
-.section .text
-
-.balign 16
+.text
/**
- * The exception preamble is copied to the exception vectors at
+ * The 16-byte exception preamble is copied to the exception vectors at
* UT_VEC, XUT_VEC, ECC_VEC, E_VEC, to direct execution to __osException
*/
LEAF(__osExceptionPreamble)
- lui $k0, %hi(__osException)
- addiu $k0, %lo(__osException)
- jr $k0
- nop
+ la k0, __osException
+ jr k0
END(__osExceptionPreamble)
LEAF(__osException)
- // Load scratch space for thread saving
- lui $k0, %hi(__osThreadSave)
- addiu $k0, %lo(__osThreadSave)
- // Save $at
- sd $at, THREAD_AT($k0)
- // Save sr
- mfc0 $k1, C0_SR
- sw $k1, THREAD_SR($k0)
- // Disable interrupts
- li $at, ~(SR_IE | SR_EXL)
- and $k1, $k1, $at
- mtc0 $k1, C0_SR
- // Save some temp registers for use in the following
- sd $t0, THREAD_T0($k0)
- sd $t1, THREAD_T1($k0)
- sd $t2, THREAD_T2($k0)
- // Mark FPU as unused
- sw $zero, THREAD_FP($k0)
- // Left over from misplaced ifdef, immediately overwritten on next instruction
- mfc0 $t0, C0_CAUSE
+.set noat
+ /* Load scratch space for thread saving */
+ la k0, __osThreadSave
+ /* Save at */
+ sd AT, THREAD_AT(k0)
+.set at
+ /* Save sr */
+ MFC0( k1, C0_SR)
+ sw k1, THREAD_SR(k0)
+ /* Disable interrupts */
+ and k1, k1, ~(SR_IE | SR_EXL)
+ MTC0( k1, C0_SR)
+ /* Save some temp registers for use in the following */
+ sd t0, THREAD_T0(k0)
+ sd t1, THREAD_T1(k0)
+ sd t2, THREAD_T2(k0)
+ /* Mark FPU as unused */
+ sw zero, THREAD_FP(k0)
+ /* Left over from misplaced ifdef, immediately overwritten on next instruction */
+ MFC0( t0, C0_CAUSE)
savecontext:
- // Save the previously running thread's context to be restored when it resumes
- move $t0, $k0
- lui $k0, %hi(__osRunningThread)
- lw $k0, %lo(__osRunningThread)($k0)
- ld $t1, THREAD_AT($t0)
- sd $t1, THREAD_AT($k0)
- ld $t1, THREAD_SR($t0)
- sd $t1, THREAD_SR($k0)
- ld $t1, THREAD_T0($t0)
- sd $t1, THREAD_T0($k0)
- ld $t1, THREAD_T1($t0)
- sd $t1, THREAD_T1($k0)
- ld $t1, THREAD_T2($t0)
- sd $t1, THREAD_T2($k0)
- lw $k1, THREAD_SR($k0)
- mflo $t0
- sd $t0, THREAD_LO($k0)
- mfhi $t0
- andi $t1, $k1, SR_IMASK
- sd $v0, THREAD_V0($k0)
- sd $v1, THREAD_V1($k0)
- sd $a0, THREAD_A0($k0)
- sd $a1, THREAD_A1($k0)
- sd $a2, THREAD_A2($k0)
- sd $a3, THREAD_A3($k0)
- sd $t3, THREAD_T3($k0)
- sd $t4, THREAD_T4($k0)
- sd $t5, THREAD_T5($k0)
- sd $t6, THREAD_T6($k0)
- sd $t7, THREAD_T7($k0)
- sd $s0, THREAD_S0($k0)
- sd $s1, THREAD_S1($k0)
- sd $s2, THREAD_S2($k0)
- sd $s3, THREAD_S3($k0)
- sd $s4, THREAD_S4($k0)
- sd $s5, THREAD_S5($k0)
- sd $s6, THREAD_S6($k0)
- sd $s7, THREAD_S7($k0)
- sd $t8, THREAD_T8($k0)
- sd $t9, THREAD_T9($k0)
- sd $gp, THREAD_GP($k0)
- sd $sp, THREAD_SP($k0)
- sd $fp, THREAD_S8($k0)
- sd $ra, THREAD_RA($k0)
- beqz $t1, savercp
- sd $t0, THREAD_HI($k0)
- // If any CPU interrupts are enabled in the previous thread's SR, bitwise-OR in the
- // disabled CPU interrupts from the global interrupt mask.
- // This is an attempt at reverting the effect of masking the thread's SR with the
- // global interrupt mask. This is however broken, see comments for osSetIntMask.
- lui $t0, %hi(__OSGlobalIntMask)
- addiu $t0, %lo(__OSGlobalIntMask)
- lw $t0, ($t0)
- li $at, ~0
- xor $t2, $t0, $at
- lui $at, ((~SR_IMASK) >> 0x10) & 0xFFFF
- andi $t2, $t2, SR_IMASK
- ori $at, (~SR_IMASK) & 0xFFFF
- or $t4, $t1, $t2
- and $t3, $k1, $at
- andi $t0, $t0, SR_IMASK
- or $t3, $t3, $t4
- and $t1, $t1, $t0
- and $k1, $k1, $at
- sw $t3, THREAD_SR($k0)
- or $k1, $k1, $t1
+.set noreorder
+ /* Save the previously running thread's context to be restored when it resumes */
+ move t0, k0
+ lw k0, __osRunningThread
+ ld t1, THREAD_AT(t0)
+ sd t1, THREAD_AT(k0)
+ ld t1, THREAD_SR(t0)
+ sd t1, THREAD_SR(k0)
+ ld t1, THREAD_T0(t0)
+ sd t1, THREAD_T0(k0)
+ ld t1, THREAD_T1(t0)
+ sd t1, THREAD_T1(k0)
+ ld t1, THREAD_T2(t0)
+ sd t1, THREAD_T2(k0)
+.set reorder
+ sd $2, THREAD_V0(k0)
+ sd $3, THREAD_V1(k0)
+ sd $4, THREAD_A0(k0)
+ sd $5, THREAD_A1(k0)
+ sd $6, THREAD_A2(k0)
+ sd $7, THREAD_A3(k0)
+ sd $11, THREAD_T3(k0)
+ sd $12, THREAD_T4(k0)
+ sd $13, THREAD_T5(k0)
+ sd $14, THREAD_T6(k0)
+ sd $15, THREAD_T7(k0)
+ sd $16, THREAD_S0(k0)
+ sd $17, THREAD_S1(k0)
+ sd $18, THREAD_S2(k0)
+ sd $19, THREAD_S3(k0)
+ sd $20, THREAD_S4(k0)
+ sd $21, THREAD_S5(k0)
+ sd $22, THREAD_S6(k0)
+ sd $23, THREAD_S7(k0)
+ sd $24, THREAD_T8(k0)
+ sd $25, THREAD_T9(k0)
+ sd $28, THREAD_GP(k0)
+ sd $29, THREAD_SP(k0)
+ sd $30, THREAD_S8(k0)
+ sd $31, THREAD_RA(k0)
+ mflo t0
+ sd t0, THREAD_LO(k0)
+ mfhi t0
+ sd t0, THREAD_HI(k0)
+ lw k1, THREAD_SR(k0)
+ andi t1, k1, SR_IMASK
+ beqz t1, savercp
+ /* If any CPU interrupts are enabled in the previous thread's SR, bitwise-OR in the */
+ /* disabled CPU interrupts from the global interrupt mask. */
+ /* This is an attempt at reverting the effect of masking the thread's SR with the */
+ /* global interrupt mask. This is however broken, see comments for osSetIntMask. */
+ la t0, __OSGlobalIntMask
+ lw t0, (t0)
+ xor t2, t0, 0xFFFFFFFF
+ andi t2, t2, SR_IMASK
+ or t4, t1, t2
+ and t3, k1, ~SR_IMASK
+ or t3, t3, t4
+ sw t3, THREAD_SR(k0)
+ andi t0, t0, SR_IMASK
+ and t1, t1, t0
+ and k1, k1, ~SR_IMASK
+ or k1, k1, t1
savercp:
- // Save the currently masked RCP interrupts.
- lui $t1, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
- lw $t1, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($t1)
- beqz $t1, endrcp
- nop
- // Similar to the above comment, but for RCP interrupt enable bits rather than CPU.
- // This suffers from the same problem as above.
- lui $t0, %hi(__OSGlobalIntMask)
- addiu $t0, %lo(__OSGlobalIntMask)
- lw $t0, ($t0)
- lw $t4, THREAD_RCP($k0)
- li $at, ~0
- srl $t0, $t0, RCP_IMASKSHIFT
- xor $t0, $t0, $at
- andi $t0, $t0, (RCP_IMASK >> RCP_IMASKSHIFT)
- and $t0, $t0, $t4
- or $t1, $t1, $t0
+ /* Save the currently masked RCP interrupts. */
+ lw t1, PHYS_TO_K1(MI_INTR_MASK_REG)
+ beqz t1, endrcp
+ /* Similar to the above comment, but for RCP interrupt enable bits rather than CPU. */
+ /* This suffers from the same problem as above. */
+ la t0, __OSGlobalIntMask
+ lw t0, (t0)
+ srl t0, t0, RCP_IMASKSHIFT
+ xor t0, t0, 0xFFFFFFFF
+ andi t0, t0, (RCP_IMASK >> RCP_IMASKSHIFT)
+ lw t4, THREAD_RCP(k0)
+ and t0, t0, t4
+ or t1, t1, t0
endrcp:
- sw $t1, THREAD_RCP($k0)
- mfc0 $t0, C0_EPC
- sw $t0, THREAD_PC($k0)
- lw $t0, THREAD_FP($k0)
- beqz $t0, handle_interrupt
- nop
- // Save FP Registers if FPU was used by the thread
- cfc1 $t0, C1_FPCSR
+ sw t1, THREAD_RCP(k0)
+ MFC0( t0, C0_EPC)
+ sw t0, THREAD_PC(k0)
+ lw t0, THREAD_FP(k0)
+ beqz t0, handle_interrupt
+ /* Save FP Registers if FPU was used by the thread */
+.set noreorder
+ cfc1 t0, C1_FPCSR
nop
- sw $t0, THREAD_FPCSR($k0)
- sdc1 $f0, THREAD_FP0($k0)
- sdc1 $f2, THREAD_FP2($k0)
- sdc1 $f4, THREAD_FP4($k0)
- sdc1 $f6, THREAD_FP6($k0)
- sdc1 $f8, THREAD_FP8($k0)
- sdc1 $f10, THREAD_FP10($k0)
- sdc1 $f12, THREAD_FP12($k0)
- sdc1 $f14, THREAD_FP14($k0)
- sdc1 $f16, THREAD_FP16($k0)
- sdc1 $f18, THREAD_FP18($k0)
- sdc1 $f20, THREAD_FP20($k0)
- sdc1 $f22, THREAD_FP22($k0)
- sdc1 $f24, THREAD_FP24($k0)
- sdc1 $f26, THREAD_FP26($k0)
- sdc1 $f28, THREAD_FP28($k0)
- sdc1 $f30, THREAD_FP30($k0)
+ sw t0, THREAD_FPCSR(k0)
+.set reorder
+ sdc1 $f0, THREAD_FP0(k0)
+ sdc1 $f2, THREAD_FP2(k0)
+ sdc1 $f4, THREAD_FP4(k0)
+ sdc1 $f6, THREAD_FP6(k0)
+ sdc1 $f8, THREAD_FP8(k0)
+ sdc1 $f10, THREAD_FP10(k0)
+ sdc1 $f12, THREAD_FP12(k0)
+ sdc1 $f14, THREAD_FP14(k0)
+ sdc1 $f16, THREAD_FP16(k0)
+ sdc1 $f18, THREAD_FP18(k0)
+ sdc1 $f20, THREAD_FP20(k0)
+ sdc1 $f22, THREAD_FP22(k0)
+ sdc1 $f24, THREAD_FP24(k0)
+ sdc1 $f26, THREAD_FP26(k0)
+ sdc1 $f28, THREAD_FP28(k0)
+ sdc1 $f30, THREAD_FP30(k0)
handle_interrupt:
- // Determine the cause of the exception or interrupt and
- // enter appropriate handling routine
- mfc0 $t0, C0_CAUSE
- sw $t0, THREAD_CAUSE($k0)
- li $t1, OS_STATE_RUNNABLE
- sh $t1, THREAD_STATE($k0)
- andi $t1, $t0, CAUSE_EXCMASK
- // Test for break exception
- li $t2, EXC_BREAK
- beq $t1, $t2, handle_break
- nop
- // Test for CpU (coprocessor unusable) exception
- li $t2, EXC_CPU
- beq $t1, $t2, handle_CpU
- nop
- // Test for interrupt, if it's not an interrupt, panic
- li $t2, EXC_INT
- bne $t1, $t2, panic
- nop
- and $s0, $k1, $t0
+ /* Determine the cause of the exception or interrupt and */
+ /* enter appropriate handling routine */
+ MFC0( t0, C0_CAUSE)
+ sw t0, THREAD_CAUSE(k0)
+label:
+ li t1, OS_STATE_RUNNABLE
+ sh t1, THREAD_STATE(k0)
+ andi t1, t0, CAUSE_EXCMASK
+ /* Test for break exception */
+ li t2, EXC_BREAK
+ beq t1, t2, handle_break
+ /* Test for CpU (coprocessor unusable) exception */
+ li t2, EXC_CPU
+ beq t1, t2, handle_CpU
+ /* Test for interrupt, if it's not an interrupt, panic */
+ li t2, EXC_INT
+ bne t1, t2, panic
+
+ and s0, k1, t0
next_interrupt:
- // Handle external interrupt causes, using a jump table
- // to enter into the appropriate handler
- andi $t1, $s0, CAUSE_IPMASK
- srl $t2, $t1, CAUSE_IPSHIFT + 4
- bnez $t2, 1f
- nop
- srl $t2, $t1, CAUSE_IPSHIFT
- addi $t2, $t2, 0x10
+ /* Handle external interrupt causes, using a jump table */
+ /* to enter into the appropriate handler */
+ andi t1, s0, CAUSE_IPMASK
+ srl t2, t1, CAUSE_IPSHIFT + 4
+ bnez t2, 1f
+
+ srl t2, t1, CAUSE_IPSHIFT
+ addi t2, t2, 0x10
1:
- lui $at, %hi(__osIntOffTable)
- addu $at, $at, $t2
- lbu $t2, %lo(__osIntOffTable)($at)
- lui $at, %hi(__osIntTable)
- addu $at, $at, $t2
- lw $t2, %lo(__osIntTable)($at)
- jr $t2
- nop
+ lbu t2, __osIntOffTable(t2)
+ lw t2, __osIntTable(t2)
+ jr t2
/**
* IP6 Interrupt
* Only signalled by development hardware
*/
IP6_Hdlr:
- // Mask out interrupt and continue
- li $at, ~CAUSE_IP6
+ /* Mask out interrupt and continue */
+ and s0, s0, ~CAUSE_IP6
b next_interrupt
- and $s0, $s0, $at
/**
* IP7 Interrupt
* Only signalled by development hardware
*/
IP7_Hdlr:
- // Mask out interrupt and continue
- li $at, ~CAUSE_IP7
+ /* Mask out interrupt and continue */
+ and s0, s0, ~CAUSE_IP7
b next_interrupt
- and $s0, $s0, $at
/**
* IP8/Counter Interrupt
@@ -290,435 +274,473 @@ IP7_Hdlr:
* cop0 compare register, this interrupt is triggered
*/
counter:
- mfc0 $t1, C0_COMPARE
- mtc0 $t1, C0_COMPARE
- // Post counter message
+ MFC0( t1, C0_COMPARE)
+ MTC0( t1, C0_COMPARE)
+ /* Post counter message */
+ li a0, MESG(OS_EVENT_COUNTER)
jal send_mesg
- li $a0, OS_EVENT_COUNTER*8
- // Mask out interrupt and continue
- li $at, ~CAUSE_IP8
+ /* Mask out interrupt and continue */
+ and s0, s0, ~CAUSE_IP8
b next_interrupt
- and $s0, $s0, $at
/**
- * IP4/Cartridge Interrupt
- * Signalled by the N64 Disk Drive
+ * N64:
+ * IP4/Cartridge Interrupt
+ * Signalled by the N64 Disk Drive
+ * iQue:
+ * IP4/BCP Interrupt
+ * New RCP Interrupts
*/
cart:
- // Load cart callback set by __osSetHWIntrRoutine
- lui $t1, %hi(__osHwIntTable)
- addiu $t1, %lo(__osHwIntTable)
- lw $t2, (OS_INTR_CART*HWINT_SIZE+HWINT_CALLBACK)($t1)
- // Mask out interrupt
- li $at, ~CAUSE_IP4
- and $s0, $s0, $at
- // If the callback is NULL, handling is done
- beqz $t2, send_cart_mesg
- addi $t1, $t1, (OS_INTR_CART*HWINT_SIZE)
- // Set up a stack and run the callback
- jalr $t2
- lw $sp, HWINT_SP($t1)
- beqz $v0, send_cart_mesg
- nop
- // Redispatch immediately if the callback returned nonzero
+ /* Mask out interrupt */
+ and s0, s0, ~CAUSE_IP4
+ /* Load cart callback set by __osSetHWIntrRoutine */
+ la t1, __osHwIntTable
+ addi t1, t1, (OS_INTR_CART * HWINT_SIZE)
+ lw t2, HWINT_CALLBACK(t1)
+ /* If the callback is NULL, handling is done */
+ beqz t2, 1f
+ /* Set up a stack and run the callback */
+ lw sp, HWINT_SP(t1)
+ jalr t2
+ beqz v0, 1f
+ /* Redispatch immediately if the callback returned nonzero */
b redispatch
- nop
-send_cart_mesg:
- // Post a cart event message
+1:
+#ifndef BBPLAYER
+ /* Post a cart event message */
+ li a0, MESG(OS_EVENT_CART)
jal send_mesg
- li $a0, OS_EVENT_CART*8
- // Continue
+#else
+ /* On the iQue Player the CART interrupt no longer exists. New RCP interrupts are vectored here */
+ lw s1, PHYS_TO_K1(MI_EX_INTR_REG)
+
+flash:
+ /* Check for FLASH interrupt */
+ andi t1, s1, MI_EX_INTR_FLASH
+ beqz t1, flashx
+ /* Mask it out */
+ andi s1, s1, MI_EX_INTR_ALL & ~MI_EX_INTR_FLASH
+ /* Clear it */
+ li t1, 0
+ sw t1, PHYS_TO_K1(PI_NAND_CTRL_REG)
+ /* Send the event message */
+ li a0, MESG(OS_EVENT_FLASH)
+ jal send_mesg
+flashx:
+md:
+ /* Check for MD interrupt */
+ andi t1, s1, MI_EX_INTR_MD
+ beqz t1, mdx
+ /* Mask it out */
+ andi s1, s1, MI_EX_INTR_ALL & ~MI_EX_INTR_MD
+ /* Clear it */
+ li t1, MI_EX_INTR_CLR_MD
+ sw t1, PHYS_TO_K1(MI_EX_INTR_REG)
+ /* Send the event message */
+ li a0, MESG(OS_EVENT_MD)
+ jal send_mesg
+mdx:
+aes:
+ /* Check for AES interrupt */
+ andi t1, s1, MI_EX_INTR_AES
+ beqz t1, aesx
+ /* Mask it out */
+ andi s1, s1, MI_EX_INTR_ALL & ~MI_EX_INTR_AES
+ /* Disable the interrupt, this does not clear it.
+ * The responsibility of clearing and re-enabling
+ * the interrupt is left to the handler. */
+ li t1, MI_EX_INTR_MASK_CLR_AES
+ sw t1, PHYS_TO_K1(MI_EX_INTR_MASK_REG)
+ /* Send the event message */
+ li a0, MESG(OS_EVENT_AES)
+ jal send_mesg
+aesx:
+ide:
+ /* Check for IDE interrupt */
+ andi t1, s1, MI_EX_INTR_IDE
+ beqz t1, idex
+ /* Mask it out */
+ andi s1, s1, MI_EX_INTR_ALL & ~MI_EX_INTR_IDE
+ /* Disable the interrupt, this does not clear it.
+ * The responsibility of clearing and re-enabling
+ * the interrupt is left to the handler. */
+ li t1, MI_EX_INTR_MASK_CLR_IDE
+ sw t1, PHYS_TO_K1(MI_EX_INTR_MASK_REG)
+ /* Send the event message */
+ li a0, MESG(OS_EVENT_IDE)
+ jal send_mesg
+idex:
+pi_err:
+ /* Check for PI_ERR Interrupt */
+ andi t1, s1, MI_EX_INTR_PI_ERR
+ beqz t1, pi_errx
+ /* Mask it out */
+ andi s1, s1, MI_EX_INTR_ALL & ~MI_EX_INTR_PI_ERR
+ /* Disable the interrupt, this does not clear it.
+ * The responsibility of clearing and re-enabling
+ * the interrupt is left to the handler. */
+ li t1, MI_EX_INTR_MASK_CLR_PI_ERR
+ sw t1, PHYS_TO_K1(MI_EX_INTR_MASK_REG)
+ /* Send the event message */
+ li a0, MESG(OS_EVENT_PI_ERR)
+ jal send_mesg
+pi_errx:
+usb0:
+ /* Check for USB0 Interrupt */
+ andi t1, s1, MI_EX_INTR_USB0
+ beqz t1, usb0x
+ /* Mask it out */
+ andi s1, s1, MI_EX_INTR_ALL & ~MI_EX_INTR_USB0
+ /* Disable the interrupt, this does not clear it.
+ * The responsibility of clearing and re-enabling
+ * the interrupt is left to the handler. */
+ li t1, MI_EX_INTR_MASK_CLR_USB0
+ sw t1, PHYS_TO_K1(MI_EX_INTR_MASK_REG)
+ /* Send the event message */
+ li a0, MESG(OS_EVENT_USB0)
+ jal send_mesg
+usb0x:
+usb1:
+ /* Check for USB1 Interrupt */
+ andi t1, s1, MI_EX_INTR_USB1
+ beqz t1, usb1x
+ /* Mask it out */
+ andi s1, s1, MI_EX_INTR_ALL & ~MI_EX_INTR_USB1
+ /* Disable the interrupt, this does not clear it.
+ * The responsibility of clearing and re-enabling
+ * the interrupt is left to the handler. */
+ li t1, MI_EX_INTR_MASK_CLR_USB1
+ sw t1, PHYS_TO_K1(MI_EX_INTR_MASK_REG)
+ /* Send the event message */
+ li a0, MESG(OS_EVENT_USB1)
+ jal send_mesg
+usb1x:
+#endif
+ /* Continue */
b next_interrupt
- nop
/**
* IP3/RCP Interrupt
* Signalled by the RCP for various reasons, described below
*/
rcp:
- // Load the MI interrupts and mask with the RCP bits in the global interrupt mask
- //! @bug this clobbers the t0 register which is expected to hold the value of the
- //! C0_CAUSE register in the sw1 and sw2 handlers. If the sw1 or sw2 handler runs
- //! after this, the interrupt will not be cleared properly.
- lui $t0, %hi(__OSGlobalIntMask)
- addiu $t0, %lo(__OSGlobalIntMask)
- lw $t0, ($t0)
- lui $s1, %hi(PHYS_TO_K1(MI_INTR_REG))
- lw $s1, %lo(PHYS_TO_K1(MI_INTR_REG))($s1)
- srl $t0, $t0, RCP_IMASKSHIFT
- and $s1, $s1, $t0
+ /* Load the MI interrupts and mask with the RCP bits in the global interrupt mask */
+ /*! @bug this clobbers the t0 register which is expected to hold the value of the */
+ /*! C0_CAUSE register in the sw1 and sw2 handlers. If the sw1 or sw2 handler runs */
+ /*! after this, the interrupt will not be cleared properly. */
+ lw s1, PHYS_TO_K1(MI_INTR_REG)
+ la t0, __OSGlobalIntMask
+ lw t0, (t0)
+ srl t0, t0, RCP_IMASKSHIFT
+ and s1, s1, t0
/**
* Signal Processor (SP) Interrupt
*/
-sp:
- // Test for sp interrupt
- andi $t1, $s1, MI_INTR_SP
- beqz $t1, vi
- nop
- // Test for yielded or done signals in particular
- lui $t4, %hi(PHYS_TO_K1(SP_STATUS_REG))
- lw $t4, %lo(PHYS_TO_K1(SP_STATUS_REG))($t4)
- li $t1, (SP_CLR_INTR | SP_CLR_SIG3)
- lui $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
- andi $t4, $t4, (SP_STATUS_YIELDED | SP_STATUS_TASKDONE)
- // Mask out SP interrupt
- andi $s1, $s1, (MI_INTR_SI | MI_INTR_AI | MI_INTR_VI | MI_INTR_PI | MI_INTR_DP)
- beqz $t4, sp_other_break
- // Clear interrupt and signal 3
- sw $t1, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
- // Post an SP event message
+ /* Test for sp interrupt */
+ andi t1, s1, MI_INTR_SP
+ beqz t1, vi
+ /* Mask out SP interrupt */
+ andi s1, s1, (MI_INTR_SI | MI_INTR_AI | MI_INTR_VI | MI_INTR_PI | MI_INTR_DP)
+ lw t4, PHYS_TO_K1(SP_STATUS_REG)
+ /* Clear interrupt and signal 3 */
+ li t1, (SP_CLR_INTR | SP_CLR_SIG3)
+ sw t1, PHYS_TO_K1(SP_STATUS_REG)
+ /* Test for yielded or done signals in particular */
+ andi t4, t4, (SP_STATUS_YIELDED | SP_STATUS_TASKDONE)
+ beqz t4, sp_other_break
+ /* Post an SP event message */
+ li a0, MESG(OS_EVENT_SP)
jal send_mesg
- li $a0, OS_EVENT_SP*8
- beqz $s1, NoMoreRcpInts
- nop
- // Step over sp_other_break handler
+ beqz s1, NoMoreRcpInts
+ /* Step over sp_other_break handler */
b vi
- nop
sp_other_break:
- // An sp signal that is not due to yielding or task completion, such as
- // an sp breakpoint. Post a different event message
+ /* An sp signal that is not due to yielding or task completion, such as */
+ /* an sp breakpoint. Post a different event message */
+ li a0, MESG(OS_EVENT_SP_BREAK)
jal send_mesg
- li $a0, OS_EVENT_SP_BREAK*8
- beqz $s1, NoMoreRcpInts
- nop
+ beqz s1, NoMoreRcpInts
/**
* Video Interface (VI) Interrupt
*/
vi:
- // Test for vi interrupt
- andi $t1, $s1, MI_INTR_VI
- beqz $t1, ai
- lui $at, %hi(PHYS_TO_K1(VI_CURRENT_REG))
- // Mask out vi interrupt
- andi $s1, $s1, (MI_INTR_SP | MI_INTR_SI | MI_INTR_AI | MI_INTR_PI | MI_INTR_DP)
- // Clear interrupt
- sw $zero, %lo(PHYS_TO_K1(VI_CURRENT_REG))($at)
- // Post vi event message
+ /* Test for vi interrupt */
+ andi t1, s1, MI_INTR_VI
+ beqz t1, ai
+ /* Mask out vi interrupt */
+ andi s1, s1, (MI_INTR_SP | MI_INTR_SI | MI_INTR_AI | MI_INTR_PI | MI_INTR_DP)
+ /* Clear interrupt */
+ sw zero, PHYS_TO_K1(VI_CURRENT_REG)
+ /* Post vi event message */
+ li a0, MESG(OS_EVENT_VI)
jal send_mesg
- li $a0, OS_EVENT_VI*8
- beqz $s1, NoMoreRcpInts
- nop
+ beqz s1, NoMoreRcpInts
/**
* Audio Interface (AI) Interrupt
*/
ai:
- // Test for ai interrupt
- andi $t1, $s1, MI_INTR_AI
- beqz $t1, si
- nop
- li $t1, 1
- lui $at, %hi(PHYS_TO_K1(AI_STATUS_REG))
- // Mask out ai interrupt
- andi $s1, $s1, (MI_INTR_SP | MI_INTR_SI | MI_INTR_VI | MI_INTR_PI | MI_INTR_DP)
- // Clear interrupt
- sw $t1, %lo(PHYS_TO_K1(AI_STATUS_REG))($at)
- // Post ai event message
+ /* Test for ai interrupt */
+ andi t1, s1, MI_INTR_AI
+ beqz t1, si
+
+ /* Mask out ai interrupt */
+ andi s1, s1, (MI_INTR_SP | MI_INTR_SI | MI_INTR_VI | MI_INTR_PI | MI_INTR_DP)
+ /* Clear interrupt */
+ li t1, 1
+ sw t1, PHYS_TO_K1(AI_STATUS_REG)
+ /* Post ai event message */
+ li a0, MESG(OS_EVENT_AI)
jal send_mesg
- li $a0, OS_EVENT_AI*8
- beqz $s1, NoMoreRcpInts
- nop
+ beqz s1, NoMoreRcpInts
/**
* Serial Interface (SI) Interrupt
*/
si:
- // Test for si interrupt
- andi $t1, $s1, MI_INTR_SI
- beqz $t1, pi
- lui $at, %hi(PHYS_TO_K1(SI_STATUS_REG))
- // Mask out si interrupt
- andi $s1, $s1, (MI_INTR_SP | MI_INTR_AI | MI_INTR_VI | MI_INTR_PI | MI_INTR_DP)
- // Clear interrupt
- sw $zero, %lo(PHYS_TO_K1(SI_STATUS_REG))($at)
- // Post si event message
+ /* Test for si interrupt */
+ andi t1, s1, MI_INTR_SI
+ beqz t1, pi
+
+ /* Mask out si interrupt */
+ andi s1, s1, (MI_INTR_SP | MI_INTR_AI | MI_INTR_VI | MI_INTR_PI | MI_INTR_DP)
+ /* Clear interrupt */
+ sw zero, PHYS_TO_K1(SI_STATUS_REG)
+ /* Post si event message */
+ li a0, MESG(OS_EVENT_SI)
jal send_mesg
- li $a0, OS_EVENT_SI*8
- beqz $s1, NoMoreRcpInts
- nop
+ beqz s1, NoMoreRcpInts
/**
* Parallel Interface (PI) Interrupt
*/
pi:
- // Test for pi interrupt
- andi $t1, $s1, MI_INTR_PI
- beqz $t1, dp
- nop
-#if PLATFORM_N64
- // Clear interrupt and mask out pi interrupt
- li $t1, PI_STATUS_CLR_INTR
- lui $at, %hi(PHYS_TO_K1(PI_STATUS_REG))
- andi $s1, $s1, (MI_INTR_SP | MI_INTR_SI | MI_INTR_AI | MI_INTR_VI | MI_INTR_DP)
- sw $t1, %lo(PHYS_TO_K1(PI_STATUS_REG))($at)
-#else
- // Clear interrupt
- li $t1, PI_STATUS_CLR_INTR
- lui $at, %hi(PHYS_TO_K1(PI_STATUS_REG))
- sw $t1, %lo(PHYS_TO_K1(PI_STATUS_REG))($at)
- // Load pi callback
- lui $t1, %hi(__osPiIntTable)
- addiu $t1, %lo(__osPiIntTable)
- lw $t2, HWINT_CALLBACK($t1)
- // Mask out pi interrupt
- andi $s1, $s1, (MI_INTR_SP | MI_INTR_SI | MI_INTR_AI | MI_INTR_VI | MI_INTR_DP)
- // Skip callback if NULL
- beqz $t2, no_pi_callback
- nop
- // Set up a stack and run the callback
- lw $sp, HWINT_SP($t1)
- jalr $t2
- move $a0, $v0
- // If the callback returns non-zero, don't post a pi event message
- bnez $v0, skip_pi_mesg
- nop
+ /* Test for pi interrupt */
+ andi t1, s1, MI_INTR_PI
+ beqz t1, dp
+
+ /* Mask out pi interrupt */
+ andi s1, s1, (MI_INTR_SP | MI_INTR_SI | MI_INTR_AI | MI_INTR_VI | MI_INTR_DP)
+ /* Clear the interrupt */
+ li t1, PI_STATUS_CLR_INTR
+ sw t1, PHYS_TO_K1(PI_STATUS_REG)
+#if LIBULTRA_VERSION >= LIBULTRA_VERSION_J
+ /* Load pi callback */
+ la t1, __osPiIntTable
+ lw t2, HWINT_CALLBACK(t1)
+ /* Skip callback if NULL */
+ beqz t2, no_pi_callback
+ /* Set up a stack and run the callback */
+ lw sp, HWINT_SP(t1)
+ move a0, v0
+ jalr t2
+ /* If the callback returns non-zero, don't post a pi event message */
+ bnez v0, skip_pi_mesg
#endif
no_pi_callback:
- // Post pi event message
+ /* Post pi event message */
+ li a0, MESG(OS_EVENT_PI)
jal send_mesg
- li $a0, OS_EVENT_PI*8
skip_pi_mesg:
- beqz $s1, NoMoreRcpInts
- nop
+ beqz s1, NoMoreRcpInts
/**
* Display Processor (DP) Interrupt
*/
dp:
- // Test for dp interrupt
- andi $t1, $s1, MI_INTR_DP
- beqz $t1, NoMoreRcpInts
- nop
- // Clear dp interrupt
- li $t1, MI_CLR_DP_INTR
- lui $at, %hi(PHYS_TO_K1(MI_INIT_MODE_REG))
- // Mask out dp interrupt
- andi $s1, $s1, (MI_INTR_SP | MI_INTR_SI | MI_INTR_AI | MI_INTR_VI | MI_INTR_PI)
- sw $t1, %lo(PHYS_TO_K1(MI_INIT_MODE_REG))($at)
- // Post dp event message
+ /* Test for dp interrupt */
+ andi t1, s1, MI_INTR_DP
+ beqz t1, NoMoreRcpInts
+
+ /* Mask out dp interrupt */
+ andi s1, s1, (MI_INTR_SP | MI_INTR_SI | MI_INTR_AI | MI_INTR_VI | MI_INTR_PI)
+ /* Clear dp interrupt */
+ li t1, MI_CLR_DP_INTR
+ sw t1, PHYS_TO_K1(MI_INIT_MODE_REG)
+ /* Post dp event message */
+ li a0, MESG(OS_EVENT_DP)
jal send_mesg
- li $a0, OS_EVENT_DP*8
NoMoreRcpInts:
- // Mask out interrupt and continue
- li $at, ~CAUSE_IP3
+ /* Mask out interrupt and continue */
+ and s0, s0, ~CAUSE_IP3
b next_interrupt
- and $s0, $s0, $at
/**
* IP5/PreNMI Interrupt
* Reset button has been pressed
*/
prenmi:
- // Disable IP5/PreNMI interrupt for the previously running thread
- lw $k1, THREAD_SR($k0)
- li $at, ~SR_IBIT5
- lui $t1, %hi(__osShutdown)
- and $k1, $k1, $at
- sw $k1, THREAD_SR($k0)
- addiu $t1, %lo(__osShutdown)
- // Test __osShutdown for first PreNMI event
- lw $t2, ($t1)
- beqz $t2, firstnmi
- li $at, ~CAUSE_IP5
- // Mask out interrupt and redispatch immediately
+ /* Disable IP5/PreNMI interrupt for the previously running thread */
+ lw k1, THREAD_SR(k0)
+ and k1, k1, ~SR_IBIT5
+ sw k1, THREAD_SR(k0)
+ /* Test __osShutdown for first PreNMI event */
+ la t1, __osShutdown
+ lw t2, (t1)
+ beqz t2, firstnmi
+ /* Mask out interrupt and redispatch immediately */
+ and s0, s0, ~CAUSE_IP5
b redispatch
- and $s0, $s0, $at
firstnmi:
- // Set __osShutdown
- li $t2, 1
- sw $t2, ($t1)
- // Post a PreNMI event message
+ /* Set __osShutdown */
+ li t2, 1
+ sw t2, (t1)
+ /* Post a PreNMI event message */
+ li a0, MESG(OS_EVENT_PRENMI)
jal send_mesg
- li $a0, OS_EVENT_PRENMI*8
- // Mask out and disable IP5/PreNMI interrupt for the highest priority thread
- lui $t2, %hi(__osRunQueue)
- lw $t2, %lo(__osRunQueue)($t2)
- li $at, ~SR_IBIT5
- and $s0, $s0, $at
- lw $k1, THREAD_SR($t2)
- and $k1, $k1, $at
- // Redispatch immediately
+ /* Mask out and disable IP5/PreNMI interrupt for the highest priority thread */
+ and s0, s0, ~SR_IBIT5
+ lw t2, __osRunQueue
+ lw k1, THREAD_SR(t2)
+ and k1, k1, ~SR_IBIT5
+ sw k1, THREAD_SR(t2)
+ /* Redispatch immediately */
b redispatch
- sw $k1, THREAD_SR($t2)
sw2:
- // Mask out interrupt
- li $at, ~CAUSE_SW2
- and $t0, $t0, $at
- mtc0 $t0, C0_CAUSE
- // Post sw2 event message
+ /* Mask out interrupt */
+ and t0, t0, ~CAUSE_SW2
+ MTC0( t0, C0_CAUSE)
+ /* Post sw2 event message */
+ li a0, MESG(OS_EVENT_SW2)
jal send_mesg
- li $a0, OS_EVENT_SW2*8
- li $at, ~CAUSE_SW2
- // Mask out interrupt and continue
+ /* Mask out interrupt and continue */
+ and s0, s0, ~CAUSE_SW2
b next_interrupt
- and $s0, $s0, $at
sw1:
- // Mask out interrupt
- li $at, ~CAUSE_SW1
- and $t0, $t0, $at
- mtc0 $t0, C0_CAUSE
- // Post sw1 event message
+ /* Mask out interrupt */
+ and t0, t0, ~CAUSE_SW1
+ MTC0( t0, C0_CAUSE)
+ /* Post sw1 event message */
+ li a0, MESG(OS_EVENT_SW1)
jal send_mesg
- li $a0, OS_EVENT_SW1*8
- li $at, ~CAUSE_SW1
- // Mask out interrupt and continue
+ /* Mask out interrupt and continue */
+ and s0, s0, ~CAUSE_SW1
b next_interrupt
- and $s0, $s0, $at
handle_break:
- // Set last thread as having hit a break exception
- li $t1, OS_FLAG_CPU_BREAK
- sh $t1, THREAD_FLAGS($k0)
- // Post a cpu break event message
+ /* Set last thread as having hit a break exception */
+ li t1, OS_FLAG_CPU_BREAK
+ sh t1, THREAD_FLAGS(k0)
+ /* Post a cpu break event message */
+ li a0, MESG(OS_EVENT_CPU_BREAK)
jal send_mesg
- li $a0, OS_EVENT_CPU_BREAK*8
- // Redispatch
+ /* Redispatch */
b redispatch
- nop
redispatch:
- lui $t2, %hi(__osRunQueue)
- lw $t2, %lo(__osRunQueue)($t2)
- // Get priority of previously running thread
- lw $t1, THREAD_PRI($k0)
- // Get highest priority from waiting threads
- lw $t3, THREAD_PRI($t2)
- slt $at, $t1, $t3
- beqz $at, enqueueRunning
- nop
- // The previously running thread is no longer the highest priority,
- // enqueue it to the run queue to wait its turn again
- lui $a0, %hi(__osRunQueue)
- move $a1, $k0
+ /* Get priority of previously running thread */
+ lw t1, THREAD_PRI(k0)
+ lw t2, __osRunQueue
+ /* Get highest priority from waiting threads */
+ lw t3, THREAD_PRI(t2)
+ bge t1, t3, enqueueRunning
+ /* The previously running thread is no longer the highest priority, */
+ /* enqueue it to the run queue to wait its turn again */
+ move a1, k0
+ la a0, __osRunQueue
jal __osEnqueueThread
- addiu $a0, $a0, %lo(__osRunQueue)
+
j __osDispatchThread
- nop
/**
* Resume the previously running thread by placing it at the top of
* the run queue and dispatching it
*/
enqueueRunning:
- lui $t1, %hi(__osRunQueue)
- addiu $t1, $t1, %lo(__osRunQueue)
- lw $t2, ($t1)
- sw $t2, THREAD_NEXT($k0)
+ la t1, __osRunQueue
+ lw t2, (t1)
+ sw t2, THREAD_NEXT(k0)
+ sw k0, (t1)
j __osDispatchThread
- sw $k0, ($t1)
/**
* Unhandled exceptions & interrupts end up here,
* trap to software by posting a fault message
*/
panic:
- // Mark the thread as having faulted
- lui $at, %hi(__osFaultedThread)
- sw $k0, %lo(__osFaultedThread)($at)
- li $t1, OS_STATE_STOPPED
- sh $t1, THREAD_STATE($k0)
- li $t1, OS_FLAG_FAULT
- sh $t1, THREAD_FLAGS($k0)
- // Save C0_BADVADDR
- mfc0 $t2, C0_BADVADDR
- sw $t2, THREAD_BADVADDR($k0)
- // Post the fault message
+ /* Mark the thread as having faulted */
+ sw k0, __osFaultedThread
+ li t1, OS_STATE_STOPPED
+ sh t1, THREAD_STATE(k0)
+ li t1, OS_FLAG_FAULT
+ sh t1, THREAD_FLAGS(k0)
+ /* Save C0_BADVADDR */
+ MFC0( t2, C0_BADVADDR)
+ sw t2, THREAD_BADVADDR(k0)
+ /* Post the fault message */
+ li a0, MESG(OS_EVENT_FAULT)
jal send_mesg
- li $a0, OS_EVENT_FAULT*8
- // Dispatch next thread
+ /* Dispatch next thread */
j __osDispatchThread
- nop
/**
* Handles posting event messages to the listening message queue, if there is one
*/
send_mesg:
- // Load pointer to listening message queue
- lui $t2, %hi(__osEventStateTab)
- addiu $t2, %lo(__osEventStateTab)
- addu $t2, $t2, $a0
- lw $t1, ($t2)
- // Save return address
- move $s2, $ra
- // If there is no listening message queue, done
- beqz $t1, send_done
- nop
- // Test if the message queue is full, if so don't post the message
- lw $t3, MQ_VALIDCOUNT($t1)
- lw $t4, MQ_MSGCOUNT($t1)
- slt $at, $t3, $t4
- beqz $at, send_done
- nop
- // Add validcount to first and modulo with msgcount
- lw $t5, MQ_FIRST($t1)
- addu $t5, $t5, $t3
- // Modulo
- div $zero, $t5, $t4
- bnez $t4, 1f
- nop
- break 7 // div0
-1:
- li $at, -1
- bne $t4, $at, 2f
- li $at, -0x80000000
- bne $t5, $at, 2f
- nop
- break 6 // overflow
-2:
- // End Modulo
- lw $t4, MQ_MSG($t1)
- mfhi $t5
- sll $t5, $t5, 2
- addu $t4, $t4, $t5
- // Fetch the message to post
- lw $t5, 4($t2)
- addiu $t2, $t3, 1
- // Post the message to the message queue
- sw $t5, ($t4)
- // Increment the validCount
- sw $t2, MQ_VALIDCOUNT($t1)
- // If there was a thread blocked on this message queue,
- // wake it up
- lw $t2, MQ_MTQUEUE($t1)
- lw $t3, ($t2)
- beqz $t3, send_done
- nop
+ /* Save return address */
+ move s2, ra
+ /* Load pointer to listening message queue */
+ la t2, __osEventStateTab
+ addu t2, t2, a0
+ lw t1, (t2)
+ /* If there is no listening message queue, done */
+ beqz t1, send_done
+
+ /* Test if the message queue is full, if so don't post the message */
+ lw t3, MQ_VALIDCOUNT(t1)
+ lw t4, MQ_MSGCOUNT(t1)
+ bge t3, t4, send_done
+
+ /* Add validcount to first and modulo with msgcount */
+ lw t5, MQ_FIRST(t1)
+ addu t5, t5, t3
+ rem t5, t5, t4
+ lw t4, MQ_MSG(t1)
+ mul t5, t5, 4
+ addu t4, t4, t5
+ /* Post the message to the message queue */
+ lw t5, 4(t2)
+ sw t5, (t4)
+ /* Increment the validCount */
+ addiu t2, t3, 1
+ sw t2, MQ_VALIDCOUNT(t1)
+ /* If there was a thread blocked on this message queue, */
+ /* wake it up */
+ lw t2, MQ_MTQUEUE(t1)
+ lw t3, (t2)
+ beqz t3, send_done
+ move a0, t1
jal __osPopThread
- move $a0, $t1
- move $t2, $v0
- lui $a0, %hi(__osRunQueue)
- move $a1, $t2
+ move t2, v0
+ move a1, t2
+ la a0, __osRunQueue
jal __osEnqueueThread
- addiu $a0, %lo(__osRunQueue)
send_done:
- jr $s2
- nop
+ jr s2
/**
* Handle coprocessor unusable exception
*/
handle_CpU:
- li $at, CAUSE_CEMASK
- and $t1, $t0, $at
- srl $t1, $t1, CAUSE_CESHIFT
- li $t2, 1 // if not coprocessor 1, panic
- bne $t1, $t2, panic
- nop
- // Mark cop1 as usable for previous thread
- lw $k1, THREAD_SR($k0)
- li $at, SR_CU1
- li $t1, 1
- or $k1, $k1, $at
- sw $t1, THREAD_FP($k0)
+ and t1, t0, CAUSE_CEMASK
+ srl t1, t1, CAUSE_CESHIFT
+ li t2, 1 /* if not coprocessor 1, panic */
+ bne t1, t2, panic
+ /* Mark cop1 as usable for previous thread */
+ li t1, 1
+ sw t1, THREAD_FP(k0)
+ lw k1, THREAD_SR(k0)
+ or k1, k1, SR_CU1
+ sw k1, THREAD_SR(k0)
b enqueueRunning
- sw $k1, THREAD_SR($k0)
END(__osException)
/**
@@ -730,83 +752,71 @@ END(__osException)
* unblocked runnable thread.
*/
LEAF(__osEnqueueAndYield)
- lui $a1, %hi(__osRunningThread)
- lw $a1, %lo(__osRunningThread)($a1)
- // Save SR
- mfc0 $t0, C0_SR
- lw $k1, THREAD_FP($a1)
- ori $t0, $t0, SR_EXL
- sw $t0, THREAD_SR($a1)
- // Save callee-saved registers
- sd $s0, THREAD_S0($a1)
- sd $s1, THREAD_S1($a1)
- sd $s2, THREAD_S2($a1)
- sd $s3, THREAD_S3($a1)
- sd $s4, THREAD_S4($a1)
- sd $s5, THREAD_S5($a1)
- sd $s6, THREAD_S6($a1)
- sd $s7, THREAD_S7($a1)
- sd $gp, THREAD_GP($a1)
- sd $sp, THREAD_SP($a1)
- sd $fp, THREAD_S8($a1)
- sd $ra, THREAD_RA($a1)
- // Save FPU callee-saved registers if the current thread has used the FPU
- beqz $k1, 1f
- sw $ra, THREAD_PC($a1)
- cfc1 $k1, C1_FPCSR
- sdc1 $f20, THREAD_FP20($a1)
- sdc1 $f22, THREAD_FP22($a1)
- sdc1 $f24, THREAD_FP24($a1)
- sdc1 $f26, THREAD_FP26($a1)
- sdc1 $f28, THREAD_FP28($a1)
- sdc1 $f30, THREAD_FP30($a1)
- sw $k1, THREAD_FPCSR($a1)
+ lw a1, __osRunningThread
+ /* Save SR */
+ MFC0( t0, C0_SR)
+ ori t0, t0, SR_EXL
+ sw t0, THREAD_SR(a1)
+ /* Save callee-saved registers */
+ sd s0, THREAD_S0(a1)
+ sd s1, THREAD_S1(a1)
+ sd s2, THREAD_S2(a1)
+ sd s3, THREAD_S3(a1)
+ sd s4, THREAD_S4(a1)
+ sd s5, THREAD_S5(a1)
+ sd s6, THREAD_S6(a1)
+ sd s7, THREAD_S7(a1)
+ sd gp, THREAD_GP(a1)
+ sd sp, THREAD_SP(a1)
+ sd fp, THREAD_S8(a1)
+ sd ra, THREAD_RA(a1)
+ sw ra, THREAD_PC(a1)
+ /* Save FPU callee-saved registers if the current thread has used the FPU */
+ lw k1, THREAD_FP(a1)
+ beqz k1, 1f
+ cfc1 k1, C1_FPCSR
+ sw k1, THREAD_FPCSR(a1)
+ sdc1 $f20, THREAD_FP20(a1)
+ sdc1 $f22, THREAD_FP22(a1)
+ sdc1 $f24, THREAD_FP24(a1)
+ sdc1 $f26, THREAD_FP26(a1)
+ sdc1 $f28, THREAD_FP28(a1)
+ sdc1 $f30, THREAD_FP30(a1)
1:
- lw $k1, THREAD_SR($a1)
- andi $t1, $k1, SR_IMASK
- beqz $t1, 2f
- nop
- // This code does the same thing as the block just above the `savercp` label.
- // See the comment there for more about this.
- lui $t0, %hi(__OSGlobalIntMask)
- addiu $t0, %lo(__OSGlobalIntMask)
- lw $t0, ($t0)
- li $at, ~0
- xor $t0, $t0, $at
- lui $at, ((~SR_IMASK) >> 0x10) & 0xFFFF
- andi $t0, $t0, SR_IMASK
- ori $at, (~SR_IMASK) & 0xFFFF
- or $t1, $t1, $t0
- and $k1, $k1, $at
- or $k1, $k1, $t1
- sw $k1, THREAD_SR($a1)
+ lw k1, THREAD_SR(a1)
+ andi t1, k1, SR_IMASK
+ beqz t1, 2f
+ /* This code does the same thing as the block just above the `savercp` label. */
+ /* See the comment there for more about this. */
+ la t0, __OSGlobalIntMask
+ lw t0, (t0)
+ xor t0, t0, 0xFFFFFFFF
+ andi t0, t0, SR_IMASK
+ or t1, t1, t0
+ and k1, k1, ~SR_IMASK
+ or k1, k1, t1
+ sw k1, THREAD_SR(a1)
2:
- lui $k1, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
- lw $k1, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($k1)
- beqz $k1, 3f
- nop
- // This code does the same thing as the block just below the `savercp` label.
- // See the comment there for more about this.
- lui $k0, %hi(__OSGlobalIntMask)
- addiu $k0, %lo(__OSGlobalIntMask)
- lw $k0, ($k0)
- lw $t0, THREAD_RCP($a1)
- li $at, ~0
- srl $k0, $k0, RCP_IMASKSHIFT
- xor $k0, $k0, $at
- andi $k0, $k0, (RCP_IMASK >> RCP_IMASKSHIFT)
- and $k0, $k0, $t0
- or $k1, $k1, $k0
+ lw k1, PHYS_TO_K1(MI_INTR_MASK_REG)
+ beqz k1, 3f
+ /* This code does the same thing as the block just below the `savercp` label. */
+ /* See the comment there for more about this. */
+ la k0, __OSGlobalIntMask
+ lw k0, (k0)
+ srl k0, k0, RCP_IMASKSHIFT
+ xor k0, k0, 0xFFFFFFFF
+ andi k0, k0, (RCP_IMASK >> RCP_IMASKSHIFT)
+ lw t0, THREAD_RCP(a1)
+ and k0, k0, t0
+ or k1, k1, k0
3:
- // If the specified thread queue is null, skip
- // straight to dispatching
- beqz $a0, no_enqueue
- sw $k1, THREAD_RCP($a1)
+ /* If the specified thread queue is null, skip */
+ /* straight to dispatching */
+ sw k1, THREAD_RCP(a1)
+ beqz a0, no_enqueue
jal __osEnqueueThread
- nop
no_enqueue:
j __osDispatchThread
- nop
END(__osEnqueueAndYield)
/**
@@ -815,31 +825,27 @@ END(__osEnqueueAndYield)
* Enqueues `thread` to the thread queue `threadQueue`, inserted by priority
*/
LEAF(__osEnqueueThread)
- lw $t8, ($a0)
- lw $t7, THREAD_PRI($a1)
- move $t9, $a0
- lw $t6, THREAD_PRI($t8)
- slt $at, $t6, $t7
- // If the current highest priority thread is a lower priority than
- // the new thread, skip searching the queue
- bnez $at, 2f
- nop
+ move t9, a0
+ lw t8, (a0)
+ lw t7, THREAD_PRI(a1)
+ lw t6, THREAD_PRI(t8)
+ /* If the current highest priority thread is a lower priority than */
+ /* the new thread, skip searching the queue */
+ blt t6, t7, 2f
1:
- // Search the queue for the position to insert the thread to maintain
- // ordering by priority
- move $t9, $t8
- lw $t8, THREAD_NEXT($t8)
- lw $t6, THREAD_PRI($t8)
- slt $at, $t6, $t7
- beqz $at, 1b
- nop
+ /* Search the queue for the position to insert the thread to maintain */
+ /* ordering by priority */
+ move t9, t8
+ lw t8, THREAD_NEXT(t8)
+ lw t6, THREAD_PRI(t8)
+ bge t6, t7, 1b
2:
- // Insert the thread into the queue
- lw $t8, ($t9)
- sw $t8, THREAD_NEXT($a1)
- sw $a1, ($t9)
- jr $ra
- sw $a0, THREAD_QUEUE($a1)
+ /* Insert the thread into the queue */
+ lw t8, (t9)
+ sw t8, THREAD_NEXT(a1)
+ sw a1, (t9)
+ sw a0, THREAD_QUEUE(a1)
+ jr ra
END(__osEnqueueThread)
/**
@@ -849,16 +855,15 @@ END(__osEnqueueThread)
* thread queue `threadQueue` and returns it
*/
LEAF(__osPopThread)
- lw $v0, ($a0)
- lw $t9, THREAD_NEXT($v0)
- jr $ra
- sw $t9, ($a0)
+ lw v0, (a0)
+ lw t9, THREAD_NEXT(v0)
+ sw t9, (a0)
+ jr ra
END(__osPopThread)
-#if !PLATFORM_N64
+#if LIBULTRA_VERSION >= LIBULTRA_VERSION_K
LEAF(__osNop)
- jr $ra
- nop
+ jr ra
END(__osNop)
#endif
@@ -868,113 +873,111 @@ END(__osNop)
* Dispatches the next thread to run after restoring the context
*/
LEAF(__osDispatchThread)
- // Obtain highest priority thread from the active run queue
- lui $a0, %hi(__osRunQueue)
+ /* Obtain highest priority thread from the active run queue */
+ la a0, __osRunQueue
jal __osPopThread
- addiu $a0, $a0, %lo(__osRunQueue)
- // Set thread as running
- lui $at, %hi(__osRunningThread)
- sw $v0, %lo(__osRunningThread)($at)
- li $t0, OS_STATE_RUNNING
- sh $t0, THREAD_STATE($v0)
- // Restore SR, masking out any interrupts that are not also
- // enabled in the global interrupt mask
- move $k0, $v0
- lui $t0, %hi(__OSGlobalIntMask)
- lw $k1, THREAD_SR($k0)
- addiu $t0, %lo(__OSGlobalIntMask)
- lw $t0, ($t0)
- lui $at, ((~SR_IMASK) >> 0x10) & 0xFFFF
- andi $t1, $k1, SR_IMASK
- ori $at, (~SR_IMASK) & 0xFFFF
- andi $t0, $t0, SR_IMASK
- and $t1, $t1, $t0
- and $k1, $k1, $at
- or $k1, $k1, $t1
- mtc0 $k1, C0_SR
- // Restore GPRs
- ld $k1, THREAD_LO($k0)
- ld $at, THREAD_AT($k0)
- ld $v0, THREAD_V0($k0)
- mtlo $k1
- ld $k1, THREAD_HI($k0)
- ld $v1, THREAD_V1($k0)
- ld $a0, THREAD_A0($k0)
- ld $a1, THREAD_A1($k0)
- ld $a2, THREAD_A2($k0)
- ld $a3, THREAD_A3($k0)
- ld $t0, THREAD_T0($k0)
- ld $t1, THREAD_T1($k0)
- ld $t2, THREAD_T2($k0)
- ld $t3, THREAD_T3($k0)
- ld $t4, THREAD_T4($k0)
- ld $t5, THREAD_T5($k0)
- ld $t6, THREAD_T6($k0)
- ld $t7, THREAD_T7($k0)
- ld $s0, THREAD_S0($k0)
- ld $s1, THREAD_S1($k0)
- ld $s2, THREAD_S2($k0)
- ld $s3, THREAD_S3($k0)
- ld $s4, THREAD_S4($k0)
- ld $s5, THREAD_S5($k0)
- ld $s6, THREAD_S6($k0)
- ld $s7, THREAD_S7($k0)
- ld $t8, THREAD_T8($k0)
- ld $t9, THREAD_T9($k0)
- ld $gp, THREAD_GP($k0)
- mthi $k1
- ld $sp, THREAD_SP($k0)
- ld $fp, THREAD_S8($k0)
- ld $ra, THREAD_RA($k0)
- // Move thread pc to EPC so that eret will return execution to where the thread left off
- lw $k1, THREAD_PC($k0)
- mtc0 $k1, C0_EPC
- // Check if the FPU was used by this thread and if so also restore the FPU registers
- lw $k1, THREAD_FP($k0)
- beqz $k1, 1f
- nop
- lw $k1, THREAD_FPCSR($k0)
- ctc1 $k1, C1_FPCSR
- ldc1 $f0, THREAD_FP0($k0)
- ldc1 $f2, THREAD_FP2($k0)
- ldc1 $f4, THREAD_FP4($k0)
- ldc1 $f6, THREAD_FP6($k0)
- ldc1 $f8, THREAD_FP8($k0)
- ldc1 $f10, THREAD_FP10($k0)
- ldc1 $f12, THREAD_FP12($k0)
- ldc1 $f14, THREAD_FP14($k0)
- ldc1 $f16, THREAD_FP16($k0)
- ldc1 $f18, THREAD_FP18($k0)
- ldc1 $f20, THREAD_FP20($k0)
- ldc1 $f22, THREAD_FP22($k0)
- ldc1 $f24, THREAD_FP24($k0)
- ldc1 $f26, THREAD_FP26($k0)
- ldc1 $f28, THREAD_FP28($k0)
- ldc1 $f30, THREAD_FP30($k0)
+ /* Set thread as running */
+ sw v0, __osRunningThread
+ li t0, OS_STATE_RUNNING
+ sh t0, THREAD_STATE(v0)
+ /* Restore SR, masking out any interrupts that are not also */
+ /* enabled in the global interrupt mask */
+ move k0, v0
+ lw k1, THREAD_SR(k0)
+ la t0, __OSGlobalIntMask
+ lw t0, (t0)
+ andi t0, t0, SR_IMASK
+ andi t1, k1, SR_IMASK
+ and t1, t1, t0
+ and k1, k1, ~SR_IMASK
+ or k1, k1, t1
+ MTC0( k1, C0_SR)
+ /* Restore GPRs */
+.set noat
+ ld AT, THREAD_AT(k0)
+ ld v0, THREAD_V0(k0)
+ ld v1, THREAD_V1(k0)
+ ld a0, THREAD_A0(k0)
+ ld a1, THREAD_A1(k0)
+ ld a2, THREAD_A2(k0)
+ ld a3, THREAD_A3(k0)
+ ld t0, THREAD_T0(k0)
+ ld t1, THREAD_T1(k0)
+ ld t2, THREAD_T2(k0)
+ ld t3, THREAD_T3(k0)
+ ld t4, THREAD_T4(k0)
+ ld t5, THREAD_T5(k0)
+ ld t6, THREAD_T6(k0)
+ ld t7, THREAD_T7(k0)
+ ld s0, THREAD_S0(k0)
+ ld s1, THREAD_S1(k0)
+ ld s2, THREAD_S2(k0)
+ ld s3, THREAD_S3(k0)
+ ld s4, THREAD_S4(k0)
+ ld s5, THREAD_S5(k0)
+ ld s6, THREAD_S6(k0)
+ ld s7, THREAD_S7(k0)
+ ld t8, THREAD_T8(k0)
+ ld t9, THREAD_T9(k0)
+ ld gp, THREAD_GP(k0)
+ ld sp, THREAD_SP(k0)
+ ld fp, THREAD_S8(k0)
+ ld ra, THREAD_RA(k0)
+ ld k1, THREAD_LO(k0)
+ mtlo k1
+ ld k1, THREAD_HI(k0)
+ mthi k1
+ /* Move thread pc to EPC so that eret will return execution to where the thread left off */
+ lw k1, THREAD_PC(k0)
+ MTC0( k1, C0_EPC)
+ /* Check if the FPU was used by this thread and if so also restore the FPU registers */
+ lw k1, THREAD_FP(k0)
+ beqz k1, 1f
+
+.set noreorder
+ lw k1, THREAD_FPCSR(k0)
+ ctc1 k1, C1_FPCSR
+.set reorder
+ ldc1 $f0, THREAD_FP0(k0)
+ ldc1 $f2, THREAD_FP2(k0)
+ ldc1 $f4, THREAD_FP4(k0)
+ ldc1 $f6, THREAD_FP6(k0)
+ ldc1 $f8, THREAD_FP8(k0)
+ ldc1 $f10, THREAD_FP10(k0)
+ ldc1 $f12, THREAD_FP12(k0)
+ ldc1 $f14, THREAD_FP14(k0)
+ ldc1 $f16, THREAD_FP16(k0)
+ ldc1 $f18, THREAD_FP18(k0)
+ ldc1 $f20, THREAD_FP20(k0)
+ ldc1 $f22, THREAD_FP22(k0)
+ ldc1 $f24, THREAD_FP24(k0)
+ ldc1 $f26, THREAD_FP26(k0)
+ ldc1 $f28, THREAD_FP28(k0)
+ ldc1 $f30, THREAD_FP30(k0)
1:
- // Restore RCP interrupt mask, masking out any RCP interrupts that
- // are not also enabled in the global interrupt mask
- lw $k1, THREAD_RCP($k0)
- lui $k0, %hi(__OSGlobalIntMask)
- addiu $k0, %lo(__OSGlobalIntMask)
- lw $k0, ($k0)
- srl $k0, $k0, RCP_IMASKSHIFT
- and $k1, $k1, $k0
- sll $k1, $k1, 1
- lui $k0, %hi(__osRcpImTable)
- addiu $k0, %lo(__osRcpImTable)
- addu $k1, $k1, $k0
- lhu $k1, ($k1)
- lui $k0, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
- addiu $k0, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))
- sw $k1, ($k0)
- // Empty pipeline
+ /* Restore RCP interrupt mask, masking out any RCP interrupts that */
+ /* are not also enabled in the global interrupt mask */
+.set noreorder
+ lw k1, THREAD_RCP(k0)
+ la k0, __OSGlobalIntMask
+ lw k0, (k0)
+ srl k0, k0, RCP_IMASKSHIFT
+ and k1, k1, k0
+ sll k1, k1, 1
+ la k0, __osRcpImTable
+ addu k1, k1, k0
+ lhu k1, (k1)
+ la k0, PHYS_TO_K1(MI_INTR_MASK_REG)
+ sw k1, (k0)
+ /* Empty pipeline */
nop
nop
nop
nop
- // Resume thread execution
+ /* Resume thread execution */
eret
+.set reorder
+.set at
END(__osDispatchThread)
/**
@@ -985,7 +988,7 @@ END(__osDispatchThread)
* current thread to be destroyed.
*/
LEAF(__osCleanupThread)
+ move a0, zero
jal osDestroyThread
- move $a0, $zero
- // Despite being a jal, this function does not return as the thread will have been destroyed
+ /* Despite being a jal, this function does not return as the thread will have been destroyed */
END(__osCleanupThread)
diff --git a/src/libultra/os/getactivequeue.c b/src/libultra/os/getactivequeue.c
index de55d7f041..633e01814a 100644
--- a/src/libultra/os/getactivequeue.c
+++ b/src/libultra/os/getactivequeue.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
OSThread* __osGetActiveQueue(void) {
return __osActiveQueue;
diff --git a/src/libultra/os/getcause.s b/src/libultra/os/getcause.s
index a621e97363..b59c5c6801 100644
--- a/src/libultra/os/getcause.s
+++ b/src/libultra/os/getcause.s
@@ -1,14 +1,10 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(__osGetCause)
- mfc0 $v0, C0_CAUSE
- jr $ra
- nop
+ MFC0( v0, C0_CAUSE)
+ jr ra
END(__osGetCause)
diff --git a/src/libultra/os/getcount.s b/src/libultra/os/getcount.s
index 242c9da692..84552adb00 100644
--- a/src/libultra/os/getcount.s
+++ b/src/libultra/os/getcount.s
@@ -1,14 +1,10 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(osGetCount)
- mfc0 $v0, C0_COUNT
- jr $ra
- nop
+ MFC0( v0, C0_COUNT)
+ jr ra
END(osGetCount)
diff --git a/src/libultra/os/getcurrfaultedthread.c b/src/libultra/os/getcurrfaultedthread.c
index f36799b26f..bf2edb92d3 100644
--- a/src/libultra/os/getcurrfaultedthread.c
+++ b/src/libultra/os/getcurrfaultedthread.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
OSThread* __osGetCurrFaultedThread(void) {
return __osFaultedThread;
diff --git a/src/libultra/os/getfpccsr.s b/src/libultra/os/getfpccsr.s
index 93d4e51b8e..37c0e8c3b2 100644
--- a/src/libultra/os/getfpccsr.s
+++ b/src/libultra/os/getfpccsr.s
@@ -1,14 +1,10 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(__osGetFpcCsr)
- cfc1 $v0, C1_FPCSR
- jr $ra
- nop
+ CFC1( v0, C1_FPCSR)
+ jr ra
END(__osGetFpcCsr)
diff --git a/src/libultra/os/gethwintrroutine.c b/src/libultra/os/gethwintrroutine.c
index d7d8897803..64044e66d3 100644
--- a/src/libultra/os/gethwintrroutine.c
+++ b/src/libultra/os/gethwintrroutine.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/internal.h"
void __osGetHWIntrRoutine(OSHWIntr intr, s32 (**callbackOut)(void), void** spOut) {
diff --git a/src/libultra/os/getintmask.s b/src/libultra/os/getintmask.s
index 2c6ddc86ed..f734103938 100644
--- a/src/libultra/os/getintmask.s
+++ b/src/libultra/os/getintmask.s
@@ -1,14 +1,10 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
#include "ultra64/rcp.h"
#include "ultra64/exception.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
/**
* OSIntMask osGetIntMask(void);
@@ -23,38 +19,35 @@
* See the comment for osSetIntMask for more details.
*/
LEAF(osGetIntMask)
- // Extract interrupt enable bits from current SR
- mfc0 $v0, C0_SR
- andi $v0, $v0, (SR_IMASK | SR_IE)
- // Get value of __OSGlobalIntMask
- lui $t0, %hi(__OSGlobalIntMask)
- addiu $t0, %lo(__OSGlobalIntMask)
- lw $t1, 0($t0)
- // Bitwise-OR in the disabled CPU bits of __OSGlobalIntMask
- li $at, ~0
- xor $t0, $t1, $at
- andi $t0, $t0, SR_IMASK
- or $v0, $v0, $t0
- // Fetch MI_INTR_MASK_REG
- lui $t1, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
- lw $t1, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($t1)
- // If there are RCP interrupts masked
- beqz $t1, 1f
- // Get value of __OSGlobalIntMask
- lui $t0, %hi(__OSGlobalIntMask)
- addiu $t0, %lo(__OSGlobalIntMask)
- lw $t0, 0($t0)
- // Bitwise-OR in the disabled RCP bits of __OSGlobalIntMask
- srl $t0, $t0, RCP_IMASKSHIFT
- li $at, ~0
- xor $t0, $t0, $at
- andi $t0, $t0, (RCP_IMASK >> RCP_IMASKSHIFT)
- or $t1, $t1, $t0
+.set noreorder
+ /* Extract interrupt enable bits from current SR */
+ mfc0 v0, C0_SR
+ andi v0, v0, (SR_IMASK | SR_IE)
+ /* Get value of __OSGlobalIntMask */
+ la t0, __OSGlobalIntMask
+ lw t1, (t0)
+ /* Bitwise-OR in the disabled CPU bits of __OSGlobalIntMask */
+ xor t0, t1, ~0
+ andi t0, t0, SR_IMASK
+ or v0, v0, t0
+ /* Fetch MI_INTR_MASK_REG */
+ lw t1, PHYS_TO_K1(MI_INTR_MASK_REG)
+ /* If there are RCP interrupts masked */
+ beqz t1, 1f
+ /* Get value of __OSGlobalIntMask */
+ la t0, __OSGlobalIntMask /* Note: macro expansion in delay slot */
+ lw t0, (t0)
+ /* Bitwise-OR in the disabled RCP bits of __OSGlobalIntMask */
+ srl t0, t0, RCP_IMASKSHIFT
+ xor t0, t0, ~0
+ andi t0, t0, (RCP_IMASK >> RCP_IMASKSHIFT)
+ or t1, t1, t0
1:
- // Shift the RCP bits to not conflict with the CPU bits
- sll $t2, $t1, RCP_IMASKSHIFT
- // OR the CPU and RCP bits together
- or $v0, $v0, $t2
- jr $ra
+ /* Shift the RCP bits to not conflict with the CPU bits */
+ sll t2, t1, RCP_IMASKSHIFT
+ /* OR the CPU and RCP bits together */
+ or v0, v0, t2
+ jr ra
nop
+.set reorder
END(osGetIntMask)
diff --git a/src/libultra/os/getmemsize.c b/src/libultra/os/getmemsize.c
index 787346de63..9489b0f057 100644
--- a/src/libultra/os/getmemsize.c
+++ b/src/libultra/os/getmemsize.c
@@ -1,8 +1,9 @@
-#include "global.h"
+#include "ultra64.h"
#define STEP 0x100000
u32 osGetMemSize(void) {
+#ifndef BBPLAYER
vu32* ptr;
u32 size = 0x400000;
u32 data0;
@@ -28,4 +29,7 @@ u32 osGetMemSize(void) {
}
return size;
+#else
+ return osMemSize;
+#endif
}
diff --git a/src/libultra/os/getsr.s b/src/libultra/os/getsr.s
index dc6901b982..709075a7b7 100644
--- a/src/libultra/os/getsr.s
+++ b/src/libultra/os/getsr.s
@@ -1,14 +1,10 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(__osGetSR)
- mfc0 $v0, C0_SR
- jr $ra
- nop
+ MFC0( v0, C0_SR)
+ jr ra
END(__osGetSR)
diff --git a/src/libultra/os/getthreadid.c b/src/libultra/os/getthreadid.c
index 792229c9bf..8cee7a2aa3 100644
--- a/src/libultra/os/getthreadid.c
+++ b/src/libultra/os/getthreadid.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
OSId osGetThreadId(OSThread* thread) {
if (thread == NULL) {
diff --git a/src/libultra/os/getthreadpri.c b/src/libultra/os/getthreadpri.c
index 6c36a7c3b1..8eed2024f9 100644
--- a/src/libultra/os/getthreadpri.c
+++ b/src/libultra/os/getthreadpri.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
OSPri osGetThreadPri(OSThread* thread) {
if (thread == NULL) {
diff --git a/src/libultra/os/gettime.c b/src/libultra/os/gettime.c
index 2ca90b0df9..e0adcc9f80 100644
--- a/src/libultra/os/gettime.c
+++ b/src/libultra/os/gettime.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
OSTime osGetTime(void) {
u32 count;
@@ -11,5 +11,5 @@ OSTime osGetTime(void) {
t = __osCurrentTime;
__osRestoreInt(prevInt);
- return base + t;
+ return t + base;
}
diff --git a/src/libultra/os/initialize.c b/src/libultra/os/initialize.c
index e985d551d9..1241a0ac8f 100644
--- a/src/libultra/os/initialize.c
+++ b/src/libultra/os/initialize.c
@@ -1,4 +1,5 @@
-#include "global.h"
+#include "ultra64.h"
+#include "ultra64/bcp.h"
typedef struct __osExceptionVector {
u32 inst1; // lui $k0, %hi(__osException)
@@ -9,19 +10,24 @@ typedef struct __osExceptionVector {
extern __osExceptionVector __osExceptionPreamble;
+extern OSPiHandle __Dom1SpeedParam;
+extern OSPiHandle __Dom2SpeedParam;
+
u64 osClockRate = OS_CLOCK_RATE;
s32 osViClock = VI_NTSC_CLOCK;
u32 __osShutdown = false;
-OSHWIntr __OSGlobalIntMask = OS_IM_ALL;
+OSIntMask __OSGlobalIntMask = OS_IM_ALL;
u32 __osFinalrom;
-#if PLATFORM_N64
+#if LIBULTRA_VERSION < LIBULTRA_VERSION_K
#define OSINITIALIZE_FUNC osInitialize
#define SPEED_PARAM_FUNC createSpeedParam
+#if (LIBULTRA_VERSION == LIBULTRA_VERSION_I && LIBULTRA_PATCH == 1) || (LIBULTRA_VERSION == LIBULTRA_VERSION_J)
static void SPEED_PARAM_FUNC(void);
+#endif
#else
@@ -46,24 +52,61 @@ void SPEED_PARAM_FUNC(void) {
void OSINITIALIZE_FUNC(void) {
u32 pifdata;
-#if PLATFORM_N64
+#if LIBULTRA_VERSION < LIBULTRA_VERSION_K
u32 clock = 0;
#endif
__osFinalrom = true;
__osSetSR(__osGetSR() | SR_CU1);
- __osSetFpcCsr(FPCSR_FS | FPCSR_EV);
-#if !PLATFORM_N64
+ __osSetFpcCsr(FPCSR_FS | FPCSR_EV | FPCSR_RM_RN);
+#if LIBULTRA_VERSION >= LIBULTRA_VERSION_K
__osSetWatchLo(0x04900000);
#endif
- while (__osSiRawReadIo((void*)(PIF_RAM_END - 3), &pifdata)) {
- ;
+#ifdef BBPLAYER
+ {
+ u32 x, y;
+
+ // Check for iQue Player hardware by enabling and disabling FLASH and IDE interrupts and checking if the
+ // register gives the correct response.
+ IO_WRITE(MI_EX_INTR_MASK_REG, MI_EX_INTR_MASK_SET_FLASH | MI_EX_INTR_MASK_SET_IDE);
+ x = IO_READ(MI_EX_INTR_MASK_REG);
+ IO_WRITE(MI_EX_INTR_MASK_REG, MI_EX_INTR_MASK_CLR_FLASH | MI_EX_INTR_MASK_CLR_IDE);
+ y = IO_READ(MI_EX_INTR_MASK_REG);
+
+ __osBbIsBb =
+ ((x & (MI_EX_INTR_MASK_FLASH | MI_EX_INTR_MASK_IDE)) == (MI_EX_INTR_MASK_FLASH | MI_EX_INTR_MASK_IDE)) &&
+ ((y & (MI_EX_INTR_MASK_FLASH | MI_EX_INTR_MASK_IDE)) == 0);
}
- while (__osSiRawWriteIo((void*)(PIF_RAM_END - 3), pifdata | 8)) {
- ;
+
+ //! @bug Most games do not have permission to use GPIO, so they often cannot correctly tell if they are running on
+ //! HW V1 or V2.
+ if (__osBbIsBb && PI_GPIO_IS_HW_V2(IO_READ(PI_GPIO_REG))) {
+ __osBbIsBb = 2;
}
+ if (__osBbIsBb) {
+ // Set IPL boot parameters
+ osTvType = OS_TV_NTSC;
+ osRomType = 0;
+ osResetType = 0;
+ osVersion = 1;
+ osMemSize = 0x400000;
+ }
+
+ if (!__osBbIsBb) {
+ // The PIF doesn't exist on iQue, no need to enable NMI from PIF
+#endif
+ while (__osSiRawReadIo((void*)(PIF_RAM_END - 3), &pifdata)) {
+ ;
+ }
+ while (__osSiRawWriteIo((void*)(PIF_RAM_END - 3), pifdata | 8)) {
+ ;
+ }
+#ifdef BBPLAYER
+ }
+#endif
+
*(__osExceptionVector*)UT_VEC = __osExceptionPreamble; // TLB miss
*(__osExceptionVector*)XUT_VEC = __osExceptionPreamble; // XTLB miss
*(__osExceptionVector*)ECC_VEC = __osExceptionPreamble; // cache errors
@@ -71,9 +114,11 @@ void OSINITIALIZE_FUNC(void) {
osWritebackDCache((void*)K0BASE, E_VEC - K0BASE + sizeof(__osExceptionVector));
osInvalICache((void*)K0BASE, E_VEC - K0BASE + sizeof(__osExceptionVector));
+#if (LIBULTRA_VERSION == LIBULTRA_VERSION_I && LIBULTRA_PATCH == 1) || (LIBULTRA_VERSION > LIBULTRA_VERSION_I)
SPEED_PARAM_FUNC();
osUnmapTLBAll();
osMapTLBRdb();
+#endif
osClockRate = osClockRate * 3 / 4;
@@ -89,19 +134,46 @@ void OSINITIALIZE_FUNC(void) {
osViClock = VI_NTSC_CLOCK;
}
+#if (LIBULTRA_VERSION == LIBULTRA_VERSION_I && LIBULTRA_PATCH == 1) || (LIBULTRA_VERSION >= LIBULTRA_VERSION_J)
// If PreNMI is pending, loop until reset
if (__osGetCause() & CAUSE_IP5) {
while (true) {
;
}
}
+#endif
+
+#ifdef BBPLAYER
+ if (!__osBbIsBb) {
+ // In a real iQue Player environment (that is, real hardware + app launched from the system menu)
+ // these are set on app launch by the system menu based on the contents of the game's associated
+ // ticket. Set some dummy values if not running on iQue Player hardware.
+ __osBbEepromSize = 0x200;
+ __osBbPakSize = 0x8000;
+ __osBbFlashSize = 0x20000;
+ __osBbEepromAddress = 0x80400000 - 0x200;
+ __osBbPakAddress[0] = 0x80400000 - 0x8200;
+ __osBbPakAddress[1] = 0;
+ __osBbPakAddress[2] = 0;
+ __osBbPakAddress[3] = 0;
+ __osBbFlashAddress = 0x80400000 - 0x20000;
+ __osBbSramSize = __osBbFlashSize;
+ __osBbSramAddress = __osBbFlashAddress;
+ }
+ if (__osBbIsBb) {
+ IO_WRITE(PI_64_REG, IO_READ(PI_64_REG) & ~0x80000000);
+ IO_WRITE(MI_EX_INTR_MASK_REG, MI_EX_INTR_MASK_SET_IDE);
+ IO_WRITE(SI_0C_REG, 0);
+ IO_WRITE(SI_1C_REG, (IO_READ(SI_1C_REG) & ~0x7F000000) | 0x2F400000);
+ }
+#endif
IO_WRITE(AI_CONTROL_REG, AI_CONTROL_DMA_ON);
IO_WRITE(AI_DACRATE_REG, AI_MAX_DAC_RATE - 1);
IO_WRITE(AI_BITRATE_REG, AI_MAX_BIT_RATE - 1);
}
-#if PLATFORM_N64
+#if (LIBULTRA_VERSION == LIBULTRA_VERSION_I && LIBULTRA_PATCH == 1) || (LIBULTRA_VERSION == LIBULTRA_VERSION_J)
static void SPEED_PARAM_FUNC(void) {
__Dom1SpeedParam.type = DEVICE_TYPE_INIT;
__Dom1SpeedParam.latency = IO_READ(PI_BSD_DOM1_LAT_REG);
diff --git a/src/libultra/os/interrupt.s b/src/libultra/os/interrupt.s
index 829377bb0e..3a9102c579 100644
--- a/src/libultra/os/interrupt.s
+++ b/src/libultra/os/interrupt.s
@@ -1,53 +1,45 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
#include "ultra64/thread.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(__osDisableInt)
- lui $t2, %hi(__OSGlobalIntMask)
- addiu $t2, $t2, %lo(__OSGlobalIntMask)
- lw $t3, ($t2)
- andi $t3, $t3, SR_IMASK
- mfc0 $t0, C0_SR
- li $at, ~SR_IE
- and $t1, $t0, $at
- mtc0 $t1, C0_SR
- andi $v0, $t0, SR_IE
- lw $t0, ($t2)
- andi $t0, $t0, SR_IMASK
- beq $t0, $t3, No_Change_Global_Int
- lui $t2, %hi(__osRunningThread)
- //! @bug this addiu should be lw, it may never come up in practice as to reach this code
- //! the CPU bits of __OSGlobalIntMask must have changed while this function is running.
- addiu $t2, $t2, %lo(__osRunningThread)
- lw $t1, THREAD_SR($t2)
- andi $t2, $t1, SR_IMASK
- and $t2, $t2, $t0
- li $at, ~SR_IMASK
- and $t1, $t1, $at
- or $t1, $t1, $t2
- li $at, ~SR_IE
- and $t1, $t1, $at
- mtc0 $t1, C0_SR
- nop
- nop
+ la t2, __OSGlobalIntMask
+ lw t3, (t2)
+ and t3, t3, SR_IMASK
+ MFC0( t0, C0_SR)
+ and t1, t0, ~SR_IE
+ MTC0( t1, C0_SR)
+ and v0, t0, SR_IE
+ lw t0, (t2)
+ and t0, t0, SR_IMASK
+.set noreorder
+ beq t0, t3, No_Change_Global_Int
+ /*! @bug this la should be lw, it may never come up in practice as to reach this code
+ *! the CPU bits of __OSGlobalIntMask must have changed while this function is running.
+ */
+ la t2, __osRunningThread
+ lw t1, THREAD_SR(t2)
+ and t2, t1, SR_IMASK
+ and t2, t2, t0
+.set reorder
+ and t1, t1, ~SR_IMASK
+ or t1, t1, t2
+ and t1, t1, ~SR_IE
+ MTC0( t1, C0_SR)
+ NOP
+ NOP
No_Change_Global_Int:
- jr $ra
- nop
+ jr ra
END(__osDisableInt)
LEAF(__osRestoreInt)
- mfc0 $t0, C0_SR
- or $t0, $t0, $a0
- mtc0 $t0, C0_SR
- nop
- nop
- jr $ra
- nop
+ MFC0( t0, C0_SR)
+ or t0, t0, a0
+ MTC0( t0, C0_SR)
+ NOP
+ NOP
+ jr ra
END(__osRestoreInt)
diff --git a/src/libultra/os/invaldcache.s b/src/libultra/os/invaldcache.s
index 9464a24da6..9cf3d82e05 100644
--- a/src/libultra/os/invaldcache.s
+++ b/src/libultra/os/invaldcache.s
@@ -1,12 +1,8 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
/**
* void osInvalDCache(void* vaddr, s32 nbytes);
@@ -24,71 +20,61 @@
* the entire data cache is invalidated.
*/
LEAF(osInvalDCache)
- // If the amount to invalidate is less than or equal to 0, return immediately
- blez $a1, 3f
- nop
- // If the amount to invalidate is as large as or larger than
- // the data cache size, invalidate all
- li $t3, DCACHE_SIZE
- sltu $at, $a1, $t3
- beqz $at, 4f
- nop
- // Ensure end address doesn't wrap around and end up smaller
- // than the start address
- move $t0, $a0
- addu $t1, $a0, $a1
- sltu $at, $t0, $t1
- beqz $at, 3f
- nop
- // Mask start with cache line
- andi $t2, $t0, DCACHE_LINEMASK
- // If mask is not zero, the start is not cache aligned
- beqz $t2, 1f
- addiu $t1, $t1, -DCACHE_LINESIZE
- // Subtract mask result to align to cache line
- subu $t0, $t0, $t2
- // Hit-Writeback-Invalidate unaligned part
- cache (CACH_PD | C_HWBINV), ($t0)
- sltu $at, $t0, $t1
- // If that's all there is to do, return early
- beqz $at, 3f
- nop
- addiu $t0, $t0, DCACHE_LINESIZE
+ /* If the amount to invalidate is less than or equal to 0, return immediately */
+ blez a1, 3f
+ /* If the amount to invalidate is as large as or larger than
+ * the data cache size, invalidate all */
+ li t3, DCACHE_SIZE
+ bgeu a1, t3, 4f
+ /* Ensure end address doesn't wrap around and end up smaller
+ * than the start address */
+ move t0, a0
+ addu t1, a0, a1
+ bgeu t0, t1, 3f
+ /* Mask start with cache line */
+ addiu t1, t1, -DCACHE_LINESIZE
+ andi t2, t0, DCACHE_LINEMASK
+ /* If mask is not zero, the start is not cache aligned */
+ beqz t2, 1f
+ /* Subtract mask result to align to cache line */
+ subu t0, t0, t2
+ /* Hit-Writeback-Invalidate unaligned part */
+ CACHE( (CACH_PD | C_HWBINV), (t0))
+ /* If that's all there is to do, return early */
+ bgeu t0, t1, 3f
+ addiu t0, t0, DCACHE_LINESIZE
1:
- // Mask end with cache line
- andi $t2, $t1, DCACHE_LINEMASK
- // If mask is not zero, the end is not cache aligned
- beqz $t2, 1f
- nop
- // Subtract mask result to align to cache line
- subu $t1, $t1, $t2
- // Hit-Writeback-Invalidate unaligned part
- cache (CACH_PD | C_HWBINV), DCACHE_LINESIZE($t1)
- sltu $at, $t1, $t0
- // If that's all there is to do, return early
- bnez $at, 3f
- nop
- // Invalidate the rest
-1:
- // Hit-Invalidate
- cache (CACH_PD | C_HINV), ($t0)
- sltu $at, $t0, $t1
- bnez $at, 1b
- addiu $t0, $t0, DCACHE_LINESIZE
+ /* Mask end with cache line */
+ andi t2, t1, DCACHE_LINEMASK
+ /* If mask is not zero, the end is not cache aligned */
+ beqz t2, 2f
+ /* Subtract mask result to align to cache line */
+ subu t1, t1, t2
+ /* Hit-Writeback-Invalidate unaligned part */
+ CACHE( (CACH_PD | C_HWBINV), DCACHE_LINESIZE(t1))
+ /* If that's all there is to do, return early */
+ bltu t1, t0, 3f
+ /* Invalidate the rest */
+2:
+ /* Hit-Invalidate */
+ CACHE( (CACH_PD | C_HINV), (t0))
+.set noreorder
+ bltu t0, t1, 2b
+ addiu t0, t0, DCACHE_LINESIZE
+.set reorder
3:
- jr $ra
- nop
+ jr ra
4:
- li $t0, K0BASE
- addu $t1, $t0, $t3
- addiu $t1, $t1, -DCACHE_LINESIZE
+ li t0, K0BASE
+ addu t1, t0, t3
+ addiu t1, t1, -DCACHE_LINESIZE
5:
- // Index-Writeback-Invalidate
- cache (CACH_PD | C_IWBINV), ($t0)
- sltu $at, $t0, $t1
- bnez $at, 5b
- addiu $t0, DCACHE_LINESIZE
- jr $ra
- nop
+ /* Index-Writeback-Invalidate */
+ CACHE( (CACH_PD | C_IWBINV), (t0))
+.set noreorder
+ bltu t0, t1, 5b
+ addiu t0, DCACHE_LINESIZE
+.set reorder
+ jr ra
END(osInvalDCache)
diff --git a/src/libultra/os/invalicache.s b/src/libultra/os/invalicache.s
index 55f8312380..ef92d4cb08 100644
--- a/src/libultra/os/invalicache.s
+++ b/src/libultra/os/invalicache.s
@@ -1,52 +1,44 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(osInvalICache)
- // If the amount to invalidate is less than or equal to 0, return immediately
- blez $a1, 2f
- nop
- // If the amount to invalidate is as large as or larger than
- // the instruction cache size, invalidate all
- li $t3, ICACHE_SIZE
- sltu $at, $a1, $t3
- beqz $at, 3f
- nop
- // ensure end address doesn't wrap around and end up smaller
- // than the start address
- move $t0, $a0
- addu $t1, $a0, $a1
- sltu $at, $t0, $t1
- beqz $at, 2f
- nop
- // Mask and subtract to align to cache line
- andi $t2, $t0, ICACHE_LINEMASK
- addiu $t1, $t1, -ICACHE_LINESIZE
- subu $t0, $t0, $t2
+ /* If the amount to invalidate is less than or equal to 0, return immediately */
+ blez a1, 2f
+ /* If the amount to invalidate is as large as or larger than */
+ /* the instruction cache size, invalidate all */
+ li t3, ICACHE_SIZE
+ bgeu a1, t3, 3f
+ /* ensure end address doesn't wrap around and end up smaller */
+ /* than the start address */
+ move t0, a0
+ addu t1, a0, a1
+ bgeu t0, t1, 2f
+ /* Mask and subtract to align to cache line */
+ addiu t1, t1, -ICACHE_LINESIZE
+ andi t2, t0, ICACHE_LINEMASK
+ subu t0, t0, t2
1:
- cache (CACH_PI | C_HINV), ($t0)
- sltu $at, $t0, $t1
- bnez $at, 1b
- addiu $t0, $t0, ICACHE_LINESIZE
+ CACHE( (CACH_PI | C_HINV), (t0))
+.set noreorder
+ bltu t0, t1, 1b
+ addiu t0, t0, ICACHE_LINESIZE
+.set reorder
2:
- jr $ra
- nop
+ jr ra
3:
- li $t0, K0BASE
- addu $t1, $t0, $t3
- addiu $t1, $t1, -ICACHE_LINESIZE
+ li t0, K0BASE
+ addu t1, t0, t3
+ addiu t1, t1, -ICACHE_LINESIZE
4:
- cache (CACH_PI | C_IINV), ($t0)
- sltu $at, $t0, $t1
- bnez $at, 4b
- addiu $t0, ICACHE_LINESIZE
- jr $ra
- nop
+ CACHE( (CACH_PI | C_IINV), (t0))
+.set noreorder
+ bltu t0, t1, 4b
+ addiu t0, ICACHE_LINESIZE
+.set reorder
+ jr ra
+.set reorder
END(osInvalICache)
diff --git a/src/libultra/os/jammesg.c b/src/libultra/os/jammesg.c
index e0ca40fc68..b5d42895c2 100644
--- a/src/libultra/os/jammesg.c
+++ b/src/libultra/os/jammesg.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 osJamMesg(OSMesgQueue* mq, OSMesg msg, s32 flag) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/os/kdebugserver.c b/src/libultra/os/kdebugserver.c
new file mode 100644
index 0000000000..2f7abe20d2
--- /dev/null
+++ b/src/libultra/os/kdebugserver.c
@@ -0,0 +1,3 @@
+#include "ultra64.h"
+
+OSThread __osThreadSave;
diff --git a/src/libultra/os/maptlbrdb.s b/src/libultra/os/maptlbrdb.s
index c3ac20948b..43e7cc93a3 100644
--- a/src/libultra/os/maptlbrdb.s
+++ b/src/libultra/os/maptlbrdb.s
@@ -1,36 +1,31 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
#include "ultra64/rdb.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(osMapTLBRdb)
- mfc0 $t0, C0_ENTRYHI
- li $t1, NTLBENTRIES
- mtc0 $t1, C0_INX
- mtc0 $zero, C0_PAGEMASK
- li $t2, (TLBLO_UNCACHED | TLBLO_D | TLBLO_V | TLBLO_G)
- li $t1, (RDB_BASE_REG & TLBHI_VPN2MASK)
- mtc0 $t1, C0_ENTRYHI
- // Possible bug? Virtual address instead of physical address
- // set as page frame number
- li $t1, RDB_BASE_VIRTUAL_ADDR
- srl $t3, $t1, TLBLO_PFNSHIFT
- or $t3, $t3, $t2
- mtc0 $t3, C0_ENTRYLO0
- li $t1, TLBLO_G
- mtc0 $t1, C0_ENTRYLO1
- nop
- tlbwi
- nop
- nop
- nop
- nop
- mtc0 $t0, C0_ENTRYHI
- jr $ra
- nop
+ MFC0( t0, C0_ENTRYHI)
+ li t1, NTLBENTRIES
+ MTC0( t1, C0_INX)
+ MTC0( zero, C0_PAGEMASK)
+ li t2, (TLBLO_UNCACHED | TLBLO_D | TLBLO_V | TLBLO_G)
+ li t1, (RDB_BASE_REG & TLBHI_VPN2MASK)
+ MTC0( t1, C0_ENTRYHI)
+ /* Possible bug? Virtual address instead of physical address set as page frame number */
+ li t1, RDB_BASE_VIRTUAL_ADDR
+ srl t3, t1, TLBLO_PFNSHIFT
+ or t3, t3, t2
+ MTC0( t3, C0_ENTRYLO0)
+ li t1, TLBLO_G
+ MTC0( t1, C0_ENTRYLO1)
+ NOP
+ TLBWI
+ NOP
+ NOP
+ NOP
+ NOP
+ MTC0( t0, C0_ENTRYHI)
+ jr ra
END(osMapTLBRdb)
diff --git a/src/libultra/os/parameters.s b/src/libultra/os/parameters.s
index c0020ddbed..22d26beae6 100644
--- a/src/libultra/os/parameters.s
+++ b/src/libultra/os/parameters.s
@@ -1,22 +1,48 @@
#include "ultra64/asm.h"
-.section .text
+.text
-.macro IPL_SYMBOL name, address, size
- .global \name
- .set \name, \address
- .type \name, @object
- .size \name, \size
-.endm
+#ifdef __sgi
+#define IPL_SYMBOL(name, address, size) \
+ ABS(name, address)
+#else
+#define IPL_SYMBOL(name, address, sz) \
+ ABS(name, address) ;\
+ .type name, @object ;\
+ .size name, sz
+#endif
-IPL_SYMBOL leoBootID, 0x800001A0, 4
-IPL_SYMBOL osTvType, 0x80000300, 4
-IPL_SYMBOL osRomType, 0x80000304, 4
-IPL_SYMBOL osRomBase, 0x80000308, 4
-IPL_SYMBOL osResetType, 0x8000030C, 4
-IPL_SYMBOL osCicId, 0x80000310, 4
-IPL_SYMBOL osVersion, 0x80000314, 4
-IPL_SYMBOL osMemSize, 0x80000318, 4
-IPL_SYMBOL osAppNMIBuffer, 0x8000031C, 0x40
-.fill 0x60
+IPL_SYMBOL(leoBootID, 0x800001A0, 4)
+IPL_SYMBOL(osTvType, 0x80000300, 4)
+IPL_SYMBOL(osRomType, 0x80000304, 4)
+IPL_SYMBOL(osRomBase, 0x80000308, 4)
+IPL_SYMBOL(osResetType, 0x8000030C, 4)
+IPL_SYMBOL(osCicId, 0x80000310, 4)
+IPL_SYMBOL(osVersion, 0x80000314, 4)
+IPL_SYMBOL(osMemSize, 0x80000318, 4)
+IPL_SYMBOL(osAppNMIBuffer, 0x8000031C, 0x40)
+
+#ifdef BBPLAYER
+
+IPL_SYMBOL(__osBbEepromAddress, 0x8000035C, 4)
+IPL_SYMBOL(__osBbEepromSize, 0x80000360, 4)
+IPL_SYMBOL(__osBbFlashAddress, 0x80000364, 4)
+IPL_SYMBOL(__osBbFlashSize, 0x80000368, 4)
+IPL_SYMBOL(__osBbSramAddress, 0x8000036C, 4)
+IPL_SYMBOL(__osBbSramSize, 0x80000370, 4)
+IPL_SYMBOL(__osBbPakAddress, 0x80000374, 0x10)
+IPL_SYMBOL(__osBbPakSize, 0x80000384, 4)
+IPL_SYMBOL(__osBbIsBb, 0x80000388, 4)
+IPL_SYMBOL(__osBbHackFlags, 0x8000038C, 4)
+IPL_SYMBOL(__osBbStashMagic, 0x80000390, 4)
+IPL_SYMBOL(__osBbPakBindings, 0x80000394, 0x10)
+IPL_SYMBOL(__osBbStateName, 0x800003A4, 0x10)
+IPL_SYMBOL(__osBbStateDirty, 0x800003B4, 4)
+IPL_SYMBOL(__osBbAuxDataLimit, 0x800003B8, 4)
+
+.space 0x10
+
+#endif
+
+.space 0x60
diff --git a/src/libultra/os/probetlb.s b/src/libultra/os/probetlb.s
index 7bc7856e13..4fa8abc38e 100644
--- a/src/libultra/os/probetlb.s
+++ b/src/libultra/os/probetlb.s
@@ -1,12 +1,8 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
/**
* u32 __osProbeTLB(void* vaddr);
@@ -17,70 +13,71 @@
* Returns the physical address if found, or -1 if not found.
*/
LEAF(__osProbeTLB)
- // Set C0_ENTRYHI based on supplied vaddr
- mfc0 $t0, C0_ENTRYHI
- andi $t1, $t0, TLBHI_PIDMASK
- li $at, TLBHI_VPN2MASK
- and $t2, $a0, $at
- or $t1, $t1, $t2
- mtc0 $t1, C0_ENTRYHI
+.set noreorder
+ /* Set C0_ENTRYHI based on supplied vaddr */
+ mfc0 t0, C0_ENTRYHI
+ and t1, t0, TLBHI_PIDMASK
+ and t2, a0, TLBHI_VPN2MASK
+ or t1, t1, t2
+ mtc0 t1, C0_ENTRYHI
nop
nop
nop
- // TLB probe, sets C0_INX to a value matching C0_ENTRYHI.
- // If no match is found the TLBINX_PROBE bit is set to indicate this.
+ /* TLB probe, sets C0_INX to a value matching C0_ENTRYHI. */
+ /* If no match is found the TLBINX_PROBE bit is set to indicate this. */
tlbp
nop
nop
- // Read result
- mfc0 $t3, C0_INX
- li $at, TLBINX_PROBE
- and $t3, $t3, $at
- // Branch if no match was found
- bnez $t3, 3f
+ /* Read result */
+ mfc0 t3, C0_INX
+ and t3, t3, TLBINX_PROBE
+ /* Branch if no match was found */
+ bnez t3, 3f
nop
- // Read TLB, sets C0_ENTRYHI, C0_ENTRYLO0, C0_ENTRYLO1 and C0_PAGEMASK for the TLB
- // entry indicated by C0_INX
+
+ /* Read TLB, sets C0_ENTRYHI, C0_ENTRYLO0, C0_ENTRYLO1 and C0_PAGEMASK for the TLB */
+ /* entry indicated by C0_INX */
tlbr
nop
nop
nop
- // Calculate page size = (page mask + 0x2000) >> 1
- mfc0 $t3, C0_PAGEMASK
- addi $t3, $t3, 0x2000
- srl $t3, $t3, 1
- // & with vaddr
- and $t4, $t3, $a0
- // Select C0_ENTRYLO0 or C0_ENTRYLO1
- bnez $t4, 1f
- addi $t3, $t3, -1 // make bitmask out of page size
- mfc0 $v0, C0_ENTRYLO0
+ /* Calculate page size = (page mask + 0x2000) >> 1 */
+ mfc0 t3, C0_PAGEMASK
+ add t3, t3, 0x2000
+ srl t3, t3, 1
+ /* & with vaddr */
+ and t4, t3, a0
+ /* Select C0_ENTRYLO0 or C0_ENTRYLO1 */
+ bnez t4, 1f
+ add t3, t3, -1 /* make bitmask out of page size */
+ mfc0 v0, C0_ENTRYLO0
b 2f
nop
1:
- mfc0 $v0, C0_ENTRYLO1
+ mfc0 v0, C0_ENTRYLO1
2:
- // Check valid bit and branch if not valid
- andi $t5, $v0, TLBLO_V
- beqz $t5, 3f
+ /* Check valid bit and branch if not valid */
+ and t5, v0, TLBLO_V
+ beqz t5, 3f
nop
- // Extract the Page Frame Number from the entry
- li $at, TLBLO_PFNMASK
- and $v0, $v0, $at
- sll $v0, $v0, TLBLO_PFNSHIFT
- // Mask vaddr with page size mask
- and $t5, $a0, $t3
- // Add masked vaddr to pfn to obtain the physical address
- add $v0, $v0, $t5
+
+ /* Extract the Page Frame Number from the entry */
+ and v0, v0, TLBLO_PFNMASK
+ sll v0, v0, TLBLO_PFNSHIFT
+ /* Mask vaddr with page size mask */
+ and t5, a0, t3
+ /* Add masked vaddr to pfn to obtain the physical address */
+ add v0, v0, t5
b 4f
nop
3:
- // No physical address for the supplied virtual address was found,
- // return -1
- li $v0, -1
+ /* No physical address for the supplied virtual address was found, */
+ /* return -1 */
+ li v0, -1
4:
- // Restore original C0_ENTRYHI value before returning
- mtc0 $t0, C0_ENTRYHI
- jr $ra
+ /* Restore original C0_ENTRYHI value before returning */
+ mtc0 t0, C0_ENTRYHI
+ jr ra
nop
+.set reorder
END(__osProbeTLB)
diff --git a/src/libultra/os/recvmesg.c b/src/libultra/os/recvmesg.c
index f065188cd0..0e60519d18 100644
--- a/src/libultra/os/recvmesg.c
+++ b/src/libultra/os/recvmesg.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag) {
register u32 prevInt = __osDisableInt();
@@ -7,9 +7,10 @@ s32 osRecvMesg(OSMesgQueue* mq, OSMesg* msg, s32 flag) {
if (flag == OS_MESG_NOBLOCK) {
__osRestoreInt(prevInt);
return -1;
+ } else {
+ __osRunningThread->state = OS_STATE_WAITING;
+ __osEnqueueAndYield(&mq->mtqueue);
}
- __osRunningThread->state = OS_STATE_WAITING;
- __osEnqueueAndYield(&mq->mtqueue);
}
if (msg != NULL) {
diff --git a/src/libultra/os/resetglobalintmask.c b/src/libultra/os/resetglobalintmask.c
index c418731838..1dde3754ca 100644
--- a/src/libultra/os/resetglobalintmask.c
+++ b/src/libultra/os/resetglobalintmask.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void __osResetGlobalIntMask(OSHWIntr mask) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/os/sendmesg.c b/src/libultra/os/sendmesg.c
index df0bc2bee4..cba5dcee81 100644
--- a/src/libultra/os/sendmesg.c
+++ b/src/libultra/os/sendmesg.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 osSendMesg(OSMesgQueue* mq, OSMesg msg, s32 flag) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/os/setcompare.s b/src/libultra/os/setcompare.s
index bd16533774..3c175c4943 100644
--- a/src/libultra/os/setcompare.s
+++ b/src/libultra/os/setcompare.s
@@ -1,14 +1,10 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(__osSetCompare)
- mtc0 $a0, C0_COMPARE
- jr $ra
- nop
+ MTC0( a0, C0_COMPARE)
+ jr ra
END(__osSetCompare)
diff --git a/src/libultra/os/seteventmesg.c b/src/libultra/os/seteventmesg.c
index d105850ee1..d77dea8999 100644
--- a/src/libultra/os/seteventmesg.c
+++ b/src/libultra/os/seteventmesg.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/internal.h"
__OSEventState __osEventStateTab[OS_NUM_EVENTS];
diff --git a/src/libultra/os/setfpccsr.s b/src/libultra/os/setfpccsr.s
index 1aa0e7d298..e333550844 100644
--- a/src/libultra/os/setfpccsr.s
+++ b/src/libultra/os/setfpccsr.s
@@ -1,15 +1,11 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(__osSetFpcCsr)
- cfc1 $v0, C1_FPCSR
- ctc1 $a0, C1_FPCSR
- jr $ra
- nop
+ CFC1( v0, C1_FPCSR)
+ CTC1( a0, C1_FPCSR)
+ jr ra
END(__osSetFpcCsr)
diff --git a/src/libultra/os/setglobalintmask.c b/src/libultra/os/setglobalintmask.c
index 8c4aebb926..c75f846f1e 100644
--- a/src/libultra/os/setglobalintmask.c
+++ b/src/libultra/os/setglobalintmask.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void __osSetGlobalIntMask(OSHWIntr mask) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/os/sethwintrroutine.c b/src/libultra/os/sethwintrroutine.c
index e6bb74f0f3..5ceae62bb1 100644
--- a/src/libultra/os/sethwintrroutine.c
+++ b/src/libultra/os/sethwintrroutine.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
#include "ultra64/internal.h"
void __osSetHWIntrRoutine(OSHWIntr intr, s32 (*callback)(void), void* sp) {
diff --git a/src/libultra/os/setintmask.s b/src/libultra/os/setintmask.s
index e48c1b376f..7b2f5be2f5 100644
--- a/src/libultra/os/setintmask.s
+++ b/src/libultra/os/setintmask.s
@@ -1,14 +1,11 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
#include "ultra64/rcp.h"
#include "ultra64/exception.h"
-.set noat
-.set noreorder
-
-.section .rodata
-
-.balign 16
+.rdata
+.align 2
/**
* LUT to convert between an interrupt mask value and a value for MI_INTR_MASK_REG.
@@ -82,9 +79,7 @@ DATA(__osRcpImTable)
.half MI_INTR_MASK_SET_SP | MI_INTR_MASK_SET_SI | MI_INTR_MASK_SET_AI | MI_INTR_MASK_SET_VI | MI_INTR_MASK_SET_PI | MI_INTR_MASK_SET_DP
ENDDATA(__osRcpImTable)
-.section .text
-
-.balign 16
+.text
/**
* OSIntMask osSetIntMask(OSIntMask);
@@ -113,56 +108,47 @@ ENDDATA(__osRcpImTable)
* OS_IM_ALL, so the operation is usually simply (SR | 0).
*/
LEAF(osSetIntMask)
- // Extract interrupt enable bits from current SR
- mfc0 $t4, C0_SR
- andi $v0, $t4, (SR_IMASK | SR_IE)
- // Get value of __OSGlobalIntMask
- lui $t0, %hi(__OSGlobalIntMask)
- addiu $t0, %lo(__OSGlobalIntMask)
- lw $t3, ($t0)
- // Bitwise-OR in the disabled CPU bits of __OSGlobalIntMask
- li $at, ~0
- xor $t0, $t3, $at
- andi $t0, $t0, SR_IMASK
- or $v0, $v0, $t0
- // Fetch MI_INTR_MASK_REG
- lui $t2, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
- lw $t2, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($t2)
- // If there are RCP interrupts masked
- beqz $t2, 1f
- srl $t1, $t3, RCP_IMASKSHIFT
- // Bitwise-OR in the disabled RCP bits of __OSGlobalIntMask
- li $at, ~0
- xor $t1, $t1, $at
- andi $t1, $t1, (RCP_IMASK >> RCP_IMASKSHIFT)
- or $t2, $t2, $t1
+ /* Extract interrupt enable bits from current SR */
+ MFC0( t4, C0_SR)
+.set noreorder
+ and v0, t4, (SR_IMASK | SR_IE)
+ /* Get value of __OSGlobalIntMask */
+ la t0, __OSGlobalIntMask
+ lw t3, (t0)
+ /* Bitwise-OR in the disabled CPU bits of __OSGlobalIntMask */
+ xor t0, t3, 0xFFFFFFFF
+ and t0, t0, SR_IMASK
+ or v0, v0, t0
+ /* Fetch MI_INTR_MASK_REG */
+ lw t2, PHYS_TO_K1(MI_INTR_MASK_REG)
+ /* If there are RCP interrupts masked */
+ beqz t2, 1f
+ srl t1, t3, RCP_IMASKSHIFT
+ /* Bitwise-OR in the disabled RCP bits of __OSGlobalIntMask */
+ xor t1, t1, 0xFFFFFFFF
+ and t1, t1, (RCP_IMASK >> RCP_IMASKSHIFT)
+ or t2, t2, t1
1:
- // Shift the RCP bits to not conflict with the CPU bits
- sll $t2, $t2, RCP_IMASKSHIFT
- // OR the CPU and RCP bits together
- or $v0, $v0, $t2
- // Extract RCP interrupt enable bits from requested mask and mask with __OSGlobalIntMask
- li $at, RCP_IMASK
- and $t0, $a0, $at
- and $t0, $t0, $t3
- // Convert to a value for MI_INTR_MASK_REG and set it
- srl $t0, $t0, (RCP_IMASKSHIFT-1)
- lui $t2, %hi(__osRcpImTable)
- addu $t2, $t2, $t0
- lhu $t2, %lo(__osRcpImTable)($t2)
- lui $at, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
- sw $t2, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($at)
- // Extract CPU interrupt enable bits from requested mask and mask with __OSGlobalIntMask
- andi $t0, $a0, OS_IM_CPU
- andi $t1, $t3, SR_IMASK
- and $t0, $t0, $t1
- li $at, ~SR_IMASK
- and $t4, $t4, $at
- // Bitwise OR in the remaining bits of SR and set new SR
- or $t4, $t4, $t0
- mtc0 $t4, C0_SR
- nop
- nop
- jr $ra
- nop
+ /* Shift the RCP bits to not conflict with the CPU bits */
+ sll t2, t2, RCP_IMASKSHIFT
+ /* OR the CPU and RCP bits together */
+ or v0, v0, t2
+ /* Extract RCP interrupt enable bits from requested mask and mask with __OSGlobalIntMask */
+ and t0, a0, RCP_IMASK
+ and t0, t0, t3
+ /* Convert to a value for MI_INTR_MASK_REG and set it */
+ srl t0, t0, (RCP_IMASKSHIFT-1)
+ lhu t2, __osRcpImTable(t0)
+ sw t2, PHYS_TO_K1(MI_INTR_MASK_REG)
+ /* Extract CPU interrupt enable bits from requested mask and mask with __OSGlobalIntMask */
+ and t0, a0, OS_IM_CPU
+ and t1, t3, SR_IMASK
+ and t0, t0, t1
+ and t4, t4, ~SR_IMASK
+ /* Bitwise OR in the remaining bits of SR and set new SR */
+ or t4, t4, t0
+ MTC0( t4, C0_SR)
+ NOP
+ NOP
+ jr ra
END(osSetIntMask)
diff --git a/src/libultra/os/setsr.s b/src/libultra/os/setsr.s
index b754359eae..fb7a1586d4 100644
--- a/src/libultra/os/setsr.s
+++ b/src/libultra/os/setsr.s
@@ -1,15 +1,11 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(__osSetSR)
- mtc0 $a0, C0_SR
- nop
- jr $ra
- nop
+ MTC0( a0, C0_SR)
+ NOP
+ jr ra
END(__osSetSR)
diff --git a/src/libultra/os/setthreadpri.c b/src/libultra/os/setthreadpri.c
index a9a1b0eb6e..93ece6f5c8 100644
--- a/src/libultra/os/setthreadpri.c
+++ b/src/libultra/os/setthreadpri.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void osSetThreadPri(OSThread* thread, OSPri pri) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/os/settime.c b/src/libultra/os/settime.c
index 2be47ed9ed..310809e2c4 100644
--- a/src/libultra/os/settime.c
+++ b/src/libultra/os/settime.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void osSetTime(OSTime time) {
__osCurrentTime = time;
diff --git a/src/libultra/os/settimer.c b/src/libultra/os/settimer.c
index 40e1ba83be..4ad8ccc820 100644
--- a/src/libultra/os/settimer.c
+++ b/src/libultra/os/settimer.c
@@ -1,8 +1,11 @@
-#include "global.h"
+#include "ultra64.h"
+#include "attributes.h"
+
+#include "ultra64.h"
s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg) {
- OSTime time;
-#if !PLATFORM_N64
+ UNUSED OSTime time;
+#if LIBULTRA_VERSION >= LIBULTRA_VERSION_K
OSTimer* next;
u32 count;
u32 value;
@@ -12,25 +15,14 @@ s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* m
timer->next = NULL;
timer->prev = NULL;
timer->interval = interval;
-
- if (countdown != 0) {
- timer->value = countdown;
- } else {
- timer->value = interval;
- }
+ timer->value = (countdown != 0) ? countdown : interval;
timer->mq = mq;
timer->msg = msg;
-#if PLATFORM_N64
- time = __osInsertTimer(timer);
- if (__osTimerList->next == timer) {
- __osSetTimerIntr(time);
- }
-#else
+#if LIBULTRA_VERSION >= LIBULTRA_VERSION_K
prevInt = __osDisableInt();
- if (__osTimerList->next != __osTimerList) {
- if (1) {}
-
+ if (__osTimerList->next == __osTimerList) {
+ } else {
next = __osTimerList->next;
count = osGetCount();
value = count - __osTimerCounter;
@@ -46,6 +38,11 @@ s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* m
__osSetTimerIntr(__osTimerList->next->value);
__osRestoreInt(prevInt);
+#else
+ time = __osInsertTimer(timer);
+ if (__osTimerList->next == timer) {
+ __osSetTimerIntr(time);
+ }
#endif
return 0;
diff --git a/src/libultra/os/setwatchlo.s b/src/libultra/os/setwatchlo.s
index aee3ad4d6d..962513a480 100644
--- a/src/libultra/os/setwatchlo.s
+++ b/src/libultra/os/setwatchlo.s
@@ -1,15 +1,11 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(__osSetWatchLo)
- mtc0 $a0, C0_WATCHLO
- nop
- jr $ra
- nop
+ MTC0( a0, C0_WATCHLO)
+ NOP
+ jr ra
END(__osSetWatchLo)
diff --git a/src/libultra/os/startthread.c b/src/libultra/os/startthread.c
index 6594fd5ae5..eb84bd9461 100644
--- a/src/libultra/os/startthread.c
+++ b/src/libultra/os/startthread.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void osStartThread(OSThread* thread) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/os/stopthread.c b/src/libultra/os/stopthread.c
index 54a236b49b..6e24b5d83f 100644
--- a/src/libultra/os/stopthread.c
+++ b/src/libultra/os/stopthread.c
@@ -1,14 +1,8 @@
-#include "global.h"
+#include "ultra64.h"
void osStopThread(OSThread* thread) {
register u32 prevInt = __osDisableInt();
- register u32 state;
-
- if (thread == NULL) {
- state = OS_STATE_RUNNING;
- } else {
- state = thread->state;
- }
+ register u16 state = (thread == NULL) ? OS_STATE_RUNNING : thread->state;
switch (state) {
case OS_STATE_RUNNING:
diff --git a/src/libultra/os/stoptimer.c b/src/libultra/os/stoptimer.c
index d6d20536a1..e8dbdbd2cf 100644
--- a/src/libultra/os/stoptimer.c
+++ b/src/libultra/os/stoptimer.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
s32 osStopTimer(OSTimer* timer) {
register u32 prevInt;
diff --git a/src/libultra/os/thread.c b/src/libultra/os/thread.c
index c78a34e4ec..a9429b6b9b 100644
--- a/src/libultra/os/thread.c
+++ b/src/libultra/os/thread.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
__OSThreadTail __osThreadTail = { NULL, OS_PRIORITY_THREADTAIL };
OSThread* __osRunQueue = (OSThread*)&__osThreadTail;
@@ -6,16 +6,16 @@ OSThread* __osActiveQueue = (OSThread*)&__osThreadTail;
OSThread* __osRunningThread = NULL;
OSThread* __osFaultedThread = NULL;
-void __osDequeueThread(OSThread** queue, OSThread* thread) {
- register OSThread** a2 = queue;
- register OSThread* a3 = *a2;
+void __osDequeueThread(register OSThread** queue, register OSThread* thread) {
+ register OSThread* pred = (OSThread*)queue;
+ register OSThread* succ = pred->next;
- while (a3 != NULL) {
- if (a3 == thread) {
- *a2 = thread->next;
+ while (succ != NULL) {
+ if (succ == thread) {
+ pred->next = thread->next;
return;
}
- a2 = &a3->next;
- a3 = *a2;
+ pred = succ;
+ succ = pred->next;
}
}
diff --git a/src/libultra/os/timerintr.c b/src/libultra/os/timerintr.c
index 943aca0ffc..2e6d6ba71b 100644
--- a/src/libultra/os/timerintr.c
+++ b/src/libultra/os/timerintr.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
OSTimer __osBaseTimer;
OSTime __osCurrentTime;
@@ -11,10 +11,8 @@ void __osTimerServicesInit(void) {
__osCurrentTime = 0;
__osBaseCounter = 0;
__osViIntrCount = 0;
- __osTimerList->prev = __osTimerList;
- __osTimerList->next = __osTimerList->prev;
- __osTimerList->value = 0;
- __osTimerList->interval = __osTimerList->value;
+ __osTimerList->next = __osTimerList->prev = __osTimerList;
+ __osTimerList->interval = __osTimerList->value = 0;
__osTimerList->mq = NULL;
__osTimerList->msg = NULL;
}
@@ -28,7 +26,7 @@ void __osTimerInterrupt(void) {
return;
}
- while (true) {
+ for (;;) {
timer = __osTimerList->next;
if (timer == __osTimerList) {
__osSetCompare(0);
@@ -63,7 +61,7 @@ void __osSetTimerIntr(OSTime time) {
OSTime newTime;
u32 prevInt;
-#if !PLATFORM_N64
+#if LIBULTRA_VERSION >= LIBULTRA_VERSION_K
if (time < 468) {
time = 468;
}
@@ -72,7 +70,7 @@ void __osSetTimerIntr(OSTime time) {
prevInt = __osDisableInt();
__osTimerCounter = osGetCount();
- newTime = time + __osTimerCounter;
+ newTime = __osTimerCounter + time;
__osSetCompare((u32)newTime);
__osRestoreInt(prevInt);
}
diff --git a/src/libultra/os/unmaptlball.s b/src/libultra/os/unmaptlball.s
index e1a03b1a23..8cd79984ec 100644
--- a/src/libultra/os/unmaptlball.s
+++ b/src/libultra/os/unmaptlball.s
@@ -1,29 +1,25 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(osUnmapTLBAll)
- mfc0 $t0, C0_ENTRYHI
- li $t1, (NTLBENTRIES - 1)
- li $t2, (K0BASE & TLBHI_VPN2MASK)
- mtc0 $t2, C0_ENTRYHI
- mtc0 $zero, C0_ENTRYLO0
- mtc0 $zero, C0_ENTRYLO1
+ MFC0( t0, C0_ENTRYHI)
+ li t1, (NTLBENTRIES - 1)
+ li t2, (K0BASE & TLBHI_VPN2MASK)
+ MTC0( t2, C0_ENTRYHI)
+ MTC0( zero, C0_ENTRYLO0)
+ MTC0( zero, C0_ENTRYLO1)
1:
- mtc0 $t1, C0_INX
- nop
- tlbwi
- nop
- nop
- addi $t1, $t1, -1
- bgez $t1, 1b
- nop
- mtc0 $t0, C0_ENTRYHI
- jr $ra
- nop
+ MTC0( t1, C0_INX)
+ NOP
+ TLBWI
+ NOP
+ NOP
+ addi t1, t1, -1
+ bgez t1, 1b
+
+ MTC0( t0, C0_ENTRYHI)
+ jr ra
END(osUnmapTLBAll)
diff --git a/src/libultra/os/virtualtophysical.c b/src/libultra/os/virtualtophysical.c
index 5f8f79d83c..0906dc51af 100644
--- a/src/libultra/os/virtualtophysical.c
+++ b/src/libultra/os/virtualtophysical.c
@@ -1,13 +1,11 @@
-#include "global.h"
+#include "ultra64.h"
u32 osVirtualToPhysical(void* vaddr) {
if (IS_KSEG0(vaddr)) {
return K0_TO_PHYS(vaddr);
- }
-
- if (IS_KSEG1(vaddr)) {
+ } else if (IS_KSEG1(vaddr)) {
return K1_TO_PHYS(vaddr);
+ } else {
+ return __osProbeTLB(vaddr);
}
-
- return __osProbeTLB(vaddr);
}
diff --git a/src/libultra/os/writebackdcache.s b/src/libultra/os/writebackdcache.s
index 829f6f4a05..7b2af1b459 100644
--- a/src/libultra/os/writebackdcache.s
+++ b/src/libultra/os/writebackdcache.s
@@ -1,12 +1,8 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
/**
* void osWritebackDCache(void* vaddr, s32 nbytes);
@@ -16,45 +12,43 @@
* written back.
*/
LEAF(osWritebackDCache)
- // If the amount to write back is less than or equal to 0, return immediately
- blez $a1, .ret
- nop
- // If the amount to write back is as large as or larger than
- // the data cache size, write back all
- li $t3, DCACHE_SIZE
- sltu $at, $a1, $t3
- beqz $at, .all
- nop
- // ensure end address doesn't wrap around and end up smaller
- // than the start address
- move $t0, $a0
- addu $t1, $a0, $a1
- sltu $at, $t0, $t1
- beqz $at, .ret
- nop
- // Mask and subtract to align to cache line
- andi $t2, $t0, DCACHE_LINEMASK
- addiu $t1, $t1, -DCACHE_LINESIZE
- subu $t0, $t0, $t2
-1:
- cache (CACH_PD | C_HWB), ($t0)
- sltu $at, $t0, $t1
- bnez $at, 1b
- addiu $t0, $t0, DCACHE_LINESIZE
-.ret:
- jr $ra
- nop
+ /* If the amount to write back is less than or equal to 0, return immediately */
+ blez a1, 2f
-// same as osWritebackDCacheAll in operation
-.all:
- li $t0, K0BASE
- addu $t1, $t0, $t3
- addiu $t1, $t1, -DCACHE_LINESIZE
+ /* If the amount to write back is as large as or larger than */
+ /* the data cache size, write back all */
+ li t3, DCACHE_SIZE
+ bgeu a1, t3, 3f
+
+ /* ensure end address doesn't wrap around and end up smaller */
+ /* than the start address */
+ move t0, a0
+ addu t1, a0, a1
+ bgeu t0, t1, 2f
+
+ /* Mask and subtract to align to cache line */
+ addiu t1, t1, -DCACHE_LINESIZE
+ andi t2, t0, DCACHE_LINEMASK
+ subu t0, t0, t2
1:
- cache (CACH_PD | C_IWBINV), ($t0)
- sltu $at, $t0, $t1
- bnez $at, 1b
- addiu $t0, DCACHE_LINESIZE
- jr $ra
- nop
+ CACHE( (CACH_PD | C_HWB), (t0))
+.set noreorder
+ bltu t0, t1, 1b
+ addiu t0, t0, DCACHE_LINESIZE
+.set reorder
+2:
+ jr ra
+
+/* same as osWritebackDCacheAll in operation */
+3:
+ li t0, K0BASE
+ addu t1, t0, t3
+ addiu t1, t1, -DCACHE_LINESIZE
+4:
+ CACHE( (CACH_PD | C_IWBINV), (t0))
+.set noreorder
+ bltu t0, t1, 4b
+ addiu t0, DCACHE_LINESIZE
+.set reorder
+ jr ra
END(osWritebackDCache)
diff --git a/src/libultra/os/writebackdcacheall.s b/src/libultra/os/writebackdcacheall.s
index 54a58dff8a..a15ef4554f 100644
--- a/src/libultra/os/writebackdcacheall.s
+++ b/src/libultra/os/writebackdcacheall.s
@@ -1,23 +1,19 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "ultra64/R4300.h"
-.set noat
-.set noreorder
-
-.section .text
-
-.balign 16
+.text
LEAF(osWritebackDCacheAll)
- li $t0, K0BASE
- li $t2, DCACHE_SIZE
- addu $t1, $t0, $t2
- addiu $t1, $t1, -DCACHE_LINESIZE
+ li t0, K0BASE
+ li t2, DCACHE_SIZE
+ addu t1, t0, t2
+ addiu t1, t1, -DCACHE_LINESIZE
1:
- cache (CACH_PD | C_IWBINV), ($t0)
- sltu $at, $t0, $t1
- bnez $at, 1b
- addiu $t0, DCACHE_LINESIZE
- jr $ra
- nop
+.set noreorder
+ cache (CACH_PD | C_IWBINV), (t0)
+ bltu t0, t1, 1b
+ addiu t0, DCACHE_LINESIZE
+.set reorder
+ jr ra
END(osWritebackDCacheAll)
diff --git a/src/libultra/os/yieldthread.c b/src/libultra/os/yieldthread.c
index af9e15a2c1..a0604f7183 100644
--- a/src/libultra/os/yieldthread.c
+++ b/src/libultra/os/yieldthread.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "ultra64.h"
void osYieldThread(void) {
register u32 prevInt = __osDisableInt();
diff --git a/src/libultra/reg/_getcount.c b/src/libultra/reg/_getcount.c
new file mode 100644
index 0000000000..53073df994
--- /dev/null
+++ b/src/libultra/reg/_getcount.c
@@ -0,0 +1,32 @@
+#ifdef BBPLAYER
+#include "ultra64.h"
+
+u32 __osBbLastRCount;
+u32 __osBbRCountWraps;
+u32 __osBbLastVCount;
+u32 __osBbVCountWraps;
+
+u32 osGetCount(void) {
+ u32 count;
+ u32 mask = __osDisableInt();
+
+ __asm__("mfc0 %0, $%1" : "=r"(count) : "i"(C0_COUNT));
+
+ if (count < __osBbLastRCount) {
+ __osBbRCountWraps++;
+ }
+ __osBbLastRCount = count;
+
+ count = (((u64)__osBbRCountWraps << 32) | count) * 125ull / 192ull;
+
+ if (count < __osBbLastVCount) {
+ __osBbVCountWraps++;
+ }
+ __osBbLastVCount = count;
+
+ __osRestoreInt(mask);
+
+ return count;
+}
+
+#endif
diff --git a/src/libultra/reg/_setcompare.c b/src/libultra/reg/_setcompare.c
new file mode 100644
index 0000000000..810afcd8fb
--- /dev/null
+++ b/src/libultra/reg/_setcompare.c
@@ -0,0 +1,20 @@
+#ifdef BBPLAYER
+#include "ultra64.h"
+
+extern u32 __osBbLastRCount;
+extern u32 __osBbRCountWraps;
+extern u32 __osBbLastVCount;
+extern u32 __osBbVCountWraps;
+
+void __osSetCompare(u32 v) {
+ if (v != 0) {
+ u32 mask = __osDisableInt();
+ u32 wraps = (v < __osBbLastVCount) ? (__osBbVCountWraps + 1) : __osBbVCountWraps;
+
+ v = (((u64)wraps << 32) | v) * 192ull / 125ull;
+
+ __osRestoreInt(mask);
+ }
+ __asm__("mtc0 %0, $%1" ::"r"(v), "i"(C0_COMPARE));
+}
+#endif
diff --git a/src/makerom/entry.s b/src/makerom/entry.s
index 6be493e6b6..870b979d69 100644
--- a/src/makerom/entry.s
+++ b/src/makerom/entry.s
@@ -1,34 +1,59 @@
#include "ultra64/asm.h"
+#include "ultra64/regdef.h"
#include "boot.h"
-.set noreorder
+.text
-.section .text
+#if defined(NON_MATCHING) || defined(__sgi)
+/* Non-matching builds or IDO */
+#define PAD_TO 0x60
+#define LA(reg, sym) la reg, sym
+#define BOOT_STACK_TOP sBootThreadStack + BOOT_STACK_SIZE
+#else
+/* EGCS */
+#define PAD_TO 0x50
+#define LA(reg, sym) \
+ lui reg, %lo(sym##_HI); \
+ ori reg, %lo(sym)
+#endif
-.balign 16
+#if !defined(AVOID_UB)
+/* Old assembler workarounds: The makerom tool in the N64 SDK was given the bss segment size as a const
+ * literal, and since this literal was < 0x10000 it was loaded in one instruction. We don't have access
+ * to the bss segment size until we link everything so we cannot do the same thing. Instead we must load
+ * only the lower 16 bits of the bss size for matching.
+ * When AVOID_UB is enabled, don't do this and instead load the full symbol value, otherwise not all of
+ * bss may be cleared. */
+#if defined(__sgi)
+#define LOAD_BSS_SIZE(reg) li reg, %half(_bootSegmentBssSize)
+#else
+#define LOAD_BSS_SIZE(reg) ori reg, zero, %lo(_bootSegmentBssSize)
+#endif
+#else
+#define LOAD_BSS_SIZE(reg) LA(reg, _bootSegmentBssSize)
+#endif
LEAF(entrypoint)
- // Clear boot segment .bss
- la $t0, _bootSegmentBssStart
-#ifndef AVOID_UB
- // UB: li only loads the lower 16 bits of _bootSegmentBssSize when it may be larger than this,
- // so not all of bss may be cleared if it is too large
- li $t1, _bootSegmentBssSize
-#else
- la $t1, _bootSegmentBssSize
-#endif
+ /* Clear boot segment .bss */
+ LA( t0, _bootSegmentBssStart)
+ LOAD_BSS_SIZE(t1)
.clear_bss:
- addi $t1, $t1, -8
- sw $zero, ($t0)
- sw $zero, 4($t0)
- bnez $t1, .clear_bss
- addi $t0, $t0, 8
- // Set up stack and enter program code
- lui $t2, %hi(bootproc)
- lui $sp, %hi(sBootThreadStack + BOOT_STACK_SIZE)
- addiu $t2, %lo(bootproc)
- jr $t2
- addiu $sp, %lo(sBootThreadStack + BOOT_STACK_SIZE)
+ sw zero, 0(t0)
+ sw zero, 4(t0)
+ addi t0, t0, 8
+ addi t1, t1, -8
+ bnez t1, .clear_bss
+
+ /* Set up stack and enter program code */
+ LA( sp, BOOT_STACK_TOP)
+ LA( t2, bootproc)
+ jr t2
END(entrypoint)
-.fill 0x60 - (. - entrypoint)
+#ifdef __sgi
+/* IDO can't take absolute differences of symbols so the size of the above is hardcoded */
+.space PAD_TO - 0x34
+#else
+/* Pad to a total size taking into account the size of the above */
+.space PAD_TO - (. - entrypoint)
+#endif
diff --git a/src/makerom/ipl3.s b/src/makerom/ipl3.s
deleted file mode 100644
index 45f1c8e6f8..0000000000
--- a/src/makerom/ipl3.s
+++ /dev/null
@@ -1,4 +0,0 @@
-
-.section .text
-
-.incbin "incbin/ipl3"
diff --git a/src/makerom/rom_header.h b/src/makerom/rom_header.h
index 1069ae86fe..65cfc89da3 100644
--- a/src/makerom/rom_header.h
+++ b/src/makerom/rom_header.h
@@ -54,13 +54,13 @@
* and what libultra version (os_ver) it uses.
*
* The hardware revision for a retail N64 is (2,0).
- * The libultra version may be a single letter, without quotes.
+ * The libultra version must be a single char, in quotes.
*/
-#define LIBULTRA_VERSION(hw_major, hw_minor, os_ver) \
+#define OS_VERSION(hw_major, hw_minor, os_ver) \
.half 0; \
.byte (hw_major) * 10 + (hw_minor); \
_os_ver_start = .; \
- .ascii #os_ver ; \
+ .byte (os_ver) ; \
.if (. - _os_ver_start) != 1; \
.error "OS version should be just one letter"; \
.endif
diff --git a/src/makerom/rom_header.s b/src/makerom/rom_header.s
index 525bee6e88..e78e65fde9 100644
--- a/src/makerom/rom_header.s
+++ b/src/makerom/rom_header.s
@@ -1,17 +1,17 @@
#include "rom_header.h"
+#include "ultra64/version.h"
#include "region.h"
#include "versions.h"
/* 0x00 */ ENDIAN_IDENTIFIER
/* 0x01 */ PI_DOMAIN_1_CFG(64, 18, 7, 3)
/* 0x04 */ SYSTEM_CLOCK_RATE_SETTING(0xF)
-/* 0x08 */ ENTRYPOINT(0x80000400)
-#if PLATFORM_N64
-/* 0x0C */ LIBULTRA_VERSION(2, 0, I)
-#else
-/* 0x0C */ LIBULTRA_VERSION(2, 0, L)
-#endif
+/* 0x08 */ ENTRYPOINT(entrypoint)
+/* 0x0C */ OS_VERSION(2, 0, LIBULTRA_VERSION)
/* 0x10 */ CHECKSUM()
+
+#if !PLATFORM_IQUE
+
/* 0x18 */ PADDING(8)
/* 0x20 */ ROM_NAME("THE LEGEND OF ZELDA")
/* 0x34 */ PADDING(7)
@@ -27,13 +27,13 @@
/* 0x3E */ REGION(JP)
#elif OOT_REGION == REGION_EU
/* 0x3E */ REGION(PAL)
-#endif
-#if OOT_VERSION == NTSC_1_0 || OOT_VERSION == PAL_1_0
-/* 0x3F */ GAME_REVISION(0)
-#elif OOT_VERSION == NTSC_1_1 || OOT_VERSION == PAL_1_1
-/* 0x3F */ GAME_REVISION(1)
-#elif OOT_VERSION == NTSC_1_2
-/* 0x3F */ GAME_REVISION(2)
#else
-/* 0x3F */ GAME_REVISION(15)
+#error "Unknown OOT_REGION"
+#endif
+/* 0x3F */ GAME_REVISION(OOT_REVISION)
+
+#else
+
+ .fill 0x40 - 0x18
+
#endif
diff --git a/src/n64dd/n64dd_801C8000.c b/src/n64dd/n64dd_801C8000.c
index 3bf7159aab..2212fe43fb 100644
--- a/src/n64dd/n64dd_801C8000.c
+++ b/src/n64dd/n64dd_801C8000.c
@@ -1,7 +1,10 @@
// Does some command processing
-#include "global.h"
+
#include "n64dd.h"
+
+#include "array_count.h"
#include "versions.h"
+#include "z_locale.h"
void func_801C8554(void);
void func_801C8578(void* arg0, void* arg1, OSId id, void* sp, OSPri pri);
@@ -301,7 +304,7 @@ s32 func_801C885C(void) {
B_801E0D18.unk_64 = 3;
func_801C85F0(&B_801E0D18, 1);
-#if OOT_VERSION > NTSC_1_0
+#if OOT_VERSION >= NTSC_1_1
D_801D2E90 = 0;
#endif
@@ -317,7 +320,7 @@ s32 func_801C88AC(void) {
B_801E0D18.unk_64 = 4;
func_801C85F0(&B_801E0D18, 1);
-#if OOT_VERSION > NTSC_1_0
+#if OOT_VERSION >= NTSC_1_1
D_801D2E90 = 0;
#endif
diff --git a/src/n64dd/n64dd_801C8940.c b/src/n64dd/n64dd_801C8940.c
index 437a23dcf2..132222b689 100644
--- a/src/n64dd/n64dd_801C8940.c
+++ b/src/n64dd/n64dd_801C8940.c
@@ -1,7 +1,9 @@
// Lower-level command processing in a background thread
-#include "global.h"
#include "n64dd.h"
+#include "libc64/sleep.h"
+#include "attributes.h"
+
s32 D_801D2EA0 = 0;
u8* D_801D2EA4 = NULL;
s32 D_801D2EA8 = 0;
diff --git a/src/n64dd/n64dd_801C9440.c b/src/n64dd/n64dd_801C9440.c
index 2d0b1b5c01..ecab855d4a 100644
--- a/src/n64dd/n64dd_801C9440.c
+++ b/src/n64dd/n64dd_801C9440.c
@@ -1,5 +1,4 @@
// Some text-handling functions
-#include "global.h"
#include "n64dd.h"
#include "versions.h"
diff --git a/src/n64dd/n64dd_801C9B70.c b/src/n64dd/n64dd_801C9B70.c
index d7d2f63849..2437904c37 100644
--- a/src/n64dd/n64dd_801C9B70.c
+++ b/src/n64dd/n64dd_801C9B70.c
@@ -1,6 +1,6 @@
// User-facing error handling
-#include "global.h"
#include "n64dd.h"
+#include "z_locale.h"
u8 B_801E0F80[0x600];
u8 B_801E1580[0x2800];
diff --git a/src/n64dd/n64dd_801CA0B0.c b/src/n64dd/n64dd_801CA0B0.c
index 8758e0fd62..8252def9e5 100644
--- a/src/n64dd/n64dd_801CA0B0.c
+++ b/src/n64dd/n64dd_801CA0B0.c
@@ -1,6 +1,10 @@
-#include "global.h"
#include "n64dd.h"
+#include "libc64/aprintf.h"
+#include "attributes.h"
+#include "array_count.h"
+#include "color.h"
+
// Draws text to framebuffer
typedef struct struct_801CA704 {
/* 0x00 */ PrintCallback callback;
diff --git a/src/n64dd/n64dd_data_buffer.c b/src/n64dd/n64dd_data_buffer.c
index 6aacae2d57..d4dfeb3363 100644
--- a/src/n64dd/n64dd_data_buffer.c
+++ b/src/n64dd/n64dd_data_buffer.c
@@ -1,4 +1,3 @@
-#include "global.h"
#include "n64dd.h"
// Buffer used for reading from the disk?
diff --git a/src/n64dd/n64dd_error_bodies.c b/src/n64dd/n64dd_error_bodies.c
index 757e1afb6b..9c990d76bf 100644
--- a/src/n64dd/n64dd_error_bodies.c
+++ b/src/n64dd/n64dd_error_bodies.c
@@ -1,4 +1,3 @@
-#include "global.h"
#include "n64dd.h"
const char* D_801D2EE0[2][8][4] = {
diff --git a/src/n64dd/n64dd_error_headers.c b/src/n64dd/n64dd_error_headers.c
index b14d80fba5..ee7d611c21 100644
--- a/src/n64dd/n64dd_error_headers.c
+++ b/src/n64dd/n64dd_error_headers.c
@@ -1,4 +1,3 @@
-#include "global.h"
#include "n64dd.h"
// Padding in .rodata suggests that these are in a separate file
diff --git a/src/n64dd/n64dd_error_textures.c b/src/n64dd/n64dd_error_textures.c
index 037ed7835b..38b42de363 100644
--- a/src/n64dd/n64dd_error_textures.c
+++ b/src/n64dd/n64dd_error_textures.c
@@ -1,23 +1,19 @@
#include "ultra64.h"
-#if PLATFORM_N64
-
u64 gN64DDError41Texs[2][0x600 / sizeof(u64)] = {
{
-#include "assets/n64dd/error_textures/n64dd_error_41_jpn.i4.inc.c"
+#include "assets/n64dd/error_textures/gN64DDError41JPNTex.i4.inc.c"
},
{
-#include "assets/n64dd/error_textures/n64dd_error_41_eng.i4.inc.c"
+#include "assets/n64dd/error_textures/gN64DDError41ENGTex.i4.inc.c"
},
};
u64 gN64DDPleaseReadManualTexs[2][0x2800 / sizeof(u64)] = {
{
-#include "assets/n64dd/error_textures/n64dd_please_read_manual_jpn.i4.inc.c"
+#include "assets/n64dd/error_textures/gN64DDPleaseReadManualJPNTex.i4.inc.c"
},
{
-#include "assets/n64dd/error_textures/n64dd_please_read_manual_eng.i4.inc.c"
+#include "assets/n64dd/error_textures/gN64DDPleaseReadManualENGTex.i4.inc.c"
},
};
-
-#endif
diff --git a/src/n64dd/z_n64dd.c b/src/n64dd/z_n64dd.c
index fd06d02526..4b750514df 100644
--- a/src/n64dd/z_n64dd.c
+++ b/src/n64dd/z_n64dd.c
@@ -1,12 +1,22 @@
// Main interface for the 64DD from the rest of the game. Starts background
// threads and provides functions to submit commands to them.
-#include "global.h"
-#include "fault.h"
-#include "n64dd.h"
-#include "stack.h"
-#include "versions.h"
-#pragma increment_block_number "ntsc-1.2:128"
+#include "n64dd.h"
+
+#include "libc64/sleep.h"
+#include "array_count.h"
+#include "fault.h"
+#include "gfx.h"
+#include "irqmgr.h"
+#include "line_numbers.h"
+#include "stack.h"
+#include "stackcheck.h"
+#include "sys_freeze.h"
+#include "versions.h"
+#include "z64audio.h"
+#include "z64thread.h"
+
+#pragma increment_block_number "ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
typedef struct struct_801D9C30 {
/* 0x000 */ s32 unk_000; // disk start
@@ -112,14 +122,9 @@ void func_801C6FD8(void) {
// Adds a HungupAndCrash
void func_801C7018(void) {
if (D_80121213 != 0) {
-#if OOT_VERSION == NTSC_1_0
- Fault_AddHungupAndCrash("../z_n64dd.c", 503);
-#elif OOT_VERSION == NTSC_1_1
- Fault_AddHungupAndCrash("../z_n64dd.c", 551);
-#else
- Fault_AddHungupAndCrash("../z_n64dd.c", 573);
-#endif
+ Fault_AddHungupAndCrash("../z_n64dd.c", LN2(503, 551, 573));
}
+
D_80121213 = 1;
}
@@ -131,7 +136,7 @@ s32 func_801C7064(void) {
s32 func_801C7098(void) {
s32 phi_v1;
-#if OOT_VERSION <= NTSC_1_1
+#if OOT_VERSION < PAL_1_0
if (0) {}
#endif
@@ -186,7 +191,7 @@ void func_801C711C(void* arg) {
IrqMgr_RemoveClient(arg0->unk_98, &arg0->unk_90);
}
-#if OOT_VERSION > NTSC_1_0
+#if OOT_VERSION >= NTSC_1_1
void func_801C7B28_ne2(void) {
s32 temp;
@@ -215,7 +220,7 @@ void func_801C7268(void) {
} else if (B_801D9DC8 != 0) {
B_801D9DC8 = 0;
}
-#if OOT_VERSION == NTSC_1_0
+#if OOT_VERSION < NTSC_1_1
if (B_801D9DC0 != 0) {
sp1C = (osGetTime() - B_801D9DC0) * 64 / 3000;
@@ -268,7 +273,7 @@ void func_801C746C(void* arg0, void* arg1, void* arg2) {
if (arg2 != NULL) {
func_801CA1F0(arg2, 0, 176, 320, 32, 11, sp2C, SCREEN_WIDTH);
}
-#if OOT_VERSION <= NTSC_1_1
+#if OOT_VERSION < PAL_1_0
osViBlack(0);
#endif
}
@@ -306,7 +311,7 @@ s32 func_801C7658(void) {
return 0;
}
-#if OOT_VERSION <= NTSC_1_1
+#if OOT_VERSION < PAL_1_0
StackCheck_Init(&B_801DAF88, B_801D9F88, STACK_TOP(B_801D9F88), 0, 0x100, "ddmsg");
osCreateThread(&B_801D9DD8, THREAD_ID_DDMSG, &func_801C711C, &B_801D9B90, STACK_TOP(B_801D9F88), THREAD_PRI_DDMSG);
osStartThread(&B_801D9DD8);
@@ -338,7 +343,7 @@ s32 func_801C7658(void) {
B_801D9D50.unk_00 = 13;
(&func_801C8000)(&B_801D9D50);
-#if OOT_VERSION > NTSC_1_1
+#if OOT_VERSION >= PAL_1_0
StackCheck_Init(&B_801DAF88, B_801D9F88, STACK_TOP(B_801D9F88), 0, 0x100, "ddmsg");
osCreateThread(&B_801D9DD8, THREAD_ID_DDMSG, &func_801C711C, &B_801D9B90, STACK_TOP(B_801D9F88), THREAD_PRI_DDMSG);
osStartThread(&B_801D9DD8);
@@ -348,7 +353,7 @@ s32 func_801C7658(void) {
}
s32 func_801C7818(void) {
-#if OOT_VERSION > NTSC_1_0
+#if OOT_VERSION >= NTSC_1_1
B_801D9DB8 = 1;
B_801D9DC0 = 0;
#endif
@@ -361,7 +366,7 @@ s32 func_801C7818(void) {
Sleep_Usec(1000000 * 1 / 60);
}
-#if OOT_VERSION > NTSC_1_0
+#if OOT_VERSION >= NTSC_1_1
if (D_801D2EA8 == 1 || B_801E0F60 == 1 || B_801E0F64 == 1) {
B_801D9DC0 = osGetTime();
}
@@ -519,7 +524,7 @@ void func_801C7C1C(void* dest, s32 offset, s32 size) {
bcopy((u8*)sp4C, (u8*)dest + func_801C7BEC(sp5C) - sp54 + var_s1, sp50);
}
}
-#if OOT_VERSION == NTSC_1_0
+#if OOT_VERSION < NTSC_1_1
if (B_801D9DC0 != 0) {
temp_v1_2 = (osGetTime() - B_801D9DC0) * 64 / 3000;
if (1000000 - temp_v1_2 > 0) {
diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c
index 63f929d43e..9ca642d4e9 100644
--- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c
+++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c
@@ -1,7 +1,19 @@
#include "z_arms_hook.h"
+
+#include "libc64/math64.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z_lib.h"
+
#include "assets/objects/object_link_boy/object_link_boy.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void ArmsHook_Init(Actor* thisx, PlayState* play);
void ArmsHook_Destroy(Actor* thisx, PlayState* play);
@@ -74,9 +86,10 @@ void ArmsHook_Init(Actor* thisx, PlayState* play) {
void ArmsHook_Destroy(Actor* thisx, PlayState* play) {
ArmsHook* this = (ArmsHook*)thisx;
- if (this->grabbed != NULL) {
- this->grabbed->flags &= ~ACTOR_FLAG_13;
+ if (this->attachedActor != NULL) {
+ this->attachedActor->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED;
}
+
Collider_DestroyQuad(play, &this->collider);
}
@@ -93,7 +106,12 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) {
}
}
-void func_80865044(ArmsHook* this) {
+/**
+ * Start pulling Player so he flies toward the hookshot's current location.
+ * Setting Player's parent pointer indicates that he should begin flying.
+ * See `Player_UpdateUpperBody` and `Player_Action_HookshotFly` for Player's side of the interation.
+ */
+void ArmsHook_PullPlayer(ArmsHook* this) {
this->actor.child = this->actor.parent;
this->actor.parent->parent = &this->actor;
}
@@ -109,10 +127,10 @@ s32 ArmsHook_AttachToPlayer(ArmsHook* this, Player* player) {
return false;
}
-void ArmsHook_DetachHookFromActor(ArmsHook* this) {
- if (this->grabbed != NULL) {
- this->grabbed->flags &= ~ACTOR_FLAG_13;
- this->grabbed = NULL;
+void ArmsHook_DetachFromActor(ArmsHook* this) {
+ if (this->attachedActor != NULL) {
+ this->attachedActor->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED;
+ this->attachedActor = NULL;
}
}
@@ -123,7 +141,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) {
if ((player->itemAction != player->heldItemAction) || (player->actor.flags & ACTOR_FLAG_TALK) ||
((player->stateFlags1 & (PLAYER_STATE1_DEAD | PLAYER_STATE1_26)))) {
this->timer = 0;
- ArmsHook_DetachHookFromActor(this);
+ ArmsHook_DetachFromActor(this);
Math_Vec3f_Copy(&this->actor.world.pos, &player->unk_3C8);
return 1;
}
@@ -131,17 +149,17 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) {
return 0;
}
-void ArmsHook_AttachHookToActor(ArmsHook* this, Actor* actor) {
- actor->flags |= ACTOR_FLAG_13;
- this->grabbed = actor;
- Math_Vec3f_Diff(&actor->world.pos, &this->actor.world.pos, &this->grabbedDistDiff);
+void ArmsHook_AttachToActor(ArmsHook* this, Actor* actor) {
+ actor->flags |= ACTOR_FLAG_HOOKSHOT_ATTACHED;
+ this->attachedActor = actor;
+ Math_Vec3f_Diff(&actor->world.pos, &this->actor.world.pos, &this->attachPointOffset);
}
void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((this->actor.parent == NULL) || (!Player_HoldsHookshot(player))) {
- ArmsHook_DetachHookFromActor(this);
+ ArmsHook_DetachFromActor(this);
Actor_Kill(&this->actor);
return;
}
@@ -153,11 +171,13 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
(this->collider.elem.atHitElem->elemMaterial != ELEM_MATERIAL_UNK4)) {
Actor* touchedActor = this->collider.base.at;
- if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_9 | ACTOR_FLAG_10))) {
+ if ((touchedActor->update != NULL) &&
+ (touchedActor->flags & (ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER))) {
if (this->collider.elem.atHitElem->acElemFlags & ACELEM_HOOKABLE) {
- ArmsHook_AttachHookToActor(this, touchedActor);
- if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_10)) {
- func_80865044(this);
+ ArmsHook_AttachToActor(this, touchedActor);
+
+ if (ACTOR_FLAGS_CHECK_ALL(touchedActor, ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)) {
+ ArmsHook_PullPlayer(this);
}
}
}
@@ -168,41 +188,50 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
}
if (DECR(this->timer) == 0) {
- Actor* grabbed;
+ Actor* attachedActor;
Vec3f bodyDistDiffVec;
Vec3f newPos;
f32 bodyDistDiff;
f32 phi_f16;
s32 pad1;
- f32 curGrabbedDist;
- f32 grabbedDist;
+ f32 curActorOffsetXYZ;
+ f32 attachPointOffsetXYZ;
f32 velocity;
- grabbed = this->grabbed;
- if (grabbed != NULL) {
- if ((grabbed->update == NULL) || !CHECK_FLAG_ALL(grabbed->flags, ACTOR_FLAG_13)) {
- grabbed = NULL;
- this->grabbed = NULL;
+ attachedActor = this->attachedActor;
+
+ if (attachedActor != NULL) {
+ if ((attachedActor->update == NULL) ||
+ !ACTOR_FLAGS_CHECK_ALL(attachedActor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
+ attachedActor = NULL;
+ this->attachedActor = NULL;
} else if (this->actor.child != NULL) {
- curGrabbedDist = Actor_WorldDistXYZToActor(&this->actor, grabbed);
- grabbedDist =
- sqrtf(SQ(this->grabbedDistDiff.x) + SQ(this->grabbedDistDiff.y) + SQ(this->grabbedDistDiff.z));
- Math_Vec3f_Diff(&grabbed->world.pos, &this->grabbedDistDiff, &this->actor.world.pos);
- if ((curGrabbedDist - grabbedDist) > 50.0f) {
- ArmsHook_DetachHookFromActor(this);
- grabbed = NULL;
+ curActorOffsetXYZ = Actor_WorldDistXYZToActor(&this->actor, attachedActor);
+ attachPointOffsetXYZ = sqrtf(SQ(this->attachPointOffset.x) + SQ(this->attachPointOffset.y) +
+ SQ(this->attachPointOffset.z));
+
+ // Keep the hookshot actor at the same relative offset as the initial attachment even if the actor moves
+ Math_Vec3f_Diff(&attachedActor->world.pos, &this->attachPointOffset, &this->actor.world.pos);
+
+ // If the actor the hookshot is attached to is moving, the hookshot's current relative
+ // position will be different than the initial attachment position.
+ // If the distance between those two points is larger than 50 units, detach the hookshot.
+ if ((curActorOffsetXYZ - attachPointOffsetXYZ) > 50.0f) {
+ ArmsHook_DetachFromActor(this);
+ attachedActor = NULL;
}
}
}
bodyDistDiff = Math_Vec3f_DistXYZAndStoreDiff(&player->unk_3C8, &this->actor.world.pos, &bodyDistDiffVec);
+
if (bodyDistDiff < 30.0f) {
velocity = 0.0f;
phi_f16 = 0.0f;
} else {
if (this->actor.child != NULL) {
velocity = 30.0f;
- } else if (grabbed != NULL) {
+ } else if (attachedActor != NULL) {
velocity = 50.0f;
} else {
velocity = 200.0f;
@@ -219,23 +248,25 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
newPos.z = bodyDistDiffVec.z * velocity;
if (this->actor.child == NULL) {
- if ((grabbed != NULL) && (grabbed->id == ACTOR_BG_SPOT06_OBJECTS)) {
- Math_Vec3f_Diff(&grabbed->world.pos, &this->grabbedDistDiff, &this->actor.world.pos);
+ // Not pulling Player
+ if ((attachedActor != NULL) && (attachedActor->id == ACTOR_BG_SPOT06_OBJECTS)) {
+ Math_Vec3f_Diff(&attachedActor->world.pos, &this->attachPointOffset, &this->actor.world.pos);
phi_f16 = 1.0f;
} else {
Math_Vec3f_Sum(&player->unk_3C8, &newPos, &this->actor.world.pos);
- if (grabbed != NULL) {
- Math_Vec3f_Sum(&this->actor.world.pos, &this->grabbedDistDiff, &grabbed->world.pos);
+ if (attachedActor != NULL) {
+ Math_Vec3f_Sum(&this->actor.world.pos, &this->attachPointOffset, &attachedActor->world.pos);
}
}
} else {
+ // Pulling Player
Math_Vec3f_Diff(&bodyDistDiffVec, &newPos, &player->actor.velocity);
player->actor.world.rot.x =
Math_Atan2S(sqrtf(SQ(bodyDistDiffVec.x) + SQ(bodyDistDiffVec.z)), -bodyDistDiffVec.y);
}
if (phi_f16 < 50.0f) {
- ArmsHook_DetachHookFromActor(this);
+ ArmsHook_DetachFromActor(this);
if (phi_f16 == 0.0f) {
ArmsHook_SetupAction(this, ArmsHook_Wait);
if (ArmsHook_AttachToPlayer(this, player)) {
@@ -274,11 +305,12 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
if (bgId != BGCHECK_SCENE) {
dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId);
+
if (dynaPolyActor != NULL) {
- ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor);
+ ArmsHook_AttachToActor(this, &dynaPolyActor->actor);
}
}
- func_80865044(this);
+ ArmsHook_PullPlayer(this);
Audio_PlaySfxGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
} else {
diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h
index b624599a53..ad50194506 100644
--- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h
+++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.h
@@ -2,11 +2,12 @@
#define Z_ARMS_HOOK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64player.h"
struct ArmsHook;
-typedef void (*ArmsHookActionFunc)(struct ArmsHook*, PlayState*);
+typedef void (*ArmsHookActionFunc)(struct ArmsHook*, struct PlayState*);
typedef struct ArmsHook {
/* 0x0000 */ Actor actor;
@@ -14,8 +15,8 @@ typedef struct ArmsHook {
/* 0x01CC */ WeaponInfo hookInfo;
/* 0x01E8 */ Vec3f unk_1E8;
/* 0x01F4 */ Vec3f unk_1F4;
- /* 0x0200 */ Actor* grabbed;
- /* 0x0204 */ Vec3f grabbedDistDiff;
+ /* 0x0200 */ Actor* attachedActor;
+ /* 0x0204 */ Vec3f attachPointOffset; // Distance from the hookshot attach point to world pos of `attachedActor`
/* 0x0210 */ s16 timer;
/* 0x0214 */ ArmsHookActionFunc actionFunc;
} ArmsHook; // size = 0x0218
diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c
index d75efab0c9..a92c226117 100644
--- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c
+++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c
@@ -7,7 +7,16 @@
#include "z_arrow_fire.h"
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void ArrowFire_Init(Actor* thisx, PlayState* play);
void ArrowFire_Destroy(Actor* thisx, PlayState* play);
@@ -33,7 +42,7 @@ ActorProfile Arrow_Fire_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_STOP),
};
void ArrowFire_SetupAction(ArrowFire* this, ArrowFireActionFunc actionFunc) {
diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.h b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.h
index 44af3decf3..a04b496a11 100644
--- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.h
+++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.h
@@ -2,11 +2,11 @@
#define Z_ARROW_FIRE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ArrowFire;
-typedef void (*ArrowFireActionFunc)(struct ArrowFire*, PlayState*);
+typedef void (*ArrowFireActionFunc)(struct ArrowFire*, struct PlayState*);
typedef struct ArrowFire {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c
index 010a110a13..953e0a333c 100644
--- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c
+++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c
@@ -5,10 +5,18 @@
*/
#include "z_arrow_ice.h"
-
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void ArrowIce_Init(Actor* thisx, PlayState* play);
void ArrowIce_Destroy(Actor* thisx, PlayState* play);
@@ -34,7 +42,7 @@ ActorProfile Arrow_Ice_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_STOP),
};
void ArrowIce_SetupAction(ArrowIce* this, ArrowIceActionFunc actionFunc) {
diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.h b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.h
index 1a6ed24b36..7494aefa9d 100644
--- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.h
+++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.h
@@ -2,11 +2,11 @@
#define Z_ARROW_ICE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ArrowIce;
-typedef void (*ArrowIceActionFunc)(struct ArrowIce*, PlayState*);
+typedef void (*ArrowIceActionFunc)(struct ArrowIce*, struct PlayState*);
typedef struct ArrowIce {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c
index 9a0691649b..100b8c20c1 100644
--- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c
+++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c
@@ -5,10 +5,18 @@
*/
#include "z_arrow_light.h"
-
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void ArrowLight_Init(Actor* thisx, PlayState* play);
void ArrowLight_Destroy(Actor* thisx, PlayState* play);
@@ -34,7 +42,7 @@ ActorProfile Arrow_Light_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_STOP),
};
void ArrowLight_SetupAction(ArrowLight* this, ArrowLightActionFunc actionFunc) {
diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.h b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.h
index 78bef515e5..ee4b678961 100644
--- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.h
+++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.h
@@ -2,11 +2,11 @@
#define Z_ARROW_LIGHT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ArrowLight;
-typedef void (*ArrowLightActionFunc)(struct ArrowLight*, PlayState*);
+typedef void (*ArrowLightActionFunc)(struct ArrowLight*, struct PlayState*);
typedef struct ArrowLight {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c
index 055f93e200..f8529bb775 100644
--- a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c
+++ b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c
@@ -5,10 +5,24 @@
*/
#include "z_bg_bdan_objects.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
#include "quake.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_bdan_objects/object_bdan_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum BgBdanObjectsPropertyGetter {
JABU_OBJECTS_GET_PROP_CAM_SETTING_NORMAL0 = 0,
@@ -95,7 +109,9 @@ s32 BgBdanObjects_GetProperty(BgBdanObjects* this, s32 arg1) {
case JABU_OBJECTS_GET_PROP_CAM_SETTING_DUNGEON1:
return this->cameraSetting == CAM_SET_DUNGEON1;
default:
- PRINTF("Bg_Bdan_Objects_Get_Contact_Ru1\nそんな受信モードは無い%d!!!!!!!!\n", arg1);
+ PRINTF(T("Bg_Bdan_Objects_Get_Contact_Ru1\nそんな受信モードは無い%d!!!!!!!!\n",
+ "Bg_Bdan_Objects_Get_Contact_Ru1\nThere is no such receiving mode %d!!!!!!!!\n"),
+ arg1);
return -1;
}
}
@@ -112,7 +128,9 @@ void BgBdanObjects_SetProperty(BgBdanObjects* this, s32 arg1) {
SET_INFTABLE(INFTABLE_146);
break;
default:
- PRINTF("Bg_Bdan_Objects_Set_Contact_Ru1\nそんな送信モードは無い%d!!!!!!!!\n", arg1);
+ PRINTF(T("Bg_Bdan_Objects_Set_Contact_Ru1\nそんな送信モードは無い%d!!!!!!!!\n",
+ "Bg_Bdan_Objects_Set_Contact_Ru1\nThere is no such transmission mode %d!!!!!!!!\n"),
+ arg1);
}
}
@@ -126,7 +144,7 @@ void BgBdanObjects_Init(Actor* thisx, PlayState* play) {
this->var.switchFlag = PARAMS_GET_U(thisx->params, 8, 6);
thisx->params &= 0xFF;
if (thisx->params == JABU_OBJECTS_TYPE_WATERBOX_HEIGHT_CHANGER) {
- thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
play->colCtx.colHeader->waterBoxes[7].ySurface = thisx->world.pos.y;
this->actionFunc = BgBdanObjects_WaitForSwitch;
return;
diff --git a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h
index 6c802bb3f6..e8729bb983 100644
--- a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h
+++ b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h
@@ -2,7 +2,7 @@
#define Z_BG_BDAN_OBJECTS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgBdanObjects;
@@ -13,7 +13,7 @@ typedef enum BgBdanObjectsType {
JABU_OBJECTS_TYPE_FALLING_PLATFORM
} BgBdanObjectsType;
-typedef void (*BgBdanObjectsActionFunc)(struct BgBdanObjects*, PlayState*);
+typedef void (*BgBdanObjectsActionFunc)(struct BgBdanObjects*, struct PlayState*);
typedef struct BgBdanObjects {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c
index e370341932..0dcb302eaa 100644
--- a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c
+++ b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c
@@ -5,9 +5,21 @@
*/
#include "z_bg_bdan_switch.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_bdan_objects/object_bdan_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgBdanSwitch_Init(Actor* thisx, PlayState* play);
void BgBdanSwitch_Destroy(Actor* thisx, PlayState* play);
@@ -82,9 +94,9 @@ static ColliderJntSphInit sJntSphInit = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 1400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1200, ICHAIN_STOP),
};
static Vec3f D_8086E0E0 = { 0.0f, 140.0f, 0.0f };
@@ -97,12 +109,13 @@ void BgBdanSwitch_InitDynaPoly(BgBdanSwitch* this, PlayState* play, CollisionHea
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_bdan_switch.c", 325,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_bdan_switch.c", 325, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -110,7 +123,7 @@ void BgBdanSwitch_InitDynaPoly(BgBdanSwitch* this, PlayState* play, CollisionHea
void BgBdanSwitch_InitCollision(BgBdanSwitch* this, PlayState* play) {
Actor* actor = &this->dyna.actor;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, actor, &sJntSphInit, this->colliderElements);
}
void func_8086D0EC(BgBdanSwitch* this) {
@@ -196,11 +209,13 @@ void BgBdanSwitch_Init(Actor* thisx, PlayState* play) {
}
break;
default:
- PRINTF("不正な ARG_DATA(arg_data 0x%04x)(%s %d)\n", this->dyna.actor.params, "../z_bg_bdan_switch.c", 454);
+ PRINTF(T("不正な", "Invalid") " ARG_DATA(arg_data 0x%04x)(%s %d)\n", this->dyna.actor.params,
+ "../z_bg_bdan_switch.c", 454);
Actor_Kill(&this->dyna.actor);
return;
}
- PRINTF("(巨大魚ダンジョン 専用スイッチ)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF(T("(巨大魚ダンジョン 専用スイッチ)", "(Giant Fish Dungeon Special Switch)") "(arg_data 0x%04x)\n",
+ this->dyna.actor.params);
}
void BgBdanSwitch_Destroy(Actor* thisx, PlayState* play) {
@@ -251,7 +266,7 @@ void func_8086D5C4(BgBdanSwitch* this) {
void func_8086D5E0(BgBdanSwitch* this, PlayState* play) {
switch (PARAMS_GET_U(this->dyna.actor.params, 0, 8)) {
case BLUE:
- if (func_800435B4(&this->dyna)) {
+ if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
func_8086D67C(this);
func_8086D4B4(this, play);
}
@@ -290,7 +305,7 @@ void func_8086D730(BgBdanSwitch* this) {
void func_8086D754(BgBdanSwitch* this, PlayState* play) {
switch (PARAMS_GET_U(this->dyna.actor.params, 0, 8)) {
case BLUE:
- if (!func_800435B4(&this->dyna)) {
+ if (!DynaPolyActor_IsSwitchPressed(&this->dyna)) {
if (this->unk_1D8 <= 0) {
func_8086D7FC(this);
func_8086D548(this, play);
diff --git a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h
index b7914a4f0d..f86ef79e3e 100644
--- a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h
+++ b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h
@@ -2,7 +2,7 @@
#define Z_BG_BDAN_SWITCH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum BgBdanSwitchType {
/* 0x00 */ BLUE,
@@ -14,13 +14,13 @@ typedef enum BgBdanSwitchType {
struct BgBdanSwitch;
-typedef void (*BgBdanSwitchActionFunc)(struct BgBdanSwitch*, PlayState*);
+typedef void (*BgBdanSwitchActionFunc)(struct BgBdanSwitch*, struct PlayState*);
typedef struct BgBdanSwitch {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgBdanSwitchActionFunc actionFunc;
/* 0x0168 */ ColliderJntSph collider;
- /* 0x0188 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0188 */ ColliderJntSphElement colliderElements[1];
/* 0x01C8 */ f32 unk_1C8;
/* 0x01CC */ s16 unk_1CC;
/* 0x01CE */ char unk_1CE[0x2];
diff --git a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c
index 729dd81552..bee0e2484c 100644
--- a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c
+++ b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c
@@ -6,10 +6,16 @@
#include "z_bg_bom_guard.h"
#include "overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h"
-#include "assets/objects/object_bowl/object_bowl.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "printf.h"
+#include "regs.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
+
+#include "assets/objects/object_bowl/object_bowl.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgBomGuard_Init(Actor* thisx, PlayState* play);
void BgBomGuard_Destroy(Actor* thisx, PlayState* play);
@@ -43,7 +49,7 @@ void BgBomGuard_Init(Actor* thisx, PlayState* play) {
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
PRINTF("\n\n");
- PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 透明ガード出現 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ " T("透明ガード出現", "Transparent guard appears") " ☆☆☆☆☆ \n" VT_RST);
thisx->scale.x = 1.0f;
thisx->scale.y = 1.0f;
diff --git a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.h b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.h
index 9df9ab2670..47e167de8a 100644
--- a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.h
+++ b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.h
@@ -2,11 +2,11 @@
#define Z_BG_BOM_GUARD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgBomGuard;
-typedef void (*BgBomGuardActionFunc)(struct BgBomGuard*, PlayState*);
+typedef void (*BgBomGuardActionFunc)(struct BgBomGuard*, struct PlayState*);
typedef struct BgBomGuard {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c
index 82daa4e13e..6db143bdf8 100644
--- a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c
+++ b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c
@@ -5,6 +5,14 @@
*/
#include "z_bg_bombwall.h"
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS ACTOR_FLAG_IGNORE_POINT_LIGHTS
@@ -91,9 +99,8 @@ void BgBombwall_InitDynapoly(BgBombwall* this, PlayState* play) {
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
if (this->dyna.bgId == BG_ACTOR_MAX) {
- // "Warning : move BG login failed"
- PRINTF("Warning : move BG 登録失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_bombwall.c", 243,
- this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗", "Warning : move BG registration failed") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_bombwall.c", 243, this->dyna.actor.params);
}
}
@@ -104,9 +111,9 @@ void BgBombwall_RotateVec(Vec3f* arg0, Vec3f* arg1, f32 arg2, f32 arg3) {
}
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 1800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 300, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 300, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgBombwall_Init(Actor* thisx, PlayState* play) {
@@ -128,7 +135,7 @@ void BgBombwall_Init(Actor* thisx, PlayState* play) {
BgBombwall_InitDynapoly(this, play);
this->unk_2A2 |= 2;
Collider_InitTris(play, &this->collider);
- Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderItems);
+ Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderElements);
for (i = 0; i <= 2; i++) {
for (j = 0; j <= 2; j++) {
@@ -149,8 +156,8 @@ void BgBombwall_Init(Actor* thisx, PlayState* play) {
func_8086ED50(this, play);
}
- PRINTF("(field keep 汎用爆弾壁)(arg_data 0x%04x)(angY %d)\n", this->dyna.actor.params,
- this->dyna.actor.shape.rot.y);
+ PRINTF("(field keep " T("汎用爆弾壁", "general purpose bomb wall") ")(arg_data 0x%04x)(angY %d)\n",
+ this->dyna.actor.params, this->dyna.actor.shape.rot.y);
}
void BgBombwall_DestroyCollision(BgBombwall* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.h b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.h
index f5c9cd2b51..8cd1bb879f 100644
--- a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.h
+++ b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.h
@@ -2,16 +2,16 @@
#define Z_BG_BOMBWALL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgBombwall;
-typedef void (*BgBombwallActionFunc)(struct BgBombwall*, PlayState*);
+typedef void (*BgBombwallActionFunc)(struct BgBombwall*, struct PlayState*);
typedef struct BgBombwall {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderTris collider;
- /* 0x0184 */ ColliderTrisElement colliderItems[3];
+ /* 0x0184 */ ColliderTrisElement colliderElements[3];
/* 0x0298 */ BgBombwallActionFunc actionFunc;
/* 0x029C */ Gfx* dList;
/* 0x02A0 */ s16 unk_2A0;
diff --git a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c
index fa3de785f4..e0c0e1c4fd 100644
--- a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c
+++ b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c
@@ -7,11 +7,23 @@
#include "z_bg_bowl_wall.h"
#include "overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
-#include "assets/objects/object_bowl/object_bowl.h"
-#include "quake.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "quake.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
+#include "assets/objects/object_bowl/object_bowl.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgBowlWall_Init(Actor* thisx, PlayState* play);
void BgBowlWall_Destroy(Actor* thisx, PlayState* play);
@@ -62,7 +74,9 @@ void BgBowlWall_Init(Actor* thisx, PlayState* play) {
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
this->initPos = this->dyna.actor.world.pos;
PRINTF("\n\n");
- PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ ボーリングおじゃま壁発生 ☆☆☆☆☆ %d\n" VT_RST, this->dyna.actor.params);
+ PRINTF(
+ VT_FGCOL(GREEN) " ☆☆☆☆☆ " T("ボーリングおじゃま壁発生", "Bowling obstacle wall appears") " ☆☆☆☆☆ %d\n" VT_RST,
+ this->dyna.actor.params);
this->actionFunc = BgBowlWall_SpawnBullseyes;
this->dyna.actor.scale.x = this->dyna.actor.scale.y = this->dyna.actor.scale.z = 1.0f;
}
diff --git a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h
index 12a4bdf3a4..ac743fe7f1 100644
--- a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h
+++ b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h
@@ -2,12 +2,12 @@
#define Z_BG_BOWL_WALL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h"
struct BgBowlWall;
-typedef void (*BgBowlWallActionFunc)(struct BgBowlWall*, PlayState*);
+typedef void (*BgBowlWallActionFunc)(struct BgBowlWall*, struct PlayState*);
typedef struct BgBowlWall {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c
index 4999abd966..f36d251f45 100644
--- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c
+++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c
@@ -5,11 +5,25 @@
*/
#include "z_bg_breakwall.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/scenes/dungeons/ddan/ddan_scene.h"
#include "assets/objects/object_bwall/object_bwall.h"
#include "assets/objects/object_kingdodongo/object_kingdodongo.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef struct BombableWallInfo {
/* 0x00 */ CollisionHeader* colHeader;
@@ -67,9 +81,9 @@ static BombableWallInfo sBombableWallInfo[] = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 400, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 400, ICHAIN_STOP),
};
void BgBreakwall_SetupAction(BgBreakwall* this, BgBreakwallActionFunc actionFunc) {
@@ -207,7 +221,7 @@ void BgBreakwall_WaitForObject(BgBreakwall* this, PlayState* play) {
this->dyna.actor.objectSlot = this->requiredObjectSlot;
Actor_SetObjectDependency(play, &this->dyna.actor);
- this->dyna.actor.flags &= ~ACTOR_FLAG_4;
+ this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->dyna.actor.draw = BgBreakwall_Draw;
CollisionHeader_GetVirtual(sBombableWallInfo[wallType].colHeader, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.h b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.h
index c6dcab1b4f..02ab43a5fc 100644
--- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.h
+++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.h
@@ -2,11 +2,11 @@
#define Z_BG_BREAKWALL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgBreakwall;
-typedef void (*BgBreakwallActionFunc)(struct BgBreakwall*, PlayState*);
+typedef void (*BgBreakwallActionFunc)(struct BgBreakwall*, struct PlayState*);
typedef struct BgBreakwall {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c
index dc5a1cba23..fb910b56fd 100644
--- a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c
+++ b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c
@@ -5,9 +5,17 @@
*/
#include "z_bg_ddan_jd.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "rand.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_ddan_objects/object_ddan_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgDdanJd_Init(Actor* thisx, PlayState* play);
void BgDdanJd_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.h b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.h
index 6497657943..48e695b47d 100644
--- a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.h
+++ b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.h
@@ -2,11 +2,11 @@
#define Z_BG_DDAN_JD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgDdanJd;
-typedef void (*BgDdanJdActionFunc)(struct BgDdanJd*, PlayState*);
+typedef void (*BgDdanJdActionFunc)(struct BgDdanJd*, struct PlayState*);
typedef struct BgDdanJd {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c
index 3fe150cc6f..9a8669e535 100644
--- a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c
+++ b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c
@@ -5,9 +5,20 @@
*/
#include "z_bg_ddan_kd.h"
+
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_ddan_objects/object_ddan_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgDdanKd_Init(Actor* thisx, PlayState* play);
void BgDdanKd_Destroy(Actor* thisx, PlayState* play);
@@ -52,9 +63,9 @@ static ColliderCylinderInit sCylinderInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 32767, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 32767, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 32767, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 32767, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 32767, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 32767, ICHAIN_STOP),
};
void BgDdanKd_SetupAction(BgDdanKd* this, BgDdanKdActionFunc actionFunc) {
diff --git a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.h b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.h
index 2e80b64cb9..fca0119052 100644
--- a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.h
+++ b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.h
@@ -2,11 +2,11 @@
#define Z_BG_DDAN_KD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgDdanKd;
-typedef void (*BgDdanKdActionFunc)(struct BgDdanKd*, PlayState*);
+typedef void (*BgDdanKdActionFunc)(struct BgDdanKd*, struct PlayState*);
typedef struct BgDdanKd {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c
index b8e3cfa33b..55dd43407b 100644
--- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c
+++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c
@@ -6,8 +6,26 @@
#include "z_bg_dodoago.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "rand.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_ddan_objects/object_ddan_objects.h"
+#pragma increment_block_number "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
+
#define FLAGS 0
void BgDodoago_Init(Actor* thisx, PlayState* play);
@@ -32,7 +50,7 @@ ActorProfile Bg_Dodoago_Profile = {
/**/ BgDodoago_Draw,
};
-static ColliderCylinderInit sColCylinderInitMain = {
+static ColliderCylinderInit sMainColliderCylinderInit = {
{
COL_MATERIAL_NONE,
AT_NONE,
@@ -52,7 +70,7 @@ static ColliderCylinderInit sColCylinderInitMain = {
{ 80, 30, 80, { 0, 0, 0 } },
};
-static ColliderCylinderInit sColCylinderInitLeftRight = {
+static ColliderCylinderInit sLeftRightColliderCylinderInit = {
{
COL_MATERIAL_NONE,
AT_NONE,
@@ -102,9 +120,9 @@ void BgDodoago_SpawnSparkles(Vec3f* meanPos, PlayState* play) {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 5000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 5000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 800, ICHAIN_STOP),
};
void BgDodoago_Init(Actor* thisx, PlayState* play) {
@@ -125,12 +143,12 @@ void BgDodoago_Init(Actor* thisx, PlayState* play) {
return;
}
- Collider_InitCylinder(play, &this->colliderMain);
- Collider_InitCylinder(play, &this->colliderLeft);
- Collider_InitCylinder(play, &this->colliderRight);
- Collider_SetCylinder(play, &this->colliderMain, &this->dyna.actor, &sColCylinderInitMain);
- Collider_SetCylinder(play, &this->colliderLeft, &this->dyna.actor, &sColCylinderInitLeftRight);
- Collider_SetCylinder(play, &this->colliderRight, &this->dyna.actor, &sColCylinderInitLeftRight);
+ Collider_InitCylinder(play, &this->mainCollider);
+ Collider_InitCylinder(play, &this->leftCollider);
+ Collider_InitCylinder(play, &this->rightCollider);
+ Collider_SetCylinder(play, &this->mainCollider, &this->dyna.actor, &sMainColliderCylinderInit);
+ Collider_SetCylinder(play, &this->leftCollider, &this->dyna.actor, &sLeftRightColliderCylinderInit);
+ Collider_SetCylinder(play, &this->rightCollider, &this->dyna.actor, &sLeftRightColliderCylinderInit);
BgDodoago_SetupAction(this, BgDodoago_WaitExplosives);
sDisableBombCatcher = false;
@@ -140,13 +158,13 @@ void BgDodoago_Destroy(Actor* thisx, PlayState* play) {
BgDodoago* this = (BgDodoago*)thisx;
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
- Collider_DestroyCylinder(play, &this->colliderMain);
- Collider_DestroyCylinder(play, &this->colliderLeft);
- Collider_DestroyCylinder(play, &this->colliderRight);
+ Collider_DestroyCylinder(play, &this->mainCollider);
+ Collider_DestroyCylinder(play, &this->leftCollider);
+ Collider_DestroyCylinder(play, &this->rightCollider);
}
void BgDodoago_WaitExplosives(BgDodoago* this, PlayState* play) {
- Actor* explosive = Actor_GetCollidedExplosive(play, &this->colliderMain.base);
+ Actor* explosive = Actor_GetCollidedExplosive(play, &this->mainCollider.base);
if (explosive != NULL) {
this->state =
@@ -183,21 +201,21 @@ void BgDodoago_WaitExplosives(BgDodoago* this, PlayState* play) {
sTimer = 50;
}
} else if (Flags_GetEventChkInf(EVENTCHKINF_B0)) {
- Collider_UpdateCylinder(&this->dyna.actor, &this->colliderMain);
- Collider_UpdateCylinder(&this->dyna.actor, &this->colliderLeft);
- Collider_UpdateCylinder(&this->dyna.actor, &this->colliderRight);
+ Collider_UpdateCylinder(&this->dyna.actor, &this->mainCollider);
+ Collider_UpdateCylinder(&this->dyna.actor, &this->leftCollider);
+ Collider_UpdateCylinder(&this->dyna.actor, &this->rightCollider);
- this->colliderMain.dim.pos.z += 200;
+ this->mainCollider.dim.pos.z += 200;
- this->colliderLeft.dim.pos.z += 215;
- this->colliderLeft.dim.pos.x += 90;
+ this->leftCollider.dim.pos.z += 215;
+ this->leftCollider.dim.pos.x += 90;
- this->colliderRight.dim.pos.z += 215;
- this->colliderRight.dim.pos.x -= 90;
+ this->rightCollider.dim.pos.z += 215;
+ this->rightCollider.dim.pos.x -= 90;
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderMain.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderLeft.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderRight.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->mainCollider.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->leftCollider.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->rightCollider.base);
}
}
@@ -275,15 +293,15 @@ void BgDodoago_Update(Actor* thisx, PlayState* play) {
if (this->dyna.actor.parent == NULL) {
// this is a "bomb catcher", it kills the XZ speed and sets the timer for bombs that are dropped through the
// holes in the bridge above the skull
- if ((this->colliderLeft.base.ocFlags1 & OC1_HIT) || (this->colliderRight.base.ocFlags1 & OC1_HIT)) {
+ if ((this->leftCollider.base.ocFlags1 & OC1_HIT) || (this->rightCollider.base.ocFlags1 & OC1_HIT)) {
- if (this->colliderLeft.base.ocFlags1 & OC1_HIT) {
- actor = this->colliderLeft.base.oc;
+ if (this->leftCollider.base.ocFlags1 & OC1_HIT) {
+ actor = this->leftCollider.base.oc;
} else {
- actor = this->colliderRight.base.oc;
+ actor = this->rightCollider.base.oc;
}
- this->colliderLeft.base.ocFlags1 &= ~OC1_HIT;
- this->colliderRight.base.ocFlags1 &= ~OC1_HIT;
+ this->leftCollider.base.ocFlags1 &= ~OC1_HIT;
+ this->rightCollider.base.ocFlags1 &= ~OC1_HIT;
if (actor->category == ACTORCAT_EXPLOSIVE && actor->id == ACTOR_EN_BOM && actor->params == 0) {
bomb = (EnBom*)actor;
diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h
index 2c8e873ba7..9f361a3ccb 100644
--- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h
+++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h
@@ -2,7 +2,7 @@
#define Z_BG_DODOAGO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum BgDodoagoEye {
/* 0 */ BGDODOAGO_EYE_LEFT,
@@ -11,14 +11,14 @@ typedef enum BgDodoagoEye {
struct BgDodoago;
-typedef void (*BgDodoagoActionFunc)(struct BgDodoago*, PlayState*);
+typedef void (*BgDodoagoActionFunc)(struct BgDodoago*, struct PlayState*);
typedef struct BgDodoago {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ s16 state; // BgDodoagoEye or a timer-like value
- /* 0x0168 */ ColliderCylinder colliderMain; // Used to detect explosions for lighting the eyes
- /* 0x01B4 */ ColliderCylinder colliderLeft; // OC-colliding bombs have their xz speed cleared and timer set
- /* 0x0200 */ ColliderCylinder colliderRight; // same as colliderLeft
+ /* 0x0168 */ ColliderCylinder mainCollider; // Used to detect explosions for lighting the eyes
+ /* 0x01B4 */ ColliderCylinder leftCollider; // OC-colliding bombs have their xz speed cleared and timer set
+ /* 0x0200 */ ColliderCylinder rightCollider; // same as colliderLeft
/* 0x024C */ BgDodoagoActionFunc actionFunc;
} BgDodoago; // size = 0x0250
diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c
index e9f6bec20e..006deb893e 100644
--- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c
+++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c
@@ -5,13 +5,36 @@
*/
#include "z_bg_dy_yoseizo.h"
-#include "assets/objects/object_dy_obj/object_dy_obj.h"
-#include "terminal.h"
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_dy_obj/object_dy_obj.h"
#include "assets/scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_scene.h"
#include "assets/scenes/indoors/daiyousei_izumi/daiyousei_izumi_scene.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25)
+#if OOT_VERSION < NTSC_1_1
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
+#else
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
+#endif
typedef enum BgDyYoseizoRewardType {
/* 0 */ FAIRY_UPGRADE_MAGIC,
@@ -81,17 +104,32 @@ void BgDyYoseizo_Init(Actor* thisx, PlayState* play2) {
this->actor.focus.pos = this->actor.world.pos;
if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) {
- // "Great Fairy Fountain"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 大妖精の泉 ☆☆☆☆☆ %d\n" VT_RST, play->spawn);
+ PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ " T("大妖精の泉", "Great Fairy Fountain") " ☆☆☆☆☆ %d\n" VT_RST, play->spawn);
SkelAnime_InitFlex(play, &this->skelAnime, &gGreatFairySkel, &gGreatFairySittingTransitionAnim,
this->jointTable, this->morphTable, 28);
+#if OOT_VERSION < NTSC_1_1
+ if (!gSaveContext.save.info.playerData.isMagicAcquired && (this->fountainType != FAIRY_UPGRADE_MAGIC)) {
+ Actor_Kill(&this->actor);
+ return;
+ }
+#endif
} else {
- // "Stone/Jewel Fairy Fountain"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 石妖精の泉 ☆☆☆☆☆ %d\n" VT_RST, play->spawn);
+ PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ " T("石妖精の泉", "Stone Fairy Fountain") " ☆☆☆☆☆ %d\n" VT_RST, play->spawn);
SkelAnime_InitFlex(play, &this->skelAnime, &gGreatFairySkel, &gGreatFairyLayingDownTransitionAnim,
this->jointTable, this->morphTable, 28);
+#if OOT_VERSION < NTSC_1_1
+ if (!gSaveContext.save.info.playerData.isMagicAcquired) {
+ Actor_Kill(&this->actor);
+ return;
+ }
+#endif
}
+
+#if OOT_VERSION < NTSC_1_1
+ this->actionFunc = BgDyYoseizo_ChooseType;
+#else
this->actionFunc = BgDyYoseizo_CheckMagicAcquired;
+#endif
}
void BgDyYoseizo_Destroy(Actor* thisx, PlayState* play) {
@@ -177,6 +215,7 @@ void BgDyYoseizo_Bob(BgDyYoseizo* this, PlayState* play) {
}
}
+#if OOT_VERSION >= NTSC_1_1
void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) {
if (Flags_GetSwitch(play, 0x38)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
@@ -195,13 +234,24 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) {
this->actionFunc = BgDyYoseizo_ChooseType;
}
}
+#endif
void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
s32 givingReward;
+#if OOT_VERSION < NTSC_1_1
+ if (!Flags_GetSwitch(play, 0x38)) {
+ return;
+ }
+
+ if (play->msgCtx.ocarinaMode != OCARINA_MODE_04) {
+ Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
+ return;
+ }
+#endif
+
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
- // "Mode"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ もうど ☆☆☆☆☆ %d\n" VT_RST, play->msgCtx.ocarinaMode);
+ PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ " T("もうど", "Mode") " ☆☆☆☆☆ %d\n" VT_RST, play->msgCtx.ocarinaMode);
givingReward = false;
if (play->sceneId != SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) {
@@ -226,24 +276,22 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
switch (this->fountainType) {
case FAIRY_UPGRADE_MAGIC:
if (!gSaveContext.save.info.playerData.isMagicAcquired || BREG(2)) {
- // "Spin Attack speed UP"
- PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 回転切り速度UP ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ " T("回転切り速度UP", "Turning speed UP") " ☆☆☆☆☆ \n" VT_RST);
this->givingSpell = true;
givingReward = true;
}
break;
case FAIRY_UPGRADE_DOUBLE_MAGIC:
if (!gSaveContext.save.info.playerData.isDoubleMagicAcquired) {
- // "Magic Meter doubled"
- PRINTF(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 魔法ゲージメーター倍増 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(YELLOW) " ☆☆☆☆☆ " T("魔法ゲージメーター倍増",
+ "Magic Gauge Meter Doubled") " ☆☆☆☆☆ \n" VT_RST);
this->givingSpell = true;
givingReward = true;
}
break;
case FAIRY_UPGRADE_DOUBLE_DEFENSE:
if (!gSaveContext.save.info.playerData.isDoubleDefenseAcquired) {
- // "Damage halved"
- PRINTF(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ ダメージ半減 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ " T("ダメージ半減", "Damage halved") " ☆☆☆☆☆ \n" VT_RST);
this->givingSpell = true;
givingReward = true;
}
@@ -252,7 +300,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
}
if (givingReward) {
- if (!IS_CUTSCENE_LAYER || !OOT_DEBUG) {
+ if (!IS_CUTSCENE_LAYER || !DEBUG_FEATURES) {
if (play->sceneId != SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) {
switch (this->fountainType) {
case FAIRY_SPELL_FARORES_WIND:
@@ -315,12 +363,16 @@ void BgDyYoseizo_SetupSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
}
Actor_PlaySfx(&this->actor, NA_SE_VO_FR_LAUGH_0);
+#if OOT_VERSION >= NTSC_1_1
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
+#endif
this->actionFunc = BgDyYoseizo_SpinGrow_NoReward;
}
void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
+#if OOT_VERSION >= NTSC_1_1
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
+#endif
Math_ApproachF(&this->actor.world.pos.y, this->grownHeight, this->heightFraction, 100.0f);
Math_ApproachF(&this->scale, 0.035f, this->scaleFraction, 0.005f);
Math_ApproachF(&this->heightFraction, 0.8f, 0.1f, 0.02f);
@@ -346,7 +398,9 @@ void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
f32 curFrame = this->skelAnime.curFrame;
+#if OOT_VERSION >= NTSC_1_1
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
+#endif
if ((this->frameCount * 1273.0f) <= this->bobTimer) {
this->bobTimer = 0.0f;
@@ -360,7 +414,9 @@ void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) {
}
void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
+#if OOT_VERSION >= NTSC_1_1
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
+#endif
if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) {
this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim);
@@ -380,7 +436,9 @@ void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
}
void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
+#if OOT_VERSION >= NTSC_1_1
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
+#endif
this->bobTimer = this->skelAnime.curFrame * 1273.0f;
if ((this->frameCount * 1273.0f) <= this->bobTimer) {
@@ -651,7 +709,8 @@ static s16 sDemoEffectLightColors[] = { DEMO_EFFECT_LIGHT_GREEN, DEMO_EFFECT_LIG
static s16 sExItemTypes[] = { EXITEM_MAGIC_WIND, EXITEM_MAGIC_FIRE, EXITEM_MAGIC_DARK };
-static s16 sItemGetFlags[] = { ITEMGETINF_18_MASK, ITEMGETINF_19_MASK, ITEMGETINF_1A_MASK };
+static s16 sItemGetFlagMasks[] = { ITEMGETINF_MASK(ITEMGETINF_18), ITEMGETINF_MASK(ITEMGETINF_19),
+ ITEMGETINF_MASK(ITEMGETINF_1A) };
static u8 sItemIds[] = { ITEM_FARORES_WIND, ITEM_DINS_FIRE, ITEM_NAYRUS_LOVE };
@@ -763,7 +822,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
this->itemSpawned = true;
gSaveContext.healthAccumulator = 0x140;
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS_MAGIC);
- gSaveContext.save.info.itemGetInf[ITEMGETINF_18_19_1A_INDEX] |= sItemGetFlags[cueIdTemp];
+ gSaveContext.save.info.itemGetInf[ITEMGETINF_INDEX_18_19_1A] |= sItemGetFlagMasks[cueIdTemp];
Item_Give(play, sItemIds[cueIdTemp]);
}
} else {
diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h
index fd7aebb3a4..f799bf9278 100644
--- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h
+++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h
@@ -2,13 +2,13 @@
#define Z_BG_DY_YOSEIZO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.h"
#include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h"
struct BgDyYoseizo;
-typedef void (*BgDyYoseizoActionFunc)(struct BgDyYoseizo*, PlayState*);
+typedef void (*BgDyYoseizoActionFunc)(struct BgDyYoseizo*, struct PlayState*);
#define BG_DY_YOSEIZO_EFFECT_COUNT 200
diff --git a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c
index edfb09d522..1df0e5b730 100644
--- a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c
+++ b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c
@@ -6,9 +6,22 @@
#include "z_bg_ganon_otyuka.h"
#include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum FlashState {
/* 0x00 */ FLASH_NONE,
@@ -89,9 +102,9 @@ void BgGanonOtyuka_Destroy(Actor* thisx, PlayState* play2) {
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("WHY !!!!!!!!!!!!!!!!\n");
- PRINTF(VT_RST);
+ PRINTF_RST();
}
void BgGanonOtyuka_WaitToFall(BgGanonOtyuka* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.h b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.h
index 376130ae54..9d0c4bcfaf 100644
--- a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.h
+++ b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.h
@@ -2,7 +2,7 @@
#define Z_BG_GANON_OTYUKA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#define OTYUKA_SIDE_EAST (1 << 0)
#define OTYUKA_SIDE_WEST (1 << 1)
@@ -12,7 +12,7 @@
struct BgGanonOtyuka;
-typedef void (*BgGanonOtyukaActionFunc)(struct BgGanonOtyuka*, PlayState*);
+typedef void (*BgGanonOtyukaActionFunc)(struct BgGanonOtyuka*, struct PlayState*);
typedef struct BgGanonOtyuka {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c
index 8988aea020..c263ed5e3a 100644
--- a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c
+++ b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c
@@ -5,8 +5,19 @@
*/
#include "z_bg_gate_shutter.h"
-#include "assets/objects/object_spot01_matoyab/object_spot01_matoyab.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
+#include "assets/objects/object_spot01_matoyab/object_spot01_matoyab.h"
#define FLAGS 0
@@ -51,7 +62,7 @@ void BgGateShutter_Init(Actor* thisx, PlayState* play) {
thisx->scale.y = 1.0f;
thisx->scale.z = 1.0f;
PRINTF("\n\n");
- PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 柵でたなぁ ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ " T("柵でたなぁ", "There's a fence") " ☆☆☆☆☆ \n" VT_RST);
this->actionFunc = func_8087828C;
}
diff --git a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.h b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.h
index cad1651215..6f9f53a546 100644
--- a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.h
+++ b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.h
@@ -2,11 +2,11 @@
#define Z_BG_GATE_SHUTTER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgGateShutter;
-typedef void (*BgGateShutterActionFunc)(struct BgGateShutter*, PlayState*);
+typedef void (*BgGateShutterActionFunc)(struct BgGateShutter*, struct PlayState*);
typedef struct BgGateShutter {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c
index 4a67c02d13..6c0f01b322 100644
--- a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c
+++ b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c
@@ -5,6 +5,16 @@
*/
#include "z_bg_gjyo_bridge.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_gjyo_objects/object_gjyo_objects.h"
#include "assets/scenes/overworld/ganon_tou/ganon_tou_scene.h"
@@ -32,7 +42,7 @@ ActorProfile Bg_Gjyo_Bridge_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 800, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
@@ -49,7 +59,7 @@ void BgGjyoBridge_Init(Actor* thisx, PlayState* play) {
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
- if (GET_EVENTCHKINF(EVENTCHKINF_4D)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_CREATED_RAINBOW_BRIDGE)) {
this->actionFunc = func_808787A4;
} else {
this->dyna.actor.draw = NULL;
@@ -85,7 +95,7 @@ void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play) {
(play->csCtx.actorCues[2]->id == 2)) {
this->dyna.actor.draw = BgGjyoBridge_Draw;
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
- SET_EVENTCHKINF(EVENTCHKINF_4D);
+ SET_EVENTCHKINF(EVENTCHKINF_CREATED_RAINBOW_BRIDGE);
}
}
diff --git a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.h b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.h
index 0ca02453bf..312dcdee72 100644
--- a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.h
+++ b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.h
@@ -2,11 +2,11 @@
#define Z_BG_GJYO_BRIDGE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgGjyoBridge;
-typedef void (*BgGjyoBridgeActionFunc)(struct BgGjyoBridge*, PlayState*);
+typedef void (*BgGjyoBridgeActionFunc)(struct BgGjyoBridge*, struct PlayState*);
typedef struct BgGjyoBridge {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c
index 801475e3f3..b05734104c 100644
--- a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c
+++ b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c
@@ -5,9 +5,15 @@
*/
#include "z_bg_gnd_darkmeiro.h"
+
+#include "gfx.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_demo_kekkai/object_demo_kekkai.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgGndDarkmeiro_Init(Actor* thisx, PlayState* play2);
void BgGndDarkmeiro_Destroy(Actor* thisx, PlayState* play2);
diff --git a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.h b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.h
index 39fb42a3aa..3124be292e 100644
--- a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.h
+++ b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.h
@@ -2,11 +2,11 @@
#define Z_BG_GND_DARKMEIRO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgGndDarkmeiro;
-typedef void (*BgGndDarkmeiroUpdateFunc)(struct BgGndDarkmeiro*, PlayState*);
+typedef void (*BgGndDarkmeiroUpdateFunc)(struct BgGndDarkmeiro*, struct PlayState*);
typedef struct BgGndDarkmeiro {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c
index 9f97b57541..c49697f627 100644
--- a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c
+++ b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c
@@ -5,9 +5,18 @@
*/
#include "z_bg_gnd_firemeiro.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_demo_kekkai/object_demo_kekkai.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgGndFiremeiro_Init(Actor* thisx, PlayState* play);
void BgGndFiremeiro_Destroy(Actor* thisx, PlayState* play2);
diff --git a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.h b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.h
index 60a2254cf3..bebb77303f 100644
--- a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.h
+++ b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.h
@@ -2,11 +2,11 @@
#define Z_BG_GND_FIREMEIRO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgGndFiremeiro;
-typedef void (*BgGndFiremeiroActionFunc)(struct BgGndFiremeiro*, PlayState*);
+typedef void (*BgGndFiremeiroActionFunc)(struct BgGndFiremeiro*, struct PlayState*);
typedef struct BgGndFiremeiro {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c
index 75e44cb218..8b026839f7 100644
--- a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c
+++ b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c
@@ -5,9 +5,20 @@
*/
#include "z_bg_gnd_iceblock.h"
+
+#include "libc64/qrand.h"
+#include "libu64/debug.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_demo_kekkai/object_demo_kekkai.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum BgGndIceblockAction {
/* 0 */ GNDICE_IDLE,
@@ -84,7 +95,7 @@ void BgGndIceblock_Destroy(Actor* thisx, PlayState* play) {
* | 3 h8 15 19 |
* | 4 9 11 XX *20*|
* |*5* XX 12 *21*|
- * ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
+ * ----------------------
* XX are rocks
* ** are pits
* h is the hole.
diff --git a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.h b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.h
index 1d9da28f7b..86e3aa4f62 100644
--- a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.h
+++ b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.h
@@ -2,11 +2,11 @@
#define Z_BG_GND_ICEBLOCK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgGndIceblock;
-typedef void (*BgGndIceblockActionFunc)(struct BgGndIceblock*, PlayState*);
+typedef void (*BgGndIceblockActionFunc)(struct BgGndIceblock*, struct PlayState*);
typedef struct BgGndIceblock {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c b/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c
index 3c100311d0..98824a94e0 100644
--- a/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c
+++ b/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c
@@ -5,9 +5,12 @@
*/
#include "z_bg_gnd_nisekabe.h"
+
+#include "z64play.h"
+
#include "assets/objects/object_demo_kekkai/object_demo_kekkai.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgGndNisekabe_Init(Actor* thisx, PlayState* play);
void BgGndNisekabe_Destroy(Actor* thisx, PlayState* play);
@@ -30,7 +33,7 @@ void BgGndNisekabe_Init(Actor* thisx, PlayState* play) {
BgGndNisekabe* this = (BgGndNisekabe*)thisx;
Actor_SetScale(&this->actor, 0.1);
- this->actor.uncullZoneForward = 3000.0;
+ this->actor.cullingVolumeDistance = 3000.0;
}
void BgGndNisekabe_Destroy(Actor* thisx, PlayState* play) {
@@ -55,7 +58,7 @@ void BgGndNisekabe_Draw(Actor* thisx, PlayState* play) {
BgGndNisekabe* this = (BgGndNisekabe*)thisx;
u32 index = PARAMS_GET_U(this->actor.params, 0, 8);
- if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
+ if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) {
Gfx_DrawDListXlu(play, dLists[index]);
} else {
Gfx_DrawDListOpa(play, dLists[index]);
diff --git a/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.h b/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.h
index 32da8fa085..291a0e4ea1 100644
--- a/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.h
+++ b/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.h
@@ -2,7 +2,7 @@
#define Z_BG_GND_NISEKABE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgGndNisekabe;
diff --git a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c
index 17a3ea4508..889d4f9551 100644
--- a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c
+++ b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c
@@ -5,8 +5,19 @@
*/
#include "z_bg_gnd_soulmeiro.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_demo_kekkai/object_demo_kekkai.h"
-#include "global.h"
#define FLAGS 0
@@ -53,9 +64,9 @@ static ColliderCylinderInit sCylinderInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgGndSoulmeiro_Init(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.h b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.h
index cbf9b854d4..d2e039c8ad 100644
--- a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.h
+++ b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.h
@@ -2,11 +2,11 @@
#define Z_BG_GND_SOULMEIRO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgGndSoulmeiro;
-typedef void (*BgGndSoulmeiroActionFunc)(struct BgGndSoulmeiro*, PlayState*);
+typedef void (*BgGndSoulmeiroActionFunc)(struct BgGndSoulmeiro*, struct PlayState*);
typedef struct BgGndSoulmeiro {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c
index 7e2401acb1..f20af0b9f8 100644
--- a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c
+++ b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c
@@ -5,6 +5,17 @@
*/
#include "z_bg_haka.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_haka/object_haka.h"
#define FLAGS 0
diff --git a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.h b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.h
index 093cab70fa..b95f5c0f8e 100644
--- a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.h
+++ b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.h
@@ -2,11 +2,11 @@
#define Z_BG_HAKA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHaka;
-typedef void (*BgHakaActionFunc)(struct BgHaka*, PlayState*);
+typedef void (*BgHakaActionFunc)(struct BgHaka*, struct PlayState*);
typedef struct BgHaka {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c
index 3b5985d8f1..a209637949 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c
+++ b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c
@@ -5,6 +5,18 @@
*/
#include "z_bg_haka_gate.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_haka_objects/object_haka_objects.h"
@@ -97,7 +109,7 @@ void BgHakaGate_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BgHakaGate_FalseSkull;
}
this->vScrollTimer = Rand_ZeroOne() * 20.0f;
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
if (Flags_GetSwitch(play, this->switchFlag)) {
this->vFlameScale = 350;
}
@@ -124,7 +136,7 @@ void BgHakaGate_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BgHakaGate_DoNothing;
thisx->world.pos.y += 80.0f;
} else {
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
Actor_SetFocus(thisx, 30.0f);
this->actionFunc = BgHakaGate_GateWait;
}
@@ -274,7 +286,7 @@ void BgHakaGate_GateWait(BgHakaGate* this, PlayState* play) {
void BgHakaGate_GateOpen(BgHakaGate* this, PlayState* play) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 80.0f, 1.0f)) {
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
- this->dyna.actor.flags &= ~ACTOR_FLAG_4;
+ this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actionFunc = BgHakaGate_DoNothing;
} else {
Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG);
@@ -343,7 +355,7 @@ void BgHakaGate_Draw(Actor* thisx, PlayState* play) {
BgHakaGate* this = (BgHakaGate*)thisx;
MtxF currentMtxF;
- if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_REACT_TO_LENS)) {
+ if (ACTOR_FLAGS_CHECK_ALL(thisx, ACTOR_FLAG_REACT_TO_LENS)) {
Gfx_DrawDListXlu(play, object_haka_objects_DL_00F1B0);
} else {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.h b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.h
index 1297692754..6c926d4354 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.h
+++ b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.h
@@ -2,11 +2,11 @@
#define Z_BG_HAKA_GATE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHakaGate;
-typedef void (*BgHakaGateActionFunc)(struct BgHakaGate*, PlayState*);
+typedef void (*BgHakaGateActionFunc)(struct BgHakaGate*, struct PlayState*);
typedef struct BgHakaGate {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c b/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c
index e660ccd38a..63ef8e5153 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c
+++ b/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c
@@ -5,11 +5,22 @@
*/
#include "z_bg_haka_huta.h"
-#include "assets/objects/object_hakach_objects/object_hakach_objects.h"
#include "overlays/actors/ovl_En_Rd/z_en_rd.h"
-#include "quake.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "quake.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_hakach_objects/object_hakach_objects.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgHakaHuta_Init(Actor* thisx, PlayState* play);
void BgHakaHuta_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.h b/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.h
index 8897772b01..e1ce3a0946 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.h
+++ b/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.h
@@ -2,11 +2,11 @@
#define Z_BG_HAKA_HUTA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHakaHuta;
-typedef void (*BgHakaHutaActionFunc)(struct BgHakaHuta*, PlayState*);
+typedef void (*BgHakaHutaActionFunc)(struct BgHakaHuta*, struct PlayState*);
typedef struct BgHakaHuta {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c
index 3d6de9f415..a09195d6fe 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c
+++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c
@@ -5,10 +5,14 @@
*/
#include "z_bg_haka_megane.h"
+
+#include "ichain.h"
+#include "z64play.h"
+
#include "assets/objects/object_hakach_objects/object_hakach_objects.h"
#include "assets/objects/object_haka_objects/object_haka_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_REACT_TO_LENS)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_REACT_TO_LENS)
void BgHakaMegane_Init(Actor* thisx, PlayState* play);
void BgHakaMegane_Destroy(Actor* thisx, PlayState* play);
@@ -129,7 +133,7 @@ void BgHakaMegane_Update(Actor* thisx, PlayState* play) {
void BgHakaMegane_Draw(Actor* thisx, PlayState* play) {
BgHakaMegane* this = (BgHakaMegane*)thisx;
- if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_REACT_TO_LENS)) {
+ if (ACTOR_FLAGS_CHECK_ALL(thisx, ACTOR_FLAG_REACT_TO_LENS)) {
Gfx_DrawDListXlu(play, sDLists[thisx->params]);
} else {
Gfx_DrawDListOpa(play, sDLists[thisx->params]);
diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.h b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.h
index e82c0a97c6..bb7711c7b5 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.h
+++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.h
@@ -2,11 +2,11 @@
#define Z_BG_HAKA_MEGANE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHakaMegane;
-typedef void (*BgHakaMeganeActionFunc)(struct BgHakaMegane*, PlayState*);
+typedef void (*BgHakaMeganeActionFunc)(struct BgHakaMegane*, struct PlayState*);
typedef struct BgHakaMegane {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c
index 3bcaac0071..7b06abe5ab 100644
--- a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c
+++ b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c
@@ -5,6 +5,13 @@
*/
#include "z_bg_haka_meganebg.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_haka_objects/object_haka_objects.h"
#define FLAGS 0
@@ -36,8 +43,8 @@ ActorProfile Bg_Haka_MeganeBG_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
@@ -64,7 +71,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, PlayState* play) {
if (thisx->params == 2) {
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
CollisionHeader_GetVirtual(&object_haka_objects_Col_005334, &colHeader);
this->actionFunc = func_8087E258;
} else {
@@ -83,15 +90,15 @@ void BgHakaMeganeBG_Init(Actor* thisx, PlayState* play) {
this->actionFunc = func_8087E34C;
thisx->world.pos.y = thisx->home.pos.y;
} else {
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actionFunc = func_8087E288;
}
} else {
CollisionHeader_GetVirtual(&object_haka_objects_Col_00A7F4, &colHeader);
this->unk_16A = 80;
this->actionFunc = func_8087E10C;
- thisx->uncullZoneScale = 3000.0f;
- thisx->uncullZoneDownward = 3000.0f;
+ thisx->cullingVolumeScale = 3000.0f;
+ thisx->cullingVolumeDownward = 3000.0f;
}
}
diff --git a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.h b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.h
index 933c49fbba..4a11b26b7d 100644
--- a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.h
+++ b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.h
@@ -2,11 +2,11 @@
#define Z_BG_HAKA_MEGANEBG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHakaMeganeBG;
-typedef void (*BgHakaMeganeBGActionFunc)(struct BgHakaMeganeBG*, PlayState*);
+typedef void (*BgHakaMeganeBGActionFunc)(struct BgHakaMeganeBG*, struct PlayState*);
typedef struct BgHakaMeganeBG {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c
index 3ac31d0c5c..d72cb56d0b 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c
+++ b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c
@@ -5,10 +5,18 @@
*/
#include "z_bg_haka_sgami.h"
+
+#include "ichain.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_haka_objects/object_haka_objects.h"
#include "assets/objects/object_ice_objects/object_ice_objects.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
typedef enum SpinningScytheTrapMode {
/* 0 */ SCYTHE_TRAP_SHADOW_TEMPLE,
@@ -121,7 +129,7 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit sColChkInfoInit = { 0, 80, 130, MASS_IMMOVABLE };
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1000, ICHAIN_CONTINUE),
ICHAIN_U8(attentionRangeType, ATTENTION_RANGE_4, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
@@ -134,7 +142,7 @@ void BgHakaSgami_Init(Actor* thisx, PlayState* play) {
BgHakaSgami* this = (BgHakaSgami*)thisx;
EffectBlureInit1 blureInit;
s32 i;
- ColliderTris* colliderScythe = &this->colliderScythe;
+ ColliderTris* scytheCollider = &this->scytheCollider;
Actor_ProcessInitChain(thisx, sInitChain);
@@ -145,14 +153,14 @@ void BgHakaSgami_Init(Actor* thisx, PlayState* play) {
thisx->flags |= ACTOR_FLAG_REACT_TO_LENS;
}
- Collider_InitTris(play, colliderScythe);
- Collider_SetTris(play, colliderScythe, thisx, &sTrisInit, this->colliderScytheItems);
- Collider_InitCylinder(play, &this->colliderScytheCenter);
- Collider_SetCylinder(play, &this->colliderScytheCenter, thisx, &sCylinderInit);
+ Collider_InitTris(play, scytheCollider);
+ Collider_SetTris(play, scytheCollider, thisx, &sTrisInit, this->scytheColliderElements);
+ Collider_InitCylinder(play, &this->scytheCenterCollider);
+ Collider_SetCylinder(play, &this->scytheCenterCollider, thisx, &sCylinderInit);
- this->colliderScytheCenter.dim.pos.x = thisx->world.pos.x;
- this->colliderScytheCenter.dim.pos.y = thisx->world.pos.y;
- this->colliderScytheCenter.dim.pos.z = thisx->world.pos.z;
+ this->scytheCenterCollider.dim.pos.x = thisx->world.pos.x;
+ this->scytheCenterCollider.dim.pos.y = thisx->world.pos.y;
+ this->scytheCenterCollider.dim.pos.z = thisx->world.pos.z;
CollisionCheck_SetInfo(&thisx->colChkInfo, NULL, &sColChkInfoInit);
@@ -173,8 +181,8 @@ void BgHakaSgami_Init(Actor* thisx, PlayState* play) {
thisx->flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
} else {
this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_ICE_OBJECTS);
- this->colliderScytheCenter.dim.radius = 30;
- this->colliderScytheCenter.dim.height = 70;
+ this->scytheCenterCollider.dim.radius = 30;
+ this->scytheCenterCollider.dim.height = 70;
Actor_SetFocus(thisx, 40.0f);
}
@@ -191,8 +199,8 @@ void BgHakaSgami_Destroy(Actor* thisx, PlayState* play) {
Effect_Delete(play, this->blureEffectIndex[0]);
Effect_Delete(play, this->blureEffectIndex[1]);
- Collider_DestroyTris(play, &this->colliderScythe);
- Collider_DestroyCylinder(play, &this->colliderScytheCenter);
+ Collider_DestroyTris(play, &this->scytheCollider);
+ Collider_DestroyCylinder(play, &this->scytheCenterCollider);
}
void BgHakaSgami_SetupSpin(BgHakaSgami* this, PlayState* play) {
@@ -200,7 +208,7 @@ void BgHakaSgami_SetupSpin(BgHakaSgami* this, PlayState* play) {
this->actor.objectSlot = this->requiredObjectSlot;
this->actor.draw = BgHakaSgami_Draw;
this->timer = SCYTHE_SPIN_TIME;
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actionFunc = BgHakaSgami_Spin;
}
}
@@ -248,14 +256,14 @@ void BgHakaSgami_Spin(BgHakaSgami* this, PlayState* play) {
elementInit->dim.vtx[j].x * actorRotYSin;
}
- Collider_SetTrisVertices(&this->colliderScythe, i, &scytheVertices[0], &scytheVertices[1], &scytheVertices[2]);
+ Collider_SetTrisVertices(&this->scytheCollider, i, &scytheVertices[0], &scytheVertices[1], &scytheVertices[2]);
for (j = 0; j < 3; j++) {
scytheVertices[j].x = (2 * this->actor.world.pos.x) - scytheVertices[j].x;
scytheVertices[j].z = (2 * this->actor.world.pos.z) - scytheVertices[j].z;
}
- Collider_SetTrisVertices(&this->colliderScythe, (i + 2) % 4, &scytheVertices[0], &scytheVertices[1],
+ Collider_SetTrisVertices(&this->scytheCollider, (i + 2) % 4, &scytheVertices[0], &scytheVertices[1],
&scytheVertices[2]);
}
@@ -280,8 +288,8 @@ void BgHakaSgami_Spin(BgHakaSgami* this, PlayState* play) {
EffectBlure_AddVertex(Effect_GetByIndex(this->blureEffectIndex[1]), &scytheVertices[0], &scytheVertices[1]);
}
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderScythe.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderScytheCenter.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->scytheCollider.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->scytheCenterCollider.base);
Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ROLLCUTTER_MOTOR - SFX_FLAG);
}
@@ -289,7 +297,7 @@ void BgHakaSgami_Update(Actor* thisx, PlayState* play) {
BgHakaSgami* this = (BgHakaSgami*)thisx;
Player* player = GET_PLAYER(play);
- if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
+ if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
(this->actionFunc == BgHakaSgami_SetupSpin)) {
this->actionFunc(this, play);
}
diff --git a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.h b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.h
index d13418053e..a5019eb84f 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.h
+++ b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.h
@@ -2,11 +2,11 @@
#define Z_BG_HAKA_SGAMI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHakaSgami;
-typedef void (*BgHakaSgamiActionFunc)(struct BgHakaSgami*, PlayState*);
+typedef void (*BgHakaSgamiActionFunc)(struct BgHakaSgami*, struct PlayState*);
typedef struct BgHakaSgami {
/* 0x0000 */ Actor actor;
@@ -15,9 +15,9 @@ typedef struct BgHakaSgami {
/* 0x0151 */ s8 unk_151;
/* 0x0152 */ s16 timer;
/* 0x0154 */ s32 blureEffectIndex[2];
- /* 0x015C */ ColliderCylinder colliderScytheCenter;
- /* 0x01A8 */ ColliderTris colliderScythe;
- /* 0x01C8 */ ColliderTrisElement colliderScytheItems[4];
+ /* 0x015C */ ColliderCylinder scytheCenterCollider;
+ /* 0x01A8 */ ColliderTris scytheCollider;
+ /* 0x01C8 */ ColliderTrisElement scytheColliderElements[4];
} BgHakaSgami; // size = 0x0338
#endif
diff --git a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c
index 2a8eadb18e..126dcc7ee1 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c
+++ b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c
@@ -5,9 +5,22 @@
*/
#include "z_bg_haka_ship.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/object_haka_objects/object_haka_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgHakaShip_Init(Actor* thisx, PlayState* play);
void BgHakaShip_Destroy(Actor* thisx, PlayState* play);
@@ -93,7 +106,7 @@ void BgHakaShip_WaitForSong(BgHakaShip* this, PlayState* play) {
if (this->counter == 0) {
this->counter = 130;
this->actionFunc = BgHakaShip_CutsceneStationary;
- PRINTF("シーン 外輪船 ... アァクション!!\n");
+ PRINTF(T("シーン 外輪船 ... アァクション!!\n", "Scene paddle steamer... action!!\n"));
OnePointCutscene_Init(play, 3390, 999, &this->dyna.actor, CAM_ID_MAIN);
}
}
diff --git a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.h b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.h
index 303247015e..e6ede3d2b3 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.h
+++ b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.h
@@ -2,11 +2,11 @@
#define Z_BG_HAKA_SHIP_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHakaShip;
-typedef void (*BgHakaShipActionFunc)(struct BgHakaShip*, PlayState*);
+typedef void (*BgHakaShipActionFunc)(struct BgHakaShip*, struct PlayState*);
typedef struct BgHakaShip {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c
index 2210299c76..e9ec138a8e 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c
+++ b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c
@@ -5,6 +5,17 @@
*/
#include "z_bg_haka_trap.h"
+
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/object_haka_objects/object_haka_objects.h"
#define FLAGS 0
@@ -131,7 +142,7 @@ void BgHakaTrap_Init(Actor* thisx, PlayState* play) {
this->actionFunc = func_80880484;
} else {
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
if (thisx->params == HAKA_TRAP_SPIKED_BOX) {
CollisionHeader_GetVirtual(&object_haka_objects_Col_009CD0, &colHeader);
@@ -160,8 +171,8 @@ void BgHakaTrap_Init(Actor* thisx, PlayState* play) {
CollisionHeader_GetVirtual(&object_haka_objects_Col_008D10, &colHeader);
}
- Collider_InitTris(play, &this->colliderSpikes);
- Collider_SetTris(play, &this->colliderSpikes, thisx, &sTrisInit, this->colliderSpikesItem);
+ Collider_InitTris(play, &this->spikesCollider);
+ Collider_SetTris(play, &this->spikesCollider, thisx, &sTrisInit, this->spikesColliderElements);
this->colliderCylinder.dim.radius = 18;
this->colliderCylinder.dim.height = 115;
@@ -177,7 +188,7 @@ void BgHakaTrap_Init(Actor* thisx, PlayState* play) {
} else {
this->timer = 40;
this->actionFunc = func_808809B0;
- thisx->uncullZoneScale = 500.0f;
+ thisx->cullingVolumeScale = 500.0f;
}
CollisionCheck_SetInfo(&thisx->colChkInfo, NULL, &sColChkInfoInit);
@@ -191,7 +202,7 @@ void BgHakaTrap_Destroy(Actor* thisx, PlayState* play) {
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
if ((this->dyna.actor.params == HAKA_TRAP_SPIKED_WALL) ||
(this->dyna.actor.params == HAKA_TRAP_SPIKED_WALL_2)) {
- Collider_DestroyTris(play, &this->colliderSpikes);
+ Collider_DestroyTris(play, &this->spikesCollider);
}
}
@@ -242,7 +253,7 @@ void func_808801B8(BgHakaTrap* this, PlayState* play) {
func_8087FFC0(this, play);
- if (this->colliderSpikes.base.acFlags & AC_HIT) {
+ if (this->spikesCollider.base.acFlags & AC_HIT) {
this->timer = 20;
D_80880F30 = 1;
this->actionFunc = func_808802D8;
@@ -491,7 +502,7 @@ void BgHakaTrap_Update(Actor* thisx, PlayState* play) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder.base);
} else {
if (this->actionFunc == func_808801B8) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSpikes.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->spikesCollider.base);
}
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinder.base);
@@ -507,10 +518,10 @@ void func_80880D68(BgHakaTrap* this) {
Matrix_MultVec3f(&sTrisElementsInit[0].dim.vtx[0], &vec1);
Matrix_MultVec3f(&sTrisElementsInit[0].dim.vtx[1], &vec2);
Matrix_MultVec3f(&sTrisElementsInit[0].dim.vtx[2], &vec3);
- Collider_SetTrisVertices(&this->colliderSpikes, 0, &vec1, &vec2, &vec3);
+ Collider_SetTrisVertices(&this->spikesCollider, 0, &vec1, &vec2, &vec3);
Matrix_MultVec3f(&sTrisElementsInit[1].dim.vtx[2], &vec2);
- Collider_SetTrisVertices(&this->colliderSpikes, 1, &vec1, &vec3, &vec2);
+ Collider_SetTrisVertices(&this->spikesCollider, 1, &vec1, &vec3, &vec2);
}
void BgHakaTrap_Draw(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.h b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.h
index a6a34dd426..cfcceaa3e2 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.h
+++ b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.h
@@ -2,7 +2,7 @@
#define Z_BG_HAKA_TRAP_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum HakaTrapType {
/* 0x00 */ HAKA_TRAP_GUILLOTINE_SLOW,
@@ -15,7 +15,7 @@ typedef enum HakaTrapType {
struct BgHakaTrap;
-typedef void (*BgHakaTrapActionFunc)(struct BgHakaTrap*, PlayState*);
+typedef void (*BgHakaTrapActionFunc)(struct BgHakaTrap*, struct PlayState*);
typedef struct BgHakaTrap {
/* 0x0000 */ DynaPolyActor dyna;
@@ -25,8 +25,8 @@ typedef struct BgHakaTrap {
/* 0x016A */ s16 unk_16A; // used as boolean for HAKA_TRAP_GUILLOTINE_SLOW/FAST, s16 for HAKA_TRAP_SPIKED_BOX
/* 0x016C */ Vec3f unk_16C;
/* 0x0178 */ ColliderCylinder colliderCylinder;
- /* 0x01C4 */ ColliderTris colliderSpikes;
- /* 0x01E4 */ ColliderTrisElement colliderSpikesItem[2];
+ /* 0x01C4 */ ColliderTris spikesCollider;
+ /* 0x01E4 */ ColliderTrisElement spikesColliderElements[2];
} BgHakaTrap; // size = 0x029C
#endif
diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c
index 5e8e61ba27..df7c95b0e9 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c
+++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c
@@ -5,10 +5,22 @@
*/
#include "z_bg_haka_tubo.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_haka_objects/object_haka_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgHakaTubo_Init(Actor* thisx, PlayState* play);
void BgHakaTubo_Destroy(Actor* thisx, PlayState* play);
@@ -114,7 +126,7 @@ void BgHakaTubo_Idle(BgHakaTubo* this, PlayState* play) {
// Colliding with flame circle
if (this->flamesCollider.base.atFlags & AT_HIT) {
this->flamesCollider.base.atFlags &= ~AT_HIT;
- func_8002F71C(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 5.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 5.0f);
}
// Colliding with collider inside the pot
if (this->potCollider.base.acFlags & AC_HIT) {
diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.h b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.h
index fbed37aa20..a0caba8c23 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.h
+++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.h
@@ -2,11 +2,11 @@
#define Z_BG_HAKA_TUBO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHakaTubo;
-typedef void (*BgHakaTuboActionFunc)(struct BgHakaTubo*, PlayState*);
+typedef void (*BgHakaTuboActionFunc)(struct BgHakaTubo*, struct PlayState*);
typedef struct BgHakaTubo {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c
index be7a79332d..581af06120 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c
+++ b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c
@@ -5,9 +5,18 @@
*/
#include "z_bg_haka_water.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_hakach_objects/object_hakach_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgHakaWater_Init(Actor* thisx, PlayState* play);
void BgHakaWater_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.h b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.h
index b89d0fa522..a34a043590 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.h
+++ b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.h
@@ -2,11 +2,11 @@
#define Z_BG_HAKA_WATER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHakaWater;
-typedef void (*BgHakaWaterActionFunc)(struct BgHakaWater*, PlayState*);
+typedef void (*BgHakaWaterActionFunc)(struct BgHakaWater*, struct PlayState*);
typedef struct BgHakaWater {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c b/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c
index 9b7ed31904..8064cae2d4 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c
+++ b/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c
@@ -5,10 +5,20 @@
*/
#include "z_bg_haka_zou.h"
+
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "rand.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_hakach_objects/object_hakach_objects.h"
#include "assets/objects/object_haka_objects/object_haka_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum ShadowTempleAssetsType {
/* 0x0 */ STA_GIANT_BIRD_STATUE,
@@ -96,9 +106,9 @@ void BgHakaZou_Init(Actor* thisx, PlayState* play) {
DynaPolyActor_Init(&this->dyna, 0);
if (thisx->params == STA_GIANT_BIRD_STATUE) {
- thisx->uncullZoneForward = 2000.0f;
- thisx->uncullZoneScale = 3000.0f;
- thisx->uncullZoneDownward = 3000.0f;
+ thisx->cullingVolumeDistance = 2000.0f;
+ thisx->cullingVolumeScale = 3000.0f;
+ thisx->cullingVolumeDownward = 3000.0f;
}
}
@@ -176,7 +186,7 @@ void BgHakaZou_Wait(BgHakaZou* this, PlayState* play) {
this->collider.dim.yShift = -30;
this->collider.dim.pos.x -= 56;
this->collider.dim.pos.z += 56;
- this->dyna.actor.uncullZoneScale = 1500.0f;
+ this->dyna.actor.cullingVolumeScale = 1500.0f;
} else if (this->dyna.actor.params == STA_BOMBABLE_SKULL_WALL) {
CollisionHeader_GetVirtual(&object_haka_objects_Col_005E30, &colHeader);
this->collider.dim.yShift = -50;
diff --git a/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.h b/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.h
index 6eb5ddcaea..2c8f9a4834 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.h
+++ b/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.h
@@ -2,11 +2,11 @@
#define Z_BG_HAKA_ZOU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHakaZou;
-typedef void (*BgHakaZouActionFunc)(struct BgHakaZou*, PlayState*);
+typedef void (*BgHakaZouActionFunc)(struct BgHakaZou*, struct PlayState*);
typedef struct BgHakaZou {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c
index 8d8be7bbda..90aeee4b87 100644
--- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c
+++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c
@@ -5,9 +5,28 @@
*/
#include "z_bg_heavy_block.h"
-#include "assets/objects/object_heavy_object/object_heavy_object.h"
+
+#include "libu64/debug.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
#include "quake.h"
+#include "rand.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_heavy_object/object_heavy_object.h"
#define FLAGS 0
@@ -41,9 +60,9 @@ ActorProfile Bg_Heavy_Block_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F(scale, 1, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 400, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 400, ICHAIN_STOP),
};
void BgHeavyBlock_SetPieceRandRot(BgHeavyBlock* this, f32 scale) {
@@ -76,7 +95,8 @@ void BgHeavyBlock_InitPiece(BgHeavyBlock* this, f32 scale) {
void BgHeavyBlock_SetupDynapoly(BgHeavyBlock* this, PlayState* play) {
s32 pad[2];
CollisionHeader* colHeader = NULL;
- this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_17;
+ this->dyna.actor.flags |=
+ ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_CARRY_X_ROT_INFLUENCE;
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&gHeavyBlockCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
@@ -100,7 +120,7 @@ void BgHeavyBlock_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BgHeavyBlock_MovePiece;
BgHeavyBlock_InitPiece(this, 1.0f);
this->timer = 120;
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->unk_164.y = -50.0f;
break;
case HEAVYBLOCK_SMALL_PIECE:
@@ -108,7 +128,7 @@ void BgHeavyBlock_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BgHeavyBlock_MovePiece;
BgHeavyBlock_InitPiece(this, 2.0f);
this->timer = 120;
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->unk_164.y = -20.0f;
break;
case HEAVYBLOCK_BREAKABLE:
@@ -145,8 +165,7 @@ void BgHeavyBlock_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BgHeavyBlock_Wait;
break;
}
- // "Largest Block Save Bit %x"
- PRINTF(VT_FGCOL(CYAN) " 最大 ブロック セーブビット %x\n" VT_RST, thisx->params);
+ PRINTF(VT_FGCOL(CYAN) T(" 最大 ブロック セーブビット %x\n", " Largest Block Save Bit %x\n") VT_RST, thisx->params);
}
void BgHeavyBlock_Destroy(Actor* thisx, PlayState* play) {
@@ -470,7 +489,7 @@ void BgHeavyBlock_Land(BgHeavyBlock* this, PlayState* play) {
break;
}
} else {
- this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5);
+ this->dyna.actor.flags &= ~(ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED);
this->actionFunc = BgHeavyBlock_DoNothing;
}
}
diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.h b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.h
index 62c783fe52..a93f5cc3a0 100644
--- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.h
+++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.h
@@ -2,11 +2,11 @@
#define Z_BG_HEAVY_BLOCK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHeavyBlock;
-typedef void (*BgHeavyBlockActionFunc)(struct BgHeavyBlock*, PlayState*);
+typedef void (*BgHeavyBlockActionFunc)(struct BgHeavyBlock*, struct PlayState*);
typedef struct BgHeavyBlock {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c
index dfd7289315..0f0f99da70 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c
@@ -5,9 +5,22 @@
*/
#include "z_bg_hidan_curtain.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgHidanCurtain_Init(Actor* thisx, PlayState* play);
void BgHidanCurtain_Destroy(Actor* thisx, PlayState* play);
@@ -74,9 +87,9 @@ void BgHidanCurtain_Init(Actor* thisx, PlayState* play) {
Actor_SetFocus(&this->actor, 20.0f);
this->type = PARAMS_GET_U(thisx->params, 12, 4);
if (this->type > 6) {
- // "Type is not set"
- PRINTF("Error : object のタイプが設定されていない(%s %d)(arg_data 0x%04x)\n", "../z_bg_hidan_curtain.c", 352,
- this->actor.params);
+ PRINTF(T("Error : object のタイプが設定されていない",
+ "Error : object type is not set") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_hidan_curtain.c", 352, this->actor.params);
Actor_Kill(&this->actor);
return;
}
@@ -86,10 +99,10 @@ void BgHidanCurtain_Init(Actor* thisx, PlayState* play) {
this->treasureFlag = PARAMS_GET_U(thisx->params, 6, 6);
thisx->params &= 0x3F;
- if (OOT_DEBUG && ((this->actor.params < 0) || (this->actor.params > 0x3F))) {
- // "Save bit is not set"
- PRINTF("Warning : object のセーブビットが設定されていない(%s %d)(arg_data 0x%04x)\n", "../z_bg_hidan_curtain.c",
- 373, this->actor.params);
+ if (DEBUG_FEATURES && ((this->actor.params < 0) || (this->actor.params > 0x3F))) {
+ PRINTF(T("Warning : object のセーブビットが設定されていない",
+ "Warning : object save bit is not set") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_hidan_curtain.c", 373, this->actor.params);
}
Actor_SetScale(&this->actor, hcParams->scale);
@@ -212,7 +225,7 @@ void BgHidanCurtain_Update(Actor* thisx, PlayState* play2) {
} else {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
- func_8002F71C(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 1.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 1.0f);
}
if ((this->type == 4) || (this->type == 5)) {
this->actor.world.pos.y = (2.0f * this->actor.home.pos.y) - hcParams->riseDist - this->actor.world.pos.y;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.h b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.h
index 54a99a7960..14502cba68 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.h
@@ -2,11 +2,11 @@
#define Z_BG_HIDAN_CURTAIN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanCurtain;
-typedef void (*BgHidanCurtainActionFunc)(struct BgHidanCurtain*, PlayState*);
+typedef void (*BgHidanCurtainActionFunc)(struct BgHidanCurtain*, struct PlayState*);
typedef struct BgHidanCurtain {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c
index 83e984ee7b..885967c2bb 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c
@@ -5,6 +5,16 @@
*/
#include "z_bg_hidan_dalm.h"
+
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0
@@ -104,7 +114,7 @@ void BgHidanDalm_Init(Actor* thisx, PlayState* play) {
CollisionHeader_GetVirtual(&gFireTempleHammerableTotemCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
Collider_InitTris(play, &this->collider);
- Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderItems);
+ Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderElements);
this->switchFlag = PARAMS_GET_U(thisx->params, 8, 8);
thisx->params &= 0xFF;
@@ -139,7 +149,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) {
this->dyna.actor.world.pos.z += 32.5f * Math_CosS(this->dyna.actor.world.rot.y);
Player_SetCsActionWithHaltedActors(play, &this->dyna.actor, PLAYER_CSACTION_8);
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actionFunc = BgHidanDalm_Shrink;
this->dyna.actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND_TOUCH;
this->dyna.actor.bgCheckFlags &= ~BGCHECKFLAG_WALL;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.h b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.h
index 1ded5bdcb7..83cabfaab4 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.h
@@ -2,18 +2,18 @@
#define Z_BG_HIDAN_DALM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanDalm;
-typedef void (*BgHidanDalmActionFunc)(struct BgHidanDalm*, PlayState*);
+typedef void (*BgHidanDalmActionFunc)(struct BgHidanDalm*, struct PlayState*);
typedef struct BgHidanDalm {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgHidanDalmActionFunc actionFunc;
/* 0x0168 */ u8 switchFlag;
/* 0x016C */ ColliderTris collider;
- /* 0x018C */ ColliderTrisElement colliderItems[4];
+ /* 0x018C */ ColliderTrisElement colliderElements[4];
} BgHidanDalm; // size = 0x02FC
#endif
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c
index 8b120e6dab..9394d4017b 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c
@@ -5,6 +5,16 @@
*/
#include "z_bg_hidan_firewall.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0
@@ -132,7 +142,7 @@ void BgHidanFirewall_Collide(BgHidanFirewall* this, PlayState* play) {
phi_a3 = this->actor.shape.rot.y + 0x8000;
}
- func_8002F71C(play, &this->actor, 5.0f, phi_a3, 1.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, phi_a3, 1.0f);
}
void BgHidanFirewall_ColliderFollowPlayer(BgHidanFirewall* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.h b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.h
index ab60763f7a..35e643279e 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.h
@@ -2,11 +2,11 @@
#define Z_BG_HIDAN_FIREWALL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanFirewall;
-typedef void (*BgHidanFirewallActionFunc)(struct BgHidanFirewall*, PlayState*);
+typedef void (*BgHidanFirewallActionFunc)(struct BgHidanFirewall*, struct PlayState*);
typedef struct BgHidanFirewall {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c
index 1b4ecb10eb..2616f14ace 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c
@@ -5,9 +5,15 @@
*/
#include "z_bg_hidan_fslift.h"
+
+#include "ichain.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgHidanFslift_Init(Actor* thisx, PlayState* play);
void BgHidanFslift_Destroy(Actor* thisx, PlayState* play);
@@ -32,9 +38,9 @@ ActorProfile Bg_Hidan_Fslift_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 300, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 350, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 300, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 350, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_STOP),
};
void BgHidanFslift_Init(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.h b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.h
index e1906d1f40..e21de9fca2 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.h
@@ -2,11 +2,11 @@
#define Z_BG_HIDAN_FSLIFT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanFslift;
-typedef void (*BgHidanFsliftActionFunc)(struct BgHidanFslift*, PlayState*);
+typedef void (*BgHidanFsliftActionFunc)(struct BgHidanFslift*, struct PlayState*);
typedef struct BgHidanFslift {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c
index cc18c4edef..47849aa850 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c
@@ -6,10 +6,23 @@
*/
#include "z_bg_hidan_fwbig.h"
+
+#include "ichain.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum HidanFwbigMoveState {
/* 0 */ FWBIG_MOVE,
@@ -64,7 +77,7 @@ static ColliderCylinderInit sCylinderInit = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 1000, ICHAIN_STOP),
};
void BgHidanFwbig_Init(Actor* thisx, PlayState* play2) {
@@ -94,7 +107,7 @@ void BgHidanFwbig_Init(Actor* thisx, PlayState* play2) {
BgHidanFwbig_UpdatePosition(this);
Actor_SetScale(&this->actor, 0.15f);
this->collider.dim.height = 230;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->moveState = FWBIG_MOVE;
this->actionFunc = BgHidanFwbig_WaitForPlayer;
this->actor.world.pos.y = this->actor.home.pos.y - (2400.0f * this->actor.scale.y);
@@ -222,7 +235,7 @@ void BgHidanFwbig_Update(Actor* thisx, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
- func_8002F71C(play, &this->actor, 5.0f, this->actor.world.rot.y, 1.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.world.rot.y, 1.0f);
if (this->direction != 0) {
this->actionFunc = BgHidanFwbig_Lower;
}
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.h b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.h
index 9bf96e22d3..ce1f016125 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.h
@@ -2,11 +2,11 @@
#define Z_BG_HIDAN_FWBIG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanFwbig;
-typedef void (*BgHidanFwbigActionFunc)(struct BgHidanFwbig*, PlayState*);
+typedef void (*BgHidanFwbigActionFunc)(struct BgHidanFwbig*, struct PlayState*);
typedef struct BgHidanFwbig {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c
index 19458d56b1..d20bccdb71 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c
@@ -5,8 +5,24 @@
*/
#include "z_bg_hidan_hamstep.h"
-#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
#include "quake.h"
+#include "regs.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64play.h"
+
+#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0
@@ -140,7 +156,7 @@ void BgHidanHamstep_Init(Actor* thisx, PlayState* play) {
if (PARAMS_GET_U(this->dyna.actor.params, 0, 8) == 0) {
Collider_InitTris(play, &this->collider);
- Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderItems);
+ Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderElements);
for (i = 0; i < 2; i++) {
for (i2 = 0; i2 < 3; i2++) {
@@ -179,13 +195,11 @@ void BgHidanHamstep_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.minVelocityY = -12.0f;
if (PARAMS_GET_U(this->dyna.actor.params, 0, 8) == 0) {
- // "Fire Temple Object [Hammer Step] appears"
- PRINTF("◯◯◯炎の神殿オブジェクト【ハンマーステップ】出現\n");
+ PRINTF(T("◯◯◯炎の神殿オブジェクト【ハンマーステップ】出現\n", "◯◯◯Fire Temple object [Hammer Step] appears\n"));
if (BgHidanHamstep_SpawnChildren(this, play) == 0) {
step = this;
- // "[Hammer Step] I can't create a step!"
- PRINTF("【ハンマーステップ】 足場産れない!!\n");
+ PRINTF(T("【ハンマーステップ】 足場産れない!!\n", "[Hammer Step] I can't create a step!!\n"));
PRINTF("%s %d\n", "../z_bg_hidan_hamstep.c", 425);
while (step != NULL) {
@@ -347,10 +361,11 @@ void func_80888A58(BgHidanHamstep* this, PlayState* play) {
Actor_MoveXZGravity(&this->dyna.actor);
func_80888694(this, (BgHidanHamstep*)this->dyna.actor.parent);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (PARAMS_GET_U(this->dyna.actor.params, 0, 8) <= 0 || PARAMS_GET_U(this->dyna.actor.params, 0, 8) >= 6) {
- // "[Hammer Step] arg_data strange (arg_data = %d)"
- PRINTF("【ハンマーステップ】 arg_data おかしい (arg_data = %d)", this->dyna.actor.params);
+ PRINTF(T("【ハンマーステップ】 arg_data おかしい (arg_data = %d)",
+ "[Hammer Step] arg_data strange (arg_data = %d)"),
+ this->dyna.actor.params);
PRINTF("%s %d\n", "../z_bg_hidan_hamstep.c", 696);
}
#endif
@@ -379,9 +394,11 @@ void func_80888A58(BgHidanHamstep* this, PlayState* play) {
Rumble_Request(SQ(100.0f), 255, 20, 150);
func_808884C8(this, play);
+#if OOT_VERSION >= PAL_1_0
if (PARAMS_GET_U(this->dyna.actor.params, 0, 8) == 5) {
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
+#endif
PRINTF("B(%d)\n", this->dyna.actor.params);
}
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.h b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.h
index eca062fa95..faf1db7577 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.h
@@ -2,16 +2,16 @@
#define Z_BG_HIDAN_HAMSTEP_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanHamstep;
-typedef void (*BgHidanHamstepActionFunc)(struct BgHidanHamstep*, PlayState*);
+typedef void (*BgHidanHamstepActionFunc)(struct BgHidanHamstep*, struct PlayState*);
typedef struct BgHidanHamstep {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderTris collider;
- /* 0x0184 */ ColliderTrisElement colliderItems[2];
+ /* 0x0184 */ ColliderTrisElement colliderElements[2];
/* 0x023C */ BgHidanHamstepActionFunc actionFunc;
/* 0x0240 */ s32 action;
/* 0x0244 */ s32 unk_244;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c
index 3ef030dedd..a4fd5fab33 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c
@@ -5,6 +5,13 @@
*/
#include "z_bg_hidan_hrock.h"
+
+#include "ichain.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0
@@ -88,7 +95,7 @@ void BgHidanHrock_Init(Actor* thisx, PlayState* play) {
this->unk_16A = PARAMS_GET_U(thisx->params, 0, 6);
thisx->params = PARAMS_GET_U(thisx->params, 8, 8);
Collider_InitTris(play, &this->collider);
- Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderItems);
+ Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderElements);
DynaPolyActor_Init(&this->dyna, 0);
sinRotY = Math_SinS(thisx->shape.rot.y);
@@ -118,7 +125,7 @@ void BgHidanHrock_Init(Actor* thisx, PlayState* play) {
this->actionFunc = func_808894A4;
if (thisx->params == 0) {
thisx->world.pos.y -= 2800.0f;
- thisx->uncullZoneForward = 3000.0f;
+ thisx->cullingVolumeDistance = 3000.0f;
} else if (thisx->params == 1) {
thisx->world.pos.y -= 800.0f;
} else if (thisx->params == 2) {
@@ -126,8 +133,8 @@ void BgHidanHrock_Init(Actor* thisx, PlayState* play) {
}
} else {
if (thisx->params == 0) {
- thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
- thisx->uncullZoneForward = 3000.0f;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
+ thisx->cullingVolumeDistance = 3000.0f;
}
this->actionFunc = func_808896B8;
}
@@ -185,7 +192,7 @@ void func_8088960C(BgHidanHrock* this, PlayState* play) {
this->dyna.actor.velocity.y++;
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, this->dyna.actor.velocity.y)) {
- this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5);
+ this->dyna.actor.flags &= ~(ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED);
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
if (this->dyna.actor.params == 0) {
@@ -204,7 +211,7 @@ void func_808896B8(BgHidanHrock* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
this->actionFunc = func_808894B0;
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
if (this->dyna.actor.params == 0) {
this->dyna.actor.room = -1;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.h b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.h
index 9835f68873..955ddd5dfc 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.h
@@ -2,11 +2,11 @@
#define Z_BG_HIDAN_HROCK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanHrock;
-typedef void (*BgHidanHrockActionFunc)(struct BgHidanHrock*, PlayState*);
+typedef void (*BgHidanHrockActionFunc)(struct BgHidanHrock*, struct PlayState*);
typedef struct BgHidanHrock {
/* 0x0000 */ DynaPolyActor dyna;
@@ -14,7 +14,7 @@ typedef struct BgHidanHrock {
/* 0x0168 */ s16 unk_168;
/* 0x016A */ u8 unk_16A;
/* 0x016C */ ColliderTris collider;
- /* 0x018C */ ColliderTrisElement colliderItems[2];
+ /* 0x018C */ ColliderTrisElement colliderElements[2];
} BgHidanHrock; // size = 0x0244
#endif
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c
index a4f1b187c8..8148f8ca0d 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c
@@ -5,9 +5,21 @@
*/
#include "z_bg_hidan_kousi.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgHidanKousi_Init(Actor* thisx, PlayState* play);
void BgHidanKousi_Destroy(Actor* thisx, PlayState* play);
@@ -69,14 +81,15 @@ void BgHidanKousi_Init(Actor* thisx, PlayState* play) {
DynaPolyActor_Init(&this->dyna, 0);
Actor_SetFocus(thisx, 50.0f);
- PRINTF("◯◯◯炎の神殿オブジェクト【格子(arg_data : %0x)】出現 (%d %d)\n", thisx->params,
- PARAMS_GET_U(thisx->params, 0, 8), PARAMS_GET_U((s32)thisx->params, 8, 8));
+ PRINTF(T("◯◯◯炎の神殿オブジェクト【格子(arg_data : %0x)】出現 (%d %d)\n",
+ "◯◯◯ Fire Temple object [lattice (arg_data : %0x)] appeared (%d %d)\n"),
+ thisx->params, PARAMS_GET_U(thisx->params, 0, 8), PARAMS_GET_U((s32)thisx->params, 8, 8));
Actor_ProcessInitChain(thisx, sInitChain);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (PARAMS_GET_U(thisx->params, 0, 8) < 0 || PARAMS_GET_U(thisx->params, 0, 8) >= 3) {
- PRINTF("arg_data おかしい 【格子】\n");
+ PRINTF(T("arg_data おかしい 【格子】\n", "arg_data is strange [lattice]\n"));
}
#endif
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.h b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.h
index 94a5aad2a9..112b8dc09a 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.h
@@ -2,11 +2,11 @@
#define Z_BG_HIDAN_KOUSI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanKousi;
-typedef void (*BgHidanKousiActionFunc)(struct BgHidanKousi*, PlayState*);
+typedef void (*BgHidanKousiActionFunc)(struct BgHidanKousi*, struct PlayState*);
typedef struct BgHidanKousi {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c
index 05e513a461..7663c13aa0 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c
@@ -5,8 +5,21 @@
*/
#include "z_bg_hidan_kowarerukabe.h"
-#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
+#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0
@@ -92,7 +105,7 @@ void BgHidanKowarerukabe_InitColliderSphere(BgHidanKowarerukabe* this, PlayState
s32 pad;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements);
this->collider.elements[0].dim.modelSphere.radius = sphereRadii[PARAMS_GET_U(this->dyna.actor.params, 0, 8)];
this->collider.elements[0].dim.modelSphere.center.y = sphereYPositions[PARAMS_GET_U(this->dyna.actor.params, 0, 8)];
@@ -106,9 +119,9 @@ void BgHidanKowarerukabe_OffsetActorYPos(BgHidanKowarerukabe* this) {
}
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgHidanKowarerukabe_Init(Actor* thisx, PlayState* play) {
@@ -118,9 +131,10 @@ void BgHidanKowarerukabe_Init(Actor* thisx, PlayState* play) {
if (PARAMS_GET_U(this->dyna.actor.params, 0, 8) < CRACKED_STONE_FLOOR ||
PARAMS_GET_U(this->dyna.actor.params, 0, 8) > LARGE_BOMBABLE_WALL) {
- // "Error: Fire Temple Breakable Walls. arg_data I can't determine the (%s %d)(arg_data 0x%04x)"
- PRINTF("Error : 炎の神殿 壊れる壁 の arg_data が判別出来ない(%s %d)(arg_data 0x%04x)\n",
- "../z_bg_hidan_kowarerukabe.c", 254, this->dyna.actor.params);
+ PRINTF(
+ T("Error : 炎の神殿 壊れる壁 の arg_data が判別出来ない",
+ "Error : arg_data for the Fire Temple breakable wall cannot be determined") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_hidan_kowarerukabe.c", 254, this->dyna.actor.params);
Actor_Kill(&this->dyna.actor);
return;
}
@@ -134,8 +148,8 @@ void BgHidanKowarerukabe_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->dyna.actor, 0.1f);
BgHidanKowarerukabe_InitColliderSphere(this, play);
BgHidanKowarerukabe_OffsetActorYPos(this);
- // "(fire walls, floors, destroyed by bombs)(arg_data 0x%04x)"
- PRINTF("(hidan 爆弾で壊れる 壁 床)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF(T("(hidan 爆弾で壊れる 壁 床)", "(hidan bomb destroys walls and floors)") "(arg_data 0x%04x)\n",
+ this->dyna.actor.params);
}
void BgHidanKowarerukabe_Destroy(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.h b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.h
index 5b59c09ebe..7257a210f1 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.h
@@ -2,14 +2,14 @@
#define Z_BG_HIDAN_KOWARERUKABE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanKowarerukabe;
typedef struct BgHidanKowarerukabe {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderJntSph collider;
- /* 0x0184 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0184 */ ColliderJntSphElement colliderElements[1];
} BgHidanKowarerukabe; // size = 0x01C4
#endif
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c
index 02d864f83f..bf5bc52317 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c
@@ -5,6 +5,19 @@
*/
#include "z_bg_hidan_rock.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0
@@ -91,7 +104,7 @@ void BgHidanRock_Init(Actor* thisx, PlayState* play) {
} else {
this->actionFunc = func_8088B268;
}
- thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
CollisionHeader_GetVirtual(&gFireTempleStoneBlock1Col, &colHeader);
} else {
CollisionHeader_GetVirtual(&gFireTempleStoneBlock2Col, &colHeader);
@@ -114,7 +127,7 @@ void BgHidanRock_Destroy(Actor* thisx, PlayState* play) {
}
void func_8088B24C(BgHidanRock* this) {
- this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
this->actionFunc = func_8088B990;
}
@@ -247,7 +260,7 @@ void func_8088B79C(BgHidanRock* this, PlayState* play) {
} else {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 15.0f;
this->actionFunc = func_8088B90C;
- this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5);
+ this->dyna.actor.flags &= ~(ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED);
}
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND);
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.h b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.h
index 35ba9ef625..aa8d6ca874 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.h
@@ -2,11 +2,11 @@
#define Z_BG_HIDAN_ROCK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanRock;
-typedef void (*BgHidanRockActionFunc)(struct BgHidanRock*, PlayState*);
+typedef void (*BgHidanRockActionFunc)(struct BgHidanRock*, struct PlayState*);
typedef struct BgHidanRock {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c
index eb69f0d0b9..8a7e68700c 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c
@@ -5,6 +5,17 @@
*/
#include "z_bg_hidan_rsekizou.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0
@@ -110,8 +121,8 @@ static ColliderJntSphInit sJntSphInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1500, ICHAIN_STOP),
};
static void* sFireballsTexs[] = {
@@ -131,8 +142,8 @@ void BgHidanRsekizou_Init(Actor* thisx, PlayState* play) {
CollisionHeader_GetVirtual(&gFireTempleSpinningFlamethrowerCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems);
- for (i = 0; i < ARRAY_COUNT(this->colliderItems); i++) {
+ Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements);
+ for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) {
this->collider.elements[i].dim.worldSphere.radius = this->collider.elements[i].dim.modelSphere.radius;
}
this->burnFrame = 0;
@@ -149,7 +160,7 @@ void BgHidanRsekizou_Destroy(Actor* thisx, PlayState* play) {
void BgHidanRsekizou_Update(Actor* thisx, PlayState* play) {
BgHidanRsekizou* this = (BgHidanRsekizou*)thisx;
s32 i;
- ColliderJntSphElement* sphere;
+ ColliderJntSphElement* element;
s32 pad;
f32 yawSine;
f32 yawCosine;
@@ -168,13 +179,15 @@ void BgHidanRsekizou_Update(Actor* thisx, PlayState* play) {
yawSine = Math_SinS(this->dyna.actor.shape.rot.y);
yawCosine = Math_CosS(this->dyna.actor.shape.rot.y);
- for (i = 0; i < ARRAY_COUNT(this->colliderItems); i++) {
- sphere = &this->collider.elements[i];
- sphere->dim.worldSphere.center.x = this->dyna.actor.home.pos.x + yawCosine * sphere->dim.modelSphere.center.x +
- yawSine * sphere->dim.modelSphere.center.z;
- sphere->dim.worldSphere.center.y = (s16)this->dyna.actor.home.pos.y + sphere->dim.modelSphere.center.y;
- sphere->dim.worldSphere.center.z = (this->dyna.actor.home.pos.z - yawSine * sphere->dim.modelSphere.center.x) +
- yawCosine * sphere->dim.modelSphere.center.z;
+ for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) {
+ element = &this->collider.elements[i];
+ element->dim.worldSphere.center.x = this->dyna.actor.home.pos.x +
+ (yawCosine * element->dim.modelSphere.center.x) +
+ (yawSine * element->dim.modelSphere.center.z);
+ element->dim.worldSphere.center.y = (s16)this->dyna.actor.home.pos.y + element->dim.modelSphere.center.y;
+ element->dim.worldSphere.center.z = this->dyna.actor.home.pos.z -
+ (yawSine * element->dim.modelSphere.center.x) +
+ (yawCosine * element->dim.modelSphere.center.z);
}
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
@@ -234,7 +247,7 @@ void BgHidanRsekizou_Draw(Actor* thisx, PlayState* play) {
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_bg_hidan_rsekizou.c", 568);
gSPDisplayList(POLY_OPA_DISP++, gFireTempleSpinningFlamethrowerDL);
- Matrix_MtxFCopy(&mf, &gMtxFClear);
+ Matrix_MtxFCopy(&mf, &gIdentityMtxF);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_20);
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.h b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.h
index cfbd5d3e5e..82725e4fc1 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.h
@@ -2,7 +2,7 @@
#define Z_BG_HIDAN_RSEKIZOU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanRsekizou;
@@ -11,7 +11,7 @@ typedef struct BgHidanRsekizou {
/* 0x0164 */ s16 bendFrame;
/* 0x0166 */ s16 burnFrame;
/* 0x0168 */ ColliderJntSph collider;
- /* 0x0188 */ ColliderJntSphElement colliderItems[6];
+ /* 0x0188 */ ColliderJntSphElement colliderElements[6];
} BgHidanRsekizou; // size = 0x0308
#endif
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c
index d512fd4820..452c88f5f4 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c
@@ -5,6 +5,18 @@
*/
#include "z_bg_hidan_sekizou.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0
@@ -115,8 +127,8 @@ static CollisionCheckInfoInit sColChkInfoInit = { 1, 40, 240, MASS_IMMOVABLE };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1500, ICHAIN_STOP),
};
static void* sFireballsTexs[] = {
@@ -154,8 +166,8 @@ void BgHidanSekizou_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 0);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->elements);
- for (i = 0; i < ARRAY_COUNT(this->elements); i++) {
+ Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements);
+ for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) {
this->collider.elements[i].dim.worldSphere.radius = this->collider.elements[i].dim.modelSphere.radius;
}
if (this->dyna.actor.params == 0) {
@@ -210,7 +222,7 @@ void func_8088D434(BgHidanSekizou* this, PlayState* play) {
}
}
}
- for (i = 3 * phi_s4; i < ARRAY_COUNT(this->elements); i++) {
+ for (i = 3 * phi_s4; i < ARRAY_COUNT(this->colliderElements); i++) {
this->collider.elements[i].base.atElemFlags &= ~ATELEM_ON;
this->collider.elements[i].base.ocElemFlags &= ~OCELEM_ON;
}
@@ -259,7 +271,7 @@ void func_8088D750(BgHidanSekizou* this, PlayState* play) {
phi_a3 = -0x4000;
}
}
- func_8002F71C(play, &this->dyna.actor, 5.0f, phi_a3, 1.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 5.0f, phi_a3, 1.0f);
}
void BgHidanSekizou_Update(Actor* thisx, PlayState* play2) {
@@ -349,7 +361,7 @@ Gfx* func_8088DC50(PlayState* play, BgHidanSekizou* this, s16 arg2, s16 arg3, Gf
}
temp_f20 = Math_SinS(arg2);
temp_f22 = Math_CosS(arg2);
- Matrix_MtxFCopy(&sp68, &gMtxFClear);
+ Matrix_MtxFCopy(&sp68, &gIdentityMtxF);
temp_v1 = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) - arg2;
if (ABS(temp_v1) < 0x4000) {
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.h b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.h
index 86b9427df2..c898f9d934 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.h
@@ -2,11 +2,11 @@
#define Z_BG_HIDAN_SEKIZOU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanSekizou;
-typedef void (*BgHidanSekizouUpdateFunc)(struct BgHidanSekizou*, PlayState*);
+typedef void (*BgHidanSekizouUpdateFunc)(struct BgHidanSekizou*, struct PlayState*);
typedef struct BgHidanSekizou {
/* 0x0000 */ DynaPolyActor dyna;
@@ -14,7 +14,7 @@ typedef struct BgHidanSekizou {
/* 0x0168 */ s16 unk_168[4];
/* 0x0170 */ s16 unk_170;
/* 0x0174 */ ColliderJntSph collider;
- /* 0x0194 */ ColliderJntSphElement elements[6];
+ /* 0x0194 */ ColliderJntSphElement colliderElements[6];
} BgHidanSekizou; // size = 0x0314
#endif
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c
index 06f5b2a308..f166f9f4d8 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c
@@ -5,6 +5,19 @@
*/
#include "z_bg_hidan_sima.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#define FLAGS 0
@@ -95,7 +108,7 @@ void BgHidanSima_Init(Actor* thisx, PlayState* play) {
}
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->elements);
+ Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements);
for (i = 0; i < ARRAY_COUNT(sJntSphElementsInit); i++) {
this->collider.elements[i].dim.worldSphere.radius = this->collider.elements[i].dim.modelSphere.radius;
}
@@ -233,7 +246,7 @@ Gfx* func_8088EB54(PlayState* play, BgHidanSima* this, Gfx* gfx) {
f32 sin;
s32 pad[2];
- Matrix_MtxFCopy(&mtxF, &gMtxFClear);
+ Matrix_MtxFCopy(&mtxF, &gIdentityMtxF);
cos = Math_CosS(this->dyna.actor.world.rot.y + 0x8000);
sin = Math_SinS(this->dyna.actor.world.rot.y + 0x8000);
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.h b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.h
index 927391110b..dd64b556b0 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.h
@@ -2,18 +2,18 @@
#define Z_BG_HIDAN_SIMA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanSima;
-typedef void (*BgHidanSimaActionFunc)(struct BgHidanSima*, PlayState*);
+typedef void (*BgHidanSimaActionFunc)(struct BgHidanSima*, struct PlayState*);
typedef struct BgHidanSima {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgHidanSimaActionFunc actionFunc;
/* 0x0168 */ s16 timer;
/* 0x016C */ ColliderJntSph collider;
- /* 0x018C */ ColliderJntSphElement elements[2];
+ /* 0x018C */ ColliderJntSphElement colliderElements[2];
} BgHidanSima; // size = 0x020C
#endif
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c
index b5d5f4f372..d21b1e8212 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c
+++ b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c
@@ -5,9 +5,14 @@
*/
#include "z_bg_hidan_syoku.h"
+
+#include "ichain.h"
+#include "sfx.h"
+#include "z64play.h"
+
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgHidanSyoku_Init(Actor* thisx, PlayState* play);
void BgHidanSyoku_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.h b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.h
index 61e3520b76..2ce3fbfd4e 100644
--- a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.h
+++ b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.h
@@ -2,11 +2,11 @@
#define Z_BG_HIDAN_SYOKU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgHidanSyoku;
-typedef void (*BgHidanSyokuActionFunc)(struct BgHidanSyoku*, PlayState*);
+typedef void (*BgHidanSyokuActionFunc)(struct BgHidanSyoku*, struct PlayState*);
typedef struct BgHidanSyoku {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c
index f257aa5ef4..6bfd39e4e5 100644
--- a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c
+++ b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c
@@ -5,6 +5,16 @@
*/
#include "z_bg_ice_objects.h"
+
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_ice_objects/object_ice_objects.h"
#define FLAGS 0
@@ -141,7 +151,7 @@ void BgIceObjects_Idle(BgIceObjects* this, PlayState* play) {
if ((this->dyna.unk_150 > 0.0f) && !Player_InCsMode(play)) {
BgIceObjects_SetNextTarget(this, play);
if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) {
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_8);
thisx->params = 1;
this->actionFunc = BgIceObjects_Slide;
@@ -169,7 +179,7 @@ void BgIceObjects_Slide(BgIceObjects* this, PlayState* play) {
this->targetPos.x = thisx->world.pos.x;
this->targetPos.z = thisx->world.pos.z;
if (thisx->velocity.y <= 0.0f) {
- thisx->flags &= ~ACTOR_FLAG_4;
+ thisx->flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
thisx->params = 0;
Player_SetCsActionWithHaltedActors(play, thisx, PLAYER_CSACTION_7);
@@ -206,7 +216,7 @@ void BgIceObjects_Reset(BgIceObjects* this, PlayState* play) {
this->dyna.unk_150 = 0.0f;
}
if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y, 1.0f)) {
- thisx->flags &= ~ACTOR_FLAG_4;
+ thisx->flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
Math_Vec3f_Copy(&this->targetPos, &thisx->home.pos);
this->actionFunc = BgIceObjects_Idle;
thisx->speed = 0.0f;
diff --git a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.h b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.h
index 13a2334c39..364b087852 100644
--- a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.h
+++ b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.h
@@ -2,11 +2,11 @@
#define Z_BG_ICE_OBJECTS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgIceObjects;
-typedef void (*BgIceObjectsActionFunc) (struct BgIceObjects*, PlayState*);
+typedef void (*BgIceObjectsActionFunc) (struct BgIceObjects*, struct PlayState*);
typedef struct BgIceObjects {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c
index 652b83ad0f..102e2e3ba5 100644
--- a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c
+++ b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c
@@ -5,6 +5,19 @@
*/
#include "z_bg_ice_shelter.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_ice_objects/object_ice_objects.h"
#define FLAGS 0
@@ -120,13 +133,13 @@ void BgIceShelter_InitDynaPoly(BgIceShelter* this, PlayState* play, CollisionHea
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- // "Warning : move BG registration failed"
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_ice_shelter.c", 362,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_ice_shelter.c", 362, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -141,9 +154,9 @@ void BgIceShelter_RotateY(Vec3f* dest, Vec3f* src, s16 angle) {
}
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgIceShelter_Init(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.h b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.h
index 765b017b32..30286a64d1 100644
--- a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.h
+++ b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.h
@@ -2,11 +2,11 @@
#define Z_BG_ICE_SHELTER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgIceShelter;
-typedef void (*BgIceShelterActionFunc)(struct BgIceShelter*, PlayState*);
+typedef void (*BgIceShelterActionFunc)(struct BgIceShelter*, struct PlayState*);
typedef enum RedIceType {
/* 0 */ RED_ICE_LARGE, // Large red ice block
diff --git a/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c b/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c
index a27d455caf..20176f2758 100644
--- a/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c
+++ b/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c
@@ -5,9 +5,16 @@
*/
#include "z_bg_ice_shutter.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_ice_objects/object_ice_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgIceShutter_Init(Actor* thisx, PlayState* play);
void BgIceShutter_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.h b/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.h
index db8a7ff61c..aad63d435b 100644
--- a/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.h
+++ b/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.h
@@ -2,11 +2,11 @@
#define Z_BG_ICE_SHUTTER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgIceShutter;
-typedef void (*BgIceShutterActionFunc)(struct BgIceShutter*, PlayState*);
+typedef void (*BgIceShutterActionFunc)(struct BgIceShutter*, struct PlayState*);
typedef struct BgIceShutter {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c
index a9a560bc09..8fb200aca5 100644
--- a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c
+++ b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c
@@ -5,6 +5,15 @@
*/
#include "z_bg_ice_turara.h"
+
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_ice_objects/object_ice_objects.h"
#define FLAGS 0
@@ -53,7 +62,7 @@ ActorProfile Bg_Ice_Turara_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 600, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 600, ICHAIN_CONTINUE),
ICHAIN_F32(gravity, -3, ICHAIN_CONTINUE),
ICHAIN_F32(minVelocityY, -30, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
diff --git a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.h b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.h
index eaa6cc843f..46a78eb738 100644
--- a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.h
+++ b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.h
@@ -2,11 +2,11 @@
#define Z_BG_ICE_TURARA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgIceTurara;
-typedef void (*BgIceTuraraActionFunc)(struct BgIceTurara*, PlayState*);
+typedef void (*BgIceTuraraActionFunc)(struct BgIceTurara*, struct PlayState*);
typedef enum BgIceTuraraType {
/* 0 */ TURARA_STALAGMITE,
diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c
index a9dd2adfa5..e46139117c 100644
--- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c
+++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c
@@ -5,6 +5,14 @@
*/
#include "z_bg_ingate.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_ingate/object_ingate.h"
#define FLAGS 0
@@ -52,7 +60,7 @@ void BgInGate_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->dyna.actor, 0.1f);
if ((PARAMS_GET_U(this->dyna.actor.params, 0, 1) != 0) &&
- (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6)) {
+ (GET_EVENTINF_INGO_RACE_STATE() == INGO_RACE_STATE_TRAPPED_WIN_EPONA)) {
play->csCtx.curFrame = 0;
BgInGate_SetupAction(this, func_80892890);
} else {
diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.h b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.h
index 2137cc6464..c9f46446ab 100644
--- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.h
+++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.h
@@ -2,11 +2,11 @@
#define Z_BG_INGATE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgInGate;
-typedef void (*BgInGateActionFunc)(struct BgInGate*, PlayState*);
+typedef void (*BgInGateActionFunc)(struct BgInGate*, struct PlayState*);
typedef struct BgInGate {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c
index 1110d2dbb8..58cd7278ad 100644
--- a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c
+++ b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c
@@ -5,9 +5,18 @@
*/
#include "z_bg_jya_1flift.h"
+
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_jya_obj/object_jya_obj.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgJya1flift_Init(Actor* thisx, PlayState* play);
void BgJya1flift_Destroy(Actor* thisx, PlayState* play);
@@ -61,9 +70,9 @@ static f32 sFinalPositions[] = { 443.0f, -50.0f };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1200, ICHAIN_STOP),
};
void BgJya1flift_InitDynapoly(BgJya1flift* this, PlayState* play, CollisionHeader* collision, s32 moveFlag) {
@@ -74,13 +83,13 @@ void BgJya1flift_InitDynapoly(BgJya1flift* this, PlayState* play, CollisionHeade
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- // "Warning : move BG login failed"
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_1flift.c", 179,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_jya_1flift.c", 179, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -95,8 +104,7 @@ void BgJya1flift_InitCollision(Actor* thisx, PlayState* play) {
void BgJya1flift_Init(Actor* thisx, PlayState* play) {
BgJya1flift* this = (BgJya1flift*)thisx;
- // "1 F lift"
- PRINTF("(1Fリフト)(flag %d)(room %d)\n", sIsSpawned, play->roomCtx.curRoom.num);
+ PRINTF(T("(1Fリフト)", "1F lift") "(flag %d)(room %d)\n", sIsSpawned, play->roomCtx.curRoom.num);
this->hasInitialized = false;
if (sIsSpawned) {
Actor_Kill(thisx);
diff --git a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.h b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.h
index 31ce5a7f4d..8d772757bf 100644
--- a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.h
+++ b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.h
@@ -2,11 +2,11 @@
#define Z_BG_JYA_1FLIFT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJya1flift;
-typedef void (*BgJya1fliftActionFunc)(struct BgJya1flift*, PlayState*);
+typedef void (*BgJya1fliftActionFunc)(struct BgJya1flift*, struct PlayState*);
typedef struct BgJya1flift {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c
index 10548a1d16..ee9487d2ef 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c
@@ -5,6 +5,14 @@
*/
#include "z_bg_jya_amishutter.h"
+
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0
@@ -37,9 +45,9 @@ ActorProfile Bg_Jya_Amishutter_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgJyaAmishutter_InitDynaPoly(BgJyaAmishutter* this, PlayState* play, CollisionHeader* collision, s32 flag) {
@@ -50,12 +58,13 @@ void BgJyaAmishutter_InitDynaPoly(BgJyaAmishutter* this, PlayState* play, Collis
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_amishutter.c", 129,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_jya_amishutter.c", 129, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
diff --git a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.h b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.h
index e15a42fe88..1dad4c1543 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.h
@@ -2,7 +2,7 @@
#define Z_BG_JYA_AMISHUTTER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaAmishutter;
diff --git a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c
index d705c08bb5..f2955f3050 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c
@@ -5,9 +5,18 @@
*/
#include "z_bg_jya_bigmirror.h"
+#include "overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z64play.h"
+
#include "assets/objects/object_jya_obj/object_jya_obj.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgJyaBigmirror_Init(Actor* thisx, PlayState* play);
void BgJyaBigmirror_Destroy(Actor* thisx, PlayState* play);
@@ -74,10 +83,10 @@ void BgJyaBigmirror_HandleCobra(Actor* thisx, PlayState* play) {
this->puzzleFlags &= ~cobraPuzzleFlags[i];
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (curCobraInfo->cobra->dyna.actor.update == NULL) {
- // "Cobra deleted"
- PRINTF("Error : コブラ削除された (%s %d)\n", "../z_bg_jya_bigmirror.c", 203);
+ PRINTF("Error : " T("コブラ削除された", "Cobra deleted") " (%s %d)\n", "../z_bg_jya_bigmirror.c",
+ 203);
}
#endif
} else {
@@ -87,8 +96,8 @@ void BgJyaBigmirror_HandleCobra(Actor* thisx, PlayState* play) {
this->actor.child = NULL;
if (curCobraInfo->cobra == NULL) {
- // "Cobra generation failed"
- PRINTF("Error : コブラ発生失敗 (%s %d)\n", "../z_bg_jya_bigmirror.c", 221);
+ PRINTF("Error : " T("コブラ発生失敗", "Cobra generation failed") " (%s %d)\n",
+ "../z_bg_jya_bigmirror.c", 221);
}
}
}
@@ -153,10 +162,10 @@ void BgJyaBigmirror_HandleMirRay(Actor* thisx, PlayState* play) {
Actor_Spawn(&play->actorCtx, play, ACTOR_MIR_RAY, sMirRayPositions[i].x, sMirRayPositions[i].y,
sMirRayPositions[i].z, 0, 0, 0, sMirRayParamsVals[i]);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->lightBeams[i] == NULL) {
- // "Mir Ray generation failed"
- PRINTF("Error : Mir Ray 発生失敗 (%s %d)\n", "../z_bg_jya_bigmirror.c", 310);
+ PRINTF("Error : " T("Mir Ray 発生失敗", "Mir Ray generation failed") " (%s %d)\n",
+ "../z_bg_jya_bigmirror.c", 310);
}
#endif
}
@@ -187,8 +196,7 @@ void BgJyaBigmirror_Init(Actor* thisx, PlayState* play) {
this->spawned = true;
this->mirRayObjectSlot = -1;
- // "jya Bigmirror"
- PRINTF("(jya 大鏡)(arg_data 0x%04x)\n", this->actor.params);
+ PRINTF("(jya " T("大鏡", "Big mirror") ")(arg_data 0x%04x)\n", this->actor.params);
}
void BgJyaBigmirror_Destroy(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.h b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.h
index 52f2b95930..56b6d8db07 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.h
@@ -2,8 +2,7 @@
#define Z_BG_JYA_BIGMIRROR_H
#include "ultra64.h"
-#include "global.h"
-#include "overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.h"
+#include "z64actor.h"
#define BIGMIR_PUZZLE_COBRA1_SOLVED (1 << 0)
#define BIGMIR_PUZZLE_COBRA2_SOLVED (1 << 1)
@@ -15,7 +14,7 @@
struct BgJyaBigmirror;
typedef struct BigmirrorCobra {
- /* 0x00 */ BgJyaCobra* cobra;
+ /* 0x00 */ struct BgJyaCobra* cobra;
/* 0x04 */ s16 rotY;
} BigmirrorCobra; // size = 0x08
diff --git a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c
index d7aaafba54..946db1b05c 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c
@@ -5,6 +5,16 @@
*/
#include "z_bg_jya_block.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#define FLAGS 0
@@ -28,9 +38,9 @@ ActorProfile Bg_Jya_Block_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 333, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1500, ICHAIN_STOP),
};
void BgJyaBlock_Init(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.h b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.h
index 2d58de5c12..641141945a 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.h
@@ -2,7 +2,7 @@
#define Z_BG_JYA_BLOCK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaBlock;
diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c
index 061ef48fd1..73108e43d0 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c
@@ -1,5 +1,19 @@
#include "z_bg_jya_bombchuiwa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_jya_obj/object_jya_obj.h"
#define FLAGS ACTOR_FLAG_ATTENTION_ENABLED
@@ -56,16 +70,16 @@ static ColliderJntSphInit sJntSphInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_U8(attentionRangeType, ATTENTION_RANGE_3, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgJyaBombchuiwa_SetupCollider(BgJyaBombchuiwa* this, PlayState* play) {
s32 pad;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, &this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
}
void BgJyaBombchuiwa_SetDrawFlags(BgJyaBombchuiwa* this, u8 drawFlags) {
@@ -181,9 +195,8 @@ void BgJyaBombchuiwa_SpawnLightRay(BgJyaBombchuiwa* this, PlayState* play) {
BgJyaBombchuiwa_SetDrawFlags(this, 4);
if (Actor_Spawn(&play->actorCtx, play, ACTOR_MIR_RAY, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, 0, 0, 0, 0) == NULL) {
- // "Occurrence failure"
- PRINTF("Error : Mir_Ray 発生失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_jya_bombchuiwa.c", 410,
- this->actor.params);
+ PRINTF(T("Error : Mir_Ray 発生失敗", "Error : Mir_Ray failed to occur") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_jya_bombchuiwa.c", 410, this->actor.params);
}
}
diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.h b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.h
index e936167100..ad9b9c33db 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.h
@@ -2,17 +2,17 @@
#define Z_BG_JYA_BOMBCHUIWA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaBombchuiwa;
-typedef void (*BgJyaBombchuiwaActionFunc)(struct BgJyaBombchuiwa*, PlayState*);
+typedef void (*BgJyaBombchuiwaActionFunc)(struct BgJyaBombchuiwa*, struct PlayState*);
typedef struct BgJyaBombchuiwa {
/* 0x0000 */ Actor actor;
/* 0x014C */ BgJyaBombchuiwaActionFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
- /* 0x0170 */ ColliderJntSphElement colliderItems;
+ /* 0x0170 */ ColliderJntSphElement colliderElements[1];
/* 0x01B0 */ f32 lightRayIntensity;
/* 0x01B4 */ s16 timer;
/* 0x01B6 */ u8 drawFlags; // Used to determine how the actor is drawn.
diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c
index a9d953fb72..5a01066a3c 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c
@@ -6,8 +6,17 @@
#include "z_bg_jya_bombiwa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
-#include "assets/objects/object_jya_obj/object_jya_obj.h"
+
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
#include "terminal.h"
+#include "translation.h"
+#include "z64effect.h"
+#include "z64play.h"
+
+#include "assets/objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0
@@ -57,9 +66,9 @@ static ColliderJntSphInit sJntSphInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, PlayState* play, CollisionHeader* collision, s32 flag) {
@@ -70,13 +79,13 @@ void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, PlayState* play, CollisionHe
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- // "Warning: move BG registration failed"
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_bombiwa.c", 174,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_jya_bombiwa.c", 174, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -85,19 +94,18 @@ void BgJyaBombiwa_InitCollider(BgJyaBombiwa* this, PlayState* play) {
s32 pad;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements);
}
void BgJyaBombiwa_Init(Actor* thisx, PlayState* play) {
BgJyaBombiwa* this = (BgJyaBombiwa*)thisx;
if (PARAMS_GET_U(this->dyna.actor.params, 0, 6) != 0x29) {
- PRINTF(VT_COL(YELLOW, BLACK));
-
- // "Warning: Switch Number changed (%s %d)(SW %d)"
- PRINTF("Warning : Switch Number が変更された(%s %d)(SW %d)\n", "../z_bg_jya_bombiwa.c", 218,
- PARAMS_GET_U(this->dyna.actor.params, 0, 6));
- PRINTF(VT_RST);
+ PRINTF_COLOR_WARNING();
+ PRINTF(T("Warning : Switch Number が変更された",
+ "Warning : Switch Number has been changed") "(%s %d)(SW %d)\n",
+ "../z_bg_jya_bombiwa.c", 218, PARAMS_GET_U(this->dyna.actor.params, 0, 6));
+ PRINTF_RST();
}
BgJyaBombiwa_SetupDynaPoly(this, play, &gBombiwaCol, 0);
BgJyaBombiwa_InitCollider(this, play);
@@ -106,8 +114,7 @@ void BgJyaBombiwa_Init(Actor* thisx, PlayState* play) {
} else {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
- // "Rock destroyed by jya bomb"
- PRINTF("(jya 爆弾で破壊岩)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF(T("(jya 爆弾で破壊岩)", "(jya bomb destroys rocks)") "(arg_data 0x%04x)\n", this->dyna.actor.params);
}
}
diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h
index 879291f87c..9f06d9a1d6 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h
@@ -2,8 +2,7 @@
#define Z_BG_JYA_BOMBIWA_H
#include "ultra64.h"
-#include "global.h"
-
+#include "z64actor.h"
struct BgJyaBombiwa;
@@ -11,7 +10,7 @@ typedef struct BgJyaBombiwa {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ s32 unk_164;
/* 0x0168 */ ColliderJntSph collider;
- /* 0x0188 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0188 */ ColliderJntSphElement colliderElements[1];
} BgJyaBombiwa; // size = 0x01C8
#endif
diff --git a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c
index 117878f8bf..0a087d91d9 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c
@@ -1,10 +1,22 @@
#include "z_bg_jya_cobra.h"
#include "overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.h"
#include "overlays/actors/ovl_Mir_Ray/z_mir_ray.h"
-#include "assets/objects/object_jya_obj/object_jya_obj.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_jya_obj/object_jya_obj.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgJyaCobra_Init(Actor* thisx, PlayState* play);
void BgJyaCobra_Destroy(Actor* thisx, PlayState* play);
@@ -94,9 +106,9 @@ static s32 D_80897518[] = { 0x80, 0xA0, 0xA0, 0x80 };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
static Vec3s D_80897538 = { 0, -0x4000, 0 };
@@ -123,13 +135,13 @@ void BgJyaCobra_InitDynapoly(BgJyaCobra* this, PlayState* play, CollisionHeader*
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- // "Warning : move BG Registration Failure"
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_cobra.c", 247,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_jya_cobra.c", 247, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -138,12 +150,12 @@ void BgJyaCobra_SpawnRay(BgJyaCobra* this, PlayState* play) {
Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, ACTOR_MIR_RAY, this->dyna.actor.world.pos.x,
this->dyna.actor.world.pos.y + 57.0f, this->dyna.actor.world.pos.z, 0, 0, 0, 6);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.actor.child == NULL) {
- PRINTF(VT_FGCOL(RED));
- // "Error : Mir Ray occurrence failure"
- PRINTF("Error : Mir Ray 発生失敗 (%s %d)\n", "../z_bg_jya_cobra.c", 270);
- PRINTF(VT_RST);
+ PRINTF_COLOR_RED();
+ PRINTF(T("Error : Mir Ray 発生失敗", "Error : Mir Ray failed to occur") " (%s %d)\n",
+ "../z_bg_jya_cobra.c", 270);
+ PRINTF_RST();
}
#endif
}
@@ -427,8 +439,7 @@ void BgJyaCobra_Init(Actor* thisx, PlayState* play) {
BgJyaCobra_UpdateShadowFromTop(this);
}
- // "(jya cobra)"
- PRINTF("(jya コブラ)(arg_data 0x%04x)(act %x)(txt %x)(txt16 %x)\n", this->dyna.actor.params, this,
+ PRINTF("(jya " T("コブラ", "cobra") ")(arg_data 0x%04x)(act %x)(txt %x)(txt16 %x)\n", this->dyna.actor.params, this,
&this->shadowTextureBuffer, COBRA_SHADOW_TEX_PTR(this));
}
diff --git a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.h b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.h
index 8722bcc2ce..32266e2ac4 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.h
@@ -2,11 +2,11 @@
#define Z_BG_JYA_COBRA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaCobra;
-typedef void (*BgJyaCobraActionFunc)(struct BgJyaCobra*, PlayState*);
+typedef void (*BgJyaCobraActionFunc)(struct BgJyaCobra*, struct PlayState*);
#define COBRA_SHADOW_TEX_WIDTH 64
#define COBRA_SHADOW_TEX_HEIGHT 64
diff --git a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c
index 31545fe1ce..6d6b13efb8 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c
@@ -6,9 +6,16 @@
*/
#include "z_bg_jya_goroiwa.h"
+
+#include "ichain.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_goroiwa/object_goroiwa.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgJyaGoroiwa_Init(Actor* thisx, PlayState* play);
void BgJyaGoroiwa_Destroy(Actor* thisx, PlayState* play);
@@ -66,9 +73,9 @@ static CollisionCheckInfoInit sColChkInfoInit = { 1, 15, 0, MASS_HEAVY };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgJyaGoroiwa_UpdateCollider(BgJyaGoroiwa* this) {
@@ -83,7 +90,7 @@ void BgJyaGoroiwa_InitCollider(BgJyaGoroiwa* this, PlayState* play) {
s32 pad;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, &this->colliderItem);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
BgJyaGoroiwa_UpdateCollider(this);
this->collider.elements[0].dim.worldSphere.radius = 58;
}
@@ -152,7 +159,7 @@ void BgJyaGoroiwa_Move(BgJyaGoroiwa* this, PlayState* play) {
thisx->world.rot.y += 0x8000;
}
- func_8002F6D4(play, thisx, 2.0f, thisx->yawTowardsPlayer, 0.0f, 0);
+ Actor_SetPlayerKnockbackLarge(play, thisx, 2.0f, thisx->yawTowardsPlayer, 0.0f, 0);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
this->yOffsetSpeed = 10.0f;
@@ -200,7 +207,7 @@ void BgJyaGoroiwa_Update(Actor* thisx, PlayState* play) {
s32 bgId;
Vec3f checkPos;
- if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
+ if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
this->actionFunc(this, play);
BgJyaGoroiwa_UpdateRotation(this);
checkPos.x = this->actor.world.pos.x;
diff --git a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.h b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.h
index 2722475480..35f4c971c9 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.h
@@ -2,17 +2,17 @@
#define Z_BG_JYA_GOROIWA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaGoroiwa;
-typedef void (*BgJyaGoroiwaFunc)(struct BgJyaGoroiwa*, PlayState*);
+typedef void (*BgJyaGoroiwaFunc)(struct BgJyaGoroiwa*, struct PlayState*);
typedef struct BgJyaGoroiwa {
/* 0x0000 */ Actor actor;
/* 0x014C */ BgJyaGoroiwaFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
- /* 0x0170 */ ColliderJntSphElement colliderItem;
+ /* 0x0170 */ ColliderJntSphElement colliderElements[1];
/* 0x01B0 */ f32 speedFactor;
/* 0x01B4 */ s16 hasHit;
/* 0x01B6 */ s16 waitTimer;
diff --git a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c
index 0f100259bd..b9350da300 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c
@@ -6,9 +6,18 @@
#include "z_bg_jya_haheniron.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_jya_iron/object_jya_iron.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgJyaHaheniron_Init(Actor* thisx, PlayState* play);
void BgJyaHaheniron_Destroy(Actor* thisx, PlayState* play);
@@ -64,9 +73,9 @@ static ColliderJntSphInit sJntSphInit = {
static s16 sKakeraScales[] = { 5, 8, 11, 14, 17 };
static InitChainEntry sInitChain[] = {
- ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(minVelocityY, -15000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(minVelocityY, -15000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE), ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
static f32 D_80898794[] = { 0.13f, 0.1f, 0.1f };
@@ -79,7 +88,7 @@ void BgJyaHaheniron_ColliderInit(BgJyaHaheniron* this, PlayState* play) {
s32 pad;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
}
void BgJyaHaheniron_SpawnFragments(PlayState* play, Vec3f* vec1, Vec3f* vec2) {
diff --git a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.h b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.h
index 60f9c6ef9e..2da7d3673f 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.h
@@ -2,17 +2,17 @@
#define Z_BG_JYA_HAHENIRON_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaHaheniron;
-typedef void (*BgJyaHahenironActionFunc)(struct BgJyaHaheniron*, PlayState*);
+typedef void (*BgJyaHahenironActionFunc)(struct BgJyaHaheniron*, struct PlayState*);
typedef struct BgJyaHaheniron {
/* 0x0000 */ Actor actor;
/* 0x014C */ BgJyaHahenironActionFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
- /* 0x0170 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0170 */ ColliderJntSphElement colliderElements[1];
/* 0x01B0 */ s16 timer;
} BgJyaHaheniron; // size = 0x01B4
diff --git a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c
index 86e857d193..93ca5a2360 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c
@@ -5,9 +5,20 @@
*/
#include "z_bg_jya_ironobj.h"
-#include "assets/objects/object_jya_iron/object_jya_iron.h"
#include "overlays/actors/ovl_En_Ik/z_en_ik.h"
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
+#include "assets/objects/object_jya_iron/object_jya_iron.h"
+
#define FLAGS 0
typedef void (*BgJyaIronobjIkFunc)(BgJyaIronobj*, PlayState*, EnIk*);
@@ -72,23 +83,23 @@ static s16 D_80899530[] = { 48, 42, 36, 32, 28, 24, 20, 16 };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
static CollisionHeader* sCollisionHeaders[] = { &gPillarCol, &gThroneCol };
void BgJyaIronobj_InitCylinder(BgJyaIronobj* this, PlayState* play) {
- ColliderCylinder* colCylinder = &this->colCylinder;
+ s32 pad;
- Collider_InitCylinder(play, colCylinder);
- Collider_SetCylinder(play, colCylinder, &this->dyna.actor, &sCylinderInit);
+ Collider_InitCylinder(play, &this->colliderCylinder);
+ Collider_SetCylinder(play, &this->colliderCylinder, &this->dyna.actor, &sCylinderInit);
if (PARAMS_GET_U(this->dyna.actor.params, 0, 1) == 1) {
- this->colCylinder.dim.radius = 40;
- this->colCylinder.dim.height = 100;
+ this->colliderCylinder.dim.radius = 40;
+ this->colliderCylinder.dim.height = 100;
}
- Collider_UpdateCylinder(&this->dyna.actor, colCylinder);
+ Collider_UpdateCylinder(&this->dyna.actor, &this->colliderCylinder);
}
/*
@@ -106,9 +117,10 @@ void BgJyaIronobj_SpawnPillarParticles(BgJyaIronobj* this, PlayState* play, EnIk
f32 sins;
s32 pad[2];
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (enIk->unk_2FF <= 0 || enIk->unk_2FF >= 4) {
- PRINTF("Error 攻撃方法が分からない(%s %d)\n", "../z_bg_jya_ironobj.c", 233);
+ PRINTF(T("Error 攻撃方法が分からない(%s %d)\n", "Error I don't know how to attack(%s %d)\n"),
+ "../z_bg_jya_ironobj.c", 233);
return;
}
#endif
@@ -172,9 +184,10 @@ void BgJyaIronobj_SpawnThroneParticles(BgJyaIronobj* this, PlayState* play, EnIk
f32 sins;
s32 pad[2];
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (enIk->unk_2FF <= 0 || enIk->unk_2FF >= 4) {
- PRINTF("Error 攻撃方法が分からない(%s %d)\n", "../z_bg_jya_ironobj.c", 362);
+ PRINTF(T("Error 攻撃方法が分からない(%s %d)\n", "Error I don't know how to attack(%s %d)\n"),
+ "../z_bg_jya_ironobj.c", 362);
return;
}
#endif
@@ -235,7 +248,7 @@ void BgJyaIronobj_Init(Actor* thisx, PlayState* play) {
void BgJyaIronobj_Destroy(Actor* thisx, PlayState* play) {
BgJyaIronobj* this = (BgJyaIronobj*)thisx;
- Collider_DestroyCylinder(play, &this->colCylinder);
+ Collider_DestroyCylinder(play, &this->colliderCylinder);
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
}
@@ -249,9 +262,9 @@ void func_808992E8(BgJyaIronobj* this, PlayState* play) {
Vec3f dropPos;
s32 i;
- if (this->colCylinder.base.acFlags & AC_HIT) {
- actor = this->colCylinder.base.ac;
- this->colCylinder.base.acFlags &= ~AC_HIT;
+ if (this->colliderCylinder.base.acFlags & AC_HIT) {
+ actor = this->colliderCylinder.base.ac;
+ this->colliderCylinder.base.acFlags &= ~AC_HIT;
if (actor != NULL && actor->id == ACTOR_EN_IK) {
particleFunc[PARAMS_GET_U(this->dyna.actor.params, 0, 1)](this, play, (EnIk*)actor);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR);
@@ -266,7 +279,7 @@ void func_808992E8(BgJyaIronobj* this, PlayState* play) {
return;
}
} else {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base);
}
}
diff --git a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.h b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.h
index a8189049af..9768aec2a5 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.h
@@ -2,16 +2,16 @@
#define Z_BG_JYA_IRONOBJ_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaIronobj;
-typedef void (*BgJyaIronobjActionFunc)(struct BgJyaIronobj*, PlayState*);
+typedef void (*BgJyaIronobjActionFunc)(struct BgJyaIronobj*, struct PlayState*);
typedef struct BgJyaIronobj {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgJyaIronobjActionFunc actionFunc;
- /* 0x0168 */ ColliderCylinder colCylinder;
+ /* 0x0168 */ ColliderCylinder colliderCylinder;
} BgJyaIronobj; // size = 0x01B4
#endif
diff --git a/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c b/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c
index 1f4287aa2f..354c17b94b 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c
@@ -5,8 +5,17 @@
*/
#include "z_bg_jya_kanaami.h"
-#include "assets/objects/object_jya_obj/object_jya_obj.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
#include "quake.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
+#include "assets/objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0
@@ -35,9 +44,9 @@ ActorProfile Bg_Jya_Kanaami_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 700, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 700, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, PlayState* play, CollisionHeader* collision, s32 flag) {
@@ -48,12 +57,13 @@ void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, PlayState* play, CollisionHea
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_kanaami.c", 145,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_jya_kanaami.c", 145, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -68,7 +78,7 @@ void BgJyaKanaami_Init(Actor* thisx, PlayState* play) {
} else {
func_80899880(this);
}
- PRINTF("(jya 金網)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF("(jya " T("金網", "wire mesh") ")(arg_data 0x%04x)\n", this->dyna.actor.params);
}
void BgJyaKanaami_Destroy(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.h b/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.h
index 6e5d670fde..a125e8ef53 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.h
@@ -2,11 +2,11 @@
#define Z_BG_JYA_KANAAMI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaKanaami;
-typedef void (*BgJyaKanaamiActionFunc)(struct BgJyaKanaami*, PlayState*);
+typedef void (*BgJyaKanaamiActionFunc)(struct BgJyaKanaami*, struct PlayState*);
typedef struct BgJyaKanaami {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c
index 8b3375967e..dd8b162bd7 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c
@@ -5,9 +5,18 @@
*/
#include "z_bg_jya_lift.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_jya_obj/object_jya_obj.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgJyaLift_Init(Actor* thisx, PlayState* play);
void BgJyaLift_Destroy(Actor* thisx, PlayState* play);
@@ -36,9 +45,9 @@ ActorProfile Bg_Jya_Lift_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 2500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 2500, ICHAIN_STOP),
};
void BgJyaLift_InitDynapoly(BgJyaLift* this, PlayState* play, CollisionHeader* collisionHeader, s32 moveFlag) {
@@ -59,8 +68,7 @@ void BgJyaLift_Init(Actor* thisx, PlayState* play) {
return;
}
- // "Goddess lift CT"
- PRINTF("女神リフト CT\n");
+ PRINTF(T("女神リフト CT\n", "Goddess lift CT\n"));
BgJyaLift_InitDynapoly(this, play, &gLiftCol, 0);
Actor_ProcessInitChain(thisx, sInitChain);
if (Flags_GetSwitch(play, PARAMS_GET_U(thisx->params, 0, 6))) {
@@ -78,8 +86,7 @@ void BgJyaLift_Destroy(Actor* thisx, PlayState* play) {
if (this->isSpawned) {
- // "Goddess Lift DT"
- PRINTF("女神リフト DT\n");
+ PRINTF(T("女神リフト DT\n", "Goddess lift DT\n"));
sIsSpawned = false;
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
}
diff --git a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.h b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.h
index b6c951dc18..ea9abac2bf 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.h
@@ -2,10 +2,10 @@
#define Z_BG_JYA_LIFT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaLift;
-typedef void (*BgJyaLiftActionFunc)(struct BgJyaLift*, PlayState*);
+typedef void (*BgJyaLiftActionFunc)(struct BgJyaLift*, struct PlayState*);
typedef struct BgJyaLift {
/* 0x000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c
index eed3074280..a72f245e22 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c
@@ -6,6 +6,20 @@
#include "z_bg_jya_megami.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0
@@ -105,9 +119,9 @@ static Vec3f sVelocity = { 0.0f, 0.0f, 0.8f };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1200, ICHAIN_STOP),
};
void BgJyaMegami_InitDynaPoly(BgJyaMegami* this, PlayState* play, CollisionHeader* collision, s32 flag) {
@@ -123,7 +137,7 @@ void BgJyaMegami_InitCollider(BgJyaMegami* this, PlayState* play) {
s32 pad;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, &this->colliderItem);
+ Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements);
}
void BgJyaMegami_SpawnEffect(PlayState* play, Vec3f* pos, Vec3f* velocity, s32 num, s32 arg4) {
diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h
index b24f236013..e297ebb63a 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h
@@ -2,11 +2,11 @@
#define Z_BG_JYA_MEGAMI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaMegami;
-typedef void (*BgJyaMegamiActionFunc)(struct BgJyaMegami*, PlayState*);
+typedef void (*BgJyaMegamiActionFunc)(struct BgJyaMegami*, struct PlayState*);
typedef struct BgJyaMegamiPiece {
/* 0x00 */ Vec3f pos;
@@ -19,7 +19,7 @@ typedef struct BgJyaMegami {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgJyaMegamiActionFunc actionFunc;
/* 0x0168 */ ColliderJntSph collider;
- /* 0x0188 */ ColliderJntSphElement colliderItem;
+ /* 0x0188 */ ColliderJntSphElement colliderElements[1];
/* 0x01C8 */ s16 lightTimer;
/* 0x01CA */ s16 explosionTimer;
/* 0x01CC */ s16 crumbleIndex;
diff --git a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c
index 1baa36c389..e9cfd701a2 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c
+++ b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c
@@ -5,10 +5,20 @@
*/
#include "z_bg_jya_zurerukabe.h"
-#include "assets/objects/object_jya_obj/object_jya_obj.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "array_count.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_jya_obj/object_jya_obj.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgJyaZurerukabe_Init(Actor* thisx, PlayState* play);
void BgJyaZurerukabe_Destroy(Actor* thisx, PlayState* play);
@@ -54,9 +64,9 @@ static s16 D_8089BA30[6] = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgJyaZurerukabe_InitDynaPoly(BgJyaZurerukabe* this, PlayState* play, CollisionHeader* collision, s32 flag) {
@@ -67,12 +77,13 @@ void BgJyaZurerukabe_InitDynaPoly(BgJyaZurerukabe* this, PlayState* play, Collis
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_zurerukabe.c", 194,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_jya_zurerukabe.c", 194, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -97,13 +108,13 @@ void func_8089B4C8(BgJyaZurerukabe* this, PlayState* play) {
case 3:
case 5:
if (fabsf(D_8089B9C0[D_8089BA30[i]]) > 1.0f) {
- func_8002F6D4(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
+ Actor_SetPlayerKnockbackLarge(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
}
break;
case 1:
case 4:
if (fabsf(D_8089B9C0[D_8089BA30[i]] - D_8089B9C0[D_8089BA30[i + 1]]) > 1.0f) {
- func_8002F6D4(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
+ Actor_SetPlayerKnockbackLarge(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
}
break;
}
@@ -125,15 +136,15 @@ void BgJyaZurerukabe_Init(Actor* thisx, PlayState* play) {
}
if (i == ARRAY_COUNT(D_8089B9F0)) {
- PRINTF(VT_COL(RED, WHITE));
- PRINTF("home pos が変更されたみたい(%s %d)(arg_data 0x%04x)\n", "../z_bg_jya_zurerukabe.c", 299,
- this->dyna.actor.params);
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("home pos が変更されたみたい", "It seems that the home pos has changed") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_jya_zurerukabe.c", 299, this->dyna.actor.params);
+ PRINTF_RST();
}
this->unk_16E = D_8089B9F8[this->unk_168];
func_8089B7B4(this);
- PRINTF("(jya ずれる壁)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF("(jya " T("ずれる壁", "sliding wall") ")(arg_data 0x%04x)\n", this->dyna.actor.params);
}
void BgJyaZurerukabe_Destroy(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.h b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.h
index 683f681999..d9d920f57b 100644
--- a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.h
+++ b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.h
@@ -2,11 +2,11 @@
#define Z_BG_JYA_ZURERUKABE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgJyaZurerukabe;
-typedef void (*BgJyaZurerukabeActionFunc)(struct BgJyaZurerukabe*, PlayState*);
+typedef void (*BgJyaZurerukabeActionFunc)(struct BgJyaZurerukabe*, struct PlayState*);
typedef struct BgJyaZurerukabe {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c
index 4e2dea2a9c..9a53c837ff 100644
--- a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c
+++ b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c
@@ -5,9 +5,18 @@
*/
#include "z_bg_menkuri_eye.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_menkuri_objects/object_menkuri_objects.h"
-#define FLAGS ACTOR_FLAG_5
+#define FLAGS ACTOR_FLAG_DRAW_CULLING_DISABLED
void BgMenkuriEye_Init(Actor* thisx, PlayState* play);
void BgMenkuriEye_Destroy(Actor* thisx, PlayState* play);
@@ -61,16 +70,15 @@ static InitChainEntry sInitChain[] = {
void BgMenkuriEye_Init(Actor* thisx, PlayState* play) {
BgMenkuriEye* this = (BgMenkuriEye*)thisx;
- ColliderJntSphElement* colliderList;
+ s32 pad;
Actor_ProcessInitChain(&this->actor, sInitChain);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
this->collider.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x;
this->collider.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y;
this->collider.elements[0].dim.worldSphere.center.z = this->actor.world.pos.z;
- colliderList = this->collider.elements;
- colliderList->dim.worldSphere.radius = colliderList->dim.modelSphere.radius;
+ this->collider.elements[0].dim.worldSphere.radius = this->collider.elements[0].dim.modelSphere.radius;
if (!Flags_GetSwitch(play, this->actor.params)) {
sNumEyesShot = 0;
}
diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.h b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.h
index cf27ca1827..69f1e32eab 100644
--- a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.h
+++ b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.h
@@ -2,7 +2,7 @@
#define Z_BG_MENKURI_EYE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMenkuriEye;
@@ -10,7 +10,7 @@ typedef struct BgMenkuriEye {
/* 0x0000 */ Actor actor;
/* 0x014C */ s16 framesUntilDisable;
/* 0x0150 */ ColliderJntSph collider;
- /* 0x0170 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0170 */ ColliderJntSphElement colliderElements[1];
} BgMenkuriEye; // size = 0x01B0
#endif
diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c
index 95b9bbb95d..ee3f35a1db 100644
--- a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c
+++ b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c
@@ -5,9 +5,14 @@
*/
#include "z_bg_menkuri_kaiten.h"
+
+#include "ichain.h"
+#include "sfx.h"
+#include "z64play.h"
+
#include "assets/objects/object_menkuri_objects/object_menkuri_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgMenkuriKaiten_Init(Actor* thisx, PlayState* play);
void BgMenkuriKaiten_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.h b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.h
index c65b08d6e9..5bcdbf8ec4 100644
--- a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.h
+++ b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.h
@@ -2,7 +2,7 @@
#define Z_BG_MENKURI_KAITEN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMenkuriKaiten;
diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c
index 589ecd6d7a..ff13454557 100644
--- a/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c
+++ b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c
@@ -5,6 +5,9 @@
*/
#include "z_bg_menkuri_nisekabe.h"
+
+#include "z64play.h"
+
#include "assets/objects/object_menkuri_objects/object_menkuri_objects.h"
#define FLAGS 0
@@ -51,7 +54,7 @@ void BgMenkuriNisekabe_Draw(Actor* thisx, PlayState* play) {
BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx;
u32 index = PARAMS_GET_U(this->actor.params, 0, 8);
- if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
+ if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) {
Gfx_DrawDListXlu(play, sDLists[index]);
} else {
Gfx_DrawDListOpa(play, sDLists[index]);
diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.h b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.h
index f7cb56a5bf..54cce56eff 100644
--- a/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.h
+++ b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.h
@@ -2,7 +2,7 @@
#define Z_BG_MENKURI_NISEKABE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMenkuriNisekabe;
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c
index 6c16b95e61..672a54b440 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c
+++ b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c
@@ -6,9 +6,22 @@
#include "z_bg_mizu_bwall.h"
#include "overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_mizu_objects/object_mizu_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgMizuBwall_Init(Actor* thisx, PlayState* play);
void BgMizuBwall_Destroy(Actor* thisx, PlayState* play);
@@ -31,7 +44,7 @@ ActorProfile Bg_Mizu_Bwall_Profile = {
/**/ BgMizuBwall_Draw,
};
-static ColliderTrisElementInit sTrisElementInitFloor[2] = {
+static ColliderTrisElementInit sTrisElementsInitFloor[2] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -66,10 +79,10 @@ static ColliderTrisInit sTrisInitFloor = {
COLSHAPE_TRIS,
},
2,
- sTrisElementInitFloor,
+ sTrisElementsInitFloor,
};
-static ColliderTrisElementInit sTrisElementInitRutoWall[1] = {
+static ColliderTrisElementInit sTrisElementsInitRutoWall[1] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -93,10 +106,10 @@ static ColliderTrisInit sTrisInitRutoWall = {
COLSHAPE_TRIS,
},
1,
- sTrisElementInitRutoWall,
+ sTrisElementsInitRutoWall,
};
-static ColliderTrisElementInit sTrisElementInitWall[2] = {
+static ColliderTrisElementInit sTrisElementsInitWall[2] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -131,7 +144,7 @@ static ColliderTrisInit sTrisInitUnusedWall = {
COLSHAPE_TRIS,
},
2,
- sTrisElementInitWall,
+ sTrisElementsInitWall,
};
static ColliderTrisInit sTrisInitStingerWall = {
@@ -144,7 +157,7 @@ static ColliderTrisInit sTrisInitStingerWall = {
COLSHAPE_TRIS,
},
2,
- sTrisElementInitWall,
+ sTrisElementsInitWall,
};
static Gfx* sDLists[] = {
@@ -157,9 +170,9 @@ static CollisionHeader* sColHeaders[] = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1100, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
@@ -196,15 +209,17 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BgMizuBwall_DoNothing;
} else {
Collider_InitTris(play, &this->collider);
- if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitFloor, this->elements)) {
- PRINTF("Error : コリジョンデータセット失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mizu_bwall.c", 484,
- this->dyna.actor.params);
+ if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitFloor,
+ this->colliderElements)) {
+ PRINTF(T("Error : コリジョンデータセット失敗",
+ "Error : Collision data set failure") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_mizu_bwall.c", 484, this->dyna.actor.params);
Actor_Kill(&this->dyna.actor);
} else {
sin = Math_SinS(this->dyna.actor.shape.rot.y);
cos = Math_CosS(this->dyna.actor.shape.rot.y);
- for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) {
+ for (i = 0; i < ARRAY_COUNT(sTrisElementsInitFloor); i++) {
for (j = 0; j < 3; j++) {
offset.x = sTrisInitFloor.elements[i].dim.vtx[j].x;
offset.y = sTrisInitFloor.elements[i].dim.vtx[j].y;
@@ -235,15 +250,17 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BgMizuBwall_DoNothing;
} else {
Collider_InitTris(play, &this->collider);
- if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitRutoWall, this->elements)) {
- PRINTF("Error : コリジョンデータセット失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mizu_bwall.c", 558,
- this->dyna.actor.params);
+ if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitRutoWall,
+ this->colliderElements)) {
+ PRINTF(T("Error : コリジョンデータセット失敗",
+ "Error : Collision data set failure") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_mizu_bwall.c", 558, this->dyna.actor.params);
Actor_Kill(&this->dyna.actor);
} else {
sin = Math_SinS(this->dyna.actor.shape.rot.y);
cos = Math_CosS(this->dyna.actor.shape.rot.y);
- for (i = 0; i < ARRAY_COUNT(sTrisElementInitRutoWall); i++) {
+ for (i = 0; i < ARRAY_COUNT(sTrisElementsInitRutoWall); i++) {
for (j = 0; j < 3; j++) {
offset.x = sTrisInitRutoWall.elements[i].dim.vtx[j].x;
offset.y = sTrisInitRutoWall.elements[i].dim.vtx[j].y;
@@ -274,15 +291,17 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BgMizuBwall_DoNothing;
} else {
Collider_InitTris(play, &this->collider);
- if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitUnusedWall, this->elements)) {
- PRINTF("Error : コリジョンデータセット失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mizu_bwall.c", 638,
- this->dyna.actor.params);
+ if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitUnusedWall,
+ this->colliderElements)) {
+ PRINTF(T("Error : コリジョンデータセット失敗",
+ "Error : Collision data set failure") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_mizu_bwall.c", 638, this->dyna.actor.params);
Actor_Kill(&this->dyna.actor);
} else {
sin = Math_SinS(this->dyna.actor.shape.rot.y);
cos = Math_CosS(this->dyna.actor.shape.rot.y);
- for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) {
+ for (i = 0; i < ARRAY_COUNT(sTrisElementsInitFloor); i++) {
for (j = 0; j < 3; j++) {
//! @bug This uses the wrong set of collision triangles, causing the collider to be
//! flat to the ground instead of vertical. It should use sTrisInitUnusedWall.
@@ -316,15 +335,16 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
} else {
Collider_InitTris(play, &this->collider);
if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitStingerWall,
- this->elements)) {
- PRINTF("Error : コリジョンデータセット失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mizu_bwall.c", 724,
- this->dyna.actor.params);
+ this->colliderElements)) {
+ PRINTF(T("Error : コリジョンデータセット失敗",
+ "Error : Collision data set failure") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_mizu_bwall.c", 724, this->dyna.actor.params);
Actor_Kill(&this->dyna.actor);
} else {
sin = Math_SinS(this->dyna.actor.shape.rot.y);
cos = Math_CosS(this->dyna.actor.shape.rot.y);
- for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) {
+ for (i = 0; i < ARRAY_COUNT(sTrisElementsInitFloor); i++) {
for (j = 0; j < 3; j++) {
//! @bug This uses the wrong set of collision triangles, causing the collider to be
//! flat to the ground instead of vertical. It should use sTrisInitStingerWall.
@@ -358,15 +378,16 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) {
} else {
Collider_InitTris(play, &this->collider);
if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitStingerWall,
- this->elements)) {
- PRINTF("Error : コリジョンデータセット失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mizu_bwall.c", 798,
- this->dyna.actor.params);
+ this->colliderElements)) {
+ PRINTF(T("Error : コリジョンデータセット失敗",
+ "Error : Collision data set failure") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_mizu_bwall.c", 798, this->dyna.actor.params);
Actor_Kill(&this->dyna.actor);
} else {
sin = Math_SinS(this->dyna.actor.shape.rot.y);
cos = Math_CosS(this->dyna.actor.shape.rot.y);
- for (i = 0; i < ARRAY_COUNT(sTrisElementInitFloor); i++) {
+ for (i = 0; i < ARRAY_COUNT(sTrisElementsInitFloor); i++) {
for (j = 0; j < 3; j++) {
//! @bug This uses the wrong set of collision triangles, causing the collider to be
//! flat to the ground instead of vertical. It should use sTrisInitStingerWall.
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.h b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.h
index d5eeaad344..aacbf321a5 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.h
+++ b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.h
@@ -2,16 +2,16 @@
#define Z_BG_MIZU_BWALL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMizuBwall;
-typedef void (*BgMizuBwallActionFunc)(struct BgMizuBwall*, PlayState*);
+typedef void (*BgMizuBwallActionFunc)(struct BgMizuBwall*, struct PlayState*);
typedef struct BgMizuBwall {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderTris collider;
- /* 0x0184 */ ColliderTrisElement elements[3]; // only ever uses 2
+ /* 0x0184 */ ColliderTrisElement colliderElements[3]; // only ever uses 2
/* 0x0298 */ BgMizuBwallActionFunc actionFunc;
/* 0x029C */ f32 yRot;
/* 0x02A0 */ s32 scrollAlpha1;
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c
index 96583b843f..ae1dd32bc6 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c
+++ b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c
@@ -6,9 +6,19 @@
#include "z_bg_mizu_movebg.h"
#include "overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_mizu_objects/object_mizu_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
#define MOVEBG_TYPE(params) PARAMS_GET_U((u16)(params), 12, 4)
#define MOVEBG_FLAGS(params) PARAMS_GET_U((u16)(params), 0, 6)
@@ -62,9 +72,9 @@ static CollisionHeader* sColHeaders[] = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1100, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.h b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.h
index 1a378f13a5..75a50e864e 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.h
+++ b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.h
@@ -2,7 +2,7 @@
#define Z_BG_MIZU_MOVEBG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum BgMizuMovebgType {
/* 0 */ MIZUMOVEBG_TYPE_FLOATING_PLATFORM_OUTSIDE_CENTER_PILLAR,
@@ -18,7 +18,7 @@ typedef enum BgMizuMovebgType {
struct BgMizuMovebg;
-typedef void (*BgMizuMovebgActionFunc)(struct BgMizuMovebg*, PlayState*);
+typedef void (*BgMizuMovebgActionFunc)(struct BgMizuMovebg*, struct PlayState*);
typedef struct BgMizuMovebg {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c
index 44a2f7cce6..ed8fae2784 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c
+++ b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c
@@ -1,7 +1,18 @@
#include "z_bg_mizu_shutter.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_mizu_objects/object_mizu_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgMizuShutter_Init(Actor* thisx, PlayState* play);
void BgMizuShutter_Destroy(Actor* thisx, PlayState* play);
@@ -38,9 +49,9 @@ static Vec3f sDisplacements[] = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1100, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.h b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.h
index cc42e4ddf3..bcba73f531 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.h
+++ b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.h
@@ -2,7 +2,7 @@
#define Z_BG_MIZU_SHUTTER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#define BGMIZUSHUTTER_GET_SIZE(thisx) PARAMS_GET_U((u16)(thisx)->params, 12, 4)
#define BGMIZUSHUTTER_GET_TIMER(thisx) PARAMS_GET_U((u16)(thisx)->params, 6, 6)
@@ -12,7 +12,7 @@
struct BgMizuShutter;
-typedef void (*BgMizuShutterActionFunc)(struct BgMizuShutter*, PlayState*);
+typedef void (*BgMizuShutterActionFunc)(struct BgMizuShutter*, struct PlayState*);
typedef struct BgMizuShutter {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c b/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c
index 1810d0bd2d..3072207ece 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c
+++ b/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c
@@ -5,6 +5,12 @@
*/
#include "z_bg_mizu_uzu.h"
+
+#include "ichain.h"
+#include "sfx.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_mizu_objects/object_mizu_objects.h"
#define FLAGS 0
@@ -29,8 +35,8 @@ ActorProfile Bg_Mizu_Uzu_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.h b/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.h
index 94e6b3c9d1..f8fe16ccd7 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.h
+++ b/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.h
@@ -2,11 +2,11 @@
#define Z_BG_MIZU_UZU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMizuUzu;
-typedef void (*BgMizuUzuActionFunc)(struct BgMizuUzu*, PlayState*);
+typedef void (*BgMizuUzuActionFunc)(struct BgMizuUzu*, struct PlayState*);
typedef struct BgMizuUzu {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c
index ade2f41741..2b5be14285 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c
+++ b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c
@@ -5,9 +5,23 @@
*/
#include "z_bg_mizu_water.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "regs.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_mizu_objects/object_mizu_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgMizuWater_Init(Actor* thisx, PlayState* play);
void BgMizuWater_Destroy(Actor* thisx, PlayState* play);
@@ -53,7 +67,7 @@ static InitChainEntry sInitChain[] = {
u32 BgMizuWater_GetWaterLevelActionIndex(s16 switchFlag, PlayState* play) {
u32 ret;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (bREG(0) != 0) {
switch (bREG(1)) {
case 0:
@@ -108,7 +122,8 @@ void BgMizuWater_Init(Actor* thisx, PlayState* play) {
switch (this->type) {
case 0:
if (bREG(15) == 0) {
- PRINTF("<コンストラクト>%x %x %x\n", Flags_GetSwitch(play, WATER_TEMPLE_WATER_F1_FLAG),
+ PRINTF(T("<コンストラクト>", "") "%x %x %x\n",
+ Flags_GetSwitch(play, WATER_TEMPLE_WATER_F1_FLAG),
Flags_GetSwitch(play, WATER_TEMPLE_WATER_F2_FLAG),
Flags_GetSwitch(play, WATER_TEMPLE_WATER_F3_FLAG));
}
@@ -300,7 +315,7 @@ void BgMizuWater_Update(Actor* thisx, PlayState* play) {
s32 unk1;
s32 pad;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (bREG(15) == 0) {
PRINTF("%x %x %x\n", Flags_GetSwitch(play, WATER_TEMPLE_WATER_F1_FLAG),
Flags_GetSwitch(play, WATER_TEMPLE_WATER_F2_FLAG), Flags_GetSwitch(play, WATER_TEMPLE_WATER_F3_FLAG));
diff --git a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h
index 21196022f8..26eb33d0d8 100644
--- a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h
+++ b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h
@@ -2,11 +2,11 @@
#define Z_BG_MIZU_WATER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMizuWater;
-typedef void (*BgMizuWaterActionFunc)(struct BgMizuWater*, PlayState*);
+typedef void (*BgMizuWaterActionFunc)(struct BgMizuWater*, struct PlayState*);
typedef struct BgMizuWater {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c
index 7dd37baf58..bf00812fc6 100644
--- a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c
+++ b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c
@@ -5,6 +5,14 @@
*/
#include "z_bg_mjin.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+
#include "assets/objects/object_mjin/object_mjin.h"
#include "assets/objects/object_mjin_wind/object_mjin_wind.h"
#include "assets/objects/object_mjin_soul/object_mjin_soul.h"
@@ -14,7 +22,7 @@
#include "assets/objects/object_mjin_flash/object_mjin_flash.h"
#include "assets/objects/object_mjin_oka/object_mjin_oka.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgMjin_Init(Actor* thisx, PlayState* play);
void BgMjin_Destroy(Actor* thisx, PlayState* play);
@@ -40,9 +48,9 @@ extern UNK_TYPE D_06000000;
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 400, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 400, ICHAIN_STOP),
};
static s16 sObjectIds[] = { OBJECT_MJIN_FLASH, OBJECT_MJIN_DARK, OBJECT_MJIN_FLAME,
@@ -78,7 +86,7 @@ void func_808A0850(BgMjin* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
colHeader = NULL;
- this->dyna.actor.flags &= ~ACTOR_FLAG_4;
+ this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->dyna.actor.objectSlot = this->requiredObjectSlot;
Actor_SetObjectDependency(play, &this->dyna.actor);
DynaPolyActor_Init(&this->dyna, 0);
@@ -109,7 +117,7 @@ void BgMjin_Draw(Actor* thisx, PlayState* play) {
s32 objectSlot = Object_GetSlot(&play->objectCtx, sObjectIds[thisx->params - 1]);
if (objectSlot >= 0) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
}
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(&D_06000000));
diff --git a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.h b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.h
index 03e18fbb76..1ed19aa2a4 100644
--- a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.h
+++ b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.h
@@ -2,11 +2,11 @@
#define Z_BG_MJIN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMjin;
-typedef void (*BgMjinActionFunc)(struct BgMjin*, PlayState*);
+typedef void (*BgMjinActionFunc)(struct BgMjin*, struct PlayState*);
typedef struct BgMjin {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c
index a7d44a34b8..c0b7314bcb 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c
+++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c
@@ -5,10 +5,22 @@
*/
#include "z_bg_mori_bigst.h"
-#include "assets/objects/object_mori_objects/object_mori_objects.h"
-#include "quake.h"
-#define FLAGS ACTOR_FLAG_4
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "quake.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_mori_objects/object_mori_objects.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgMoriBigst_Init(Actor* thisx, PlayState* play);
void BgMoriBigst_Destroy(Actor* thisx, PlayState* play);
@@ -41,8 +53,8 @@ ActorProfile Bg_Mori_Bigst_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 3000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 3000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 3000, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(gravity, -500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 3000, ICHAIN_CONTINUE), ICHAIN_F32(cullingVolumeScale, 3000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 3000, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(gravity, -500, ICHAIN_CONTINUE),
ICHAIN_F32_DIV1000(minVelocityY, -12000, ICHAIN_CONTINUE), ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
@@ -58,13 +70,13 @@ void BgMoriBigst_InitDynapoly(BgMoriBigst* this, PlayState* play, CollisionHeade
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- // "Warning : move BG login failed"
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_mori_bigst.c", 190,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_mori_bigst.c", 190, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -73,17 +85,16 @@ void BgMoriBigst_Init(Actor* thisx, PlayState* play) {
s32 pad;
BgMoriBigst* this = (BgMoriBigst*)thisx;
- // "mori (bigST.keyceiling)"
- PRINTF("mori (bigST.鍵型天井)(arg : %04x)(sw %d)(noE %d)(roomC %d)(playerPosY %f)\n", this->dyna.actor.params,
- Flags_GetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 8, 6)),
+ PRINTF(T("mori (bigST.鍵型天井)",
+ "mori (bigST. key-shaped ceiling)") "(arg : %04x)(sw %d)(noE %d)(roomC %d)(playerPosY %f)\n",
+ this->dyna.actor.params, Flags_GetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 8, 6)),
Flags_GetTempClear(play, this->dyna.actor.room), Flags_GetClear(play, this->dyna.actor.room),
GET_PLAYER(play)->actor.world.pos.y);
BgMoriBigst_InitDynapoly(this, play, &gMoriBigstCol, 0);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX);
if (this->moriTexObjectSlot < 0) {
- // "【Big Stalfos key ceiling】 bank danger!"
- PRINTF("【ビッグスタルフォス鍵型天井】 バンク危険!\n");
+ PRINTF(T("【ビッグスタルフォス鍵型天井】 バンク危険!\n", "[Big Stalfos Key-shaped Ceiling] Bank danger!\n"));
PRINTF("%s %d\n", "../z_bg_mori_bigst.c", 234);
Actor_Kill(&this->dyna.actor);
return;
@@ -140,8 +151,7 @@ void BgMoriBigst_SetupStalfosFight(BgMoriBigst* this, PlayState* play) {
this->dyna.actor.child = NULL;
this->dyna.actor.home.rot.z++;
} else {
- // "Second Stalfos failure"
- PRINTF("Warning : 第2スタルフォス発生失敗\n");
+ PRINTF(T("Warning : 第2スタルフォス発生失敗\n", "Warning : Second Stalfos failed to generate\n"));
}
Flags_SetClear(play, this->dyna.actor.room);
}
@@ -202,8 +212,7 @@ void BgMoriBigst_SetupStalfosPairFight(BgMoriBigst* this, PlayState* play) {
this->dyna.actor.child = NULL;
this->dyna.actor.home.rot.z++;
} else {
- // "Warning: 3-1 Stalfos failure"
- PRINTF("Warning : 第3-1スタルフォス発生失敗\n");
+ PRINTF(T("Warning : 第3-1スタルフォス発生失敗\n", "Warning : 3-1 Stalfos generation failure\n"));
}
stalfos2 = Actor_SpawnAsChild(&play->actorCtx, &this->dyna.actor, play, ACTOR_EN_TEST, 170.0f, 827.0f, -3260.0f, 0,
0, 0, 5);
@@ -211,8 +220,7 @@ void BgMoriBigst_SetupStalfosPairFight(BgMoriBigst* this, PlayState* play) {
this->dyna.actor.child = NULL;
this->dyna.actor.home.rot.z++;
} else {
- // "Warning: 3-2 Stalfos failure"
- PRINTF("Warning : 第3-2スタルフォス発生失敗\n");
+ PRINTF(T("Warning : 第3-2スタルフォス発生失敗\n", "Warning : 3-2 Stalfos generation failure\n"));
}
Flags_SetClear(play, this->dyna.actor.room);
}
diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.h b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.h
index c71eac7ab1..f37499b2f7 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.h
+++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.h
@@ -2,11 +2,11 @@
#define Z_BG_MORI_BIGST_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMoriBigst;
-typedef void (*BgMoriBigstActionFunc)(struct BgMoriBigst*, PlayState*);
+typedef void (*BgMoriBigstActionFunc)(struct BgMoriBigst*, struct PlayState*);
typedef struct BgMoriBigst {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c
index 28087ca671..028606443f 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c
+++ b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c
@@ -1,7 +1,20 @@
#include "z_bg_mori_elevator.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_mori_objects/object_mori_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgMoriElevator_Init(Actor* thisx, PlayState* play);
void BgMoriElevator_Destroy(Actor* thisx, PlayState* play);
@@ -32,9 +45,9 @@ ActorProfile Bg_Mori_Elevator_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 3000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 3000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
@@ -89,19 +102,19 @@ void BgMoriElevator_Init(Actor* thisx, PlayState* play) {
this->unk_172 = sIsSpawned;
this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->moriTexObjectSlot < 0) {
Actor_Kill(thisx);
- // "Forest Temple obj elevator Bank Danger!"
- PRINTF("Error : 森の神殿 obj elevator バンク危険!(%s %d)\n", "../z_bg_mori_elevator.c", 277);
+ PRINTF(T("Error : 森の神殿 obj elevator バンク危険!(%s %d)\n",
+ "Error : Forest Temple obj elevator bank danger! (%s %d)\n"),
+ "../z_bg_mori_elevator.c", 277);
return;
}
#endif
switch (sIsSpawned) {
case false:
- // "Forest Temple elevator CT"
- PRINTF("森の神殿 elevator CT\n");
+ PRINTF(T("森の神殿 elevator CT\n", "Forest Temple elevator CT\n"));
sIsSpawned = true;
this->dyna.actor.room = -1;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
@@ -120,8 +133,7 @@ void BgMoriElevator_Destroy(Actor* thisx, PlayState* play) {
BgMoriElevator* this = (BgMoriElevator*)thisx;
if (this->unk_172 == 0) {
- // "Forest Temple elevator DT"
- PRINTF("森の神殿 elevator DT\n");
+ PRINTF(T("森の神殿 elevator DT\n", "Forest Temple elevator DT\n"));
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
sIsSpawned = false;
}
@@ -144,8 +156,9 @@ void BgMoriElevator_WaitAfterInit(BgMoriElevator* this, PlayState* play) {
this->dyna.actor.world.pos.y = 73.0f;
BgMoriElevator_SetupSetPosition(this);
} else {
- // "Error: Forest Temple obj elevator Room setting is dangerous"
- PRINTF("Error : 森の神殿 obj elevator 部屋設定が危険(%s %d)\n", "../z_bg_mori_elevator.c", 371);
+ PRINTF(T("Error : 森の神殿 obj elevator 部屋設定が危険(%s %d)\n",
+ "Error : Forest Temple obj elevator room setting is dangerous(%s %d)\n"),
+ "../z_bg_mori_elevator.c", 371);
}
} else {
BgMoriElevator_SetupSetPosition(this);
@@ -205,8 +218,9 @@ void BgMoriElevator_SetPosition(BgMoriElevator* this, PlayState* play) {
this->targetY = 233.0f;
BgMoriElevator_StopMovement(this);
} else {
- // "Error:Forest Temple obj elevator Room setting is dangerous(%s %d)"
- PRINTF("Error : 森の神殿 obj elevator 部屋設定が危険(%s %d)\n", "../z_bg_mori_elevator.c", 479);
+ PRINTF(T("Error : 森の神殿 obj elevator 部屋設定が危険(%s %d)\n",
+ "Error : Forest Temple obj elevator room setting is dangerous(%s %d)\n"),
+ "../z_bg_mori_elevator.c", 479);
}
} else if ((play->roomCtx.curRoom.num == 2) && (this->dyna.actor.world.pos.y < -275.0f)) {
this->targetY = 233.0f;
diff --git a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.h b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.h
index e7bcc5018e..42e45d56fc 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.h
+++ b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.h
@@ -2,11 +2,11 @@
#define Z_BG_MORI_ELEVATOR_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMoriElevator;
-typedef void (*BgMoriElevatorActionFunc)(struct BgMoriElevator*, PlayState*);
+typedef void (*BgMoriElevatorActionFunc)(struct BgMoriElevator*, struct PlayState*);
typedef struct BgMoriElevator {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c
index 3b54cc8e35..6bd947c3a0 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c
+++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c
@@ -5,6 +5,17 @@
*/
#include "z_bg_mori_hashigo.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0
@@ -64,18 +75,18 @@ static ColliderJntSphInit sJntSphInit = {
};
static InitChainEntry sInitChainClasp[] = {
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_CONTINUE),
ICHAIN_U8(attentionRangeType, ATTENTION_RANGE_3, ICHAIN_CONTINUE),
ICHAIN_F32(lockOnArrowOffset, 40, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
static InitChainEntry sInitChainLadder[] = {
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
@@ -87,13 +98,13 @@ void BgMoriHashigo_InitDynapoly(BgMoriHashigo* this, PlayState* play, CollisionH
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- // "Warning : move BG login failed"
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_mori_hashigo.c", 164,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_mori_hashigo.c", 164, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -102,7 +113,7 @@ void BgMoriHashigo_InitCollider(BgMoriHashigo* this, PlayState* play) {
s32 pad;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements);
this->collider.elements[0].dim.worldSphere.center.x = (s16)this->dyna.actor.world.pos.x;
this->collider.elements[0].dim.worldSphere.center.y = (s16)this->dyna.actor.world.pos.y + 21;
@@ -129,9 +140,8 @@ s32 BgMoriHashigo_SpawnLadder(BgMoriHashigo* this, PlayState* play) {
if (ladder != NULL) {
return true;
} else {
- // "Ladder failure"
- PRINTF("Error : 梯子の発生失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mori_hashigo.c", 220,
- this->dyna.actor.params);
+ PRINTF("Error : " T("梯子の発生失敗", "Ladder spawn failure") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_mori_hashigo.c", 220, this->dyna.actor.params);
return false;
}
}
@@ -171,14 +181,13 @@ void BgMoriHashigo_Init(Actor* thisx, PlayState* play) {
}
this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX);
if (this->moriTexObjectSlot < 0) {
- // "Bank danger!"
- PRINTF("Error : バンク危険!(arg_data 0x%04x)(%s %d)\n", this->dyna.actor.params, "../z_bg_mori_hashigo.c",
- 312);
+ PRINTF("Error : " T("バンク危険!", "Bank danger!") "(arg_data 0x%04x)(%s %d)\n", this->dyna.actor.params,
+ "../z_bg_mori_hashigo.c", 312);
Actor_Kill(&this->dyna.actor);
} else {
BgMoriHashigo_SetupWaitForMoriTex(this);
- // "(Forest Temple Ladder and its clasp)"
- PRINTF("(森の神殿 梯子とその留め金)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF(T("(森の神殿 梯子とその留め金)", "(Forest Temple Ladder and its clasp)") "(arg_data 0x%04x)\n",
+ this->dyna.actor.params);
}
}
diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h
index 4e6e93a5de..e14aec45e1 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h
+++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h
@@ -2,16 +2,16 @@
#define Z_BG_MORI_HASHIGO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMoriHashigo;
-typedef void (*BgMoriHashigoActionFunc)(struct BgMoriHashigo*, PlayState*);
+typedef void (*BgMoriHashigoActionFunc)(struct BgMoriHashigo*, struct PlayState*);
typedef struct BgMoriHashigo {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderJntSph collider;
- /* 0x0184 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0184 */ ColliderJntSphElement colliderElements[1];
/* 0x01C4 */ BgMoriHashigoActionFunc actionFunc;
/* 0x01C8 */ s16 hitTimer;
/* 0x01CA */ s16 bounceCounter;
diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c
index b52a0feb70..21b561a770 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c
+++ b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c
@@ -5,9 +5,21 @@
*/
#include "z_bg_mori_hashira4.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_mori_objects/object_mori_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgMoriHashira4_Init(Actor* thisx, PlayState* play);
void BgMoriHashira4_Destroy(Actor* thisx, PlayState* play);
@@ -34,9 +46,9 @@ ActorProfile Bg_Mori_Hashira4_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 700, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 700, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
@@ -56,13 +68,13 @@ void BgMoriHashira4_InitDynaPoly(BgMoriHashira4* this, PlayState* play, Collisio
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- // "Warning : move BG login failed"
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_mori_hashira4.c", 155,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_mori_hashira4.c", 155, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -83,9 +95,8 @@ void BgMoriHashira4_Init(Actor* thisx, PlayState* play) {
this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX);
if (this->moriTexObjectSlot < 0) {
Actor_Kill(&this->dyna.actor);
- // "Bank danger!"
- PRINTF("Error : バンク危険!(arg_data 0x%04x)(%s %d)\n", this->dyna.actor.params, "../z_bg_mori_hashira4.c",
- 196);
+ PRINTF("Error : " T("バンク危険!", "Bank danger!") "(arg_data 0x%04x)(%s %d)\n", this->dyna.actor.params,
+ "../z_bg_mori_hashira4.c", 196);
return;
}
if ((this->dyna.actor.params != 0) && Flags_GetSwitch(play, this->switchFlag)) {
@@ -94,8 +105,7 @@ void BgMoriHashira4_Init(Actor* thisx, PlayState* play) {
}
Actor_SetFocus(&this->dyna.actor, 50.0f);
BgMoriHashira4_SetupWaitForMoriTex(this);
- // "(4 pillars of the Forest Temple) Bank danger"
- PRINTF("(森の神殿 4本柱)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF(T("(森の神殿 4本柱)", "Forest Temple 4 Pillars") "(arg_data 0x%04x)\n", this->dyna.actor.params);
sUnkTimer = 0;
}
diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.h b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.h
index a36a6ef36b..e4ab5a2d85 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.h
+++ b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.h
@@ -2,11 +2,11 @@
#define Z_BG_MORI_HASHIRA4_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMoriHashira4;
-typedef void (*BgMoriHashira4ActionFunc)(struct BgMoriHashira4*, PlayState*);
+typedef void (*BgMoriHashira4ActionFunc)(struct BgMoriHashira4*, struct PlayState*);
typedef struct BgMoriHashira4 {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c
index d8d6de0665..92fc3c57a8 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c
+++ b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c
@@ -5,6 +5,19 @@
*/
#include "z_bg_mori_hineri.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64curve.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_box/object_box.h"
#include "assets/objects/object_mori_hineri1/object_mori_hineri1.h"
@@ -13,7 +26,7 @@
#include "assets/objects/object_mori_hineri2a/object_mori_hineri2a.h"
#include "assets/objects/object_mori_tex/object_mori_tex.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgMoriHineri_Init(Actor* thisx, PlayState* play);
void BgMoriHineri_Destroy(Actor* thisx, PlayState* play);
@@ -203,7 +216,9 @@ void func_808A3E54(BgMoriHineri* this, PlayState* play) {
this->moriHineriObjectSlot = objectSlot;
this->dyna.actor.params ^= 1;
sSubCamId = SUB_CAM_ID_DONE;
+#if OOT_VERSION >= PAL_1_0
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
+#endif
} else {
this->dyna.actor.draw = NULL;
this->actionFunc = func_808A3D58;
diff --git a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.h b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.h
index 468bb29656..b9a29df504 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.h
+++ b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.h
@@ -2,14 +2,14 @@
#define Z_BG_MORI_HINERI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMoriHineri;
// Due to a unique access pattern, this param cannot use the generic "PARAMS_GET_U" macros
#define TWISTED_HALLWAY_GET_PARAM_15(thisx) (((thisx)->params & (NBITS_TO_MASK(1) << (15))) >> ((15) - (1)))
-typedef void (*BgMoriHineriActionFunc)(struct BgMoriHineri*, PlayState*);
+typedef void (*BgMoriHineriActionFunc)(struct BgMoriHineri*, struct PlayState*);
typedef struct BgMoriHineri {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c
index 507f92e73c..eaeb6afc3e 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c
+++ b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c
@@ -5,9 +5,20 @@
*/
#include "z_bg_mori_idomizu.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_mori_objects/object_mori_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgMoriIdomizu_Init(Actor* thisx, PlayState* play);
void BgMoriIdomizu_Destroy(Actor* thisx, PlayState* play);
@@ -69,16 +80,15 @@ void BgMoriIdomizu_Init(Actor* thisx, PlayState* play) {
this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX);
if (this->moriTexObjectSlot < 0) {
Actor_Kill(&this->actor);
- // "Bank danger!"
- PRINTF("Error : バンク危険!(arg_data 0x%04x)(%s %d)\n", this->actor.params, "../z_bg_mori_idomizu.c", 202);
+ PRINTF("Error : " T("バンク危険!", "Bank danger!") "(arg_data 0x%04x)(%s %d)\n", this->actor.params,
+ "../z_bg_mori_idomizu.c", 202);
return;
}
BgMoriIdomizu_SetupWaitForMoriTex(this);
sIsSpawned = true;
this->isLoaded = true;
this->actor.room = -1;
- // "Forest Temple well water"
- PRINTF("(森の神殿 井戸水)(arg_data 0x%04x)\n", this->actor.params);
+ PRINTF(T("(森の神殿 井戸水)", "(Forest Temple well water)") "(arg_data 0x%04x)\n", this->actor.params);
}
void BgMoriIdomizu_Destroy(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.h b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.h
index 3e7036ec4b..4348622425 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.h
+++ b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.h
@@ -2,11 +2,11 @@
#define Z_BG_MORI_IDOMIZU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMoriIdomizu;
-typedef void (*BgMoriIdomizuActionFunc)(struct BgMoriIdomizu*, PlayState*);
+typedef void (*BgMoriIdomizuActionFunc)(struct BgMoriIdomizu*, struct PlayState*);
typedef struct BgMoriIdomizu {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c
index e974aa2df9..c47a01879f 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c
+++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c
@@ -5,6 +5,18 @@
*/
#include "z_bg_mori_kaitenkabe.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0
@@ -33,9 +45,9 @@ ActorProfile Bg_Mori_Kaitenkabe_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
@@ -50,8 +62,9 @@ void BgMoriKaitenkabe_Init(Actor* thisx, PlayState* play) {
BgMoriKaitenkabe* this = (BgMoriKaitenkabe*)thisx;
CollisionHeader* colHeader = NULL;
- // "Forest Temple object 【Rotating Wall (arg_data: 0x% 04x)】 appears"
- PRINTF("◯◯◯森の神殿オブジェクト【回転壁(arg_data : 0x%04x)】出現 \n", this->dyna.actor.params);
+ PRINTF(T("◯◯◯森の神殿オブジェクト【回転壁(arg_data : 0x%04x)】出現 \n",
+ "◯◯◯Forest Temple object [Rotating wall(arg_data : 0x%04x)] appears \n"),
+ this->dyna.actor.params);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&gMoriKaitenkabeCol, &colHeader);
@@ -59,8 +72,8 @@ void BgMoriKaitenkabe_Init(Actor* thisx, PlayState* play) {
this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX);
if (this->moriTexObjectSlot < 0) {
Actor_Kill(&this->dyna.actor);
- // "【Rotating wall】 Bank danger!"
- PRINTF("【回転壁】 バンク危険!(%s %d)\n", "../z_bg_mori_kaitenkabe.c", 176);
+ PRINTF(T("【回転壁】 バンク危険!(%s %d)\n", "[Rotating wall] Bank danger! (%s %d)\n"),
+ "../z_bg_mori_kaitenkabe.c", 176);
} else {
this->actionFunc = BgMoriKaitenkabe_WaitForMoriTex;
}
diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.h b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.h
index 7bd6939d3f..91c0d65a80 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.h
+++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.h
@@ -2,11 +2,11 @@
#define Z_BG_MORI_KAITENKABE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMoriKaitenkabe;
-typedef void (*BgMoriKaitenkabeActionFunc)(struct BgMoriKaitenkabe*, PlayState*);
+typedef void (*BgMoriKaitenkabeActionFunc)(struct BgMoriKaitenkabe*, struct PlayState*);
typedef struct BgMoriKaitenkabe {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c
index 63173262e7..dccddcf49a 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c
+++ b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c
@@ -5,10 +5,24 @@
*/
#include "z_bg_mori_rakkatenjo.h"
-#include "assets/objects/object_mori_objects/object_mori_objects.h"
-#include "quake.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "quake.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_mori_objects/object_mori_objects.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgMoriRakkatenjo_Init(Actor* thisx, PlayState* play);
void BgMoriRakkatenjo_Destroy(Actor* thisx, PlayState* play);
@@ -53,25 +67,26 @@ void BgMoriRakkatenjo_Init(Actor* thisx, PlayState* play) {
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
-#if OOT_DEBUG
- // "Forest Temple obj. Falling Ceiling"
- PRINTF("森の神殿 obj. 落下天井 (home posY %f)\n", this->dyna.actor.home.pos.y);
+#if DEBUG_FEATURES
+ PRINTF(T("森の神殿 obj. 落下天井", "Forest Temple obj. Falling Ceiling") " (home posY %f)\n",
+ this->dyna.actor.home.pos.y);
if ((fabsf(1991.0f - this->dyna.actor.home.pos.x) > 0.001f) ||
(fabsf(683.0f - this->dyna.actor.home.pos.y) > 0.001f) ||
(fabsf(-2520.0f - this->dyna.actor.home.pos.z) > 0.001f)) {
- // "The set position has been changed. Let's fix the program."
- PRINTF("Warning : セット位置が変更されています。プログラムを修正しましょう。\n");
+ PRINTF(T("Warning : セット位置が変更されています。プログラムを修正しましょう。\n",
+ "Warning : The set position has been changed. Let's fix the program.\n"));
}
if (this->dyna.actor.home.rot.y != 0x8000) {
- // "The set Angle has changed. Let's fix the program."
- PRINTF("Warning : セット Angle が変更されています。プログラムを修正しましょう。\n");
+ PRINTF(T("Warning : セット Angle が変更されています。プログラムを修正しましょう。\n",
+ "Warning : The set Angle has changed. Let's fix the program.\n"));
}
#endif
this->moriTexObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_MORI_TEX);
if (this->moriTexObjectSlot < 0) {
- // "Forest Temple obj Falling Ceiling Bank Danger!"
- PRINTF("Error : 森の神殿 obj 落下天井 バンク危険!(%s %d)\n", "../z_bg_mori_rakkatenjo.c", 205);
+ PRINTF(T("Error : 森の神殿 obj 落下天井 バンク危険!(%s %d)\n",
+ "Error : Forest Temple obj Falling Ceiling Bank danger! (%s %d)\n"),
+ "../z_bg_mori_rakkatenjo.c", 205);
Actor_Kill(&this->dyna.actor);
return;
}
diff --git a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.h b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.h
index 97bdbc0bfd..657baefc53 100644
--- a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.h
+++ b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.h
@@ -2,11 +2,11 @@
#define Z_BG_MORI_RAKKATENJO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgMoriRakkatenjo;
-typedef void (*BgMoriRakkatenjoActionFunction)(struct BgMoriRakkatenjo*, PlayState*);
+typedef void (*BgMoriRakkatenjoActionFunction)(struct BgMoriRakkatenjo*, struct PlayState*);
typedef struct BgMoriRakkatenjo {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c
index 017f18606d..2622c43204 100644
--- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c
+++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c
@@ -5,6 +5,21 @@
*/
#include "z_bg_po_event.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_po_sisters/object_po_sisters.h"
#define FLAGS 0
@@ -88,7 +103,7 @@ void BgPoEvent_InitPaintings(BgPoEvent* this, PlayState* play) {
static s16 paintingPosX[] = { -1302, -866, 1421, 985 };
static s16 paintingPosY[] = { 1107, 1091 };
static s16 paintingPosZ[] = { -3384, -3252 };
- ColliderTrisElementInit* item;
+ ColliderTrisElementInit* elementInit;
Vec3f* vtxVec;
s32 i1;
s32 i2;
@@ -109,10 +124,10 @@ void BgPoEvent_InitPaintings(BgPoEvent* this, PlayState* play) {
scaleY = 1.0f;
}
for (i1 = 0; i1 < sTrisInit.count; i1++) {
- item = &sTrisInit.elements[i1];
+ elementInit = &sTrisInit.elements[i1];
if (1) {} // This section looks like a macro of some sort.
for (i2 = 0; i2 < 3; i2++) {
- vtxVec = &item->dim.vtx[i2];
+ vtxVec = &elementInit->dim.vtx[i2];
sp9C[i2].x = (vtxVec->x * coss) + (this->dyna.actor.home.pos.x + (sins * vtxVec->z));
sp9C[i2].y = (vtxVec->y * scaleY) + this->dyna.actor.home.pos.y;
sp9C[i2].z = this->dyna.actor.home.pos.z + (coss * vtxVec->z) - (vtxVec->x * sins);
@@ -155,7 +170,7 @@ void BgPoEvent_InitBlocks(BgPoEvent* this, PlayState* play) {
CollisionHeader* colHeader = NULL;
s32 bgId;
- this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
CollisionHeader_GetVirtual(&gPoSistersAmyBlockCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
if ((this->type == 0) && (this->index != 3)) {
@@ -202,7 +217,7 @@ void BgPoEvent_Init(Actor* thisx, PlayState* play) {
if (this->type >= 2) {
Collider_InitTris(play, &this->collider);
- Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderItems);
+ Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderElements);
if (Flags_GetSwitch(play, thisx->params)) {
Actor_Kill(thisx);
} else {
@@ -308,7 +323,7 @@ void BgPoEvent_BlockFall(BgPoEvent* this, PlayState* play) {
this->dyna.actor.velocity.y++;
if (Math_StepToF(&this->dyna.actor.world.pos.y, 433.0f, this->dyna.actor.velocity.y)) {
- this->dyna.actor.flags &= ~ACTOR_FLAG_5;
+ this->dyna.actor.flags &= ~ACTOR_FLAG_DRAW_CULLING_DISABLED;
this->dyna.actor.velocity.y = 0.0f;
sBlocksAtRest++;
if (this->type != 1) {
diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.h b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.h
index 412c187227..78fe7fc966 100644
--- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.h
+++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.h
@@ -2,11 +2,11 @@
#define Z_BG_PO_EVENT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgPoEvent;
-typedef void (*BgPoEventActionFunc)(struct BgPoEvent*, PlayState*);
+typedef void (*BgPoEventActionFunc)(struct BgPoEvent*, struct PlayState*);
typedef struct BgPoEvent {
/* 0x0000 */ DynaPolyActor dyna;
@@ -16,7 +16,7 @@ typedef struct BgPoEvent {
/* 0x016A */ s8 direction;
/* 0x016C */ s16 timer;
/* 0x0170 */ ColliderTris collider;
- /* 0x0190 */ ColliderTrisElement colliderItems[2];
+ /* 0x0190 */ ColliderTrisElement colliderElements[2];
} BgPoEvent; // size = 0x0248
#endif
diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c
index 9dae9b2a5d..e5b8edea9d 100644
--- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c
+++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c
@@ -5,6 +5,16 @@
*/
#include "z_bg_po_syokudai.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z64light.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_syokudai/object_syokudai.h"
diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.h b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.h
index 8bb84f0fe5..a6186dcbe7 100644
--- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.h
+++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.h
@@ -2,7 +2,8 @@
#define Z_BG_PO_SYOKUDAI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct BgPoSyokudai;
diff --git a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c
index 7d9ef63e60..3392a15f60 100644
--- a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c
+++ b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c
@@ -5,6 +5,14 @@
*/
#include "z_bg_pushbox.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_pu_box/object_pu_box.h"
#define FLAGS 0
diff --git a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.h b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.h
index 577ebaabb6..38cd6857d9 100644
--- a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.h
+++ b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.h
@@ -2,11 +2,11 @@
#define Z_BG_PUSHBOX_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgPushbox;
-typedef void (*BgPushboxActionFunc)(struct BgPushbox*, PlayState*);
+typedef void (*BgPushboxActionFunc)(struct BgPushbox*, struct PlayState*);
typedef struct BgPushbox {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c
index 3b1f559479..37591ae020 100644
--- a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c
+++ b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c
@@ -5,9 +5,20 @@
*/
#include "z_bg_relay_objects.h"
+
+#include "ichain.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64cutscene_flags.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_relay_objects/object_relay_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum WindmillSetpiecesMode {
/* 0 */ WINDMILL_ROTATING_GEAR,
@@ -62,7 +73,7 @@ void BgRelayObjects_Init(Actor* thisx, PlayState* play) {
}
Audio_PlayWindmillBgm();
thisx->room = -1;
- thisx->flags |= ACTOR_FLAG_5;
+ thisx->flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
if (D_808A9508 & 2) {
thisx->params = 0xFF;
Actor_Kill(thisx);
@@ -154,7 +165,7 @@ void func_808A9234(BgRelayObjects* this, PlayState* play) {
return;
}
Flags_UnsetSwitch(play, this->switchFlag);
- this->dyna.actor.flags &= ~ACTOR_FLAG_4;
+ this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
if (play->roomCtx.curRoom.num == 4) {
gSaveContext.timerState = TIMER_STATE_UP_FREEZE;
}
diff --git a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h
index 802d840649..25db5cc5f6 100644
--- a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h
+++ b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h
@@ -2,11 +2,11 @@
#define Z_BG_RELAY_OBJECTS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgRelayObjects;
-typedef void (*BgRelayObjectsActionFunc)(struct BgRelayObjects*, PlayState*);
+typedef void (*BgRelayObjectsActionFunc)(struct BgRelayObjects*, struct PlayState*);
typedef struct BgRelayObjects {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c
index 2ad49f6e71..4a3a760d92 100644
--- a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c
+++ b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c
@@ -5,6 +5,11 @@
*/
#include "z_bg_spot00_break.h"
+
+#include "ichain.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot00_break/object_spot00_break.h"
#define FLAGS 0
@@ -27,9 +32,9 @@ ActorProfile Bg_Spot00_Break_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
diff --git a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.h b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.h
index de282476d9..17e45aa918 100644
--- a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.h
+++ b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.h
@@ -2,7 +2,7 @@
#define Z_BG_SPOT00_BREAK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot00Break;
diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c
index 501d0f430b..c305635b83 100644
--- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c
+++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c
@@ -5,10 +5,24 @@
*/
#include "z_bg_spot00_hanebasi.h"
-#include "assets/objects/object_spot00_objects/object_spot00_objects.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64cutscene_flags.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_spot00_objects/object_spot00_objects.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum DrawbridgeType {
/* -1 */ DT_DRAWBRIDGE = -1,
@@ -40,9 +54,9 @@ ActorProfile Bg_Spot00_Hanebasi_Profile = {
static f32 sTorchFlameScale = 0.0f;
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 550, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 5000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 550, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 5000, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h
index fc6427ae82..7780bea692 100644
--- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h
+++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h
@@ -2,11 +2,12 @@
#define Z_BG_SPOT00_HANEBASI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct BgSpot00Hanebasi;
-typedef void (*BgSpot00HanebasiActionFunc)(struct BgSpot00Hanebasi*, PlayState*);
+typedef void (*BgSpot00HanebasiActionFunc)(struct BgSpot00Hanebasi*, struct PlayState*);
typedef struct BgSpot00Hanebasi {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c
index 9dde534fa8..413e0a49e0 100644
--- a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c
+++ b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c
@@ -5,9 +5,20 @@
*/
#include "z_bg_spot01_fusya.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot01_objects/object_spot01_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgSpot01Fusya_Init(Actor* thisx, PlayState* play);
void BgSpot01Fusya_Destroy(Actor* thisx, PlayState* play);
@@ -30,9 +41,9 @@ ActorProfile Bg_Spot01_Fusya_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 12800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1300, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1300, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 12800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1300, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1300, ICHAIN_STOP),
};
void BgSpot01Fusya_SetupAction(BgSpot01Fusya* this, BgSpot01FusyaActionFunc actionFunc) {
@@ -64,7 +75,7 @@ void func_808AAA50(BgSpot01Fusya* this, PlayState* play) {
}
thisx->shape.rot.z += this->unk_154;
temp = ((this->unk_154 - 100.0f) / 1700.0f) + 1.0f;
- func_800F436C(&thisx->projectedPos, 0x2085, temp);
+ func_800F436C(&thisx->projectedPos, NA_SE_EV_WINDMILL_LEVEL - SFX_FLAG, temp);
Math_ApproachF(&this->unk_154, this->unk_158, this->unk_15C, 100.0f);
}
diff --git a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.h b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.h
index 1e7a831316..e232c6a907 100644
--- a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.h
+++ b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT01_FUSYA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot01Fusya;
-typedef void (*BgSpot01FusyaActionFunc)(struct BgSpot01Fusya*, PlayState*);
+typedef void (*BgSpot01FusyaActionFunc)(struct BgSpot01Fusya*, struct PlayState*);
typedef struct BgSpot01Fusya {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c
index 475940dd53..e43acd7a1d 100644
--- a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c
+++ b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c
@@ -5,10 +5,24 @@
*/
#include "z_bg_spot01_idohashira.h"
-#include "assets/objects/object_spot01_objects/object_spot01_objects.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
+#include "assets/objects/object_spot01_objects/object_spot01_objects.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgSpot01Idohashira_Init(Actor* thisx, PlayState* play);
void BgSpot01Idohashira_Destroy(Actor* thisx, PlayState* play);
@@ -179,7 +193,8 @@ f32 func_808AB1DC(f32 arg0, f32 arg1, u16 arg2, u16 arg3, u16 arg4) {
temp_f12 = regFloat * diff43;
return (((((arg1 - arg0) - temp_f12) / SQ(diff23)) * diff43) * diff43) + temp_f12;
}
- PRINTF(VT_FGCOL(RED) "Bg_Spot01_Idohashira_Get_FreeFallで割り算出来ない!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("Bg_Spot01_Idohashira_Get_FreeFallで割り算出来ない!!!!!!!!!!!!!!\n",
+ "Bg_Spot01_Idohashira_Get_FreeFall Cannot divide by!!!!!!!!!!!!!!\n") VT_RST);
return 0.0f;
}
@@ -254,7 +269,8 @@ void func_808AB444(BgSpot01Idohashira* this, PlayState* play) {
Actor_Kill(&this->dyna.actor);
break;
default:
- PRINTF("Bg_Spot01_Idohashira_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Bg_Spot01_Idohashira_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Bg_Spot01_Idohashira_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
@@ -284,7 +300,8 @@ void BgSpot01Idohashira_Update(Actor* thisx, PlayState* play) {
BgSpot01Idohashira* this = (BgSpot01Idohashira*)thisx;
if (this->action < 0 || this->action >= 4 || sActionFuncs[this->action] == NULL) {
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sActionFuncs[this->action](this, play);
@@ -335,7 +352,8 @@ void BgSpot01Idohashira_Draw(Actor* thisx, PlayState* play) {
BgSpot01Idohashira* this = (BgSpot01Idohashira*)thisx;
if (this->drawConfig < 0 || this->drawConfig > 0 || sDrawFuncs[this->drawConfig] == NULL) {
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sDrawFuncs[this->drawConfig](this, play);
diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.h b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.h
index ae456de8fb..8d177d3317 100644
--- a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.h
+++ b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.h
@@ -2,12 +2,12 @@
#define Z_BG_SPOT01_IDOHASHIRA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot01Idohashira;
-typedef void (*BgSpot01IdohashiraActionFunc)(struct BgSpot01Idohashira*, PlayState*);
-typedef void (*BgSpot01IdohashiraDrawFunc)(struct BgSpot01Idohashira*, PlayState*);
+typedef void (*BgSpot01IdohashiraActionFunc)(struct BgSpot01Idohashira*, struct PlayState*);
+typedef void (*BgSpot01IdohashiraDrawFunc)(struct BgSpot01Idohashira*, struct PlayState*);
typedef struct BgSpot01Idohashira {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c
index b709fc11e3..5329d2e0f6 100644
--- a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c
+++ b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c
@@ -5,16 +5,26 @@
*/
#include "z_bg_spot01_idomizu.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot01_objects/object_spot01_objects.h"
-#define FLAGS ACTOR_FLAG_5
+#define FLAGS ACTOR_FLAG_DRAW_CULLING_DISABLED
void BgSpot01Idomizu_Init(Actor* thisx, PlayState* play);
void BgSpot01Idomizu_Destroy(Actor* thisx, PlayState* play);
void BgSpot01Idomizu_Update(Actor* thisx, PlayState* play);
void BgSpot01Idomizu_Draw(Actor* thisx, PlayState* play);
-void func_808ABB84(BgSpot01Idomizu* this, PlayState* play);
+void BgSpot01Idomizu_UpdateWaterLevel(BgSpot01Idomizu* this, PlayState* play);
ActorProfile Bg_Spot01_Idomizu_Profile = {
/**/ ACTOR_BG_SPOT01_IDOMIZU,
@@ -36,20 +46,20 @@ void BgSpot01Idomizu_Init(Actor* thisx, PlayState* play) {
BgSpot01Idomizu* this = (BgSpot01Idomizu*)thisx;
Actor_ProcessInitChain(&this->actor, sInitChain);
- if (GET_EVENTCHKINF(EVENTCHKINF_67) || LINK_AGE_IN_YEARS == YEARS_ADULT) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_DRAINED_WELL) || LINK_AGE_IN_YEARS == YEARS_ADULT) {
this->waterHeight = -550.0f;
} else {
this->waterHeight = 52.0f;
}
- this->actionFunc = func_808ABB84;
+ this->actionFunc = BgSpot01Idomizu_UpdateWaterLevel;
this->actor.world.pos.y = this->waterHeight;
}
void BgSpot01Idomizu_Destroy(Actor* thisx, PlayState* play) {
}
-void func_808ABB84(BgSpot01Idomizu* this, PlayState* play) {
- if (GET_EVENTCHKINF(EVENTCHKINF_67)) {
+void BgSpot01Idomizu_UpdateWaterLevel(BgSpot01Idomizu* this, PlayState* play) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_DRAINED_WELL)) {
this->waterHeight = -550.0f;
}
play->colCtx.colHeader->waterBoxes[0].ySurface = this->actor.world.pos.y;
diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.h b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.h
index 3c5929714a..3d4ff68a6f 100644
--- a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.h
+++ b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT01_IDOMIZU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot01Idomizu;
-typedef void (*BgSpot01IdomizuActionFunc)(struct BgSpot01Idomizu*, PlayState*);
+typedef void (*BgSpot01IdomizuActionFunc)(struct BgSpot01Idomizu*, struct PlayState*);
typedef struct BgSpot01Idomizu {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c
index 964416c0b0..6dbdd910d5 100644
--- a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c
+++ b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c
@@ -5,9 +5,17 @@
*/
#include "z_bg_spot01_idosoko.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot01_matoya/object_spot01_matoya.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgSpot01Idosoko_Init(Actor* thisx, PlayState* play);
void BgSpot01Idosoko_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.h b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.h
index c17b0a43ed..44981abc07 100644
--- a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.h
+++ b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT01_IDOSOKO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot01Idosoko;
-typedef void (*BgSpot01IdosokoActionFunc)(struct BgSpot01Idosoko*, PlayState*);
+typedef void (*BgSpot01IdosokoActionFunc)(struct BgSpot01Idosoko*, struct PlayState*);
typedef struct BgSpot01Idosoko {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
index 6b35c92126..af7dec9c5d 100644
--- a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
+++ b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c
@@ -5,10 +5,18 @@
*/
#include "z_bg_spot01_objects2.h"
+
+#include "ichain.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "translation.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot01_matoya/object_spot01_matoya.h"
#include "assets/objects/object_spot01_matoyab/object_spot01_matoyab.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgSpot01Objects2_Init(Actor* thisx, PlayState* play);
void BgSpot01Objects2_Destroy(Actor* thisx, PlayState* play);
@@ -31,9 +39,9 @@ ActorProfile Bg_Spot01_Objects2_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 12800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 12800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1500, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
@@ -61,8 +69,8 @@ void BgSpot01Objects2_Init(Actor* thisx, PlayState* play) {
if (this->objectId >= 0) {
this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, this->objectId);
if (this->requiredObjectSlot < 0) {
- // "There was no bank setting."
- PRINTF("-----------------------------バンク設定ありませんでした.");
+ PRINTF(T("-----------------------------バンク設定ありませんでした.",
+ "----------------------------- There was no bank setting."));
Actor_Kill(&this->dyna.actor);
return;
}
@@ -92,9 +100,8 @@ void func_808AC2BC(BgSpot01Objects2* this, PlayState* play) {
Vec3f position;
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
- // "---- Successful bank switching!!"
- PRINTF("-----バンク切り換え成功!!\n");
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
+ PRINTF(T("-----バンク切り換え成功!!\n", "----- Successful bank switching!!\n"));
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
this->dyna.actor.objectSlot = this->requiredObjectSlot;
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
diff --git a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h
index d1d96d045b..7ffc3094fe 100644
--- a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h
+++ b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT01_OBJECTS2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot01Objects2;
-typedef void (*BgSpot01Objects2ActionFunc)(struct BgSpot01Objects2*, PlayState*);
+typedef void (*BgSpot01Objects2ActionFunc)(struct BgSpot01Objects2*, struct PlayState*);
typedef struct BgSpot01Objects2 {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c
index 811ce475ce..795df90151 100644
--- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c
+++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c
@@ -5,9 +5,23 @@
*/
#include "z_bg_spot02_objects.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot02_objects/object_spot02_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgSpot02Objects_Init(Actor* thisx, PlayState* play);
void BgSpot02Objects_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h
index 873fe15a52..42d4e45b08 100644
--- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h
+++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT02_OBJECTS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot02Objects;
-typedef void (*BgSpot02ObjectsActionFunc)(struct BgSpot02Objects*, PlayState*);
+typedef void (*BgSpot02ObjectsActionFunc)(struct BgSpot02Objects*, struct PlayState*);
typedef struct BgSpot02Objects {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c
index 12d6cced10..501a677359 100644
--- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c
+++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c
@@ -5,16 +5,26 @@
*/
#include "z_bg_spot03_taki.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64audio.h"
+#include "z64play.h"
+
#include "assets/objects/object_spot03_object/object_spot03_object.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgSpot03Taki_Init(Actor* thisx, PlayState* play);
void BgSpot03Taki_Destroy(Actor* thisx, PlayState* play);
void BgSpot03Taki_Update(Actor* thisx, PlayState* play);
void BgSpot03Taki_Draw(Actor* thisx, PlayState* play);
-void func_808ADEF0(BgSpot03Taki* this, PlayState* play);
+void BgSpot03Taki_HandleWaterfallState(BgSpot03Taki* this, PlayState* play);
ActorProfile Bg_Spot03_Taki_Profile = {
/**/ ACTOR_BG_SPOT03_TAKI,
@@ -56,7 +66,7 @@ void BgSpot03Taki_Init(Actor* thisx, PlayState* play) {
this->openingAlpha = 255.0f;
BgSpot03Taki_ApplyOpeningAlpha(this, 0);
BgSpot03Taki_ApplyOpeningAlpha(this, 1);
- this->actionFunc = func_808ADEF0;
+ this->actionFunc = BgSpot03Taki_HandleWaterfallState;
}
void BgSpot03Taki_Destroy(Actor* thisx, PlayState* play) {
@@ -65,7 +75,7 @@ void BgSpot03Taki_Destroy(Actor* thisx, PlayState* play) {
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
}
-void func_808ADEF0(BgSpot03Taki* this, PlayState* play) {
+void BgSpot03Taki_HandleWaterfallState(BgSpot03Taki* this, PlayState* play) {
if (this->state == WATERFALL_CLOSED) {
if (Flags_GetSwitch(play, this->switchFlag)) {
this->state = WATERFALL_OPENING_ANIMATED;
diff --git a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h
index f6e3daab16..45ad4de4f2 100644
--- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h
+++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h
@@ -2,7 +2,7 @@
#define Z_BG_SPOT03_TAKI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum BgSpot03TakiState {
WATERFALL_CLOSED,
@@ -14,7 +14,7 @@ typedef enum BgSpot03TakiState {
struct BgSpot03Taki;
-typedef void (*BgSpot03TakiActionFunc)(struct BgSpot03Taki*, PlayState*);
+typedef void (*BgSpot03TakiActionFunc)(struct BgSpot03Taki*, struct PlayState*);
typedef struct BgSpot03Taki {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c
index 843b3e5235..edb253568d 100644
--- a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c
+++ b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c
@@ -5,6 +5,14 @@
*/
#include "z_bg_spot05_soko.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot05_objects/object_spot05_objects.h"
#define FLAGS 0
@@ -61,7 +69,7 @@ void BgSpot05Soko_Init(Actor* thisx, PlayState* play) {
Actor_Kill(thisx);
} else {
this->actionFunc = func_808AE5B4;
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
}
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
diff --git a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.h b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.h
index 849e5b2263..1aae818797 100644
--- a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.h
+++ b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT05_SOKO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot05Soko;
-typedef void (*BgSpot05SokoActionFunc)(struct BgSpot05Soko*, PlayState*);
+typedef void (*BgSpot05SokoActionFunc)(struct BgSpot05Soko*, struct PlayState*);
typedef struct BgSpot05Soko {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c
index aa5b56024b..7c6c943aa7 100644
--- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c
+++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c
@@ -5,9 +5,23 @@
*/
#include "z_bg_spot06_objects.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot06_objects/object_spot06_objects.h"
-#define FLAGS ACTOR_FLAG_9
+#define FLAGS ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR
typedef enum LakeHyliaObjectsType {
/* 0x0 */ LHO_WATER_TEMPLE_ENTRACE_GATE,
@@ -56,7 +70,7 @@ ActorProfile Bg_Spot06_Objects_Profile = {
/**/ BgSpot06Objects_Draw,
};
-static ColliderJntSphElementInit sJntSphItemsInit[1] = {
+static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -80,7 +94,7 @@ static ColliderJntSphInit sJntSphInit = {
COLSHAPE_JNTSPH,
},
1,
- sJntSphItemsInit,
+ sJntSphElementsInit,
};
static InitChainEntry sInitChain[] = {
@@ -121,10 +135,10 @@ void BgSpot06Objects_Init(Actor* thisx, PlayState* play) {
case LHO_WATER_TEMPLE_ENTRANCE_LOCK:
Actor_ProcessInitChain(thisx, sInitChain);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->colliderItem);
+ Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->colliderElements);
if (LINK_IS_ADULT && Flags_GetSwitch(play, this->switchFlag)) {
- if (!GET_EVENTCHKINF(EVENTCHKINF_69)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_RESTORED_LAKE_HYLIA)) {
thisx->home.pos.y = thisx->world.pos.y = WATER_LEVEL_LOWERED;
} else {
thisx->home.pos.y = thisx->world.pos.y = WATER_LEVEL_RAISED;
@@ -148,9 +162,9 @@ void BgSpot06Objects_Init(Actor* thisx, PlayState* play) {
break;
case LHO_WATER_PLANE:
Actor_ProcessInitChain(thisx, sInitChainWaterPlane);
- thisx->flags = ACTOR_FLAG_4 | ACTOR_FLAG_5;
+ thisx->flags = ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
- if (LINK_IS_ADULT && !GET_EVENTCHKINF(EVENTCHKINF_69)) {
+ if (LINK_IS_ADULT && !GET_EVENTCHKINF(EVENTCHKINF_RESTORED_LAKE_HYLIA)) {
if (!IS_CUTSCENE_LAYER) {
this->lakeHyliaWaterLevel = -681.0f;
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface =
@@ -291,7 +305,7 @@ void BgSpot06Objects_LockWait(BgSpot06Objects* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->timer = 130;
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
sin = Math_SinS(this->dyna.actor.world.rot.y);
cos = Math_CosS(this->dyna.actor.world.rot.y);
this->dyna.actor.world.pos.x += (3.0f * sin);
@@ -335,7 +349,7 @@ void BgSpot06Objects_LockPullOutward(BgSpot06Objects* this, PlayState* play) {
if (this->timer == 0) {
this->dyna.actor.velocity.y = 0.5f;
- this->dyna.actor.flags &= ~ACTOR_FLAG_13;
+ this->dyna.actor.flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED;
this->actionFunc = BgSpot06Objects_LockSwimToSurface;
}
@@ -365,7 +379,7 @@ void BgSpot06Objects_LockSwimToSurface(BgSpot06Objects* this, PlayState* play) {
this->dyna.actor.world.pos.z - (Math_CosS(this->dyna.actor.shape.rot.y) * 16.0f);
this->dyna.actor.world.pos.y = -1993.0f;
this->timer = 32;
- this->dyna.actor.flags &= ~ACTOR_FLAG_4;
+ this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->collider.elements[0].dim.worldSphere.radius = this->collider.elements[0].dim.modelSphere.radius * 2;
this->actionFunc = BgSpot06Objects_LockFloat;
}
@@ -482,7 +496,7 @@ void BgSpot06Objects_Draw(Actor* thisx, PlayState* play) {
* cleared.
*/
void BgSpot06Objects_WaterPlaneCutsceneWait(BgSpot06Objects* this, PlayState* play) {
- if (GET_EVENTCHKINF(EVENTCHKINF_69)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_RESTORED_LAKE_HYLIA)) {
this->actionFunc = BgSpot06Objects_WaterPlaneCutsceneRise;
}
}
diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h
index 08fdf1e9af..cbdc1054f8 100644
--- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h
+++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT06_OBJECTS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot06Objects;
-typedef void (*BgSpot06ObjectsActionFunc)(struct BgSpot06Objects*, PlayState*);
+typedef void (*BgSpot06ObjectsActionFunc)(struct BgSpot06Objects*, struct PlayState*);
typedef struct BgSpot06Objects {
/* 0x0000 */ DynaPolyActor dyna;
@@ -15,7 +15,7 @@ typedef struct BgSpot06Objects {
/* 0x016A */ s16 timer;
/* 0x016C */ f32 lakeHyliaWaterLevel;
/* 0x0170 */ ColliderJntSph collider;
- /* 0x0190 */ ColliderJntSphElement colliderItem[1];
+ /* 0x0190 */ ColliderJntSphElement colliderElements[1];
} BgSpot06Objects; // size = 0x01D0
#endif
diff --git a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c
index a98f3428da..afb9d02972 100644
--- a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c
+++ b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c
@@ -5,9 +5,18 @@
*/
#include "z_bg_spot07_taki.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot07_object/object_spot07_object.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgSpot07Taki_Init(Actor* thisx, PlayState* play);
void BgSpot07Taki_Destroy(Actor* thisx, PlayState* play);
@@ -91,10 +100,19 @@ void BgSpot07Taki_Draw(Actor* thisx, PlayState* play) {
if (!LINK_IS_ADULT) {
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 128);
if (this->dyna.actor.params == 0) {
+#if !OOT_PAL_N64
+ //! @bug 64x64 texture is scrolled mod 128 instead of mod 256 (i.e. 64 << G_TEXTURE_IMAGE_FRAC),
+ // so there is a noticeable jump when the scrolling wraps around
gSPSegment(POLY_XLU_DISP++, 0x09,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, ((frames * -1) & 0x7F),
((frames * -3) & 0xFF), 64, 64, 1, ((frames * 1) & 0x7F),
((frames * -3) & 0xFF), 64, 64));
+#else
+ gSPSegment(POLY_XLU_DISP++, 0x09,
+ Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, ((frames * -1) & 0xFF),
+ ((frames * -3) & 0xFF), 64, 64, 1, ((frames * 1) & 0xFF),
+ ((frames * -3) & 0xFF), 64, 64));
+#endif
gSPSegment(POLY_XLU_DISP++, 0x0A,
Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, frames * 0, ((frames * 3) & 0x1FF), 32,
128, 1, frames * 0, ((frames * 3) & 0x1FF), 32, 128));
diff --git a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.h b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.h
index dcf6ef8edc..30872233ad 100644
--- a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.h
+++ b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT07_TAKI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot07Taki;
-typedef void (*BgSpot07TakiActionFunc)(struct BgSpot07Taki*, PlayState*);
+typedef void (*BgSpot07TakiActionFunc)(struct BgSpot07Taki*, struct PlayState*);
typedef struct BgSpot07Taki {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c
index 39126bcde9..aa8d28b960 100644
--- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c
+++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c
@@ -5,9 +5,18 @@
*/
#include "z_bg_spot08_bakudankabe.h"
-#include "assets/objects/object_spot08_obj/object_spot08_obj.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
+#include "assets/objects/object_spot08_obj/object_spot08_obj.h"
#define FLAGS ACTOR_FLAG_IGNORE_POINT_LIGHTS
@@ -88,16 +97,16 @@ static Vec3f D_808B08AC[] = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F(scale, 1, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 3200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 3200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void func_808B02D0(BgSpot08Bakudankabe* this, PlayState* play) {
s32 pad;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements);
}
void func_808B0324(BgSpot08Bakudankabe* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h
index 3be139505d..a0436ea9ea 100644
--- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h
+++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h
@@ -2,14 +2,14 @@
#define Z_BG_SPOT08_BAKUDANKABE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot08Bakudankabe;
typedef struct BgSpot08Bakudankabe {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderJntSph collider;
- /* 0x0184 */ ColliderJntSphElement colliderItems[3];
+ /* 0x0184 */ ColliderJntSphElement colliderElements[3];
} BgSpot08Bakudankabe; // size = 0x0244
#endif
diff --git a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c
index 9fcaf42f7e..17d9385b00 100644
--- a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c
+++ b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c
@@ -5,6 +5,19 @@
*/
#include "z_bg_spot08_iceblock.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot08_obj/object_spot08_obj.h"
#define FLAGS 0
@@ -46,13 +59,13 @@ void BgSpot08Iceblock_InitDynaPoly(BgSpot08Iceblock* this, PlayState* play, Coll
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- // "Warning: move BG registration failed"
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot08_iceblock.c", 0xD9,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot08_iceblock.c", 0xD9, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -64,9 +77,9 @@ void BgSpot08Iceblock_CheckParams(BgSpot08Iceblock* this) {
this->dyna.actor.params = 0x10;
break;
default:
- // "Error: arg_data setting error"
- PRINTF("Error : arg_data 設定ミスです。(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot08_iceblock.c", 0xF6,
- this->dyna.actor.params);
+ PRINTF(
+ T("Error : arg_data 設定ミスです。", "Error : arg_data setting error. ") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot08_iceblock.c", 0xF6, this->dyna.actor.params);
this->dyna.actor.params = 0x10;
break;
case 1:
@@ -278,17 +291,16 @@ void BgSpot08Iceblock_SpawnTwinFloe(BgSpot08Iceblock* this, PlayState* play) {
}
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 3000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 2200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 3000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 2200, ICHAIN_STOP),
};
void BgSpot08Iceblock_Init(Actor* thisx, PlayState* play) {
BgSpot08Iceblock* this = (BgSpot08Iceblock*)thisx;
CollisionHeader* colHeader;
- // "spot08 ice floe"
- PRINTF("(spot08 流氷)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF("(spot08 " T("流氷", "ice floe") ")(arg_data 0x%04x)\n", this->dyna.actor.params);
BgSpot08Iceblock_CheckParams(this);
switch (PARAMS_GET_NOSHIFT(this->dyna.actor.params, 9, 1)) {
diff --git a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.h b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.h
index a59e3a3561..1a3f920c3e 100644
--- a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.h
+++ b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT08_ICEBLOCK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot08Iceblock;
-typedef void (*BgSpot08IceblockActionFunc)(struct BgSpot08Iceblock*, PlayState*);
+typedef void (*BgSpot08IceblockActionFunc)(struct BgSpot08Iceblock*, struct PlayState*);
typedef struct BgSpot08Iceblock {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c
index 2cce032344..57b76c4147 100644
--- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c
+++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c
@@ -5,6 +5,17 @@
*/
#include "z_bg_spot09_obj.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot09_obj/object_spot09_obj.h"
#define FLAGS 0
@@ -41,15 +52,15 @@ static s32 (*D_808B1FA4[])(BgSpot09Obj* this, PlayState* play) = {
};
static InitChainEntry sInitChain1[] = {
- ICHAIN_F32(uncullZoneForward, 7200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 3000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 7200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 7200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 3000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 7200, ICHAIN_STOP),
};
static InitChainEntry sInitChain2[] = {
- ICHAIN_F32(uncullZoneForward, 7200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 7200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1500, ICHAIN_STOP),
};
static Gfx* sDLists[] = {
@@ -63,7 +74,7 @@ s32 func_808B1AE0(BgSpot09Obj* this, PlayState* play) {
return this->dyna.actor.params == 0;
}
- carpentersRescued = GET_EVENTCHKINF_CARPENTERS_FREE_ALL();
+ carpentersRescued = GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED();
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
switch (this->dyna.actor.params) {
@@ -137,13 +148,13 @@ s32 func_808B1D44(BgSpot09Obj* this, PlayState* play) {
void BgSpot09Obj_Init(Actor* thisx, PlayState* play) {
BgSpot09Obj* this = (BgSpot09Obj*)thisx;
- PRINTF("Spot09 Object [arg_data : 0x%04x](大工救出フラグ 0x%x)\n", this->dyna.actor.params,
- gSaveContext.save.info.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX] &
- EVENTCHKINF_CARPENTERS_FREE_MASK_ALL);
+ PRINTF("Spot09 Object [arg_data : 0x%04x](" T("大工救出フラグ", "Carpenter Rescue Flag") " 0x%x)\n",
+ this->dyna.actor.params, GET_EVENTCHKINF_CARPENTERS_RESCUED_FLAGS());
this->dyna.actor.params &= 0xFF;
if ((this->dyna.actor.params < 0) || (this->dyna.actor.params >= 5)) {
- PRINTF("Error : Spot 09 object の arg_data が判別出来ない(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot09_obj.c",
- 322, this->dyna.actor.params);
+ PRINTF(T("Error : Spot 09 object の arg_data が判別出来ない",
+ "Error : Spot 09 object arg_data cannot be determined") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot09_obj.c", 322, this->dyna.actor.params);
}
if (!func_808B1C70(this, play)) {
diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h
index a09ce32eda..491d7380c2 100644
--- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h
+++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h
@@ -2,7 +2,7 @@
#define Z_BG_SPOT09_OBJ_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot09Obj;
diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c
index 43dd1e73b9..f86d76a2fc 100644
--- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c
+++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c
@@ -6,10 +6,19 @@
#include "z_bg_spot11_bakudankabe.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_spot11_obj/object_spot11_obj.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgSpot11Bakudankabe_Init(Actor* thisx, PlayState* play);
void BgSpot11Bakudankabe_Destroy(Actor* thisx, PlayState* play);
@@ -121,7 +130,7 @@ void BgSpot11Bakudankabe_Init(Actor* thisx, PlayState* play) {
CollisionHeader_GetVirtual(&gDesertColossusBombableWallCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
Actor_SetScale(&this->dyna.actor, 1.0f);
- PRINTF("(spot11 爆弾壁)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF("(spot11 " T("爆弾壁", "Bomb Wall") ")(arg_data 0x%04x)\n", this->dyna.actor.params);
}
void BgSpot11Bakudankabe_Destroy(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h
index b18f5c084b..5dedab77d5 100644
--- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h
+++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h
@@ -2,7 +2,7 @@
#define Z_BG_SPOT11_BAKUDANKABE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot11Bakudankabe;
diff --git a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c
index 4218cc79fd..574c2533d0 100644
--- a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c
+++ b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c
@@ -6,9 +6,25 @@
#include "z_bg_spot11_oasis.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64cutscene_flags.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_spot11_obj/object_spot11_obj.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgSpot11Oasis_Init(Actor* thisx, PlayState* play);
void BgSpot11Oasis_Update(Actor* thisx, PlayState* play);
@@ -38,9 +54,9 @@ static s16 D_808B2E10[][2] = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F(scale, 1, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 3000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 3000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
static Vec3f D_808B2E34[] = {
diff --git a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.h b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.h
index cae716a00a..0f0ed97e6e 100644
--- a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.h
+++ b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT11_OASIS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot11Oasis;
-typedef void (*BgSpot11OasisActionFunc)(struct BgSpot11Oasis*, PlayState*);
+typedef void (*BgSpot11OasisActionFunc)(struct BgSpot11Oasis*, struct PlayState*);
typedef struct BgSpot11Oasis {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c
index 113fdfad9e..c4fc3fcdc4 100644
--- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c
+++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c
@@ -5,8 +5,17 @@
*/
#include "z_bg_spot12_gate.h"
-#include "assets/objects/object_spot12_obj/object_spot12_obj.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
#include "quake.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
+#include "assets/objects/object_spot12_obj/object_spot12_obj.h"
#define FLAGS 0
@@ -38,9 +47,9 @@ ActorProfile Bg_Spot12_Gate_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1200, ICHAIN_STOP),
};
void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, PlayState* play, CollisionHeader* collision, s32 flags) {
@@ -51,12 +60,13 @@ void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, PlayState* play, CollisionHea
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot12_gate.c", 145,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot12_gate.c", 145, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h
index 2e9989fc21..bb9ef25cf5 100644
--- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h
+++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT12_GATE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot12Gate;
-typedef void (*BgSpot12GateActionFunc)(struct BgSpot12Gate*, PlayState*);
+typedef void (*BgSpot12GateActionFunc)(struct BgSpot12Gate*, struct PlayState*);
typedef struct BgSpot12Gate {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c
index abbb7bd80b..f9a5253cea 100644
--- a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c
+++ b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c
@@ -5,6 +5,15 @@
*/
#include "z_bg_spot12_saku.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_spot12_obj/object_spot12_obj.h"
#define FLAGS 0
@@ -35,9 +44,9 @@ ActorProfile Bg_Spot12_Saku_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void func_808B3420(BgSpot12Saku* this, PlayState* play, CollisionHeader* collision, s32 flags) {
@@ -48,12 +57,13 @@ void func_808B3420(BgSpot12Saku* this, PlayState* play, CollisionHeader* collisi
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot12_saku.c", 140,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot12_saku.c", 140, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
diff --git a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.h b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.h
index d96967300c..7ed7751ede 100644
--- a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.h
+++ b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT12_SAKU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot12Saku;
-typedef void (*BgSpot12SakuActionFunc)(struct BgSpot12Saku*, PlayState*);
+typedef void (*BgSpot12SakuActionFunc)(struct BgSpot12Saku*, struct PlayState*);
typedef struct BgSpot12Saku {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c
index 1b0b3a9edf..eb89d5f06a 100644
--- a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c
+++ b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c
@@ -5,6 +5,18 @@
*/
#include "z_bg_spot15_rrbox.h"
+
+#include "array_count.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot15_obj/object_spot15_obj.h"
#define FLAGS 0
@@ -39,9 +51,9 @@ ActorProfile Bg_Spot15_Rrbox_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
static Vec3f D_808B45C4[] = {
@@ -63,12 +75,13 @@ void func_808B3960(BgSpot15Rrbox* this, PlayState* play, CollisionHeader* collis
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot15_rrbox.c", 171,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot15_rrbox.c", 171, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -133,7 +146,7 @@ void BgSpot15Rrbox_Init(Actor* thisx, PlayState* play) {
} else {
func_808B4084(this, play);
}
- PRINTF("(spot15 ロンロン木箱)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF("(spot15 " T("ロンロン木箱", "Lon Lon Wooden Box") ")(arg_data 0x%04x)\n", this->dyna.actor.params);
}
void BgSpot15Rrbox_Destroy(Actor* thisx, PlayState* play) {
@@ -320,9 +333,8 @@ void func_808B43D0(BgSpot15Rrbox* this, PlayState* play) {
Actor_MoveXZGravity(actor);
if (actor->world.pos.y <= BGCHECK_Y_MIN + 10.0f) {
- // "Lon Lon wooden crate fell too much"
- PRINTF("Warning : ロンロン木箱落ちすぎた(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot15_rrbox.c", 599,
- actor->params);
+ PRINTF("Warning : " T("ロンロン木箱落ちすぎた", "Lon Lon Wooden Box fell too far") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot15_rrbox.c", 599, actor->params);
Actor_Kill(actor);
diff --git a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.h b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.h
index 745c65629f..d0534e1e73 100644
--- a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.h
+++ b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT15_RRBOX_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot15Rrbox;
-typedef void (*BgSpot15RrboxActionFunc)(struct BgSpot15Rrbox*, PlayState*);
+typedef void (*BgSpot15RrboxActionFunc)(struct BgSpot15Rrbox*, struct PlayState*);
typedef struct BgSpot15Rrbox {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c
index ca52b057bb..c053a6c2d1 100644
--- a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c
+++ b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c
@@ -5,6 +5,14 @@
*/
#include "z_bg_spot15_saku.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot15_obj/object_spot15_obj.h"
#define FLAGS 0
diff --git a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h
index f7ac8d09ca..35fcbee90e 100644
--- a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h
+++ b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT15_SAKU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot15Saku;
-typedef void (*BgSpot15SakuActionFunc)(struct BgSpot15Saku*, PlayState*);
+typedef void (*BgSpot15SakuActionFunc)(struct BgSpot15Saku*, struct PlayState*);
typedef struct BgSpot15Saku {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c
index 5f5c06d0ed..759d2184e3 100644
--- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c
+++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c
@@ -1,10 +1,29 @@
#include "z_bg_spot16_bombstone.h"
-#include "assets/objects/object_spot16_obj/object_spot16_obj.h"
-#include "assets/objects/object_bombiwa/object_bombiwa.h"
#include "overlays/actors/ovl_En_Bombf/z_en_bombf.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_spot16_obj/object_spot16_obj.h"
+#include "assets/objects/object_bombiwa/object_bombiwa.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgSpot16Bombstone_Init(Actor* thisx, PlayState* play);
void BgSpot16Bombstone_Destroy(Actor* thisx, PlayState* play);
@@ -122,17 +141,17 @@ ActorProfile Bg_Spot16_Bombstone_Profile = {
};
static InitChainEntry sInitChainBoulder[] = {
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
static InitChainEntry sInitChainDebris[] = {
ICHAIN_F32(gravity, -1, ICHAIN_CONTINUE),
ICHAIN_F32(minVelocityY, -10, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
static Vec3f sVelocity = { 0.0f, 0.0f, 0.0f };
@@ -152,7 +171,7 @@ void func_808B4C4C(BgSpot16Bombstone* this, PlayState* play) {
s32 pad;
Collider_InitJntSph(play, &this->colliderJntSph);
- Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderElements);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
this->colliderJntSph.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x;
this->colliderJntSph.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y + 50.0f;
this->colliderJntSph.elements[0].dim.worldSphere.center.z = this->actor.world.pos.z;
@@ -171,7 +190,7 @@ void func_808B4D04(BgSpot16Bombstone* this, PlayState* play) {
s32 func_808B4D9C(BgSpot16Bombstone* this, PlayState* play) {
if (Flags_GetSwitch(play, this->switchFlag)) {
- PRINTF("Spot16 obj 爆弾石 破壊済み\n");
+ PRINTF(T("Spot16 obj 爆弾石 破壊済み\n", "Spot16 obj Bomb Stone destroyed\n"));
return false;
}
Actor_ProcessInitChain(&this->actor, sInitChainBoulder);
@@ -221,7 +240,8 @@ s32 func_808B4E58(BgSpot16Bombstone* this, PlayState* play) {
this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_BOMBIWA);
if (this->requiredObjectSlot < 0) {
- PRINTF("Error : バンク危険!(arg_data 0x%04x)(%s %d)\n", actor->params, "../z_bg_spot16_bombstone.c", 589);
+ PRINTF("Error : " T("バンク危険!", "Bank danger! ") "(arg_data 0x%04x)(%s %d)\n", actor->params,
+ "../z_bg_spot16_bombstone.c", 589);
return false;
}
@@ -251,10 +271,10 @@ void BgSpot16Bombstone_Init(Actor* thisx, PlayState* play) {
shouldLive = func_808B4E58(this, play);
break;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
default:
- PRINTF("Error : arg_data おかしいな(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot16_bombstone.c", 668,
- this->actor.params);
+ PRINTF(T("Error : arg_data おかしいな", "Error : arg_data is strange") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot16_bombstone.c", 668, this->actor.params);
shouldLive = false;
break;
#endif
@@ -264,7 +284,8 @@ void BgSpot16Bombstone_Init(Actor* thisx, PlayState* play) {
Actor_Kill(&this->actor);
return;
}
- PRINTF("Spot16 obj 爆弾石 (scaleX %f)(arg_data 0x%04x)\n", this->actor.scale.x, this->actor.params);
+ PRINTF("Spot16 obj " T("爆弾石", "Bomb Stone") " (scaleX %f)(arg_data 0x%04x)\n", this->actor.scale.x,
+ this->actor.params);
}
void BgSpot16Bombstone_Destroy(Actor* thisx, PlayState* play) {
@@ -387,8 +408,8 @@ void func_808B56BC(BgSpot16Bombstone* this, PlayState* play) {
player->actor.world.pos.x += sinValue * this->sinRotation;
player->actor.world.pos.z += sinValue * this->cosRotation;
} else {
- PRINTF("Error 補正出来ない(%s %d)(arg_data 0x%04x)(hosei_angY %x)\n", "../z_bg_spot16_bombstone.c", 935,
- this->actor.params, adjustedYawDiff);
+ PRINTF(T("Error 補正出来ない", "Error Can't correct") "(%s %d)(arg_data 0x%04x)(hosei_angY %x)\n",
+ "../z_bg_spot16_bombstone.c", 935, this->actor.params, adjustedYawDiff);
}
}
}
@@ -416,7 +437,7 @@ void func_808B57E0(BgSpot16Bombstone* this, PlayState* play) {
OnePointCutscene_Init(play, 4180, sTimer, NULL, CAM_ID_MAIN);
}
}
- } else if (player->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) {
+ } else if (player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
playerHeldActor = player->heldActor;
if (playerHeldActor != NULL && playerHeldActor->category == ACTORCAT_EXPLOSIVE &&
playerHeldActor->id == ACTOR_EN_BOMBF) {
@@ -455,7 +476,7 @@ void func_808B5950(BgSpot16Bombstone* this, PlayState* play) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (mREG(64) == 1) {
func_808B561C(this, play);
mREG(64) = -10;
diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h
index 01fb4cc3e0..577bd3863b 100644
--- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h
+++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT16_BOMBSTONE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot16Bombstone;
-typedef void (*BgSpot16BombstoneActionFunc)(struct BgSpot16Bombstone*, PlayState*);
+typedef void (*BgSpot16BombstoneActionFunc)(struct BgSpot16Bombstone*, struct PlayState*);
typedef struct BgSpot16Bombstone {
/* 0x0000 */ Actor actor;
@@ -18,7 +18,7 @@ typedef struct BgSpot16Bombstone {
/* 0x015C */ f32 sinRotation;
/* 0x0160 */ f32 cosRotation;
/* 0x0164 */ ColliderJntSph colliderJntSph;
- /* 0x0184 */ ColliderJntSphElement colliderElements[1];
+ /* 0x0184 */ ColliderJntSphElement colliderJntSphElements[1];
/* 0x01C4 */ ColliderCylinder colliderCylinder;
/* 0x0210 */ s16 unk_210;
/* 0x0212 */ s16 unk_212;
diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c
index ece0d3d6d4..3ea3dd67ad 100644
--- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c
+++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c
@@ -5,8 +5,18 @@
*/
#include "z_bg_spot16_doughnut.h"
-#include "assets/objects/object_efc_doughnut/object_efc_doughnut.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
+#include "z64save.h"
+
+#include "assets/objects/object_efc_doughnut/object_efc_doughnut.h"
#define FLAGS 0
@@ -31,9 +41,9 @@ ActorProfile Bg_Spot16_Doughnut_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 5500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 5000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 5000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 5500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 5000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 5000, ICHAIN_STOP),
};
static s16 sScales[] = {
@@ -75,7 +85,7 @@ void BgSpot16Doughnut_Init(Actor* thisx, PlayState* play) {
} else {
this->fireFlag |= 1;
}
- PRINTF("(spot16 ドーナツ雲)(arg_data 0x%04x)\n", this->actor.params);
+ PRINTF(T("(spot16 ドーナツ雲)", "(spot16 Donut Cloud)") "(arg_data 0x%04x)\n", this->actor.params);
}
}
diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.h b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.h
index 051e45cf58..3b7008ef2d 100644
--- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.h
+++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.h
@@ -2,7 +2,7 @@
#define Z_BG_SPOT16_DOUGHNUT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot16Doughnut;
diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c
index 7d2166dd73..03f7b4514b 100644
--- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c
+++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c
@@ -6,6 +6,17 @@
#include "z_bg_spot17_bakudankabe.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_spot17_obj/object_spot17_obj.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
@@ -30,9 +41,9 @@ ActorProfile Bg_Spot17_Bakudankabe_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 3000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 3000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void func_808B6BC0(BgSpot17Bakudankabe* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h
index 8928435408..fd88416ddf 100644
--- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h
+++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h
@@ -2,7 +2,7 @@
#define Z_BG_SPOT17_BAKUDANKABE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot17Bakudankabe;
diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c
index 8fbdd14048..b03edd8aae 100644
--- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c
+++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c
@@ -5,9 +5,18 @@
*/
#include "z_bg_spot17_funen.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z64play.h"
+
#include "assets/objects/object_spot17_obj/object_spot17_obj.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgSpot17Funen_Init(Actor* thisx, PlayState* play);
void BgSpot17Funen_Destroy(Actor* thisx, PlayState* play);
@@ -35,7 +44,7 @@ void BgSpot17Funen_Init(Actor* thisx, PlayState* play) {
BgSpot17Funen* this = (BgSpot17Funen*)thisx;
Actor_ProcessInitChain(&this->actor, sInitChain);
- PRINTF("spot17 obj. 噴煙 (arg_data 0x%04x)\n", this->actor.params);
+ PRINTF("spot17 obj. " T("噴煙", "volcanic smoke") " (arg_data 0x%04x)\n", this->actor.params);
}
void BgSpot17Funen_Destroy(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.h b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.h
index 6a44fa14cf..737719ea28 100644
--- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.h
+++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.h
@@ -2,7 +2,7 @@
#define Z_BG_SPOT17_FUNEN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot17Funen;
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c
index d41f0d86b9..66d8e2d509 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c
+++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c
@@ -1,8 +1,23 @@
#include "z_bg_spot18_basket.h"
-#include "assets/objects/object_spot18_obj/object_spot18_obj.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+
+#include "assets/objects/object_spot18_obj/object_spot18_obj.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgSpot18Basket_Init(Actor* thisx, PlayState* play);
void BgSpot18Basket_Destroy(Actor* thisx, PlayState* play);
@@ -78,7 +93,7 @@ void func_808B7710(Actor* thisx, PlayState* play) {
BgSpot18Basket* this = (BgSpot18Basket*)thisx;
Collider_InitJntSph(play, &this->colliderJntSph);
- Collider_SetJntSph(play, &this->colliderJntSph, &this->dyna.actor, &sJntSphInit, this->ColliderJntSphElements);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->dyna.actor, &sJntSphInit, this->colliderJntSphElements);
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
}
@@ -123,9 +138,9 @@ void func_808B7770(BgSpot18Basket* this, PlayState* play, f32 arg2) {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgSpot18Basket_Init(Actor* thisx, PlayState* play) {
@@ -155,9 +170,10 @@ void BgSpot18Basket_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.shape.rot.y + 0x1555, this->dyna.actor.shape.rot.z, -1);
if (this->dyna.actor.child == NULL) {
- PRINTF(VT_FGCOL(RED));
- PRINTF("Error : 変化壷蓋発生失敗(%s %d)\n", "../z_bg_spot18_basket.c", 351);
- PRINTF(VT_RST);
+ PRINTF_COLOR_RED();
+ PRINTF(T("Error : 変化壷蓋発生失敗", "Error : Failed to generate the change pot cover") "(%s %d)\n",
+ "../z_bg_spot18_basket.c", 351);
+ PRINTF_RST();
Actor_Kill(&this->dyna.actor);
}
}
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h
index 21f4bc4f23..460a56fb12 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h
+++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h
@@ -2,16 +2,16 @@
#define Z_BG_SPOT18_BASKET_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot18Basket;
-typedef void (*BgSpot18BasketActionFunc)(struct BgSpot18Basket*, PlayState*);
+typedef void (*BgSpot18BasketActionFunc)(struct BgSpot18Basket*, struct PlayState*);
typedef struct BgSpot18Basket {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ColliderJntSph colliderJntSph;
- /* 0x0184 */ ColliderJntSphElement ColliderJntSphElements[2];
+ /* 0x0184 */ ColliderJntSphElement colliderJntSphElements[2];
/* 0x0204 */ BgSpot18BasketActionFunc actionFunc;
/* 0x0208 */ f32 unk_208;
/* 0x020C */ s16 unk_20C;
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c
index c321d5c550..21bc50671c 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c
+++ b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c
@@ -5,6 +5,11 @@
*/
#include "z_bg_spot18_futa.h"
+
+#include "ichain.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_spot18_obj/object_spot18_obj.h"
#define FLAGS 0
@@ -28,9 +33,9 @@ ActorProfile Bg_Spot18_Futa_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void BgSpot18Futa_Init(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.h b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.h
index 1150611cd2..ff0c2cf8ac 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.h
+++ b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.h
@@ -2,7 +2,7 @@
#define Z_BG_SPOT18_FUTA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot18Futa;
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c
index 4156815ddf..d44a14de50 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c
+++ b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c
@@ -6,6 +6,18 @@
*/
#include "z_bg_spot18_obj.h"
+
+#include "array_count.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot18_obj/object_spot18_obj.h"
#define FLAGS 0
@@ -67,15 +79,15 @@ static BgSpot18ObjInitFunc D_808B910C[] = {
};
static InitChainEntry sInitChain1[] = {
- ICHAIN_F32(minVelocityY, -10, ICHAIN_CONTINUE), ICHAIN_F32(gravity, -4, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1400, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP),
+ ICHAIN_F32(minVelocityY, -10, ICHAIN_CONTINUE), ICHAIN_F32(gravity, -4, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 1400, ICHAIN_CONTINUE), ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 800, ICHAIN_STOP),
};
static InitChainEntry sInitChain2[] = {
- ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 700, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 700, ICHAIN_STOP),
};
static BgSpot18ObjInitFunc D_808B913C[] = {
@@ -96,8 +108,8 @@ s32 func_808B8910(BgSpot18Obj* this, PlayState* play) {
} else if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
age = 0;
} else {
- PRINTF("Error : リンク年齢不詳 (%s %d)(arg_data 0x%04x)\n", "../z_bg_spot18_obj.c", 182,
- this->dyna.actor.params);
+ PRINTF(T("Error : リンク年齢不詳", "Error : Link age unknown") " (%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot18_obj.c", 182, this->dyna.actor.params);
return 0;
}
@@ -105,16 +117,17 @@ s32 func_808B8910(BgSpot18Obj* this, PlayState* play) {
case 0:
case 1:
if (D_808B90F0[PARAMS_GET_U(this->dyna.actor.params, 0, 4)][age] == 0) {
- PRINTF("出現しない Object (0x%04x)\n", this->dyna.actor.params);
+ PRINTF(T("出現しない Object (0x%04x)\n", "Non-appearing Object (0x%04x)\n"), this->dyna.actor.params);
}
return D_808B90F0[PARAMS_GET_U(this->dyna.actor.params, 0, 4)][age];
case 2:
- PRINTF("Error : Obj出現判定が設定されていない(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot18_obj.c", 202,
- this->dyna.actor.params);
+ PRINTF(T("Error : Obj出現判定が設定されていない",
+ "Error : Obj appearance detection is not set") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot18_obj.c", 202, this->dyna.actor.params);
return 0;
default:
- PRINTF("Error : Obj出現判定失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_spot18_obj.c", 210,
- this->dyna.actor.params);
+ PRINTF(T("Error : Obj出現判定失敗", "Error : Obj appearance check failed") "(%s %d)(arg_data 0x%04x)\n",
+ "../z_bg_spot18_obj.c", 210, this->dyna.actor.params);
}
return 0;
}
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.h b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.h
index 5e000f646d..bfa758afd7 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.h
+++ b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.h
@@ -2,12 +2,12 @@
#define Z_BG_SPOT18_OBJ_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot18Obj;
-typedef void (*BgSpot18ObjActionFunc)(struct BgSpot18Obj*, PlayState*);
-typedef s32 (*BgSpot18ObjInitFunc)(struct BgSpot18Obj*, PlayState*);
+typedef void (*BgSpot18ObjActionFunc)(struct BgSpot18Obj*, struct PlayState*);
+typedef s32 (*BgSpot18ObjInitFunc)(struct BgSpot18Obj*, struct PlayState*);
typedef struct BgSpot18Obj {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c
index 789921509e..a92e53a4f2 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c
+++ b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c
@@ -5,9 +5,17 @@
*/
#include "z_bg_spot18_shutter.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_spot18_obj/object_spot18_obj.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgSpot18Shutter_Init(Actor* thisx, PlayState* play);
void BgSpot18Shutter_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.h b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.h
index 161fa9bc97..737d30bdbb 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.h
+++ b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.h
@@ -2,11 +2,11 @@
#define Z_BG_SPOT18_SHUTTER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSpot18Shutter;
-typedef void (*BgSpot18ShutterActionFunc)(struct BgSpot18Shutter*, PlayState*);
+typedef void (*BgSpot18ShutterActionFunc)(struct BgSpot18Shutter*, struct PlayState*);
typedef struct BgSpot18Shutter {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c
index d328a2379b..1ddffb6c98 100644
--- a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c
+++ b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c
@@ -5,9 +5,20 @@
*/
#include "z_bg_sst_floor.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_sst/object_sst.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgSstFloor_Init(Actor* thisx, PlayState* play);
void BgSstFloor_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.h b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.h
index 9149f9214b..eb4abfa662 100644
--- a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.h
+++ b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.h
@@ -2,7 +2,7 @@
#define Z_BG_SST_FLOOR_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgSstFloor;
diff --git a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c
index f24ed0c28a..47550f22bd 100644
--- a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c
+++ b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c
@@ -5,9 +5,17 @@
*/
#include "z_bg_toki_hikari.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_toki_objects/object_toki_objects.h"
-#define FLAGS ACTOR_FLAG_5
+#define FLAGS ACTOR_FLAG_DRAW_CULLING_DISABLED
void BgTokiHikari_Init(Actor* thisx, PlayState* play);
void BgTokiHikari_Destroy(Actor* thisx, PlayState* play);
@@ -46,7 +54,7 @@ void BgTokiHikari_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BgTokiHikari_DoNothing;
break;
case 1:
- if (!GET_EVENTCHKINF(EVENTCHKINF_4B)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_OPENED_DOOR_OF_TIME)) {
this->actionFunc = func_808BA204;
this->unk_14C = 0.0f;
} else {
diff --git a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.h b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.h
index b4c62dba99..3c49b61cca 100644
--- a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.h
+++ b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.h
@@ -2,11 +2,11 @@
#define Z_BG_TOKI_HIKARI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgTokiHikari;
-typedef void (*BgTokiHikariActionFunc)(struct BgTokiHikari*, PlayState*);
+typedef void (*BgTokiHikariActionFunc)(struct BgTokiHikari*, struct PlayState*);
typedef struct BgTokiHikari {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
index e25280ed0b..a3a3856969 100644
--- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
+++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
@@ -5,9 +5,22 @@
*/
#include "z_bg_toki_swd.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z64cutscene_flags.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_toki_objects/object_toki_objects.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgTokiSwd_Init(Actor* thisx, PlayState* play);
void BgTokiSwd_Destroy(Actor* thisx, PlayState* play);
@@ -18,9 +31,9 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play);
void func_808BB0AC(BgTokiSwd* this, PlayState* play);
void func_808BB128(BgTokiSwd* this, PlayState* play);
-extern CutsceneData D_808BB2F0[];
-extern CutsceneData D_808BB7A0[];
-extern CutsceneData D_808BBD90[];
+extern CutsceneData gPullMasterSwordCs[];
+extern CutsceneData gPlaceMasterSwordCs[];
+extern CutsceneData gRevealMasterSwordCs[];
ActorProfile Bg_Toki_Swd_Profile = {
/**/ ACTOR_BG_TOKI_SWD,
@@ -93,19 +106,19 @@ void BgTokiSwd_Destroy(Actor* thisx, PlayState* play) {
}
void func_808BAF40(BgTokiSwd* this, PlayState* play) {
- if (!GET_EVENTCHKINF(EVENTCHKINF_WATCHED_SHEIK_AFTER_MASTER_SWORD_CS) && !IS_CUTSCENE_LAYER &&
+ if (!GET_EVENTCHKINF(EVENTCHKINF_REVEALED_MASTER_SWORD) && !IS_CUTSCENE_LAYER &&
Actor_IsFacingAndNearPlayer(&this->actor, 800.0f, 0x7530) && !Play_InCsMode(play)) {
- SET_EVENTCHKINF(EVENTCHKINF_WATCHED_SHEIK_AFTER_MASTER_SWORD_CS);
- play->csCtx.script = D_808BBD90;
+ SET_EVENTCHKINF(EVENTCHKINF_REVEALED_MASTER_SWORD);
+ play->csCtx.script = gRevealMasterSwordCs;
gSaveContext.cutsceneTrigger = 1;
}
if (!LINK_IS_ADULT || GET_EVENTCHKINF(EVENTCHKINF_55)) {
if (Actor_HasParent(&this->actor, play)) {
if (!LINK_IS_ADULT) {
Item_Give(play, ITEM_SWORD_MASTER);
- play->csCtx.script = D_808BB2F0;
+ play->csCtx.script = gPullMasterSwordCs;
} else {
- play->csCtx.script = D_808BB7A0;
+ play->csCtx.script = gPlaceMasterSwordCs;
}
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_MASTER_SWORD);
diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h
index 0a16201e60..5fdb9e0692 100644
--- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h
+++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h
@@ -2,11 +2,11 @@
#define Z_BG_TOKI_SWD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgTokiSwd;
-typedef void (*BgTokiSwdActionFunc)(struct BgTokiSwd*, PlayState*);
+typedef void (*BgTokiSwdActionFunc)(struct BgTokiSwd*, struct PlayState*);
typedef struct BgTokiSwd {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c
index f6f5e3da76..123a797a73 100644
--- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c
+++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c
@@ -1,9 +1,9 @@
-#include "z_bg_toki_swd.h"
#include "z64cutscene_commands.h"
+#include "z64player.h"
// clang-format off
-CutsceneData D_808BB2F0[] = {
- CS_BEGIN_CUTSCENE(9, 425),
+CutsceneData gPullMasterSwordCs[] = {
+ CS_HEADER(9, 425),
CS_PLAYER_CUE_LIST(1),
CS_PLAYER_CUE(PLAYER_CUEID_12, 0, 256, 0x0000, 0x0000, 0x0000, 0, 54, 52, 0, 54, 52, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_LIGHT_SETTING_LIST(1),
@@ -74,6 +74,6 @@ CutsceneData D_808BB2F0[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 20, CS_FLOAT(0x42700000, 60.0f), -1, 117, 7, 0x0000),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 20, CS_FLOAT(0x42700000, 60.0f), -1, 117, 7, 0x2F73),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 20, CS_FLOAT(0x42700000, 60.0f), -1, 117, 7, 0x6B2F),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c
index ca4c06b775..3e27901701 100644
--- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c
+++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c
@@ -1,9 +1,9 @@
-#include "z_bg_toki_swd.h"
#include "z64cutscene_commands.h"
+#include "z64player.h"
// clang-format off
-CutsceneData D_808BB7A0[] = {
- CS_BEGIN_CUTSCENE(9, 368),
+CutsceneData gPlaceMasterSwordCs[] = {
+ CS_HEADER(9, 368),
CS_CAM_EYE_SPLINE(0, 126),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -1, 101, -110, 0x616D),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42200000, 40.0f), -1, 101, -110, 0x6964),
@@ -94,6 +94,6 @@ CutsceneData D_808BB7A0[] = {
CS_MISC(CS_MISC_SET_CSFLAG_1, 90, 91, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFF8, 0xFFFFFFDD, 0x00000000, 0xFFFFFFF8, 0xFFFFFFDD, 0x00000000, 0x00000000, 0x00000000),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 190, 210),
CS_DESTINATION(CS_DEST_TEMPLE_OF_TIME_FROM_MASTER_SWORD, 210, 211),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c
index f7f8d0067e..3e5ccb4ea6 100644
--- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c
+++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c
@@ -1,16 +1,16 @@
-#include "z_bg_toki_swd.h"
#include "z64cutscene_commands.h"
+#include "z64player.h"
// clang-format off
-CutsceneData D_808BBD90[] = {
- CS_BEGIN_CUTSCENE(11, 3000),
+CutsceneData gRevealMasterSwordCs[] = {
+ CS_HEADER(11, 3000),
CS_UNK_DATA_LIST(0x00000021, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFF8, 0xFFFFFFFF, 0x00000000, 0xFFFFFFF8, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000),
CS_PLAYER_CUE_LIST(3),
CS_PLAYER_CUE(PLAYER_CUEID_5, 0, 1, 0x0000, 0x8000, 0x0000, 0, 0, 820, 0, 0, 820, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_2, 1, 16, 0x0000, 0x8000, 0x0000, 0, 0, 820, 0, 0, 720, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_5, 16, 176, 0x0000, 0x8000, 0x0000, 0, 0, 720, 0, 0, 720, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
- CS_ACTOR_CUE_LIST(62, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_8_0, 3),
CS_ACTOR_CUE(0x0004, 40, 70, 0x7D74, 0x0000, 0x0000, -1, 49, 719, 1, 47, 687, CS_FLOAT(0x3D888889, 0.06666667f), CS_FLOAT(0xBD888889, -0.06666667f), CS_FLOAT(0xBD888889, -0.06666667f)),
CS_ACTOR_CUE(0x0004, 70, 220, 0x8010, 0x0000, 0x0000, 1, 47, 687, 0, 134, 21, CS_FLOAT(0xBBDA740E, -0.006666667f), CS_FLOAT(0x3F147AE1, 0.58f), CS_FLOAT(0x3BDA740E, 0.006666667f)),
CS_ACTOR_CUE(0x0002, 220, 272, 0x8000, 0x0000, 0x0000, 0, 134, 21, 0, 101, 2, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xBF227627, -0.63461536f), CS_FLOAT(0x0, 0.0f)),
@@ -18,11 +18,11 @@ CutsceneData D_808BBD90[] = {
CS_MISC(CS_MISC_STOP_CUTSCENE, 340, 341, 0x0000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFD, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFD, 0x00000000, 0x00000000, 0x00000000),
CS_TEXT_LIST(6),
CS_TEXT_NONE(0, 50),
- CS_TEXT(0x70E6, 50, 60, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x70E6, 50, 60, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(60, 250),
- CS_TEXT(0x70E7, 250, 260, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x70E7, 250, 260, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(260, 290),
- CS_TEXT(0x70E8, 290, 320, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x70E8, 290, 320, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_CAM_EYE_SPLINE(0, 251),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -59, 12, 690, 0x0222),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), -59, 12, 690, 0x00FA),
@@ -91,6 +91,6 @@ CutsceneData D_808BBD90[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700001, 60.000004f), 0, 98, -31, 0x0000),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700001, 60.000004f), 0, 98, -31, 0x2D70),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42700001, 60.000004f), 0, 98, -31, 0x0085),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
index 78c7ede03d..5a544c3015 100644
--- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
+++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
@@ -5,10 +5,23 @@
*/
#include "z_bg_treemouth.h"
-#include "assets/objects/object_spot04_objects/object_spot04_objects.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_spot04_objects/object_spot04_objects.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgTreemouth_Init(Actor* thisx, PlayState* play);
void BgTreemouth_Destroy(Actor* thisx, PlayState* play);
@@ -24,10 +37,10 @@ void func_808BC8B8(BgTreemouth* this, PlayState* play);
void func_808BC9EC(BgTreemouth* this, PlayState* play);
void func_808BCAF0(BgTreemouth* this, PlayState* play);
-extern CutsceneData D_808BCE20[];
-extern CutsceneData D_808BD2A0[];
-extern CutsceneData D_808BD520[];
-extern CutsceneData D_808BD790[];
+extern CutsceneData gDekuTreeMeetingCs[];
+extern CutsceneData gDekuTreeChoiceCs[];
+extern CutsceneData gDekuTreeMouthOpeningCs[];
+extern CutsceneData gDekuTreeAskAgainCs[];
ActorProfile Bg_Treemouth_Profile = {
/**/ ACTOR_BG_TREEMOUTH,
@@ -44,9 +57,9 @@ ActorProfile Bg_Treemouth_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_U8(attentionRangeType, ATTENTION_RANGE_5, ICHAIN_CONTINUE),
ICHAIN_VEC3F(scale, 1, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 8000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 300, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 8000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 300, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 300, ICHAIN_STOP),
};
// unused
@@ -145,14 +158,14 @@ void func_808BC8B8(BgTreemouth* this, PlayState* play) {
this->dyna.actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
if (this->dyna.actor.isLockedOn) {
this->dyna.actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- play->csCtx.script = D_808BD2A0;
+ play->csCtx.script = gDekuTreeChoiceCs;
gSaveContext.cutsceneTrigger = 1;
BgTreemouth_SetupAction(this, func_808BC9EC);
}
}
} else if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x4E20)) {
Flags_SetEventChkInf(EVENTCHKINF_0C);
- play->csCtx.script = D_808BCE20;
+ play->csCtx.script = gDekuTreeMeetingCs;
gSaveContext.cutsceneTrigger = 1;
BgTreemouth_SetupAction(this, func_808BC9EC);
}
@@ -185,11 +198,11 @@ void func_808BC9EC(BgTreemouth* this, PlayState* play) {
play->csCtx.state = CS_STATE_RUN;
if (play->msgCtx.choiceIndex == 0) {
- play->csCtx.script = D_808BD520;
+ play->csCtx.script = gDekuTreeMouthOpeningCs;
Flags_SetEventChkInf(EVENTCHKINF_05);
BgTreemouth_SetupAction(this, func_808BCAF0);
} else {
- play->csCtx.script = D_808BD790;
+ play->csCtx.script = gDekuTreeAskAgainCs;
play->csCtx.curFrame = 0;
BgTreemouth_SetupAction(this, func_808BC8B8);
}
@@ -235,7 +248,12 @@ void BgTreemouth_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- if (!IS_CUTSCENE_LAYER || LINK_IS_ADULT) {
+#if OOT_VERSION < PAL_1_0
+ if (!IS_CUTSCENE_LAYER)
+#else
+ if (!IS_CUTSCENE_LAYER || LINK_IS_ADULT)
+#endif
+ {
if (GET_EVENTCHKINF(EVENTCHKINF_07)) {
alpha = 2150;
}
diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h
index dc5a5f545f..7fea6f8e77 100644
--- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h
+++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h
@@ -2,11 +2,11 @@
#define Z_BG_TREEMOUTH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgTreemouth;
-typedef void (*BgTreemouthActionFunc)(struct BgTreemouth*, PlayState*);
+typedef void (*BgTreemouthActionFunc)(struct BgTreemouth*, struct PlayState*);
typedef struct BgTreemouth {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c
index 0d06793b69..c254318d42 100644
--- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c
+++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c
@@ -1,9 +1,10 @@
-#include "z_bg_treemouth.h"
+#include "sequence.h"
#include "z64cutscene_commands.h"
+#include "z64player.h"
// clang-format off
-CutsceneData D_808BCE20[] = {
- CS_BEGIN_CUTSCENE(12, 3000),
+CutsceneData gDekuTreeMeetingCs[] = {
+ CS_HEADER(12, 3000),
CS_UNK_DATA_LIST(0x00000015, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000),
CS_PLAYER_CUE_LIST(2),
@@ -43,14 +44,14 @@ CutsceneData D_808BCE20[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x423CCCC1, 47.199955f), 2673, 127, -267, 0x7805),
CS_TEXT_LIST(4),
CS_TEXT_NONE(0, 40),
- CS_TEXT(0x107D, 40, 60, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x107D, 40, 60, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_TEXT_NONE(60, 160),
- CS_TEXT(0x1015, 160, 170, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x1015, 160, 170, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 180, 200, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFF7, 0xFFFFFFDB, 0x00000000, 0xFFFFFFF7, 0xFFFFFFDB, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(46, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_0_6, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -41, -28, 0, -41, -28, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(62, 4),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_8_0, 4),
CS_ACTOR_CUE(0x0001, 0, 1, 0x0000, 0x0000, 0x0000, 2668, 46, -490, 2668, 46, -490, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 1, 50, 0x5479, 0x0000, 0x0000, 2668, 46, -490, 2890, 43, -612, CS_FLOAT(0x4090FAC7, 4.5306125f), CS_FLOAT(0xBD7AC688, -0.06122449f), CS_FLOAT(0xC090FAC7, -4.5306125f)),
CS_ACTOR_CUE(0x0004, 50, 100, 0x505C, 0x0000, 0x0000, 2890, 43, -612, 3109, 121, -705, CS_FLOAT(0x408C28F6, 4.38f), CS_FLOAT(0x3FC7AE14, 1.56f), CS_FLOAT(0xC08C28F6, -4.38f)),
@@ -59,16 +60,16 @@ CutsceneData D_808BCE20[] = {
CS_START_SEQ(NA_BGM_DEKU_TREE_CS, 140, 141, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFBA, 0x00000094, 0x00000000, 0xFFFFFFBA, 0x00000094),
CS_FADE_OUT_SEQ_LIST(1),
CS_FADE_OUT_SEQ(CS_FADE_OUT_BGM_MAIN, 0, 20, 0x0000, 0x00000000, 0xFFFFFFA2, 0x00000000, 0x00000027, 0xFFFFFFA2, 0x00000000, 0x00000027),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
-CutsceneData D_808BD2A0[] = {
- CS_BEGIN_CUTSCENE(9, 3000),
+CutsceneData gDekuTreeChoiceCs[] = {
+ CS_HEADER(9, 3000),
CS_UNK_DATA_LIST(0x00000015, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 90, 172, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFE3, 0x00000012, 0x00000000, 0xFFFFFFE3, 0x00000012, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(46, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_0_6, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -27, 26, 0, -27, 26, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_CAM_EYE_SPLINE(0, 1091),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 3740, -141, -530, 0x7065),
@@ -96,17 +97,17 @@ CutsceneData D_808BD2A0[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 1, 35, -36, 0x9D94),
CS_TEXT_LIST(2),
CS_TEXT_NONE(0, 20),
- CS_TEXT(0x1016, 20, 80, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x1016, 20, 80, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_START_SEQ_LIST(1),
CS_START_SEQ(NA_BGM_DEKU_TREE_CS, 0, 1, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFAC, 0x0000007E, 0x00000000, 0xFFFFFFAC, 0x0000007E),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
-CutsceneData D_808BD520[] = {
- CS_BEGIN_CUTSCENE(8, 3000),
+CutsceneData gDekuTreeMouthOpeningCs[] = {
+ CS_HEADER(8, 3000),
CS_UNK_DATA_LIST(0x00000015, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(46, 2),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_0_6, 2),
CS_ACTOR_CUE(0x0001, 0, 20, 0x0000, 0x0000, 0x0000, 42, 0, 77, 42, 0, 77, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0003, 20, 357, 0x0000, 0x0000, 0x0000, 42, 0, 77, 42, 0, 77, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_CAM_EYE_SPLINE(0, 1151),
@@ -127,21 +128,21 @@ CutsceneData D_808BD520[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x4223FFED, 40.999928f), 3765, -118, -617, 0x01BC),
CS_TEXT_LIST(2),
CS_TEXT_NONE(0, 20),
- CS_TEXT(0x1017, 20, 60, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x1017, 20, 60, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 100, 150, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFF5, 0x00000010, 0x00000000, 0xFFFFFFF5, 0x00000010, 0x00000000, 0x00000000, 0x00000000),
CS_STOP_SEQ_LIST(1),
CS_STOP_SEQ(NA_BGM_DEKU_TREE_CS, 90, 91, 0x0000, 0x00000000, 0xFFFFFFAC, 0x00000000, 0x00000034, 0xFFFFFFAC, 0x00000000, 0x00000034),
CS_START_SEQ_LIST(1),
CS_START_SEQ(NA_BGM_KOKIRI, 99, 100, 0x0000, 0x00000000, 0xFFFFFFD0, 0x00000000, 0x00000041, 0xFFFFFFD0, 0x00000000, 0x00000041),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
-CutsceneData D_808BD790[] = {
- CS_BEGIN_CUTSCENE(8, 3000),
+CutsceneData gDekuTreeAskAgainCs[] = {
+ CS_HEADER(8, 3000),
CS_UNK_DATA_LIST(0x00000015, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(46, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_0_6, 1),
CS_ACTOR_CUE(0x0001, 0, 119, 0x0000, 0x0000, 0x0000, 42, 0, 77, 42, 0, 77, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_CAM_EYE_SPLINE(0, 1091),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x4297331E, 75.59984f), 3716, 790, -1171, 0x54EC),
@@ -157,13 +158,13 @@ CutsceneData D_808BD790[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x4297331E, 75.59984f), 3769, 718, -1186, 0x56AC),
CS_TEXT_LIST(2),
CS_TEXT_NONE(0, 20),
- CS_TEXT(0x1018, 20, 60, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x1018, 20, 60, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 80, 110, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFEA, 0x00000006, 0x00000000, 0xFFFFFFEA, 0x00000006, 0x00000000, 0x00000000, 0x00000000),
CS_STOP_SEQ_LIST(1),
CS_STOP_SEQ(NA_BGM_DEKU_TREE_CS, 70, 71, 0x0000, 0x00000000, 0xFFFFFFB7, 0x00000000, 0x00000044, 0xFFFFFFB7, 0x00000000, 0x00000044),
CS_START_SEQ_LIST(1),
CS_START_SEQ(NA_BGM_KOKIRI, 79, 80, 0x0000, 0x00000000, 0xFFFFFFE8, 0x00000000, 0x0000003A, 0xFFFFFFE8, 0x00000000, 0x0000003A),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c
index 822a9ddd59..63a73aaf4e 100644
--- a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c
+++ b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c
@@ -5,6 +5,12 @@
*/
#include "z_bg_umajump.h"
+
+#include "ichain.h"
+#include "regs.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_umajump/object_umajump.h"
#define FLAGS 0
@@ -41,11 +47,11 @@ void BgUmaJump_Init(Actor* thisx, PlayState* play) {
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
if (this->dyna.actor.params == 1) {
- if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0)) {
+ if (!(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED)) {
Actor_Kill(&this->dyna.actor);
return;
}
- this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
}
}
diff --git a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.h b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.h
index 19142ec4c8..067b5195c8 100644
--- a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.h
+++ b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.h
@@ -2,7 +2,7 @@
#define Z_BG_UMAJUMP_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgUmaJump;
diff --git a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c
index 87e6c54ed4..679519f1be 100644
--- a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c
+++ b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c
@@ -5,9 +5,21 @@
*/
#include "z_bg_vb_sima.h"
-#include "assets/objects/object_fd/object_fd.h"
#include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
+#include "assets/objects/object_fd/object_fd.h"
+
#define FLAGS 0
void BgVbSima_Init(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h
index c279ae393c..1dcee1b596 100644
--- a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h
+++ b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h
@@ -2,7 +2,7 @@
#define Z_BG_VB_SIMA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgVbSima;
diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c
index 020b056bb4..f759a98148 100644
--- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c
+++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c
@@ -5,9 +5,19 @@
*/
#include "z_bg_ydan_hasi.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_ydan_objects/object_ydan_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BgYdanHasi_Init(Actor* thisx, PlayState* play);
void BgYdanHasi_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.h b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.h
index 616cd4250a..a308c6ebc0 100644
--- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.h
+++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.h
@@ -2,11 +2,11 @@
#define Z_BG_YDAN_HASI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgYdanHasi;
-typedef void (*BgYdanHasiActionFunc)(struct BgYdanHasi*, PlayState*);
+typedef void (*BgYdanHasiActionFunc)(struct BgYdanHasi*, struct PlayState*);
typedef struct BgYdanHasi {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c
index dad395c928..e338635846 100644
--- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c
+++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c
@@ -5,6 +5,13 @@
*/
#include "z_bg_ydan_maruta.h"
+
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_ydan_objects/object_ydan_objects.h"
#define FLAGS 0
@@ -82,20 +89,20 @@ void BgYdanMaruta_Init(Actor* thisx, PlayState* play) {
f32 sinRotY;
f32 cosRotY;
CollisionHeader* colHeader = NULL;
- ColliderTrisElementInit* triInit;
+ ColliderTrisElementInit* triElementInit;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
Collider_InitTris(play, &this->collider);
- Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->elements);
+ Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderElements);
this->switchFlag = PARAMS_GET_U(this->dyna.actor.params, 0, 16);
thisx->params = PARAMS_GET_U(thisx->params, 8, 8); // thisx is required to match here
if (this->dyna.actor.params == 0) {
- triInit = &sTrisElementsInit[0];
+ triElementInit = &sTrisElementsInit[0];
this->actionFunc = func_808BEFF4;
} else {
- triInit = &sTrisElementsInit[1];
+ triElementInit = &sTrisElementsInit[1];
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&gDTFallingLadderCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
@@ -112,16 +119,16 @@ void BgYdanMaruta_Init(Actor* thisx, PlayState* play) {
cosRotY = Math_CosS(this->dyna.actor.shape.rot.y);
for (i = 0; i < 3; i++) {
- sp4C[i].x = (triInit->dim.vtx[i].x * cosRotY) + this->dyna.actor.world.pos.x;
- sp4C[i].y = triInit->dim.vtx[i].y + this->dyna.actor.world.pos.y;
- sp4C[i].z = this->dyna.actor.world.pos.z - (triInit->dim.vtx[i].x * sinRotY);
+ sp4C[i].x = (triElementInit->dim.vtx[i].x * cosRotY) + this->dyna.actor.world.pos.x;
+ sp4C[i].y = triElementInit->dim.vtx[i].y + this->dyna.actor.world.pos.y;
+ sp4C[i].z = this->dyna.actor.world.pos.z - (triElementInit->dim.vtx[i].x * sinRotY);
}
Collider_SetTrisVertices(&this->collider, 0, &sp4C[0], &sp4C[1], &sp4C[2]);
- sp4C[1].x = (triInit->dim.vtx[2].x * cosRotY) + this->dyna.actor.world.pos.x;
- sp4C[1].y = triInit->dim.vtx[0].y + this->dyna.actor.world.pos.y;
- sp4C[1].z = this->dyna.actor.world.pos.z - (triInit->dim.vtx[2].x * sinRotY);
+ sp4C[1].x = (triElementInit->dim.vtx[2].x * cosRotY) + this->dyna.actor.world.pos.x;
+ sp4C[1].y = triElementInit->dim.vtx[0].y + this->dyna.actor.world.pos.y;
+ sp4C[1].z = this->dyna.actor.world.pos.z - (triElementInit->dim.vtx[2].x * sinRotY);
Collider_SetTrisVertices(&this->collider, 1, &sp4C[0], &sp4C[2], &sp4C[1]);
}
@@ -137,7 +144,7 @@ void BgYdanMaruta_Destroy(Actor* thisx, PlayState* play) {
void func_808BEFF4(BgYdanMaruta* this, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
- func_8002F71C(play, &this->dyna.actor, 7.0f, this->dyna.actor.shape.rot.y, 6.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 7.0f, this->dyna.actor.shape.rot.y, 6.0f);
}
this->dyna.actor.shape.rot.x += 0x360;
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h
index 72b753b83e..450c550b3a 100644
--- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h
+++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h
@@ -2,11 +2,11 @@
#define Z_BG_YDAN_MARUTA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgYdanMaruta;
-typedef void (*BgYdanMarutaActionFunc)(struct BgYdanMaruta*, PlayState*);
+typedef void (*BgYdanMarutaActionFunc)(struct BgYdanMaruta*, struct PlayState*);
typedef struct BgYdanMaruta {
/* 0x0000 */ DynaPolyActor dyna;
@@ -14,7 +14,7 @@ typedef struct BgYdanMaruta {
/* 0x0168 */ u8 switchFlag;
/* 0x016A */ s16 unk_16A;
/* 0x016C */ ColliderTris collider;
- /* 0x018C */ ColliderTrisElement elements[2];
+ /* 0x018C */ ColliderTrisElement colliderElements[2];
} BgYdanMaruta; // size = 0x0244
#endif
diff --git a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c
index 6e5a1010fb..d6b7fcf476 100644
--- a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c
+++ b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c
@@ -5,6 +5,21 @@
*/
#include "z_bg_ydan_sp.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_ydan_objects/object_ydan_objects.h"
#define FLAGS 0
@@ -36,7 +51,7 @@ ActorProfile Bg_Ydan_Sp_Profile = {
/**/ BgYdanSp_Draw,
};
-static ColliderTrisElementInit sTrisItemsInit[2] = {
+static ColliderTrisElementInit sTrisElementsInit[2] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -71,7 +86,7 @@ static ColliderTrisInit sTrisInit = {
COLSHAPE_TRIS,
},
2,
- sTrisItemsInit,
+ sTrisElementsInit,
};
static InitChainEntry sInitChain[] = {
@@ -80,11 +95,11 @@ static InitChainEntry sInitChain[] = {
void BgYdanSp_Init(Actor* thisx, PlayState* play) {
BgYdanSp* this = (BgYdanSp*)thisx;
- ColliderTrisElementInit* ti0 = &sTrisItemsInit[0];
+ ColliderTrisElementInit* triElementInit0 = &sTrisElementsInit[0];
Vec3f tri[3];
s32 i;
CollisionHeader* colHeader = NULL;
- ColliderTrisElementInit* ti1 = &sTrisItemsInit[1];
+ ColliderTrisElementInit* triElementInit1 = &sTrisElementsInit[1];
f32 cossY;
f32 sinsY;
f32 cossX;
@@ -95,22 +110,22 @@ void BgYdanSp_Init(Actor* thisx, PlayState* play) {
this->burnSwitchFlag = PARAMS_GET_U(thisx->params, 6, 6);
this->dyna.actor.params = PARAMS_GET_U(thisx->params, 12, 4);
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
- Collider_InitTris(play, &this->trisCollider);
- Collider_SetTris(play, &this->trisCollider, &this->dyna.actor, &sTrisInit, this->trisColliderItems);
+ Collider_InitTris(play, &this->colliderTris);
+ Collider_SetTris(play, &this->colliderTris, &this->dyna.actor, &sTrisInit, this->colliderTrisElements);
if (this->dyna.actor.params == WEB_FLOOR) {
CollisionHeader_GetVirtual(&gDTWebFloorCol, &colHeader);
this->actionFunc = BgYdanSp_FloorWebIdle;
for (i = 0; i < 3; i++) {
- tri[i].x = ti0->dim.vtx[i].x + this->dyna.actor.world.pos.x;
- tri[i].y = ti0->dim.vtx[i].y + this->dyna.actor.world.pos.y;
- tri[i].z = ti0->dim.vtx[i].z + this->dyna.actor.world.pos.z;
+ tri[i].x = triElementInit0->dim.vtx[i].x + this->dyna.actor.world.pos.x;
+ tri[i].y = triElementInit0->dim.vtx[i].y + this->dyna.actor.world.pos.y;
+ tri[i].z = triElementInit0->dim.vtx[i].z + this->dyna.actor.world.pos.z;
}
- Collider_SetTrisVertices(&this->trisCollider, 0, &tri[0], &tri[1], &tri[2]);
+ Collider_SetTrisVertices(&this->colliderTris, 0, &tri[0], &tri[1], &tri[2]);
tri[1].x = tri[0].x;
tri[1].z = tri[2].z;
- Collider_SetTrisVertices(&this->trisCollider, 1, &tri[0], &tri[2], &tri[1]);
+ Collider_SetTrisVertices(&this->colliderTris, 1, &tri[0], &tri[2], &tri[1]);
this->unk_16C = 0.0f;
} else {
CollisionHeader_GetVirtual(&gDTWebWallCol, &colHeader);
@@ -122,19 +137,21 @@ void BgYdanSp_Init(Actor* thisx, PlayState* play) {
cossX = Math_CosS(this->dyna.actor.shape.rot.x);
for (i = 0; i < 3; i++) {
- tri[i].x =
- this->dyna.actor.world.pos.x + (cossY * ti1->dim.vtx[i].x) - (sinsY * ti1->dim.vtx[i].y * nSinsX);
- tri[i].y = this->dyna.actor.world.pos.y + (ti1->dim.vtx[i].y * cossX);
- tri[i].z =
- this->dyna.actor.world.pos.z - (sinsY * ti1->dim.vtx[i].x) + (ti1->dim.vtx[i].y * cossY * nSinsX);
+ tri[i].x = this->dyna.actor.world.pos.x + (cossY * triElementInit1->dim.vtx[i].x) -
+ (sinsY * triElementInit1->dim.vtx[i].y * nSinsX);
+ tri[i].y = this->dyna.actor.world.pos.y + (triElementInit1->dim.vtx[i].y * cossX);
+ tri[i].z = this->dyna.actor.world.pos.z - (sinsY * triElementInit1->dim.vtx[i].x) +
+ (triElementInit1->dim.vtx[i].y * cossY * nSinsX);
}
- Collider_SetTrisVertices(&this->trisCollider, 0, &tri[0], &tri[1], &tri[2]);
+ Collider_SetTrisVertices(&this->colliderTris, 0, &tri[0], &tri[1], &tri[2]);
- tri[1].x = this->dyna.actor.world.pos.x + (cossY * ti1->dim.vtx[0].x) - (ti1->dim.vtx[2].y * sinsY * nSinsX);
- tri[1].y = this->dyna.actor.world.pos.y + (ti1->dim.vtx[2].y * cossX);
- tri[1].z = this->dyna.actor.world.pos.z - (sinsY * ti1->dim.vtx[0].x) + (ti1->dim.vtx[2].y * cossY * nSinsX);
- Collider_SetTrisVertices(&this->trisCollider, 1, &tri[0], &tri[2], &tri[1]);
+ tri[1].x = this->dyna.actor.world.pos.x + (cossY * triElementInit1->dim.vtx[0].x) -
+ (triElementInit1->dim.vtx[2].y * sinsY * nSinsX);
+ tri[1].y = this->dyna.actor.world.pos.y + (triElementInit1->dim.vtx[2].y * cossX);
+ tri[1].z = this->dyna.actor.world.pos.z - (sinsY * triElementInit1->dim.vtx[0].x) +
+ (triElementInit1->dim.vtx[2].y * cossY * nSinsX);
+ Collider_SetTrisVertices(&this->colliderTris, 1, &tri[0], &tri[2], &tri[1]);
}
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
this->timer = 0;
@@ -146,7 +163,7 @@ void BgYdanSp_Init(Actor* thisx, PlayState* play) {
void BgYdanSp_Destroy(Actor* thisx, PlayState* play) {
BgYdanSp* this = (BgYdanSp*)thisx;
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
- Collider_DestroyTris(play, &this->trisCollider);
+ Collider_DestroyTris(play, &this->colliderTris);
}
void BgYdanSp_UpdateFloorWebCollision(BgYdanSp* this) {
@@ -283,7 +300,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, PlayState* play) {
BgYdanSp_BurnWeb(this, play);
return;
}
- if (this->trisCollider.base.acFlags & AC_HIT) {
+ if (this->colliderTris.base.acFlags & AC_HIT) {
BgYdanSp_BurnWeb(this, play);
return;
}
@@ -293,7 +310,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, PlayState* play) {
if (this->dyna.actor.xzDistToPlayer < 80.0f) {
this->unk_16C = 200.0f;
this->dyna.actor.room = -1;
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->timer = 40;
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_WEB_BROKEN);
this->actionFunc = BgYdanSp_FloorWebBreaking;
@@ -330,7 +347,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, PlayState* play) {
}
}
BgYdanSp_UpdateFloorWebCollision(this);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->trisCollider.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderTris.base);
}
void BgYdanSp_BurnWallWeb(BgYdanSp* this, PlayState* play) {
@@ -391,7 +408,7 @@ void BgYdanSp_WallWebIdle(BgYdanSp* this, PlayState* play) {
Vec3f sp30;
player = GET_PLAYER(play);
- if (Flags_GetSwitch(play, this->burnSwitchFlag) || (this->trisCollider.base.acFlags & AC_HIT)) {
+ if (Flags_GetSwitch(play, this->burnSwitchFlag) || (this->colliderTris.base.acFlags & AC_HIT)) {
this->dyna.actor.home.pos.y = this->dyna.actor.world.pos.y + 80.0f;
BgYdanSp_BurnWeb(this, play);
} else if (player->heldItemAction == PLAYER_IA_DEKU_STICK && player->unk_860 != 0) {
@@ -402,7 +419,7 @@ void BgYdanSp_WallWebIdle(BgYdanSp* this, PlayState* play) {
BgYdanSp_BurnWeb(this, play);
}
}
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->trisCollider.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderTris.base);
}
void BgYdanSp_Update(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.h b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.h
index e134ac6f2c..467ec18383 100644
--- a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.h
+++ b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.h
@@ -2,11 +2,11 @@
#define Z_BG_YDAN_SP_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgYdanSp;
-typedef void (*BgYdanSpActionFunc)(struct BgYdanSp*, PlayState*);
+typedef void (*BgYdanSpActionFunc)(struct BgYdanSp*, struct PlayState*);
typedef struct BgYdanSp {
/* 0x0000 */ DynaPolyActor dyna;
@@ -15,8 +15,8 @@ typedef struct BgYdanSp {
/* 0x0169 */ u8 burnSwitchFlag;
/* 0x016A */ s16 timer;
/* 0x016C */ f32 unk_16C;
- /* 0x0170 */ ColliderTris trisCollider;
- /* 0x0190 */ ColliderTrisElement trisColliderItems[2];
+ /* 0x0170 */ ColliderTris colliderTris;
+ /* 0x0190 */ ColliderTrisElement colliderTrisElements[2];
} BgYdanSp; // size = 0x0248
#endif
diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c
index d5d3244348..7a12637b9d 100644
--- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c
+++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c
@@ -5,10 +5,21 @@
*/
#include "z_bg_zg.h"
-#include "assets/objects/object_zg/object_zg.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
+
+#include "assets/objects/object_zg/object_zg.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void BgZg_Init(Actor* thisx, PlayState* play);
void BgZg_Destroy(Actor* thisx, PlayState* play);
@@ -99,8 +110,8 @@ void BgZg_Update(Actor* thisx, PlayState* play) {
s32 action = this->action;
if (((action < 0) || (1 < action)) || (sActionFuncs[action] == NULL)) {
- // "Main Mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
} else {
sActionFuncs[action](this, play);
}
@@ -146,8 +157,8 @@ void BgZg_Draw(Actor* thisx, PlayState* play) {
s32 drawConfig = this->drawConfig;
if (((drawConfig < 0) || (drawConfig > 0)) || sDrawFuncs[drawConfig] == NULL) {
- // "Drawing mode is wrong !!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
} else {
sDrawFuncs[drawConfig](this, play);
}
diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h
index a5355defd5..c7f1add3a5 100644
--- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h
+++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h
@@ -2,12 +2,12 @@
#define Z_BG_ZG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BgZg;
-typedef void (*BgZgActionFunc)(struct BgZg*, PlayState*);
-typedef void (*BgZgDrawFunc)(struct BgZg*, PlayState*);
+typedef void (*BgZgActionFunc)(struct BgZg*, struct PlayState*);
+typedef void (*BgZgDrawFunc)(struct BgZg*, struct PlayState*);
typedef struct BgZg {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c
index 53c58c143f..bfc700c6dc 100644
--- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c
+++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c
@@ -1,9 +1,32 @@
#include "z_boss_dodongo.h"
-#include "assets/objects/object_kingdodongo/object_kingdodongo.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "regs.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_kingdodongo/object_kingdodongo.h"
#include "assets/scenes/dungeons/ddan_boss/ddan_boss_room_1.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BossDodongo_Init(Actor* thisx, PlayState* play);
void BossDodongo_Destroy(Actor* thisx, PlayState* play);
@@ -46,6 +69,7 @@ ActorProfile Boss_Dodongo_Profile = {
};
#include "z_boss_dodongo_data.inc.c"
+#include "assets/overlays/ovl_Boss_Dodongo/ovl_Boss_Dodongo.c"
static InitChainEntry sInitChain[] = {
ICHAIN_U8(attentionRangeType, ATTENTION_RANGE_5, ICHAIN_CONTINUE),
@@ -198,7 +222,7 @@ void BossDodongo_Init(Actor* thisx, PlayState* play) {
this->unk_224 = 2.0f;
this->unk_228 = 9200.0f;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->items);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
if (Flags_GetClear(play, play->roomCtx.curRoom.num)) { // KD is dead
u16* temp_s1_3 = SEGMENTED_TO_VIRTUAL(gDodongosCavernBossLavaFloorTex);
@@ -333,7 +357,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
this->subCamAt.z = player->actor.world.pos.z;
}
- if (GET_EVENTCHKINF(EVENTCHKINF_71)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE)) {
if (this->unk_198 == 100) {
this->actor.world.pos.x = -1114.0f;
this->actor.world.pos.z = -2804.0f;
@@ -374,7 +398,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
case 4:
Math_SmoothStepToF(&this->unk_20C, 0.0f, 1.0f, 0.01f, 0.0f);
- if (GET_EVENTCHKINF(EVENTCHKINF_71)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE)) {
phi_f0 = -50.0f;
} else {
phi_f0 = 0.0f;
@@ -402,7 +426,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
}
if (this->unk_198 == 0x5A) {
- if (!GET_EVENTCHKINF(EVENTCHKINF_71)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
SEGMENTED_TO_VIRTUAL(gKingDodongoTitleCardTex), 160, 180, 128, 40);
}
@@ -421,7 +445,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
this->unk_1DA = 50;
this->unk_1BC = 0;
player->actor.shape.rot.y = -0x4002;
- SET_EVENTCHKINF(EVENTCHKINF_71);
+ SET_EVENTCHKINF(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE);
}
break;
}
@@ -730,7 +754,7 @@ void BossDodongo_Roll(BossDodongo* this, PlayState* play) {
f32 sp4C;
f32 sp48;
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
SkelAnime_Update(&this->skelAnime);
if (this->unk_1DA == 10) {
diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h
index dc5398598d..191487f13f 100644
--- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h
+++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h
@@ -2,11 +2,11 @@
#define Z_BOSS_DODONGO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BossDodongo;
-typedef void (*BossDodongoActionFunc)(struct BossDodongo*, PlayState*);
+typedef void (*BossDodongoActionFunc)(struct BossDodongo*, struct PlayState*);
#define BOSS_DODONGO_EFFECT_COUNT 80
@@ -96,7 +96,7 @@ typedef struct BossDodongo {
/* 0x0428 */ Vec3f subCamEye;
/* 0x0434 */ Vec3f subCamAt;
/* 0x0440 */ ColliderJntSph collider;
- /* 0x0460 */ ColliderJntSphElement items[19];
+ /* 0x0460 */ ColliderJntSphElement colliderElements[19];
/* 0x0920 */ BossDodongoEffect effects[BOSS_DODONGO_EFFECT_COUNT];
} BossDodongo; // size = 0x1820
diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.inc.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.inc.c
index d4ac8f7f03..3d0061bb35 100644
--- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.inc.c
+++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.inc.c
@@ -1,4 +1,4 @@
-#include "z_boss_dodongo.h"
+#include "z64collision_check.h"
static u8 D_808C7000[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1,
@@ -236,5 +236,3 @@ static ColliderJntSphInit sJntSphInit = {
};
static Vec3f sUnkZeroVec = { 0.0f, 0.0f, 0.0f };
-
-#include "assets/overlays/ovl_Boss_Dodongo/ovl_Boss_Dodongo.c"
diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c
index 6042ccd718..3b80c5804c 100644
--- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c
+++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c
@@ -5,14 +5,37 @@
*/
#include "z_boss_fd.h"
-#include "assets/objects/object_fd/object_fd.h"
#include "overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h"
#include "overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h"
#include "overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_fd/object_fd.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum BossFdIntroFlyState {
/* 0 */ INTRO_FLY_EMERGE,
@@ -191,7 +214,7 @@ void BossFd_Init(Actor* thisx, PlayState* play) {
this->actor.world.pos.x = this->actor.world.pos.z = 0.0f;
this->actor.world.pos.y = -200.0f;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->elements);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
for (i = 0; i < 100; i++) {
this->bodySegsPos[i].x = this->actor.world.pos.x;
@@ -337,7 +360,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->timers[0] = 0;
this->subCamVelFactor = 0.0f;
this->subCamAccel = 0.0f;
- if (GET_EVENTCHKINF(EVENTCHKINF_73)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
this->introState = BFD_CS_EMERGE;
this->subCamEyeNext.x = player2->actor.world.pos.x + 100.0f + 300.0f - 600.0f;
this->subCamEyeNext.y = player2->actor.world.pos.y + 100.0f - 50.0f;
@@ -459,7 +482,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
PRINTF("WAY_SPD X = %f\n", this->subCamAtVel.x);
PRINTF("WAY_SPD Y = %f\n", this->subCamAtVel.y);
PRINTF("WAY_SPD Z = %f\n", this->subCamAtVel.z);
- if ((this->timers[3] > 190) && !GET_EVENTCHKINF(EVENTCHKINF_73)) {
+ if ((this->timers[3] > 190) && !GET_EVENTCHKINF(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
Audio_PlaySfxGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
@@ -486,7 +509,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
if (this->timers[3] == 160) {
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_FIRE_BOSS);
}
- if ((this->timers[3] == 130) && !GET_EVENTCHKINF(EVENTCHKINF_73)) {
+ if ((this->timers[3] == 130) && !GET_EVENTCHKINF(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gVolvagiaTitleCardTex),
160, 180, 128, 40);
}
@@ -539,7 +562,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7);
this->actionFunc = BossFd_Wait;
this->handoffSignal = FD2_SIGNAL_GROUND;
- SET_EVENTCHKINF(EVENTCHKINF_73);
+ SET_EVENTCHKINF(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE);
}
break;
}
@@ -687,7 +710,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
}
break;
case BOSSFD_FLY_CHASE:
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
temp_y = Math_SinS(this->work[BFD_MOVE_TIMER] * 2396.0f) * 30.0f + this->fwork[BFD_TARGET_Y_OFFSET];
this->targetPosition.x = player->actor.world.pos.x;
this->targetPosition.y = player->actor.world.pos.y + temp_y + 30.0f;
@@ -1284,12 +1307,12 @@ void BossFd_Effects(BossFd* this, PlayState* play) {
}
void BossFd_CollisionCheck(BossFd* this, PlayState* play) {
- ColliderJntSphElement* headCollider = &this->collider.elements[0];
+ ColliderJntSphElement* headColliderElem = &this->collider.elements[0];
ColliderElement* acHitElem;
- if (headCollider->base.acElemFlags & ACELEM_HIT) {
- headCollider->base.acElemFlags &= ~ACELEM_HIT;
- acHitElem = headCollider->base.acHitElem;
+ if (headColliderElem->base.acElemFlags & ACELEM_HIT) {
+ headColliderElem->base.acElemFlags &= ~ACELEM_HIT;
+ acHitElem = headColliderElem->base.acHitElem;
this->actor.colChkInfo.health -= 2;
if (acHitElem->atDmgInfo.dmgFlags & DMG_ARROW_ICE) {
this->actor.colChkInfo.health -= 2;
@@ -1485,7 +1508,7 @@ void BossFd_UpdateEffects(BossFd* this, PlayState* play) {
diff.z = player->actor.world.pos.z - effect->pos.z;
if ((this->timers[3] == 0) && (sqrtf(SQ(diff.x) + SQ(diff.y) + SQ(diff.z)) < 20.0f)) {
this->timers[3] = 50;
- func_8002F6D4(play, NULL, 5.0f, effect->kbAngle, 0.0f, 0x30);
+ Actor_SetPlayerKnockbackLarge(play, NULL, 5.0f, effect->kbAngle, 0.0f, 0x30);
if (!player->bodyIsBurning) {
s16 i2;
diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h
index dd1cbc8f0a..1ec72040c9 100644
--- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h
+++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h
@@ -2,11 +2,11 @@
#define Z_BOSS_FD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BossFd;
-typedef void (*BossFdActionFunc)(struct BossFd*, PlayState*);
+typedef void (*BossFdActionFunc)(struct BossFd*, struct PlayState*);
typedef enum BossFdActionState {
/* -1 */ BOSSFD_WAIT_INTRO = -1,
@@ -175,7 +175,7 @@ typedef struct BossFd {
/* 0x1488 */ f32 subCamAtYOffset;
/* 0x148C */ f32 subCamShake;
/* 0x1490 */ ColliderJntSph collider;
- /* 0x14B0 */ ColliderJntSphElement elements[19];
+ /* 0x14B0 */ ColliderJntSphElement colliderElements[19];
/* 0x1970 */ BossFdEffect effects[BOSSFD_EFFECT_COUNT];
} BossFd; // size = 0x43A0
diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd_colchk.inc.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd_colchk.inc.c
index 83aa550fde..1012117e52 100644
--- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd_colchk.inc.c
+++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd_colchk.inc.c
@@ -1,6 +1,6 @@
-#include "global.h"
+#include "z64collision_check.h"
-static ColliderJntSphElementInit sJntSphItemsInit[19] = {
+static ColliderJntSphElementInit sJntSphElementsInit[19] = {
{
{
ELEM_MATERIAL_UNK3,
@@ -222,5 +222,5 @@ static ColliderJntSphInit sJntSphInit = {
COLSHAPE_JNTSPH,
},
19,
- sJntSphItemsInit,
+ sJntSphElementsInit,
};
diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c
index ff8a55f1a9..856f9e34ea 100644
--- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c
+++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c
@@ -5,12 +5,32 @@
*/
#include "z_boss_fd2.h"
-#include "assets/objects/object_fd2/object_fd2.h"
#include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_fd2/object_fd2.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum BossFd2CutsceneState {
/* 0 */ DEATH_START,
@@ -183,7 +203,7 @@ void BossFd2_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BossFd2_Wait;
}
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->elements);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
}
void BossFd2_Destroy(Actor* thisx, PlayState* play) {
@@ -295,7 +315,7 @@ void BossFd2_Emerge(BossFd2* this, PlayState* play) {
case 2:
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x7D0);
if ((this->timers[0] == 1) && (this->actor.xzDistToPlayer < 120.0f)) {
- func_8002F6D4(play, &this->actor, 3.0f, this->actor.yawTowardsPlayer, 2.0f, 0x20);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.yawTowardsPlayer, 2.0f, 0x20);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
if (Animation_OnFrame(&this->skelAnime, this->fwork[FD2_END_FRAME])) {
@@ -524,7 +544,7 @@ void BossFd2_Vulnerable(BossFd2* this, PlayState* play) {
s16 i;
this->disableAT = true;
- this->actor.flags |= ACTOR_FLAG_10;
+ this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
SkelAnime_Update(&this->skelAnime);
switch (this->work[FD2_ACTION_STATE]) {
case 0:
@@ -814,7 +834,7 @@ void BossFd2_CollisionCheck(BossFd2* this, PlayState* play) {
if (this->actionFunc == BossFd2_ClawSwipe) {
Player* player = GET_PLAYER(play);
- for (i = 0; i < ARRAY_COUNT(this->elements); i++) {
+ for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) {
if (this->collider.elements[i].base.atElemFlags & ATELEM_HIT) {
this->collider.elements[i].base.atElemFlags &= ~ATELEM_HIT;
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
@@ -875,10 +895,10 @@ void BossFd2_CollisionCheck(BossFd2* this, PlayState* play) {
}
if (((s8)bossFd->actor.colChkInfo.health > 2) || canKill) {
bossFd->actor.colChkInfo.health -= damage;
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("damage %d\n", damage);
}
- PRINTF(VT_RST);
+ PRINTF_RST();
PRINTF("hp %d\n", bossFd->actor.colChkInfo.health);
if ((s8)bossFd->actor.colChkInfo.health <= 0) {
@@ -960,7 +980,7 @@ void BossFd2_Update(Actor* thisx, PlayState* play2) {
PRINTF("FD2 move start \n");
this->disableAT = false;
- this->actor.flags &= ~ACTOR_FLAG_10;
+ this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
this->work[FD2_VAR_TIMER]++;
this->work[FD2_UNK_TIMER]++;
diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h
index f2d3ff45ad..d9fbde0ada 100644
--- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h
+++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h
@@ -2,11 +2,11 @@
#define Z_BOSS_FD2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BossFd2;
-typedef void (*BossFd2ActionFunc)(struct BossFd2*, PlayState*);
+typedef void (*BossFd2ActionFunc)(struct BossFd2*, struct PlayState*);
typedef enum BossFd2Signal {
/* 0 */ FD2_SIGNAL_NONE,
@@ -83,7 +83,7 @@ typedef struct BossFd2 {
/* 0x1414 */ f32 subCamAtYOffset;
/* 0x1418 */ f32 subCamShake;
/* 0x141C */ ColliderJntSph collider;
- /* 0x143C */ ColliderJntSphElement elements[9];
+ /* 0x143C */ ColliderJntSphElement colliderElements[9];
} BossFd2; // size = 0x167C
#endif
diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2_colchk.inc.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2_colchk.inc.c
index 1098d44c3f..3a432692fe 100644
--- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2_colchk.inc.c
+++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2_colchk.inc.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "z64collision_check.h"
static ColliderJntSphElementInit sJntSphElementsInit[9] = {
{
diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c
index e463ef1449..139d684deb 100644
--- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c
+++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c
@@ -1,15 +1,40 @@
#include "z_boss_ganon.h"
-#include "assets/overlays/ovl_Boss_Ganon/ovl_Boss_Ganon.h"
#include "overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h"
#include "overlays/actors/ovl_En_Zl3/z_en_zl3.h"
#include "overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/overlays/ovl_Boss_Ganon/ovl_Boss_Ganon.h"
#include "assets/objects/object_ganon/object_ganon.h"
#include "assets/objects/object_ganon_anime1/object_ganon_anime1.h"
#include "assets/objects/object_ganon_anime2/object_ganon_anime2.h"
#include "assets/scenes/dungeons/ganon_boss/ganon_boss_scene.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
void BossGanon_Init(Actor* thisx, PlayState* play2);
void BossGanon_Destroy(Actor* thisx, PlayState* play);
@@ -100,21 +125,22 @@ static ColliderCylinderInit sLightBallCylinderInit = {
static u8 D_808E4C58[] = { 0, 12, 10, 12, 14, 16, 12, 14, 16, 12, 14, 16, 12, 14, 16, 10, 16, 14 };
static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
-#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:0"
+#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" \
+ "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
static EnGanonMant* sCape;
// TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving
// data around. It would be easier if we had more options for controlling BSS ordering in debug.
-#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
- "ntsc-1.2:128"
+#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" \
+ "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
static s32 sSeed1;
static s32 sSeed2;
static s32 sSeed3;
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
- "ntsc-1.2:128"
+ "ique-cn:192 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
static BossGanon* sGanondorf;
@@ -334,7 +360,7 @@ void BossGanon_SetColliderPos(Vec3f* pos, ColliderCylinder* collider) {
void BossGanon_SetAnimationObject(BossGanon* this, PlayState* play, s32 objectId) {
this->animObjectSlot = Object_GetSlot(&play->objectCtx, objectId);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
}
static InitChainEntry sInitChain[] = {
@@ -497,7 +523,7 @@ void BossGanon_SetupIntroCutscene(BossGanon* this, PlayState* play) {
this->actionFunc = BossGanon_IntroCutscene;
this->unk_198 = 1;
this->animObjectSlot = animObjectSlot;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
Animation_MorphToLoop(&this->skelAnime, &gGanondorfPlayOrganAnim, 0.0f);
} else {
this->actionFunc = BossGanon_SetupIntroCutscene;
@@ -545,7 +571,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
f32 cos;
Camera* mainCam;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
sCape->backPush = -2.0f;
sCape->backSwayMagnitude = 0.25f;
@@ -576,7 +602,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE);
this->csCamFov = 60.0f;
- if (GET_EVENTCHKINF(EVENTCHKINF_78)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GANONDORF_BATTLE)) {
// watched cutscene already, skip most of it
this->csState = 17;
this->csTimer = 0;
@@ -1092,14 +1118,14 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
if (this->csTimer == 50) {
gSegments[6] =
- VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[Object_GetSlot(&play->objectCtx, OBJECT_GANON)].segment);
+ OS_K0_TO_PHYSICAL(play->objectCtx.slots[Object_GetSlot(&play->objectCtx, OBJECT_GANON)].segment);
- if (!GET_EVENTCHKINF(EVENTCHKINF_78)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GANONDORF_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gGanondorfTitleCardTex),
160, 180, 128, 40);
}
- SET_EVENTCHKINF(EVENTCHKINF_78);
+ SET_EVENTCHKINF(EVENTCHKINF_BEGAN_GANONDORF_BATTLE);
}
if (this->csTimer >= 20) {
@@ -1182,7 +1208,7 @@ void BossGanon_SetupDeathCutscene(BossGanon* this, PlayState* play) {
this->csTimer = this->csState = 0;
this->unk_198 = 1;
this->animObjectSlot = animObjectSlot;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfDefeatedStartAnim, 0.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfDefeatedStartAnim);
this->unk_508 = 0.0f;
@@ -1195,7 +1221,7 @@ void BossGanon_SetupTowerCutscene(BossGanon* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, animObjectSlot)) {
this->animObjectSlot = animObjectSlot;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfDefeatedStartAnim, 0.0f);
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfDefeatedStartAnim);
this->actionFunc = BossGanon_DeathAndTowerCutscene;
@@ -1225,17 +1251,12 @@ void BossGanon_ShatterWindows(u8 windowShatterState) {
}
void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
- static Color_RGBA8 bloodPrimColor = { 0, 120, 0, 255 };
- static Color_RGBA8 bloodEnvColor = { 0, 120, 0, 255 };
s16 i;
u8 moveCam = false;
Player* player = GET_PLAYER(play);
s16 pad;
- Vec3f sp98;
- Vec3f sp8C;
- Vec3f sp80;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
this->csTimer++;
SkelAnime_Update(&this->skelAnime);
@@ -1336,6 +1357,17 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_GANON_TOKETU);
} else {
if (Animation_OnFrame(&this->skelAnime, this->fwork[GDF_FWORK_1] - 16.0f)) {
+ Vec3f sp98;
+ Vec3f sp8C;
+#if OOT_VERSION < PAL_1_0
+ Color_RGBA8 bloodPrimColor = { 120, 0, 0, 255 };
+ Color_RGBA8 bloodEnvColor = { 120, 0, 0, 255 };
+#else
+ static Color_RGBA8 bloodPrimColor = { 0, 120, 0, 255 };
+ static Color_RGBA8 bloodEnvColor = { 0, 120, 0, 255 };
+#endif
+ Vec3f sp80;
+
for (i = 0; i < 40; i++) {
sp98.x = Rand_CenteredFloat(5.0f);
sp98.y = Rand_CenteredFloat(1.5f) + 1.0f;
@@ -2572,7 +2604,7 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gGanondorfLandAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfLandAnim, 0.0f);
this->timers[0] = 70;
- this->actor.flags |= ACTOR_FLAG_10;
+ this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
}
break;
@@ -2605,7 +2637,7 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
this->unk_2E6 = 80;
this->unk_2E8 = 0;
- this->actor.flags &= ~ACTOR_FLAG_10;
+ this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
}
break;
@@ -2803,7 +2835,7 @@ void BossGanon_Update(Actor* thisx, PlayState* play2) {
if ((this->actionFunc != BossGanon_IntroCutscene) && (this->actionFunc != BossGanon_DeathAndTowerCutscene)) {
BossGanon_SetAnimationObject(this, play, OBJECT_GANON_ANIME1);
} else {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
}
if (this->windowShatterState != GDF_WINDOW_SHATTER_OFF) {
@@ -3981,7 +4013,7 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
} else {
if (sqrtf(SQ(xDistFromLink) + SQ(yDistFromLink) + SQ(zDistFromLink)) <= 25.0f) {
spBA = 5;
- func_8002F6D4(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x30);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x30);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_GANON_HIT_THUNDER);
ganondorf->timers[2] = 20;
@@ -4453,7 +4485,7 @@ void func_808E2544(Actor* thisx, PlayState* play) {
this->actor.speed = 0.0f;
if (dorf->timers[2] == 0) {
- func_8002F6D4(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x50);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x50);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_GANON_HIT_THUNDER);
dorf->timers[2] = 20;
@@ -4775,7 +4807,8 @@ void BossGanon_UpdateEffects(PlayState* play) {
if (((eff->scale * 150.0f) < distToPlayer) && (distToPlayer < (eff->scale * 300.0f))) {
eff->timer = 150;
- func_8002F6D4(play, &sGanondorf->actor, 7.0f, sGanondorf->actor.yawTowardsPlayer, 0.0f, 0x20);
+ Actor_SetPlayerKnockbackLarge(play, &sGanondorf->actor, 7.0f,
+ sGanondorf->actor.yawTowardsPlayer, 0.0f, 0x20);
}
}
}
diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h
index e0f093455b..eb7fc2e2bf 100644
--- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h
+++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h
@@ -2,11 +2,11 @@
#define Z_BOSS_GANON_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BossGanon;
-typedef void (*BossGanonActionFunc)(struct BossGanon*, PlayState*);
+typedef void (*BossGanonActionFunc)(struct BossGanon*, struct PlayState*);
typedef enum GanondorfLimb {
/* 0 */ GANONDORF_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c
index dbddf628b8..e2742e3bef 100644
--- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c
+++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c
@@ -1,14 +1,56 @@
#include "z_boss_ganon2.h"
-#include "versions.h"
#include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h"
#include "overlays/actors/ovl_Demo_Gj/z_demo_gj.h"
#include "overlays/actors/ovl_En_Zl3/z_en_zl3.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ganon/object_ganon.h"
#include "assets/objects/object_ganon2/object_ganon2.h"
#include "assets/objects/object_ganon_anime3/object_ganon_anime3.h"
#include "assets/objects/object_geff/object_geff.h"
+#include "assets/overlays/ovl_Boss_Ganon2/ovl_Boss_Ganon2.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#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" \
+ "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
+
+#define BOSS_GANON2_EFFECT_COUNT 100
+
+typedef struct BossGanon2Effect {
+ /* 0x00 */ u8 type;
+ /* 0x01 */ u8 unk_01;
+ /* 0x04 */ Vec3f position;
+ /* 0x10 */ Vec3f velocity;
+ /* 0x1C */ Vec3f accel;
+ /* 0x28 */ char unk_28[0x6];
+ /* 0x2E */ s16 unk_2E;
+ /* 0x30 */ char unk_30[0x4];
+ /* 0x34 */ f32 scale;
+ /* 0x38 */ Vec3f unk_38;
+} BossGanon2Effect; // size = 0x44
void BossGanon2_Init(Actor* thisx, PlayState* play);
void BossGanon2_Destroy(Actor* thisx, PlayState* play);
@@ -45,7 +87,265 @@ ActorProfile Boss_Ganon2_Profile = {
/**/ BossGanon2_Draw,
};
-#include "z_boss_ganon2_data.inc.c"
+static Vec3f D_80906D60 = { 0.0f, 0.0f, 0.0f };
+
+static Vec3f D_80906D6C = { 0.0f, 0.0f, 500.0f };
+
+static u8 D_80906D78 = 0;
+
+static ColliderJntSphElementInit sJntSphElementsInit1[] = {
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 0, { { 0, 0, 0 }, 30 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 1, { { 0, 0, 0 }, 30 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 2, { { 0, 0, 0 }, 30 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 3, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 4, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 5, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 6, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 7, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 8, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 9, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 10, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 11, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 12, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 13, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x10 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 14, { { 0, 0, 0 }, 20 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK0,
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ { 0xFFCFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 15, { { 0, 0, 0 }, 30 }, 100 },
+ },
+};
+
+static ColliderJntSphInit sJntSphInit1 = {
+ {
+ COL_MATERIAL_METAL,
+ AT_ON | AT_TYPE_ENEMY,
+ AC_ON | AC_TYPE_PLAYER,
+ OC1_ON | OC1_TYPE_PLAYER,
+ OC2_FIRST_ONLY | OC2_TYPE_1,
+ COLSHAPE_JNTSPH,
+ },
+ ARRAY_COUNT(sJntSphElementsInit1),
+ sJntSphElementsInit1,
+};
+
+static ColliderJntSphElementInit sJntSphElementsInit2[] = {
+ {
+ {
+ ELEM_MATERIAL_UNK2,
+ { 0xFFCFFFFF, 0x00, 0x40 },
+ { 0xFFDFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 15, { { 0, 0, 0 }, 45 }, 100 },
+ },
+ {
+ {
+ ELEM_MATERIAL_UNK2,
+ { 0xFFCFFFFF, 0x00, 0x40 },
+ { 0xFFDFFFFF, 0x00, 0x00 },
+ ATELEM_ON | ATELEM_SFX_NORMAL,
+ ACELEM_ON,
+ OCELEM_ON,
+ },
+ { 16, { { 0, 0, 0 }, 45 }, 100 },
+ },
+};
+
+static ColliderJntSphInit sJntSphInit2 = {
+ {
+ COL_MATERIAL_METAL,
+ AT_ON | AT_TYPE_ENEMY,
+ AC_ON | AC_TYPE_PLAYER,
+ OC1_ON | OC1_TYPE_PLAYER,
+ OC2_TYPE_1,
+ COLSHAPE_JNTSPH,
+ },
+ ARRAY_COUNT(sJntSphElementsInit2),
+ sJntSphElementsInit2,
+};
+
+static Vec3f D_8090EB20;
+
+static EnZl3* sZelda;
+
+static Actor* D_8090EB30;
+
+// unused
+static UNK_TYPE D_8090EB34;
+
+static BossGanon2Effect sEffects[BOSS_GANON2_EFFECT_COUNT];
+
+static s32 sSeed1;
+static s32 sSeed2;
+static s32 sSeed3;
+
+// unused
+static UNK_TYPE D_809105DC;
+
+static Vec3f D_809105D8[4];
+
+static Vec3f D_80910608[4];
+
+static s8 D_80910638;
void BossGanon2_InitRand(s32 seedInit0, s32 seedInit1, s32 seedInit2) {
sSeed1 = seedInit0;
@@ -81,7 +381,7 @@ void BossGanon2_SetObjectSegment(BossGanon2* this, PlayState* play, s32 objectId
s32 pad;
s32 objectSlot = Object_GetSlot(&play->objectCtx, objectId);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
if (setRSPSegment) {
OPEN_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 790);
@@ -1044,7 +1344,7 @@ void func_808FFDB0(BossGanon2* this, PlayState* play) {
s32 objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GANON2);
if (Object_IsLoaded(&play->objectCtx, objectSlot)) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
Animation_MorphToLoop(&this->skelAnime, &gGanonGuardIdleAnim, -10.0f);
this->actionFunc = func_808FFEBC;
@@ -1448,12 +1748,18 @@ void func_80901020(BossGanon2* this, PlayState* play) {
void func_8090109C(BossGanon2* this, PlayState* play) {
u8 i;
+ Vec3f velocity;
+ Vec3f accel;
+#if OOT_VERSION < PAL_1_0
+ Color_RGBA8 sPrimColor = { 120, 0, 0, 255 };
+ Color_RGBA8 sEnvColor = { 120, 0, 0, 255 };
+#else
+ static Color_RGBA8 sPrimColor = { 0, 120, 0, 255 };
+ static Color_RGBA8 sEnvColor = { 0, 120, 0, 255 };
+#endif
+ Vec3f pos;
for (i = 0; i < 70; i++) {
- Vec3f velocity;
- Vec3f accel;
- Vec3f pos;
-
velocity.x = Rand_CenteredFloat(50.0f);
velocity.y = Rand_CenteredFloat(10.0f) + 5.0f;
velocity.z = Rand_CenteredFloat(50.0f);
@@ -1467,6 +1773,18 @@ void func_8090109C(BossGanon2* this, PlayState* play) {
}
}
+static Vec3f D_8090702C[] = {
+ { 10.0f, -10.0f, 0.0f },
+ { 0.0f, 0.0f, -60.0f },
+ { 70.0f, -30.0f, 10.0f },
+};
+
+static Vec3f D_80907050[] = {
+ { -20.0f, 0.0f, 0.0f },
+ { -15.0f, 0.0f, 10.0f },
+ { -16.0f, -12.0f, 40.0f },
+};
+
void func_8090120C(BossGanon2* this, PlayState* play) {
Player* player;
f32 temp_f14;
@@ -1859,7 +2177,8 @@ void func_80902348(BossGanon2* this, PlayState* play) {
phi_v0_2 = 0;
}
- func_8002F6D4(play, &this->actor, 15.0f, this->actor.yawTowardsPlayer + phi_v0_2, 2.0f, 0);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 15.0f, this->actor.yawTowardsPlayer + phi_v0_2, 2.0f,
+ 0);
sZelda->unk_3C8 = 8;
this->unk_316 = 10;
break;
@@ -1874,13 +2193,18 @@ void func_80902348(BossGanon2* this, PlayState* play) {
temp_f2 = -200.0f - player->actor.world.pos.x;
temp_f12 = -200.0f - player->actor.world.pos.z;
- if (sqrtf(SQ(temp_f2) + SQ(temp_f12)) > 784.0f) {
+#if OOT_VERSION < PAL_1_0
+ if (sqrtf(SQ(temp_f2) + SQ(temp_f12)) > 800.0f)
+#else
+ if (sqrtf(SQ(temp_f2) + SQ(temp_f12)) > 784.0f)
+#endif
+ {
for (j = 0; j < PLAYER_BODYPART_MAX; j++) {
player->bodyFlameTimers[j] = Rand_S16Offset(0, 200);
}
player->bodyIsBurning = true;
- func_8002F6D4(play, &this->actor, 10.0f, Math_Atan2S(temp_f12, temp_f2), 0.0f, 0x10);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 10.0f, Math_Atan2S(temp_f12, temp_f2), 0.0f, 0x10);
sZelda->unk_3C8 = 8;
}
}
@@ -1966,6 +2290,8 @@ void BossGanon2_CollisionCheck(BossGanon2* this, PlayState* play) {
}
}
+static s16 D_80907074[] = { 0, 1, 2, 2, 1, 0 };
+
void BossGanon2_Update(Actor* thisx, PlayState* play) {
BossGanon2* this = (BossGanon2*)thisx;
s32 pad;
@@ -2204,6 +2530,11 @@ void BossGanon2_Update(Actor* thisx, PlayState* play) {
BossGanon2_UpdateEffects(this, play);
}
+static s16 D_80907080 = 0;
+
+static u8 D_80907084[] = { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 };
+static u8 D_80907090[] = { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 };
+
void func_809034E4(Vec3f* arg0, Vec3f* arg1) {
Vtx* vtx;
Vec3f sp2D0;
@@ -2435,7 +2766,11 @@ void func_80904108(BossGanon2* this, PlayState* play) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 200, 0, (s8)this->unk_324);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 128);
Matrix_Translate(-200.0f, 1086.0f, -200.0f, MTXMODE_NEW);
+#if OOT_VERSION < PAL_1_0
+ Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
+#else
Matrix_Scale(0.098000005f, 0.1f, 0.098000005f, MTXMODE_APPLY);
+#endif
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, gameState->gfxCtx, "../z_boss_ganon2.c", 5183);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanonFireRingDL));
Matrix_Pop();
@@ -2545,6 +2880,25 @@ s32 BossGanon2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec
return 0;
}
+static s8 D_8090709C[] = {
+ 0xFF, 0xFF, 0x01, 0xFF, 0x03, 0x04, 0xFF, 0xFF, 0x05, 0xFF, 0x06, 0x07, 0xFF, 0xFF, 0x08, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x00, 0xFF, 0xFF, 0x02, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0x00,
+};
+
+static s8 D_809070CC[] = {
+ 0xFF, 0xFF, 0x01, 0xFF, 0x03, 0x04, 0xFF, 0xFF, 0x05, 0xFF, 0x06, 0x07, 0xFF, 0xFF, 0x08, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x00, 0xFF, 0xFF, 0x02, 0x0C, 0x0D, 0x0E, 0x09, 0x0A, 0x0B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
+};
+
+static Vec3f D_809070FC = { 0.0f, 0.0f, 5000.0f };
+static Vec3f D_80907108 = { 0.0f, 2000.0f, 0.0f };
+static Vec3f D_80907114 = { 0.0f, 2000.0f, 0.0f };
+static Vec3f D_80907120 = { 0.0f, 0.0f, 17000.0f };
+static Vec3f D_8090712C = { 0.0f, 0.0f, 3000.0f };
+static Vec3f D_80907138 = { 0.0f, 0.0f, 0.0f };
+
void BossGanon2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
s8 pad;
s8 temp_v0;
@@ -2703,6 +3057,13 @@ void func_8090523C(BossGanon2* this, PlayState* play) {
CLOSE_DISPS(gameState->gfxCtx, "../z_boss_ganon2.c", 5725);
}
+static s8 D_80907144[] = {
+ 0xFF, 0xFF, 0x01, 0xFF, 0x03, 0x04, 0x05, 0xFF, 0x06, 0x07, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0x02, 0x0C, 0x0D, 0x0E, 0x09, 0x0A, 0x0B, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
+};
+
+static Vec3f D_80907164 = { 800.0f, 420.0f, 100.0f };
+
void BossGanon2_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
s8 temp_v1 = D_80907144[limbIndex];
BossGanon2* this = (BossGanon2*)thisx;
@@ -2748,6 +3109,14 @@ void func_80905674(BossGanon2* this, PlayState* play) {
}
}
+static void* sEyeTextures[] = {
+ gGanonEyeOpenTex,
+ gGanonEyeHalfTex,
+ gGanonEyeClosedTex,
+};
+
+static Vec3f D_8090717C = { 0.0f, -2000.0f, 0.0f };
+
void BossGanon2_Draw(Actor* thisx, PlayState* play) {
void* shadowTexture = GRAPH_ALLOC(play->state.gfxCtx, 4096);
BossGanon2* this = (BossGanon2*)thisx;
@@ -2961,6 +3330,13 @@ void BossGanon2_DrawEffects(PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 6185);
}
+static s16 D_80907188[] = { 1, 2, 3, 3, 2, 1 };
+static s16 D_80907194[] = { 2, 3, 4, 4, 4, 3, 2 };
+static s16 D_809071A4[] = { 2, 3, 4, 4, 4, 4, 3, 2 };
+static s16 D_809071B4[] = { 2, 4, 5, 5, 6, 6, 6, 6, 5, 5, 4, 2 };
+static s16 D_809071CC[] = { 1, -1, 1, 1, 3, 4, 1, 6, 7, 2, 9, 10, 2, 12, 13 };
+static u8 D_809071EC[] = { 3, 2, 2, 1, 3, 3, 1, 3, 3, 1, 0, 3, 1, 0, 3 };
+
void func_80906538(BossGanon2* this, u8* shadowTexture, f32 arg2) {
s16 temp_t0;
s16 temp_v0;
@@ -3080,3 +3456,8 @@ void BossGanon2_DrawShadowTexture(void* shadowTexture, BossGanon2* this, PlaySta
CLOSE_DISPS(gfxCtx, "../z_boss_ganon2.c", 6479);
}
+
+// padding
+static u32 D_809071FC[2] = { 0 };
+
+#include "assets/overlays/ovl_Boss_Ganon2/ovl_Boss_Ganon2.c"
diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h
index 4c4c6f6fbe..c72fbd1e25 100644
--- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h
+++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h
@@ -2,11 +2,11 @@
#define Z_BOSS_GANON2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BossGanon2;
-typedef void (*BossGanon2ActionFunc)(struct BossGanon2*, PlayState*);
+typedef void (*BossGanon2ActionFunc)(struct BossGanon2*, struct PlayState*);
typedef enum GanonLimb {
/* 0 */ GANON_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2_data.inc.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2_data.inc.c
deleted file mode 100644
index a67c0e560a..0000000000
--- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2_data.inc.c
+++ /dev/null
@@ -1,358 +0,0 @@
-#include "z_boss_ganon2.h"
-#include "overlays/actors/ovl_En_Zl3/z_en_zl3.h"
-#include "assets/objects/object_ganon2/object_ganon2.h"
-
-#define BOSS_GANON2_EFFECT_COUNT 100
-
-typedef struct BossGanon2Effect {
- /* 0x00 */ u8 type;
- /* 0x01 */ u8 unk_01;
- /* 0x04 */ Vec3f position;
- /* 0x10 */ Vec3f velocity;
- /* 0x1C */ Vec3f accel;
- /* 0x28 */ char unk_28[0x6];
- /* 0x2E */ s16 unk_2E;
- /* 0x30 */ char unk_30[0x4];
- /* 0x34 */ f32 scale;
- /* 0x38 */ Vec3f unk_38;
-} BossGanon2Effect; // size = 0x44
-
-static Vec3f D_80906D60 = { 0.0f, 0.0f, 0.0f };
-
-static Vec3f D_80906D6C = { 0.0f, 0.0f, 500.0f };
-
-static u8 D_80906D78 = 0;
-
-static ColliderJntSphElementInit sJntSphItemsInit1[] = {
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 0, { { 0, 0, 0 }, 30 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 1, { { 0, 0, 0 }, 30 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 2, { { 0, 0, 0 }, 30 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 3, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 4, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 5, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 6, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 7, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 8, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 9, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 10, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 11, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 12, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 13, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x10 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 14, { { 0, 0, 0 }, 20 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x00, 0x00 },
- { 0xFFCFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 15, { { 0, 0, 0 }, 30 }, 100 },
- },
-};
-
-static ColliderJntSphInit sJntSphInit1 = {
- {
- COL_MATERIAL_METAL,
- AT_ON | AT_TYPE_ENEMY,
- AC_ON | AC_TYPE_PLAYER,
- OC1_ON | OC1_TYPE_PLAYER,
- OC2_FIRST_ONLY | OC2_TYPE_1,
- COLSHAPE_JNTSPH,
- },
- ARRAY_COUNT(sJntSphItemsInit1),
- sJntSphItemsInit1,
-};
-
-static ColliderJntSphElementInit sJntSphItemsInit2[] = {
- {
- {
- ELEM_MATERIAL_UNK2,
- { 0xFFCFFFFF, 0x00, 0x40 },
- { 0xFFDFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 15, { { 0, 0, 0 }, 45 }, 100 },
- },
- {
- {
- ELEM_MATERIAL_UNK2,
- { 0xFFCFFFFF, 0x00, 0x40 },
- { 0xFFDFFFFF, 0x00, 0x00 },
- ATELEM_ON | ATELEM_SFX_NORMAL,
- ACELEM_ON,
- OCELEM_ON,
- },
- { 16, { { 0, 0, 0 }, 45 }, 100 },
- },
-};
-
-static ColliderJntSphInit sJntSphInit2 = {
- {
- COL_MATERIAL_METAL,
- AT_ON | AT_TYPE_ENEMY,
- AC_ON | AC_TYPE_PLAYER,
- OC1_ON | OC1_TYPE_PLAYER,
- OC2_TYPE_1,
- COLSHAPE_JNTSPH,
- },
- ARRAY_COUNT(sJntSphItemsInit2),
- sJntSphItemsInit2,
-};
-
-static Color_RGBA8 sPrimColor = { 0, 120, 0, 255 };
-
-static Color_RGBA8 sEnvColor = { 0, 120, 0, 255 };
-
-static Vec3f D_8090702C[] = {
- { 10.0f, -10.0f, 0.0f },
- { 0.0f, 0.0f, -60.0f },
- { 70.0f, -30.0f, 10.0f },
-};
-
-static Vec3f D_80907050[] = {
- { -20.0f, 0.0f, 0.0f },
- { -15.0f, 0.0f, 10.0f },
- { -16.0f, -12.0f, 40.0f },
-};
-
-static s16 D_80907074[] = { 0, 1, 2, 2, 1, 0 };
-
-static s16 D_80907080 = 0;
-
-static u8 D_80907084[] = { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 };
-
-static u8 D_80907090[] = { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 };
-
-static s8 D_8090709C[] = {
- 0xFF, 0xFF, 0x01, 0xFF, 0x03, 0x04, 0xFF, 0xFF, 0x05, 0xFF, 0x06, 0x07, 0xFF, 0xFF, 0x08, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x00, 0xFF, 0xFF, 0x02, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0x00,
-};
-
-static s8 D_809070CC[] = {
- 0xFF, 0xFF, 0x01, 0xFF, 0x03, 0x04, 0xFF, 0xFF, 0x05, 0xFF, 0x06, 0x07, 0xFF, 0xFF, 0x08, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0x00, 0xFF, 0xFF, 0x02, 0x0C, 0x0D, 0x0E, 0x09, 0x0A, 0x0B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
-};
-
-static Vec3f D_809070FC = { 0.0f, 0.0f, 5000.0f };
-
-static Vec3f D_80907108 = { 0.0f, 2000.0f, 0.0f };
-
-static Vec3f D_80907114 = { 0.0f, 2000.0f, 0.0f };
-
-static Vec3f D_80907120 = { 0.0f, 0.0f, 17000.0f };
-
-static Vec3f D_8090712C = { 0.0f, 0.0f, 3000.0f };
-
-static Vec3f D_80907138 = { 0.0f, 0.0f, 0.0f };
-
-static s8 D_80907144[] = {
- 0xFF, 0xFF, 0x01, 0xFF, 0x03, 0x04, 0x05, 0xFF, 0x06, 0x07, 0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0x02, 0x0C, 0x0D, 0x0E, 0x09, 0x0A, 0x0B, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
-};
-
-static Vec3f D_80907164 = { 800.0f, 420.0f, 100.0f };
-
-static void* sEyeTextures[] = {
- gGanonEyeOpenTex,
- gGanonEyeHalfTex,
- gGanonEyeClosedTex,
-};
-
-static Vec3f D_8090717C = { 0.0f, -2000.0f, 0.0f };
-
-static s16 D_80907188[] = { 1, 2, 3, 3, 2, 1 };
-
-static s16 D_80907194[] = { 2, 3, 4, 4, 4, 3, 2 };
-
-static s16 D_809071A4[] = { 2, 3, 4, 4, 4, 4, 3, 2 };
-
-static s16 D_809071B4[] = { 2, 4, 5, 5, 6, 6, 6, 6, 5, 5, 4, 2 };
-
-static s16 D_809071CC[] = { 1, -1, 1, 1, 3, 4, 1, 6, 7, 2, 9, 10, 2, 12, 13 };
-
-static u8 D_809071EC[] = { 3, 2, 2, 1, 3, 3, 1, 3, 3, 1, 0, 3, 1, 0, 3 };
-
-// padding
-static u32 D_809071FC[2] = { 0 };
-
-#include "assets/overlays/ovl_Boss_Ganon2/ovl_Boss_Ganon2.c"
-
-static Vec3f D_8090EB20;
-
-static EnZl3* sZelda;
-
-static Actor* D_8090EB30;
-
-// unused
-static UNK_TYPE D_8090EB34;
-
-static BossGanon2Effect sEffects[BOSS_GANON2_EFFECT_COUNT];
-
-static s32 sSeed1;
-static s32 sSeed2;
-static s32 sSeed3;
-
-// unused
-static UNK_TYPE D_809105DC;
-
-static Vec3f D_809105D8[4];
-
-static Vec3f D_80910608[4];
-
-static s8 D_80910638;
diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
index 7a8f1a7bf6..848707f002 100644
--- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
+++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
@@ -5,14 +5,37 @@
*/
#include "z_boss_ganondrof.h"
-#include "assets/objects/object_gnd/object_gnd.h"
#include "overlays/actors/ovl_En_fHG/z_en_fhg.h"
#include "overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h"
#include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_gnd/object_gnd.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum BossGanondrofDeathState {
/* 0 */ NOT_DEAD,
@@ -292,10 +315,10 @@ void BossGanondrof_Init(Actor* thisx, PlayState* play) {
BossGanondrof_SetupPaintings(this);
}
- Collider_InitCylinder(play, &this->colliderBody);
- Collider_InitCylinder(play, &this->colliderSpear);
- Collider_SetCylinder(play, &this->colliderBody, &this->actor, &sCylinderInitBody);
- Collider_SetCylinder(play, &this->colliderSpear, &this->actor, &sCylinderInitSpear);
+ Collider_InitCylinder(play, &this->bodyCollider);
+ Collider_InitCylinder(play, &this->spearCollider);
+ Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sCylinderInitBody);
+ Collider_SetCylinder(play, &this->spearCollider, &this->actor, &sCylinderInitSpear);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
if (Flags_GetClear(play, play->roomCtx.curRoom.num)) {
Actor_Kill(&this->actor);
@@ -315,8 +338,8 @@ void BossGanondrof_Destroy(Actor* thisx, PlayState* play) {
PRINTF("DT1\n");
SkelAnime_Free(&this->skelAnime, play);
- Collider_DestroyCylinder(play, &this->colliderBody);
- Collider_DestroyCylinder(play, &this->colliderSpear);
+ Collider_DestroyCylinder(play, &this->bodyCollider);
+ Collider_DestroyCylinder(play, &this->spearCollider);
if (this->actor.params == GND_REAL_BOSS) {
LightContext_RemoveLight(play, &play->lightCtx, this->lightNode);
}
@@ -459,9 +482,9 @@ void BossGanondrof_Paintings(BossGanondrof* this, PlayState* play) {
if (this->flyMode != GND_FLY_PAINTING) {
BossGanondrof_SetupNeutral(this, -20.0f);
this->timers[0] = 100;
- this->colliderBody.dim.radius = 20;
- this->colliderBody.dim.height = 60;
- this->colliderBody.dim.yShift = -33;
+ this->bodyCollider.dim.radius = 20;
+ this->bodyCollider.dim.height = 60;
+ this->bodyCollider.dim.yShift = -33;
Actor_PlaySfx(&this->actor, NA_SE_EN_FANTOM_LAUGH);
this->actor.naviEnemyId = NAVI_ENEMY_PHANTOM_GANON_PHASE_2;
} else {
@@ -748,7 +771,7 @@ void BossGanondrof_Stunned(BossGanondrof* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_FANTOM_DAMAGE2);
}
- this->actor.flags |= ACTOR_FLAG_10;
+ this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
}
PRINTF("TIME0 %d ********************************************\n", this->timers[0]);
@@ -773,7 +796,7 @@ void BossGanondrof_SetupBlock(BossGanondrof* this, PlayState* play) {
}
void BossGanondrof_Block(BossGanondrof* this, PlayState* play) {
- this->colliderBody.base.colMaterial = COL_MATERIAL_METAL;
+ this->bodyCollider.base.colMaterial = COL_MATERIAL_METAL;
SkelAnime_Update(&this->skelAnime);
this->actor.world.pos.x += this->actor.velocity.x;
this->actor.world.pos.z += this->actor.velocity.z;
@@ -802,7 +825,7 @@ void BossGanondrof_Charge(BossGanondrof* this, PlayState* play) {
f32 dxCenter = thisx->world.pos.x - GND_BOSSROOM_CENTER_X;
f32 dzCenter = thisx->world.pos.z - GND_BOSSROOM_CENTER_Z;
- this->colliderBody.base.colMaterial = COL_MATERIAL_METAL;
+ this->bodyCollider.base.colMaterial = COL_MATERIAL_METAL;
SkelAnime_Update(&this->skelAnime);
switch (this->work[GND_ACTION_STATE]) {
case CHARGE_WINDUP:
@@ -1229,13 +1252,13 @@ void BossGanondrof_CollisionCheck(BossGanondrof* this, PlayState* play) {
if (this->work[GND_INVINC_TIMER] != 0) {
this->work[GND_INVINC_TIMER]--;
this->returnCount = 0;
- this->colliderBody.base.acFlags &= ~AC_HIT;
+ this->bodyCollider.base.acFlags &= ~AC_HIT;
} else {
- acHit = this->colliderBody.base.acFlags & AC_HIT;
+ acHit = this->bodyCollider.base.acFlags & AC_HIT;
if ((acHit && ((s8)this->actor.colChkInfo.health > 0)) || (this->returnCount != 0)) {
if (acHit) {
- this->colliderBody.base.acFlags &= ~AC_HIT;
- acHitElem = this->colliderBody.elem.acHitElem;
+ this->bodyCollider.base.acFlags &= ~AC_HIT;
+ acHitElem = this->bodyCollider.elem.acHitElem;
}
if (this->flyMode != GND_FLY_PAINTING) {
if (acHit && (this->actionFunc != BossGanondrof_Stunned) &&
@@ -1297,8 +1320,8 @@ void BossGanondrof_Update(Actor* thisx, PlayState* play) {
BossGanondrof* this = (BossGanondrof*)thisx;
PRINTF("MOVE START %d\n", this->actor.params);
- this->actor.flags &= ~ACTOR_FLAG_10;
- this->colliderBody.base.colMaterial = COL_MATERIAL_HIT3;
+ this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
+ this->bodyCollider.base.colMaterial = COL_MATERIAL_HIT3;
if (this->killActor) {
Actor_Kill(&this->actor);
return;
@@ -1326,20 +1349,20 @@ void BossGanondrof_Update(Actor* thisx, PlayState* play) {
}
PRINTF("MOVE END\n");
- BossGanondrof_SetColliderPos(&this->targetPos, &this->colliderBody);
- BossGanondrof_SetColliderPos(&this->spearTip, &this->colliderSpear);
+ BossGanondrof_SetColliderPos(&this->targetPos, &this->bodyCollider);
+ BossGanondrof_SetColliderPos(&this->spearTip, &this->spearCollider);
if ((this->flyMode == GND_FLY_PAINTING) && !horse->bossGndInPainting) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base);
}
if ((this->actionFunc == BossGanondrof_Stunned) && (this->timers[0] > 1)) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base);
} else if (this->actionFunc == BossGanondrof_Block) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base);
} else if (this->actionFunc == BossGanondrof_Charge) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base);
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base);
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSpear.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->spearCollider.base);
}
this->actor.focus.pos = this->targetPos;
diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h
index 142aea02b6..1fed43e428 100644
--- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h
+++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h
@@ -2,11 +2,12 @@
#define Z_BOSS_GANONDROF_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct BossGanondrof;
-typedef void (*BossGanondrofActionFunc)(struct BossGanondrof*, PlayState*);
+typedef void (*BossGanondrofActionFunc)(struct BossGanondrof*, struct PlayState*);
#define GND_REAL_BOSS 1
#define GND_FAKE_BOSS 10
@@ -97,8 +98,8 @@ typedef struct BossGanondrof {
/* 0x0454 */ f32 rideRotY[30]; // possibly only 25 used
/* 0x04CC */ LightNode* lightNode;
/* 0x04D0 */ LightInfo lightInfo;
- /* 0x04E0 */ ColliderCylinder colliderBody;
- /* 0x052C */ ColliderCylinder colliderSpear;
+ /* 0x04E0 */ ColliderCylinder bodyCollider;
+ /* 0x052C */ ColliderCylinder spearCollider;
} BossGanondrof; // size = 0x0578
#endif
diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c
index 9b52c8a52f..bfd115b535 100644
--- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c
+++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c
@@ -1,10 +1,41 @@
+/*
+ * File: z_boss_goma.c
+ * Overlay: ovl_Boss_Goma
+ * Description: Gohma
+ */
+
#include "z_boss_goma.h"
-#include "assets/objects/object_goma/object_goma.h"
#include "overlays/actors/ovl_En_Goma/z_en_goma.h"
#include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64environment.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_goma/object_goma.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
// IRIS_FOLLOW: gohma looks towards the player (iris rotation)
// BONUS_IFRAMES: gain invincibility frames when the player does something (throwing things?), or
@@ -61,7 +92,7 @@ ActorProfile Boss_Goma_Profile = {
/**/ BossGoma_Draw,
};
-static ColliderJntSphElementInit sColliderJntSphElementInit[13] = {
+static ColliderJntSphElementInit sColliderJntSphElementsInit[13] = {
{
{
ELEM_MATERIAL_UNK3,
@@ -217,7 +248,7 @@ static ColliderJntSphInit sColliderJntSphInit = {
COLSHAPE_JNTSPH,
},
13,
- sColliderJntSphElementInit,
+ sColliderJntSphElementsInit,
};
static u8 sClearPixelTableFirstPass[16 * 16] = {
@@ -357,7 +388,7 @@ void BossGoma_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.health = 10;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderElements);
if (Flags_GetClear(play, play->roomCtx.curRoom.num)) {
Actor_Kill(&this->actor);
@@ -682,7 +713,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) {
// entrance of the boss room
if (fabsf(player->actor.world.pos.x - 150.0f) < 60.0f &&
fabsf(player->actor.world.pos.z - 350.0f) < 60.0f) {
- if (GET_EVENTCHKINF(EVENTCHKINF_70)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GOHMA_BATTLE)) {
BossGoma_SetupEncounterState4(this, play);
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER, 164.72f, -480.0f,
397.68002f, 0, -0x705C, 0, DOORSHUTTER_PARAMS(SHUTTER_GOHMA_BLOCK, 0));
@@ -920,13 +951,13 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) {
if (Animation_OnFrame(&this->skelanime, 40.0f)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_CRY1);
- if (!GET_EVENTCHKINF(EVENTCHKINF_70)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GOHMA_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gGohmaTitleCardTex),
160, 180, 128, 40);
}
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
- SET_EVENTCHKINF(EVENTCHKINF_70);
+ SET_EVENTCHKINF(EVENTCHKINF_BEGAN_GOHMA_BATTLE);
}
if (Animation_OnFrame(&this->skelanime, this->currentAnimFrameCount)) {
@@ -1296,7 +1327,7 @@ void BossGoma_FloorPrepareAttack(BossGoma* this, PlayState* play) {
void BossGoma_FloorAttack(BossGoma* this, PlayState* play) {
s16 i;
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
SkelAnime_Update(&this->skelanime);
switch (this->actionState) {
diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.h b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.h
index 5931f9ca3d..4e4c8ea955 100644
--- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.h
+++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.h
@@ -2,11 +2,11 @@
#define Z_BOSS_GOMA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BossGoma;
-typedef void (*BossGomaActionFunc)(struct BossGoma*, PlayState*);
+typedef void (*BossGomaActionFunc)(struct BossGoma*, struct PlayState*);
typedef enum BossGomaLimb {
/* 0 */ BOSSGOMA_LIMB_NONE,
@@ -150,7 +150,7 @@ typedef struct BossGoma {
/* 0x02A8 */ Vec3f defeatedLimbPositions[100]; // only 85/86 first indices actually used
/* 0x0758 */ u8 deadLimbsState[100]; // only 85/90 first indices actually used
/* 0x07BC */ ColliderJntSph collider;
- /* 0x07DC */ ColliderJntSphElement colliderItems[13];
+ /* 0x07DC */ ColliderJntSphElement colliderElements[13];
} BossGoma; // size = 0x0B1C
#endif
diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
index 7bbc960cce..c12ca1e950 100644
--- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
+++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
@@ -5,14 +5,45 @@
*/
#include "z_boss_mo.h"
-#include "assets/objects/object_mo/object_mo.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "letterbox.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
-#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"
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_mo/object_mo.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#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" \
+ "pal-1.0:128 pal-1.1:128"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
#define MO_WATER_LEVEL(play) play->colCtx.colHeader->waterBoxes[0].ySurface
@@ -361,7 +392,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) {
MO_WATER_LEVEL(play) = -500;
return;
}
- if (GET_EVENTCHKINF(EVENTCHKINF_74)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_MORPHA_BATTLE)) {
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
this->tentMaxAngle = 5.0f;
this->timers[0] = 50;
@@ -380,13 +411,13 @@ void BossMo_Init(Actor* thisx, PlayState* play2) {
} else {
Actor_SetScale(&this->actor, 0.01f);
BossMo_SetupTentacle(this, play);
- this->actor.colChkInfo.mass = 0xFF;
+ this->actor.colChkInfo.mass = MASS_IMMOVABLE;
MO_WATER_LEVEL(play) = -50;
this->waterTexAlpha = 90.0f;
this->actor.world.pos.y = MO_WATER_LEVEL(play);
this->actor.prevPos = this->targetPos = this->actor.world.pos;
Collider_InitJntSph(play, &this->tentCollider);
- Collider_SetJntSph(play, &this->tentCollider, &this->actor, &sJntSphInit, this->tentElements);
+ Collider_SetJntSph(play, &this->tentCollider, &this->actor, &sJntSphInit, this->tentColliderElements);
this->tentMaxAngle = 1.0f;
}
}
@@ -629,7 +660,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
}
break;
case MO_TENT_ATTACK:
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_ATTACK - SFX_FLAG);
Math_ApproachF(&this->waterLevelMod, -5.0f, 0.1f, 0.4f);
for (indS1 = 0; indS1 < 41; indS1++) {
@@ -825,7 +856,8 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
player->actor.parent = NULL;
player->csAction = PLAYER_CSACTION_NONE;
if (this->timers[0] == 0) {
- func_8002F6D4(play, &this->actor, 20.0f, this->actor.shape.rot.y + 0x8000, 10.0f, 0);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 20.0f, this->actor.shape.rot.y + 0x8000,
+ 10.0f, 0);
}
}
this->timers[0] = 75;
@@ -1147,7 +1179,7 @@ void BossMo_TentCollisionCheck(BossMo* this, PlayState* play) {
s16 i2;
ColliderElement* acHitElem;
- for (i1 = 0; i1 < ARRAY_COUNT(this->tentElements); i1++) {
+ for (i1 = 0; i1 < ARRAY_COUNT(this->tentColliderElements); i1++) {
if (this->tentCollider.elements[i1].base.acElemFlags & ACELEM_HIT) {
for (i2 = 0; i2 < 19; i2++) {
@@ -1430,7 +1462,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) {
if (this->timers[2] == 130) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gMorphaTitleCardTex), 160,
180, 128, 40);
- SET_EVENTCHKINF(EVENTCHKINF_74);
+ SET_EVENTCHKINF(EVENTCHKINF_BEGAN_MORPHA_BATTLE);
}
break;
case MO_INTRO_FINISH:
@@ -1743,7 +1775,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) {
s16 i;
Player* player = GET_PLAYER(play);
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("Core_Damage_check START\n");
if (this->coreCollider.base.atFlags & AT_HIT) {
this->coreCollider.base.atFlags &= ~AT_HIT;
@@ -1754,20 +1786,17 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) {
}
if (this->coreCollider.base.acFlags & AC_HIT) {
ColliderElement* acHitElem = this->coreCollider.elem.acHitElem;
- // "hit!!"
- PRINTF("Core_Damage_check 当り!!\n");
+ PRINTF(T("Core_Damage_check 当り!!\n", "Core_Damage_check hit!!\n"));
this->coreCollider.base.acFlags &= ~AC_HIT;
if ((acHitElem->atDmgInfo.dmgFlags & DMG_MAGIC_FIRE) && (this->work[MO_TENT_ACTION_STATE] == MO_CORE_ATTACK)) {
this->work[MO_TENT_ACTION_STATE] = MO_CORE_RETREAT;
}
- // "hit 2 !!"
- PRINTF("Core_Damage_check 当り 2 !!\n");
+ PRINTF(T("Core_Damage_check 当り 2 !!\n", "Core_Damage_check hit 2 !!\n"));
if ((this->work[MO_TENT_ACTION_STATE] != MO_CORE_UNDERWATER) && (this->work[MO_TENT_INVINC_TIMER] == 0)) {
u8 damage = CollisionCheck_GetSwordDamage(acHitElem->atDmgInfo.dmgFlags);
if ((damage != 0) && (this->work[MO_TENT_ACTION_STATE] < MO_CORE_ATTACK)) {
- // "sword hit !!"
- PRINTF("Core_Damage_check 剣 当り!!\n");
+ PRINTF(T("Core_Damage_check 剣 当り!!\n", "Core_Damage_check sword hit!!\n"));
this->work[MO_TENT_ACTION_STATE] = MO_CORE_STUNNED;
this->timers[0] = 25;
@@ -1837,9 +1866,8 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) {
}
}
}
- // "end !!"
- PRINTF("Core_Damage_check 終わり !!\n");
- PRINTF(VT_RST);
+ PRINTF(T("Core_Damage_check 終わり !!\n", "Core_Damage_check end !!\n"));
+ PRINTF_RST();
}
void BossMo_Core(BossMo* this, PlayState* play) {
@@ -2230,7 +2258,7 @@ void BossMo_UpdateCore(Actor* thisx, PlayState* play) {
} else {
MO_WATER_LEVEL(play) = sMorphaTent2->waterLevelMod + ((s16)this->waterLevel + sMorphaTent1->waterLevelMod);
}
- this->actor.flags |= ACTOR_FLAG_9;
+ this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR;
this->actor.focus.pos = this->actor.world.pos;
this->work[MO_TENT_VAR_TIMER]++;
diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h
index 1b7641817e..88867ceeda 100644
--- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h
+++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h
@@ -2,11 +2,11 @@
#define Z_BOSS_MO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BossMo;
-typedef void (*BossMoActionFunc)(struct BossMo*, PlayState*);
+typedef void (*BossMoActionFunc)(struct BossMo*, struct PlayState*);
typedef enum BossMoTentS16Var {
/* 0 */ MO_TENT_ACTION_STATE,
@@ -124,7 +124,7 @@ typedef struct BossMo {
/* 0x100C */ f32 subCamYawShake;
/* 0x1010 */ Vec3f tentTipPos;
/* 0x101C */ ColliderJntSph tentCollider;
- /* 0x103C */ ColliderJntSphElement tentElements[19];
+ /* 0x103C */ ColliderJntSphElement tentColliderElements[19];
/* 0x14FC */ ColliderCylinder coreCollider;
/* 0x1548 */ char unk_1548[0x44];
} BossMo; // size = 0x158C
diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo_colchk.inc.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo_colchk.inc.c
index 58d807607c..1148cf1a99 100644
--- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo_colchk.inc.c
+++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo_colchk.inc.c
@@ -1,5 +1,4 @@
-#include "global.h"
-#include "z_boss_mo.h"
+#include "z64collision_check.h"
static ColliderJntSphElementInit sJntSphElementsInit[19] = {
{
diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c
index 07b74f7ddb..89ba5fab34 100644
--- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c
+++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c
@@ -5,15 +5,39 @@
*/
#include "z_boss_sst.h"
-#include "versions.h"
-#include "assets/objects/object_sst/object_sst.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
-#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"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10)
+#include "assets/objects/object_sst/object_sst.h"
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+
+#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
+ "ique-cn:128 pal-1.0:128 pal-1.1:128"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)
#define vParity actionVar
#define vVanish actionVar
@@ -271,7 +295,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) {
BossSst* this = (BossSst*)thisx;
Actor_ProcessInitChain(&this->actor, sInitChain);
- Collider_InitCylinder(play, &this->colliderCyl);
+ Collider_InitCylinder(play, &this->colliderCylinder);
Collider_InitJntSph(play, &this->colliderJntSph);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
Flags_SetSwitch(play, 0x14);
@@ -281,8 +305,8 @@ void BossSst_Init(Actor* thisx, PlayState* play2) {
SkelAnime_InitFlex(play, &this->skelAnime, &gBongoHeadSkel, &gBongoHeadEyeOpenIdleAnim, this->jointTable,
this->morphTable, 45);
ActorShape_Init(&this->actor.shape, 70000.0f, ActorShadow_DrawCircle, 95.0f);
- Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHead, this->colliderItems);
- Collider_SetCylinder(play, &this->colliderCyl, &this->actor, &sCylinderInitHead);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHead, this->colliderJntSphElements);
+ Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInitHead);
sHead = this;
this->actor.world.pos.x = ROOM_CENTER_X + 50.0f;
this->actor.world.pos.y = ROOM_CENTER_Y + 0.0f;
@@ -314,8 +338,8 @@ void BossSst_Init(Actor* thisx, PlayState* play2) {
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_BOSS);
}
} else {
- Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHand, this->colliderItems);
- Collider_SetCylinder(play, &this->colliderCyl, &this->actor, &sCylinderInitHand);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHand, this->colliderJntSphElements);
+ Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInitHand);
if (this->actor.params == BONGO_LEFT_HAND) {
SkelAnime_InitFlex(play, &this->skelAnime, &gBongoLeftHandSkel, &gBongoLeftHandIdleAnim, this->jointTable,
this->morphTable, 27);
@@ -340,7 +364,7 @@ void BossSst_Destroy(Actor* thisx, PlayState* play) {
BossSst* this = (BossSst*)thisx;
Collider_DestroyJntSph(play, &this->colliderJntSph);
- Collider_DestroyCylinder(play, &this->colliderCyl);
+ Collider_DestroyCylinder(play, &this->colliderCylinder);
Audio_StopSfxByPos(&this->center);
}
@@ -380,7 +404,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) {
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT);
Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE);
Math_Vec3f_Copy(&sSubCamAt, &player->actor.world.pos);
- if (GET_EVENTCHKINF(EVENTCHKINF_77)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) {
sSubCamEye.z = ROOM_CENTER_Z - 100.0f;
}
@@ -416,7 +440,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_WAIT);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE);
Play_ClearCamera(play, sSubCamId);
- SET_EVENTCHKINF(EVENTCHKINF_77);
+ SET_EVENTCHKINF(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE);
BossSst_HeadSetupNeutral(this);
this->colliderJntSph.base.ocFlags1 |= OC1_ON;
sHands[LEFT]->colliderJntSph.base.ocFlags1 |= OC1_ON;
@@ -439,7 +463,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
this->ready = true;
Rumble_Request(this->actor.xyzDistToPlayerSq, 255, 20, 150);
Actor_PlaySfx(&sFloor->dyna.actor, NA_SE_EN_SHADEST_TAIKO_HIGH);
- } else if (GET_EVENTCHKINF(EVENTCHKINF_77)) {
+ } else if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) {
//! @bug This condition assumes that the second bounce on the ground will occur before frame 545 on the
//! timer. However, it is possible to delay Player's descent to the ground by, for example, jumpslashing
//! on the last possible frame before the cutscene takes control. This delays Player's fall to the
@@ -572,7 +596,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
}
if (this->timer <= 198) {
revealStateTimer = 198 - this->timer;
- if (GET_EVENTCHKINF(EVENTCHKINF_77) && (revealStateTimer <= 44)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE) && (revealStateTimer <= 44)) {
sSubCamAt.x += 492.0f * 0.01f;
sSubCamAt.y += 200.0f * 0.01f;
sSubCamEye.x -= 80.0f * 0.01f;
@@ -601,7 +625,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
sSubCamEye.y += 125.0f * 0.01f;
sSubCamEye.z -= 350.0f * 0.01f;
} else if (revealStateTimer == 85) {
- if (!GET_EVENTCHKINF(EVENTCHKINF_77)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gBongoTitleCardTex),
160, 180, 128, 40);
}
@@ -702,7 +726,7 @@ void BossSst_HeadDamagedHand(BossSst* this, PlayState* play) {
void BossSst_HeadSetupReadyCharge(BossSst* this) {
Animation_MorphToLoop(&this->skelAnime, &gBongoHeadEyeOpenIdleAnim, -5.0f);
this->actor.speed = 0.0f;
- this->colliderCyl.base.acFlags |= AC_ON;
+ this->colliderCylinder.base.acFlags |= AC_ON;
this->actionFunc = BossSst_HeadReadyCharge;
}
@@ -769,7 +793,7 @@ void BossSst_HeadCharge(BossSst* this, PlayState* play) {
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
sHands[LEFT]->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
sHands[RIGHT]->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
- func_8002F71C(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
}
}
@@ -778,7 +802,7 @@ void BossSst_HeadSetupEndCharge(BossSst* this) {
Animation_MorphToLoop(&this->skelAnime, &gBongoHeadEyeCloseIdleAnim, -20.0f);
this->targetYaw = Actor_WorldYawTowardPoint(&this->actor, &sRoomCenter);
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
- this->colliderCyl.base.acFlags &= ~AC_ON;
+ this->colliderCylinder.base.acFlags &= ~AC_ON;
this->radius *= -1.0f;
this->actionFunc = BossSst_HeadEndCharge;
}
@@ -795,7 +819,7 @@ void BossSst_HeadEndCharge(BossSst* this, PlayState* play) {
void BossSst_HeadSetupFrozenHand(BossSst* this) {
Animation_MorphToLoop(&this->skelAnime, &gBongoHeadEyeOpenIdleAnim, -5.0f);
this->ready = false;
- this->colliderCyl.base.acFlags |= AC_ON;
+ this->colliderCylinder.base.acFlags |= AC_ON;
this->actionFunc = BossSst_HeadFrozenHand;
}
@@ -808,7 +832,7 @@ void BossSst_HeadFrozenHand(BossSst* this, PlayState* play) {
void BossSst_HeadSetupUnfreezeHand(BossSst* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadEyeCloseAnim, -5.0f);
- this->colliderCyl.base.acFlags &= ~AC_ON;
+ this->colliderCylinder.base.acFlags &= ~AC_ON;
this->actionFunc = BossSst_HeadUnfreezeHand;
}
@@ -823,7 +847,7 @@ void BossSst_HeadSetupStunned(BossSst* this) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA,
Animation_GetLastFrame(&gBongoHeadKnockoutAnim));
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
- this->colliderCyl.base.acFlags &= ~AC_ON;
+ this->colliderCylinder.base.acFlags &= ~AC_ON;
this->vVanish = false;
this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS;
BossSst_HeadSfx(this, NA_SE_EN_SHADEST_FREEZE);
@@ -875,8 +899,8 @@ void BossSst_HeadStunned(BossSst* this, PlayState* play) {
void BossSst_HeadSetupVulnerable(BossSst* this) {
Animation_MorphToLoop(&this->skelAnime, &gBongoHeadStunnedAnim, -5.0f);
- this->colliderCyl.base.acFlags |= AC_ON;
- this->colliderCyl.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_DEKU_STICK;
+ this->colliderCylinder.base.acFlags |= AC_ON;
+ this->colliderCylinder.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_DEKU_STICK;
this->actor.speed = 0.0f;
this->colliderJntSph.elements[10].base.acElemFlags |= (ACELEM_ON | ACELEM_HOOKABLE);
this->colliderJntSph.elements[0].base.acElemFlags &= ~ACELEM_ON;
@@ -893,7 +917,7 @@ void BossSst_HeadVulnerable(BossSst* this, PlayState* play) {
Math_StepToF(&sHandOffsets[RIGHT].z, 600.0f, 20.0f);
Math_StepToF(&sHandOffsets[LEFT].x, 200.0f, 20.0f);
Math_StepToF(&sHandOffsets[RIGHT].x, -200.0f, 20.0f);
- if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) {
+ if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
this->timer += 2;
this->timer = CLAMP_MAX(this->timer, 50);
} else {
@@ -917,7 +941,7 @@ void BossSst_HeadSetupDamage(BossSst* this) {
Animation_GetLastFrame(&gBongoHeadDamageAnim));
Actor_SetColorFilter(&sHands[RIGHT]->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA,
Animation_GetLastFrame(&gBongoHeadDamageAnim));
- this->colliderCyl.base.acFlags &= ~AC_ON;
+ this->colliderCylinder.base.acFlags &= ~AC_ON;
BossSst_HeadSfx(this, NA_SE_EN_SHADEST_DAMAGE);
this->actionFunc = BossSst_HeadDamage;
}
@@ -934,8 +958,8 @@ void BossSst_HeadDamage(BossSst* this, PlayState* play) {
void BossSst_HeadSetupRecover(BossSst* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadRecoverAnim, -5.0f);
- this->colliderCyl.base.acFlags &= ~AC_ON;
- this->colliderCyl.elem.acDmgInfo.dmgFlags = DMG_DEFAULT;
+ this->colliderCylinder.base.acFlags &= ~AC_ON;
+ this->colliderCylinder.elem.acDmgInfo.dmgFlags = DMG_DEFAULT;
this->colliderJntSph.elements[10].base.acElemFlags &= ~(ACELEM_ON | ACELEM_HOOKABLE);
this->colliderJntSph.elements[0].base.acElemFlags |= ACELEM_ON;
this->vVanish = true;
@@ -1021,7 +1045,7 @@ void BossSst_HeadSetupDeath(BossSst* this, PlayState* play) {
Actor_SetColorFilter(&sHands[LEFT]->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 60);
Actor_SetColorFilter(&sHands[RIGHT]->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 60);
this->timer = 60;
- this->colliderCyl.base.acFlags &= ~AC_ON;
+ this->colliderCylinder.base.acFlags &= ~AC_ON;
this->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
sHands[LEFT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
sHands[RIGHT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
@@ -1511,9 +1535,9 @@ void BossSst_HandSlam(BossSst* this, PlayState* play) {
this->ready = true;
Actor_PlaySfx(&this->actor, NA_SE_EN_SHADEST_TAIKO_LOW);
BossSst_SpawnShockwave(this);
- this->colliderCyl.base.atFlags |= AT_ON;
- Collider_UpdateCylinder(&this->actor, &this->colliderCyl);
- this->colliderCyl.dim.radius = sCylinderInitHand.dim.radius;
+ this->colliderCylinder.base.atFlags |= AT_ON;
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinder);
+ this->colliderCylinder.dim.radius = sCylinderInitHand.dim.radius;
}
}
@@ -1524,7 +1548,7 @@ void BossSst_HandSlam(BossSst* this, PlayState* play) {
player->actor.world.pos.z = (Math_CosS(this->actor.yawTowardsPlayer) * 100.0f) + this->actor.world.pos.z;
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
- func_8002F71C(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 0.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 0.0f);
}
Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x200);
@@ -1584,7 +1608,8 @@ void BossSst_HandSweep(BossSst* this, PlayState* play) {
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
this->ready = true;
- func_8002F71C(play, &this->actor, 5.0f, this->actor.shape.rot.y - (this->vParity * 0x3800), 0.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f,
+ this->actor.shape.rot.y - (this->vParity * 0x3800), 0.0f);
Player_PlaySfx(player, NA_SE_PL_BODY_HIT);
newTargetYaw = this->actor.shape.rot.y - (this->vParity * 0x1400);
if (((s16)(newTargetYaw - this->targetYaw) * this->vParity) > 0) {
@@ -1643,7 +1668,7 @@ void BossSst_HandPunch(BossSst* this, PlayState* play) {
BossSst_HandSetupRetreat(this);
} else if (this->colliderJntSph.base.atFlags & AT_HIT) {
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
- func_8002F71C(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
BossSst_HandSetupRetreat(this);
}
@@ -1961,7 +1986,7 @@ void BossSst_HandSwing(BossSst* this, PlayState* play) {
BossSst_HandReleasePlayer(this, play, false);
player->actor.world.pos.x += 70.0f * Math_SinS(this->actor.shape.rot.y);
player->actor.world.pos.z += 70.0f * Math_CosS(this->actor.shape.rot.y);
- func_8002F71C(play, &this->actor, 15.0f, this->actor.shape.rot.y, 2.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 15.0f, this->actor.shape.rot.y, 2.0f);
Player_PlaySfx(player, NA_SE_PL_BODY_HIT);
}
@@ -2083,7 +2108,7 @@ void BossSst_HandReadyCharge(BossSst* this, PlayState* play) {
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
OTHER_HAND(this)->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
sHead->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
- func_8002F71C(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
}
}
@@ -2433,7 +2458,7 @@ void BossSst_HandReleasePlayer(BossSst* this, PlayState* play, s32 dropPlayer) {
this->colliderJntSph.base.ocFlags1 |= OC1_ON;
OTHER_HAND(this)->colliderJntSph.base.ocFlags1 |= OC1_ON;
if (dropPlayer) {
- func_8002F71C(play, &this->actor, 0.0f, this->actor.shape.rot.y, 0.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 0.0f, this->actor.shape.rot.y, 0.0f);
}
}
}
@@ -2556,8 +2581,8 @@ void BossSst_HandCollisionCheck(BossSst* this, PlayState* play) {
}
void BossSst_HeadCollisionCheck(BossSst* this, PlayState* play) {
- if (this->colliderCyl.base.acFlags & AC_HIT) {
- this->colliderCyl.base.acFlags &= ~AC_HIT;
+ if (this->colliderCylinder.base.acFlags & AC_HIT) {
+ this->colliderCylinder.base.acFlags &= ~AC_HIT;
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actionFunc == BossSst_HeadVulnerable) {
if (Actor_ApplyDamage(&this->actor) == 0) {
@@ -2589,13 +2614,13 @@ void BossSst_UpdateHand(Actor* thisx, PlayState* play) {
BossSst* this = (BossSst*)thisx;
BossSstHandTrail* trail;
- if (this->colliderCyl.base.atFlags & AT_ON) {
+ if (this->colliderCylinder.base.atFlags & AT_ON) {
if ((this->effects[0].move < 5) ||
(this->actor.xzDistToPlayer < ((this->effects[2].scale * 0.01f) * sCylinderInitHand.dim.radius)) ||
- (this->colliderCyl.base.atFlags & AT_HIT)) {
- this->colliderCyl.base.atFlags &= ~(AT_ON | AT_HIT);
+ (this->colliderCylinder.base.atFlags & AT_HIT)) {
+ this->colliderCylinder.base.atFlags &= ~(AT_ON | AT_HIT);
} else {
- this->colliderCyl.dim.radius = (this->effects[0].scale * 0.01f) * sCylinderInitHand.dim.radius;
+ this->colliderCylinder.dim.radius = (this->effects[0].scale * 0.01f) * sCylinderInitHand.dim.radius;
}
}
@@ -2622,8 +2647,8 @@ void BossSst_UpdateHand(Actor* thisx, PlayState* play) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
- if (this->colliderCyl.base.atFlags & AT_ON) {
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCyl.base);
+ if (this->colliderCylinder.base.atFlags & AT_ON) {
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinder.base);
}
if ((HAND_STATE(this) != HAND_DEATH) && (HAND_STATE(this) != HAND_WAIT) && (HAND_STATE(this) != HAND_BEAT) &&
@@ -2670,14 +2695,14 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play2) {
}
#if OOT_VERSION < NTSC_1_2
- if (this->colliderCyl.base.acFlags & AC_ON) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCyl.base);
+ if (this->colliderCylinder.base.acFlags & AC_ON) {
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base);
}
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
#else
if ((this->actionFunc != BossSst_HeadLurk) && (this->actionFunc != BossSst_HeadIntro)) {
- if (this->colliderCyl.base.acFlags & AC_ON) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCyl.base);
+ if (this->colliderCylinder.base.acFlags & AC_ON) {
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base);
}
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
@@ -2688,7 +2713,7 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play2) {
}
BossSst_MoveAround(this);
- if ((!this->vVanish || CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) &&
+ if ((!this->vVanish || ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) &&
((this->actionFunc == BossSst_HeadReadyCharge) || (this->actionFunc == BossSst_HeadCharge) ||
(this->actionFunc == BossSst_HeadFrozenHand) || (this->actionFunc == BossSst_HeadStunned) ||
(this->actionFunc == BossSst_HeadVulnerable) || (this->actionFunc == BossSst_HeadDamage))) {
@@ -2793,7 +2818,7 @@ s32 BossSst_OverrideHeadDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
Gfx** gfx) {
BossSst* this = (BossSst*)thisx;
- if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS) && this->vVanish) {
+ if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS) && this->vVanish) {
*dList = NULL;
} else if (this->actionFunc == BossSst_HeadThrash) { // Animation modifications for death cutscene
s32 shakeAmp = (this->timer / 10) + 1;
@@ -2858,9 +2883,9 @@ void BossSst_PostHeadDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro
if (limbIndex == 8) {
Matrix_MultVec3f(&zeroVec, &this->actor.focus.pos);
Matrix_MultVec3f(&headVec, &headPos);
- this->colliderCyl.dim.pos.x = headPos.x;
- this->colliderCyl.dim.pos.y = headPos.y;
- this->colliderCyl.dim.pos.z = headPos.z;
+ this->colliderCylinder.dim.pos.x = headPos.x;
+ this->colliderCylinder.dim.pos.y = headPos.y;
+ this->colliderCylinder.dim.pos.z = headPos.z;
}
Collider_UpdateSpheres(limbIndex, &this->colliderJntSph);
@@ -2872,7 +2897,7 @@ void BossSst_DrawHead(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_boss_sst.c", 6810);
- if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
+ if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x80, sBodyColor.r, sBodyColor.g, sBodyColor.b, 255);
if (!sBodyStatic) {
@@ -2899,7 +2924,7 @@ void BossSst_DrawHead(Actor* thisx, PlayState* play) {
Matrix_RotateY(-randYaw, MTXMODE_APPLY);
}
- if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
+ if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) {
POLY_OPA_DISP =
SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
BossSst_OverrideHeadDraw, BossSst_PostHeadDraw, this, POLY_OPA_DISP);
diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h
index f064f2b842..caf4891ccb 100644
--- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h
+++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h
@@ -2,11 +2,11 @@
#define Z_BOSS_SST_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BossSst;
-typedef void (*BossSstActionFunc)(struct BossSst*, PlayState*);
+typedef void (*BossSstActionFunc)(struct BossSst*, struct PlayState*);
#define BOSS_SST_EFFECT_COUNT 18
@@ -46,8 +46,8 @@ typedef struct BossSst {
/* 0x03C4 */ f32 radius;
/* 0x03C8 */ Vec3f center;
/* 0x03D4 */ ColliderJntSph colliderJntSph;
- /* 0x03F4 */ ColliderJntSphElement colliderItems[11];
- /* 0x06B4 */ ColliderCylinder colliderCyl;
+ /* 0x03F4 */ ColliderJntSphElement colliderJntSphElements[11];
+ /* 0x06B4 */ ColliderCylinder colliderCylinder;
/* 0x0700 */ BossSstEffect effects[BOSS_SST_EFFECT_COUNT];
/* 0x09D0 */ s16 trailIndex;
/* 0x09D2 */ s16 trailCount;
diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst_colchk.inc.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst_colchk.inc.c
index cc06356aa8..0016ff93d5 100644
--- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst_colchk.inc.c
+++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst_colchk.inc.c
@@ -1,6 +1,6 @@
-#include "z_boss_sst.h"
+#include "z64collision_check.h"
-static ColliderJntSphElementInit sJntSphItemsInitHand[11] = {
+static ColliderJntSphElementInit sJntSphElementsInitHand[11] = {
{
{
ELEM_MATERIAL_UNK1,
@@ -134,10 +134,10 @@ static ColliderJntSphInit sJntSphInitHand = {
COLSHAPE_JNTSPH,
},
11,
- sJntSphItemsInitHand,
+ sJntSphElementsInitHand,
};
-static ColliderJntSphElementInit sJntSphItemsInitHead[11] = {
+static ColliderJntSphElementInit sJntSphElementsInitHead[11] = {
{
{
ELEM_MATERIAL_UNK1,
@@ -271,7 +271,7 @@ static ColliderJntSphInit sJntSphInitHead = {
COLSHAPE_JNTSPH,
},
11,
- sJntSphItemsInitHead,
+ sJntSphElementsInitHead,
};
static ColliderCylinderInit sCylinderInitHead = {
diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c
index 39996fbbb9..85309e6e6b 100644
--- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c
+++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c
@@ -1,9 +1,37 @@
#include "z_boss_tw.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#include "assets/objects/object_tw/object_tw.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_tw/object_tw.h"
+
+#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" \
+ "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum TwEffType {
/* 0 */ TWEFF_NONE,
@@ -233,7 +261,7 @@ static s16 D_8094C87C;
static u8 D_8094C87E;
static BossTwEffect sEffects[BOSS_TW_EFFECT_COUNT];
-void BossTw_AddDotEffect(PlayState* play, Vec3f* initalPos, Vec3f* initalSpeed, Vec3f* accel, f32 scale, s16 args,
+void BossTw_AddDotEffect(PlayState* play, Vec3f* initialPos, Vec3f* initialSpeed, Vec3f* accel, f32 scale, s16 args,
s16 countLimit) {
s16 i;
BossTwEffect* eff;
@@ -241,8 +269,8 @@ void BossTw_AddDotEffect(PlayState* play, Vec3f* initalPos, Vec3f* initalSpeed,
for (i = 0, eff = play->specialEffects; i < countLimit; i++, eff++) {
if (eff->type == TWEFF_NONE) {
eff->type = TWEFF_DOT;
- eff->pos = *initalPos;
- eff->curSpeed = *initalSpeed;
+ eff->pos = *initialPos;
+ eff->curSpeed = *initialSpeed;
eff->accel = *accel;
eff->workf[EFF_SCALE] = scale / 1000.0f;
eff->alpha = 255;
@@ -253,7 +281,7 @@ void BossTw_AddDotEffect(PlayState* play, Vec3f* initalPos, Vec3f* initalSpeed,
}
}
-void BossTw_AddDmgCloud(PlayState* play, s16 type, Vec3f* initialPos, Vec3f* initalSpeed, Vec3f* accel, f32 scale,
+void BossTw_AddDmgCloud(PlayState* play, s16 type, Vec3f* initialPos, Vec3f* initialSpeed, Vec3f* accel, f32 scale,
s16 alpha, s16 args, s16 countLimit) {
s16 i;
BossTwEffect* eff;
@@ -262,7 +290,7 @@ void BossTw_AddDmgCloud(PlayState* play, s16 type, Vec3f* initialPos, Vec3f* ini
if (eff->type == TWEFF_NONE) {
eff->type = type;
eff->pos = *initialPos;
- eff->curSpeed = *initalSpeed;
+ eff->curSpeed = *initialSpeed;
eff->accel = *accel;
eff->workf[EFF_SCALE] = scale / 1000.0f;
eff->work[EFF_ARGS] = args;
@@ -273,7 +301,7 @@ void BossTw_AddDmgCloud(PlayState* play, s16 type, Vec3f* initialPos, Vec3f* ini
}
}
-void BossTw_AddRingEffect(PlayState* play, Vec3f* initalPos, f32 scale, f32 arg3, s16 alpha, s16 args, s16 arg6,
+void BossTw_AddRingEffect(PlayState* play, Vec3f* initialPos, f32 scale, f32 arg3, s16 alpha, s16 args, s16 arg6,
s16 countLimit) {
s16 i;
BossTwEffect* eff;
@@ -281,7 +309,7 @@ void BossTw_AddRingEffect(PlayState* play, Vec3f* initalPos, f32 scale, f32 arg3
for (i = 0, eff = play->specialEffects; i < countLimit; i++, eff++) {
if (eff->type == TWEFF_NONE) {
eff->type = TWEFF_RING;
- eff->pos = *initalPos;
+ eff->pos = *initialPos;
eff->curSpeed = sZeroVector;
eff->accel = sZeroVector;
eff->workf[EFF_SCALE] = scale * 0.0025f;
@@ -320,15 +348,15 @@ void BossTw_AddPlayerFreezeEffect(PlayState* play, Actor* target) {
}
}
-void BossTw_AddFlameEffect(PlayState* play, Vec3f* initalPos, Vec3f* initalSpeed, Vec3f* accel, f32 scale, s16 args) {
+void BossTw_AddFlameEffect(PlayState* play, Vec3f* initialPos, Vec3f* initialSpeed, Vec3f* accel, f32 scale, s16 args) {
s16 i;
BossTwEffect* eff;
for (i = 0, eff = play->specialEffects; i < BOSS_TW_EFFECT_COUNT; i++, eff++) {
if (eff->type == TWEFF_NONE) {
eff->type = TWEFF_FLAME;
- eff->pos = *initalPos;
- eff->curSpeed = *initalSpeed;
+ eff->pos = *initialPos;
+ eff->curSpeed = *initialSpeed;
eff->accel = *accel;
eff->workf[EFF_SCALE] = scale / 1000.0f;
eff->work[EFF_ARGS] = args;
@@ -362,7 +390,7 @@ void BossTw_AddMergeFlameEffect(PlayState* play, Vec3f* initialPos, f32 scale, f
}
}
-void BossTw_AddShieldBlastEffect(PlayState* play, Vec3f* initalPos, Vec3f* initalSpeed, Vec3f* accel, f32 scale,
+void BossTw_AddShieldBlastEffect(PlayState* play, Vec3f* initialPos, Vec3f* initialSpeed, Vec3f* accel, f32 scale,
f32 arg5, s16 alpha, s16 args) {
s16 i;
BossTwEffect* eff;
@@ -370,8 +398,8 @@ void BossTw_AddShieldBlastEffect(PlayState* play, Vec3f* initalPos, Vec3f* inita
for (i = 0, eff = play->specialEffects; i < BOSS_TW_EFFECT_COUNT; i++, eff++) {
if (eff->type == TWEFF_NONE) {
eff->type = TWEFF_SHLD_BLST;
- eff->pos = *initalPos;
- eff->curSpeed = *initalSpeed;
+ eff->pos = *initialPos;
+ eff->curSpeed = *initialSpeed;
eff->accel = *accel;
eff->workf[EFF_SCALE] = scale / 1000.0f;
eff->workf[EFF_DIST] = arg5 / 1000.0f;
@@ -484,7 +512,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
}
Actor_SetScale(&this->actor, 2.5 * 0.01f);
- this->actor.colChkInfo.mass = 255;
+ this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.colChkInfo.health = 0;
Collider_InitCylinder(play, &this->collider);
@@ -513,7 +541,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
this->actor.naviEnemyId = NAVI_ENEMY_TWINROVA_KOTAKE;
SkelAnime_InitFlex(play, &this->skelAnime, &gTwinrovaKotakeSkel, &gTwinrovaKotakeKoumeFlyAnim, NULL, NULL, 0);
- if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_TWINROVA_BATTLE)) {
// began twinrova battle
BossTw_SetupFlyTo(this, play);
this->actor.world.pos.x = -600.0f;
@@ -531,7 +559,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
this->actor.naviEnemyId = NAVI_ENEMY_TWINROVA_KOUME;
SkelAnime_InitFlex(play, &this->skelAnime, &gTwinrovaKoumeSkel, &gTwinrovaKotakeKoumeFlyAnim, NULL, NULL, 0);
- if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_TWINROVA_BATTLE)) {
// began twinrova battle
BossTw_SetupFlyTo(this, play);
this->actor.world.pos.x = 600.0f;
@@ -553,7 +581,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
SkelAnime_InitFlex(play, &this->skelAnime, &gTwinrovaSkel, &gTwinrovaTPoseAnim, NULL, NULL, 0);
Animation_MorphToLoop(&this->skelAnime, &gTwinrovaTPoseAnim, -3.0f);
- if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_TWINROVA_BATTLE)) {
// began twinrova battle
BossTw_SetupWait(this, play);
} else {
@@ -804,7 +832,7 @@ s32 BossTw_BeamHitPlayerCheck(BossTw* this, PlayState* play) {
if (sTwinrovaPtr->timers[2] == 0) {
sTwinrovaPtr->timers[2] = 150;
this->beamDist = sqrtf(SQ(offset.x) + SQ(offset.y) + SQ(offset.z));
- func_8002F6D4(play, &this->actor, 3.0f, this->actor.shape.rot.y, 0.0f, 0x20);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.shape.rot.y, 0.0f, 0x20);
if (this->actor.params == TW_KOTAKE) {
if (sFreezeState == 0) {
@@ -838,7 +866,7 @@ s32 BossTw_CheckBeamReflection(BossTw* this, PlayState* play) {
Vec3f vec;
Player* player = GET_PLAYER(play);
- if (player->stateFlags1 & PLAYER_STATE1_22 &&
+ if (player->stateFlags1 & PLAYER_STATE1_SHIELDING &&
(s16)(player->actor.shape.rot.y - this->actor.shape.rot.y + 0x8000) < 0x2000 &&
(s16)(player->actor.shape.rot.y - this->actor.shape.rot.y + 0x8000) > -0x2000) {
// player is shielding and facing angles are less than 45 degrees in either direction
@@ -980,7 +1008,7 @@ void BossTw_ShootBeam(BossTw* this, PlayState* play) {
if (this->timers[1] != 0) {
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, this->rotateSpeed);
- if ((player->stateFlags1 & PLAYER_STATE1_22) &&
+ if ((player->stateFlags1 & PLAYER_STATE1_SHIELDING) &&
((s16)((player->actor.shape.rot.y - this->actor.shape.rot.y) + 0x8000) < 0x2000) &&
((s16)((player->actor.shape.rot.y - this->actor.shape.rot.y) + 0x8000) > -0x2000)) {
Math_ApproachF(&this->targetPos.x, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].x, 1.0f, 400.0f);
@@ -1757,7 +1785,7 @@ void BossTw_SetupCSWait(BossTw* this, PlayState* play) {
}
/**
- * Do nothing while waiting for the inital cutscene to start
+ * Do nothing while waiting for the initial cutscene to start
*/
void BossTw_CSWait(BossTw* this, PlayState* play) {
}
@@ -2217,7 +2245,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) {
play->envCtx.lightBlend = 0.0f;
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gTwinrovaTitleCardTex), 160,
180, 128, 40);
- SET_EVENTCHKINF(EVENTCHKINF_75);
+ SET_EVENTCHKINF(EVENTCHKINF_BEGAN_TWINROVA_BATTLE);
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
}
@@ -2974,7 +3002,7 @@ void BossTw_TwinrovaUpdate(Actor* thisx, PlayState* play2) {
BossTw* this = (BossTw*)thisx;
Player* player = GET_PLAYER(play);
- this->actor.flags &= ~ACTOR_FLAG_10;
+ this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
this->unk_5F8 = 0;
this->collider.base.colMaterial = COL_MATERIAL_HIT3;
@@ -5252,7 +5280,7 @@ void BossTw_TwinrovaStun(BossTw* this, PlayState* play) {
s16 cloudType;
this->unk_5F8 = 1;
- this->actor.flags |= ACTOR_FLAG_10;
+ this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
cloudType = sTwinrovaBlastType == 0 ? TWEFF_3 : TWEFF_2;
diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h
index eb2a4ef74c..df62aeff37 100644
--- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h
+++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h
@@ -2,11 +2,11 @@
#define Z_BOSS_TW_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BossTw;
-typedef void (*BossTwActionFunc)(struct BossTw* this, PlayState* play);
+typedef void (*BossTwActionFunc)(struct BossTw* this, struct PlayState* play);
typedef enum TwWork {
/* 0 */ CS_TIMER_1,
diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c
index 6e3b6b4eb1..aec25c7cf2 100644
--- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c
+++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c
@@ -5,13 +5,36 @@
*/
#include "z_boss_va.h"
-#include "assets/objects/object_bv/object_bv.h"
#include "overlays/actors/ovl_En_Boom/z_en_boom.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_bv/object_bv.h"
-#pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128 ntsc-1.2:128"
+#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:0" \
+ "ntsc-1.1:0 ntsc-1.2:0 pal-1.0:128 pal-1.1:128"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
#define GET_BODY(this) ((BossVa*)(this)->actor.parent)
#define vaGorePulse offset.x
@@ -589,7 +612,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
switch (this->actor.params) {
case BOSSVA_BODY:
SkelAnime_Init(play, &this->skelAnime, &gBarinadeBodySkel, &gBarinadeBodyAnim, NULL, NULL, 0);
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
break;
case BOSSVA_SUPPORT_1:
case BOSSVA_SUPPORT_2:
@@ -608,8 +631,10 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
SkelAnime_InitFlex(play, &this->skelAnime, &gBarinadeStumpSkel, &gBarinadeStumpAnim, NULL, NULL, 0);
break;
default:
- this->actor.flags |= ACTOR_FLAG_24;
- SkelAnime_Init(play, &this->skelAnime, &gBarinadeBariSkel, &gBarinadeBariAnim, NULL, NULL, 0);
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
+ //! @bug Flex skeleton is used as normal skeleton
+ SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)&gBarinadeBariSkel, &gBarinadeBariAnim, NULL, NULL,
+ 0);
this->actor.shape.yOffset = 400.0f;
break;
case BOSSVA_DOOR:
@@ -639,7 +664,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
} else {
this->actor.colChkInfo.damageTable = sDamageTable;
sPhase2Timer = 0xFFFF;
- if (GET_EVENTCHKINF(EVENTCHKINF_76)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BARINADE_BATTLE)) {
sCsState = INTRO_CALL_BARI;
sDoorState = 100;
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
@@ -677,8 +702,8 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
}
this->zapHeadPos.x = 1.0f;
- Collider_InitCylinder(play, &this->colliderBody);
- Collider_SetCylinder(play, &this->colliderBody, &this->actor, &sCylinderInit);
+ Collider_InitCylinder(play, &this->bodyCollider);
+ Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sCylinderInit);
for (i = BOSSVA_ZAPPER_3; i >= BOSSVA_SUPPORT_1; i--) {
Actor_SpawnAsChild(
@@ -699,8 +724,9 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
case BOSSVA_SUPPORT_1:
case BOSSVA_SUPPORT_2:
case BOSSVA_SUPPORT_3:
- Collider_InitJntSph(play, &this->colliderSph);
- Collider_SetJntSph(play, &this->colliderSph, &this->actor, &sJntSphInitSupport, this->elements);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitSupport,
+ this->colliderJntSphElements);
if (sCsState < BOSSVA_BATTLE) {
BossVa_SetupSupportIntro(this, play);
} else {
@@ -728,8 +754,9 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
BossVa_SetupDoor(this, play);
break;
default:
- Collider_InitJntSph(play, &this->colliderSph);
- Collider_SetJntSph(play, &this->colliderSph, &this->actor, &sJntSphInitBari, this->elements);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitBari,
+ this->colliderJntSphElements);
Collider_InitQuad(play, &this->colliderLightning);
Collider_SetQuad(play, &this->colliderLightning, &this->actor, &sQuadInit);
this->unk_1D8.x = 1.0f;
@@ -749,8 +776,8 @@ void BossVa_Destroy(Actor* thisx, PlayState* play) {
BossVa* this = (BossVa*)thisx;
SkelAnime_Free(&this->skelAnime, play);
- Collider_DestroyJntSph(play, &this->colliderSph);
- Collider_DestroyCylinder(play, &this->colliderBody);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
+ Collider_DestroyCylinder(play, &this->bodyCollider);
}
void BossVa_SetupIntro(BossVa* this) {
@@ -974,7 +1001,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) {
sSubCamAtNext.y = 140.0f;
sSubCamAtNext.z = -200.0f;
- if (!GET_EVENTCHKINF(EVENTCHKINF_76)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BARINADE_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gBarinadeTitleCardTex),
160, 180, 128, 40);
}
@@ -1016,7 +1043,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) {
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE);
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7);
sCsState++;
- SET_EVENTCHKINF(EVENTCHKINF_76);
+ SET_EVENTCHKINF(EVENTCHKINF_BEGAN_BARINADE_BATTLE);
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000;
}
break;
@@ -1068,10 +1095,10 @@ void BossVa_BodyPhase1(BossVa* this, PlayState* play) {
}
}
- if (this->colliderBody.base.atFlags & AT_HIT) {
- this->colliderBody.base.atFlags &= ~AT_HIT;
- if (this->colliderBody.base.at == &player->actor) {
- func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
+ if (this->bodyCollider.base.atFlags & AT_HIT) {
+ this->bodyCollider.base.atFlags &= ~AT_HIT;
+ if (this->bodyCollider.base.at == &player->actor) {
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
}
}
@@ -1098,9 +1125,9 @@ void BossVa_BodyPhase1(BossVa* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_BL_SPARK - SFX_FLAG);
}
- Collider_UpdateCylinder(&this->actor, &this->colliderBody);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base);
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base);
+ Collider_UpdateCylinder(&this->actor, &this->bodyCollider);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base);
func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG, 1.0f);
}
@@ -1130,21 +1157,23 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 160);
this->actor.colorFilterTimer = this->invincibilityTimer;
} else {
- this->colliderBody.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG;
+ this->bodyCollider.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG;
}
}
- if (this->colliderBody.base.acFlags & AC_HIT) {
- this->colliderBody.base.acFlags &= ~AC_HIT;
+ if (this->bodyCollider.base.acFlags & AC_HIT) {
+ this->bodyCollider.base.acFlags &= ~AC_HIT;
- if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) {
+ if (this->bodyCollider.base.ac->id == ACTOR_EN_BOOM) {
sPhase2Timer &= 0xFE00;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 160);
- this->colliderBody.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
+ this->bodyCollider.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
} else {
sKillBari++;
if ((this->actor.colorFilterTimer != 0) && !(this->actor.colorFilterParams & 0x4000)) {
this->invincibilityTimer = this->actor.colorFilterTimer - 5;
+ //! @bug This condition is always false as this->invincibilityTimer is an s8 so can never
+ //! be larger than 160.
if (this->invincibilityTimer > 160) {
this->invincibilityTimer = 0;
}
@@ -1156,12 +1185,12 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_FAINT);
}
- if (this->colliderBody.base.atFlags & AT_HIT) {
- this->colliderBody.base.atFlags &= ~AT_HIT;
+ if (this->bodyCollider.base.atFlags & AT_HIT) {
+ this->bodyCollider.base.atFlags &= ~AT_HIT;
sPhase2Timer = (sPhase2Timer + 0x18) & 0xFFF0;
- if (this->colliderBody.base.at == &player->actor) {
- func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
+ if (this->bodyCollider.base.at == &player->actor) {
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
}
@@ -1204,14 +1233,14 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) {
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 45.0f;
- Collider_UpdateCylinder(&this->actor, &this->colliderBody);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base);
+ Collider_UpdateCylinder(&this->actor, &this->bodyCollider);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base);
if (this->actor.colorFilterTimer == 0) {
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base);
}
if ((this->actor.colorFilterTimer == 0) || !(this->actor.colorFilterParams & 0x4000)) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base);
}
func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG,
@@ -1219,7 +1248,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) {
}
void BossVa_SetupBodyPhase3(BossVa* this) {
- this->colliderBody.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG;
+ this->bodyCollider.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG;
this->actor.speed = 0.0f;
sPhase3StopMoving = false;
BossVa_SetupAction(this, BossVa_BodyPhase3);
@@ -1234,16 +1263,16 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) {
sp62 = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos);
this->unk_1B0 += 0xCE4;
this->bodyGlow = (s16)(Math_SinS(this->unk_1B0) * 50.0f) + 150;
- if (this->colliderBody.base.atFlags & AT_HIT) {
- this->colliderBody.base.atFlags &= ~AT_HIT;
- if (this->colliderBody.base.at == &player->actor) {
- func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
+ if (this->bodyCollider.base.atFlags & AT_HIT) {
+ this->bodyCollider.base.atFlags &= ~AT_HIT;
+ if (this->bodyCollider.base.at == &player->actor) {
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
this->actor.world.rot.y += (s16)Rand_CenteredFloat(0x2EE0) + 0x8000;
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
}
- if (this->colliderBody.base.acFlags & AC_HIT) {
+ if (this->bodyCollider.base.acFlags & AC_HIT) {
this->skelAnime.curFrame = 0.0f;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 12);
Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_FAINT);
@@ -1321,11 +1350,11 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_BL_SPARK - SFX_FLAG);
}
- Collider_UpdateCylinder(&this->actor, &this->colliderBody);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base);
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base);
+ Collider_UpdateCylinder(&this->actor, &this->bodyCollider);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base);
if (this->timer == 0) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base);
}
func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG,
@@ -1344,7 +1373,7 @@ void BossVa_SetupBodyPhase4(BossVa* this, PlayState* play) {
this->timer = -30;
}
- this->colliderBody.dim.radius = 55;
+ this->bodyCollider.dim.radius = 55;
BossVa_SetupAction(this, BossVa_BodyPhase4);
}
@@ -1355,10 +1384,10 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
this->unk_1B0 = (this->unk_1B0 + (s16)((sFightPhase - PHASE_4 + 1) * 1000.0f)) + 0xCE4;
this->bodyGlow = (s16)(Math_SinS(this->unk_1B0) * 50.0f) + 150;
- if (this->colliderBody.base.atFlags & AT_HIT) {
- this->colliderBody.base.atFlags &= ~AT_HIT;
- if (this->colliderBody.base.at == &player->actor) {
- func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
+ if (this->bodyCollider.base.atFlags & AT_HIT) {
+ this->bodyCollider.base.atFlags &= ~AT_HIT;
+ if (this->bodyCollider.base.at == &player->actor) {
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
this->actor.world.rot.y += (s16)Rand_CenteredFloat(0x2EE0) + 0x8000;
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
@@ -1367,8 +1396,8 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_BL_SPARK - SFX_FLAG);
}
- if (this->colliderBody.base.acFlags & AC_HIT) {
- this->colliderBody.base.acFlags &= ~AC_HIT;
+ if (this->bodyCollider.base.acFlags & AC_HIT) {
+ this->bodyCollider.base.acFlags &= ~AC_HIT;
this->skelAnime.curFrame = 0.0f;
if (this->timer >= 0) {
if (this->invincibilityTimer == 0) {
@@ -1398,8 +1427,8 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_FAINT);
}
}
- } else if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) {
- boomerang = (EnBoom*)this->colliderBody.base.ac;
+ } else if (this->bodyCollider.base.ac->id == ACTOR_EN_BOOM) {
+ boomerang = (EnBoom*)this->bodyCollider.base.ac;
boomerang->returnTimer = 0;
boomerang->moveTo = &player->actor;
boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer;
@@ -1423,7 +1452,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
}
Math_SmoothStepToF(&this->actor.speed, ((sFightPhase - PHASE_4 + 1) * 1.5f) + 4.0f, 1.0f, 0.25f, 0.0f);
}
- this->colliderBody.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG;
+ this->bodyCollider.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG;
} else {
Math_SmoothStepToS(&this->vaBodySpinRate, 0, 1, 0x96, 0);
if (this->timer > 0) {
@@ -1431,7 +1460,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
this->timer = 35;
}
Math_SmoothStepToF(&this->actor.shape.yOffset, -480.0f, 1.0f, 30.0f, 0.0f);
- this->colliderBody.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
+ this->bodyCollider.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
this->timer--;
} else {
if ((player->stateFlags1 & PLAYER_STATE1_26) && (this->timer < -60)) {
@@ -1493,13 +1522,13 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
}
Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 70.0f, 0.0f, UPDBGCHECKINFO_FLAG_0);
- Collider_UpdateCylinder(&this->actor, &this->colliderBody);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base);
+ Collider_UpdateCylinder(&this->actor, &this->bodyCollider);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base);
if (this->invincibilityTimer == 0) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base);
}
if ((this->vaBodySpinRate > 0x3E8) || (this->actor.shape.yOffset < -1200.0f)) {
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base);
}
func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG,
(this->vaBodySpinRate * 0.00025f) + 1.0f);
@@ -1740,11 +1769,11 @@ void BossVa_SupportAttached(BossVa* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_BL_SPARK - SFX_FLAG);
}
- if (this->colliderSph.base.acFlags & AC_HIT) {
+ if (this->colliderJntSph.base.acFlags & AC_HIT) {
BossVa_SetupSupportCut(this, play);
} else {
if (this->actor.colorFilterTimer == 0) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSph.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
if ((this->timer % 2) == 0) {
@@ -2543,22 +2572,23 @@ void BossVa_BariPhase3Attack(BossVa* this, PlayState* play) {
Math_SmoothStepToS(&this->vaBariUnused.z, this->vaBariUnused.x, 1, 0x1E, 0);
this->vaBariUnused.y += this->vaBariUnused.z;
- if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderSph.base.atFlags & AT_HIT)) {
- if ((this->colliderLightning.base.at == &player->actor) || (this->colliderSph.base.at == &player->actor)) {
- func_8002F71C(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer, 8.0f);
+ if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderJntSph.base.atFlags & AT_HIT)) {
+ if ((this->colliderLightning.base.at == &player->actor) || (this->colliderJntSph.base.at == &player->actor)) {
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer,
+ 8.0f);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
- this->colliderSph.base.at = NULL;
+ this->colliderJntSph.base.at = NULL;
this->colliderLightning.base.at = NULL;
}
this->colliderLightning.base.atFlags &= ~AT_HIT;
- this->colliderSph.base.atFlags &= ~AT_HIT;
+ this->colliderJntSph.base.atFlags &= ~AT_HIT;
}
- if (this->colliderSph.base.acFlags & AC_HIT) {
- this->colliderSph.base.acFlags &= ~AC_HIT;
- if ((this->colliderSph.base.ac->id == ACTOR_EN_BOOM) && (sp52 >= 128)) {
- boomerang = (EnBoom*)this->colliderSph.base.ac;
+ if (this->colliderJntSph.base.acFlags & AC_HIT) {
+ this->colliderJntSph.base.acFlags &= ~AC_HIT;
+ if ((this->colliderJntSph.base.ac->id == ACTOR_EN_BOOM) && (sp52 >= 128)) {
+ boomerang = (EnBoom*)this->colliderJntSph.base.ac;
boomerang->returnTimer = 0;
boomerang->moveTo = &player->actor;
boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer;
@@ -2581,14 +2611,14 @@ void BossVa_BariPhase3Attack(BossVa* this, PlayState* play) {
if (sp52 >= 128) {
BossVa_Spark(play, this, 1, 75, 15.0f, 7.0f, SPARK_TETHER, 1.0f, true);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSph.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
sPhase3StopMoving = false;
} else {
sPhase3StopMoving = true;
}
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderLightning.base);
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
if ((play->gameplayFrames % 4) == 0) {
Math_SmoothStepToS(&this->unk_1F0, 0x78, 1, 0xA, 0);
}
@@ -2638,16 +2668,17 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) {
return;
}
- if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderSph.base.atFlags & AT_HIT)) {
- if ((this->colliderLightning.base.at == &player->actor) || (this->colliderSph.base.at == &player->actor)) {
- func_8002F71C(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer, 8.0f);
+ if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderJntSph.base.atFlags & AT_HIT)) {
+ if ((this->colliderLightning.base.at == &player->actor) || (this->colliderJntSph.base.at == &player->actor)) {
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer,
+ 8.0f);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
- this->colliderSph.base.at = NULL;
+ this->colliderJntSph.base.at = NULL;
this->colliderLightning.base.at = NULL;
}
this->colliderLightning.base.atFlags &= ~AT_HIT;
- this->colliderSph.base.atFlags &= ~AT_HIT;
+ this->colliderJntSph.base.atFlags &= ~AT_HIT;
}
Math_SmoothStepToF(&this->actor.world.pos.y, 4.0f, 1.0f, 2.0f, 0.0f);
@@ -2668,11 +2699,11 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) {
Math_SmoothStepToF(&this->unk_1A0, (Math_SinS(sPhase2Timer * 0x190) * sp4C) + 320.0f, 1.0f, 10.0f, 0.0f);
Math_SmoothStepToS(&this->unk_1AC, sp50 + 0x1F4, 1, 0x3C, 0);
this->actor.world.pos.y += 2.0f * Math_SinF(this->unk_1A4);
- if (this->colliderSph.base.acFlags & AC_HIT) {
- this->colliderSph.base.acFlags &= ~AC_HIT;
+ if (this->colliderJntSph.base.acFlags & AC_HIT) {
+ this->colliderJntSph.base.acFlags &= ~AC_HIT;
- if ((this->colliderSph.base.ac->id == ACTOR_EN_BOOM) && (sp52 >= 64)) {
- boomerang = (EnBoom*)this->colliderSph.base.ac;
+ if ((this->colliderJntSph.base.ac->id == ACTOR_EN_BOOM) && (sp52 >= 64)) {
+ boomerang = (EnBoom*)this->colliderJntSph.base.ac;
boomerang->returnTimer = 0;
boomerang->moveTo = &player->actor;
boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer;
@@ -2681,7 +2712,7 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) {
}
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderLightning.base);
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
} else {
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
Math_SmoothStepToS(&this->unk_1AC, sp50 + 150, 1, 0x3C, 0);
@@ -2696,13 +2727,13 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) {
}
this->actor.world.pos.y += Math_SinF(this->unk_1A4) * 4.0f;
- if (this->colliderSph.base.acFlags & AC_HIT) {
+ if (this->colliderJntSph.base.acFlags & AC_HIT) {
BossVa_KillBari(this, play);
}
}
Math_SmoothStepToS(&this->actor.shape.rot.x, 0, 1, 0x5DC, 0);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSph.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
if ((play->gameplayFrames % 4) == 0) {
Math_SmoothStepToS(&this->unk_1F0, 0x78, 1, 0xA, 0);
}
@@ -2735,7 +2766,7 @@ void BossVa_BariPhase3Stunned(BossVa* this, PlayState* play) {
Vec3f sp40 = GET_BODY(this)->unk_1D8;
this->actor.world.rot.x = Math_Vec3f_Pitch(&GET_BODY(this)->actor.world.pos, &this->actor.world.pos);
- if (this->colliderSph.base.acFlags & AC_HIT) {
+ if (this->colliderJntSph.base.acFlags & AC_HIT) {
BossVa_KillBari(this, play);
return;
}
@@ -2743,7 +2774,7 @@ void BossVa_BariPhase3Stunned(BossVa* this, PlayState* play) {
this->unk_1A4 += Rand_ZeroOne() * 0.5f;
Math_SmoothStepToF(&this->actor.world.pos.y, 4.0f, 1.0f, 2.0f, 0.0f);
this->actor.world.pos.y += Math_SinF(this->unk_1A4) * 3.0f;
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSph.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
if ((play->gameplayFrames % 4) == 0) {
Math_SmoothStepToS(&this->unk_1F0, 0x28, 1, 0xA, 0);
BossVa_Spark(play, this, 1, this->unk_1F0, 25.0f, 20.0f, SPARK_BARI, 2.0f, true);
@@ -2812,10 +2843,10 @@ void BossVa_Update(Actor* thisx, PlayState* play2) {
switch (this->actor.params) {
case BOSSVA_BODY:
- if (this->colliderBody.base.acFlags & AC_HIT) {
- this->colliderBody.base.acFlags &= ~AC_HIT;
- if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) {
- boomerang = (EnBoom*)this->colliderBody.base.ac;
+ if (this->bodyCollider.base.acFlags & AC_HIT) {
+ this->bodyCollider.base.acFlags &= ~AC_HIT;
+ if (this->bodyCollider.base.ac->id == ACTOR_EN_BOOM) {
+ boomerang = (EnBoom*)this->bodyCollider.base.ac;
boomerang->returnTimer = 0;
}
}
@@ -2965,7 +2996,7 @@ void BossVa_SupportPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec
switch (limbIndex) {
case 4:
Matrix_MultVec3f(&sZeroVec, &this->actor.focus.pos);
- Collider_UpdateSpheres(0, &this->colliderSph);
+ Collider_UpdateSpheres(0, &this->colliderJntSph);
break;
case 7:
Matrix_MultVec3f(&sZeroVec, &this->armTip);
@@ -3221,7 +3252,7 @@ void BossVa_Draw(Actor* thisx, PlayState* play) {
if (!this->isDead) {
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
BossVa_BariOverrideLimbDraw, BossVa_BariPostLimbDraw, this);
- Collider_UpdateSpheres(0, &this->colliderSph);
+ Collider_UpdateSpheres(0, &this->colliderJntSph);
if (sCsState < BOSSVA_BATTLE) {
spBC = GET_BODY(this)->actor.world.pos;
} else {
diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.h b/src/overlays/actors/ovl_Boss_Va/z_boss_va.h
index f5e6c8a896..628831ad2f 100644
--- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.h
+++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.h
@@ -2,11 +2,11 @@
#define Z_BOSS_VA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct BossVa;
-typedef void (*BossVaActionFunc)(struct BossVa*, PlayState*);
+typedef void (*BossVaActionFunc)(struct BossVa*, struct PlayState*);
typedef struct BossVa {
/* 0x0000 */ Actor actor;
@@ -41,9 +41,9 @@ typedef struct BossVa {
/* 0x01FC */ Vec3f effectPos[10];
/* 0x0274 */ Vec3f unk_274; // Unused body position
/* 0x0280 */ Vec3f unk_280; // Unused body position
- /* 0x028C */ ColliderCylinder colliderBody;
- /* 0x02D8 */ ColliderJntSph colliderSph;
- /* 0x02F8 */ ColliderJntSphElement elements[1];
+ /* 0x028C */ ColliderCylinder bodyCollider;
+ /* 0x02D8 */ ColliderJntSph colliderJntSph;
+ /* 0x02F8 */ ColliderJntSphElement colliderJntSphElements[1];
/* 0x0338 */ ColliderQuad colliderLightning;
} BossVa; // size = 0x03B8
diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c
index 1887f64672..1673a99601 100644
--- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c
+++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c
@@ -5,13 +5,29 @@
*/
#include "z_demo_6k.h"
+#include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_demo_6k/object_demo_6k.h"
#include "assets/objects/object_gnd_magic/object_gnd_magic.h"
-#include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void Demo6K_Init(Actor* thisx, PlayState* play);
void Demo6K_Destroy(Actor* thisx, PlayState* play);
@@ -162,7 +178,7 @@ void Demo6K_Init(Actor* thisx, PlayState* play) {
case 17:
case 18:
case 19:
- this->actor.flags |= ACTOR_FLAG_5;
+ this->actor.flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
this->drawFunc = func_8096865C;
this->initActionFunc = func_80967410;
this->flags |= 1;
diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.h b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.h
index 09d9c175fb..5849ccc236 100644
--- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.h
+++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.h
@@ -2,11 +2,12 @@
#define Z_DEMO_6K_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct Demo6K;
-typedef void (*Demo6KActionFunc)(struct Demo6K*, PlayState*);
+typedef void (*Demo6KActionFunc)(struct Demo6K*, struct PlayState*);
typedef struct Demo6K {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
index 35c6b7550f..d3d275de9e 100644
--- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
+++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
@@ -1,10 +1,25 @@
#include "z_demo_du.h"
-#include "assets/objects/object_du/object_du.h"
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_du/object_du.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef void (*DemoDuActionFunc)(DemoDu*, PlayState*);
typedef void (*DemoDuDrawFunc)(Actor*, PlayState*);
@@ -67,7 +82,7 @@ void DemoDu_SetMouthTexIndex(DemoDu* this, s16 mouthTexIndex) {
this->mouthTexIndex = mouthTexIndex;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
// Resets all the values used in this cutscene.
void DemoDu_CsAfterGanon_Reset(DemoDu* this) {
this->updateIndex = CS_CHAMBERAFTERGANON_SUBSCENE(0);
@@ -201,7 +216,7 @@ void DemoDu_CsFireMedallion_AdvanceTo01(DemoDu* this, PlayState* play) {
Player* player = GET_PLAYER(play);
this->updateIndex = CS_FIREMEDALLION_SUBSCENE(1);
- play->csCtx.script = D_8096C1A4;
+ play->csCtx.script = gFireMedallionCs;
gSaveContext.cutsceneTrigger = 2;
Item_Give(play, ITEM_MEDALLION_FIRE);
@@ -777,7 +792,7 @@ void DemoDu_CsAfterGanon_BackTo01(DemoDu* this, PlayState* play) {
void DemoDu_UpdateCs_AG_00(DemoDu* this, PlayState* play) {
DemoDu_CsAfterGanon_AdvanceTo01(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
DemoDu_CsAfterGanon_CheckIfShouldReset(this, play);
#endif
}
@@ -787,7 +802,7 @@ void DemoDu_UpdateCs_AG_01(DemoDu* this, PlayState* play) {
DemoDu_UpdateSkelAnime(this);
DemoDu_UpdateEyes(this);
DemoDu_CsAfterGanon_AdvanceTo02(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
DemoDu_CsAfterGanon_CheckIfShouldReset(this, play);
#endif
}
@@ -797,7 +812,7 @@ void DemoDu_UpdateCs_AG_02(DemoDu* this, PlayState* play) {
DemoDu_UpdateSkelAnime(this);
DemoDu_UpdateEyes(this);
DemoDu_CsAfterGanon_BackTo01(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
DemoDu_CsAfterGanon_CheckIfShouldReset(this, play);
#endif
}
@@ -907,8 +922,8 @@ void DemoDu_CsCredits_HandleCues(DemoDu* this, PlayState* play) {
DemoDu_CsCredits_AdvanceTo04(this);
break;
default:
- // "Demo_Du_inEnding_Check_DemoMode:There is no such operation!!!!!!!!"
- PRINTF("Demo_Du_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Demo_Du_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Demo_Du_inEnding_Check_DemoMode: There is no such action!!!!!!!!\n"));
break;
}
this->cueId = nextCueId;
@@ -964,8 +979,8 @@ void DemoDu_Update(Actor* thisx, PlayState* play) {
DemoDu* this = (DemoDu*)thisx;
if (this->updateIndex < 0 || this->updateIndex >= 29 || sUpdateFuncs[this->updateIndex] == NULL) {
- // "The main mode is abnormal!!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sUpdateFuncs[this->updateIndex](this, play);
@@ -1035,8 +1050,8 @@ void DemoDu_Draw(Actor* thisx, PlayState* play) {
DemoDu* this = (DemoDu*)thisx;
if (this->drawIndex < 0 || this->drawIndex >= 3 || sDrawFuncs[this->drawIndex] == NULL) {
- // "The drawing mode is abnormal!!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sDrawFuncs[this->drawIndex](thisx, play);
diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.h b/src/overlays/actors/ovl_Demo_Du/z_demo_du.h
index d46f03145e..ede2756e05 100644
--- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.h
+++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.h
@@ -2,7 +2,7 @@
#define Z_DEMO_DU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoDu;
diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c
index 37506612a3..ad83a24185 100644
--- a/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c
+++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c
@@ -1,12 +1,13 @@
-#include "z_demo_du.h"
+#include "sequence.h"
#include "z64cutscene_commands.h"
+#include "z64player.h"
// clang-format off
-static CutsceneData D_8096C1A4[] = {
- CS_BEGIN_CUTSCENE(31, 3000),
+static CutsceneData gFireMedallionCs[] = {
+ CS_HEADER(31, 3000),
CS_UNK_DATA_LIST(0x00000020, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(31, 5),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_6_0, 5),
CS_ACTOR_CUE(0x0001, 0, 546, 0x0000, 0x0000, 0x0000, 0, 216, -10, 0, 216, -10, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 546, 547, 0x0000, 0x0000, 0x0000, 0, 216, -10, 0, 216, -10, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 547, 616, 0x0000, 0x0000, 0x0000, 0, 216, -10, 0, 216, -10, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
@@ -16,21 +17,21 @@ static CutsceneData D_8096C1A4[] = {
CS_PLAYER_CUE(PLAYER_CUEID_13, 0, 280, 0x0000, 0x6AAA, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_5, 280, 531, 0x0000, 0x6AAA, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_19, 531, 1716, 0x0000, 0xEAAA, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
- CS_ACTOR_CUE_LIST(41, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_2_2, 3),
CS_ACTOR_CUE(0x0001, 0, 170, 0x0000, 0x0000, 0x0000, 98, 6, -169, 98, 6, -169, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 170, 465, 0x0000, 0x0000, 0x0000, 98, 6, -169, 98, 6, -169, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0003, 465, 2915, 0x0000, 0x0000, 0x0000, 98, 6, -169, 98, 6, -169, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(49, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_7_0, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -16, -121, 0, -16, -121, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 530, 539),
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 540, 570),
CS_LIGHT_SETTING_LIST(2),
CS_LIGHT_SETTING(0x0000, 0, 10, 0x0000, 0x00000000, 0xFFFFFFDC, 0x00000000, 0x00000018, 0xFFFFFFDC, 0x00000000, 0x00000018, 0x00000000, 0x00000000, 0x00000000),
CS_LIGHT_SETTING(0x0000, 10, 3000, 0x0000, 0x00000000, 0xFFFFFFDC, 0x00000000, 0x00000018, 0xFFFFFFDC, 0x00000000, 0x00000018, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(39, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_0_5, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, 0, -2, 0, 0, -2, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 805, 835),
- CS_ACTOR_CUE_LIST(62, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_8_0, 1),
CS_ACTOR_CUE(0x0004, 0, 3000, 0x0000, 0x0000, 0x0000, 32, 80, -51, 32, 80, -51, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_DESTINATION(CS_DEST_DEATH_MOUNTAIN_CRATER_FROM_CHAMBER_OF_SAGES, 905, 1030),
CS_START_SEQ_LIST(1),
@@ -39,15 +40,15 @@ static CutsceneData D_8096C1A4[] = {
CS_FADE_OUT_SEQ(CS_FADE_OUT_BGM_MAIN, 500, 550, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC3, 0x0000006E, 0x00000000, 0xFFFFFFC3, 0x0000006E),
CS_TEXT_LIST(10),
CS_TEXT_NONE(0, 310),
- CS_TEXT(0x303C, 310, 323, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x303C, 310, 323, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(323, 344),
- CS_TEXT(0x3045, 344, 394, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x3045, 344, 394, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(394, 415),
- CS_TEXT(0x3046, 415, 465, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x3046, 415, 465, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(465, 800),
- CS_TEXT(0x003C, 800, 805, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x003C, 800, 805, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(805, 865),
- CS_TEXT(0x303D, 865, 875, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x303D, 865, 875, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_CAM_EYE_SPLINE(0, 1361),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x4271999A, 60.4f), -85, 3211, 795, 0x00C6),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x4271999A, 60.4f), -85, 3211, 795, 0x00C8),
@@ -182,6 +183,6 @@ static CutsceneData D_8096C1A4[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 1000, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x013D),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x013F),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x002E),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c
index 530e61e718..c2c86d8a04 100644
--- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c
+++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c
@@ -5,7 +5,18 @@
*/
#include "z_demo_ec.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_zo/object_zo.h"
#include "assets/objects/object_ec/object_ec.h"
#include "assets/objects/object_ma2/object_ma2.h"
@@ -37,7 +48,7 @@
#include "assets/objects/object_bba/object_bba.h"
#include "assets/objects/object_ane/object_ane.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void DemoEc_Init(Actor* thisx, PlayState* play);
void DemoEc_Destroy(Actor* thisx, PlayState* play);
@@ -158,7 +169,8 @@ void DemoEc_Init(Actor* thisx, PlayState* play) {
DemoEc* this = (DemoEc*)thisx;
if ((this->actor.params < 0) || (this->actor.params > 34)) {
- PRINTF(VT_FGCOL(RED) "Demo_Ec_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("Demo_Ec_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n",
+ "Demo_Ec_Actor_ct:arg_data is strange!!!!!!!!!!!!\n") VT_RST);
Actor_Kill(&this->actor);
} else {
this->updateMode = EC_UPDATE_COMMON;
@@ -176,20 +188,20 @@ void DemoEc_UpdateBgFlags(DemoEc* this, PlayState* play) {
}
void func_8096D594(DemoEc* this, PlayState* play) {
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_8096D5D4(DemoEc* this, PlayState* play) {
this->skelAnime.baseTransl = this->skelAnime.jointTable[0];
this->skelAnime.prevTransl = this->skelAnime.jointTable[0];
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_8096D64C(DemoEc* this, PlayState* play) {
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void DemoEc_UpdateEyes(DemoEc* this) {
@@ -320,7 +332,7 @@ void DemoEc_UseDrawObject(DemoEc* this, PlayState* play) {
OPEN_DISPS(gfxCtx, "../z_demo_ec.c", 662);
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[drawObjectSlot].segment);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[drawObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[drawObjectSlot].segment);
if (!play) {}
CLOSE_DISPS(gfxCtx, "../z_demo_ec.c", 670);
@@ -329,7 +341,7 @@ void DemoEc_UseDrawObject(DemoEc* this, PlayState* play) {
void DemoEc_UseAnimationObject(DemoEc* this, PlayState* play) {
s32 animObjectSlot = this->animObjectSlot;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[animObjectSlot].segment);
}
CsCmdActorCue* DemoEc_GetCue(PlayState* play, s32 cueChannel) {
@@ -504,7 +516,7 @@ void DemoEc_DrawKokiriGirl(DemoEc* this, PlayState* play) {
}
void DemoEc_InitOldMan(DemoEc* this, PlayState* play) {
DemoEc_UseDrawObject(this, play);
- DemoEc_InitSkelAnime(this, play, &object_bji_Skel_0000F0);
+ DemoEc_InitSkelAnime(this, play, &gHylianOldManSkel);
DemoEc_UseAnimationObject(this, play);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, play);
@@ -522,9 +534,9 @@ void DemoEc_UpdateOldMan(DemoEc* this, PlayState* play) {
void DemoEc_DrawOldMan(DemoEc* this, PlayState* play) {
static void* eyeTextures[] = {
- object_bji_Tex_0005FC,
- object_bji_Tex_0009FC,
- object_bji_Tex_000DFC,
+ gHylianOldManEyeOpenTex,
+ gHylianOldManEyeHalfTex,
+ gHylianOldManEyeClosedTex,
};
static u8 color1[] = { 0, 50, 100, 255 };
static u8 color2[] = { 0, 50, 160, 255 };
@@ -536,7 +548,7 @@ void DemoEc_DrawOldMan(DemoEc* this, PlayState* play) {
void DemoEc_InitBeardedMan(DemoEc* this, PlayState* play) {
DemoEc_UseDrawObject(this, play);
- DemoEc_InitSkelAnime(this, play, &object_ahg_Skel_0000F0);
+ DemoEc_InitSkelAnime(this, play, &gHylianMan1Skel);
DemoEc_UseAnimationObject(this, play);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, play);
@@ -554,9 +566,9 @@ void DemoEc_UpdateBeardedMan(DemoEc* this, PlayState* play) {
void DemoEc_DrawBeardedMan(DemoEc* this, PlayState* play) {
static void* eyeTextures[] = {
- object_ahg_Tex_00057C,
- object_ahg_Tex_00067C,
- object_ahg_Tex_00077C,
+ gHylianMan1BeardedEyeOpenTex,
+ gHylianMan1BeardedEyeHalfTex,
+ gHylianMan1BeardedEyeClosedTex,
};
static u8 color1[] = { 255, 255, 255, 255 };
static u8 color2[] = { 255, 255, 255, 255 };
@@ -568,7 +580,7 @@ void DemoEc_DrawBeardedMan(DemoEc* this, PlayState* play) {
void DemoEc_InitWoman(DemoEc* this, PlayState* play) {
DemoEc_UseDrawObject(this, play);
- DemoEc_InitSkelAnime(this, play, &object_bob_Skel_0000F0);
+ DemoEc_InitSkelAnime(this, play, &gHylianWoman2Skel);
DemoEc_UseAnimationObject(this, play);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, play);
@@ -586,9 +598,9 @@ void DemoEc_UpdateWoman(DemoEc* this, PlayState* play) {
void DemoEc_DrawWoman(DemoEc* this, PlayState* play) {
static void* eyeTextures[] = {
- object_bob_Tex_0007C8,
- object_bob_Tex_000FC8,
- object_bob_Tex_0017C8,
+ gHylianWoman2EyeOpenTex,
+ gHylianWoman2EyeHalfTex,
+ gHylianWoman2EyeClosedTex,
};
s32 eyeTexIndex = this->eyeTexIndex;
void* eyeTexture = eyeTextures[eyeTexIndex];
@@ -598,7 +610,7 @@ void DemoEc_DrawWoman(DemoEc* this, PlayState* play) {
void DemoEc_InitOldWoman(DemoEc* this, PlayState* play) {
DemoEc_UseDrawObject(this, play);
- DemoEc_InitSkelAnime(this, play, &object_bba_Skel_0000F0);
+ DemoEc_InitSkelAnime(this, play, &gHylianOldWomanSkel);
DemoEc_UseAnimationObject(this, play);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, play);
@@ -614,7 +626,7 @@ void DemoEc_UpdateOldWoman(DemoEc* this, PlayState* play) {
}
void DemoEc_DrawOldWoman(DemoEc* this, PlayState* play) {
- DemoEc_DrawSkeleton(this, play, &object_bba_Tex_0004C8, NULL, NULL, NULL);
+ DemoEc_DrawSkeleton(this, play, &gHylianOldWomanEyeTex, NULL, NULL, NULL);
}
void DemoEc_InitBossCarpenter(DemoEc* this, PlayState* play) {
@@ -691,7 +703,7 @@ Gfx* DemoEc_GetCarpenterPostLimbDList(DemoEc* this) {
case 13:
return object_daiku_DL_005880;
default:
- PRINTF(VT_FGCOL(RED) "かつらが無い!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("かつらが無い!!!!!!!!!!!!!!!!\n", "No wig!!!!!!!!!!!!!!!!\n") VT_RST);
return NULL;
}
}
@@ -737,7 +749,7 @@ Gfx* DemoEc_GetGerudoPostLimbDList(DemoEc* this) {
case 18:
return gGerudoWhiteHairstyleSpikyDL;
default:
- PRINTF(VT_FGCOL(RED) "かつらが無い!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("かつらが無い!!!!!!!!!!!!!!!!\n", "No wig!!!!!!!!!!!!!!!!\n") VT_RST);
return NULL;
}
}
@@ -1248,8 +1260,9 @@ void DemoEc_InitNpc(DemoEc* this, PlayState* play) {
s16 type = this->actor.params;
if (sInitFuncs[type] == NULL) {
- // "Demo_Ec_main_init: Initialization process is wrong arg_data"
- PRINTF(VT_FGCOL(RED) " Demo_Ec_main_init:初期化処理がおかしいarg_data = %d!\n" VT_RST, type);
+ PRINTF(VT_FGCOL(RED) T(" Demo_Ec_main_init:初期化処理がおかしいarg_data = %d!\n",
+ " Demo_Ec_main_init: Initialization process is wrong arg_data = %d!\n") VT_RST,
+ type);
Actor_Kill(&this->actor);
return;
}
@@ -1273,8 +1286,9 @@ void DemoEc_InitCommon(DemoEc* this, PlayState* play) {
secondaryObjectSlot = Object_GetSlot(&play->objectCtx, sp28);
if ((secondaryObjectSlot < 0) || (primaryObjectSlot < 0)) {
- // "Demo_Ec_main_bank: Bank unreadable arg_data = %d!"
- PRINTF(VT_FGCOL(RED) "Demo_Ec_main_bank:バンクを読めない arg_data = %d!\n" VT_RST, type);
+ PRINTF(VT_FGCOL(RED) T("Demo_Ec_main_bank:バンクを読めない arg_data = %d!\n",
+ "Demo_Ec_main_bank: Bank unreadable arg_data = %d!\n") VT_RST,
+ type);
Actor_Kill(&this->actor);
return;
}
@@ -1326,8 +1340,8 @@ void DemoEc_Update(Actor* thisx, PlayState* play) {
s32 updateMode = this->updateMode;
if ((updateMode < 0) || (updateMode >= ARRAY_COUNT(sUpdateFuncs)) || sUpdateFuncs[updateMode] == NULL) {
- // "The main mode is strange !!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
} else {
if (updateMode != EC_UPDATE_COMMON) {
DemoEc_UseAnimationObject(this, play);
@@ -1359,8 +1373,8 @@ void DemoEc_Draw(Actor* thisx, PlayState* play) {
s32 drawConfig = this->drawConfig;
if ((drawConfig < 0) || (drawConfig >= ARRAY_COUNT(sDrawFuncs)) || sDrawFuncs[drawConfig] == NULL) {
- // "The main mode is strange !!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
} else {
if (drawConfig != EC_DRAW_COMMON) {
DemoEc_UseDrawObject(this, play);
diff --git a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.h b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.h
index fe71483505..494338b27d 100644
--- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.h
+++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.h
@@ -2,13 +2,13 @@
#define Z_DEMO_EC_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoEc;
-typedef void (*DemoEcInitFunc)(struct DemoEc*, PlayState*);
-typedef void (*DemoEcUpdateFunc)(struct DemoEc*, PlayState*);
-typedef void (*DemoEcDrawFunc)(struct DemoEc*, PlayState*);
+typedef void (*DemoEcInitFunc)(struct DemoEc*, struct PlayState*);
+typedef void (*DemoEcUpdateFunc)(struct DemoEc*, struct PlayState*);
+typedef void (*DemoEcDrawFunc)(struct DemoEc*, struct PlayState*);
typedef struct DemoEc {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c
index 63087d7425..9eac9a59f6 100644
--- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c
+++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c
@@ -1,5 +1,29 @@
#include "z_demo_effect.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64curve.h"
+#include "z64draw.h"
+#include "z64cutscene_flags.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_efc_crystal_light/object_efc_crystal_light.h"
#include "assets/objects/object_efc_fire_ball/object_efc_fire_ball.h"
@@ -10,7 +34,7 @@
#include "assets/objects/object_efc_tw/object_efc_tw.h"
#include "assets/objects/object_gi_jewel/object_gi_jewel.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void DemoEffect_Init(Actor* thisx, PlayState* play2);
void DemoEffect_Destroy(Actor* thisx, PlayState* play);
@@ -357,16 +381,16 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) {
case DEMO_EFFECT_LIGHTRING_EXPANDING:
this->initDrawFunc = DemoEffect_DrawLightRing;
this->initUpdateFunc = DemoEffect_UpdateLightRingExpanding;
- this->lightRing.timer = 20;
- this->lightRing.timerIncrement = 4;
+ this->lightRing.timer = FRAMERATE_CONST(20, 6);
+ this->lightRing.timerIncrement = FRAMERATE_CONST(4, 5);
this->lightRing.alpha = 255;
break;
case DEMO_EFFECT_LIGHTRING_TRIFORCE:
this->initDrawFunc = DemoEffect_DrawLightRing;
this->initUpdateFunc = DemoEffect_UpdateLightRingTriforce;
- this->lightRing.timer = 20;
- this->lightRing.timerIncrement = 4;
+ this->lightRing.timer = FRAMERATE_CONST(20, 6);
+ this->lightRing.timerIncrement = FRAMERATE_CONST(4, 5);
this->lightRing.alpha = 0;
this->cueChannel = 4;
break;
@@ -374,8 +398,8 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) {
case DEMO_EFFECT_LIGHTRING_SHRINKING:
this->initDrawFunc = DemoEffect_DrawLightRing;
this->initUpdateFunc = DemoEffect_UpdateLightRingShrinking;
- this->lightRing.timer = 351;
- this->lightRing.timerIncrement = 2;
+ this->lightRing.timer = FRAMERATE_CONST(351, 405);
+ this->lightRing.timerIncrement = FRAMERATE_CONST(2, 3);
this->lightRing.alpha = 0;
break;
@@ -445,7 +469,7 @@ void DemoEffect_Init(Actor* thisx, PlayState* play2) {
case DEMO_EFFECT_TIMEWARP_TIMEBLOCK_LARGE:
case DEMO_EFFECT_TIMEWARP_TIMEBLOCK_SMALL:
- this->actor.flags |= ACTOR_FLAG_25;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_DURING_OCARINA;
FALLTHROUGH;
case DEMO_EFFECT_TIMEWARP_MASTERSWORD:
this->initDrawFunc = DemoEffect_DrawTimeWarp;
@@ -524,7 +548,7 @@ void DemoEffect_WaitForObject(DemoEffect* this, PlayState* play) {
this->actor.draw = this->initDrawFunc;
this->updateFunc = this->initUpdateFunc;
- PRINTF(VT_FGCOL(CYAN) " 転送終了 move_wait " VT_RST);
+ PRINTF(VT_FGCOL(CYAN) T(" 転送終了 move_wait ", " Transfer completed move_wait ") VT_RST);
}
}
@@ -682,12 +706,12 @@ void DemoEffect_InitTimeWarp(DemoEffect* this, PlayState* play) {
SkelCurve_SetAnim(&this->skelCurve, &gTimeWarpAnim, 1.0f, 59.0f, 59.0f, 0.0f);
SkelCurve_Update(play, &this->skelCurve);
this->updateFunc = DemoEffect_UpdateTimeWarpReturnFromChamberOfSages;
- PRINTF(VT_FGCOL(CYAN) " 縮むバージョン \n" VT_RST);
+ PRINTF(VT_FGCOL(CYAN) T(" 縮むバージョン \n", " Shrinking version \n") VT_RST);
} else {
SkelCurve_SetAnim(&this->skelCurve, &gTimeWarpAnim, 1.0f, 59.0f, 1.0f, 1.0f);
SkelCurve_Update(play, &this->skelCurve);
this->updateFunc = DemoEffect_UpdateTimeWarpPullMasterSword;
- PRINTF(VT_FGCOL(CYAN) " 通常 バージョン \n" VT_RST);
+ PRINTF(VT_FGCOL(CYAN) T(" 通常 バージョン \n", " Normal version \n") VT_RST);
}
}
@@ -834,7 +858,7 @@ void DemoEffect_UpdateTriforceSpot(DemoEffect* this, PlayState* play) {
}
if (gSaveContext.save.entranceIndex == ENTR_CUTSCENE_MAP_0 && gSaveContext.sceneLayer == 6 &&
- play->csCtx.curFrame == 143) {
+ play->csCtx.curFrame == FRAMERATE_CONST(143, 120)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_RING_EXPLOSION);
}
}
@@ -846,6 +870,9 @@ void DemoEffect_UpdateTriforceSpot(DemoEffect* this, PlayState* play) {
*/
void DemoEffect_UpdateLightRingShrinking(DemoEffect* this, PlayState* play) {
if (this->lightRing.timer < this->lightRing.timerIncrement) {
+#if OOT_VERSION < PAL_1_0
+ this->lightRing.timer = 0;
+#endif
Actor_Kill(&this->actor);
this->lightRing.timer = 0;
} else {
@@ -959,10 +986,18 @@ void DemoEffect_InitCreationFireball(DemoEffect* this, PlayState* play) {
Actor* parent = this->actor.parent;
this->actor.world.rot.y = parent->shape.rot.y;
- this->fireBall.timer = 50;
- this->actor.speed = 1.5f;
- this->actor.minVelocityY = -1.5f;
+
+ this->fireBall.timer = FRAMERATE_CONST(50, 42);
+ this->actor.speed = FRAMERATE_CONST(1.5f, 1.8f);
+
+#if OOT_VERSION < PAL_1_0
this->actor.gravity = -0.03f;
+ this->actor.minVelocityY = -1.5f;
+#else
+ this->actor.minVelocityY = FRAMERATE_CONST(-1.5f, -2.5f);
+ this->actor.gravity = FRAMERATE_CONST(-0.03f, -0.05f);
+#endif
+
this->updateFunc = DemoEffect_UpdateCreationFireball;
}
@@ -1093,7 +1128,7 @@ void DemoEffect_UpdateLightEffect(DemoEffect* this, PlayState* play) {
/**
* Update action for the Lgt Shower Actor.
- * The Lgt Shower Actor is the green light effect spawned by Farore in the Kokiri Forst creation cutscene.
+ * The Lgt Shower Actor is the green light effect spawned by Farore in the Kokiri Forest creation cutscene.
* This function updates the scale and alpha of the Actor.
*/
void DemoEffect_UpdateLgtShower(DemoEffect* this, PlayState* play) {
@@ -1134,22 +1169,22 @@ void DemoEffect_UpdateGodLgtDin(DemoEffect* this, PlayState* play) {
if (gSaveContext.save.entranceIndex == ENTR_CUTSCENE_MAP_0) {
switch (gSaveContext.sceneLayer) {
case 4:
- if (play->csCtx.curFrame == 288) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(288, 240)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_PASS);
}
- if (play->csCtx.curFrame == 635) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(635, 535)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_PASS);
}
break;
case 6:
- if (play->csCtx.curFrame == 55) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(55, 25)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
}
break;
case 11:
- if (play->csCtx.curFrame == 350) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(350, 353)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
}
break;
@@ -1189,19 +1224,18 @@ void DemoEffect_UpdateGodLgtNayru(DemoEffect* this, PlayState* play) {
if (gSaveContext.save.entranceIndex == ENTR_CUTSCENE_MAP_0) {
switch (gSaveContext.sceneLayer) {
case 4:
- if (play->csCtx.curFrame == 298) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(298, 248)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_PASS);
}
break;
-
case 6:
- if (play->csCtx.curFrame == 105) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(105, 88)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
}
break;
case 11:
- if (play->csCtx.curFrame == 360) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(360, 362)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
}
break;
@@ -1209,10 +1243,10 @@ void DemoEffect_UpdateGodLgtNayru(DemoEffect* this, PlayState* play) {
}
if (gSaveContext.save.entranceIndex == ENTR_DEATH_MOUNTAIN_TRAIL_0 && gSaveContext.sceneLayer == 4) {
- if (play->csCtx.curFrame == 72) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(72, 57)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
}
- if (play->csCtx.curFrame == 80) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(80, 72)) {
Audio_PlayCutsceneEffectsSequence(SEQ_CS_EFFECTS_NAYRU_MAGIC);
}
}
@@ -1249,19 +1283,19 @@ void DemoEffect_UpdateGodLgtFarore(DemoEffect* this, PlayState* play) {
if (gSaveContext.save.entranceIndex == ENTR_CUTSCENE_MAP_0) {
switch (gSaveContext.sceneLayer) {
case 4:
- if (play->csCtx.curFrame == 315) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(315, 265)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_PASS);
}
break;
case 6:
- if (play->csCtx.curFrame == 80) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(80, 60)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
}
break;
case 11:
- if (play->csCtx.curFrame == 370) {
+ if (play->csCtx.curFrame == FRAMERATE_CONST(370, 371)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_DM_FLYING_GOD_DASH);
}
break;
@@ -1530,8 +1564,8 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, PlayState* play) {
if (play->csCtx.state && play->csCtx.actorCues[this->cueChannel]) {
switch (play->csCtx.actorCues[this->cueChannel]->id) {
case 3:
- if (GET_EVENTCHKINF(EVENTCHKINF_4B)) {
- SET_EVENTCHKINF(EVENTCHKINF_4B);
+ if (GET_EVENTCHKINF(EVENTCHKINF_OPENED_DOOR_OF_TIME)) {
+ SET_EVENTCHKINF(EVENTCHKINF_OPENED_DOOR_OF_TIME);
}
DemoEffect_MoveJewelActivateDoorOfTime(this, play);
if ((play->gameplayFrames & 1) == 0) {
@@ -1564,7 +1598,7 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, PlayState* play) {
}
if (gSaveContext.save.entranceIndex == ENTR_TEMPLE_OF_TIME_0) {
- if (!GET_EVENTCHKINF(EVENTCHKINF_4B)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_OPENED_DOOR_OF_TIME)) {
hasCue = (play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[this->cueChannel] != NULL);
if (!hasCue) {
diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.h b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.h
index d3c2768bdb..12b22a1ad5 100644
--- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.h
+++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.h
@@ -2,11 +2,12 @@
#define Z_DEMO_EFFECT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64curve.h"
struct DemoEffect;
-typedef void (*DemoEffectFunc)(struct DemoEffect*, PlayState*);
+typedef void (*DemoEffectFunc)(struct DemoEffect*, struct PlayState*);
typedef struct DemoEffectFireBall {
/* 0x00 */ u8 timer;
diff --git a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c
index 94bda4604b..8720d49df2 100644
--- a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c
+++ b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c
@@ -5,10 +5,21 @@
*/
#include "z_demo_ext.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
+#include "z64skin.h"
+
#include "assets/objects/object_fhg/object_fhg.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum DemoExtAction {
/* 0x00 */ EXT_WAIT,
@@ -111,8 +122,8 @@ void DemoExt_HandleCues(DemoExt* this, PlayState* play) {
DemoExt_SetupDispellVortex(this);
break;
default:
- // "Demo_Ext_Check_DemoMode: there is no such action!"
- PRINTF("Demo_Ext_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Demo_Ext_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Demo_Ext_Check_DemoMode: There is no such action!!!!!!!!\n"));
break;
}
this->cueId = nextCueId;
@@ -174,8 +185,8 @@ void DemoExt_Update(Actor* thisx, PlayState* play) {
DemoExt* this = (DemoExt*)thisx;
if ((this->action < EXT_WAIT) || (this->action > EXT_DISPELL) || sActionFuncs[this->action] == NULL) {
- // "Main mode is abnormal!"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
} else {
sActionFuncs[this->action](this, play);
}
@@ -228,8 +239,8 @@ void DemoExt_Draw(Actor* thisx, PlayState* play) {
if ((this->drawMode < EXT_DRAW_NOTHING) || (this->drawMode > EXT_DRAW_VORTEX) ||
sDrawFuncs[this->drawMode] == NULL) {
- // "Draw mode is abnormal!"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
} else {
sDrawFuncs[this->drawMode](thisx, play);
}
diff --git a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.h b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.h
index dbed1bf1f9..2eadc4af69 100644
--- a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.h
+++ b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.h
@@ -2,12 +2,12 @@
#define Z_DEMO_EXT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoExt;
-typedef void (*DemoExtActionFunc)(struct DemoExt*, PlayState*);
-typedef void (*DemoExtDrawFunc)(Actor*, PlayState*);
+typedef void (*DemoExtActionFunc)(struct DemoExt*, struct PlayState*);
+typedef void (*DemoExtDrawFunc)(Actor*, struct PlayState*);
typedef struct DemoExt {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c
index 99bc65fbe3..5446d622fb 100644
--- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c
+++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c
@@ -5,10 +5,21 @@
*/
#include "z_demo_geff.h"
-#include "assets/objects/object_geff/object_geff.h"
-#include "terminal.h"
+#include "overlays/actors/ovl_Demo_Gt/z_demo_gt.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
+
+#include "assets/objects/object_geff/object_geff.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void DemoGeff_Init(Actor* thisx, PlayState* play);
void DemoGeff_Destroy(Actor* thisx, PlayState* play);
@@ -61,7 +72,8 @@ void DemoGeff_Init(Actor* thisx, PlayState* play) {
DemoGeff* this = (DemoGeff*)thisx;
if (this->actor.params < 0 || this->actor.params >= 9) {
- PRINTF(VT_FGCOL(RED) "Demo_Geff_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("Demo_Geff_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n",
+ "Demo_Geff_Actor_ct:arg_data is strange!!!!!!!!!!!!\n") VT_RST);
Actor_Kill(&this->actor);
return;
}
@@ -92,7 +104,7 @@ void func_80977F80(DemoGeff* this, PlayState* play) {
OPEN_DISPS(gfxCtx, "../z_demo_geff.c", 204);
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[objectSlot].segment);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
// Necessary to match
if (!play) {}
@@ -166,7 +178,7 @@ void func_809782A0(DemoGeff* this, PlayState* play) {
void func_80978308(DemoGeff* this, PlayState* play) {
func_809781FC(this, play);
func_809782A0(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80978030(this, play);
#endif
}
@@ -179,7 +191,9 @@ void func_80978370(DemoGeff* this, PlayState* play) {
s16 params = this->actor.params;
DemoGeffInitFunc initFunc = sInitFuncs[params];
if (initFunc == NULL) {
- PRINTF(VT_FGCOL(RED) " Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n" VT_RST, params);
+ PRINTF(VT_FGCOL(RED) T(" Demo_Geff_main_init:初期化処理がおかしいarg_data = %d!\n",
+ " Demo_Geff_main_init: Initialization process is wrong arg_data = %d!\n") VT_RST,
+ params);
Actor_Kill(&this->actor);
return;
}
@@ -195,7 +209,9 @@ void func_809783D4(DemoGeff* this, PlayState* play) {
s32 pad;
if (objectSlot < 0) {
- PRINTF(VT_FGCOL(RED) "Demo_Geff_main_bank:バンクを読めない arg_data = %d!\n" VT_RST, params);
+ PRINTF(VT_FGCOL(RED) T("Demo_Geff_main_bank:バンクを読めない arg_data = %d!\n",
+ "Demo_Geff_main_bank: Bank unreadable arg_data = %d!\n") VT_RST,
+ params);
Actor_Kill(thisx);
return;
}
@@ -209,7 +225,8 @@ void DemoGeff_Update(Actor* thisx, PlayState* play) {
DemoGeff* this = (DemoGeff*)thisx;
if (this->action < 0 || this->action >= 2 || sActionFuncs[this->action] == NULL) {
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sActionFuncs[this->action](this, play);
@@ -223,7 +240,8 @@ void DemoGeff_Draw(Actor* thisx, PlayState* play) {
s32 drawConfig = this->drawConfig;
if (drawConfig < 0 || drawConfig >= 2 || sDrawFuncs[drawConfig] == NULL) {
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
if (drawConfig != 0) {
diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h
index ca719594ad..03c6110fae 100644
--- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h
+++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.h
@@ -2,22 +2,20 @@
#define Z_DEMO_GEFF_H
#include "ultra64.h"
-#include "global.h"
-
-#include "../ovl_Demo_Gt/z_demo_gt.h"
+#include "z64actor.h"
struct DemoGeff;
-typedef void (*DemoGeffInitFunc)(struct DemoGeff*, PlayState*);
-typedef void (*DemoGeffActionFunc)(struct DemoGeff*, PlayState*);
-typedef void (*DemoGeffDrawFunc)(struct DemoGeff*, PlayState*);
+typedef void (*DemoGeffInitFunc)(struct DemoGeff*, struct PlayState*);
+typedef void (*DemoGeffActionFunc)(struct DemoGeff*, struct PlayState*);
+typedef void (*DemoGeffDrawFunc)(struct DemoGeff*, struct PlayState*);
typedef struct DemoGeff {
/* 0x0000 */ Actor actor;
/* 0x014C */ s32 action;
/* 0x0150 */ s32 drawConfig;
/* 0x0154 */ s32 objectSlot;
- /* 0x0158 */ DemoGt* demoGt;
+ /* 0x0158 */ struct DemoGt* demoGt;
/* 0x015C */ f32 deltaPosX;
/* 0x0160 */ f32 deltaPosY;
/* 0x0164 */ f32 deltaPosZ;
diff --git a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c
index 4072758cc9..3445287f34 100644
--- a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c
+++ b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c
@@ -5,10 +5,30 @@
*/
#include "z_demo_gj.h"
-#include "assets/objects/object_gj/object_gj.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64draw.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_gj/object_gj.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void DemoGj_Init(Actor* thisx, PlayState* play);
void DemoGj_Destroy(Actor* thisx, PlayState* play);
@@ -96,14 +116,14 @@ s32 DemoGj_GetType(DemoGj* this) {
return type;
}
-void DemoGj_InitCylinder(DemoGj* this, PlayState* play, ColliderCylinder* cylinder,
- ColliderCylinderInitType1* cylinderInit) {
- Collider_InitCylinder(play, cylinder);
- Collider_SetCylinderType1(play, cylinder, &this->dyna.actor, cylinderInit);
+void DemoGj_InitCylinder(DemoGj* this, PlayState* play, ColliderCylinder* collider,
+ ColliderCylinderInitType1* colliderInit) {
+ Collider_InitCylinder(play, collider);
+ Collider_SetCylinderType1(play, collider, &this->dyna.actor, colliderInit);
}
-s32 DemoGj_HitByExplosion(DemoGj* this, PlayState* play, ColliderCylinder* cylinder) {
- if (Actor_GetCollidedExplosive(play, &cylinder->base) != NULL) {
+s32 DemoGj_HitByExplosion(DemoGj* this, PlayState* play, ColliderCylinder* collider) {
+ if (Actor_GetCollidedExplosive(play, &collider->base) != NULL) {
return true;
}
return false;
@@ -112,19 +132,19 @@ s32 DemoGj_HitByExplosion(DemoGj* this, PlayState* play, ColliderCylinder* cylin
void DemoGj_DestroyCylinder(DemoGj* this, PlayState* play) {
switch (DemoGj_GetType(this)) {
case DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_1:
- Collider_DestroyCylinder(play, &this->cylinders[0]);
- Collider_DestroyCylinder(play, &this->cylinders[1]);
- Collider_DestroyCylinder(play, &this->cylinders[2]);
+ Collider_DestroyCylinder(play, &this->colliderCylinders[0]);
+ Collider_DestroyCylinder(play, &this->colliderCylinders[1]);
+ Collider_DestroyCylinder(play, &this->colliderCylinders[2]);
break;
case DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_2:
- Collider_DestroyCylinder(play, &this->cylinders[0]);
- Collider_DestroyCylinder(play, &this->cylinders[1]);
- Collider_DestroyCylinder(play, &this->cylinders[2]);
+ Collider_DestroyCylinder(play, &this->colliderCylinders[0]);
+ Collider_DestroyCylinder(play, &this->colliderCylinders[1]);
+ Collider_DestroyCylinder(play, &this->colliderCylinders[2]);
break;
case DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_TALL:
- Collider_DestroyCylinder(play, &this->cylinders[0]);
+ Collider_DestroyCylinder(play, &this->colliderCylinders[0]);
break;
}
}
@@ -219,18 +239,21 @@ s32 DemoGj_FindGanon(DemoGj* this, PlayState* play) {
if (actor->id == ACTOR_BOSS_GANON2) {
this->ganon = (BossGanon2*)actor;
- // "Demo_Gj_Search_Boss_Ganon %d: Discover Ganon !!!!"
- PRINTF("Demo_Gj_Search_Boss_Ganon %d:ガノン発見!!!!\n", this->dyna.actor.params);
+ PRINTF(T("Demo_Gj_Search_Boss_Ganon %d:ガノン発見!!!!\n",
+ "Demo_Gj_Search_Boss_Ganon %d: Ganon is discovered!!!!\n"),
+ this->dyna.actor.params);
return true;
}
actor = actor->next;
}
- // "Demo_Gj_Search_Boss_Ganon %d: I couldn't find Ganon"
- PRINTF("Demo_Gj_Search_Boss_Ganon %d:ガノン発見出来ず\n", this->dyna.actor.params);
+ PRINTF(T("Demo_Gj_Search_Boss_Ganon %d:ガノン発見出来ず\n",
+ "Demo_Gj_Search_Boss_Ganon %d: Unable to find Ganon\n"),
+ this->dyna.actor.params);
return false;
}
- //! @bug: Missing return value when `this->ganon` is already set.
+ //! @bug Missing return value when `this->ganon` is already set. No caller uses the return value
+ //! so it doesn't matter.
}
static InitChainEntry sInitChain[] = {
@@ -263,7 +286,7 @@ s32 DemoGj_InitSetIndices(DemoGj* this, PlayState* play, s32 updateMode, s32 dra
}
void DemoGj_DrawCommon(DemoGj* this, PlayState* play, Gfx* displayList) {
- if (!OOT_DEBUG || kREG(0) == 0) {
+ if (!DEBUG_FEATURES || kREG(0) == 0) {
GraphicsContext* gfxCtx = play->state.gfxCtx;
OPEN_DISPS(gfxCtx, "../z_demo_gj.c", 1163);
@@ -383,8 +406,8 @@ void DemoGj_SetupRotation(DemoGj* this, PlayState* play) {
break;
default:
- // "Demo_Gj_common_Reflect : This arg_data is not supported = %d"
- PRINTF(VT_FGCOL(RED) "Demo_Gj_common_Reflect : そんなarg_dataには対応していない = %d\n" VT_RST,
+ PRINTF(VT_FGCOL(RED) T("Demo_Gj_common_Reflect : そんなarg_dataには対応していない = %d\n",
+ "Demo_Gj_common_Reflect : This arg_data is not supported = %d\n") VT_RST,
this->dyna.actor.params);
return;
}
@@ -537,8 +560,8 @@ void DemoGj_SetupMovement(DemoGj* this, PlayState* play) {
break;
default:
- // "Demo_Gj_Setup_Move_common : This arg_data is not supported = %d"
- PRINTF(VT_FGCOL(RED) "Demo_Gj_Setup_Move_common : そんなarg_dataには対応していない = %d\n" VT_RST,
+ PRINTF(VT_FGCOL(RED) T("Demo_Gj_Setup_Move_common : そんなarg_dataには対応していない = %d\n",
+ "Demo_Gj_Setup_Move_common : This arg_data is not supported = %d\n") VT_RST,
actor->params);
break;
}
@@ -970,12 +993,12 @@ void DemoGj_DrawRubbleAroundArena(DemoGj* this, PlayState* play) {
// Inits the three cylinders with `sCylinderInit1`
void DemoGj_InitDestructableRubble1(DemoGj* this, PlayState* play) {
DemoGj_InitSetIndices(this, play, 15, 0, NULL);
- DemoGj_InitCylinder(this, play, &this->cylinders[0], &sCylinderInit1);
- DemoGj_InitCylinder(this, play, &this->cylinders[1], &sCylinderInit1);
- DemoGj_InitCylinder(this, play, &this->cylinders[2], &sCylinderInit1);
+ DemoGj_InitCylinder(this, play, &this->colliderCylinders[0], &sCylinderInit1);
+ DemoGj_InitCylinder(this, play, &this->colliderCylinders[1], &sCylinderInit1);
+ DemoGj_InitCylinder(this, play, &this->colliderCylinders[2], &sCylinderInit1);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void DemoGj_DoNothing1(DemoGj* this, PlayState* play) {
}
#endif
@@ -985,38 +1008,38 @@ void DemoGj_DoNothing1(DemoGj* this, PlayState* play) {
* Used by DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_1
*/
void func_8097AEE8(DemoGj* this, PlayState* play) {
- ColliderCylinder* cylinder0 = &this->cylinders[0];
- ColliderCylinder* cylinder1 = &this->cylinders[1];
- ColliderCylinder* cylinder2 = &this->cylinders[2];
+ ColliderCylinder* collider0 = &this->colliderCylinders[0];
+ ColliderCylinder* collider1 = &this->colliderCylinders[1];
+ ColliderCylinder* collider2 = &this->colliderCylinders[2];
Vec3f* actorPos = &this->dyna.actor.world.pos;
s32 pad;
- s16 theta = this->dyna.actor.world.rot.y;
- f32 cos_theta = Math_CosS(theta);
- f32 sin_theta = Math_SinS(theta);
+ s16 yaw = this->dyna.actor.world.rot.y;
+ f32 cos = Math_CosS(yaw);
+ f32 sin = Math_SinS(yaw);
- cylinder0->dim.pos.z = actorPos->z + (20.0f * cos_theta) - (-20.0f * sin_theta);
- cylinder0->dim.pos.x = actorPos->x + (20.0f * sin_theta) + (-20.0f * cos_theta);
- cylinder0->dim.pos.y = actorPos->y;
+ collider0->dim.pos.z = actorPos->z + (20.0f * cos) - (-20.0f * sin);
+ collider0->dim.pos.x = actorPos->x + (20.0f * sin) + (-20.0f * cos);
+ collider0->dim.pos.y = actorPos->y;
- cylinder1->dim.pos.z = actorPos->z + (-20.0f * cos_theta) - (20.0f * sin_theta);
- cylinder1->dim.pos.x = actorPos->x + (-20.0f * sin_theta) + (20.0f * cos_theta);
- cylinder1->dim.pos.y = actorPos->y;
+ collider1->dim.pos.z = actorPos->z + (-20.0f * cos) - (20.0f * sin);
+ collider1->dim.pos.x = actorPos->x + (-20.0f * sin) + (20.0f * cos);
+ collider1->dim.pos.y = actorPos->y;
- cylinder2->dim.pos.z = actorPos->z + (-60.0f * cos_theta) - (60.0f * sin_theta);
- cylinder2->dim.pos.x = actorPos->x + (-60.0f * sin_theta) + (60.0f * cos_theta);
- cylinder2->dim.pos.y = actorPos->y;
+ collider2->dim.pos.z = actorPos->z + (-60.0f * cos) - (60.0f * sin);
+ collider2->dim.pos.x = actorPos->x + (-60.0f * sin) + (60.0f * cos);
+ collider2->dim.pos.y = actorPos->y;
}
void DemoGj_SetCylindersAsAC(DemoGj* this, PlayState* play) {
s32 pad[2];
- Collider* cylinder0 = &this->cylinders[0].base;
- Collider* cylinder1 = &this->cylinders[1].base;
- Collider* cylinder2 = &this->cylinders[2].base;
+ Collider* collider0 = &this->colliderCylinders[0].base;
+ Collider* collider1 = &this->colliderCylinders[1].base;
+ Collider* collider2 = &this->colliderCylinders[2].base;
s32 pad2[3];
- CollisionCheck_SetAC(play, &play->colChkCtx, cylinder0);
- CollisionCheck_SetAC(play, &play->colChkCtx, cylinder1);
- CollisionCheck_SetAC(play, &play->colChkCtx, cylinder2);
+ CollisionCheck_SetAC(play, &play->colChkCtx, collider0);
+ CollisionCheck_SetAC(play, &play->colChkCtx, collider1);
+ CollisionCheck_SetAC(play, &play->colChkCtx, collider2);
}
void DemoGj_DirectedExplosion(DemoGj* this, PlayState* play, Vec3f* direction) {
@@ -1043,13 +1066,13 @@ void func_8097B128(DemoGj* this, PlayState* play) {
}
s32 DemoGj_HasCylinderAnyExploded(DemoGj* this, PlayState* play) {
- if (DemoGj_HitByExplosion(this, play, &this->cylinders[0])) {
+ if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[0])) {
return true;
}
- if (DemoGj_HitByExplosion(this, play, &this->cylinders[1])) {
+ if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[1])) {
return true;
}
- if (DemoGj_HitByExplosion(this, play, &this->cylinders[2])) {
+ if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[2])) {
return true;
}
return false;
@@ -1095,7 +1118,7 @@ void DemoGj_Update15(DemoGj* this, PlayState* play) {
// func_8097B370
void DemoGj_Update18(DemoGj* this, PlayState* play) {
func_8097B22C(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
DemoGj_DoNothing1(this, play);
#endif
}
@@ -1107,45 +1130,45 @@ void DemoGj_DrawDestructableRubble1(DemoGj* this, PlayState* play) {
// Inits the three cylinders with `sCylinderInit2`
void DemoGj_InitDestructableRubble2(DemoGj* this, PlayState* play) {
DemoGj_InitSetIndices(this, play, 16, 0, NULL);
- DemoGj_InitCylinder(this, play, &this->cylinders[0], &sCylinderInit2);
- DemoGj_InitCylinder(this, play, &this->cylinders[1], &sCylinderInit2);
- DemoGj_InitCylinder(this, play, &this->cylinders[2], &sCylinderInit2);
+ DemoGj_InitCylinder(this, play, &this->colliderCylinders[0], &sCylinderInit2);
+ DemoGj_InitCylinder(this, play, &this->colliderCylinders[1], &sCylinderInit2);
+ DemoGj_InitCylinder(this, play, &this->colliderCylinders[2], &sCylinderInit2);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void DemoGj_DoNothing2(DemoGj* this, PlayState* play) {
}
#endif
// Moves the ColliderCylinder's relative to the actor's position.
void func_8097B450(DemoGj* this, PlayState* play) {
- ColliderCylinder* cylinder0 = &this->cylinders[0];
- ColliderCylinder* cylinder1 = &this->cylinders[1];
- ColliderCylinder* cylinder2 = &this->cylinders[2];
+ ColliderCylinder* collider0 = &this->colliderCylinders[0];
+ ColliderCylinder* collider1 = &this->colliderCylinders[1];
+ ColliderCylinder* collider2 = &this->colliderCylinders[2];
Vec3f* actorPos = &this->dyna.actor.world.pos;
s32 pad;
- s16 theta = this->dyna.actor.world.rot.y;
- f32 cos_theta = Math_CosS(theta);
- f32 sin_theta = Math_SinS(theta);
+ s16 yaw = this->dyna.actor.world.rot.y;
+ f32 cos = Math_CosS(yaw);
+ f32 sin = Math_SinS(yaw);
- cylinder0->dim.pos.z = actorPos->z - (35.0f * sin_theta);
- cylinder0->dim.pos.x = actorPos->x + (35.0f * cos_theta);
- cylinder0->dim.pos.y = actorPos->y;
+ collider0->dim.pos.z = actorPos->z - (35.0f * sin);
+ collider0->dim.pos.x = actorPos->x + (35.0f * cos);
+ collider0->dim.pos.y = actorPos->y;
- cylinder1->dim.pos.z = actorPos->z - (-10.0f * sin_theta);
- cylinder1->dim.pos.x = actorPos->x + (-10.0f * cos_theta);
- cylinder1->dim.pos.y = actorPos->y;
+ collider1->dim.pos.z = actorPos->z - (-10.0f * sin);
+ collider1->dim.pos.x = actorPos->x + (-10.0f * cos);
+ collider1->dim.pos.y = actorPos->y;
- cylinder2->dim.pos.z = actorPos->z - (-55.0f * sin_theta);
- cylinder2->dim.pos.x = actorPos->x + (-55.0f * cos_theta);
- cylinder2->dim.pos.y = actorPos->y;
+ collider2->dim.pos.z = actorPos->z - (-55.0f * sin);
+ collider2->dim.pos.x = actorPos->x + (-55.0f * cos);
+ collider2->dim.pos.y = actorPos->y;
}
void DemoGj_SetCylindersAsAC2(DemoGj* this, PlayState* play) {
s32 pad[2];
- Collider* cylinder0 = &this->cylinders[0].base;
- Collider* cylinder1 = &this->cylinders[1].base;
- Collider* cylinder2 = &this->cylinders[2].base;
+ Collider* cylinder0 = &this->colliderCylinders[0].base;
+ Collider* cylinder1 = &this->colliderCylinders[1].base;
+ Collider* cylinder2 = &this->colliderCylinders[2].base;
s32 pad2[3];
CollisionCheck_SetAC(play, &play->colChkCtx, cylinder0);
@@ -1155,13 +1178,13 @@ void DemoGj_SetCylindersAsAC2(DemoGj* this, PlayState* play) {
// Does the same as `DemoGj_HasCylinderAnyExploded`
s32 DemoGj_HasCylinderAnyExploded2(DemoGj* this, PlayState* play) {
- if (DemoGj_HitByExplosion(this, play, &this->cylinders[0])) {
+ if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[0])) {
return true;
}
- if (DemoGj_HitByExplosion(this, play, &this->cylinders[1])) {
+ if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[1])) {
return true;
}
- if (DemoGj_HitByExplosion(this, play, &this->cylinders[2])) {
+ if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[2])) {
return true;
}
return false;
@@ -1230,7 +1253,7 @@ void DemoGj_Update16(DemoGj* this, PlayState* play) {
// func_8097B894
void DemoGj_Update19(DemoGj* this, PlayState* play) {
func_8097B750(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
DemoGj_DoNothing2(this, play);
#endif
}
@@ -1242,10 +1265,10 @@ void DemoGj_DemoGj_InitDestructableRubble2(DemoGj* this, PlayState* play) {
// Inits the first cylinder (only that one) with `sCylinderInit3`
void DemoGj_InitDestructableRubbleTall(DemoGj* this, PlayState* play) {
DemoGj_InitSetIndices(this, play, 17, 0, NULL);
- DemoGj_InitCylinder(this, play, &this->cylinders[0], &sCylinderInit3);
+ DemoGj_InitCylinder(this, play, &this->colliderCylinders[0], &sCylinderInit3);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void DemoGj_DoNothing3(DemoGj* this, PlayState* play) {
}
#endif
@@ -1284,12 +1307,12 @@ void func_8097B9BC(DemoGj* this, PlayState* play) {
*/
void func_8097BA48(DemoGj* this, PlayState* play) {
Actor* thisx = &this->dyna.actor;
- ColliderCylinder* cylinder = &this->cylinders[0];
+ ColliderCylinder* collider = &this->colliderCylinders[0];
s32 pad[2];
if (func_809797E4(this, 4)) {
Actor_Kill(thisx);
- } else if (DemoGj_HitByExplosion(this, play, cylinder)) {
+ } else if (DemoGj_HitByExplosion(this, play, collider)) {
Vec3f vec1 = { 0.0f, 0.0f, 0.0f };
DemoGj_DropCollectible(this, play);
@@ -1306,8 +1329,8 @@ void func_8097BA48(DemoGj* this, PlayState* play) {
Actor_Kill(thisx);
}
- Collider_UpdateCylinder(thisx, cylinder);
- CollisionCheck_SetAC(play, &play->colChkCtx, &cylinder->base);
+ Collider_UpdateCylinder(thisx, collider);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &collider->base);
}
// func_8097BB78
@@ -1319,7 +1342,7 @@ void DemoGj_Update17(DemoGj* this, PlayState* play) {
// func_8097BBA8
void DemoGj_Update20(DemoGj* this, PlayState* play) {
func_8097BA48(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
DemoGj_DoNothing3(this, play);
#endif
}
@@ -1357,8 +1380,8 @@ void DemoGj_Update(Actor* thisx, PlayState* play) {
if (this->updateMode < 0 || this->updateMode >= ARRAY_COUNT(sUpdateFuncs) ||
sUpdateFuncs[this->updateMode] == NULL) {
- // "The main mode is abnormal!!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
@@ -1414,8 +1437,8 @@ void DemoGj_Init(Actor* thisx, PlayState* play) {
break;
default:
- // "Demo_Gj_Actor_ct There is no such argument!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "Demo_Gj_Actor_ct そんな引数は無い!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("Demo_Gj_Actor_ct そんな引数は無い!!!!!!!!!!!!!!!!!!!!!!\n",
+ "Demo_Gj_Actor_ct There is no such argument!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
Actor_Kill(&this->dyna.actor);
}
}
@@ -1449,8 +1472,8 @@ void DemoGj_Draw(Actor* thisx, PlayState* play) {
DemoGj* this = (DemoGj*)thisx;
if (this->drawConfig < 0 || this->drawConfig >= ARRAY_COUNT(sDrawFuncs) || sDrawFuncs[this->drawConfig] == NULL) {
- // "The drawing mode is abnormal!!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
diff --git a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.h b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.h
index a29362c9e8..313788893f 100644
--- a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.h
+++ b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.h
@@ -2,7 +2,7 @@
#define Z_DEMO_GJ_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h"
@@ -17,7 +17,7 @@ typedef struct DemoGj {
/* 0x0178 */ BossGanon2* ganon;
/* 0x017C */ s32 isTransformedIntoGanon; // flag
/* 0x0180 */ s32 isRotated; // flag
- /* 0x0184 */ ColliderCylinder cylinders[3];
+ /* 0x0184 */ ColliderCylinder colliderCylinders[3];
/* 0x0268 */ s32 killFlag; // This actor never sets this flag, but it reads it. If set to `true` and the actor type is DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_1, DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_2 or DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_TALL, then the actor will be killed and will drop the specified amount of collectibles.
/* 0x026C */ Vec3f unk_26C; // This actor never sets this. Specifies which direction will this actor explode when killed using `killFlag`.
} DemoGj; // size = 0x0278
diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
index 2a6ac15c52..4ea8f4b685 100644
--- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
+++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
@@ -5,10 +5,22 @@
*/
#include "z_demo_go.h"
-#include "assets/objects/object_oF1d_map/object_oF1d_map.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
+#include "assets/objects/object_oF1d_map/object_oF1d_map.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void DemoGo_Init(Actor* thisx, PlayState* play);
void DemoGo_Destroy(Actor* thisx, PlayState* play);
@@ -320,7 +332,8 @@ void DemoGo_Update(Actor* thisx, PlayState* play) {
DemoGo* this = (DemoGo*)thisx;
if (this->action < 0 || this->action >= 7 || D_8097D44C[this->action] == NULL) {
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
D_8097D44C[this->action](this, play);
@@ -361,7 +374,8 @@ void DemoGo_Draw(Actor* thisx, PlayState* play) {
DemoGo* this = (DemoGo*)thisx;
if (this->drawConfig < 0 || this->drawConfig >= 2 || D_8097D468[this->drawConfig] == NULL) {
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
D_8097D468[this->drawConfig](this, play);
diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.h b/src/overlays/actors/ovl_Demo_Go/z_demo_go.h
index 969fdd8e07..9abd5ed41c 100644
--- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.h
+++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.h
@@ -2,12 +2,12 @@
#define Z_DEMO_GO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoGo;
-typedef void (*DemoGoActionFunc)(struct DemoGo*, PlayState*);
-typedef void (*DemoGoDrawFunc)(struct DemoGo*, PlayState*);
+typedef void (*DemoGoActionFunc)(struct DemoGo*, struct PlayState*);
+typedef void (*DemoGoDrawFunc)(struct DemoGo*, struct PlayState*);
typedef struct DemoGo {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c
index 2c0967f456..006a9267d3 100644
--- a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c
+++ b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c
@@ -1,13 +1,29 @@
#include "z_demo_gt.h"
+#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "regs.h"
+#include "rumble.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
#include "z64frame_advance.h"
+#include "z64play.h"
+#include "z64save.h"
#include "assets/objects/object_gt/object_gt.h"
#include "assets/objects/object_geff/object_geff.h"
-#include "terminal.h"
-#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void DemoGt_Init(Actor* thisx, PlayState* play);
void DemoGt_Destroy(Actor* thisx, PlayState* play);
@@ -440,7 +456,7 @@ void func_8097ED64(DemoGt* this, PlayState* play, s32 cueChannel) {
}
u8 DemoGt_IsCutsceneLayer(void) {
- if (OOT_DEBUG && (kREG(2) != 0)) {
+ if (DEBUG_FEATURES && (kREG(2) != 0)) {
return true;
} else if (!IS_CUTSCENE_LAYER) {
return false;
@@ -506,7 +522,7 @@ void func_8097EF40(DemoGt* this, PlayState* play) {
Vec3f* pos = &this->dyna.actor.world.pos;
s32 pad;
- if ((OOT_DEBUG && (kREG(1) == 20)) || (csCurFrame == 220)) {
+ if ((DEBUG_FEATURES && (kREG(1) == 20)) || (csCurFrame == 220)) {
dustPos.x = pos->x + 256.0f;
dustPos.y = pos->y + 679.0f;
dustPos.z = pos->z + 82.0f;
@@ -529,7 +545,7 @@ void func_8097F0AC(DemoGt* this, PlayState* play) {
u16 csCurFrame = play->csCtx.curFrame;
s32 pad2;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (csCurFrame == 140 || kREG(1) == 19)
#else
if (csCurFrame == 140)
@@ -712,7 +728,7 @@ void func_8097F96C(DemoGt* this, PlayState* play) {
Actor* actor;
u16 csCurFrame = play->csCtx.curFrame;
- if (((csCurFrame > 1059) && (csCurFrame < 1062)) || (OOT_DEBUG && (kREG(1) == 17))) {
+ if (((csCurFrame > 1059) && (csCurFrame < 1062)) || (DEBUG_FEATURES && (kREG(1) == 17))) {
static Actor* cloudRing = NULL;
pos.x = this->dyna.actor.world.pos.x;
@@ -738,7 +754,7 @@ void func_8097FA1C(DemoGt* this, PlayState* play) {
Vec3f velOffset = { -12.0f, -17.0, 5.0 };
s32 pad1[3];
- if (((csCurFrame > 502) && !(csCurFrame >= 581)) || (OOT_DEBUG && (kREG(1) == 5))) {
+ if (((csCurFrame > 502) && !(csCurFrame >= 581)) || (DEBUG_FEATURES && (kREG(1) == 5))) {
dustPos.x = pos->x + 300.0f;
dustPos.y = pos->y + 360.0f;
dustPos.z = pos->z - 377.0f;
@@ -752,7 +768,7 @@ void func_8097FAFC(DemoGt* this, PlayState* play) {
Vec3f pos;
f32 new_var = -200.0;
- if (((csCurFrame > 582) && (csCurFrame < 683)) || (OOT_DEBUG && (kREG(1) == 6))) {
+ if (((csCurFrame > 582) && (csCurFrame < 683)) || (DEBUG_FEATURES && (kREG(1) == 6))) {
static Vec3f velocity = { 0.0f, 1.0f, 0.0f };
static Vec3f accel = { 0.0f, 0.0f, 0.0f };
static f32 arg4 = 280.0f;
@@ -782,7 +798,7 @@ void func_8097FC1C(DemoGt* this, PlayState* play) {
Vec3f velOffset = { 5.0f, -16.0f, -16.0f };
s32 pad1[3];
- if (csCurFrame > 682 || (OOT_DEBUG && (kREG(1) == 7))) {
+ if (csCurFrame > 682 || (DEBUG_FEATURES && (kREG(1) == 7))) {
dustPos.x = pos->x + 260.0f;
dustPos.y = pos->y + 360.0f;
dustPos.z = pos->z + 260.0f;
@@ -795,7 +811,7 @@ void func_8097FCE4(DemoGt* this, PlayState* play) {
Vec3f vec;
u16 csCurFrame = play->csCtx.curFrame;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (csCurFrame == 503 || kREG(1) == 4)
#else
if (csCurFrame == 503)
@@ -981,7 +997,7 @@ void func_80980430(DemoGt* this, PlayState* play) {
Vec3f velOffset = { 5.0f, -3.0f, 0.0f };
s32 pad1[3];
- if (csCurFrame > 709 || (OOT_DEBUG && (kREG(1) == 8))) {
+ if (csCurFrame > 709 || (DEBUG_FEATURES && (kREG(1) == 8))) {
dustPos.x = pos->x + 760.0f;
dustPos.y = pos->y - 40.0f;
dustPos.z = pos->z - 240.0f;
@@ -997,7 +1013,7 @@ void func_80980504(DemoGt* this, PlayState* play) {
Vec3f velOffset = { 5.0f, -16.0f, -16.0f };
s32 pad1[3];
- if ((csCurFrame > 704) || (OOT_DEBUG && (kREG(1) == 9))) {
+ if ((csCurFrame > 704) || (DEBUG_FEATURES && (kREG(1) == 9))) {
dustPos.x = pos->x + 830.0f;
dustPos.y = pos->y + 60.0f;
dustPos.z = pos->z + 390.0f;
@@ -1013,7 +1029,7 @@ void func_809805D8(DemoGt* this, PlayState* play) {
Vec3f velOffset = { 15.0f, -26.0, 0.0f };
s32 pad1[3];
- if (((csCurFrame > 739) && (csCurFrame < 781)) || (OOT_DEBUG && (kREG(1) == 11))) {
+ if (((csCurFrame > 739) && (csCurFrame < 781)) || (DEBUG_FEATURES && (kREG(1) == 11))) {
dustPos.x = homePos->x + 550.0f;
dustPos.y = homePos->y - 110.0f;
dustPos.z = homePos->z + 50.0f;
@@ -1029,7 +1045,7 @@ void func_809806B8(DemoGt* this, PlayState* play) {
Vec3f velOffset = { 5.0f, -16.0f, -16.0f };
s32 pad1[3];
- if ((csCurFrame > 964) || (OOT_DEBUG && (kREG(1) == 12))) {
+ if ((csCurFrame > 964) || (DEBUG_FEATURES && (kREG(1) == 12))) {
dustPos.x = pos->x + 460.0f;
dustPos.y = pos->y + 60.0f;
dustPos.z = pos->z + 760.0f;
@@ -1045,7 +1061,7 @@ void func_8098078C(DemoGt* this, PlayState* play) {
Vec3f velOffset = { 5.0f, -16.0f, -16.0f };
s32 pad1[3];
- if ((csCurFrame > 939) || (OOT_DEBUG && (kREG(1) == 14))) {
+ if ((csCurFrame > 939) || (DEBUG_FEATURES && (kREG(1) == 14))) {
dustPos.x = pos->x + 360.0f;
dustPos.y = pos->y + 70.0f;
dustPos.z = pos->z - 640.0f;
@@ -1059,7 +1075,7 @@ void func_8098085C(DemoGt* this, PlayState* play) {
u16 csCurFrame = play->csCtx.curFrame;
Vec3f* pos = &this->dyna.actor.world.pos;
- if ((csCurFrame == 58) || (OOT_DEBUG && (kREG(1) == 1))) {
+ if ((csCurFrame == 58) || (DEBUG_FEATURES && (kREG(1) == 1))) {
sp28.x = pos->x + 900.0f;
sp28.y = pos->y - 50.0f;
sp28.z = pos->z + 93.0f;
@@ -1085,7 +1101,7 @@ void func_809809C0(DemoGt* this, PlayState* play2) {
Vec3f sp54;
s16 pad[3];
- if (((csCurFrame > 469) && (csCurFrame < 481)) || (OOT_DEBUG && (kREG(1) == 3))) {
+ if (((csCurFrame > 469) && (csCurFrame < 481)) || (DEBUG_FEATURES && (kREG(1) == 3))) {
Vec3f sp40 = { 20.0f, 6.0f, 0.0f };
Vec3f sp34 = { 0.0f, 0.0f, 0.0f };
s16 pad2[3];
@@ -1105,7 +1121,7 @@ void func_80980AD4(DemoGt* this, PlayState* play) {
Vec3f pos;
u16 csCurFrame = play->csCtx.curFrame;
- if ((csCurFrame == 477) || (OOT_DEBUG && (kREG(2) == 1))) {
+ if ((csCurFrame == 477) || (DEBUG_FEATURES && (kREG(2) == 1))) {
pos.x = this->dyna.actor.world.pos.x + 790.0f;
pos.y = this->dyna.actor.world.pos.y + 60.0f;
pos.z = this->dyna.actor.world.pos.z + 23.0f;
@@ -1120,7 +1136,7 @@ void func_80980B68(DemoGt* this, PlayState* play) {
Vec3f pos;
u16 csCurFrame = play->csCtx.curFrame;
- if ((csCurFrame == 317) || (OOT_DEBUG && (kREG(3) == 1))) {
+ if ((csCurFrame == 317) || (DEBUG_FEATURES && (kREG(3) == 1))) {
pos.x = this->dyna.actor.world.pos.x + 980.0f;
pos.y = this->dyna.actor.world.pos.y + 410.0f;
pos.z = this->dyna.actor.world.pos.z - 177.0f;
@@ -1134,7 +1150,7 @@ void func_80980BFC(DemoGt* this, PlayState* play) {
Vec3f pos;
u16 csCurFrame = play->csCtx.curFrame;
- if ((csCurFrame == 740) || (OOT_DEBUG && (kREG(4) == 1))) {
+ if ((csCurFrame == 740) || (DEBUG_FEATURES && (kREG(4) == 1))) {
pos.x = this->dyna.actor.world.pos.x + 790.0f;
pos.y = this->dyna.actor.world.pos.y + 60.0f;
pos.z = this->dyna.actor.world.pos.z + 23.0f;
@@ -1339,7 +1355,7 @@ void func_80981458(DemoGt* this, PlayState* play) {
Vec3f dustPos;
u16 csCurFrame = play->csCtx.curFrame;
- if (((csCurFrame > 855) && (csCurFrame < 891)) || (OOT_DEBUG && (kREG(1) == 13))) {
+ if (((csCurFrame > 855) && (csCurFrame < 891)) || (DEBUG_FEATURES && (kREG(1) == 13))) {
Vec3f velOffset = { 0.0f, -30.0f, 0.0f };
s32 pad1[3];
@@ -1721,8 +1737,8 @@ void DemoGt_Update(Actor* thisx, PlayState* play) {
DemoGtUpdateFunc updateFunc;
if ((this->updateMode < 0) || (this->updateMode >= 19) || (updateFunc = sUpdateFuncs[this->updateMode]) == NULL) {
- // "The main mode is strange!"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
@@ -1758,8 +1774,8 @@ void DemoGt_Init(Actor* thisx, PlayState* play) {
func_80982054_Init24(this, play);
break;
default:
- // "Demo_Gt_Actor_ct There is no such argument !"
- PRINTF("Demo_Gt_Actor_ct そんな引数は無い!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
+ PRINTF(T("Demo_Gt_Actor_ct そんな引数は無い!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "Demo_Gt_Actor_ct There is no such argument!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"));
Actor_Kill(&this->dyna.actor);
}
}
@@ -1777,8 +1793,8 @@ void DemoGt_Draw(Actor* thisx, PlayState* play) {
DemoGtDrawFunc drawFunc;
if ((this->drawConfig < 0) || (this->drawConfig >= 9) || (drawFunc = sDrawFuncs[this->drawConfig]) == NULL) {
- // "The drawing mode is strange !!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
diff --git a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.h b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.h
index 18b968b15c..910c265939 100644
--- a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.h
+++ b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.h
@@ -2,12 +2,12 @@
#define Z_DEMO_GT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoGt;
-typedef void (*DemoGtUpdateFunc)(struct DemoGt*, PlayState*);
-typedef void (*DemoGtDrawFunc)(Actor*, PlayState*);
+typedef void (*DemoGtUpdateFunc)(struct DemoGt*, struct PlayState*);
+typedef void (*DemoGtDrawFunc)(struct Actor*, struct PlayState*);
typedef struct DemoGt {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c
index aefca0b560..a5dff0d4a3 100644
--- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c
+++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c
@@ -1,8 +1,19 @@
#include "z_demo_ik.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_ik/object_ik.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void DemoIk_Init(Actor* thisx, PlayState* play);
void DemoIk_Destroy(Actor* thisx, PlayState* play);
@@ -54,12 +65,12 @@ s32 DemoIk_CheckForCue(PlayState* play, u16 cueId, s32 cueChannel) {
}
void DemoIk_SetMove(DemoIk* this, PlayState* play) {
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void DemoIk_EndMove(DemoIk* this) {
- this->skelAnime.moveFlags &= ~ANIM_FLAG_UPDATE_XZ;
+ this->skelAnime.movementFlags &= ~ANIM_FLAG_UPDATE_XZ;
}
f32 DemoIk_GetCurFrame(DemoIk* this) {
@@ -159,7 +170,7 @@ void DemoIk_MoveToStartPos(DemoIk* this, PlayState* play, s32 cueChannel) {
void DemoIk_Type1Init(DemoIk* this, PlayState* play) {
s32 pad[3];
- SkeletonHeader* skeleton;
+ FlexSkeletonHeader* skeleton;
AnimationHeader* animation;
f32 phi_f0;
@@ -181,7 +192,8 @@ void DemoIk_Type1Init(DemoIk* this, PlayState* play) {
// No break is required for matching
}
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, phi_f0);
- SkelAnime_Init(play, &this->skelAnime, skeleton, NULL, this->jointTable, this->morphTable, 2);
+ //! @bug Flex skeleton is used as normal skeleton
+ SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)skeleton, NULL, this->jointTable, this->morphTable, 2);
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
}
@@ -232,8 +244,8 @@ void func_809839D0(DemoIk* this, PlayState* play) {
case 6:
break;
default:
- // "there is no such action"
- PRINTF("Demo_Ik_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Demo_Ik_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Demo_Ik_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
}
@@ -381,8 +393,8 @@ void func_80984048(DemoIk* this, PlayState* play) {
Actor_Kill(&this->actor);
break;
default:
- // "there is no such action"
- PRINTF("Demo_Ik_inFace_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Demo_Ik_inFace_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Demo_Ik_inFace_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
}
@@ -469,8 +481,8 @@ void DemoIk_Update(Actor* thisx, PlayState* play) {
if (this->actionMode < 0 || this->actionMode >= ARRAY_COUNT(sActionFuncs) ||
sActionFuncs[this->actionMode] == NULL) {
- // "The main mode is strange"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sActionFuncs[this->actionMode](this, play);
@@ -490,8 +502,8 @@ void DemoIk_Draw(Actor* thisx, PlayState* play) {
DemoIk* this = (DemoIk*)thisx;
if (this->drawMode < 0 || this->drawMode >= ARRAY_COUNT(sDrawFuncs) || sDrawFuncs[this->drawMode] == NULL) {
- // "The draw mode is strange"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sDrawFuncs[this->drawMode](this, play);
diff --git a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.h b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.h
index 3b21af5665..b4f2ca74ea 100644
--- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.h
+++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.h
@@ -2,12 +2,12 @@
#define Z_DEMO_IK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoIk;
-typedef void (*DemoIkActionFunc)(struct DemoIk* this, PlayState* play);
-typedef void (*DemoIkDrawFunc)(struct DemoIk* this, PlayState* play);
+typedef void (*DemoIkActionFunc)(struct DemoIk* this, struct PlayState* play);
+typedef void (*DemoIkDrawFunc)(struct DemoIk* this, struct PlayState* play);
typedef struct DemoIk {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
index 302bd6411e..508128f7be 100644
--- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
+++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
@@ -7,11 +7,25 @@
#include "z_demo_im.h"
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/scenes/indoors/nakaniwa/nakaniwa_scene.h"
#include "assets/objects/object_im/object_im.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void DemoIm_Init(Actor* thisx, PlayState* play);
void DemoIm_Destroy(Actor* thisx, PlayState* play);
@@ -58,7 +72,7 @@ static void* sEyeTextures[] = {
gImpaEyeClosedTex,
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static u32 D_8098783C = 0;
#endif
@@ -119,7 +133,7 @@ void func_80984BE0(DemoIm* this) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void func_80984C68(DemoIm* this) {
this->action = 7;
this->drawConfig = 0;
@@ -333,7 +347,7 @@ void func_8098544C(DemoIm* this, PlayState* play) {
Player* player = GET_PLAYER(play);
this->action = 1;
- play->csCtx.script = D_8098786C;
+ play->csCtx.script = gShadowMedallionCs;
gSaveContext.cutsceneTrigger = 2;
Item_Give(play, ITEM_MEDALLION_SHADOW);
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
@@ -500,7 +514,7 @@ void func_80985B34(DemoIm* this, PlayState* play) {
void func_80985C10(DemoIm* this, PlayState* play) {
func_80985948(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80984C8C(this, play);
#endif
}
@@ -510,7 +524,7 @@ void func_80985C40(DemoIm* this, PlayState* play) {
DemoIm_UpdateSkelAnime(this);
func_80984BE0(this);
func_809859E0(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80984C8C(this, play);
#endif
}
@@ -520,7 +534,7 @@ void func_80985C94(DemoIm* this, PlayState* play) {
DemoIm_UpdateSkelAnime(this);
func_80984BE0(this);
func_80985B34(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80984C8C(this, play);
#endif
}
@@ -633,7 +647,8 @@ void func_809861C4(DemoIm* this, PlayState* play) {
this->action = 12;
break;
default:
- PRINTF("Demo_Im_Ocarina_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Demo_Im_Ocarina_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Demo_Im_Ocarina_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
}
@@ -673,7 +688,8 @@ void func_809862E0(DemoIm* this, PlayState* play) {
func_80986148(this);
break;
default:
- PRINTF("Demo_Im_Ocarina_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Demo_Im_Ocarina_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Demo_Im_Ocarina_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
}
@@ -801,7 +817,8 @@ void func_8098680C(DemoIm* this, PlayState* play) {
Actor_Kill(&this->actor);
break;
default:
- PRINTF("Demo_Im_Spot00_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Demo_Im_Spot00_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Demo_Im_Spot00_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
}
@@ -841,7 +858,7 @@ s32 func_809869F8(DemoIm* this, PlayState* play) {
f32 playerPosX = player->actor.world.pos.x;
f32 thisPosX = this->actor.world.pos.x;
- if ((thisPosX - (kREG(16) + 30.0f) > playerPosX) && !(this->actor.flags & ACTOR_FLAG_6)) {
+ if ((thisPosX - (kREG(16) + 30.0f) > playerPosX) && !(this->actor.flags & ACTOR_FLAG_INSIDE_CULLING_VOLUME)) {
return true;
} else {
return false;
@@ -935,7 +952,7 @@ void func_80986CFC(DemoIm* this, PlayState* play) {
}
void func_80986D40(DemoIm* this, PlayState* play) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (gSaveContext.sceneLayer == 6) {
this->action = 19;
this->drawConfig = 1;
@@ -1071,7 +1088,8 @@ void func_809871E8(DemoIm* this, PlayState* play) {
func_80987174(this);
break;
default:
- PRINTF("Demo_Im_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Demo_Im_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Demo_Im_inEnding_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
}
@@ -1110,7 +1128,8 @@ void DemoIm_Update(Actor* thisx, PlayState* play) {
DemoIm* this = (DemoIm*)thisx;
if ((this->action < 0) || (this->action >= 31) || (sActionFuncs[this->action] == NULL)) {
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sActionFuncs[this->action](this, play);
@@ -1221,7 +1240,8 @@ void DemoIm_Draw(Actor* thisx, PlayState* play) {
DemoIm* this = (DemoIm*)thisx;
if ((this->drawConfig < 0) || (this->drawConfig >= 3) || (sDrawFuncs[this->drawConfig] == NULL)) {
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sDrawFuncs[this->drawConfig](this, play);
diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.h b/src/overlays/actors/ovl_Demo_Im/z_demo_im.h
index 94744969be..9477c21d8f 100644
--- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.h
+++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.h
@@ -2,12 +2,12 @@
#define Z_DEMO_IM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoIm;
-typedef void (*DemoImActionFunc)(struct DemoIm*, PlayState*);
-typedef void (*DemoImDrawFunc)(struct DemoIm*, PlayState*);
+typedef void (*DemoImActionFunc)(struct DemoIm*, struct PlayState*);
+typedef void (*DemoImDrawFunc)(struct DemoIm*, struct PlayState*);
typedef enum ImpaLimb {
/* 0x00 */ IMPA_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c
index 46b08bc125..7a9a0dde84 100644
--- a/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c
+++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c
@@ -1,12 +1,12 @@
-#include "z_demo_im.h"
+#include "sequence.h"
#include "z64cutscene_commands.h"
// clang-format off
-static CutsceneData D_8098786C[] = {
- CS_BEGIN_CUTSCENE(32, 3000),
+static CutsceneData gShadowMedallionCs[] = {
+ CS_HEADER(32, 3000),
CS_UNK_DATA_LIST(0x00000020, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(31, 5),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_6_0, 5),
CS_ACTOR_CUE(0x0001, 0, 697, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 697, 698, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 698, 768, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
@@ -16,11 +16,11 @@ static CutsceneData D_8098786C[] = {
CS_PLAYER_CUE(PLAYER_CUEID_13, 0, 300, 0x0000, 0x0000, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_PLAYER_CUE(PLAYER_CUEID_5, 300, 661, 0x0000, 0xEAAA, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_PLAYER_CUE(PLAYER_CUEID_19, 661, 1934, 0x0000, 0x6AAA, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(44, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_5_0, 3),
CS_ACTOR_CUE(0x0001, 0, 145, 0x0000, 0x0000, 0x0000, -97, 6, 169, -97, 6, 169, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 145, 615, 0x0000, 0x0000, 0x0000, -97, 6, 169, -97, 6, 169, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0003, 615, 1906, 0x0000, 0x0000, 0x0000, -97, 6, 169, -97, 6, 169, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(49, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_7_0, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, -22, 0, -55, -22, 0, -55, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_LIGHT_SETTING_LIST(2),
CS_LIGHT_SETTING(0x0001, 0, 10, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0x00000000, 0x00000000, 0x00000000),
@@ -28,26 +28,26 @@ static CutsceneData D_8098786C[] = {
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 694, 724),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 960, 990),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 683, 692),
- CS_ACTOR_CUE_LIST(62, 2),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_8_0, 2),
CS_ACTOR_CUE(0x0001, 0, 10, 0x0000, 0x0000, 0x0000, 64, 80, 130, 64, 80, 130, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 10, 3000, 0x0000, 0x0000, 0x0000, 64, 80, 130, 64, 80, 130, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_START_SEQ_LIST(1),
CS_START_SEQ(NA_BGM_MEDALLION_GET, 770, 771, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC9, 0x0000005C, 0x00000000, 0xFFFFFFC9, 0x0000005C),
CS_TEXT_LIST(14),
CS_TEXT_NONE(0, 340),
- CS_TEXT(0x5022, 340, 353, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x5022, 340, 353, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(353, 374),
- CS_TEXT(0x5025, 374, 404, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x5025, 374, 404, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(404, 424),
- CS_TEXT(0x502B, 424, 474, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x502B, 424, 474, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(474, 494),
- CS_TEXT(0x502C, 494, 543, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x502C, 494, 543, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(543, 564),
- CS_TEXT(0x5026, 564, 613, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x5026, 564, 613, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(613, 955),
- CS_TEXT(0x0041, 955, 959, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x0041, 955, 959, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(959, 1020),
- CS_TEXT(0x5023, 1020, 1029, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x5023, 1020, 1029, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_DESTINATION(CS_DEST_GRAVEYARD_FROM_CHAMBER_OF_SAGES, 1060, 1061),
CS_FADE_OUT_SEQ_LIST(1),
CS_FADE_OUT_SEQ(CS_FADE_OUT_BGM_MAIN, 673, 723, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC1, 0x00000058, 0x00000000, 0xFFFFFFC1, 0x00000058),
@@ -217,6 +217,6 @@ static CutsceneData D_8098786C[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 1000, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0xFFFF),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x0000),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0xE6A0),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
index f46760673e..5518ce754e 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
@@ -1,10 +1,31 @@
#include "z_demo_kankyo.h"
+
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
#include "z64cutscene_commands.h"
+#include "z64cutscene_flags.h"
+#include "z64cutscene_spline.h"
+#include "z64olib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_efc_star_field/object_efc_star_field.h"
#include "assets/objects/object_toki_objects/object_toki_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#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" \
+ "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:0 pal-1.1:0"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void DemoKankyo_Init(Actor* thisx, PlayState* play);
void DemoKankyo_Destroy(Actor* thisx, PlayState* play);
@@ -14,7 +35,7 @@ void DemoKankyo_Draw(Actor* thisx, PlayState* play);
void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play);
void DemoKankyo_UpdateClouds(DemoKankyo* this, PlayState* play);
void DemoKankyo_UpdateRock(DemoKankyo* this, PlayState* play);
-void DemoKankyo_DoNothing2(DemoKankyo* this, PlayState* play);
+void DemoKankyo_UpdateWarpIn(DemoKankyo* this, PlayState* play);
void DemoKankyo_UpdateDoorOfTime(DemoKankyo* this, PlayState* play);
void DemoKankyo_DoNothing(DemoKankyo* this, PlayState* play);
void DemoKankyo_KillDoorOfTimeCollision(DemoKankyo* this, PlayState* play);
@@ -232,7 +253,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) {
case DEMOKANKYO_DOOR_OF_TIME:
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 1.0f;
this->unk_150[0].unk_18 = 0.0f;
- if (!GET_EVENTCHKINF(EVENTCHKINF_4B)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_OPENED_DOOR_OF_TIME)) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_TOKI, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0x0000);
} else {
@@ -247,7 +268,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) {
case DEMOKANKYO_WARP_OUT:
case DEMOKANKYO_WARP_IN:
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ITEMACTION);
- this->actor.flags |= ACTOR_FLAG_25;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_DURING_OCARINA;
this->actor.room = -1;
this->warpTimer = 35;
this->sparkleCounter = 0;
@@ -355,7 +376,7 @@ void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play) {
}
}
gSaveContext.cutsceneTrigger = 1;
- DemoKankyo_SetupAction(this, DemoKankyo_DoNothing2);
+ DemoKankyo_SetupAction(this, DemoKankyo_UpdateWarpIn);
break;
case DEMOKANKYO_BLUE_RAIN:
case DEMOKANKYO_SPARKLES:
@@ -367,7 +388,11 @@ void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play) {
void DemoKankyo_DoNothing(DemoKankyo* this, PlayState* play) {
}
-void DemoKankyo_DoNothing2(DemoKankyo* this, PlayState* play) {
+void DemoKankyo_UpdateWarpIn(DemoKankyo* this, PlayState* play) {
+#if OOT_VERSION < PAL_1_0
+ Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP_OUT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
+ &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+#endif
DemoKankyo_SetupAction(this, DemoKankyo_DoNothing);
}
@@ -415,7 +440,7 @@ void DemoKankyo_UpdateDoorOfTime(DemoKankyo* this, PlayState* play) {
this->unk_150[0].unk_18 += 1.0f;
if (this->unk_150[0].unk_18 >= 102.0f) {
Actor_PlaySfx(&this->actor, NA_SE_EV_STONEDOOR_STOP);
- SET_EVENTCHKINF(EVENTCHKINF_4B);
+ SET_EVENTCHKINF(EVENTCHKINF_OPENED_DOOR_OF_TIME);
Actor_Kill(this->actor.child);
DemoKankyo_SetupAction(this, DemoKankyo_KillDoorOfTimeCollision);
}
@@ -798,8 +823,10 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
this->unk_150[i].unk_22++;
}
} else {
+#if OOT_VERSION >= PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP_OUT - SFX_FLAG, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+#endif
if (func_800BB2B4(&camPos, &sWarpRoll, &sWarpFoV, sWarpInCameraPoints, &this->unk_150[i].unk_20,
&this->unk_150[i].unk_1C) != 0) {
this->unk_150[i].unk_22++;
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h
index f56184bb33..06501904ac 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h
@@ -2,11 +2,11 @@
#define Z_DEMO_KANKYO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoKankyo;
-typedef void (*DemoKankyoActionFunc)(struct DemoKankyo*, PlayState*);
+typedef void (*DemoKankyoActionFunc)(struct DemoKankyo*, struct PlayState*);
typedef enum DemoKankyoType {
/* 0x00 */ DEMOKANKYO_BLUE_RAIN,
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c
index f46747a1ac..4e17a4a53c 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c
@@ -1,9 +1,8 @@
-#include "z_demo_kankyo.h"
#include "z64cutscene_commands.h"
// clang-format off
CutsceneData gAdultWarpInCS[] = {
- CS_BEGIN_CUTSCENE(2, 164),
+ CS_HEADER(2, 164),
CS_CAM_EYE_SPLINE_REL_TO_PLAYER(0, 135),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42714CA7, 60.324856f), 31, 79, 59, 0x010F),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42714CA7, 60.324856f), 31, 78, 60, 0x0120),
@@ -20,6 +19,6 @@ CutsceneData gAdultWarpInCS[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42714CA7, 60.324856f), 57, 101, 21, 0x01F6),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42714CA7, 60.324856f), 57, 101, 21, 0x0207),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42714CA7, 60.324856f), 57, 101, 21, 0x0000),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.c
index b98b849922..2a6e3f3e5d 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.c
@@ -3,7 +3,7 @@
// clang-format off
CutsceneData gAdultWarpOutCS[] = {
- CS_BEGIN_CUTSCENE(5, 1167),
+ CS_HEADER(5, 1167),
CS_CAM_EYE_SPLINE_REL_TO_PLAYER(0, 1138),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42714CA8, 60.32486f), 31, 82, 61, 0x20BA),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42714CA8, 60.32486f), 31, 82, 61, 0xA1BC),
@@ -26,6 +26,6 @@ CutsceneData gAdultWarpOutCS[] = {
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 30, 35),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 95, 97, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFE3, 0xFFFFFFF9, 0x00000000, 0xFFFFFFE3, 0xFFFFFFF9, 0x00000000, 0x00000000, 0x00000000),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.c
index 512eb4749a..e742384ec2 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.c
@@ -3,7 +3,7 @@
// clang-format off
CutsceneData gAdultWarpInToTCS[] = {
- CS_BEGIN_CUTSCENE(2, 118),
+ CS_HEADER(2, 118),
CS_CAM_EYE_SPLINE_REL_TO_PLAYER(0, 89),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x428EA647, 71.32476f), 53, 53, 40, 0x010F),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 53, 53, 40, 0x0120),
@@ -20,6 +20,6 @@ CutsceneData gAdultWarpInToTCS[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x428D3328, 70.599915f), 29, 71, 25, 0x01F6),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x428D3328, 70.599915f), 29, 71, 25, 0x0207),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x428D3328, 70.599915f), 29, 71, 25, 0x0047),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.c
index ac79db6258..53f2b5133a 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.c
@@ -3,7 +3,7 @@
// clang-format off
CutsceneData gAdultWarpOutToTCS[] = {
- CS_BEGIN_CUTSCENE(5, 1120),
+ CS_HEADER(5, 1120),
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 36, 46),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 30, 35),
CS_CAM_EYE_SPLINE_REL_TO_PLAYER(0, 1091),
@@ -20,6 +20,6 @@ CutsceneData gAdultWarpOutToTCS[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42714CA8, 60.32486f), 24, 66, 29, 0x29D0),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 95, 96, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFEE, 0xFFFFFFF3, 0x00000000, 0xFFFFFFEE, 0xFFFFFFF3, 0x00000000, 0x00000000, 0x00000000),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.c
index c0af714eba..e1092b34dd 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.c
@@ -3,7 +3,7 @@
// clang-format off
CutsceneData gChildWarpInCS[] = {
- CS_BEGIN_CUTSCENE(2, 1164),
+ CS_HEADER(2, 1164),
CS_CAM_EYE_SPLINE_REL_TO_PLAYER(0, 1135),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42714CA7, 60.324856f), 31, 68, 59, 0x010F),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42714CA7, 60.324856f), 32, 68, 60, 0x0120),
@@ -22,6 +22,6 @@ CutsceneData gChildWarpInCS[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 1000, CS_FLOAT(0x42714CA7, 60.324856f), 57, 86, 21, 0x0207),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42714CA7, 60.324856f), 57, 86, 21, 0xB46C),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42714CA7, 60.324856f), 57, 86, 21, 0x05BC),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.c
index 17db7679a1..9e8a7c6bc6 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.c
@@ -3,7 +3,7 @@
// clang-format off
CutsceneData gChildWarpOutCS[] = {
- CS_BEGIN_CUTSCENE(5, 1167),
+ CS_HEADER(5, 1167),
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 36, 46),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 30, 35),
CS_CAM_EYE_SPLINE_REL_TO_PLAYER(0, 1138),
@@ -26,6 +26,6 @@ CutsceneData gChildWarpOutCS[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42714CA9, 60.324863f), 15, 42, 30, 0xEEC0),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 95, 96, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFEF, 0xFFFFFFCD, 0x00000000, 0xFFFFFFEF, 0xFFFFFFCD, 0x00000000, 0x00000000, 0x00000000),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.c
index f5ce4770a2..3a718366c3 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.c
@@ -3,7 +3,7 @@
// clang-format off
CutsceneData gChildWarpInToTCS[] = {
- CS_BEGIN_CUTSCENE(2, 1118),
+ CS_HEADER(2, 1118),
CS_CAM_EYE_SPLINE_REL_TO_PLAYER(0, 1089),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x428EA647, 71.32476f), 53, 53, 40, 0x010F),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 53, 53, 40, 0x0120),
@@ -22,6 +22,6 @@ CutsceneData gChildWarpInToTCS[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 1000, CS_FLOAT(0x428D3328, 70.599915f), 29, 58, 25, 0x0207),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x428D3328, 70.599915f), 29, 58, 25, 0x0000),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x428D3328, 70.599915f), 29, 58, 25, 0x0000),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.c
index e61672a66a..84e12ec7a8 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.c
@@ -3,7 +3,7 @@
// clang-format off
CutsceneData gChildWarpOutToTCS[] = {
- CS_BEGIN_CUTSCENE(5, 1120),
+ CS_HEADER(5, 1120),
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 36, 46),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 30, 35),
CS_CAM_EYE_SPLINE_REL_TO_PLAYER(0, 1091),
@@ -20,6 +20,6 @@ CutsceneData gChildWarpOutToTCS[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42714CAA, 60.324867f), 24, 52, 29, 0x20DC),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 95, 96, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFDF, 0x00000019, 0x00000000, 0xFFFFFFDF, 0x00000019, 0x00000000, 0x00000000, 0x00000000),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c
index 1fe96ebb63..2a79aef458 100644
--- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c
+++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c
@@ -5,10 +5,25 @@
*/
#include "z_demo_kekkai.h"
+
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_demo_kekkai/object_demo_kekkai.h"
#include "assets/scenes/dungeons/ganontika/ganontika_scene.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void DemoKekkai_Init(Actor* thisx, PlayState* play);
void DemoKekkai_Destroy(Actor* thisx, PlayState* play);
@@ -188,7 +203,7 @@ void DemoKekkai_Update(Actor* thisx, PlayState* play2) {
if (this->energyAlpha > 0.99f) {
if ((this->collider1.base.atFlags & AT_HIT) || (this->collider2.base.atFlags & AT_HIT)) {
- func_8002F71C(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
}
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider1.base);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider1.base);
@@ -246,7 +261,7 @@ void DemoKekkai_TrialBarrierIdle(Actor* thisx, PlayState* play) {
DemoKekkai* this = (DemoKekkai*)thisx;
if (this->collider1.base.atFlags & AT_HIT) {
- func_8002F71C(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 5.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 5.0f);
}
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider1.base);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider1.base);
diff --git a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.h b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.h
index 8e396c4ec6..182b1d587c 100644
--- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.h
+++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.h
@@ -2,11 +2,11 @@
#define Z_DEMO_KEKKAI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoKekkai;
-typedef void (*DemoKekkaiUpdateFunc)(struct DemoKekkai* this, PlayState* play);
+typedef void (*DemoKekkaiUpdateFunc)(struct DemoKekkai* this, struct PlayState* play);
typedef struct DemoKekkai {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
index 478df2f3e5..5831c44b06 100644
--- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
+++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
@@ -7,11 +7,24 @@
#include "z_demo_sa.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sequence.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_sa/object_sa.h"
-#include "terminal.h"
-
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void DemoSa_Init(Actor* thisx, PlayState* play);
void DemoSa_Destroy(Actor* thisx, PlayState* play);
@@ -69,7 +82,7 @@ static void* sMouthTextures[] = {
gSariaMouthSmilingOpenTex, gSariaMouthFrowningTex,
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static u32 D_80990108 = 0;
#endif
@@ -128,7 +141,7 @@ void DemoSa_SetMouthIndex(DemoSa* this, s16 mouthIndex) {
this->mouthIndex = mouthIndex;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void func_8098E530(DemoSa* this) {
this->action = 7;
this->drawConfig = 0;
@@ -261,7 +274,7 @@ void func_8098E960(DemoSa* this, PlayState* play) {
if ((gSaveContext.chamberCutsceneNum == CHAMBER_CS_FOREST) && !IS_CUTSCENE_LAYER) {
player = GET_PLAYER(play);
this->action = 1;
- play->csCtx.script = D_8099010C;
+ play->csCtx.script = gForestMedallionCs;
gSaveContext.cutsceneTrigger = 2;
Item_Give(play, ITEM_MEDALLION_FOREST);
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
@@ -444,7 +457,7 @@ void func_8098F050(DemoSa* this, PlayState* play) {
void func_8098F0E8(DemoSa* this, PlayState* play) {
func_8098EEA8(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_8098E554(this, play);
#endif
}
@@ -454,7 +467,7 @@ void func_8098F118(DemoSa* this, PlayState* play) {
DemoSa_UpdateSkelAnime(this);
func_8098E480(this);
func_8098EEFC(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_8098E554(this, play);
#endif
}
@@ -464,7 +477,7 @@ void func_8098F16C(DemoSa* this, PlayState* play) {
DemoSa_UpdateSkelAnime(this);
func_8098EDB0(this);
func_8098F050(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_8098E554(this, play);
#endif
}
@@ -579,7 +592,8 @@ void func_8098F654(DemoSa* this, PlayState* play) {
func_8098F5D0(this);
break;
default:
- PRINTF("Demo_Sa_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Demo_Sa_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Demo_Sa_inEnding_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
}
@@ -728,7 +742,8 @@ void func_8098FB68(DemoSa* this, PlayState* play) {
func_8098FAE0(this);
break;
default:
- PRINTF("Demo_Sa_inPresent_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("Demo_Sa_inPresent_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "Demo_Sa_inPresent_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
}
@@ -768,7 +783,8 @@ void DemoSa_Update(Actor* thisx, PlayState* play) {
DemoSa* this = (DemoSa*)thisx;
if (this->action < 0 || this->action >= 21 || sActionFuncs[this->action] == NULL) {
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sActionFuncs[this->action](this, play);
@@ -838,7 +854,8 @@ void DemoSa_Draw(Actor* thisx, PlayState* play) {
DemoSa* this = (DemoSa*)thisx;
if (this->drawConfig < 0 || this->drawConfig >= 3 || sDrawFuncs[this->drawConfig] == NULL) {
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sDrawFuncs[this->drawConfig](this, play);
diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h
index 1f66c4fec3..639d50a634 100644
--- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h
+++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h
@@ -2,12 +2,12 @@
#define Z_DEMO_SA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoSa;
-typedef void (*DemoSaActionFunc)(struct DemoSa*, PlayState*);
-typedef void (*DemoSaDrawFunc)(struct DemoSa*, PlayState*);
+typedef void (*DemoSaActionFunc)(struct DemoSa*, struct PlayState*);
+typedef void (*DemoSaDrawFunc)(struct DemoSa*, struct PlayState*);
typedef struct DemoSa {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.inc.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.inc.c
index 4f0e530ac3..67edd6cb9f 100644
--- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.inc.c
+++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.inc.c
@@ -2,11 +2,11 @@
#include "z64cutscene_commands.h"
// clang-format off
-static CutsceneData D_8099010C[] = {
- CS_BEGIN_CUTSCENE(29, 3001),
+static CutsceneData gForestMedallionCs[] = {
+ CS_HEADER(29, 3001),
CS_UNK_DATA_LIST(0x00000020, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(31, 5),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_6_0, 5),
CS_ACTOR_CUE(0x0001, 0, 612, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 612, 613, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 613, 684, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
@@ -16,29 +16,29 @@ static CutsceneData D_8099010C[] = {
CS_PLAYER_CUE(PLAYER_CUEID_13, 0, 261, 0x0000, 0x0000, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_PLAYER_CUE(PLAYER_CUEID_5, 261, 600, 0x0000, 0x9555, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_PLAYER_CUE(PLAYER_CUEID_19, 600, 1243, 0x0000, 0x1555, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(43, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_4_2, 3),
CS_ACTOR_CUE(0x0001, 0, 165, 0x0000, 0x0000, 0x0000, -98, 6, -169, -98, 6, -169, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 165, 466, 0x0000, 0x0000, 0x0000, -98, 6, -169, -98, 6, -169, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0003, 466, 3001, 0x0000, 0x0000, 0x0000, -98, 6, -169, -98, 6, -169, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 590, 607),
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 617, 647),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 875, 905),
- CS_ACTOR_CUE_LIST(49, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_7_0, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, -98, 0, 98, -98, 0, 98, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(62, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_8_0, 1),
CS_ACTOR_CUE(0x0004, 0, 3000, 0x0000, 0x0000, 0x0000, -35, 97, -60, -35, 97, -60, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_DESTINATION(CS_DEST_KOKIRI_FOREST_FROM_CHAMBER_OF_SAGES, 974, 1050),
CS_TEXT_LIST(10),
CS_TEXT_NONE(0, 303),
- CS_TEXT(0x106A, 303, 323, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x106A, 303, 323, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(323, 344),
- CS_TEXT(0x108F, 344, 394, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x108F, 344, 394, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(394, 415),
- CS_TEXT(0x1090, 415, 465, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x1090, 415, 465, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(465, 871),
- CS_TEXT(0x003E, 871, 875, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x003E, 871, 875, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(875, 936),
- CS_TEXT(0x106B, 936, 946, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x106B, 936, 946, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_START_SEQ_LIST(1),
CS_START_SEQ(NA_BGM_MEDALLION_GET, 686, 687, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC5, 0x00000057, 0x00000000, 0xFFFFFFC5, 0x00000057),
CS_FADE_OUT_SEQ_LIST(1),
@@ -179,6 +179,6 @@ static CutsceneData D_8099010C[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 1000, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x006F),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x006D),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x0065),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c
index 2b373bec30..549daf0db7 100644
--- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c
+++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c
@@ -6,7 +6,14 @@
#include "z_demo_shd.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sequence.h"
+#include "sys_matrix.h"
+#include "z64audio.h"
+#include "z64play.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void DemoShd_Init(Actor* thisx, PlayState* play);
void DemoShd_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.h b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.h
index fe9198f624..eb62a3983f 100644
--- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.h
+++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.h
@@ -2,11 +2,11 @@
#define Z_DEMO_SHD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DemoShd;
-typedef void (*DemoShdActionFunc)(struct DemoShd*, PlayState*);
+typedef void (*DemoShdActionFunc)(struct DemoShd*, struct PlayState*);
typedef struct DemoShd {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c
index d71810b23d..992417b888 100644
--- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c
+++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c
@@ -1,8 +1,18 @@
#include "z_demo_tre_lgt.h"
#include "overlays/actors/ovl_En_Box/z_en_box.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z64curve.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_box/object_box.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void DemoTreLgt_Init(Actor* thisx, PlayState* play);
void DemoTreLgt_Destroy(Actor* thisx, PlayState* play);
@@ -49,8 +59,7 @@ void DemoTreLgt_Init(Actor* thisx, PlayState* play) {
DemoTreLgt* this = (DemoTreLgt*)thisx;
if (!SkelCurve_Init(play, &this->skelCurve, &gTreasureChestCurveSkel, sAnimations[0])) {
- // "Demo_Tre_Lgt_Actor_ct (); Construct failed"
- PRINTF("Demo_Tre_Lgt_Actor_ct();コンストラクト失敗\n");
+ PRINTF(T("Demo_Tre_Lgt_Actor_ct();コンストラクト失敗\n", "Demo_Tre_Lgt_Actor_ct(); Construct failed\n"));
}
ASSERT(true, "1", "../z_demo_tre_lgt.c", UNK_LINE);
diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.h b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.h
index 0cad6996d9..47f6c35642 100644
--- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.h
+++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.h
@@ -2,11 +2,12 @@
#define Z_DEMO_TRE_LGT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64curve.h"
struct DemoTreLgt;
-typedef void (*DemoTreLgtActionFunc)(struct DemoTreLgt*, PlayState*);
+typedef void (*DemoTreLgtActionFunc)(struct DemoTreLgt*, struct PlayState*);
typedef struct DemoTreLgt {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c
index 7ad6013661..4034dafc91 100644
--- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c
+++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c
@@ -5,9 +5,20 @@
*/
#include "z_door_ana.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64cutscene_flags.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
-#define FLAGS ACTOR_FLAG_25
+#define FLAGS ACTOR_FLAG_UPDATE_DURING_OCARINA
void DoorAna_Init(Actor* thisx, PlayState* play);
void DoorAna_Destroy(Actor* thisx, PlayState* play);
@@ -72,7 +83,7 @@ void DoorAna_Init(Actor* thisx, PlayState* play) {
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
} else {
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
Actor_SetScale(&this->actor, 0);
DoorAna_SetupAction(this, DoorAna_WaitClosed);
@@ -99,7 +110,7 @@ void DoorAna_WaitClosed(DoorAna* this, PlayState* play) {
// opening with song of storms
if (this->actor.xyzDistToPlayerSq < SQ(200.0f) && CutsceneFlags_Get(play, 5)) {
openGrotto = true;
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
} else {
// bombing/hammering open a grotto
@@ -131,7 +142,8 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
if ((this->actor.attentionRangeType != 0) && (play->transitionTrigger == TRANS_TRIGGER_OFF) &&
(player->stateFlags1 & PLAYER_STATE1_31) && (player->av1.actionVar1 == 0)) {
destinationIdx = PARAMS_GET_U(this->actor.params, 12, 3) - 1;
- Play_SetupRespawnPoint(play, RESPAWN_MODE_RETURN, 0x4FF);
+ Play_SetupRespawnPoint(play, RESPAWN_MODE_RETURN,
+ PLAYER_PARAMS(PLAYER_START_MODE_GROTTO, PLAYER_START_BG_CAM_DEFAULT));
gSaveContext.respawn[RESPAWN_MODE_RETURN].pos.y = this->actor.world.pos.y;
gSaveContext.respawn[RESPAWN_MODE_RETURN].yaw = this->actor.home.rot.y;
gSaveContext.respawn[RESPAWN_MODE_RETURN].data = PARAMS_GET_U(this->actor.params, 0, 16);
diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.h b/src/overlays/actors/ovl_Door_Ana/z_door_ana.h
index 51c24b84af..0092bd8f1a 100644
--- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.h
+++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.h
@@ -2,11 +2,11 @@
#define Z_DOOR_ANA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DoorAna;
-typedef void (*DoorAnaActionFunc)(struct DoorAna*, PlayState*);
+typedef void (*DoorAnaActionFunc)(struct DoorAna*, struct PlayState*);
typedef struct DoorAna {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c
index 360f4aedec..2f9f4e1183 100644
--- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c
+++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c
@@ -5,6 +5,17 @@
*/
#include "z_door_gerudo.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_door_gerudo/object_door_gerudo.h"
#define FLAGS 0
diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.h b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.h
index c00a0fa669..efd2959767 100644
--- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.h
+++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.h
@@ -2,11 +2,11 @@
#define Z_DOOR_GERUDO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DoorGerudo;
-typedef void (*DoorGerudoActionFunc)(struct DoorGerudo*, PlayState*);
+typedef void (*DoorGerudoActionFunc)(struct DoorGerudo*, struct PlayState*);
typedef struct DoorGerudo {
/* 0x0000 */ SLIDING_DOOR_ACTOR_BASE;
diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
index a8ca1c5cd3..15d92cb18a 100644
--- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
+++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
@@ -5,13 +5,25 @@
*/
#include "z_door_killer.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#include "assets/objects/object_mizu_objects/object_mizu_objects.h"
#include "assets/objects/object_haka_door/object_haka_door.h"
#include "assets/objects/object_door_killer/object_door_killer.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum DoorKillerBehaviour {
/* 0 */ DOOR_KILLER_DOOR,
@@ -61,7 +73,7 @@ static ColliderCylinderInit sCylinderInit = {
{ 20, 100, 0, { 0, 0, 0 } },
};
-static ColliderJntSphElementInit sJntSphItemsInit[1] = {
+static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -85,7 +97,7 @@ static ColliderJntSphInit sJntSphInit = {
COLSHAPE_JNTSPH,
},
1,
- sJntSphItemsInit,
+ sJntSphElementsInit,
};
static DoorKillerTextureEntry sDoorTextures[4] = {
@@ -137,7 +149,7 @@ void DoorKiller_Init(Actor* thisx, PlayState* play2) {
Collider_InitCylinder(play, &this->colliderCylinder);
Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit);
Collider_InitJntSph(play, &this->colliderJntSph);
- Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphItems);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
this->colliderJntSph.elements[0].dim.worldSphere.radius = 80;
this->colliderJntSph.elements[0].dim.worldSphere.center.x = (s16)this->actor.world.pos.x;
this->colliderJntSph.elements[0].dim.worldSphere.center.y = (s16)this->actor.world.pos.y + 50;
@@ -353,7 +365,7 @@ void DoorKiller_FallOver(DoorKiller* this, PlayState* play) {
if ((fabsf(playerPosRelToDoor.y) < 20.0f) && (fabsf(playerPosRelToDoor.x) < 20.0f) &&
(playerPosRelToDoor.z < 100.0f) && (playerPosRelToDoor.z > 0.0f)) {
this->hasHitPlayerOrGround |= 1;
- func_8002F6D4(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f, 16);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f, 0x10);
Actor_PlaySfx(&this->actor, NA_SE_EN_KDOOR_HIT);
Player_PlaySfx(player, NA_SE_PL_BODY_HIT);
}
@@ -460,9 +472,9 @@ void DoorKiller_Wait(DoorKiller* this, PlayState* play) {
void DoorKiller_UpdateTexture(Actor* thisx, PlayState* play) {
DoorKiller* this = (DoorKiller*)thisx;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
this->texture = SEGMENTED_TO_VIRTUAL(this->texture);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
}
/**
diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.h b/src/overlays/actors/ovl_Door_Killer/z_door_killer.h
index 597624df1e..32eaaeb014 100644
--- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.h
+++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.h
@@ -2,7 +2,7 @@
#define Z_DOOR_KILLER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
/*
* Associated switch flag: (params >> 8) & 0x3F
@@ -16,7 +16,7 @@ typedef struct DoorKillerTextureEntry {
struct DoorKiller;
-typedef void (*DoorKillerActionFunc)(struct DoorKiller*, PlayState*);
+typedef void (*DoorKillerActionFunc)(struct DoorKiller*, struct PlayState*);
typedef struct DoorKiller {
/* 0x0000 */ DOOR_ACTOR_BASE;
@@ -28,7 +28,7 @@ typedef struct DoorKiller {
/* 0x021C */ u8 requiredObjectSlot;
/* 0x021D */ u8 textureEntryIndex;
/* 0x0220 */ ColliderJntSph colliderJntSph;
- /* 0x0240 */ ColliderJntSphElement colliderJntSphItems[1];
+ /* 0x0240 */ ColliderJntSphElement colliderJntSphElements[1];
/* 0x0280 */ DoorKillerActionFunc actionFunc;
} DoorKiller; // size = 0x0284
diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c
index ecdf5ef649..05eec20ffa 100644
--- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c
+++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c
@@ -6,14 +6,31 @@
#include "z_door_shutter.h"
#include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h"
-#include "quake.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "quake.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_gnd/object_gnd.h"
#include "assets/objects/object_goma/object_goma.h"
#include "assets/objects/object_ydan_objects/object_ydan_objects.h"
#include "assets/objects/object_ddan_objects/object_ddan_objects.h"
#include "assets/objects/object_bdan_objects/object_bdan_objects.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_bdoor/object_bdoor.h"
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#include "assets/objects/object_ganon_objects/object_ganon_objects.h"
@@ -25,7 +42,7 @@
#include "assets/objects/object_demo_kekkai/object_demo_kekkai.h"
#include "assets/objects/object_ouke_haka/object_ouke_haka.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void DoorShutter_Init(Actor* thisx, PlayState* play2);
void DoorShutter_Destroy(Actor* thisx, PlayState* play);
@@ -225,14 +242,22 @@ typedef struct DoorShutterGfxInfo {
} DoorShutterGfxInfo;
static DoorShutterGfxInfo sGfxInfo[] = {
- { gDTDungeonDoor1DL, gDoorMetalBarsDL, 130, 12, 20, 15 }, // DOORSHUTTER_GFX_DEKU_TREE_1
- { gDTDungeonDoor2DL, gDoorMetalBarsDL, 130, 12, 20, 15 }, // DOORSHUTTER_GFX_DEKU_TREE_2
- { gDodongoDoorDL, gDodongoBarsDL, 240, 14, 70, 15 }, // DOORSHUTTER_GFX_DODONGOS_CAVERN
- { gJabuDoorSection1DL, gJabuWebDoorDL, 0, 110, 50, 15 }, // DOORSHUTTER_GFX_JABU_JABU
- { gPhantomGanonBarsDL, NULL, 130, 12, 50, 15 }, // DOORSHUTTER_GFX_PHANTOM_GANON_BARS
- { gGohmaDoorDL, NULL, 130, 12, 50, 15 }, // DOORSHUTTER_GFX_GOHMA_BLOCK
- { gSpiritDoorDL, gJyaDoorMetalBarsDL, 240, 14, 50, 15 }, // DOORSHUTTER_GFX_SPIRIT_TEMPLE
- { gBossDoorDL, NULL, 130, 12, 50, 15 }, // DOORSHUTTER_GFX_BOSS_DOOR
+ { gDTDungeonDoor1DL, gDoorMetalBarsDL, 130, 12, 20, 15 }, // DOORSHUTTER_GFX_DEKU_TREE_1
+ { gDTDungeonDoor2DL, gDoorMetalBarsDL, 130, 12, 20, 15 }, // DOORSHUTTER_GFX_DEKU_TREE_2
+ { gDodongoDoorDL, gDodongoBarsDL, 240, 14, 70, 15 }, // DOORSHUTTER_GFX_DODONGOS_CAVERN
+#if OOT_VERSION < NTSC_1_1
+ { gJabuDoorSection1DL, gJabuWebDoorDL, 0, 110, 70, 15 }, // DOORSHUTTER_GFX_JABU_JABU
+ { gPhantomGanonBarsDL, NULL, 130, 12, 70, 15 }, // DOORSHUTTER_GFX_PHANTOM_GANON_BARS
+ { gGohmaDoorDL, NULL, 130, 12, 70, 15 }, // DOORSHUTTER_GFX_GOHMA_BLOCK
+ { gSpiritDoorDL, gJyaDoorMetalBarsDL, 240, 14, 50, 15 }, // DOORSHUTTER_GFX_SPIRIT_TEMPLE
+ { gBossDoorDL, NULL, 130, 12, 70, 15 }, // DOORSHUTTER_GFX_BOSS_DOOR
+#else
+ { gJabuDoorSection1DL, gJabuWebDoorDL, 0, 110, 50, 15 }, // DOORSHUTTER_GFX_JABU_JABU
+ { gPhantomGanonBarsDL, NULL, 130, 12, 50, 15 }, // DOORSHUTTER_GFX_PHANTOM_GANON_BARS
+ { gGohmaDoorDL, NULL, 130, 12, 50, 15 }, // DOORSHUTTER_GFX_GOHMA_BLOCK
+ { gSpiritDoorDL, gJyaDoorMetalBarsDL, 240, 14, 50, 15 }, // DOORSHUTTER_GFX_SPIRIT_TEMPLE
+ { gBossDoorDL, NULL, 130, 12, 50, 15 }, // DOORSHUTTER_GFX_BOSS_DOOR
+#endif
{ gDungeonDoorDL, gDoorMetalBarsDL, 130, 12, 20, 15 }, // DOORSHUTTER_GFX_GENERIC
{ gFireTempleDoorFrontDL, gDoorMetalBarsDL, 130, 12, 20, 15 }, // DOORSHUTTER_GFX_FIRE_TEMPLE_1
{ gFireTempleDoorBackDL, gDoorMetalBarsDL, 130, 12, 20, 15 }, // DOORSHUTTER_GFX_FIRE_TEMPLE_2
@@ -264,9 +289,9 @@ static s8 sTypeStyles[] = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F(scale, 1, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 400, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 100, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 400, ICHAIN_STOP),
};
typedef struct DoorShutterSceneInfo {
@@ -448,7 +473,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) {
} else if (styleType == DOORSHUTTER_STYLE_JABU_JABU) {
Actor_SetScale(&this->dyna.actor, 0.1f);
this->jabuDoorClosedAmount = 100;
- this->dyna.actor.uncullZoneScale = 200.0f;
+ this->dyna.actor.cullingVolumeScale = 200.0f;
Actor_SetFocus(&this->dyna.actor, 0.0f);
} else {
Actor_SetFocus(&this->dyna.actor, 60.0f);
@@ -812,11 +837,12 @@ void DoorShutter_SetupClosed(DoorShutter* this, PlayState* play) {
play->roomCtx.activeBufPage ^= 1;
}
Room_FinishRoomChange(play, &play->roomCtx);
- Play_SetupRespawnPoint(play, RESPAWN_MODE_DOWN, 0x0EFF);
+ Play_SetupRespawnPoint(play, RESPAWN_MODE_DOWN,
+ PLAYER_PARAMS(PLAYER_START_MODE_MOVE_FORWARD_SLOW, PLAYER_START_BG_CAM_DEFAULT));
}
this->isActive = false;
this->dyna.actor.velocity.y = 0.0f;
- if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY)) {
+ if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) {
// The door is barred behind the player
DoorShutter_SetupAction(this, DoorShutter_WaitPlayerSurprised);
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_2);
@@ -869,7 +895,7 @@ void DoorShutter_GohmaBlockFall(DoorShutter* this, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
if (this->dyna.actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
DoorShutter_SetupAction(this, DoorShutter_GohmaBlockBounce);
- if (!GET_EVENTCHKINF(EVENTCHKINF_70)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GOHMA_BATTLE)) {
BossGoma* parent = (BossGoma*)this->dyna.actor.parent;
this->isActive = 10;
@@ -906,7 +932,7 @@ void DoorShutter_Update(Actor* thisx, PlayState* play) {
DoorShutter* this = (DoorShutter*)thisx;
Player* player = GET_PLAYER(play);
- if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28)) ||
+ if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_10 | PLAYER_STATE1_28)) ||
(this->actionFunc == DoorShutter_WaitForObject)) {
this->actionFunc(this, play);
}
diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.h b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.h
index 83660c5930..8ab1c8a4c7 100644
--- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.h
+++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.h
@@ -2,7 +2,7 @@
#define Z_DOOR_SHUTTER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
/**
* Actor Parameters
@@ -39,7 +39,7 @@ typedef enum DoorShutterType {
struct DoorShutter;
-typedef void (*DoorShutterActionFunc)(struct DoorShutter*, PlayState*);
+typedef void (*DoorShutterActionFunc)(struct DoorShutter*, struct PlayState*);
typedef struct DoorShutter {
/* 0x0000 */ SLIDING_DOOR_ACTOR_BASE;
diff --git a/src/overlays/actors/ovl_Door_Toki/z_door_toki.c b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c
index e2e6ada56b..ceef1f93f6 100644
--- a/src/overlays/actors/ovl_Door_Toki/z_door_toki.c
+++ b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c
@@ -5,6 +5,11 @@
*/
#include "z_door_toki.h"
+
+#include "ichain.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_toki_objects/object_toki_objects.h"
#define FLAGS 0
@@ -49,7 +54,7 @@ void DoorToki_Destroy(Actor* thisx, PlayState* play) {
void DoorToki_Update(Actor* thisx, PlayState* play) {
DoorToki* this = (DoorToki*)thisx;
- if (GET_EVENTCHKINF(EVENTCHKINF_4B)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_OPENED_DOOR_OF_TIME)) {
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
} else {
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
diff --git a/src/overlays/actors/ovl_Door_Toki/z_door_toki.h b/src/overlays/actors/ovl_Door_Toki/z_door_toki.h
index 35d4d4f91c..8e276c56bd 100644
--- a/src/overlays/actors/ovl_Door_Toki/z_door_toki.h
+++ b/src/overlays/actors/ovl_Door_Toki/z_door_toki.h
@@ -2,7 +2,7 @@
#define Z_DOOR_TOKI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct DoorToki;
diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
index b5ff0dbaaf..1ec17157c9 100644
--- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
+++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
@@ -1,6 +1,26 @@
#include "z_door_warp1.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_warp1/object_warp1.h"
+#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" \
+ "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
+
#define FLAGS 0
void DoorWarp1_Init(Actor* thisx, PlayState* play);
@@ -46,9 +66,9 @@ ActorProfile Door_Warp1_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 4000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 4000, ICHAIN_STOP),
};
static s16 sWarpTimerTarget;
@@ -490,7 +510,9 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
this->warpTimer++;
if (sWarpTimerTarget < this->warpTimer && gSaveContext.nextCutsceneIndex == 0xFFEF) {
- PRINTF("\n\n\nじかんがきたからおーしまい fade_direction=[%d]", play->transitionTrigger, TRANS_TRIGGER_START);
+ PRINTF(T("\n\n\nじかんがきたからおーしまい fade_direction=[%d]",
+ "\n\n\nThe time has come, so it's over. fade_direction=[%d]"),
+ play->transitionTrigger, TRANS_TRIGGER_START);
if (play->sceneId == SCENE_DODONGOS_CAVERN_BOSS) {
if (!Flags_GetEventChkInf(EVENTCHKINF_25)) {
@@ -517,7 +539,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
play->nextEntranceIndex = ENTR_ZORAS_FOUNTAIN_0;
gSaveContext.nextCutsceneIndex = 0;
}
- PRINTF("\n\n\nおわりおわり");
+ PRINTF(T("\n\n\nおわりおわり", "\n\n\nThe end The end"));
play->transitionTrigger = TRANS_TRIGGER_START;
play->transitionType = TRANS_TYPE_FADE_WHITE_SLOW;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h
index b41e952e89..ff8a89d9b1 100644
--- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h
+++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.h
@@ -2,7 +2,8 @@
#define Z_DOOR_WARP1_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct DoorWarp1;
@@ -31,7 +32,7 @@ typedef enum DoorWarp1RutoState {
/* 5 */ WARP_BLUE_RUTO_STATE_WARPING // set by warp, after closing dialog
} DoorWarp1RutoState;
-typedef void (*DoorWarp1ActionFunc)(struct DoorWarp1*, PlayState*);
+typedef void (*DoorWarp1ActionFunc)(struct DoorWarp1*, struct PlayState*);
typedef struct DoorWarp1 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c
index 3aa35ec587..677458f186 100644
--- a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c
+++ b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c
@@ -1,7 +1,19 @@
#include "z_efc_erupc.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sequence.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_efc_erupc/object_efc_erupc.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EfcErupc_Init(Actor* thisx, PlayState* play);
void EfcErupc_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.h b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.h
index 6d14c32d76..888d9580ef 100644
--- a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.h
+++ b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.h
@@ -2,11 +2,11 @@
#define Z_EFC_ERUPC_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EfcErupc;
-typedef void (*EfcErupcActionFunc)(struct EfcErupc*, PlayState*);
+typedef void (*EfcErupcActionFunc)(struct EfcErupc*, struct PlayState*);
#define EFC_ERUPC_EFFECT_COUNT 100
diff --git a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c
index 907f6d096d..e8f9f26841 100644
--- a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c
+++ b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c
@@ -5,9 +5,21 @@
*/
#include "z_eff_dust.h"
+
+#include "libc64/malloc.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EffDust_Init(Actor* thisx, PlayState* play);
void EffDust_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.h b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.h
index e77a8e0223..153b6d4e2a 100644
--- a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.h
+++ b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.h
@@ -2,12 +2,12 @@
#define Z_EFF_DUST_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EffDust;
-typedef void (*EffDustActionFunc)(struct EffDust*, PlayState*);
-typedef void (*EffDustDrawFunc)(Actor*, PlayState*);
+typedef void (*EffDustActionFunc)(struct EffDust*, struct PlayState*);
+typedef void (*EffDustDrawFunc)(Actor*, struct PlayState*);
typedef struct EffDust {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c
index 36c2b4b9d7..1c74a38432 100644
--- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c
+++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c
@@ -5,15 +5,27 @@
*/
#include "z_elf_msg.h"
+
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "regs.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void ElfMsg_Init(Actor* thisx, PlayState* play);
void ElfMsg_Destroy(Actor* thisx, PlayState* play);
void ElfMsg_Update(Actor* thisx, PlayState* play);
-#if OOT_DEBUG
+#if DEBUG_ASSETS
void ElfMsg_Draw(Actor* thisx, PlayState* play);
#endif
@@ -29,7 +41,7 @@ ActorProfile Elf_Msg_Profile = {
/**/ ElfMsg_Init,
/**/ ElfMsg_Destroy,
/**/ ElfMsg_Update,
-#if OOT_DEBUG
+#if DEBUG_ASSETS
/**/ ElfMsg_Draw,
#else
/**/ NULL,
@@ -38,7 +50,7 @@ ActorProfile Elf_Msg_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_STOP),
};
void ElfMsg_SetupAction(ElfMsg* this, ElfMsgActionFunc actionFunc) {
@@ -77,12 +89,12 @@ s32 ElfMsg_KillCheck(ElfMsg* this, PlayState* play) {
void ElfMsg_Init(Actor* thisx, PlayState* play) {
ElfMsg* this = (ElfMsg*)thisx;
- // "Conditions for Elf Tag disappearing"
- PRINTF(VT_FGCOL(CYAN) "\nエルフ タグ 消える条件 %d" VT_RST "\n", PARAMS_GET_U(thisx->params, 8, 6));
+ PRINTF(VT_FGCOL(CYAN) T("\nエルフ タグ 消える条件 %d", "\nConditions for Elf Tag disappearing %d") VT_RST "\n",
+ PARAMS_GET_U(thisx->params, 8, 6));
PRINTF(VT_FGCOL(CYAN) "\nthisx->shape.angle.sy = %d\n" VT_RST, thisx->shape.rot.y);
if (thisx->shape.rot.y >= 0x41) {
- // "Conditions for Elf Tag appearing"
- PRINTF(VT_FGCOL(CYAN) "\nエルフ タグ 出現条件 %d" VT_RST "\n", thisx->shape.rot.y - 0x41);
+ PRINTF(VT_FGCOL(CYAN) T("\nエルフ タグ 出現条件 %d", "\nConditions for Elf Tag appearing %d") VT_RST "\n",
+ thisx->shape.rot.y - 0x41);
}
if (!ElfMsg_KillCheck(this, play)) {
@@ -169,7 +181,7 @@ void ElfMsg_Update(Actor* thisx, PlayState* play) {
}
}
-#if OOT_DEBUG
+#if DEBUG_ASSETS
#include "assets/overlays/ovl_Elf_Msg/ovl_Elf_Msg.c"
void ElfMsg_Draw(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.h b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.h
index ba523060f1..c95cbb527f 100644
--- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.h
+++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.h
@@ -2,11 +2,11 @@
#define Z_ELF_MSG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ElfMsg;
-typedef void (*ElfMsgActionFunc)(struct ElfMsg*, PlayState*);
+typedef void (*ElfMsgActionFunc)(struct ElfMsg*, struct PlayState*);
typedef struct ElfMsg {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c
index db594cfac5..f6beb6cc82 100644
--- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c
+++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c
@@ -5,14 +5,23 @@
*/
#include "z_elf_msg2.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "regs.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z64play.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void ElfMsg2_Init(Actor* thisx, PlayState* play);
void ElfMsg2_Destroy(Actor* thisx, PlayState* play);
void ElfMsg2_Update(Actor* thisx, PlayState* play);
-#if OOT_DEBUG
+#if DEBUG_ASSETS
void ElfMsg2_Draw(Actor* thisx, PlayState* play);
#endif
@@ -29,7 +38,7 @@ ActorProfile Elf_Msg2_Profile = {
/**/ ElfMsg2_Init,
/**/ ElfMsg2_Destroy,
/**/ ElfMsg2_Update,
-#if OOT_DEBUG
+#if DEBUG_ASSETS
/**/ ElfMsg2_Draw,
#else
/**/ NULL,
@@ -38,7 +47,7 @@ ActorProfile Elf_Msg2_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_STOP),
};
void ElfMsg2_SetupAction(ElfMsg2* this, ElfMsg2ActionFunc actionFunc) {
@@ -88,8 +97,7 @@ void ElfMsg2_Init(Actor* thisx, PlayState* play) {
ElfMsg2_SetupAction(this, ElfMsg2_WaitUntilActivated);
} else {
ElfMsg2_SetupAction(this, ElfMsg2_WaitForTextRead);
- this->actor.flags |=
- ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_18; // Make actor targetable and Navi-checkable
+ this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP;
this->actor.textId = ElfMsg2_GetMessageId(this);
}
this->actor.shape.rot.x = this->actor.shape.rot.y = this->actor.shape.rot.z = 0;
@@ -141,7 +149,7 @@ void ElfMsg2_WaitUntilActivated(ElfMsg2* this, PlayState* play) {
if ((this->actor.world.rot.y >= 0x41) && (this->actor.world.rot.y <= 0x80) &&
(Flags_GetSwitch(play, (this->actor.world.rot.y - 0x41)))) {
ElfMsg2_SetupAction(this, ElfMsg2_WaitForTextRead);
- this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_18; // Make actor targetable and Navi-checkable
+ this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP;
this->actor.textId = ElfMsg2_GetMessageId(this);
}
}
@@ -154,7 +162,7 @@ void ElfMsg2_Update(Actor* thisx, PlayState* play) {
}
}
-#if OOT_DEBUG
+#if DEBUG_ASSETS
#include "assets/overlays/ovl_Elf_Msg2/ovl_Elf_Msg2.c"
void ElfMsg2_Draw(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.h b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.h
index 802769f2b7..5a0a693415 100644
--- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.h
+++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.h
@@ -2,11 +2,11 @@
#define Z_ELF_MSG2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ElfMsg2;
-typedef void (*ElfMsg2ActionFunc)(struct ElfMsg2*, PlayState*);
+typedef void (*ElfMsg2ActionFunc)(struct ElfMsg2*, struct PlayState*);
typedef struct ElfMsg2 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.c b/src/overlays/actors/ovl_En_Am/z_en_am.c
index 69a27936d9..3f7649ea7e 100644
--- a/src/overlays/actors/ovl_En_Am/z_en_am.c
+++ b/src/overlays/actors/ovl_En_Am/z_en_am.c
@@ -5,10 +5,26 @@
*/
#include "z_en_am.h"
-#include "assets/objects/object_am/object_am.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_26)
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_am/object_am.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_CAN_PRESS_SWITCHES)
void EnAm_Init(Actor* thisx, PlayState* play);
void EnAm_Destroy(Actor* thisx, PlayState* play);
@@ -112,7 +128,7 @@ static ColliderQuadInit sQuadInit = {
};
typedef enum ArmosDamageEffect {
- /* 0 */ AM_DMGEFF_NONE, // used by anything that cant kill the armos
+ /* 0 */ AM_DMGEFF_NONE, // used by anything that can't kill the armos
/* 1 */ AM_DMGEFF_NUT,
/* 6 */ AM_DMGEFF_STUN = 6, // doesn't include deku nuts
/* 13 */ AM_DMGEFF_ICE = 13,
diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.h b/src/overlays/actors/ovl_En_Am/z_en_am.h
index 8bac3338da..2903a3b6ea 100644
--- a/src/overlays/actors/ovl_En_Am/z_en_am.h
+++ b/src/overlays/actors/ovl_En_Am/z_en_am.h
@@ -2,11 +2,11 @@
#define Z_EN_AM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnAm;
-typedef void (*EnAmActionFunc)(struct EnAm*, PlayState*);
+typedef void (*EnAmActionFunc)(struct EnAm*, struct PlayState*);
typedef struct EnAm {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c
index 6b493aa874..8bfcc38fac 100644
--- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c
+++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c
@@ -5,6 +5,18 @@
*/
#include "z_en_ani.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_ani/object_ani.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -64,7 +76,7 @@ void EnAni_SetupAction(EnAni* this, EnAniActionFunc actionFunc) {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 850, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 850, ICHAIN_STOP),
};
void EnAni_Init(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.h b/src/overlays/actors/ovl_En_Ani/z_en_ani.h
index 99bad6e1cc..454a7bd8d2 100644
--- a/src/overlays/actors/ovl_En_Ani/z_en_ani.h
+++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.h
@@ -2,11 +2,11 @@
#define Z_EN_ANI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnAni;
-typedef void (*EnAniActionFunc)(struct EnAni*, PlayState*);
+typedef void (*EnAniActionFunc)(struct EnAni*, struct PlayState*);
typedef struct EnAni {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c
index f6742f9810..a37aae8954 100644
--- a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c
+++ b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c
@@ -5,12 +5,28 @@
*/
#include "z_en_anubice.h"
-#include "assets/objects/object_anubice/object_anubice.h"
#include "overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.h"
#include "overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#include "libc64/math64.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_anubice/object_anubice.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnAnubice_Init(Actor* thisx, PlayState* play);
void EnAnubice_Destroy(Actor* thisx, PlayState* play);
@@ -132,8 +148,7 @@ void EnAnubice_Init(Actor* thisx, PlayState* play) {
ANUBICE_LIMB_MAX);
PRINTF("\n\n");
- // "☆☆☆☆☆ Anubis occurence ☆☆☆☆☆"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ アヌビス発生 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ アヌビス発生 ☆☆☆☆☆ \n", "☆☆☆☆☆ Anubis occurrence ☆☆☆☆☆ \n") VT_RST);
this->actor.naviEnemyId = NAVI_ENEMY_ANUBIS;
@@ -181,9 +196,9 @@ void EnAnubice_FindFlameCircles(EnAnubice* this, PlayState* play) {
currentProp = currentProp->next;
} else {
this->flameCircles[flameCirclesFound] = (BgHidanCurtain*)currentProp;
- // "☆☆☆☆☆ How many fires? ☆☆☆☆☆"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 火は幾つ? ☆☆☆☆☆ %d\n" VT_RST, flameCirclesFound);
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ 火は幾つ? ☆☆☆☆☆ %x\n" VT_RST,
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 火は幾つ? ☆☆☆☆☆ %d\n", "☆☆☆☆☆ How many fires? ☆☆☆☆☆ %d\n") VT_RST,
+ flameCirclesFound);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ 火は幾つ? ☆☆☆☆☆ %x\n", "☆☆☆☆☆ How many fires? ☆☆☆☆☆ %x\n") VT_RST,
this->flameCircles[flameCirclesFound]);
if (flameCirclesFound < ARRAY_COUNT(this->flameCircles) - 1) {
flameCirclesFound++;
diff --git a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.h b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.h
index 5f3ec8b134..51cd02d1ef 100644
--- a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.h
+++ b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.h
@@ -2,8 +2,7 @@
#define Z_EN_ANUBICE_H
#include "ultra64.h"
-#include "global.h"
-#include "overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.h"
+#include "z64actor.h"
struct EnAnubice;
@@ -54,7 +53,7 @@ typedef struct EnAnubice {
/* 0x028C */ Vec3f fireballRot;
/* 0x0298 */ Vec3f home;
/* 0x02A4 */ Vec3f knockbackRecoveryVelocity;
- /* 0x02B0 */ BgHidanCurtain* flameCircles[5];
+ /* 0x02B0 */ struct BgHidanCurtain* flameCircles[5];
/* 0x02C4 */ char unk_2C4[0x4]; // Possibly another element of flameCircles
/* 0x02C8 */ ColliderCylinder collider;
} EnAnubice; // size = 0x0314
diff --git a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c
index 1b2a1e0185..480940dc44 100644
--- a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c
+++ b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c
@@ -5,10 +5,23 @@
*/
#include "z_en_anubice_fire.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_anubice/object_anubice.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnAnubiceFire_Init(Actor* thisx, PlayState* play);
void EnAnubiceFire_Destroy(Actor* thisx, PlayState* play);
@@ -55,8 +68,8 @@ void EnAnubiceFire_Init(Actor* thisx, PlayState* play) {
EnAnubiceFire* this = (EnAnubiceFire*)thisx;
s32 i;
- Collider_InitCylinder(play, &this->cylinder);
- Collider_SetCylinder(play, &this->cylinder, &this->actor, &sCylinderInit);
+ Collider_InitCylinder(play, &this->colliderCylinder);
+ Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit);
this->unk_15A = 30;
this->unk_154 = 2.0f;
@@ -73,7 +86,7 @@ void EnAnubiceFire_Init(Actor* thisx, PlayState* play) {
void EnAnubiceFire_Destroy(Actor* thisx, PlayState* play) {
EnAnubiceFire* this = (EnAnubiceFire*)thisx;
- Collider_DestroyCylinder(play, &this->cylinder);
+ Collider_DestroyCylinder(play, &this->colliderCylinder);
}
void func_809B26EC(EnAnubiceFire* this, PlayState* play) {
@@ -108,12 +121,12 @@ void func_809B27D8(EnAnubiceFire* this, PlayState* play) {
Math_ApproachF(&this->scale, this->unk_154, 0.2f, 0.4f);
if ((this->unk_15A == 0) && (this->scale < 0.1f)) {
Actor_Kill(&this->actor);
- } else if ((this->actor.params == 0) && (this->cylinder.base.atFlags & AT_BOUNCED)) {
+ } else if ((this->actor.params == 0) && (this->colliderCylinder.base.atFlags & AT_BOUNCED)) {
if (Player_HasMirrorShieldEquipped(play)) {
Actor_PlaySfx(&this->actor, NA_SE_IT_SHIELD_REFLECT_SW);
- this->cylinder.base.atFlags &= ~(AT_HIT | AT_BOUNCED | AT_TYPE_ENEMY);
- this->cylinder.base.atFlags |= AT_TYPE_PLAYER;
- this->cylinder.elem.atDmgInfo.dmgFlags = DMG_DEKU_STICK;
+ this->colliderCylinder.base.atFlags &= ~(AT_HIT | AT_BOUNCED | AT_TYPE_ENEMY);
+ this->colliderCylinder.base.atFlags |= AT_TYPE_PLAYER;
+ this->colliderCylinder.elem.atDmgInfo.dmgFlags = DMG_DEKU_STICK;
this->unk_15A = 30;
this->actor.params = 1;
this->actor.velocity.x *= -1.0f;
@@ -195,14 +208,14 @@ void EnAnubiceFire_Update(Actor* thisx, PlayState* play) {
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 |
UPDBGCHECKINFO_FLAG_4);
if (!(this->scale < 0.6f || this->actionFunc == func_809B2B48)) {
- this->cylinder.dim.radius = this->scale * 15.0f + 5.0f;
- this->cylinder.dim.height = this->scale * 15.0f + 5.0f;
- this->cylinder.dim.yShift = this->scale * -0.75f + -15.0f;
+ this->colliderCylinder.dim.radius = this->scale * 15.0f + 5.0f;
+ this->colliderCylinder.dim.height = this->scale * 15.0f + 5.0f;
+ this->colliderCylinder.dim.yShift = this->scale * -0.75f + -15.0f;
if (this->unk_15A != 0) {
- Collider_UpdateCylinder(&this->actor, &this->cylinder);
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->cylinder.base);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->cylinder.base);
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinder);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinder.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base);
}
if (BgCheck_SphVsFirstPoly(&play->colCtx, &this->actor.world.pos, 30.0f)) {
diff --git a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h
index 8119efa7a5..34072a43b5 100644
--- a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h
+++ b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h
@@ -2,11 +2,11 @@
#define Z_EN_ANUBICE_FIRE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnAnubiceFire;
-typedef void (*EnAnubiceFireActionFunc)(struct EnAnubiceFire*, PlayState*);
+typedef void (*EnAnubiceFireActionFunc)(struct EnAnubiceFire*, struct PlayState*);
typedef struct EnAnubiceFire {
/* 0x0000 */ Actor actor;
@@ -18,7 +18,7 @@ typedef struct EnAnubiceFire {
/* 0x015C */ s16 unk_15C;
/* 0x015E */ s16 unk_15E;
/* 0x0178 */ Vec3f unk_160[6];
- /* 0x01A8 */ ColliderCylinder cylinder;
+ /* 0x01A8 */ ColliderCylinder colliderCylinder;
} EnAnubiceFire; // size = 0x01F4
#endif
diff --git a/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c b/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c
index ae88d59295..2e05395897 100644
--- a/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c
+++ b/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c
@@ -5,9 +5,17 @@
*/
#include "z_en_anubice_tag.h"
-#include "terminal.h"
+#include "overlays/actors/ovl_En_Anubice/z_en_anubice.h"
-#define FLAGS ACTOR_FLAG_4
+#include "printf.h"
+#include "regs.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64debug_display.h"
+#include "z64play.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnAnubiceTag_Init(Actor* thisx, PlayState* play);
void EnAnubiceTag_Destroy(Actor* thisx, PlayState* play);
@@ -33,8 +41,9 @@ void EnAnubiceTag_Init(Actor* thisx, PlayState* play) {
EnAnubiceTag* this = (EnAnubiceTag*)thisx;
PRINTF("\n\n");
- // "Anubis control tag generated"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ アヌビス制御タグ発生 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ アヌビス制御タグ発生 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Anubis control tag generated ☆☆☆☆☆ %d\n")
+ VT_RST,
+ this->actor.params);
if (this->actor.params < -1) {
this->actor.params = 0;
@@ -99,7 +108,7 @@ void EnAnubiceTag_Update(Actor* thisx, PlayState* play) {
void EnAnubiceTag_Draw(Actor* thisx, PlayState* play) {
EnAnubiceTag* this = (EnAnubiceTag*)thisx;
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 255, 0, 0, 255, 4, play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.h b/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.h
index 0147b30cd5..026d4d0199 100644
--- a/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.h
+++ b/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.h
@@ -2,17 +2,16 @@
#define Z_EN_ANUBICE_TAG_H
#include "ultra64.h"
-#include "global.h"
-#include "overlays/actors/ovl_En_Anubice/z_en_anubice.h"
+#include "z64actor.h"
struct EnAnubiceTag;
-typedef void (*EnAnubiceTagActionFunc)(struct EnAnubiceTag*, PlayState*);
+typedef void (*EnAnubiceTagActionFunc)(struct EnAnubiceTag*, struct PlayState*);
typedef struct EnAnubiceTag {
/* 0x0000 */ Actor actor;
/* 0x014C */ EnAnubiceTagActionFunc actionFunc;
- /* 0x0150 */ EnAnubice* anubis;
+ /* 0x0150 */ struct EnAnubice* anubis;
/* 0x0154 */ f32 extraTriggerRange;
} EnAnubiceTag; // size = 0x0158
diff --git a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c
index 60b2121000..d4de5191ef 100644
--- a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c
+++ b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c
@@ -6,7 +6,10 @@
#include "z_en_arow_trap.h"
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
-#define FLAGS ACTOR_FLAG_4
+
+#include "z64play.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnArowTrap_Init(Actor* thisx, PlayState* play);
void EnArowTrap_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.h b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.h
index e29f84d2b2..ba91505088 100644
--- a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.h
+++ b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.h
@@ -2,8 +2,7 @@
#define Z_EN_AROW_TRAP_H
#include "ultra64.h"
-#include "global.h"
-#include "z64.h"
+#include "z64actor.h"
struct EnArowTrap;
diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c
index fcf51b77e0..3f0f7b66a5 100644
--- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c
+++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c
@@ -5,9 +5,24 @@
*/
#include "z_en_arrow.h"
+
+#include "libc64/qrand.h"
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnArrow_Init(Actor* thisx, PlayState* play);
void EnArrow_Destroy(Actor* thisx, PlayState* play);
@@ -31,7 +46,7 @@ ActorProfile En_Arrow_Profile = {
/**/ EnArrow_Draw,
};
-static ColliderQuadInit sColliderInit = {
+static ColliderQuadInit sColliderQuadInit = {
{
COL_MATERIAL_NONE,
AT_ON | AT_TYPE_PLAYER,
@@ -118,7 +133,7 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
}
Collider_InitQuad(play, &this->collider);
- Collider_SetQuad(play, &this->collider, &this->actor, &sColliderInit);
+ Collider_SetQuad(play, &this->collider, &this->actor, &sColliderQuadInit);
if (this->actor.params <= ARROW_NORMAL) {
this->collider.elem.atElemFlags &= ~ATELEM_SFX_MASK;
@@ -148,7 +163,7 @@ void EnArrow_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyQuad(play, &this->collider);
if ((this->hitActor != NULL) && (this->hitActor->update != NULL)) {
- this->hitActor->flags &= ~ACTOR_FLAG_15;
+ this->hitActor->flags &= ~ACTOR_FLAG_ATTACHED_TO_ARROW;
}
}
@@ -286,11 +301,11 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) {
hitActor = this->collider.base.at;
if ((hitActor->update != NULL) && !(this->collider.base.atFlags & AT_BOUNCED) &&
- (hitActor->flags & ACTOR_FLAG_14)) {
+ (hitActor->flags & ACTOR_FLAG_CAN_ATTACH_TO_ARROW)) {
this->hitActor = hitActor;
EnArrow_CarryActor(this, play);
Math_Vec3f_Diff(&hitActor->world.pos, &this->actor.world.pos, &this->unk_250);
- hitActor->flags |= ACTOR_FLAG_15;
+ hitActor->flags |= ACTOR_FLAG_ATTACHED_TO_ARROW;
this->collider.base.atFlags &= ~AT_HIT;
this->actor.speed /= 2.0f;
this->actor.velocity.y /= 2.0f;
@@ -352,14 +367,14 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) {
this->hitActor->world.pos.y = hitPoint.y + ((sp54.y <= hitPoint.y) ? 1.0f : -1.0f);
this->hitActor->world.pos.z = hitPoint.z + ((sp54.z <= hitPoint.z) ? 1.0f : -1.0f);
Math_Vec3f_Diff(&this->hitActor->world.pos, &this->actor.world.pos, &this->unk_250);
- this->hitActor->flags &= ~ACTOR_FLAG_15;
+ this->hitActor->flags &= ~ACTOR_FLAG_ATTACHED_TO_ARROW;
this->hitActor = NULL;
} else {
Math_Vec3f_Sum(&this->actor.world.pos, &this->unk_250, &this->hitActor->world.pos);
}
if (this->touchedPoly && (this->hitActor != NULL)) {
- this->hitActor->flags &= ~ACTOR_FLAG_15;
+ this->hitActor->flags &= ~ACTOR_FLAG_ATTACHED_TO_ARROW;
this->hitActor = NULL;
}
} else {
diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h
index 6c5b874a42..ba974c2105 100644
--- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h
+++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.h
@@ -2,11 +2,12 @@
#define Z_EN_ARROW_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64player.h"
struct EnArrow;
-typedef void (*EnArrowActionFunc)(struct EnArrow*, PlayState*);
+typedef void (*EnArrowActionFunc)(struct EnArrow*, struct PlayState*);
typedef struct EnArrow {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c
index 2461948d31..4a3a32663a 100644
--- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c
+++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c
@@ -5,10 +5,23 @@
*/
#include "z_en_attack_niw.h"
-#include "assets/objects/object_niw/object_niw.h"
#include "overlays/actors/ovl_En_Niw/z_en_niw.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_niw/object_niw.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnAttackNiw_Init(Actor* thisx, PlayState* play);
void EnAttackNiw_Destroy(Actor* thisx, PlayState* play);
@@ -359,8 +372,14 @@ void EnAttackNiw_Update(Actor* thisx, PlayState* play) {
if (this->actor.xyzDistToPlayerSq < SQ(tmpf1)) {
cucco = (EnNiw*)this->actor.parent;
if ((this->actor.parent->update != NULL) && (this->actor.parent != NULL) && (cucco != NULL) &&
- (cucco->timer9 == 0) && (player->invincibilityTimer == 0)) {
- func_8002F6D4(play, &this->actor, 2.0f, this->actor.world.rot.y, 0.0f, 0x10);
+ (cucco->timer9 == 0) &&
+#if OOT_VERSION < NTSC_1_1
+ !(player->stateFlags1 & PLAYER_STATE1_26)
+#else
+ (player->invincibilityTimer == 0)
+#endif
+ ) {
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, this->actor.world.rot.y, 0.0f, 0x10);
cucco->timer9 = 0x46;
}
}
diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h
index 381b6a2aae..a4d361542d 100644
--- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h
+++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h
@@ -2,11 +2,11 @@
#define Z_EN_ATTACK_NIW_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnAttackNiw;
-typedef void (*EnAttackNiwActionFunc)(struct EnAttackNiw*, PlayState*);
+typedef void (*EnAttackNiwActionFunc)(struct EnAttackNiw*, struct PlayState*);
typedef struct EnAttackNiw {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/src/overlays/actors/ovl_En_Ba/z_en_ba.c
index af2e435b20..a149d3c63d 100644
--- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c
+++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c
@@ -5,9 +5,23 @@
*/
#include "z_en_ba.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_bxa/object_bxa.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnBa_Init(Actor* thisx, PlayState* play);
void EnBa_Destroy(Actor* thisx, PlayState* play);
@@ -37,7 +51,7 @@ ActorProfile En_Ba_Profile = {
static Vec3f D_809B8080 = { 0.0f, 0.0f, 32.0f };
-static ColliderJntSphElementInit sJntSphElementInit[2] = {
+static ColliderJntSphElementInit sJntSphElementsInit[2] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -72,7 +86,7 @@ static ColliderJntSphInit sJntSphInit = {
COLSHAPE_JNTSPH,
},
2,
- sJntSphElementInit,
+ sJntSphElementsInit,
};
void EnBa_SetupAction(EnBa* this, EnBaActionFunc actionFunc) {
@@ -83,8 +97,8 @@ static Vec3f D_809B80E4 = { 0.01f, 0.01f, 0.01f };
static InitChainEntry sInitChain[] = {
ICHAIN_S8(naviEnemyId, NAVI_ENEMY_PARASITIC_TENTACLE, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 2500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 2500, ICHAIN_CONTINUE),
ICHAIN_F32(lockOnArrowOffset, 0, ICHAIN_STOP),
};
@@ -118,7 +132,7 @@ void EnBa_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.health = 4;
this->actor.colChkInfo.mass = MASS_HEAVY;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
} else {
Actor_SetScale(&this->actor, 0.021f);
EnBa_SetupFallAsBlob(this);
@@ -311,7 +325,7 @@ void EnBa_SwingAtPlayer(EnBa* this, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
if (this->collider.base.at == &player->actor) {
- func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
}
}
diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.h b/src/overlays/actors/ovl_En_Ba/z_en_ba.h
index f39fa33995..dc3b8cb3f6 100644
--- a/src/overlays/actors/ovl_En_Ba/z_en_ba.h
+++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.h
@@ -2,11 +2,11 @@
#define Z_EN_BA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBa;
-typedef void (*EnBaActionFunc)(struct EnBa*, PlayState*);
+typedef void (*EnBaActionFunc)(struct EnBa*, struct PlayState*);
typedef enum EnBaType {
/* 0x00 */ EN_BA_TENTACLE_RED,
@@ -31,7 +31,7 @@ typedef struct EnBa {
/* 0x031A */ s16 unk_31A;
/* 0x031C */ s16 unk_31C;
/* 0x0320 */ ColliderJntSph collider;
- /* 0x0340 */ ColliderJntSphElement colliderItems[2];
+ /* 0x0340 */ ColliderJntSphElement colliderElements[2];
} EnBa; // size = 0x03C0
#endif
diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c
index e337512755..18dad81519 100644
--- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c
+++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c
@@ -5,10 +5,28 @@
*/
#include "z_en_bb.h"
+
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_Bb/object_Bb.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_24)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT)
#define vBombHopPhase actionVar1
#define vTrailIdx actionVar1
@@ -207,7 +225,7 @@ ActorProfile En_Bb_Profile = {
/**/ EnBb_Draw,
};
-static ColliderJntSphElementInit sJntSphElementInit[1] = {
+static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -231,7 +249,7 @@ static ColliderJntSphInit sJntSphInit = {
COLSHAPE_JNTSPH,
},
1,
- sJntSphElementInit,
+ sJntSphElementsInit,
};
static InitChainEntry sInitChain[] = {
@@ -317,7 +335,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
this->unk_254 = 0;
thisx->colChkInfo.health = 4;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->elements);
+ Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->colliderElements);
this->actionState = PARAMS_GET_NOMASK(thisx->params, 8);
@@ -345,7 +363,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
this->flamePrimBlue = this->flameEnvColor.b = 255;
thisx->world.pos.y += 50.0f;
EnBb_SetupBlue(this);
- thisx->flags |= ACTOR_FLAG_14;
+ thisx->flags |= ACTOR_FLAG_CAN_ATTACH_TO_ARROW;
break;
case ENBB_RED:
thisx->naviEnemyId = NAVI_ENEMY_RED_BUBBLE;
@@ -374,7 +392,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
EnBb_SetupWhite(play, this);
EnBb_SetWaypoint(this, play);
EnBb_FaceWaypoint(this);
- thisx->flags |= ACTOR_FLAG_14;
+ thisx->flags |= ACTOR_FLAG_CAN_ATTACH_TO_ARROW;
break;
case ENBB_GREEN_BIG:
this->path = this->actionState >> 4;
@@ -1237,7 +1255,7 @@ void EnBb_Update(Actor* thisx, PlayState* play2) {
if (this->actor.colChkInfo.damageEffect != 0xD) {
this->actionFunc(this, play);
if ((this->actor.params <= ENBB_BLUE) && (this->actor.speed >= -6.0f) &&
- ((this->actor.flags & ACTOR_FLAG_15) == 0)) {
+ !(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) {
Actor_MoveXZGravity(&this->actor);
}
if (this->moveMode == BBMOVE_NORMAL) {
diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.h b/src/overlays/actors/ovl_En_Bb/z_en_bb.h
index 9908690e06..0b7e85c461 100644
--- a/src/overlays/actors/ovl_En_Bb/z_en_bb.h
+++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.h
@@ -2,11 +2,11 @@
#define Z_EN_BB_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBb;
-typedef void (*EnBbActionFunc)(struct EnBb*, PlayState*);
+typedef void (*EnBbActionFunc)(struct EnBb*, struct PlayState*);
typedef struct EnBb {
/* 0x0000 */ Actor actor;
@@ -41,7 +41,7 @@ typedef struct EnBb {
/* 0x02A8 */ s16 fireIceTimer;
/* 0x02AA */ u8 dmgEffect;
/* 0x02AC */ ColliderJntSph collider;
- /* 0x02CC */ ColliderJntSphElement elements[1];
+ /* 0x02CC */ ColliderJntSphElement colliderElements[1];
/* 0x030C */ BodyBreak bodyBreak;
/* 0x0324 */ Actor* targetActor;
} EnBb; // size = 0x0328
diff --git a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c
index 407bc8cef0..9c9d7bacfa 100644
--- a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c
+++ b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c
@@ -5,9 +5,23 @@
*/
#include "z_en_bdfire.h"
+#include "overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_kingdodongo/object_kingdodongo.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnBdfire_Init(Actor* thisx, PlayState* play);
void EnBdfire_Destroy(Actor* thisx, PlayState* play);
@@ -171,7 +185,7 @@ void func_809BC598(EnBdfire* this, PlayState* play) {
player->bodyFlameTimers[i] = Rand_S16Offset(0, 200);
}
player->bodyIsBurning = true;
- func_8002F6D4(play, &this->actor, 20.0f, this->actor.world.rot.y, 0.0f, 8);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 20.0f, this->actor.world.rot.y, 0.0f, 8);
PRINTF("POWER\n");
}
}
diff --git a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.h b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.h
index 93b37e3b1a..876a790d71 100644
--- a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.h
+++ b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.h
@@ -2,13 +2,13 @@
#define Z_EN_BDFIRE_H
#include "ultra64.h"
-#include "global.h"
-#include "overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnBdfire;
-typedef void (*EnBdfireActionFunc)(struct EnBdfire*, PlayState*);
-typedef void (*EnBdfireDrawFunc)(struct EnBdfire*, PlayState*);
+typedef void (*EnBdfireActionFunc)(struct EnBdfire*, struct PlayState*);
+typedef void (*EnBdfireDrawFunc)(struct EnBdfire*, struct PlayState*);
typedef struct EnBdfire {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c
index 65a839aae6..4243bbdf79 100644
--- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c
+++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c
@@ -1,7 +1,27 @@
#include "z_en_bigokuta.h"
+
+#include "array_count.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "rumble.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_bigokuta/object_bigokuta.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnBigokuta_Init(Actor* thisx, PlayState* play);
void EnBigokuta_Destroy(Actor* thisx, PlayState* play);
@@ -42,7 +62,7 @@ ActorProfile En_Bigokuta_Profile = {
/**/ EnBigokuta_Draw,
};
-static ColliderJntSphElementInit sJntSphElementInit[1] = {
+static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{
ELEM_MATERIAL_UNK1,
@@ -65,8 +85,8 @@ static ColliderJntSphInit sJntSphInit = {
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
- ARRAY_COUNT(sJntSphElementInit),
- sJntSphElementInit,
+ ARRAY_COUNT(sJntSphElementsInit),
+ sJntSphElementsInit,
};
static ColliderCylinderInit sCylinderInit[] = {
@@ -163,13 +183,13 @@ void EnBigokuta_Init(Actor* thisx, PlayState* play) {
this->jointTable, this->morphTable, 20);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, &this->element);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
this->collider.elements[0].dim.worldSphere.radius = this->collider.elements[0].dim.modelSphere.radius;
for (i = 0; i < ARRAY_COUNT(sCylinderInit); i++) {
- Collider_InitCylinder(play, &this->cylinder[i]);
- Collider_SetCylinder(play, &this->cylinder[i], &this->actor, &sCylinderInit[i]);
+ Collider_InitCylinder(play, &this->colliderCylinders[i]);
+ Collider_SetCylinder(play, &this->colliderCylinders[i], &this->actor, &sCylinderInit[i]);
}
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, sColChkInfoInit);
@@ -192,8 +212,8 @@ void EnBigokuta_Destroy(Actor* thisx, PlayState* play) {
s32 i;
Collider_DestroyJntSph(play, &this->collider);
- for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) {
- Collider_DestroyCylinder(play, &this->cylinder[i]);
+ for (i = 0; i < ARRAY_COUNT(this->colliderCylinders); i++) {
+ Collider_DestroyCylinder(play, &this->colliderCylinders[i]);
}
}
@@ -305,7 +325,7 @@ void func_809BD3F8(EnBigokuta* this) {
this->unk_198 = 80;
this->unk_19A = this->unk_194 * -0x200;
func_809BCE3C(this);
- this->cylinder[0].base.atFlags |= AT_ON;
+ this->colliderCylinders[0].base.atFlags |= AT_ON;
this->collider.base.acFlags |= AC_ON;
this->actionFunc = func_809BDC08;
}
@@ -323,7 +343,7 @@ void func_809BD4A4(EnBigokuta* this) {
this->actor.world.rot.x = this->actor.shape.rot.y + 0x8000;
this->unk_19A = this->unk_194 * 0x200;
this->collider.base.acFlags &= ~AC_ON;
- this->cylinder[0].base.atFlags |= AT_ON;
+ this->colliderCylinders[0].base.atFlags |= AT_ON;
this->actionFunc = func_809BDFC8;
}
@@ -331,7 +351,7 @@ void func_809BD524(EnBigokuta* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_bigokuta_Anim_000D1C, -5.0f);
this->unk_196 = 80;
this->unk_19A = 0;
- this->cylinder[0].base.atFlags |= AT_ON;
+ this->colliderCylinders[0].base.atFlags |= AT_ON;
Actor_PlaySfx(&this->actor, NA_SE_EN_DAIOCTA_MAHI);
if (this->collider.elements[0].base.acHitElem->atDmgInfo.dmgFlags & DMG_DEKU_NUT) {
this->unk_195 = true;
@@ -348,7 +368,7 @@ void func_809BD5E0(EnBigokuta* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &object_bigokuta_Anim_000444, -5.0f);
this->unk_196 = 24;
this->unk_19A = 0;
- this->cylinder[0].base.atFlags &= ~AT_ON;
+ this->colliderCylinders[0].base.atFlags &= ~AT_ON;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 24);
this->actionFunc = func_809BE180;
}
@@ -384,7 +404,7 @@ void func_809BD768(EnBigokuta* this) {
this->unk_194 = Rand_ZeroOne() < 0.5f ? -1 : 1;
this->unk_19A = 0;
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- this->cylinder[0].base.atFlags &= ~AT_ON;
+ this->colliderCylinders[0].base.atFlags &= ~AT_ON;
Actor_PlaySfx(&this->actor, NA_SE_EN_DAIOCTA_SINK);
this->actionFunc = func_809BE4A4;
}
@@ -580,12 +600,12 @@ void func_809BE058(EnBigokuta* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
- if ((this->collider.base.ocFlags1 & OC1_HIT) || (this->cylinder[0].base.ocFlags1 & OC1_HIT) ||
- (this->cylinder[1].base.ocFlags1 & OC1_HIT)) {
+ if ((this->collider.base.ocFlags1 & OC1_HIT) || (this->colliderCylinders[0].base.ocFlags1 & OC1_HIT) ||
+ (this->colliderCylinders[1].base.ocFlags1 & OC1_HIT)) {
speedXZ = CLAMP_MIN(player->actor.speed, 1.0f);
if (!(this->collider.base.ocFlags1 & OC1_HIT)) {
- this->cylinder[0].base.ocFlags1 &= ~OC1_HIT;
- this->cylinder[1].base.ocFlags1 &= ~OC1_HIT;
+ this->colliderCylinders[0].base.ocFlags1 &= ~OC1_HIT;
+ this->colliderCylinders[1].base.ocFlags1 &= ~OC1_HIT;
speedXZ *= -1.0f;
}
player->actor.world.pos.x -= speedXZ * Math_SinS(this->actor.shape.rot.y);
@@ -703,12 +723,12 @@ void func_809BE568(EnBigokuta* this) {
this->collider.elements[0].dim.worldSphere.center.y =
this->actor.world.pos.y + this->collider.elements[0].dim.modelSphere.center.y;
- for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) {
- this->cylinder[i].dim.pos.x =
+ for (i = 0; i < ARRAY_COUNT(this->colliderCylinders); i++) {
+ this->colliderCylinders[i].dim.pos.x =
this->actor.world.pos.x + sCylinderInit[i].dim.pos.z * sin + sCylinderInit[i].dim.pos.x * cos;
- this->cylinder[i].dim.pos.z =
+ this->colliderCylinders[i].dim.pos.z =
this->actor.world.pos.z + sCylinderInit[i].dim.pos.z * cos - sCylinderInit[i].dim.pos.x * sin;
- this->cylinder[i].dim.pos.y = this->actor.world.pos.y;
+ this->colliderCylinders[i].dim.pos.y = this->actor.world.pos.y;
}
}
@@ -716,10 +736,10 @@ void func_809BE798(EnBigokuta* this, PlayState* play) {
s16 effectRot;
s16 yawDiff;
- if ((this->cylinder[0].base.atFlags & AT_HIT) || (this->cylinder[1].base.atFlags & AT_HIT) ||
+ if ((this->colliderCylinders[0].base.atFlags & AT_HIT) || (this->colliderCylinders[1].base.atFlags & AT_HIT) ||
(this->collider.base.atFlags & AT_HIT)) {
- this->cylinder[0].base.atFlags &= ~AT_HIT;
- this->cylinder[1].base.atFlags &= ~AT_HIT;
+ this->colliderCylinders[0].base.atFlags &= ~AT_HIT;
+ this->colliderCylinders[1].base.atFlags &= ~AT_HIT;
this->collider.base.atFlags &= ~AT_HIT;
yawDiff = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
if (yawDiff > 0x4000) {
@@ -731,7 +751,7 @@ void func_809BE798(EnBigokuta* this, PlayState* play) {
} else {
effectRot = -0x6000;
}
- func_8002F71C(play, &this->actor, 10.0f, this->actor.world.rot.y + effectRot, 5.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 10.0f, this->actor.world.rot.y + effectRot, 5.0f);
if (this->actionFunc == func_809BDC08) {
func_809BD4A4(this);
this->unk_196 = 40;
@@ -780,19 +800,19 @@ void EnBigokuta_Update(Actor* thisx, PlayState* play2) {
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BIG_OCTO);
Camera_UnsetStateFlag(play->cameraPtrs[CAM_ID_MAIN], CAM_STATE_CHECK_BG);
- if (this->cylinder[0].base.atFlags & AT_ON) {
+ if (this->colliderCylinders[0].base.atFlags & AT_ON) {
if (this->actionFunc != func_809BE058) {
- for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) {
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->cylinder[i].base);
+ for (i = 0; i < ARRAY_COUNT(this->colliderCylinders); i++) {
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinders[i].base);
}
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
} else {
- for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) {
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->cylinder[i].base);
+ for (i = 0; i < ARRAY_COUNT(this->colliderCylinders); i++) {
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinders[i].base);
}
}
- for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->cylinder[i].base);
+ for (i = 0; i < ARRAY_COUNT(this->colliderCylinders); i++) {
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[i].base);
}
if (this->collider.base.acFlags & AC_ON) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h
index fc6ca9ac7a..c04da49c86 100644
--- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h
+++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h
@@ -2,11 +2,11 @@
#define Z_EN_BIGOKUTA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBigokuta;
-typedef void (*EnBigokutaActionFunc)(struct EnBigokuta*, PlayState*);
+typedef void (*EnBigokutaActionFunc)(struct EnBigokuta*, struct PlayState*);
typedef struct EnBigokuta {
/* 0x0000 */ Actor actor;
@@ -20,8 +20,8 @@ typedef struct EnBigokuta {
/* 0x019C */ Vec3s jointTable[20];
/* 0x0214 */ Vec3s morphTable[20];
/* 0x028C */ ColliderJntSph collider;
- /* 0x02AC */ ColliderJntSphElement element;
- /* 0x02EC */ ColliderCylinder cylinder[2];
+ /* 0x02AC */ ColliderJntSphElement colliderElements[1];
+ /* 0x02EC */ ColliderCylinder colliderCylinders[2];
} EnBigokuta; // size = 0x0384
#endif
diff --git a/src/overlays/actors/ovl_En_Bili/z_en_bili.c b/src/overlays/actors/ovl_En_Bili/z_en_bili.c
index fc1efd113f..82f7b62796 100644
--- a/src/overlays/actors/ovl_En_Bili/z_en_bili.c
+++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.c
@@ -5,9 +5,25 @@
*/
#include "z_en_bili.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_bl/object_bl.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_14)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_CAN_ATTACH_TO_ARROW)
void EnBili_Init(Actor* thisx, PlayState* play);
void EnBili_Destroy(Actor* thisx, PlayState* play);
@@ -219,7 +235,7 @@ void EnBili_SetupBurnt(EnBili* this) {
this->timer = 20;
this->collider.base.atFlags &= ~AT_ON;
this->collider.base.acFlags &= ~AC_ON;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.speed = 0.0f;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 200, COLORFILTER_BUFFLAG_XLU, 20);
this->actionFunc = EnBili_Burnt;
@@ -250,7 +266,7 @@ void EnBili_SetupFrozen(EnBili* this, PlayState* play) {
s32 i;
Vec3f effectPos;
- if (!(this->actor.flags & ACTOR_FLAG_15)) {
+ if (!(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) {
this->actor.gravity = -1.0f;
}
@@ -455,7 +471,7 @@ void EnBili_Recoil(EnBili* this, PlayState* play) {
void EnBili_Burnt(EnBili* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
- if (this->actor.flags & ACTOR_FLAG_15) {
+ if (this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW) {
this->actor.colorFilterTimer = 20;
} else {
if (this->timer != 0) {
@@ -476,7 +492,7 @@ void EnBili_Die(EnBili* this, PlayState* play) {
s32 i;
if (this->actor.draw != NULL) {
- if (this->actor.flags & ACTOR_FLAG_15) {
+ if (this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW) {
return;
}
this->actor.draw = NULL;
@@ -532,11 +548,16 @@ void EnBili_Frozen(EnBili* this, PlayState* play) {
this->timer--;
}
- if (!(this->actor.flags & ACTOR_FLAG_15)) {
+ if (!(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) {
this->actor.gravity = -1.0f;
}
- if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
+#if OOT_VERSION < NTSC_1_1
+ if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) || (this->actor.floorHeight == BGCHECK_Y_MIN))
+#else
+ if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight == BGCHECK_Y_MIN))
+#endif
+ {
this->actor.colorFilterTimer = 0;
EnBili_SetupDie(this);
} else {
@@ -587,7 +608,7 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) {
}
if (this->collider.elem.acHitElem->atDmgInfo.dmgFlags & DMG_ARROW) {
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
}
}
diff --git a/src/overlays/actors/ovl_En_Bili/z_en_bili.h b/src/overlays/actors/ovl_En_Bili/z_en_bili.h
index 0882a288c0..3199639c9d 100644
--- a/src/overlays/actors/ovl_En_Bili/z_en_bili.h
+++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.h
@@ -2,11 +2,11 @@
#define Z_EN_BILI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBili;
-typedef void (*EnBiliActionFunc)(struct EnBili*, PlayState*);
+typedef void (*EnBiliActionFunc)(struct EnBili*, struct PlayState*);
typedef enum EnBiliLimb {
/* 0 */ EN_BILI_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/src/overlays/actors/ovl_En_Bird/z_en_bird.c
index 6ca50edeeb..c93d682ee1 100644
--- a/src/overlays/actors/ovl_En_Bird/z_en_bird.c
+++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.c
@@ -5,6 +5,11 @@
*/
#include "z_en_bird.h"
+
+#include "ichain.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_bird/object_bird.h"
#define FLAGS 0
diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.h b/src/overlays/actors/ovl_En_Bird/z_en_bird.h
index 1cc9858b13..beaf60a3d4 100644
--- a/src/overlays/actors/ovl_En_Bird/z_en_bird.h
+++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.h
@@ -2,11 +2,11 @@
#define Z_EN_BIRD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBird;
-typedef void (*EnBirdActionFunc)(struct EnBird*, PlayState*);
+typedef void (*EnBirdActionFunc)(struct EnBird*, struct PlayState*);
typedef struct EnBird {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c
index a42e48252a..1d8d606cf3 100644
--- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c
+++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c
@@ -5,9 +5,17 @@
*/
#include "z_en_blkobj.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_blkobj/object_blkobj.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnBlkobj_Init(Actor* thisx, PlayState* play);
void EnBlkobj_Destroy(Actor* thisx, PlayState* play);
@@ -33,9 +41,9 @@ ActorProfile En_Blkobj_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F(scale, 1, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 300, ICHAIN_STOP),
};
static Gfx sSetupOpaDL[] = {
@@ -87,7 +95,7 @@ void EnBlkobj_Wait(EnBlkobj* this, PlayState* play) {
}
void EnBlkobj_SpawnDarkLink(EnBlkobj* this, PlayState* play) {
- if (!(this->dyna.actor.flags & ACTOR_FLAG_6)) {
+ if (!(this->dyna.actor.flags & ACTOR_FLAG_INSIDE_CULLING_VOLUME)) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_TORCH2, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
this->dyna.actor.world.pos.z, 0, this->dyna.actor.yawTowardsPlayer, 0, 0);
EnBlkobj_SetupAction(this, EnBlkobj_DarkLinkFight);
diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h
index 4218c64664..babddb4e5d 100644
--- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h
+++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h
@@ -2,11 +2,11 @@
#define Z_EN_BLKOBJ_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBlkobj;
-typedef void (*EnBlkobjActionFunc)(struct EnBlkobj*, PlayState*);
+typedef void (*EnBlkobjActionFunc)(struct EnBlkobj*, struct PlayState*);
typedef struct EnBlkobj {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c
index 611e5062f3..31acad8cec 100644
--- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c
+++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c
@@ -6,9 +6,21 @@
#include "z_en_bom.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnBom_Init(Actor* thisx, PlayState* play);
void EnBom_Destroy(Actor* thisx, PlayState* play);
@@ -100,8 +112,8 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
Collider_InitCylinder(play, &this->bombCollider);
Collider_InitJntSph(play, &this->explosionCollider);
Collider_SetCylinder(play, &this->bombCollider, thisx, &sCylinderInit);
- Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderItems[0]);
- this->explosionColliderItems[0].base.atDmgInfo.damage += (thisx->shape.rot.z & 0xFF00) >> 8;
+ Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderElements[0]);
+ this->explosionColliderElements[0].base.atDmgInfo.damage += (thisx->shape.rot.z & 0xFF00) >> 8;
thisx->shape.rot.z &= 0xFF;
if (thisx->shape.rot.z & 0x80) {
@@ -170,7 +182,7 @@ void EnBom_Explode(EnBom* this, PlayState* play) {
Player* player;
if (this->explosionCollider.elements[0].dim.modelSphere.radius == 0) {
- this->actor.flags |= ACTOR_FLAG_5;
+ this->actor.flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150);
}
@@ -207,11 +219,11 @@ void EnBom_Explode(EnBom* this, PlayState* play) {
if (this->timer == 0) {
player = GET_PLAYER(play);
- if ((player->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) && (player->heldActor == &this->actor)) {
+ if ((player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (player->heldActor == &this->actor)) {
player->actor.child = NULL;
player->heldActor = NULL;
player->interactRangeActor = NULL;
- player->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
}
Actor_Kill(&this->actor);
@@ -323,7 +335,7 @@ void EnBom_Update(Actor* thisx, PlayState* play2) {
Camera_RequestQuake(&play->mainCamera, 2, 11, 8);
thisx->params = BOMB_EXPLOSION;
this->timer = 10;
- thisx->flags |= ACTOR_FLAG_5;
+ thisx->flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
EnBom_SetupAction(this, EnBom_Explode);
}
}
diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.h b/src/overlays/actors/ovl_En_Bom/z_en_bom.h
index df49b0ce1e..88c8feef5c 100644
--- a/src/overlays/actors/ovl_En_Bom/z_en_bom.h
+++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.h
@@ -2,7 +2,7 @@
#define Z_EN_BOM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBom;
@@ -12,7 +12,7 @@ typedef struct EnBom {
/* 0x0000 */ Actor actor;
/* 0x014C */ ColliderCylinder bombCollider;
/* 0x0198 */ ColliderJntSph explosionCollider;
- /* 0x01B8 */ ColliderJntSphElement explosionColliderItems[1];
+ /* 0x01B8 */ ColliderJntSphElement explosionColliderElements[1];
/* 0x01F8 */ s16 timer;
/* 0x01FA */ s16 flashSpeedScale;
/* 0x01FC */ f32 flashIntensity;
diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c
index 0b8c1a725a..435b0d4838 100644
--- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c
+++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c
@@ -1,11 +1,26 @@
#include "z_en_bom_bowl_man.h"
-#include "terminal.h"
#include "overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h"
-#include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_bg/object_bg.h"
-#define FLAGS \
- (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_LOCK_ON_DISABLED)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_LOCK_ON_DISABLED)
typedef enum BombchuGirlEyeMode {
/* 0 */ CHU_GIRL_EYES_ASLEEP,
@@ -59,10 +74,10 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gChuGirlSkel, &gChuGirlNoddingOffAnim, this->jointTable,
this->morphTable, 11);
- // "☆ Man, my shoulders hurt~ ☆"
- PRINTF(VT_FGCOL(GREEN) "☆ もー 肩こっちゃうよねぇ〜 \t\t ☆ \n" VT_RST);
- // "☆ Isn't there some sort of job that will pay better and be more relaxing? ☆ %d"
- PRINTF(VT_FGCOL(GREEN) "☆ もっとラクしてもうかるバイトないかしら? ☆ %d\n" VT_RST, play->bombchuBowlingStatus);
+ PRINTF(VT_FGCOL(GREEN) T("☆ もー 肩こっちゃうよねぇ〜 \t\t ☆ \n", "☆ Man, my shoulders hurt~ \t\t ☆ \n") VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆ もっとラクしてもうかるバイトないかしら? ☆ %d\n",
+ "☆ Isn't there some sort of job that will pay better and be more relaxing? ☆ %d\n") VT_RST,
+ play->bombchuBowlingStatus);
this->posCopy = this->actor.world.pos;
this->actor.shape.yOffset = -60.0f;
Actor_SetScale(&this->actor, 0.013f);
@@ -219,12 +234,12 @@ void EnBomBowlMan_RunGame(EnBomBowlMan* this, PlayState* play) {
if (BREG(3)) {
PRINTF(VT_FGCOL(RED) "☆ game_play->bomchu_game_flag ☆ %d\n" VT_RST, play->bombchuBowlingStatus);
- // "HOW'S THE FIRST WALL DOING?"
- PRINTF(VT_FGCOL(RED) "☆ 壁1の状態どう? ☆ %d\n" VT_RST, this->wallStatus[0]);
- // "HOW'S THE SECOND WALL DOING?"
- PRINTF(VT_FGCOL(RED) "☆ 壁2の状態どう? ☆ %d\n" VT_RST, this->wallStatus[1]);
- // "HOLE INFORMATION"
- PRINTF(VT_FGCOL(RED) "☆ 穴情報\t ☆ %d\n" VT_RST, this->bowlPit->status);
+ PRINTF(VT_FGCOL(RED) T("☆ 壁1の状態どう? ☆ %d\n", "☆ What's the state of wall 1? ☆ %d\n") VT_RST,
+ this->wallStatus[0]);
+ PRINTF(VT_FGCOL(RED) T("☆ 壁2の状態どう? ☆ %d\n", "☆ What's the state of wall 2? ☆ %d\n") VT_RST,
+ this->wallStatus[1]);
+ PRINTF(VT_FGCOL(RED) T("☆ 穴情報\t ☆ %d\n", "☆ Hole Information\t ☆ %d\n") VT_RST,
+ this->bowlPit->status);
PRINTF("\n\n");
}
@@ -234,15 +249,13 @@ void EnBomBowlMan_RunGame(EnBomBowlMan* this, PlayState* play) {
if ((this->wallStatus[0] != 1) && (this->wallStatus[1] != 1) && (this->bowlPit->status == 2)) {
this->gameResult = 1; // Won
this->bowlPit->status = 0;
- // "Center HIT!"
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 中央HIT!!!! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ 中央HIT!!!! ☆☆☆☆☆ \n", "☆☆☆☆☆ Center HIT!!!! ☆☆☆☆☆ \n") VT_RST);
}
if ((play->bombchuBowlingStatus == -1) && (play->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].length == 0) &&
(this->bowlPit->status == 0) && (this->wallStatus[0] != 1) && (this->wallStatus[1] != 1)) {
this->gameResult = 2; // Lost
- // "Bombchu lost"
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ ボムチュウ消化 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ ボムチュウ消化 ☆☆☆☆☆ \n", "☆☆☆☆☆ Bombchu digestion ☆☆☆☆☆ \n") VT_RST);
}
}
@@ -417,7 +430,7 @@ void EnBomBowlMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play) {
this->exItem = (EnExItem*)Actor_SpawnAsChild(
&play->actorCtx, &this->actor, play, ACTOR_EN_EX_ITEM, sPrizePosOffset[this->prizeIndex].x + 148.0f,
sPrizePosOffset[this->prizeIndex].y + 40.0f, sPrizePosOffset[this->prizeIndex].z + 300.0f, 0,
- sPrizeRot[this->prizeIndex], 0, this->prizeIndex + EXITEM_COUNTER);
+ sPrizeRot[this->prizeIndex], 0, this->prizeIndex + EXITEM_BOMB_BAG_COUNTER);
if (!this->startedPlaying) {
this->bowlPit = (EnBomBowlPit*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play,
@@ -456,8 +469,7 @@ void EnBomBowlMan_BeginPlayGame(EnBomBowlMan* this, PlayState* play) {
BREG(2) = 0;
}
- // "Wow"
- PRINTF(VT_FGCOL(YELLOW) "☆ わー ☆ %d\n" VT_RST, play->bombchuBowlingStatus);
+ PRINTF(VT_FGCOL(YELLOW) T("☆ わー ☆ %d\n", "☆ Wow ☆ %d\n") VT_RST, play->bombchuBowlingStatus);
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7);
this->actionFunc = EnBomBowlMan_SetupRunGame;
}
diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h
index fada65b556..ffc4ae9efc 100644
--- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h
+++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h
@@ -2,13 +2,13 @@
#define Z_EN_BOM_BOWL_MAN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h"
#include "overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h"
struct EnBomBowlMan;
-typedef void (*EnBomBowlManActionFunc)(struct EnBomBowlMan*, PlayState*);
+typedef void (*EnBomBowlManActionFunc)(struct EnBomBowlMan*, struct PlayState*);
typedef struct EnBomBowlMan {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c
index 3e8ff39453..74d7ef5292 100644
--- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c
+++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c
@@ -1,9 +1,17 @@
#include "z_en_bom_bowl_pit.h"
-#include "terminal.h"
#include "overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h"
-#include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h"
-#define FLAGS ACTOR_FLAG_4
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnBomBowlPit_Init(Actor* thisx, PlayState* play);
void EnBomBowlPit_Destroy(Actor* thisx, PlayState* play);
@@ -201,12 +209,10 @@ void EnBomBowlPit_WaitTillPrizeGiven(EnBomBowlPit* this, PlayState* play) {
void EnBomBowlPit_Reset(EnBomBowlPit* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
- // "Normal termination"/"completion"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n", "☆☆☆☆☆ Normal termination ☆☆☆☆☆ \n") VT_RST);
if (this->getItemId == GI_HEART_PIECE) {
gSaveContext.healthAccumulator = 0x140;
- // "Ah recovery!" (?)
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ あぁ回復! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ あぁ回復! ☆☆☆☆☆ \n", "☆☆☆☆☆ Ah recovery! ☆☆☆☆☆ \n") VT_RST);
}
this->exItemDone = 0;
this->status = 2;
diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h
index a4e838ff49..711518848f 100644
--- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h
+++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h
@@ -2,12 +2,12 @@
#define Z_EN_BOM_BOWL_PIT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h"
struct EnBomBowlPit;
-typedef void (*EnBomBowlPitActionFunc)(struct EnBomBowlPit*, PlayState*);
+typedef void (*EnBomBowlPitActionFunc)(struct EnBomBowlPit*, struct PlayState*);
typedef struct EnBomBowlPit {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c
index f5deec7285..7ce476d4ef 100644
--- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c
+++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c
@@ -1,8 +1,23 @@
#include "z_en_bom_chu.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+
+#include "libc64/math64.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
#define BOMBCHU_SCALE 0.01f
@@ -27,7 +42,7 @@ ActorProfile En_Bom_Chu_Profile = {
/**/ EnBomChu_Draw,
};
-static ColliderJntSphElementInit sJntSphElemInit[] = {
+static ColliderJntSphElementInit sJntSphElementsInit[] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -50,8 +65,8 @@ static ColliderJntSphInit sJntSphInit = {
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
- ARRAY_COUNT(sJntSphElemInit),
- sJntSphElemInit,
+ ARRAY_COUNT(sJntSphElementsInit),
+ sJntSphElementsInit,
};
static InitChainEntry sInitChain[] = {
diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h
index 7e2154a0a6..38ca8d20c6 100644
--- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h
+++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h
@@ -2,11 +2,11 @@
#define Z_EN_BOM_CHU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBomChu;
-typedef void (*EnBomChuActionFunc)(struct EnBomChu*, PlayState*);
+typedef void (*EnBomChuActionFunc)(struct EnBomChu*, struct PlayState*);
typedef struct EnBomChu {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c
index aa0030bb8e..ed1d7eed79 100644
--- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c
+++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c
@@ -5,10 +5,23 @@
*/
#include "z_en_bombf.h"
-#include "assets/objects/object_bombf/object_bombf.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "regs.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_bombf/object_bombf.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnBombf_Init(Actor* thisx, PlayState* play);
void EnBombf_Destroy(Actor* thisx, PlayState* play);
@@ -94,7 +107,7 @@ void EnBombf_Init(Actor* thisx, PlayState* play) {
Collider_InitCylinder(play, &this->bombCollider);
Collider_InitJntSph(play, &this->explosionCollider);
Collider_SetCylinder(play, &this->bombCollider, thisx, &sCylinderInit);
- Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderItems[0]);
+ Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderElements[0]);
if (thisx->params == BOMBFLOWER_BODY) {
shapeUnk10 = 1000.0f;
@@ -104,7 +117,7 @@ void EnBombf_Init(Actor* thisx, PlayState* play) {
thisx->focus.pos = thisx->world.pos;
if (Actor_FindNearby(play, thisx, ACTOR_BG_DDAN_KD, ACTORCAT_BG, 10000.0f) != NULL) {
- thisx->flags |= ACTOR_FLAG_5;
+ thisx->flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
}
thisx->colChkInfo.cylRadius = 10.0f;
@@ -126,8 +139,8 @@ void EnBombf_Init(Actor* thisx, PlayState* play) {
EnBombf_SetupGrowBomb(this, thisx->params);
}
- thisx->uncullZoneScale += 31000.0f;
- thisx->uncullZoneForward += 31000.0f;
+ thisx->cullingVolumeScale += 31000.0f;
+ thisx->cullingVolumeDistance += 31000.0f;
}
void EnBombf_Destroy(Actor* thisx, PlayState* play) {
@@ -163,7 +176,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
player->heldActor = NULL;
player->interactRangeActor = NULL;
this->actor.parent = NULL;
- player->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
}
} else if (this->bombCollider.base.acFlags & AC_HIT) {
this->bombCollider.base.acFlags &= ~AC_HIT;
@@ -197,7 +210,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
player->heldActor = NULL;
player->interactRangeActor = NULL;
this->actor.parent = NULL;
- player->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
this->actor.world.pos = this->actor.home.pos;
}
}
@@ -215,7 +228,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
player->heldActor = NULL;
player->interactRangeActor = NULL;
this->actor.parent = NULL;
- player->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
this->actor.world.pos = this->actor.home.pos;
}
}
@@ -260,7 +273,7 @@ void EnBombf_Explode(EnBombf* this, PlayState* play) {
Player* player;
if (this->explosionCollider.elements[0].dim.modelSphere.radius == 0) {
- this->actor.flags |= ACTOR_FLAG_5;
+ this->actor.flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150);
}
@@ -299,11 +312,11 @@ void EnBombf_Explode(EnBombf* this, PlayState* play) {
if (this->timer == 0) {
player = GET_PLAYER(play);
- if ((player->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) && (player->heldActor == &this->actor)) {
+ if ((player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (player->heldActor == &this->actor)) {
player->actor.child = NULL;
player->heldActor = NULL;
player->interactRangeActor = NULL;
- player->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
}
Actor_Kill(&this->actor);
@@ -431,7 +444,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
Camera_RequestQuake(&play->mainCamera, 2, 11, 8);
thisx->params = BOMBFLOWER_EXPLOSION;
this->timer = 10;
- thisx->flags |= ACTOR_FLAG_5;
+ thisx->flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
EnBombf_SetupAction(this, EnBombf_Explode);
}
}
diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.h b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.h
index 14bc9c6ece..840da79c19 100644
--- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.h
+++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.h
@@ -2,7 +2,7 @@
#define Z_EN_BOMBF_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBombf;
@@ -12,7 +12,7 @@ typedef struct EnBombf {
/* 0x0000 */ Actor actor;
/* 0x014C */ ColliderCylinder bombCollider;
/* 0x0198 */ ColliderJntSph explosionCollider;
- /* 0x01B8 */ ColliderJntSphElement explosionColliderItems[1];
+ /* 0x01B8 */ ColliderJntSphElement explosionColliderElements[1];
/* 0x01F8 */ s16 timer;
/* 0x01FC */ EnBombfActionFunc actionFunc;
/* 0x0200 */ s32 isFuseEnabled; // enables the ability to ignite and tick down to explode
diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c
index af6f0e77d2..b9dcbacb76 100644
--- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c
+++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c
@@ -5,9 +5,19 @@
*/
#include "z_en_boom.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnBoom_Init(Actor* thisx, PlayState* play);
void EnBoom_Destroy(Actor* thisx, PlayState* play);
@@ -138,7 +148,7 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) {
if ((target != &player->actor) && ((target->update == NULL) || (ABS(yawDiff) > 0x4000))) {
//! @bug This condition is why the boomerang will randomly fly off in a the down left direction sometimes.
- // If the actor targetted is not Link and the difference between the 2 y angles is greater than 0x4000,
+ // If the actor targeted is not Link and the difference between the 2 y angles is greater than 0x4000,
// the moveTo pointer is nulled and it flies off in a seemingly random direction.
this->moveTo = NULL;
} else {
@@ -159,7 +169,7 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) {
if (((this->collider.base.at->id == ACTOR_EN_ITEM00) || (this->collider.base.at->id == ACTOR_EN_SI))) {
this->grabbed = this->collider.base.at;
if (this->collider.base.at->id == ACTOR_EN_SI) {
- this->collider.base.at->flags |= ACTOR_FLAG_13;
+ this->collider.base.at->flags |= ACTOR_FLAG_HOOKSHOT_ATTACHED;
}
}
}
@@ -182,7 +192,7 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) {
target->gravity = -0.9f;
target->bgCheckFlags &= ~(BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH);
} else {
- target->flags &= ~ACTOR_FLAG_13;
+ target->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED;
}
}
// Set player flags and kill the boomerang beacause Link caught it.
diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.h b/src/overlays/actors/ovl_En_Boom/z_en_boom.h
index 4284063726..7a211880a4 100644
--- a/src/overlays/actors/ovl_En_Boom/z_en_boom.h
+++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.h
@@ -2,11 +2,12 @@
#define Z_EN_BOOM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64player.h"
struct EnBoom;
-typedef void (*EnBoomActionFunc)(struct EnBoom*, PlayState*);
+typedef void (*EnBoomActionFunc)(struct EnBoom*, struct PlayState*);
typedef struct EnBoom {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c
index 770132358a..c4ef15919a 100644
--- a/src/overlays/actors/ovl_En_Box/z_en_box.c
+++ b/src/overlays/actors/ovl_En_Box/z_en_box.c
@@ -1,5 +1,25 @@
#include "z_en_box.h"
#include "overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64curve.h"
+#include "z64effect.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_box/object_box.h"
#define FLAGS 0
@@ -134,7 +154,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
EnBox_SetupAction(this, EnBox_FallOnSwitchFlag);
this->alpha = 0;
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
} else if ((this->type == ENBOX_TYPE_ROOM_CLEAR_BIG || this->type == ENBOX_TYPE_ROOM_CLEAR_SMALL) &&
!Flags_GetClear(play, this->dyna.actor.room)) {
EnBox_SetupAction(this, EnBox_AppearOnRoomClear);
@@ -142,22 +162,22 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f;
this->alpha = 0;
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
} else if (this->type == ENBOX_TYPE_9 || this->type == ENBOX_TYPE_10) {
EnBox_SetupAction(this, func_809C9700);
- this->dyna.actor.flags |= ACTOR_FLAG_25;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_DURING_OCARINA;
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f;
this->alpha = 0;
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
} else if (this->type == ENBOX_TYPE_SWITCH_FLAG_BIG && !Flags_GetSwitch(play, this->switchFlag)) {
EnBox_SetupAction(this, EnBox_AppearOnSwitchFlag);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f;
this->alpha = 0;
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
} else {
if (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6) {
this->dyna.actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
@@ -170,7 +190,9 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
this->dyna.actor.world.rot.y += 0x8000;
this->dyna.actor.home.rot.z = this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z = 0;
- SkelAnime_Init(play, &this->skelanime, &gTreasureChestSkel, anim, this->jointTable, this->morphTable, 5);
+ //! @bug Flex skeleton is used as normal skeleton
+ SkelAnime_Init(play, &this->skelanime, (SkeletonHeader*)&gTreasureChestSkel, anim, this->jointTable,
+ this->morphTable, 5);
Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, ANIMMODE_ONCE, 0.0f);
switch (this->type) {
@@ -307,7 +329,7 @@ void func_809C9700(EnBox* this, PlayState* play) {
} else if (this->unk_1FB == ENBOX_STATE_2 && play->msgCtx.ocarinaMode == OCARINA_MODE_04) {
if ((play->msgCtx.lastPlayedSong == OCARINA_SONG_LULLABY && this->type == ENBOX_TYPE_9) ||
(play->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS && this->type == ENBOX_TYPE_10)) {
- this->dyna.actor.flags &= ~ACTOR_FLAG_25;
+ this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_DURING_OCARINA;
EnBox_SetupAction(this, EnBox_AppearInit);
OnePointCutscene_Attention(play, &this->dyna.actor);
this->unk_1A8 = 0;
@@ -618,7 +640,7 @@ void EnBox_Draw(Actor* thisx, PlayState* play) {
and cleared by Open
*/
if ((this->alpha == 255 && !(this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6)) ||
- (!CHECK_FLAG_ALL(this->dyna.actor.flags, ACTOR_FLAG_REACT_TO_LENS) &&
+ (!ACTOR_FLAGS_CHECK_ALL(&this->dyna.actor, ACTOR_FLAG_REACT_TO_LENS) &&
(this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6))) {
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.h b/src/overlays/actors/ovl_En_Box/z_en_box.h
index 5dd3040c5f..1604b0d1bc 100644
--- a/src/overlays/actors/ovl_En_Box/z_en_box.h
+++ b/src/overlays/actors/ovl_En_Box/z_en_box.h
@@ -2,14 +2,14 @@
#define Z_EN_BOX_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#define ENBOX_TREASURE_FLAG_UNK_MIN 20
#define ENBOX_TREASURE_FLAG_UNK_MAX 32
struct EnBox;
-typedef void (*EnBoxActionFunc)(struct EnBox*, PlayState*);
+typedef void (*EnBoxActionFunc)(struct EnBox*, struct PlayState*);
typedef enum EnBoxType {
/*
diff --git a/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/src/overlays/actors/ovl_En_Brob/z_en_brob.c
index 0e16b6dcfd..436f4740c5 100644
--- a/src/overlays/actors/ovl_En_Brob/z_en_brob.c
+++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.c
@@ -5,6 +5,15 @@
*/
#include "z_en_brob.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_brob/object_brob.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -151,7 +160,8 @@ void EnBrob_Idle(EnBrob* this, PlayState* play) {
}
if (this->timer == 0) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
- func_8002F71C(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 1.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer,
+ 1.0f);
EnBrob_SetupMoveUp(this, play);
} else if (this->dyna.actor.xzDistToPlayer < 300.0f) {
EnBrob_SetupMoveUp(this, play);
@@ -277,7 +287,8 @@ void EnBrob_Update(Actor* thisx, PlayState* play2) {
if (this->actionFunc == EnBrob_MoveUp && !(this->colliders[0].base.atFlags & AT_BOUNCED) &&
!(this->colliders[1].base.atFlags & AT_BOUNCED)) {
- func_8002F71C(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 1.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer,
+ 1.0f);
} else if (this->actionFunc != EnBrob_MoveUp) {
EnBrob_SetupShock(this);
}
diff --git a/src/overlays/actors/ovl_En_Brob/z_en_brob.h b/src/overlays/actors/ovl_En_Brob/z_en_brob.h
index a3dd0c8f8a..02516f4e9b 100644
--- a/src/overlays/actors/ovl_En_Brob/z_en_brob.h
+++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.h
@@ -2,11 +2,11 @@
#define Z_EN_BROB_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBrob;
-typedef void (*EnBrobActionFunc)(struct EnBrob* this, PlayState* play);
+typedef void (*EnBrobActionFunc)(struct EnBrob* this, struct PlayState* play);
typedef struct EnBrob {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c
index 5a284929ed..79860d7f7f 100644
--- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c
+++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c
@@ -1,4 +1,16 @@
#include "z_en_bubble.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_bubble/object_bubble.h"
#define FLAGS ACTOR_FLAG_ATTENTION_ENABLED
@@ -95,7 +107,7 @@ void EnBubble_SetDimensions(EnBubble* this, f32 dim) {
}
u32 func_809CBCBC(EnBubble* this) {
- ColliderElement* elem = &this->colliderSphere.elements[0].base;
+ ColliderElement* elem = &this->colliderJntSph.elements[0].base;
elem->atDmgInfo.dmgFlags = DMG_EXPLOSIVE;
elem->atDmgInfo.effect = 0;
@@ -112,10 +124,10 @@ u32 func_809CBCEC(EnBubble* this) {
}
void EnBubble_DamagePlayer(EnBubble* this, PlayState* play) {
- s32 damage = -this->colliderSphere.elements[0].base.atDmgInfo.damage;
+ s32 damage = -this->colliderJntSph.elements[0].base.atDmgInfo.damage;
play->damagePlayer(play, damage);
- func_8002F7A0(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
+ Actor_SetPlayerKnockbackSmallNoDamage(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
}
s32 EnBubble_Explosion(EnBubble* this, PlayState* play) {
@@ -206,8 +218,8 @@ void EnBubble_Fly(EnBubble* this, PlayState* play) {
s32 bgId;
u8 bounceCount;
- if (this->colliderSphere.elements[1].base.acElemFlags & ACELEM_HIT) {
- attackerActor = this->colliderSphere.base.ac;
+ if (this->colliderJntSph.elements[1].base.acElemFlags & ACELEM_HIT) {
+ attackerActor = this->colliderJntSph.base.ac;
this->normalizedAttackerVelocity = attackerActor->velocity;
EnBubble_Vec3fNormalize(&this->normalizedAttackerVelocity);
this->velocityFromAttack.x += (this->normalizedAttackerVelocity.x * 3.0f);
@@ -280,14 +292,14 @@ void EnBubble_Fly(EnBubble* this, PlayState* play) {
}
u32 func_809CC648(EnBubble* this) {
- if (((this->colliderSphere.base.acFlags & AC_HIT) != 0) == false) {
+ if (((this->colliderJntSph.base.acFlags & AC_HIT) != 0) == false) {
return false;
}
- this->colliderSphere.base.acFlags &= ~AC_HIT;
- if (this->colliderSphere.elements[1].base.acElemFlags & ACELEM_HIT) {
- this->unk_1F0.x = this->colliderSphere.base.ac->velocity.x / 10.0f;
- this->unk_1F0.y = this->colliderSphere.base.ac->velocity.y / 10.0f;
- this->unk_1F0.z = this->colliderSphere.base.ac->velocity.z / 10.0f;
+ this->colliderJntSph.base.acFlags &= ~AC_HIT;
+ if (this->colliderJntSph.elements[1].base.acElemFlags & ACELEM_HIT) {
+ this->unk_1F0.x = this->colliderJntSph.base.ac->velocity.x / 10.0f;
+ this->unk_1F0.y = this->colliderJntSph.base.ac->velocity.y / 10.0f;
+ this->unk_1F0.z = this->colliderJntSph.base.ac->velocity.z / 10.0f;
this->graphicRotSpeed = 128.0f;
this->graphicEccentricity = 0.48f;
return false;
@@ -300,8 +312,8 @@ u32 EnBubble_DetectPop(EnBubble* this, PlayState* play) {
if (DECR(this->unk_208) != 0 || this->actionFunc == EnBubble_Pop) {
return false;
}
- if (this->colliderSphere.base.ocFlags2 & OC2_HIT_PLAYER) {
- this->colliderSphere.base.ocFlags2 &= ~OC2_HIT_PLAYER;
+ if (this->colliderJntSph.base.ocFlags2 & OC2_HIT_PLAYER) {
+ this->colliderJntSph.base.ocFlags2 &= ~OC2_HIT_PLAYER;
EnBubble_DamagePlayer(this, play);
this->unk_208 = 8;
return true;
@@ -314,7 +326,7 @@ void func_809CC774(EnBubble* this) {
Vec3f src;
Vec3f dest;
- dim = &this->colliderSphere.elements[0].dim;
+ dim = &this->colliderJntSph.elements[0].dim;
src.x = dim->modelSphere.center.x;
src.y = dim->modelSphere.center.y;
src.z = dim->modelSphere.center.z;
@@ -324,7 +336,7 @@ void func_809CC774(EnBubble* this) {
dim->worldSphere.center.y = dest.y;
dim->worldSphere.center.z = dest.z;
dim->worldSphere.radius = dim->modelSphere.radius * (1.0f + this->expansionWidth);
- this->colliderSphere.elements[1].dim = *dim;
+ this->colliderJntSph.elements[1].dim = *dim;
}
void EnBubble_Init(Actor* thisx, PlayState* play) {
@@ -332,8 +344,8 @@ void EnBubble_Init(Actor* thisx, PlayState* play) {
u32 pad;
ActorShape_Init(&this->actor.shape, 16.0f, ActorShadow_DrawCircle, 0.2f);
- Collider_InitJntSph(play, &this->colliderSphere);
- Collider_SetJntSph(play, &this->colliderSphere, &this->actor, &sJntSphInit, this->colliderSphereItems);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(9), &sColChkInfoInit2);
this->actor.naviEnemyId = NAVI_ENEMY_SHABOM;
this->bounceDirection.x = Rand_ZeroOne();
@@ -350,7 +362,7 @@ void EnBubble_Init(Actor* thisx, PlayState* play) {
void EnBubble_Destroy(Actor* thisx, PlayState* play) {
EnBubble* this = (EnBubble*)thisx;
- Collider_DestroyJntSph(play, &this->colliderSphere);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
}
void EnBubble_Wait(EnBubble* this, PlayState* play) {
@@ -360,8 +372,8 @@ void EnBubble_Wait(EnBubble* this, PlayState* play) {
} else {
EnBubble_Fly(this, play);
this->actor.shape.yOffset = ((this->expansionHeight + 1.0f) * 16.0f);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSphere.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSphere.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
}
@@ -389,8 +401,8 @@ void EnBubble_Regrow(EnBubble* this, PlayState* play) {
if (func_809CC020(this)) {
this->actionFunc = EnBubble_Wait;
}
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSphere.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSphere.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
void EnBubble_Update(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.h b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.h
index d753768811..9b183ae2bc 100644
--- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.h
+++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.h
@@ -2,17 +2,17 @@
#define Z_EN_BUBBLE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBubble;
-typedef void (*EnBubbleActionFunc)(struct EnBubble*, PlayState*);
+typedef void (*EnBubbleActionFunc)(struct EnBubble*, struct PlayState*);
typedef struct EnBubble {
/* 0x0000 */ Actor actor;
/* 0x014C */ EnBubbleActionFunc actionFunc;
- /* 0x0150 */ ColliderJntSph colliderSphere;
- /* 0x0170 */ ColliderJntSphElement colliderSphereItems[2];
+ /* 0x0150 */ ColliderJntSph colliderJntSph;
+ /* 0x0170 */ ColliderJntSphElement colliderJntSphElements[2];
/* 0x01F0 */ Vec3f unk_1F0; // set but never used
/* 0x01FC */ Vec3f unk_1FC; // randomly generated, set but never used
/* 0x0208 */ s16 unk_208; // set to 8 when about to pop
diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/src/overlays/actors/ovl_En_Butte/z_en_butte.c
index 4a93d3f8dd..2ec5e260f8 100644
--- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c
+++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c
@@ -6,6 +6,21 @@
#include "z_en_butte.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
@@ -36,7 +51,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[] = {
},
{ 0, { { 0, 0, 0 }, 5 }, 100 } },
};
-static ColliderJntSphInit sColliderInit = {
+static ColliderJntSphInit sColliderJntSphInit = {
{
COL_MATERIAL_NONE,
AT_NONE,
@@ -139,9 +154,9 @@ void EnButte_DrawTransformationEffect(EnButte* this, PlayState* play) {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 700, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 20, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 600, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 700, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 20, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 600, ICHAIN_STOP),
};
void EnButte_Init(Actor* thisx, PlayState* play) {
@@ -154,12 +169,12 @@ void EnButte_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
if (PARAMS_GET_U(this->actor.params, 0, 1) == 1) {
- this->actor.uncullZoneScale = 200.0f;
+ this->actor.cullingVolumeScale = 200.0f;
}
SkelAnime_Init(play, &this->skelAnime, &gButterflySkel, &gButterflyAnim, this->jointTable, this->morphTable, 8);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderElements);
this->actor.colChkInfo.mass = 0;
this->unk_25C = Rand_ZeroOne() * 0xFFFF;
this->unk_25E = Rand_ZeroOne() * 0xFFFF;
@@ -168,8 +183,8 @@ void EnButte_Init(Actor* thisx, PlayState* play) {
EnButte_SetupFlyAround(this);
this->actor.shape.rot.x -= 0x2320;
this->drawSkelAnime = true;
- // "field keep butterfly"
- PRINTF("(field keep 蝶)(%x)(arg_data 0x%04x)\n", this, this->actor.params);
+ PRINTF(T("(field keep 蝶)(%x)(arg_data 0x%04x)\n", "(field keep butterfly)(%x)(arg_data 0x%04x)\n"), this,
+ this->actor.params);
}
void EnButte_Destroy(Actor* thisx, PlayState* play2) {
@@ -347,7 +362,7 @@ void EnButte_FollowLink(EnButte* this, PlayState* play) {
void EnButte_SetupTransformIntoFairy(EnButte* this) {
this->timer = 9;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->skelAnime.playSpeed = 1.0f;
EnButte_ResetTransformationEffect();
this->actionFunc = EnButte_TransformIntoFairy;
diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.h b/src/overlays/actors/ovl_En_Butte/z_en_butte.h
index 1a34747dbd..1a1764520c 100644
--- a/src/overlays/actors/ovl_En_Butte/z_en_butte.h
+++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.h
@@ -2,16 +2,16 @@
#define Z_EN_BUTTE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnButte;
-typedef void (*EnButteActionFunc)(struct EnButte*, PlayState*);
+typedef void (*EnButteActionFunc)(struct EnButte*, struct PlayState*);
typedef struct EnButte {
/* 0x0000 */ Actor actor;
/* 0x014C */ ColliderJntSph collider;
- /* 0x016C */ ColliderJntSphElement colliderItems[1];
+ /* 0x016C */ ColliderJntSphElement colliderElements[1];
/* 0x01AC */ SkelAnime skelAnime;
/* 0x01F0 */ Vec3s jointTable[8];
/* 0x0220 */ Vec3s morphTable[8];
diff --git a/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/src/overlays/actors/ovl_En_Bw/z_en_bw.c
index 93675ba319..0aad9cccae 100644
--- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c
+++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.c
@@ -5,10 +5,28 @@
*/
#include "z_en_bw.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_bw/object_bw.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnBw_Init(Actor* thisx, PlayState* play);
void EnBw_Destroy(Actor* thisx, PlayState* play);
@@ -137,7 +155,9 @@ void EnBw_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f);
this->actor.colChkInfo.damageTable = &sDamageTable;
this->actor.colChkInfo.health = 6;
+#if OOT_VERSION >= PAL_1_0
this->actor.colChkInfo.mass = MASS_HEAVY;
+#endif
this->actor.focus.pos = this->actor.world.pos;
func_809CE9A8(this);
this->color1.a = this->color1.r = 255;
@@ -432,7 +452,7 @@ void func_809CF8F0(EnBw* this) {
this->unk_222 = 1000;
this->actor.velocity.y = 11.0f;
Actor_PlaySfx(&this->actor, NA_SE_EN_STAL_JUMP);
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
EnBw_SetupAction(this, func_809CF984);
}
@@ -462,7 +482,7 @@ void func_809CF984(EnBw* this, PlayState* play) {
}
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 30.0f, 11, 4.0f, 0, 0, false);
this->unk_222 = 3000;
- this->actor.flags &= ~ACTOR_FLAG_24;
+ this->actor.flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
this->actor.speed = 0.0f;
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_M_GND);
EnBw_SetupAction(this, func_809CE884);
diff --git a/src/overlays/actors/ovl_En_Bw/z_en_bw.h b/src/overlays/actors/ovl_En_Bw/z_en_bw.h
index 5f74f70c4d..7c0698d22c 100644
--- a/src/overlays/actors/ovl_En_Bw/z_en_bw.h
+++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.h
@@ -2,10 +2,10 @@
#define Z_EN_BW_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBw;
-typedef void (*EnBwActionFunc)(struct EnBw*, PlayState*);
+typedef void (*EnBwActionFunc)(struct EnBw*, struct PlayState*);
typedef enum TorchSlugLimb {
/* 0 */ TORCH_SLUG_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/src/overlays/actors/ovl_En_Bx/z_en_bx.c
index 64d44b27f5..51896cbb7d 100644
--- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c
+++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c
@@ -5,9 +5,22 @@
*/
#include "z_en_bx.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_bxa/object_bxa.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnBx_Init(Actor* thisx, PlayState* play);
void EnBx_Destroy(Actor* thisx, PlayState* play);
@@ -98,7 +111,7 @@ void EnBx_Init(Actor* thisx, PlayState* play) {
Collider_SetQuad(play, &this->colliderQuad, &this->actor, &sQuadInit);
thisx->colChkInfo.mass = MASS_IMMOVABLE;
this->unk_14C = 0;
- thisx->uncullZoneDownward = 2000.0f;
+ thisx->cullingVolumeDownward = 2000.0f;
if (Flags_GetSwitch(play, PARAMS_GET_U(thisx->params, 8, 8))) {
Actor_Kill(&this->actor);
}
@@ -146,14 +159,14 @@ void EnBx_Update(Actor* thisx, PlayState* play) {
}
if ((&player->actor != this->collider.base.at) && (&player->actor != this->collider.base.ac) &&
(&player->actor != this->colliderQuad.base.at) && (player->invincibilityTimer <= 0)) {
- if (player->invincibilityTimer < -39) {
+ if (player->invincibilityTimer <= -40) {
player->invincibilityTimer = 0;
} else {
player->invincibilityTimer = 0;
play->damagePlayer(play, -4);
}
}
- func_8002F71C(play, &this->actor, 6.0f, tmp32, 6.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 6.0f, tmp32, 6.0f);
player->invincibilityTimer = tmp33;
}
diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.h b/src/overlays/actors/ovl_En_Bx/z_en_bx.h
index 189349a0f1..077def413d 100644
--- a/src/overlays/actors/ovl_En_Bx/z_en_bx.h
+++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.h
@@ -2,7 +2,7 @@
#define Z_EN_BX_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnBx;
diff --git a/src/overlays/actors/ovl_En_Changer/z_en_changer.c b/src/overlays/actors/ovl_En_Changer/z_en_changer.c
index 58b4d9e9a2..a0b1e03921 100644
--- a/src/overlays/actors/ovl_En_Changer/z_en_changer.c
+++ b/src/overlays/actors/ovl_En_Changer/z_en_changer.c
@@ -5,9 +5,18 @@
*/
#include "z_en_changer.h"
-#include "terminal.h"
-#include "overlays/actors/ovl_Item_Etcetera/z_item_etcetera.h"
+#include "overlays/actors/ovl_En_Box/z_en_box.h"
#include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h"
+#include "overlays/actors/ovl_Item_Etcetera/z_item_etcetera.h"
+
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64debug_display.h"
+#include "z64play.h"
+#include "z64save.h"
#define FLAGS 0
@@ -84,14 +93,14 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) {
}
PRINTF("\n\n");
- // "Treasure generation (which room is it?)"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 宝発生(部屋はどれ?) %d\n" VT_RST, play->roomCtx.curRoom.num);
- // "How is the Bit?"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ ビットは? \t %x\n" VT_RST, play->actorCtx.flags.chest);
- // "How is the Save BIT?"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ セーブBITは? %x\n" VT_RST, sTreasureFlags[minigameRoomNum]);
- // "Is it already a zombie?"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ もう、ゾンビ?\t %d\n" VT_RST, this->roomChestsOpened);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 宝発生(部屋はどれ?) %d\n", "☆☆☆☆☆ Treasure found (which room?) %d\n") VT_RST,
+ play->roomCtx.curRoom.num);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ ビットは? \t %x\n", "☆☆☆☆☆ What about bits? \t %x\n") VT_RST,
+ play->actorCtx.flags.chest);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ セーブBITは? %x\n", "☆☆☆☆☆ What is the save BIT? %x\n") VT_RST,
+ sTreasureFlags[minigameRoomNum]);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ もう、ゾンビ?\t %d\n", "☆☆☆☆☆ Already a zombie?\t %d\n") VT_RST,
+ this->roomChestsOpened);
PRINTF("\n\n");
minigameRoomNum *= 2;
@@ -112,8 +121,9 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) {
0xFF;
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, 20.0f, 20.0f, -2500.0f, 0, 0, 0,
((sTreasureFlags[5] & 0x1F) << 8) + rewardParams);
- // "Central treasure instance/occurrence (GREAT)"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ 中央宝発生(GREAT) ☆☆☆☆☆ %x\n" VT_RST, rewardChestParams);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ 中央宝発生(GREAT) ☆☆☆☆☆ %x\n",
+ "☆☆☆☆☆ Central treasure occurrence (GREAT) ☆☆☆☆☆ %x\n") VT_RST,
+ rewardChestParams);
this->actionFunc = EnChanger_SetHeartPieceFlag;
return;
}
@@ -149,14 +159,15 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) {
leftChestParams);
if (this->leftChest != NULL) {
- // "Left treasure generation (what does it contain?)"
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 左宝発生(ナニがはいってるの?) ☆☆☆☆☆ %x\n" VT_RST, leftChestParams);
- // "What is the room number?"
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 部屋番号は? %x\n" VT_RST, play->roomCtx.curRoom.num);
- // "What is the bit?"
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ ビットはなぁに? %x\n" VT_RST, this->rightChestNum);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ 左宝発生(ナニがはいってるの?) ☆☆☆☆☆ %x\n",
+ "☆☆☆☆☆ Left treasure generation (what does it contain?) ☆☆☆☆☆ %x\n") VT_RST,
+ leftChestParams);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ 部屋番号は? %x\n", "☆☆☆☆☆ What is the room number? %x\n") VT_RST,
+ play->roomCtx.curRoom.num);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ ビットはなぁに? %x\n", "☆☆☆☆☆ What is the bit? %x\n") VT_RST,
+ this->rightChestNum);
// "Sukesuke-kun" (something to do with being invisible)
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ すけすけ君? %x\n" VT_RST, rightChestItem);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ すけすけ君? %x\n", "☆☆☆☆☆ See-through guy? %x\n") VT_RST, rightChestItem);
PRINTF("\n\n");
if (this->roomChestsOpened) {
Flags_SetTreasure(play, this->leftChestNum & 0x1F);
@@ -173,14 +184,15 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) {
rightChestParams);
if (this->rightChest != NULL) {
- // "Right treasure generation (what does it contain?)"
- PRINTF(VT_FGCOL(CYAN) "☆☆☆☆☆ 右宝発生(ナニがはいってるの?) ☆☆☆☆☆ %x\n" VT_RST, rightChestParams);
- // "What is the room number?"
- PRINTF(VT_FGCOL(CYAN) "☆☆☆☆☆ 部屋番号は? %d\n" VT_RST, play->roomCtx.curRoom.num);
- // "What is the bit?"
- PRINTF(VT_FGCOL(CYAN) "☆☆☆☆☆ ビットはなぁに? %x\n" VT_RST, this->leftChestNum);
+ PRINTF(VT_FGCOL(CYAN) T("☆☆☆☆☆ 右宝発生(ナニがはいってるの?) ☆☆☆☆☆ %x\n",
+ "☆☆☆☆☆ Right treasure generation (what does it contain?) ☆☆☆☆☆ %x\n") VT_RST,
+ rightChestParams);
+ PRINTF(VT_FGCOL(CYAN) T("☆☆☆☆☆ 部屋番号は? %d\n", "☆☆☆☆☆ What is the room number? %d\n") VT_RST,
+ play->roomCtx.curRoom.num);
+ PRINTF(VT_FGCOL(CYAN) T("☆☆☆☆☆ ビットはなぁに? %x\n", "☆☆☆☆☆ What is the bit? %x\n") VT_RST,
+ this->leftChestNum);
// "Sukesuke-kun" (something to do with being invisible)
- PRINTF(VT_FGCOL(CYAN) "☆☆☆☆☆ すけすけ君? %x\n" VT_RST, leftChestItem);
+ PRINTF(VT_FGCOL(CYAN) T("☆☆☆☆☆ すけすけ君? %x\n", "☆☆☆☆☆ See-through guy? %x\n") VT_RST, leftChestItem);
PRINTF("\n\n");
if (this->roomChestsOpened) {
@@ -204,7 +216,7 @@ void EnChanger_Wait(EnChanger* this, PlayState* play) {
Flags_SetTreasure(play, this->rightChestNum & 0x1F);
this->actionFunc = EnChanger_OpenChests;
} else if (this->rightChest->unk_1F4 != 0) {
- this->chestOpened = CHEST_RIGHT;
+ this->selectedChest = CHEST_RIGHT;
this->timer = 80;
Flags_SetTreasure(play, this->leftChestNum & 0x1F);
this->actionFunc = EnChanger_OpenChests;
@@ -216,8 +228,8 @@ void EnChanger_OpenChests(EnChanger* this, PlayState* play) {
f32 zPos;
f32 yPos;
f32 xPos;
- s16 temp_s0;
- s16 temp_s0_2;
+ s16 selectedChest;
+ s16 unopenedChestItemType;
EnBox* left;
EnBox* right;
@@ -225,22 +237,27 @@ void EnChanger_OpenChests(EnChanger* this, PlayState* play) {
right = this->rightChest;
if (this->timer == 0) {
- temp_s0_2 = temp_s0 = this->chestOpened; // Required to use the right registers
+ // `unopenedChestItemType` being set here is required for matching, but doesn't do anything useful
+ unopenedChestItemType = selectedChest = this->selectedChest;
- switch (temp_s0_2) {
+ switch (selectedChest) {
case CHEST_LEFT:
xPos = right->dyna.actor.world.pos.x;
yPos = right->dyna.actor.world.pos.y;
zPos = right->dyna.actor.world.pos.z;
if (this->rightChestGetItemId == GI_DOOR_KEY) {
- Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, 0xF);
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0,
+ EXITEM_SMALL_KEY_CHEST);
Flags_SetSwitch(play, 0x32);
} else {
- temp_s0_2 = (s16)(this->rightChestGetItemId - GI_RUPEE_GREEN_LOSE) + EXITEM_CHEST;
- // "Open right treasure (chest)"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 右宝開く ☆☆☆☆☆ %d\n" VT_RST, temp_s0_2);
- Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, temp_s0_2);
+ unopenedChestItemType =
+ (s16)(this->rightChestGetItemId - GI_RUPEE_GREEN_LOSE) + EXITEM_GREEN_RUPEE_CHEST;
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 右宝開く ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Right treasure open ☆☆☆☆☆ %d\n")
+ VT_RST,
+ unopenedChestItemType);
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0,
+ unopenedChestItemType);
}
break;
case CHEST_RIGHT:
@@ -249,13 +266,16 @@ void EnChanger_OpenChests(EnChanger* this, PlayState* play) {
zPos = left->dyna.actor.world.pos.z;
if (this->leftChestGetItemId == GI_DOOR_KEY) {
- Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, 0xF);
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0,
+ EXITEM_SMALL_KEY_CHEST);
Flags_SetSwitch(play, 0x32);
} else {
- temp_s0_2 = (s16)(this->leftChestGetItemId - 0x72) + 0xA;
- // "Open left treasure (chest)"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 左宝開く ☆☆☆☆☆ %d\n" VT_RST, temp_s0_2);
- Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0, temp_s0_2);
+ unopenedChestItemType =
+ (s16)(this->leftChestGetItemId - GI_RUPEE_GREEN_LOSE) + EXITEM_GREEN_RUPEE_CHEST;
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 左宝開く ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Left treasure open ☆☆☆☆☆ %d\n") VT_RST,
+ unopenedChestItemType);
+ Actor_Spawn(&play->actorCtx, play, ACTOR_EN_EX_ITEM, xPos, yPos, zPos, 0, 0, 0,
+ unopenedChestItemType);
}
break;
}
@@ -282,7 +302,7 @@ void EnChanger_Update(Actor* thisx, PlayState* play) {
this->timer--;
}
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 255, 0, 255, 255, 4, play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_En_Changer/z_en_changer.h b/src/overlays/actors/ovl_En_Changer/z_en_changer.h
index b5209109ef..6807287787 100644
--- a/src/overlays/actors/ovl_En_Changer/z_en_changer.h
+++ b/src/overlays/actors/ovl_En_Changer/z_en_changer.h
@@ -2,24 +2,23 @@
#define Z_EN_CHANGER_H
#include "ultra64.h"
-#include "global.h"
-#include "overlays/actors/ovl_En_Box/z_en_box.h"
+#include "z64actor.h"
struct EnChanger;
-typedef void (*EnChangerActionFunc)(struct EnChanger*, PlayState*);
+typedef void (*EnChangerActionFunc)(struct EnChanger*, struct PlayState*);
typedef struct EnChanger {
/* 0x0000 */ Actor actor;
/* 0x014C */ EnChangerActionFunc actionFunc;
- /* 0x0150 */ EnBox* leftChest;
- /* 0x0154 */ EnBox* rightChest;
- /* 0x0158 */ EnBox* finalChest;
+ /* 0x0150 */ struct EnBox* leftChest;
+ /* 0x0154 */ struct EnBox* rightChest;
+ /* 0x0158 */ struct EnBox* finalChest;
/* 0x015C */ s16 leftChestNum;
/* 0x015E */ s16 rightChestNum;
/* 0x0160 */ s16 leftChestGetItemId;
/* 0x0162 */ s16 rightChestGetItemId;
- /* 0x0164 */ s16 chestOpened;
+ /* 0x0164 */ s16 selectedChest;
/* 0x0166 */ s16 timer;
/* 0x0168 */ s16 roomChestsOpened;
} EnChanger; // size = 0x016C
diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c
index 921f4d016d..6bcbd62323 100644
--- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c
+++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c
@@ -1,6 +1,21 @@
#include "z_en_clear_tag.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnClearTag_Init(Actor* thisx, PlayState* play);
void EnClearTag_Destroy(Actor* thisx, PlayState* play);
@@ -431,7 +446,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
Math_ApproachZeroF(&this->roll, 0.1f, 0.2f);
}
- // Calculate a vector towards the targetted position.
+ // Calculate a vector towards the targeted position.
vectorToTargetX = this->targetPosition.x - this->actor.world.pos.x;
vectorToTargetY = this->targetPosition.y - this->actor.world.pos.y;
vectorToTargetZ = this->targetPosition.z - this->actor.world.pos.z;
@@ -680,7 +695,7 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
/**
* EnClear_Tag draw function.
* Laser clear tag type will draw two lasers.
- * Arwing clear tage types will draw the Arwing, the backfire, and a shadow.
+ * Arwing clear tag types will draw the Arwing, the backfire, and a shadow.
*/
void EnClearTag_Draw(Actor* thisx, PlayState* play) {
s32 pad;
diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h
index 945a5462d6..6978941868 100644
--- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h
+++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h
@@ -2,7 +2,7 @@
#define Z_EN_CLEAR_TAG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnClearTag;
diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c
index a1c6b3a380..d459c93f6f 100644
--- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c
+++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c
@@ -6,6 +6,18 @@
#include "z_en_cow.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
void EnCow_Init(Actor* thisx, PlayState* play);
@@ -217,7 +229,7 @@ void EnCow_UpdateAnimation(EnCow* this, PlayState* play) {
void EnCow_TalkEnd(EnCow* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Message_CloseTextbox(play);
this->actionFunc = EnCow_Idle;
}
@@ -225,7 +237,7 @@ void EnCow_TalkEnd(EnCow* this, PlayState* play) {
void EnCow_GiveMilkEnd(EnCow* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actionFunc = EnCow_Idle;
}
}
@@ -241,7 +253,7 @@ void EnCow_GiveMilkWait(EnCow* this, PlayState* play) {
void EnCow_GiveMilk(EnCow* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Message_CloseTextbox(play);
this->actionFunc = EnCow_GiveMilkWait;
Actor_OfferGetItem(&this->actor, play, GI_MILK, 10000.0f, 100.0f);
@@ -264,7 +276,7 @@ void EnCow_Talk(EnCow* this, PlayState* play) {
if (Actor_TalkOfferAccepted(&this->actor, play)) {
this->actionFunc = EnCow_CheckForEmptyBottle;
} else {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferTalk(&this->actor, play, 170.0f);
this->actor.textId = 0x2006;
}
@@ -290,7 +302,7 @@ void EnCow_Idle(EnCow* this, PlayState* play) {
(ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) < 25000)) {
R_EPONAS_SONG_PLAYED = false;
this->actionFunc = EnCow_Talk;
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferTalk(&this->actor, play, 170.0f);
this->actor.textId = 0x2006;
} else {
diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.h b/src/overlays/actors/ovl_En_Cow/z_en_cow.h
index cdec79fca8..e5602967e1 100644
--- a/src/overlays/actors/ovl_En_Cow/z_en_cow.h
+++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.h
@@ -2,7 +2,7 @@
#define Z_EN_COW_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "assets/objects/object_cow/object_cow.h"
#define COW_FLAG_PLAYER_NEARBY (1 << 1)
@@ -23,7 +23,7 @@ typedef enum CowCollider {
struct EnCow;
-typedef void (*EnCowActionFunc)(struct EnCow*, PlayState*);
+typedef void (*EnCowActionFunc)(struct EnCow*, struct PlayState*);
typedef struct EnCow {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/src/overlays/actors/ovl_En_Crow/z_en_crow.c
index 54c261ccd9..3ce86ff9d3 100644
--- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c
+++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c
@@ -1,7 +1,20 @@
#include "z_en_crow.h"
+
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_crow/object_crow.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_14)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_CAN_ATTACH_TO_ARROW)
void EnCrow_Init(Actor* thisx, PlayState* play);
void EnCrow_Destroy(Actor* thisx, PlayState* play);
@@ -97,7 +110,7 @@ static DamageTable sDamageTable = {
static u32 sDeathCount = 0;
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 3000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 3000, ICHAIN_CONTINUE),
ICHAIN_S8(naviEnemyId, NAVI_ENEMY_GUAY, ICHAIN_CONTINUE),
ICHAIN_F32_DIV1000(gravity, -200, ICHAIN_CONTINUE),
ICHAIN_F32(lockOnArrowOffset, 2000, ICHAIN_STOP),
@@ -111,7 +124,7 @@ void EnCrow_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(play, &this->skelAnime, &gGuaySkel, &gGuayFlyAnim, this->jointTable, this->morphTable, 9);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
this->collider.elements[0].dim.worldSphere.radius = sJntSphInit.elements[0].dim.modelSphere.radius;
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
ActorShape_Init(&this->actor.shape, 2000.0f, ActorShadow_DrawCircle, 20.0f);
@@ -175,12 +188,12 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40);
}
- if (this->actor.flags & ACTOR_FLAG_15) {
+ if (this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW) {
this->actor.speed = 0.0f;
}
this->collider.base.acFlags &= ~AC_ON;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actionFunc = EnCrow_Damaged;
}
@@ -329,7 +342,7 @@ void EnCrow_Damaged(EnCrow* this, PlayState* play) {
Math_StepToF(&this->actor.speed, 0.0f, 0.5f);
this->actor.colorFilterTimer = 40;
- if (!(this->actor.flags & ACTOR_FLAG_15)) {
+ if (!(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) {
if (this->actor.colorFilterParams & 0x4000) {
Math_ScaledStepToS(&this->actor.shape.rot.x, 0x4000, 0x200);
this->actor.shape.rot.z += 0x1780;
@@ -401,7 +414,7 @@ void EnCrow_Respawn(EnCrow* this, PlayState* play) {
}
if (Math_StepToF(&this->actor.scale.x, target, target * 0.1f)) {
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.colChkInfo.health = 1;
EnCrow_SetupFlyIdle(this);
}
diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.h b/src/overlays/actors/ovl_En_Crow/z_en_crow.h
index 87e9ae0542..fb13e7bca6 100644
--- a/src/overlays/actors/ovl_En_Crow/z_en_crow.h
+++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.h
@@ -2,11 +2,11 @@
#define Z_EN_CROW_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnCrow;
-typedef void (*EnCrowActionFunc)(struct EnCrow*, PlayState*);
+typedef void (*EnCrowActionFunc)(struct EnCrow*, struct PlayState*);
typedef struct EnCrow {
/* 0x0000 */ Actor actor;
@@ -19,7 +19,7 @@ typedef struct EnCrow {
/* 0x01CA */ Vec3s jointTable[9];
/* 0x0200 */ Vec3s morphTable[9];
/* 0x0238 */ ColliderJntSph collider;
- /* 0x0258 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0258 */ ColliderJntSphElement colliderElements[1];
} EnCrow; // size = 0x0298
#endif
diff --git a/src/overlays/actors/ovl_En_Cs/z_en_cs.c b/src/overlays/actors/ovl_En_Cs/z_en_cs.c
index 807abac5ec..8b74a6063e 100644
--- a/src/overlays/actors/ovl_En_Cs/z_en_cs.c
+++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.c
@@ -1,4 +1,18 @@
#include "z_en_cs.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_cs/object_cs.h"
#include "assets/objects/object_link_child/object_link_child.h"
diff --git a/src/overlays/actors/ovl_En_Cs/z_en_cs.h b/src/overlays/actors/ovl_En_Cs/z_en_cs.h
index 843c8ad510..8e1d665f54 100644
--- a/src/overlays/actors/ovl_En_Cs/z_en_cs.h
+++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.h
@@ -2,11 +2,11 @@
#define Z_EN_CS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnCs;
-typedef void (*EnCsActionFunc)(struct EnCs*, PlayState*);
+typedef void (*EnCsActionFunc)(struct EnCs*, struct PlayState*);
typedef struct EnCs {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c
index 0f84c7784a..98a09bb25e 100644
--- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c
+++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c
@@ -1,8 +1,27 @@
#include "z_en_daiku.h"
#include "overlays/actors/ovl_En_GeldB/z_en_geldb.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_daiku/object_daiku.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
+
+#define ENDAIKU_GET_TYPE(thisx) PARAMS_GET_U((thisx)->params, 0, 2)
+#define ENDAIKU_GET_PATH_INDEX(thisx) PARAMS_GET_U((thisx)->params, 4, 4)
+#define ENDAIKU_GET_DOOR_SWITCH_FLAG(thisx) PARAMS_GET_U((thisx)->params, 8, 6)
typedef struct EnDaikuEscapeSubCamParam {
Vec3f eyePosDeltaLocal;
@@ -11,10 +30,10 @@ typedef struct EnDaikuEscapeSubCamParam {
// state flags
-// probably related to animating torso and head to look towards the player
-#define ENDAIKU_STATEFLAG_1 (1 << 1)
-// same
-#define ENDAIKU_STATEFLAG_2 (1 << 2)
+// the carpenter tracks the player position
+#define ENDAIKU_STATEFLAG_TRACK_PLAYER (1 << 1)
+// if tracking the player, track with the carpenter's full body
+#define ENDAIKU_STATEFLAG_TRACK_WITH_FULL_BODY (1 << 2)
// the gerudo guard appeared (after talking to the carpenter)
#define ENDAIKU_STATEFLAG_GERUDOFIGHTING (1 << 3)
// the gerudo guard was defeated
@@ -119,9 +138,9 @@ typedef enum EnDaikuAnimation {
} EnDaikuAnimation;
static AnimationFrameCountInfo sAnimationInfo[] = {
- { &object_daiku_Anim_001AB0, 1.0f, 0, 0 }, { &object_daiku_Anim_007DE0, 1.0f, 0, 0 },
- { &object_daiku_Anim_00885C, 1.0f, 0, 0 }, { &object_daiku_Anim_000C44, 1.0f, 0, 0 },
- { &object_daiku_Anim_008164, 1.0f, 0, 0 },
+ { &object_daiku_Anim_001AB0, 1.0f, ANIMMODE_LOOP, 0 }, { &object_daiku_Anim_007DE0, 1.0f, ANIMMODE_LOOP, 0 },
+ { &object_daiku_Anim_00885C, 1.0f, ANIMMODE_LOOP, 0 }, { &object_daiku_Anim_000C44, 1.0f, ANIMMODE_LOOP, 0 },
+ { &object_daiku_Anim_008164, 1.0f, ANIMMODE_LOOP, 0 },
};
static EnDaikuEscapeSubCamParam sEscapeSubCamParams[] = {
@@ -150,21 +169,21 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) {
EnDaiku* this = (EnDaiku*)thisx;
s32 pad;
s32 noKill = true;
- s32 isFree = false;
+ s32 isRescued = false;
- if (PARAMS_GET_U(this->actor.params, 0, 2) == 0 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(0))) {
- isFree = true;
- } else if (PARAMS_GET_U(this->actor.params, 0, 2) == 1 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(1))) {
- isFree = true;
- } else if (PARAMS_GET_U(this->actor.params, 0, 2) == 2 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(2))) {
- isFree = true;
- } else if (PARAMS_GET_U(this->actor.params, 0, 2) == 3 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(3))) {
- isFree = true;
+ if (ENDAIKU_GET_TYPE(&this->actor) == ENDAIKU_TYPE0 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTER_0_RESCUED)) {
+ isRescued = true;
+ } else if (ENDAIKU_GET_TYPE(&this->actor) == ENDAIKU_TYPE1 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTER_1_RESCUED)) {
+ isRescued = true;
+ } else if (ENDAIKU_GET_TYPE(&this->actor) == ENDAIKU_TYPE2 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTER_2_RESCUED)) {
+ isRescued = true;
+ } else if (ENDAIKU_GET_TYPE(&this->actor) == ENDAIKU_TYPE3 && GET_EVENTCHKINF(EVENTCHKINF_CARPENTER_3_RESCUED)) {
+ isRescued = true;
}
- if (isFree == true && play->sceneId == SCENE_THIEVES_HIDEOUT) {
+ if (isRescued == true && play->sceneId == SCENE_THIEVES_HIDEOUT) {
noKill = false;
- } else if (!isFree && play->sceneId == SCENE_CARPENTERS_TENT) {
+ } else if (!isRescued && play->sceneId == SCENE_CARPENTERS_TENT) {
noKill = false;
}
@@ -197,15 +216,15 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) {
if (play->sceneId == SCENE_THIEVES_HIDEOUT) {
EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_STAND, &this->currentAnimIndex);
- this->stateFlags |= ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2;
+ this->stateFlags |= ENDAIKU_STATEFLAG_TRACK_PLAYER | ENDAIKU_STATEFLAG_TRACK_WITH_FULL_BODY;
this->actionFunc = EnDaiku_Jailed;
} else {
- if (PARAMS_GET_U(this->actor.params, 0, 2) == 1 || PARAMS_GET_U(this->actor.params, 0, 2) == 3) {
+ if (ENDAIKU_GET_TYPE(&this->actor) == ENDAIKU_TYPE1 || ENDAIKU_GET_TYPE(&this->actor) == ENDAIKU_TYPE3) {
EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_SIT, &this->currentAnimIndex);
- this->stateFlags |= ENDAIKU_STATEFLAG_1;
+ this->stateFlags |= ENDAIKU_STATEFLAG_TRACK_PLAYER;
} else {
EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_SHOUT, &this->currentAnimIndex);
- this->stateFlags |= ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2;
+ this->stateFlags |= ENDAIKU_STATEFLAG_TRACK_PLAYER | ENDAIKU_STATEFLAG_TRACK_WITH_FULL_BODY;
}
this->skelAnime.curFrame = (s32)(Rand_ZeroOne() * this->skelAnime.endFrame);
@@ -254,29 +273,28 @@ s32 EnDaiku_UpdateTalking(EnDaiku* this, PlayState* play) {
void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) {
s32 carpenterType;
- s32 freedCount;
- s16 sp2E;
- s16 sp2C;
+ s32 rescuedCount;
+ s16 screenX;
+ s16 screenY;
if (this->talkState == ENDAIKU_STATE_TALKING) {
this->talkState = EnDaiku_UpdateTalking(this, play);
} else if (Actor_TalkOfferAccepted(&this->actor, play)) {
this->talkState = ENDAIKU_STATE_TALKING;
} else {
- Actor_GetScreenPos(play, &this->actor, &sp2E, &sp2C);
- if (sp2E >= 0 && sp2E <= 320 && sp2C >= 0 && sp2C <= 240 && this->talkState == ENDAIKU_STATE_CAN_TALK &&
- Actor_OfferTalk(&this->actor, play, 100.0f) == 1) {
+ Actor_GetScreenPos(play, &this->actor, &screenX, &screenY);
+ if ((screenX >= 0) && (screenX <= SCREEN_WIDTH) && (screenY >= 0) && (screenY <= SCREEN_HEIGHT) &&
+ (this->talkState == ENDAIKU_STATE_CAN_TALK) && (Actor_OfferTalk(&this->actor, play, 100.0f) == true)) {
if (play->sceneId == SCENE_THIEVES_HIDEOUT) {
if (this->stateFlags & ENDAIKU_STATEFLAG_GERUDODEFEATED) {
- freedCount = 0;
+ rescuedCount = 0;
for (carpenterType = 0; carpenterType < 4; carpenterType++) {
- if (gSaveContext.save.info.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX] &
- EVENTCHKINF_CARPENTERS_FREE_MASK(carpenterType)) {
- freedCount++;
+ if (ENDAIKU_IS_CARPENTER_RESCUED(carpenterType)) {
+ rescuedCount++;
}
}
- switch (freedCount) {
+ switch (rescuedCount) {
case 0:
this->actor.textId = 0x605B;
break;
@@ -295,15 +313,15 @@ void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) {
this->actor.textId = 0x6007;
}
} else if (play->sceneId == SCENE_CARPENTERS_TENT) {
- switch (PARAMS_GET_U(this->actor.params, 0, 2)) {
- case 0:
+ switch (ENDAIKU_GET_TYPE(&this->actor)) {
+ case ENDAIKU_TYPE0:
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
this->actor.textId = 0x6060;
} else {
this->actor.textId = 0x605F;
}
break;
- case 1:
+ case ENDAIKU_TYPE1:
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
this->actor.textId = 0x6063;
} else {
@@ -314,7 +332,7 @@ void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) {
}
}
break;
- case 2:
+ case ENDAIKU_TYPE2:
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
this->actor.textId = 0x6066;
} else {
@@ -325,7 +343,7 @@ void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) {
}
}
break;
- case 3:
+ case ENDAIKU_TYPE3:
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT)) {
this->actor.textId = 0x6068;
} else {
@@ -351,8 +369,6 @@ void EnDaiku_TentIdle(EnDaiku* this, PlayState* play) {
*/
void EnDaiku_Jailed(EnDaiku* this, PlayState* play) {
EnGeldB* gerudo;
- s32 temp_t9;
- s32 temp_v1;
if (!(this->stateFlags & ENDAIKU_STATEFLAG_GERUDOFIGHTING)) {
EnDaiku_UpdateText(this, play);
@@ -378,14 +394,14 @@ void EnDaiku_Jailed(EnDaiku* this, PlayState* play) {
void EnDaiku_WaitFreedom(EnDaiku* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
- if (Flags_GetSwitch(play, PARAMS_GET_U(this->actor.params, 8, 6))) {
+ if (Flags_GetSwitch(play, ENDAIKU_GET_DOOR_SWITCH_FLAG(&this->actor))) {
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY;
EnDaiku_UpdateText(this, play);
}
}
/**
- * The carpenter is free, initializes his running away animation
+ * The carpenter is rescued, initializes his running away animation
*/
void EnDaiku_InitEscape(EnDaiku* this, PlayState* play) {
Path* path;
@@ -397,17 +413,16 @@ void EnDaiku_InitEscape(EnDaiku* this, PlayState* play) {
Audio_PlayFanfare(NA_BGM_APPEAR);
EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_RUN, &this->currentAnimIndex);
- this->stateFlags &= ~(ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2);
+ this->stateFlags &= ~(ENDAIKU_STATEFLAG_TRACK_PLAYER | ENDAIKU_STATEFLAG_TRACK_WITH_FULL_BODY);
- gSaveContext.save.info.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX] |=
- EVENTCHKINF_CARPENTERS_FREE_MASK(PARAMS_GET_U(this->actor.params, 0, 2));
+ ENDAIKU_SET_CARPENTER_RESCUED(ENDAIKU_GET_TYPE(&this->actor));
this->actor.gravity = -1.0f;
- this->escapeSubCamTimer = sEscapeSubCamParams[PARAMS_GET_U(this->actor.params, 0, 2)].maxFramesActive;
+ this->escapeSubCamTimer = sEscapeSubCamParams[ENDAIKU_GET_TYPE(&this->actor)].maxFramesActive;
EnDaiku_InitSubCamera(this, play);
exitLoop = false;
- path = &play->pathList[PARAMS_GET_U(this->actor.params, 4, 4)];
+ path = &play->pathList[ENDAIKU_GET_PATH_INDEX(&this->actor)];
while (!exitLoop) {
pointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->waypoint;
dx = pointPos->x - this->actor.world.pos.x;
@@ -444,11 +459,11 @@ void EnDaiku_InitSubCamera(EnDaiku* this, PlayState* play) {
Vec3f eyePosDeltaWorld;
this->subCamActive = true;
- this->escapeSubCamTimer = sEscapeSubCamParams[PARAMS_GET_U(this->actor.params, 0, 2)].maxFramesActive;
+ this->escapeSubCamTimer = sEscapeSubCamParams[ENDAIKU_GET_TYPE(&this->actor)].maxFramesActive;
- eyePosDeltaLocal.x = sEscapeSubCamParams[PARAMS_GET_U(this->actor.params, 0, 2)].eyePosDeltaLocal.x;
- eyePosDeltaLocal.y = sEscapeSubCamParams[PARAMS_GET_U(this->actor.params, 0, 2)].eyePosDeltaLocal.y;
- eyePosDeltaLocal.z = sEscapeSubCamParams[PARAMS_GET_U(this->actor.params, 0, 2)].eyePosDeltaLocal.z;
+ eyePosDeltaLocal.x = sEscapeSubCamParams[ENDAIKU_GET_TYPE(&this->actor)].eyePosDeltaLocal.x;
+ eyePosDeltaLocal.y = sEscapeSubCamParams[ENDAIKU_GET_TYPE(&this->actor)].eyePosDeltaLocal.y;
+ eyePosDeltaLocal.z = sEscapeSubCamParams[ENDAIKU_GET_TYPE(&this->actor)].eyePosDeltaLocal.z;
Matrix_RotateY(BINANG_TO_RAD(this->actor.world.rot.y), MTXMODE_NEW);
Matrix_MultVec3f(&eyePosDeltaLocal, &eyePosDeltaWorld);
@@ -493,7 +508,7 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, PlayState* play) {
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE);
this->subCamActive = false;
- if (GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
+ if (GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED()) {
Actor* gerudoGuard;
Vec3f vec;
@@ -524,7 +539,7 @@ void EnDaiku_EscapeRun(EnDaiku* this, PlayState* play) {
f32 dxz;
Vec3s* pointPos;
- path = &play->pathList[PARAMS_GET_U(this->actor.params, 4, 4)];
+ path = &play->pathList[ENDAIKU_GET_PATH_INDEX(&this->actor)];
pointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->waypoint;
dx = pointPos->x - this->actor.world.pos.x;
dz = pointPos->z - this->actor.world.pos.z;
@@ -574,12 +589,12 @@ void EnDaiku_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
- if (this->stateFlags & ENDAIKU_STATEFLAG_1) {
+ if (this->stateFlags & ENDAIKU_STATEFLAG_TRACK_PLAYER) {
this->interactInfo.trackPos.x = player->actor.focus.pos.x;
this->interactInfo.trackPos.y = player->actor.focus.pos.y;
this->interactInfo.trackPos.z = player->actor.focus.pos.z;
- if (this->stateFlags & ENDAIKU_STATEFLAG_2) {
+ if (this->stateFlags & ENDAIKU_STATEFLAG_TRACK_WITH_FULL_BODY) {
Npc_TrackPoint(&this->actor, &this->interactInfo, 0, NPC_TRACKING_FULL_BODY);
} else {
Npc_TrackPoint(&this->actor, &this->interactInfo, 0, NPC_TRACKING_HEAD_AND_TORSO);
@@ -594,13 +609,13 @@ void EnDaiku_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- if (PARAMS_GET_U(thisx->params, 0, 2) == 0) {
+ if (ENDAIKU_GET_TYPE(thisx) == ENDAIKU_TYPE0) {
gDPSetEnvColor(POLY_OPA_DISP++, 170, 10, 70, 255);
- } else if (PARAMS_GET_U(thisx->params, 0, 2) == 1) {
+ } else if (ENDAIKU_GET_TYPE(thisx) == ENDAIKU_TYPE1) {
gDPSetEnvColor(POLY_OPA_DISP++, 170, 200, 255, 255);
- } else if (PARAMS_GET_U(thisx->params, 0, 2) == 2) {
+ } else if (ENDAIKU_GET_TYPE(thisx) == ENDAIKU_TYPE2) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 230, 70, 255);
- } else if (PARAMS_GET_U(thisx->params, 0, 2) == 3) {
+ } else if (ENDAIKU_GET_TYPE(thisx) == ENDAIKU_TYPE3) {
gDPSetEnvColor(POLY_OPA_DISP++, 200, 0, 150, 255);
}
@@ -637,7 +652,7 @@ void EnDaiku_PostLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3s* rot, vo
if (limb == 15) { // head
Matrix_MultVec3f(&targetPosHeadLocal, &this->actor.focus.pos);
- gSPDisplayList(POLY_OPA_DISP++, hairDLists[PARAMS_GET_U(this->actor.params, 0, 2)]);
+ gSPDisplayList(POLY_OPA_DISP++, hairDLists[ENDAIKU_GET_TYPE(&this->actor)]);
}
CLOSE_DISPS(play->state.gfxCtx, "../z_en_daiku.c", 1330);
diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.h b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.h
index 82b7a06346..b191c1d79f 100644
--- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.h
+++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.h
@@ -2,11 +2,18 @@
#define Z_EN_DAIKU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDaiku;
-typedef void (*EnDaikuActionFunc)(struct EnDaiku*, PlayState*);
+typedef void (*EnDaikuActionFunc)(struct EnDaiku*, struct PlayState*);
+
+typedef enum EnDaikuType {
+ ENDAIKU_TYPE0,
+ ENDAIKU_TYPE1,
+ ENDAIKU_TYPE2,
+ ENDAIKU_TYPE3
+} EnDaikuType;
typedef struct EnDaiku {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c
index b1f40ab70c..f469d5626f 100644
--- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c
+++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c
@@ -5,9 +5,27 @@
*/
#include "z_en_daiku_kakariko.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_daiku/object_daiku.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
+
+#define ENDAIKUKAKARIKO_GET_TYPE(thisx) PARAMS_GET_U((thisx)->params, 0, 2)
+#define ENDAIKUKAKARIKO_GET_PATH_INDEX(thisx) PARAMS_GET_U((thisx)->params, 8, 8)
typedef enum KakarikoCarpenterType {
/* 0x0 */ CARPENTER_ICHIRO, // Red and purple pants, normal hair
@@ -103,9 +121,12 @@ typedef enum EnDaikuKakarikoAnimation {
} EnDaikuKakarikoAnimation;
static AnimationFrameCountInfo sAnimationInfo[] = {
- { &object_daiku_Anim_001AB0, 1.0f, 2, -7.0f }, { &object_daiku_Anim_007DE0, 1.0f, 0, -7.0f },
- { &object_daiku_Anim_00885C, 1.0f, 0, -7.0f }, { &object_daiku_Anim_000C44, 1.0f, 0, -7.0f },
- { &object_daiku_Anim_000600, 1.0f, 0, -7.0f }, { &object_daiku_Anim_008164, 1.0f, 0, -7.0f },
+ { &object_daiku_Anim_001AB0, 1.0f, ANIMMODE_ONCE, -7.0f },
+ { &object_daiku_Anim_007DE0, 1.0f, ANIMMODE_LOOP, -7.0f },
+ { &object_daiku_Anim_00885C, 1.0f, ANIMMODE_LOOP, -7.0f },
+ { &object_daiku_Anim_000C44, 1.0f, ANIMMODE_LOOP, -7.0f },
+ { &object_daiku_Anim_000600, 1.0f, ANIMMODE_LOOP, -7.0f },
+ { &object_daiku_Anim_008164, 1.0f, ANIMMODE_LOOP, -7.0f },
};
void EnDaikuKakariko_ChangeAnim(EnDaikuKakariko* this, s32 index, s32* currentIndex) {
@@ -124,7 +145,7 @@ void EnDaikuKakariko_ChangeAnim(EnDaikuKakariko* this, s32 index, s32* currentIn
}
void EnDaikuKakariko_Init(Actor* thisx, PlayState* play) {
- static u16 initFlags[] = { 0x0080, 0x00B0, 0x0070, 0x0470 }; // List of inital values for this->flags
+ static u16 initFlags[] = { 0x0080, 0x00B0, 0x0070, 0x0470 }; // List of initial values for this->flags
EnDaikuKakariko* this = (EnDaikuKakariko*)thisx;
s32 pad;
@@ -133,7 +154,7 @@ void EnDaikuKakariko_Init(Actor* thisx, PlayState* play) {
case SCENE_KAKARIKO_VILLAGE:
if (IS_DAY) {
this->flags |= 1;
- this->flags |= initFlags[PARAMS_GET_U(this->actor.params, 0, 2)];
+ this->flags |= initFlags[ENDAIKUKAKARIKO_GET_TYPE(&this->actor)];
}
break;
case SCENE_KAKARIKO_CENTER_GUEST_HOUSE:
@@ -171,7 +192,7 @@ void EnDaikuKakariko_Init(Actor* thisx, PlayState* play) {
this->actor.gravity = 0.0f;
this->runSpeed = 3.0f;
- this->actor.uncullZoneForward = 1200.0f;
+ this->actor.cullingVolumeDistance = 1200.0f;
this->actor.attentionRangeType = ATTENTION_RANGE_6;
this->currentAnimIndex = -1;
@@ -184,8 +205,8 @@ void EnDaikuKakariko_Init(Actor* thisx, PlayState* play) {
this->actionFunc = EnDaikuKakariko_Run;
} else {
if (this->flags & 8) {
- if ((PARAMS_GET_U(this->actor.params, 0, 2) == CARPENTER_SABOORO) ||
- (PARAMS_GET_U(this->actor.params, 0, 2) == CARPENTER_SHIRO)) {
+ if ((ENDAIKUKAKARIKO_GET_TYPE(&this->actor) == CARPENTER_SABOORO) ||
+ (ENDAIKUKAKARIKO_GET_TYPE(&this->actor) == CARPENTER_SHIRO)) {
EnDaikuKakariko_ChangeAnim(this, ENDAIKUKAKARIKO_ANIM_5, &this->currentAnimIndex);
this->flags |= 0x800;
} else {
@@ -233,23 +254,23 @@ void EnDaikuKakariko_HandleTalking(EnDaikuKakariko* this, PlayState* play) {
MASK_REACTION_SET_CARPENTER_3,
MASK_REACTION_SET_CARPENTER_4,
};
- s16 sp26;
- s16 sp24;
+ s16 screenX;
+ s16 screenY;
if (this->talkState == 2) {
this->talkState = EnDaikuKakariko_GetTalkState(this, play);
} else if (Actor_TalkOfferAccepted(&this->actor, play)) {
this->talkState = 2;
} else {
- Actor_GetScreenPos(play, &this->actor, &sp26, &sp24);
+ Actor_GetScreenPos(play, &this->actor, &screenX, &screenY);
- if ((sp26 >= 0) && (sp26 <= 320) && (sp24 >= 0) && (sp24 <= 240) && (this->talkState == 0) &&
- (Actor_OfferTalk(&this->actor, play, 100.0f) == 1)) {
+ if ((screenX >= 0) && (screenX <= SCREEN_WIDTH) && (screenY >= 0) && (screenY <= SCREEN_HEIGHT) &&
+ (this->talkState == 0) && (Actor_OfferTalk(&this->actor, play, 100.0f) == true)) {
this->actor.textId =
- MaskReaction_GetTextId(play, sMaskReactionSets[PARAMS_GET_U(this->actor.params, 0, 2)]);
+ MaskReaction_GetTextId(play, sMaskReactionSets[ENDAIKUKAKARIKO_GET_TYPE(&this->actor)]);
if (this->actor.textId == 0) {
- switch (PARAMS_GET_U(this->actor.params, 0, 2)) {
+ switch (ENDAIKUKAKARIKO_GET_TYPE(&this->actor)) {
case 0:
if (this->flags & 8) {
this->actor.textId = 0x5076;
@@ -366,7 +387,7 @@ void EnDaikuKakariko_Run(EnDaikuKakariko* this, PlayState* play) {
s32 run;
do {
- path = &play->pathList[PARAMS_GET_U(this->actor.params, 8, 8)];
+ path = &play->pathList[ENDAIKUKAKARIKO_GET_PATH_INDEX(&this->actor)];
pathPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[this->waypoint];
xDist = pathPos->x - this->actor.world.pos.x;
zDist = pathPos->z - this->actor.world.pos.z;
@@ -538,7 +559,7 @@ void EnDaikuKakariko_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V
if (limbIndex == 15) {
Matrix_MultVec3f(&unkVec, &this->actor.focus.pos);
- gSPDisplayList(POLY_OPA_DISP++, carpenterHeadDLists[PARAMS_GET_U(this->actor.params, 0, 2)]);
+ gSPDisplayList(POLY_OPA_DISP++, carpenterHeadDLists[ENDAIKUKAKARIKO_GET_TYPE(&this->actor)]);
}
CLOSE_DISPS(play->state.gfxCtx, "../z_en_daiku_kakariko.c", 1113);
@@ -551,13 +572,13 @@ void EnDaikuKakariko_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- if (PARAMS_GET_U(thisx->params, 0, 2) == CARPENTER_ICHIRO) {
+ if (ENDAIKUKAKARIKO_GET_TYPE(thisx) == CARPENTER_ICHIRO) {
gDPSetEnvColor(POLY_OPA_DISP++, 170, 10, 70, 255);
- } else if (PARAMS_GET_U(thisx->params, 0, 2) == CARPENTER_SABOORO) {
+ } else if (ENDAIKUKAKARIKO_GET_TYPE(thisx) == CARPENTER_SABOORO) {
gDPSetEnvColor(POLY_OPA_DISP++, 170, 200, 255, 255);
- } else if (PARAMS_GET_U(thisx->params, 0, 2) == CARPENTER_JIRO) {
+ } else if (ENDAIKUKAKARIKO_GET_TYPE(thisx) == CARPENTER_JIRO) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 230, 70, 255);
- } else if (PARAMS_GET_U(thisx->params, 0, 2) == CARPENTER_SHIRO) {
+ } else if (ENDAIKUKAKARIKO_GET_TYPE(thisx) == CARPENTER_SHIRO) {
gDPSetEnvColor(POLY_OPA_DISP++, 200, 0, 150, 255);
}
diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.h b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.h
index 5d3596d58f..1395b6e259 100644
--- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.h
+++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.h
@@ -2,11 +2,11 @@
#define Z_EN_DAIKU_KAKARIKO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDaikuKakariko;
-typedef void (*EnDaikuKakarikoActionFunc)(struct EnDaikuKakariko*, PlayState*);
+typedef void (*EnDaikuKakarikoActionFunc)(struct EnDaikuKakariko*, struct PlayState*);
typedef struct EnDaikuKakariko {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c
index 1e89ac5ff8..df9b566f87 100644
--- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c
+++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c
@@ -1,8 +1,22 @@
#include "z_en_dekubaba.h"
-#include "assets/objects/object_dekubaba/object_dekubaba.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_dekubaba/object_dekubaba.h"
+
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
void EnDekubaba_Init(Actor* thisx, PlayState* play);
@@ -402,7 +416,7 @@ void EnDekubaba_SetupPrunedSomersault(EnDekubaba* this) {
this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000;
this->collider.base.acFlags &= ~AC_ON;
this->actor.speed = this->size * 3.0f;
- this->actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
this->actionFunc = EnDekubaba_PrunedSomersault;
}
@@ -455,7 +469,7 @@ void EnDekubaba_SetupDeadStickDrop(EnDekubaba* this, PlayState* play) {
this->actor.velocity.y = 0.0f;
this->actor.shape.shadowScale = 3.0f;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_MISC);
- this->actor.flags &= ~ACTOR_FLAG_5;
+ this->actor.flags &= ~ACTOR_FLAG_DRAW_CULLING_DISABLED;
this->timer = 200;
this->actionFunc = EnDekubaba_DeadStickDrop;
}
@@ -1132,7 +1146,7 @@ void EnDekubaba_Update(Actor* thisx, PlayState* play) {
}
if (this->actionFunc == EnDekubaba_Lunge) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
}
if (this->collider.base.acFlags & AC_ON) {
diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.h b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.h
index b1d53307ce..46a8b8dbdf 100644
--- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.h
+++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.h
@@ -2,11 +2,11 @@
#define Z_EN_DEKUBABA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDekubaba;
-typedef void (*EnDekubabaActionFunc)(struct EnDekubaba*, PlayState*);
+typedef void (*EnDekubabaActionFunc)(struct EnDekubaba*, struct PlayState*);
typedef enum DekuBabaType {
/* 0 */ DEKUBABA_NORMAL,
@@ -25,7 +25,7 @@ typedef struct EnDekubaba {
/* 0x01D0 */ Vec3s jointTable[8];
/* 0x0200 */ Vec3s morphTable[8];
/* 0x0230 */ f32 size; // Used everywhere to rescale offsets etc. for Big ones
- /* 0x0234 */ CollisionPoly* boundFloor;
+ /* 0x0234 */ struct CollisionPoly* boundFloor;
/* 0x0238 */ ColliderJntSph collider;
/* 0x0258 */ ColliderJntSphElement colliderElements[7];
} EnDekubaba; // size = 0x0418
diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
index 3577d1394b..cf498eb726 100644
--- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
+++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
@@ -6,6 +6,15 @@
#include "z_en_dekunuts.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
+
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_dekunuts/object_dekunuts.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -178,7 +187,7 @@ void EnDekunuts_SetupBurrow(EnDekunuts* this) {
void EnDekunuts_SetupBeginRun(EnDekunuts* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gDekuNutsUnburrowAnim, -3.0f);
this->collider.dim.height = 37;
- this->actor.colChkInfo.mass = 0x32;
+ this->actor.colChkInfo.mass = 50;
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_DAMAGE);
this->collider.base.acFlags &= ~AC_ON;
this->actionFunc = EnDekunuts_BeginRun;
@@ -446,7 +455,7 @@ void EnDekunuts_ColliderCheck(EnDekunuts* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
- if (this->actor.colChkInfo.mass == 0x32) {
+ if (this->actor.colChkInfo.mass == 50) {
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect != 1) {
if (this->actor.colChkInfo.damageEffect == 2) {
diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.h b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.h
index 6beefc7c3b..76f23bdecf 100644
--- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.h
+++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.h
@@ -2,11 +2,11 @@
#define Z_EN_DEKUNUTS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDekunuts;
-typedef void (*EnDekunutsActionFunc)(struct EnDekunuts*, PlayState*);
+typedef void (*EnDekunutsActionFunc)(struct EnDekunuts*, struct PlayState*);
typedef struct EnDekunuts {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c
index f1cbd0cb5b..34acb2d982 100644
--- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c
+++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c
@@ -1,7 +1,34 @@
+/*
+ * File: z_en_dh.c
+ * Overlay: ovl_En_Dh
+ * Description: Dead Hand
+ */
+
#include "z_en_dh.h"
+
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_dh/object_dh.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_10)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)
typedef enum EnDhAction {
/* 0 */ DH_WAIT,
@@ -151,8 +178,8 @@ void EnDh_Init(Actor* thisx, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
Collider_InitCylinder(play, &this->collider1);
Collider_SetCylinder(play, &this->collider1, &this->actor, &sCylinderInit);
- Collider_InitJntSph(play, &this->collider2);
- Collider_SetJntSph(play, &this->collider2, &this->actor, &sJntSphInit, this->elements);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
EnDh_SetupWait(this);
}
@@ -162,7 +189,7 @@ void EnDh_Destroy(Actor* thisx, PlayState* play) {
func_800F5B58();
Collider_DestroyCylinder(play, &this->collider1);
- Collider_DestroyJntSph(play, &this->collider2);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
}
void EnDh_SpawnDebris(PlayState* play, EnDh* this, Vec3f* spawnPos, f32 spread, s32 arg4, f32 accelXZ, f32 scale) {
@@ -233,7 +260,7 @@ void EnDh_Wait(EnDh* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x7D0, 0);
SkelAnime_Update(&this->skelAnime);
if (this->actor.params != ENDH_START_ATTACK_BOMB) {
- func_8008EEAC(play, &this->actor);
+ Player_SetAutoLockOnActor(play, &this->actor);
}
}
}
@@ -302,8 +329,10 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
Animation_Change(&this->skelAnime, &object_dh_Anim_004658, -1.0f, this->skelAnime.curFrame, 0.0f, ANIMMODE_ONCE,
-4.0f);
this->actionState = 4;
- this->collider2.base.atFlags = this->collider2.elements[0].base.atElemFlags = AT_NONE; // also ATELEM_NONE
- this->collider2.elements[0].base.atDmgInfo.dmgFlags = this->collider2.elements[0].base.atDmgInfo.damage = 0;
+ this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags =
+ AT_NONE; // also ATELEM_NONE
+ this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags =
+ this->colliderJntSph.elements[0].base.atDmgInfo.damage = 0;
}
switch (this->actionState) {
case 1:
@@ -316,21 +345,21 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
break;
case 2:
if (this->skelAnime.curFrame >= 4.0f) {
- this->collider2.base.atFlags = this->collider2.elements[0].base.atElemFlags =
+ this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags =
AT_ON | AT_TYPE_ENEMY; // also ATELEM_ON | ATELEM_SFX_WOOD
- this->collider2.elements[0].base.atDmgInfo.dmgFlags = DMG_DEFAULT;
- this->collider2.elements[0].base.atDmgInfo.damage = 8;
+ this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags = DMG_DEFAULT;
+ this->colliderJntSph.elements[0].base.atDmgInfo.damage = 8;
}
- if (this->collider2.base.atFlags & AT_BOUNCED) {
- this->collider2.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
- this->collider2.base.atFlags = this->collider2.elements[0].base.atElemFlags =
+ if (this->colliderJntSph.base.atFlags & AT_BOUNCED) {
+ this->colliderJntSph.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
+ this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags =
AT_NONE; // also ATELEM_NONE
- this->collider2.elements[0].base.atDmgInfo.dmgFlags =
- this->collider2.elements[0].base.atDmgInfo.damage = 0;
+ this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags =
+ this->colliderJntSph.elements[0].base.atDmgInfo.damage = 0;
this->actionState++;
- } else if (this->collider2.base.atFlags & AT_HIT) {
- this->collider2.base.atFlags &= ~AT_HIT;
- func_8002F71C(play, &this->actor, 8.0f, this->actor.shape.rot.y, 8.0f);
+ } else if (this->colliderJntSph.base.atFlags & AT_HIT) {
+ this->colliderJntSph.base.atFlags &= ~AT_HIT;
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.shape.rot.y, 8.0f);
}
break;
case 3:
@@ -344,10 +373,10 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
Animation_Change(&this->skelAnime, &object_dh_Anim_004658, -1.0f,
Animation_GetLastFrame(&object_dh_Anim_004658), 0.0f, ANIMMODE_ONCE, -4.0f);
this->actionState++;
- this->collider2.base.atFlags = this->collider2.elements[0].base.atElemFlags =
+ this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags =
AT_NONE; // also ATELEM_NONE
- this->collider2.elements[0].base.atDmgInfo.dmgFlags =
- this->collider2.elements[0].base.atDmgInfo.damage = 0;
+ this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags =
+ this->colliderJntSph.elements[0].base.atDmgInfo.damage = 0;
}
break;
case 5:
@@ -476,11 +505,13 @@ void EnDh_CollisionCheck(EnDh* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 lastHealth;
- if ((this->collider2.base.acFlags & AC_HIT) && !this->retreat) {
- this->collider2.base.acFlags &= ~AC_HIT;
+ if ((this->colliderJntSph.base.acFlags & AC_HIT) && !this->retreat) {
+ this->colliderJntSph.base.acFlags &= ~AC_HIT;
if ((this->actor.colChkInfo.damageEffect != 0) && (this->actor.colChkInfo.damageEffect != 6)) {
- this->collider2.base.atFlags = this->collider2.elements[0].base.atElemFlags = AT_NONE; // also ATELEM_NONE
- this->collider2.elements[0].base.atDmgInfo.dmgFlags = this->collider2.elements[0].base.atDmgInfo.damage = 0;
+ this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags =
+ AT_NONE; // also ATELEM_NONE
+ this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags =
+ this->colliderJntSph.elements[0].base.atDmgInfo.damage = 0;
if (player->unk_844 != 0) {
this->unk_258 = player->unk_845;
}
@@ -525,13 +556,13 @@ void EnDh_Update(Actor* thisx, PlayState* play) {
if (((this->curAction != DH_DAMAGE) && (this->actor.shape.yOffset == 0.0f)) ||
((player->unk_844 != 0) && (player->unk_845 != this->unk_258))) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider2.base);
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider2.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider1.base);
}
} else {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider1.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider2.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
}
@@ -543,7 +574,7 @@ void EnDh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
Matrix_MultVec3f(&headOffset, &this->headPos);
Matrix_Push();
Matrix_Translate(headOffset.x, headOffset.y, headOffset.z, MTXMODE_APPLY);
- Collider_UpdateSpheres(1, &this->collider2);
+ Collider_UpdateSpheres(1, &this->colliderJntSph);
Matrix_Pop();
}
}
diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.h b/src/overlays/actors/ovl_En_Dh/z_en_dh.h
index 21872aafce..0feb3069b5 100644
--- a/src/overlays/actors/ovl_En_Dh/z_en_dh.h
+++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.h
@@ -2,11 +2,11 @@
#define Z_EN_DH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDh;
-typedef void (*EnDhActionFunc)(struct EnDh*, PlayState*);
+typedef void (*EnDhActionFunc)(struct EnDh*, struct PlayState*);
typedef struct EnDh {
/* 0x0000 */ Actor actor;
@@ -24,8 +24,8 @@ typedef struct EnDh {
/* 0x025C */ s16 timer;
/* 0x025E */ s16 dirtWavePhase;
/* 0x0260 */ ColliderCylinder collider1;
- /* 0x02AC */ ColliderJntSph collider2;
- /* 0x02CC */ ColliderJntSphElement elements[1];
+ /* 0x02AC */ ColliderJntSph colliderJntSph;
+ /* 0x02CC */ ColliderJntSphElement colliderJntSphElements[1];
/* 0x030C */ Vec3f headPos;
/* 0x0318 */ f32 dirtWaveSpread;
/* 0x031C */ f32 dirtWaveHeight;
diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/src/overlays/actors/ovl_En_Dha/z_en_dha.c
index 15bb64753c..5754d8ae1e 100644
--- a/src/overlays/actors/ovl_En_Dha/z_en_dha.c
+++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.c
@@ -6,9 +6,23 @@
#include "z_en_dha.h"
#include "overlays/actors/ovl_En_Dh/z_en_dh.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_dh/object_dh.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnDha_Init(Actor* thisx, PlayState* play);
void EnDha_Destroy(Actor* thisx, PlayState* play);
@@ -165,7 +179,7 @@ void EnDha_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.health = 8;
this->limbAngleX[0] = -0x4000;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItem);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
EnDha_SetupWait(this);
@@ -242,11 +256,20 @@ void EnDha_Wait(EnDha* this, PlayState* play) {
this->handAngle.y -= this->actor.shape.rot.y + this->limbAngleY;
this->handAngle.x -= this->actor.shape.rot.x + this->limbAngleX[0] + this->limbAngleX[1];
} else {
+#if OOT_VERSION < NTSC_1_1
+ // Empty
+#elif OOT_VERSION < PAL_1_0
+ if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
+ player->stateFlags2 &= ~PLAYER_STATE2_7;
+ player->actor.parent = NULL;
+ }
+#else
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
}
+#endif
if (this->actor.home.rot.z != 0) {
Actor_PlaySfx(&this->actor, NA_SE_EN_DEADHAND_HAND_AT);
@@ -285,7 +308,9 @@ void EnDha_Wait(EnDha* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
+#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
+#endif
}
this->actor.home.rot.z = 1;
@@ -306,7 +331,9 @@ void EnDha_TakeDamage(EnDha* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
+#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
+#endif
}
Math_SmoothStepToS(&this->limbAngleX[1], 0, 1, 2000, 0);
@@ -344,7 +371,9 @@ void EnDha_Die(EnDha* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && (&this->actor == player->actor.parent)) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
+#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
+#endif
}
Math_SmoothStepToS(&this->limbAngleX[1], 0, 1, 0x7D0, 0);
diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.h b/src/overlays/actors/ovl_En_Dha/z_en_dha.h
index 2ef37c54c9..f7cbd78d7b 100644
--- a/src/overlays/actors/ovl_En_Dha/z_en_dha.h
+++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.h
@@ -2,11 +2,11 @@
#define Z_EN_DHA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDha;
-typedef void (*EnDhaActionFunc)(struct EnDha*, PlayState*);
+typedef void (*EnDhaActionFunc)(struct EnDha*, struct PlayState*);
typedef struct EnDha {
/* 0x0000 */ Actor actor;
@@ -24,7 +24,7 @@ typedef struct EnDha {
/* 0x01DC */ Vec3f handPos[2];
/* 0x01F4 */ Vec3f armPos;
/* 0x0200 */ ColliderJntSph collider;
- /* 0x0220 */ ColliderJntSphElement colliderItem[5];
+ /* 0x0220 */ ColliderJntSphElement colliderElements[5];
} EnDha; // size = 0x0360
#endif
diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c
index 9ed06293c0..8cb2f45151 100644
--- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c
+++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c
@@ -6,10 +6,29 @@
#include "z_en_diving_game.h"
#include "overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h"
-#include "assets/objects/object_zo/object_zo.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_zo/object_zo.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnDivingGame_Init(Actor* thisx, PlayState* play);
void EnDivingGame_Destroy(Actor* thisx, PlayState* play);
@@ -479,8 +498,7 @@ void func_809EEA90(EnDivingGame* this, PlayState* play) {
void func_809EEAF8(EnDivingGame* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
- // "Successful completion"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n", "☆☆☆☆☆ Normal termination ☆☆☆☆☆ \n") VT_RST);
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
SET_EVENTCHKINF(EVENTCHKINF_38);
this->actionFunc = func_809EDCB0;
@@ -561,8 +579,8 @@ s32 EnDivingGame_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V
}
if (this->notPlayingMinigame && (limbIndex == 8 || limbIndex == 9 || limbIndex == 12)) {
- rot->y += Math_SinS((play->state.frames * (limbIndex * 50 + 0x814))) * 200.0f;
- rot->z += Math_CosS((play->state.frames * (limbIndex * 50 + 0x940))) * 200.0f;
+ rot->y += Math_SinS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y))) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z))) * FIDGET_AMPLITUDE;
}
return 0;
diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h
index c873e075e3..ccc211dc8b 100644
--- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h
+++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h
@@ -2,11 +2,11 @@
#define Z_EN_DIVING_GAME_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDivingGame;
-typedef void (*EnDivingGameActionFunc)(struct EnDivingGame*, PlayState*);
+typedef void (*EnDivingGameActionFunc)(struct EnDivingGame*, struct PlayState*);
typedef struct EnDivingGame {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c
index 101209eb60..399f417aa1 100644
--- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c
+++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c
@@ -5,7 +5,22 @@
*/
#include "z_en_dns.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_shopnuts/object_shopnuts.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -77,19 +92,19 @@ static u16 sStartingTextIds[] = {
0x10A0, 0x10A1, 0x10A2, 0x10CA, 0x10CB, 0x10CC, 0x10CD, 0x10CE, 0x10CF, 0x10DC, 0x10DD,
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static char* sItemDebugTxt[] = {
- "デクの実売り ", // "Deku Nuts"
- "デクの棒売り ", // "Deku Sticks"
- "ハートの欠片売り ", // "Piece of Heart"
- "デクの種売り ", // "Deku Seeds"
- "デクの盾売り ", // "Deku Shield"
- "バクダン売り ", // "Bombs"
- "矢売り ", // "Arrows"
- "赤のくすり売り ", // "Red Potion"
- "緑のくすり売り ", // "Green Potion"
- "デクの棒持てる数を増やす", // "Deku Stick Upgrade"
- "デクの実持てる数を増やす", // "Deku Nut Upgrade"
+ T("デクの実売り ", "Deku Nuts "),
+ T("デクの棒売り ", "Deku Sticks "),
+ T("ハートの欠片売り ", "Piece of Heart "),
+ T("デクの種売り ", "Deku Seeds "),
+ T("デクの盾売り ", "Deku Shield "),
+ T("バクダン売り ", "Bombs "),
+ T("矢売り ", "Arrows "),
+ T("赤のくすり売り ", "Red Potion "),
+ T("緑のくすり売り ", "Green Potion "),
+ T("デクの棒持てる数を増やす", "Deku Stick Upgrade "),
+ T("デクの実持てる数を増やす", "Deku Nut Upgrade "),
};
#endif
@@ -129,8 +144,9 @@ void EnDns_Init(Actor* thisx, PlayState* play) {
EnDns* this = (EnDns*)thisx;
if (DNS_GET_TYPE(&this->actor) < 0) {
- // "Function Error (Deku Salesman)"
- PRINTF(VT_FGCOL(RED) "引数エラー(売りナッツ)[ arg_data = %d ]" VT_RST "\n", this->actor.params);
+ PRINTF(VT_FGCOL(RED) T("引数エラー(売りナッツ)[ arg_data = %d ]",
+ "Argument error (selling nuts) [ arg_data = %d ]") VT_RST "\n",
+ this->actor.params);
Actor_Kill(&this->actor);
return;
}
@@ -140,8 +156,8 @@ void EnDns_Init(Actor* thisx, PlayState* play) {
DNS_GET_TYPE(&this->actor) = DNS_TYPE_DEKU_SEEDS_30;
}
- // "Deku Salesman"
- PRINTF(VT_FGCOL(GREEN) "◆◆◆ 売りナッツ『%s』 ◆◆◆" VT_RST "\n", sItemDebugTxt[DNS_GET_TYPE(&this->actor)]);
+ PRINTF(VT_FGCOL(GREEN) T("◆◆◆ 売りナッツ『%s』 ◆◆◆", "◆◆◆ Selling nuts『%s』 ◆◆◆") VT_RST "\n",
+ sItemDebugTxt[DNS_GET_TYPE(&this->actor)]);
Actor_ProcessInitChain(&this->actor, sInitChain);
@@ -347,9 +363,9 @@ void EnDns_Idle(EnDns* this, PlayState* play) {
this->actionFunc = EnDns_Talk;
} else {
if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isLockedOn) {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
} else {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
if (this->actor.xzDistToPlayer < 130.0f) {
Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play);
diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.h b/src/overlays/actors/ovl_En_Dns/z_en_dns.h
index d86e96eb43..3a91a5362a 100644
--- a/src/overlays/actors/ovl_En_Dns/z_en_dns.h
+++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.h
@@ -2,7 +2,7 @@
#define Z_EN_DNS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "assets/objects/object_shopnuts/object_shopnuts.h"
#define DNS_GET_TYPE(thisx) ((thisx)->params)
@@ -37,7 +37,7 @@ typedef enum EnDnsAnimation {
struct EnDns;
-typedef void (*EnDnsActionFunc)(struct EnDns*, PlayState*);
+typedef void (*EnDnsActionFunc)(struct EnDns*, struct PlayState*);
typedef u32 (*EnDnsCanBuyFunc)(struct EnDns*);
typedef void (*EnDnsPaymentFunc)(struct EnDns*);
diff --git a/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c b/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c
index 15ba4bb788..d851c96a08 100644
--- a/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c
+++ b/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c
@@ -5,10 +5,25 @@
*/
#include "z_en_dnt_demo.h"
-
#include "overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.h"
#include "overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h"
+
+#include "attributes.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64debug_display.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
#define FLAGS 0
@@ -75,8 +90,8 @@ void EnDntDemo_Init(Actor* thisx, PlayState* play2) {
s32 pad;
PRINTF("\n\n");
- // "Deku Scrub mask show start"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ デグナッツお面品評会開始 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN)
+ T("☆☆☆☆☆ デグナッツお面品評会開始 ☆☆☆☆☆ \n", "☆☆☆☆☆ Deku Scrub mask competition start ☆☆☆☆☆ \n") VT_RST);
for (i = 0; i < 9; i++) {
this->scrubPos[i] = sScrubPos[i];
this->scrubs[i] = (EnDntNomal*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_DNT_NOMAL,
@@ -94,8 +109,10 @@ void EnDntDemo_Init(Actor* thisx, PlayState* play2) {
this->leader = (EnDntJiji*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_DNT_JIJI,
this->leaderPos.x, this->leaderPos.y, this->leaderPos.z, 0, 0, 0, 0);
if (this->leader != NULL) {
- // "jiji jiji jiji jiji jiji" [onomatopoeia for the scrub sound?]
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ じじじじじじじじじじい ☆☆☆☆☆ %x\n" VT_RST, this->leader);
+ // onomatopoeia for the scrub sound?
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ じじじじじじじじじじい ☆☆☆☆☆ %x\n", "☆☆☆☆☆ jiji jiji jiji jiji jiji ☆☆☆☆☆ %x\n")
+ VT_RST,
+ this->leader);
}
this->subCamId = SUB_CAM_ID_DONE;
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
@@ -156,7 +173,7 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
delay = 0;
switch (Player_GetMask(play)) {
case PLAYER_MASK_SKULL:
- if (!GET_ITEMGETINF(ITEMGETINF_1E)) {
+ if (!GET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_STICK_UPGRADE)) {
reaction = DNT_SIGNAL_CELEBRATE;
this->prize = DNT_PRIZE_STICK;
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_SARIA_THEME);
@@ -164,7 +181,8 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
}
FALLTHROUGH;
case PLAYER_MASK_TRUTH:
- if (!GET_ITEMGETINF(ITEMGETINF_1F) && (Player_GetMask(play) != PLAYER_MASK_SKULL)) {
+ if (!GET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_NUT_UPGRADE) &&
+ (Player_GetMask(play) != PLAYER_MASK_SKULL)) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->prize = DNT_PRIZE_NUTS;
@@ -191,15 +209,17 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
ignore = true;
delay = 8;
reaction = DNT_SIGNAL_HIDE;
- // "Special!"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 特別! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 特別! ☆☆☆☆☆ \n", "☆☆☆☆☆ Special! ☆☆☆☆☆ \n") VT_RST);
} else {
if (maskIdx >= PLAYER_MASK_MAX - 1) {
- // "This is dangerous!"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n" VT_RST);
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n" VT_RST);
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n" VT_RST);
- PRINTF(VT_FGCOL(CYAN) "☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n", "☆☆☆☆☆ This is bad! ☆☆☆☆☆ \n")
+ VT_RST);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n", "☆☆☆☆☆ This is bad! ☆☆☆☆☆ \n")
+ VT_RST);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n", "☆☆☆☆☆ This is bad! ☆☆☆☆☆ \n")
+ VT_RST);
+ PRINTF(VT_FGCOL(CYAN) T("☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n", "☆☆☆☆☆ This is bad! ☆☆☆☆☆ \n")
+ VT_RST);
maskIdx = Rand_ZeroFloat(7.99f);
}
@@ -222,17 +242,22 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
break;
}
PRINTF("\n\n");
- // "Each index 1"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 各インデックス1 ☆☆☆☆☆ %d\n" VT_RST, rand9);
- // "Each index 2"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 各インデックス2 ☆☆☆☆☆ %d\n" VT_RST, maskIdx);
- // "Each index 3"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 各インデックス3 ☆☆☆☆☆ %d\n" VT_RST, resultIdx);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 各インデックス1 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Each index 1 ☆☆☆☆☆ %d\n")
+ VT_RST,
+ rand9);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 各インデックス2 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Each index 2 ☆☆☆☆☆ %d\n")
+ VT_RST,
+ maskIdx);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 各インデックス3 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Each index 3 ☆☆☆☆☆ %d\n")
+ VT_RST,
+ resultIdx);
PRINTF("\n");
- // "What kind of evaluation?"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ どういう評価? ☆☆☆☆☆☆ %d\n" VT_RST, reaction);
- // "What kind of action?"
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ どういうアクション? ☆☆☆ %d\n" VT_RST, this->action);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ どういう評価? ☆☆☆☆☆☆ %d\n",
+ "☆☆☆☆☆ What kind of evaluation? ☆☆☆☆☆☆ %d\n") VT_RST,
+ reaction);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ どういうアクション? ☆☆☆ %d\n",
+ "☆☆☆☆☆ What kind of action? ☆☆☆ %d\n") VT_RST,
+ this->action);
PRINTF("\n\n");
break;
}
@@ -327,7 +352,7 @@ void EnDntDemo_Update(Actor* thisx, PlayState* play) {
}
this->actionFunc(this, play);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
if (this->debugArrowTimer != 0) {
if (!(this->debugArrowTimer & 1)) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
diff --git a/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h b/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h
index 607810629c..29c302aed2 100644
--- a/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h
+++ b/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h
@@ -2,11 +2,11 @@
#define Z_EN_DNT_DEMO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDntDemo;
-typedef void (*EnDntDemoActionFunc)(struct EnDntDemo*, PlayState*);
+typedef void (*EnDntDemoActionFunc)(struct EnDntDemo*, struct PlayState*);
typedef struct EnDntDemo {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c
index 7a26d7863c..c89aa0d67f 100644
--- a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c
+++ b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c
@@ -5,12 +5,32 @@
*/
#include "z_en_dnt_jiji.h"
-#include "assets/objects/object_dns/object_dns.h"
#include "overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_dns/object_dns.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnDntJiji_Init(Actor* thisx, PlayState* play);
void EnDntJiji_Destroy(Actor* thisx, PlayState* play);
@@ -80,10 +100,11 @@ void EnDntJiji_Init(Actor* thisx, PlayState* play) {
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
this->stage = (EnDntDemo*)this->actor.parent;
PRINTF("\n\n");
- // "Deku Scrub mask show elder"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ デグナッツお面品評会長老 ☆☆☆☆☆ %x\n" VT_RST, this->stage);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ デグナッツお面品評会長老 ☆☆☆☆☆ %x\n",
+ "☆☆☆☆☆ Deku Scrub mask competition elder ☆☆☆☆☆ %x\n") VT_RST,
+ this->stage);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- this->actor.colChkInfo.mass = 0xFF;
+ this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.attentionRangeType = ATTENTION_RANGE_6;
this->actionFunc = EnDntJiji_SetFlower;
this->actor.gravity = -2.0f;
@@ -116,7 +137,7 @@ void EnDntJiji_Wait(EnDntJiji* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if ((this->timer == 1) && (this->actor.xzDistToPlayer < 150.0f) && !Play_InCsMode(play) &&
- !(player->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY)) {
+ !(player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) {
OnePointCutscene_Init(play, 2230, -99, &this->actor, CAM_ID_MAIN);
this->timer = 0;
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
@@ -273,25 +294,23 @@ void EnDntJiji_GivePrize(EnDntJiji* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
if ((this->getItemId == GI_DEKU_NUT_UPGRADE_30) || (this->getItemId == GI_DEKU_NUT_UPGRADE_40)) {
- // "nut"
- PRINTF("実 \n");
- PRINTF("実 \n");
- PRINTF("実 \n");
- PRINTF("実 \n");
- PRINTF("実 \n");
- PRINTF("実 \n");
- PRINTF("実 \n");
- PRINTF("実 \n");
- SET_ITEMGETINF(ITEMGETINF_1F);
+ PRINTF(T("実 \n", "nut \n"));
+ PRINTF(T("実 \n", "nut \n"));
+ PRINTF(T("実 \n", "nut \n"));
+ PRINTF(T("実 \n", "nut \n"));
+ PRINTF(T("実 \n", "nut \n"));
+ PRINTF(T("実 \n", "nut \n"));
+ PRINTF(T("実 \n", "nut \n"));
+ PRINTF(T("実 \n", "nut \n"));
+ SET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_NUT_UPGRADE);
} else {
- // "stick"
- PRINTF("棒 \n");
- PRINTF("棒 \n");
- PRINTF("棒 \n");
- PRINTF("棒 \n");
- PRINTF("棒 \n");
- PRINTF("棒 \n");
- SET_ITEMGETINF(ITEMGETINF_1E);
+ PRINTF(T("棒 \n", "stick \n"));
+ PRINTF(T("棒 \n", "stick \n"));
+ PRINTF(T("棒 \n", "stick \n"));
+ PRINTF(T("棒 \n", "stick \n"));
+ PRINTF(T("棒 \n", "stick \n"));
+ PRINTF(T("棒 \n", "stick \n"));
+ SET_ITEMGETINF(ITEMGETINF_FOREST_STAGE_STICK_UPGRADE);
}
this->actor.textId = 0;
if ((this->stage != NULL) && (this->stage->actor.update != NULL)) {
@@ -374,8 +393,7 @@ void EnDntJiji_Update(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->actor, 0.015f);
this->unkTimer++;
if (BREG(0)) {
- // "time"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ 時間 ☆☆☆☆☆ %d\n" VT_RST, this->timer);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ 時間 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ time ☆☆☆☆☆ %d\n") VT_RST, this->timer);
}
if ((this->timer > 1) && (this->timer != 0)) {
this->timer--;
diff --git a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.h b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.h
index 20199a7c2e..540a8951a3 100644
--- a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.h
+++ b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.h
@@ -2,11 +2,11 @@
#define Z_EN_DNT_JIJI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDntJiji;
-typedef void (*EnDntJijiActionFunc)(struct EnDntJiji*, PlayState*);
+typedef void (*EnDntJijiActionFunc)(struct EnDntJiji*, struct PlayState*);
typedef struct EnDntJiji {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c
index c71075f309..ab5a70d82f 100644
--- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c
+++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c
@@ -5,15 +5,34 @@
*/
#include "z_en_dnt_nomal.h"
-#include "assets/objects/object_dnk/object_dnk.h"
#include "overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h"
#include "overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h"
#include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
-#include "assets/objects/object_hintnuts/object_hintnuts.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_dnk/object_dnk.h"
+#include "assets/objects/object_hintnuts/object_hintnuts.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnDntNomal_Init(Actor* thisx, PlayState* play);
void EnDntNomal_Destroy(Actor* thisx, PlayState* play);
@@ -39,6 +58,10 @@ void EnDntNomal_TargetGivePrize(EnDntNomal* this, PlayState* play);
void EnDntNomal_TargetReturn(EnDntNomal* this, PlayState* play);
void EnDntNomal_TargetBurrow(EnDntNomal* this, PlayState* play);
+#if OOT_PAL_N64
+void EnDntNomal_DoNothing(EnDntNomal* this, PlayState* play);
+#endif
+
void EnDntNomal_SetupStageWait(EnDntNomal* this, PlayState* play);
void EnDntNomal_SetupStageCelebrate(EnDntNomal* this, PlayState* play);
void EnDntNomal_SetupStageDance(EnDntNomal* this, PlayState* play);
@@ -123,32 +146,30 @@ void EnDntNomal_Init(Actor* thisx, PlayState* play) {
this->type = ENDNTNOMAL_TARGET;
}
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- this->actor.colChkInfo.mass = 0xFF;
+ this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->objectId = -1;
if (this->type == ENDNTNOMAL_TARGET) {
PRINTF("\n\n");
- // "Deku Scrub target"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ デグナッツ的当て ☆☆☆☆☆ \n" VT_RST);
- Collider_InitQuad(play, &this->targetQuad);
- Collider_SetQuad(play, &this->targetQuad, &this->actor, &sTargetQuadInit);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ デグナッツ的当て ☆☆☆☆☆ \n", "☆☆☆☆☆ Deku Scrub target ☆☆☆☆☆ \n") VT_RST);
+ Collider_InitQuad(play, &this->targetColliderQuad);
+ Collider_SetQuad(play, &this->targetColliderQuad, &this->actor, &sTargetQuadInit);
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
this->objectId = OBJECT_HINTNUTS;
} else {
PRINTF("\n\n");
- // "Deku Scrub mask show audience"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ デグナッツお面品評会一般人 ☆☆☆☆☆ \n" VT_RST);
- Collider_InitCylinder(play, &this->bodyCyl);
- Collider_SetCylinder(play, &this->bodyCyl, &this->actor, &sBodyCylinderInit);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ デグナッツお面品評会一般人 ☆☆☆☆☆ \n",
+ "☆☆☆☆☆ Deku Scrub mask competition audience ☆☆☆☆☆ \n") VT_RST);
+ Collider_InitCylinder(play, &this->bodyColliderCylinder);
+ Collider_SetCylinder(play, &this->bodyColliderCylinder, &this->actor, &sBodyCylinderInit);
this->objectId = OBJECT_DNK;
}
if (this->objectId >= 0) {
this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, this->objectId);
if (this->requiredObjectSlot < 0) {
Actor_Kill(&this->actor);
- // "What?"
- PRINTF(VT_FGCOL(MAGENTA) " なにみの? %d\n" VT_RST "\n", this->requiredObjectSlot);
- // "Bank is funny"
- PRINTF(VT_FGCOL(CYAN) " バンクおかしいしぞ!%d\n" VT_RST "\n", this->actor.params);
+ PRINTF(VT_FGCOL(MAGENTA) T(" なにみの? %d\n", " What? %d\n") VT_RST "\n", this->requiredObjectSlot);
+ PRINTF(VT_FGCOL(CYAN) T(" バンクおかしいしぞ!%d\n", " The bank is weird! %d\n") VT_RST "\n",
+ this->actor.params);
return;
}
} else {
@@ -162,22 +183,23 @@ void EnDntNomal_Destroy(Actor* thisx, PlayState* play) {
EnDntNomal* this = (EnDntNomal*)thisx;
if (this->type == ENDNTNOMAL_TARGET) {
- Collider_DestroyQuad(play, &this->targetQuad);
+ Collider_DestroyQuad(play, &this->targetColliderQuad);
} else {
- Collider_DestroyCylinder(play, &this->bodyCyl);
+ Collider_DestroyCylinder(play, &this->bodyColliderCylinder);
}
}
void EnDntNomal_WaitForObject(EnDntNomal* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
this->actor.objectSlot = this->requiredObjectSlot;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
this->actor.gravity = -2.0f;
Actor_SetScale(&this->actor, 0.01f);
if (this->type == ENDNTNOMAL_TARGET) {
- SkelAnime_Init(play, &this->skelAnime, &gHintNutsSkel, &gHintNutsBurrowAnim, this->jointTable,
- this->morphTable, 10);
+ //! @bug Flex skeleton is used as normal skeleton
+ SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)&gHintNutsSkel, &gHintNutsBurrowAnim,
+ this->jointTable, this->morphTable, 10);
this->actor.draw = EnDntNomal_DrawTargetScrub;
} else {
SkelAnime_Init(play, &this->skelAnime, &gDntStageSkel, &gDntStageHideAnim, this->jointTable,
@@ -235,12 +257,17 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) {
this->targetVtx[3].z = targetZ - 24.0f;
SkelAnime_Update(&this->skelAnime);
- if ((this->targetQuad.base.acFlags & AC_HIT) || BREG(0)) {
- this->targetQuad.base.acFlags &= ~AC_HIT;
+#if OOT_VERSION < PAL_1_0
+ if (this->targetColliderQuad.base.acFlags & AC_HIT)
+#else
+ if ((this->targetColliderQuad.base.acFlags & AC_HIT) || BREG(0))
+#endif
+ {
+ this->targetColliderQuad.base.acFlags &= ~AC_HIT;
- dx = fabsf(targetX - this->targetQuad.elem.acDmgInfo.hitPos.x);
- dy = fabsf(targetY - this->targetQuad.elem.acDmgInfo.hitPos.y);
- dz = fabsf(targetZ - this->targetQuad.elem.acDmgInfo.hitPos.z);
+ dx = fabsf(targetX - this->targetColliderQuad.elem.acDmgInfo.hitPos.x);
+ dy = fabsf(targetY - this->targetColliderQuad.elem.acDmgInfo.hitPos.y);
+ dz = fabsf(targetZ - this->targetColliderQuad.elem.acDmgInfo.hitPos.z);
scoreVel.y = 5.0f;
@@ -251,8 +278,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) {
EffectSsExtra_Spawn(play, &scorePos, &scoreVel, &scoreAccel, 4, 2);
Audio_StopSfxById(NA_SE_SY_TRE_BOX_APPEAR);
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
- // "Big hit"
- PRINTF(VT_FGCOL(CYAN) "☆☆☆☆☆ 大当り ☆☆☆☆☆ %d\n" VT_RST, this->hitCounter);
+ PRINTF(VT_FGCOL(CYAN) T("☆☆☆☆☆ 大当り ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Big hit ☆☆☆☆☆ %d\n") VT_RST, this->hitCounter);
if (!LINK_IS_ADULT && !GET_ITEMGETINF(ITEMGETINF_1D)) {
this->hitCounter++;
if (this->hitCounter >= 3) {
@@ -411,10 +437,23 @@ void EnDntNomal_TargetBurrow(EnDntNomal* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if (frame >= this->endFrame) {
+#if !OOT_PAL_N64
this->actionFunc = EnDntNomal_SetupTargetWait;
+#else
+ this->hitCounter = 0;
+ this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
+ this->actor.world.rot.y = this->actor.yawTowardsPlayer;
+ Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos);
+ this->actionFunc = EnDntNomal_DoNothing;
+#endif
}
}
+#if OOT_PAL_N64
+void EnDntNomal_DoNothing(EnDntNomal* this, PlayState* play) {
+}
+#endif
+
void EnDntNomal_SetupStageWait(EnDntNomal* this, PlayState* play) {
if (this->timer3 == 0) {
this->endFrame = (f32)Animation_GetLastFrame(&gDntStageHideAnim);
@@ -653,7 +692,7 @@ void EnDntNomal_SetupStageAttack(EnDntNomal* this, PlayState* play) {
if (this->timer3 == 0) {
this->endFrame = (f32)Animation_GetLastFrame(&gDntStageSpitAnim);
Animation_Change(&this->skelAnime, &gDntStageSpitAnim, 1.0f, 0.0f, this->endFrame, ANIMMODE_ONCE, -10.0f);
- this->actor.colChkInfo.mass = 0xFF;
+ this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->isSolid = true;
this->timer2 = 0;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);
@@ -816,13 +855,13 @@ void EnDntNomal_Update(Actor* thisx, PlayState* play) {
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 |
UPDBGCHECKINFO_FLAG_4);
if (this->type == ENDNTNOMAL_TARGET) {
- Collider_SetQuadVertices(&this->targetQuad, &this->targetVtx[0], &this->targetVtx[1], &this->targetVtx[2],
- &this->targetVtx[3]);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->targetQuad.base);
+ Collider_SetQuadVertices(&this->targetColliderQuad, &this->targetVtx[0], &this->targetVtx[1],
+ &this->targetVtx[2], &this->targetVtx[3]);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->targetColliderQuad.base);
} else {
- Collider_UpdateCylinder(&this->actor, &this->bodyCyl);
+ Collider_UpdateCylinder(&this->actor, &this->bodyColliderCylinder);
if (this->isSolid) {
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCyl.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyColliderCylinder.base);
}
}
}
diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h
index 13974bb1b1..21f77798a0 100644
--- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h
+++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h
@@ -2,11 +2,11 @@
#define Z_EN_DNT_NOMAL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDntNomal;
-typedef void (*EnDntNomalActionFunc)(struct EnDntNomal*, PlayState*);
+typedef void (*EnDntNomalActionFunc)(struct EnDntNomal*, struct PlayState*);
typedef struct EnDntNomal {
/* 0x0000 */ Actor actor;
@@ -38,8 +38,8 @@ typedef struct EnDntNomal {
/* 0x0279 */ s8 requiredObjectSlot;
/* 0x027C */ Vec3f mouthPos;
/* 0x0288 */ Vec3f targetPos;
- /* 0x0294 */ ColliderQuad targetQuad;
- /* 0x0314 */ ColliderCylinder bodyCyl;
+ /* 0x0294 */ ColliderQuad targetColliderQuad;
+ /* 0x0314 */ ColliderCylinder bodyColliderCylinder;
} EnDntNomal; // size = 0x0360
#define ENDNTNOMAL_TARGET 0
diff --git a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c
index 7b5d7a7586..1d967ed5fa 100644
--- a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c
+++ b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c
@@ -6,6 +6,18 @@
#include "z_en_dodojr.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_dodojr/object_dodojr.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -63,7 +75,7 @@ static ColliderCylinderInit sCylinderInit = {
{ 18, 20, 0, { 0, 0, 0 } },
};
-static CollisionCheckInfoInit2 sColChkInit = { 1, 2, 25, 25, 0xFF };
+static CollisionCheckInfoInit2 sColChkInit = { 1, 2, 25, 25, MASS_IMMOVABLE };
void EnDodojr_Init(Actor* thisx, PlayState* play) {
EnDodojr* this = (EnDodojr*)thisx;
@@ -535,7 +547,7 @@ void EnDodojr_Stunned(EnDodojr* this, PlayState* play) {
}
void EnDodojr_JumpAttackBounce(EnDodojr* this, PlayState* play) {
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
Actor_UpdateVelocityXZGravity(&this->actor);
if (EnDodojr_UpdateBounces(this, play)) {
diff --git a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.h b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.h
index bef171c584..615304cb01 100644
--- a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.h
+++ b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.h
@@ -2,11 +2,11 @@
#define Z_EN_DODOJR_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDodojr;
-typedef void (*EnDodojrActionFunc)(struct EnDodojr*, PlayState*);
+typedef void (*EnDodojrActionFunc)(struct EnDodojr*, struct PlayState*);
typedef struct EnDodojr {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c
index 0a4242d020..5d013911eb 100644
--- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c
+++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c
@@ -1,9 +1,24 @@
#include "z_en_dodongo.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "overlays/actors/ovl_En_Bombf/z_en_bombf.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_dodongo/object_dodongo.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
typedef enum EnDodongoActionState {
DODONGO_SWEEP_TAIL,
@@ -322,10 +337,10 @@ void EnDodongo_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.damageTable = &sDamageTable;
Collider_InitQuad(play, &this->colliderAT);
Collider_InitTris(play, &this->colliderHard);
- Collider_InitJntSph(play, &this->colliderBody);
+ Collider_InitJntSph(play, &this->bodyCollider);
Collider_SetQuad(play, &this->colliderAT, &this->actor, &sAttackQuadInit);
Collider_SetTris(play, &this->colliderHard, &this->actor, &sHardTrisInit, this->trisElements);
- Collider_SetJntSph(play, &this->colliderBody, &this->actor, &sBodyJntSphInit, this->sphElements);
+ Collider_SetJntSph(play, &this->bodyCollider, &this->actor, &sBodyJntSphInit, this->bodyColliderElements);
blureInit.p1StartColor[0] = blureInit.p1StartColor[1] = blureInit.p1StartColor[2] = blureInit.p1StartColor[3] =
blureInit.p2StartColor[0] = blureInit.p2StartColor[1] = blureInit.p2StartColor[2] = blureInit.p1EndColor[0] =
@@ -351,7 +366,7 @@ void EnDodongo_Destroy(Actor* thisx, PlayState* play) {
Effect_Delete(play, this->blureIdx);
Collider_DestroyTris(play, &this->colliderHard);
- Collider_DestroyJntSph(play, &this->colliderBody);
+ Collider_DestroyJntSph(play, &this->bodyCollider);
Collider_DestroyQuad(play, &this->colliderAT);
}
@@ -490,9 +505,9 @@ void EnDodongo_SwallowBomb(EnDodongo* this, PlayState* play) {
deathFireAccel.x = deathFireVel.x * -0.1f;
deathFireAccel.y = deathFireVel.y * -0.1f;
deathFireAccel.z = deathFireVel.z * -0.1f;
- pos.x = this->sphElements[0].dim.worldSphere.center.x + deathFireVel.x;
- pos.y = this->sphElements[0].dim.worldSphere.center.y + deathFireVel.y;
- pos.z = this->sphElements[0].dim.worldSphere.center.z + deathFireVel.z;
+ pos.x = this->bodyColliderElements[0].dim.worldSphere.center.x + deathFireVel.x;
+ pos.y = this->bodyColliderElements[0].dim.worldSphere.center.y + deathFireVel.y;
+ pos.z = this->bodyColliderElements[0].dim.worldSphere.center.z + deathFireVel.z;
func_8002836C(play, &pos, &deathFireVel, &deathFireAccel, &this->bombSmokePrimColor,
&this->bombSmokeEnvColor, 400, 10, 10);
}
@@ -605,13 +620,13 @@ void EnDodongo_SweepTail(EnDodongo* this, PlayState* play) {
if (SkelAnime_Update(&this->skelAnime)) {
if ((this->timer != 0) || (ABS(yawDiff1) < 0x4000)) {
- this->sphElements[2].base.atElemFlags = ATELEM_NONE;
- this->sphElements[1].base.atElemFlags = ATELEM_NONE;
- this->colliderBody.base.atFlags = AT_NONE;
- this->sphElements[2].base.atDmgInfo.dmgFlags = 0;
- this->sphElements[1].base.atDmgInfo.dmgFlags = 0;
- this->sphElements[2].base.atDmgInfo.damage = 0;
- this->sphElements[1].base.atDmgInfo.damage = 0;
+ this->bodyColliderElements[2].base.atElemFlags = ATELEM_NONE;
+ this->bodyColliderElements[1].base.atElemFlags = ATELEM_NONE;
+ this->bodyCollider.base.atFlags = AT_NONE;
+ this->bodyColliderElements[2].base.atDmgInfo.dmgFlags = 0;
+ this->bodyColliderElements[1].base.atDmgInfo.dmgFlags = 0;
+ this->bodyColliderElements[2].base.atDmgInfo.damage = 0;
+ this->bodyColliderElements[1].base.atDmgInfo.damage = 0;
EnDodongo_SetupBreatheFire(this);
this->timer = Rand_S16Offset(5, 10);
} else {
@@ -628,33 +643,36 @@ void EnDodongo_SweepTail(EnDodongo* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_J_TAIL);
Animation_PlayOnceSetSpeed(&this->skelAnime, animation, 2.0f);
this->timer = 18;
- this->colliderBody.base.atFlags = this->sphElements[1].base.atElemFlags =
- this->sphElements[2].base.atElemFlags = AT_ON | AT_TYPE_ENEMY; // also ATELEM_ON | ATELEM_SFX_WOOD
- this->sphElements[1].base.atDmgInfo.dmgFlags = this->sphElements[2].base.atDmgInfo.dmgFlags = DMG_DEFAULT;
- this->sphElements[1].base.atDmgInfo.damage = this->sphElements[2].base.atDmgInfo.damage = 8;
+ this->bodyCollider.base.atFlags = this->bodyColliderElements[1].base.atElemFlags =
+ this->bodyColliderElements[2].base.atElemFlags =
+ AT_ON | AT_TYPE_ENEMY; // also ATELEM_ON | ATELEM_SFX_WOOD
+ this->bodyColliderElements[1].base.atDmgInfo.dmgFlags =
+ this->bodyColliderElements[2].base.atDmgInfo.dmgFlags = DMG_DEFAULT;
+ this->bodyColliderElements[1].base.atDmgInfo.damage = this->bodyColliderElements[2].base.atDmgInfo.damage =
+ 8;
}
} else if (this->timer > 1) {
Vec3f tailPos;
this->timer--;
this->actor.shape.rot.y = this->actor.world.rot.y += this->tailSwipeSpeed;
- tailPos.x = this->sphElements[1].dim.worldSphere.center.x;
- tailPos.y = this->sphElements[1].dim.worldSphere.center.y;
- tailPos.z = this->sphElements[1].dim.worldSphere.center.z;
+ tailPos.x = this->bodyColliderElements[1].dim.worldSphere.center.x;
+ tailPos.y = this->bodyColliderElements[1].dim.worldSphere.center.y;
+ tailPos.z = this->bodyColliderElements[1].dim.worldSphere.center.z;
Actor_SpawnFloorDustRing(play, &this->actor, &tailPos, 5.0f, 2, 2.0f, 100, 15, false);
- tailPos.x = this->sphElements[2].dim.worldSphere.center.x;
- tailPos.y = this->sphElements[2].dim.worldSphere.center.y;
- tailPos.z = this->sphElements[2].dim.worldSphere.center.z;
+ tailPos.x = this->bodyColliderElements[2].dim.worldSphere.center.x;
+ tailPos.y = this->bodyColliderElements[2].dim.worldSphere.center.y;
+ tailPos.z = this->bodyColliderElements[2].dim.worldSphere.center.z;
Actor_SpawnFloorDustRing(play, &this->actor, &tailPos, 5.0f, 2, 2.0f, 100, 15, false);
- if (this->colliderBody.base.atFlags & AT_HIT) {
+ if (this->bodyCollider.base.atFlags & AT_HIT) {
Player* player = GET_PLAYER(play);
- if (this->colliderBody.base.at == &player->actor) {
+ if (this->bodyCollider.base.at == &player->actor) {
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
}
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base);
}
}
@@ -711,10 +729,10 @@ void EnDodongo_Stunned(EnDodongo* this, PlayState* play) {
void EnDodongo_CollisionCheck(EnDodongo* this, PlayState* play) {
if (this->colliderHard.base.acFlags & AC_BOUNCED) {
this->colliderHard.base.acFlags &= ~AC_BOUNCED;
- this->colliderBody.base.acFlags &= ~AC_HIT;
- } else if ((this->colliderBody.base.acFlags & AC_HIT) && (this->actionState > DODONGO_DEATH)) {
- this->colliderBody.base.acFlags &= ~AC_HIT;
- Actor_SetDropFlagJntSph(&this->actor, &this->colliderBody, false);
+ this->bodyCollider.base.acFlags &= ~AC_HIT;
+ } else if ((this->bodyCollider.base.acFlags & AC_HIT) && (this->actionState > DODONGO_DEATH)) {
+ this->bodyCollider.base.acFlags &= ~AC_HIT;
+ Actor_SetDropFlagJntSph(&this->actor, &this->bodyCollider, false);
if (this->actor.colChkInfo.damageEffect != 0xE) {
this->damageEffect = this->actor.colChkInfo.damageEffect;
if ((this->actor.colChkInfo.damageEffect == 1) || (this->actor.colChkInfo.damageEffect == 0xF)) {
@@ -775,12 +793,12 @@ void EnDodongo_Update(Actor* thisx, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_RIZA_DOWN);
}
}
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base);
if (this->actionState != DODONGO_DEATH) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderHard.base);
}
if (this->actionState > DODONGO_DEATH) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base);
}
if ((this->actionState >= DODONGO_IDLE) && EnDodongo_AteBomb(this, play)) {
EnDodongo_SetupSwallowBomb(this);
@@ -837,7 +855,7 @@ void EnDodongo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
Vec3f mouthOffset = { 1800.0f, 1200.0f, 0.0f };
Vec3f headOffset = { 1500.0f, 300.0f, 0.0f };
- Collider_UpdateSpheres(limbIndex, &this->colliderBody);
+ Collider_UpdateSpheres(limbIndex, &this->bodyCollider);
switch (limbIndex) {
case 2:
diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.h b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.h
index 664b175799..7785030d49 100644
--- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.h
+++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.h
@@ -2,11 +2,11 @@
#define Z_EN_DODONGO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDodongo;
-typedef void (*EnDodongoActionFunc)(struct EnDodongo*, PlayState*);
+typedef void (*EnDodongoActionFunc)(struct EnDodongo*, struct PlayState*);
typedef struct EnDodongo {
/* 0x0000 */ Actor actor;
@@ -35,8 +35,8 @@ typedef struct EnDodongo {
/* 0x03D4 */ ColliderQuad colliderAT;
/* 0x0454 */ ColliderTris colliderHard;
/* 0x0474 */ ColliderTrisElement trisElements[3];
- /* 0x0588 */ ColliderJntSph colliderBody;
- /* 0x05A8 */ ColliderJntSphElement sphElements[6];
+ /* 0x0588 */ ColliderJntSph bodyCollider;
+ /* 0x05A8 */ ColliderJntSphElement bodyColliderElements[6];
} EnDodongo; // size = 0x0728
typedef enum EnDodongoParam {
diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c
index 49b8c83ba3..0255b01626 100644
--- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c
+++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c
@@ -5,6 +5,14 @@
*/
#include "z_en_dog.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_dog/object_dog.h"
#define FLAGS 0
diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.h b/src/overlays/actors/ovl_En_Dog/z_en_dog.h
index dec2b5c180..c3cdfd913b 100644
--- a/src/overlays/actors/ovl_En_Dog/z_en_dog.h
+++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.h
@@ -2,18 +2,18 @@
#define Z_EN_DOG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDog;
-typedef void (*EnDogActionFunc)(struct EnDog*, PlayState*);
+typedef void (*EnDogActionFunc)(struct EnDog*, struct PlayState*);
typedef struct EnDog {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ EnDogActionFunc actionFunc;
/* 0x0194 */ ColliderCylinder collider;
- /* 0x01E0 */ Path* path;
+ /* 0x01E0 */ struct Path* path;
/* 0x01E4 */ u8 reverse;
/* 0x01E6 */ s16 waypoint;
/* 0x01E8 */ s16 unusedAngle;
diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c
index bf1dc7ea2b..9f5bd8723e 100644
--- a/src/overlays/actors/ovl_En_Door/z_en_door.c
+++ b/src/overlays/actors/ovl_En_Door/z_en_door.c
@@ -5,13 +5,26 @@
*/
#include "z_en_door.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
#include "assets/objects/object_hidan_objects/object_hidan_objects.h"
#include "assets/objects/object_mizu_objects/object_mizu_objects.h"
#include "assets/objects/object_haka_door/object_haka_door.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
#define DOOR_AJAR_SLAM_RANGE 120.0f
#define DOOR_AJAR_OPEN_RANGE (2 * DOOR_AJAR_SLAM_RANGE)
@@ -74,7 +87,7 @@ static EnDoorInfo sDoorInfo[] = {
static InitChainEntry sInitChain[] = {
ICHAIN_U8(attentionRangeType, ATTENTION_RANGE_0, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_STOP),
};
static AnimationHeader* sDoorAnims[DOOR_OPEN_ANIM_MAX] = {
@@ -176,7 +189,7 @@ void EnDoor_SetupType(EnDoor* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
s32 doorType = ENDOOR_GET_TYPE(&this->actor);
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.objectSlot = this->requiredObjectSlot;
this->actionFunc = EnDoor_Idle;
if (doorType == DOOR_EVENING) {
@@ -338,8 +351,12 @@ s32 EnDoor_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
rot->z += this->actor.world.rot.y;
if ((play->roomCtx.prevRoom.num >= 0) || (transitionEntry->sides[0].room == transitionEntry->sides[1].room)) {
// Draw the side of the door that is visible to the camera
+#if OOT_VERSION < NTSC_1_1
+ s16 rotDiff = this->actor.shape.rot.y + rot->z - Math_Vec3f_Yaw(&play->view.eye, &this->actor.world.pos);
+#else
s16 rotDiff = this->actor.shape.rot.y + this->skelAnime.jointTable[3].z + rot->z -
Math_Vec3f_Yaw(&play->view.eye, &this->actor.world.pos);
+#endif
*dList = (ABS(rotDiff) < 0x4000) ? doorDLists[0] : doorDLists[1];
} else {
diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.h b/src/overlays/actors/ovl_En_Door/z_en_door.h
index 608702b6f3..4b4f95c466 100644
--- a/src/overlays/actors/ovl_En_Door/z_en_door.h
+++ b/src/overlays/actors/ovl_En_Door/z_en_door.h
@@ -2,7 +2,7 @@
#define Z_EN_DOOR_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
/**
* Actor Parameters
@@ -46,7 +46,7 @@ typedef enum EnDoorType {
struct EnDoor;
-typedef void (*EnDoorActionFunc)(struct EnDoor*, PlayState*);
+typedef void (*EnDoorActionFunc)(struct EnDoor*, struct PlayState*);
typedef struct EnDoor {
/* 0x0000 */ DOOR_ACTOR_BASE;
diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/src/overlays/actors/ovl_En_Ds/z_en_ds.c
index eaf1fd0d01..3c879ee1ac 100644
--- a/src/overlays/actors/ovl_En_Ds/z_en_ds.c
+++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.c
@@ -5,6 +5,16 @@
*/
#include "z_en_ds.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ds/object_ds.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -53,7 +63,7 @@ void EnDs_Destroy(Actor* thisx, PlayState* play) {
void EnDs_Talk(EnDs* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
this->actionFunc = EnDs_Wait;
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
this->unk_1E8 |= 1;
}
@@ -70,7 +80,7 @@ void EnDs_TalkAfterGiveOddPotion(EnDs* this, PlayState* play) {
if (Actor_TalkOfferAccepted(&this->actor, play)) {
this->actionFunc = EnDs_Talk;
} else {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferTalk(&this->actor, play, 1000.0f);
}
}
@@ -188,7 +198,7 @@ void EnDs_OfferBluePotion(EnDs* this, PlayState* play) {
return;
case 2: // have 100 rupees and empty bottle
Rupees_ChangeBy(-100);
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferGetItem(&this->actor, play, GI_BOTTLE_POTION_BLUE, 10000.0f, 50.0f);
this->actionFunc = EnDs_GiveBluePotion;
return;
@@ -206,7 +216,7 @@ void EnDs_Wait(EnDs* this, PlayState* play) {
s16 yawDiff;
if (Actor_TalkOfferAccepted(&this->actor, play)) {
- if (func_8002F368(play) == EXCH_ITEM_ODD_MUSHROOM) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_ODD_MUSHROOM) {
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
player->actor.textId = 0x504A;
diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.h b/src/overlays/actors/ovl_En_Ds/z_en_ds.h
index 8f10ce8285..9c7df969c6 100644
--- a/src/overlays/actors/ovl_En_Ds/z_en_ds.h
+++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.h
@@ -2,11 +2,11 @@
#define Z_EN_DS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDs;
-typedef void (*EnDsActionFunc)(struct EnDs*, PlayState*);
+typedef void (*EnDsActionFunc)(struct EnDs*, struct PlayState*);
typedef struct EnDs {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c
index c8e747e31e..1f716b977d 100644
--- a/src/overlays/actors/ovl_En_Du/z_en_du.c
+++ b/src/overlays/actors/ovl_En_Du/z_en_du.c
@@ -1,8 +1,23 @@
#include "z_en_du.h"
+
+#include "gfx.h"
+#include "one_point_cutscene.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64face_reaction.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_du/object_du.h"
#include "assets/scenes/overworld/spot18/spot18_scene.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_25)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnDu_Init(Actor* thisx, PlayState* play);
void EnDu_Destroy(Actor* thisx, PlayState* play);
@@ -293,7 +308,7 @@ void EnDu_Init(Actor* thisx, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
if (gSaveContext.save.cutsceneIndex >= 0xFFF0) {
- play->csCtx.script = SEGMENTED_TO_VIRTUAL(gGoronCityDarunia01Cs);
+ play->csCtx.script = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaDancingCs);
gSaveContext.cutsceneTrigger = 1;
EnDu_SetupAction(this, func_809FE890);
} else if (play->sceneId == SCENE_FIRE_TEMPLE) {
@@ -341,7 +356,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
EnDu_SetupAction(this, func_809FE3C0);
} else if (play->msgCtx.ocarinaMode >= OCARINA_MODE_06) {
- play->csCtx.script = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaWrongCs);
+ play->csCtx.script = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaWrongSongCs);
gSaveContext.cutsceneTrigger = 1;
this->unk_1E8 = 1;
EnDu_SetupAction(this, func_809FE890);
@@ -349,7 +364,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- play->csCtx.script = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectCs);
+ play->csCtx.script = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectSongCs);
gSaveContext.cutsceneTrigger = 1;
this->unk_1E8 = 0;
EnDu_SetupAction(this, func_809FE890);
diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.h b/src/overlays/actors/ovl_En_Du/z_en_du.h
index 541b4368e8..9e3ecb8805 100644
--- a/src/overlays/actors/ovl_En_Du/z_en_du.h
+++ b/src/overlays/actors/ovl_En_Du/z_en_du.h
@@ -2,11 +2,11 @@
#define Z_EN_DU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDu;
-typedef void (*EnDuActionFunc)(struct EnDu*, PlayState*);
+typedef void (*EnDuActionFunc)(struct EnDu*, struct PlayState*);
typedef struct EnDu {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c
index 784e28e072..804e04ad84 100644
--- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c
+++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c
@@ -5,10 +5,21 @@
*/
#include "z_en_dy_extra.h"
-#include "assets/objects/object_dy_obj/object_dy_obj.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
+#include "assets/objects/object_dy_obj/object_dy_obj.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnDyExtra_Init(Actor* thisx, PlayState* play);
void EnDyExtra_Destroy(Actor* thisx, PlayState* play);
@@ -37,8 +48,8 @@ void EnDyExtra_Init(Actor* thisx, PlayState* play) {
EnDyExtra* this = (EnDyExtra*)thisx;
PRINTF("\n\n");
- // "Big fairy effect"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ 大妖精効果 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ 大妖精効果 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Big fairy effect ☆☆☆☆☆ %d\n") VT_RST,
+ this->actor.params);
this->type = this->actor.params;
this->scale.x = 0.025f;
this->scale.y = 0.039f;
diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.h b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.h
index 0a6ce3c3a8..cf0fba2ea1 100644
--- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.h
+++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.h
@@ -2,11 +2,11 @@
#define Z_EN_DY_EXTRA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnDyExtra;
-typedef void (*EnDyExtraActionFunc)(struct EnDyExtra*, PlayState*);
+typedef void (*EnDyExtraActionFunc)(struct EnDyExtra*, struct PlayState*);
typedef struct EnDyExtra {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Eg/z_en_eg.c b/src/overlays/actors/ovl_En_Eg/z_en_eg.c
index 4bfba816ab..b4da54551d 100644
--- a/src/overlays/actors/ovl_En_Eg/z_en_eg.c
+++ b/src/overlays/actors/ovl_En_Eg/z_en_eg.c
@@ -5,9 +5,19 @@
*/
#include "z_en_eg.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "printf.h"
+#include "regs.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnEg_Init(Actor* thisx, PlayState* play);
void EnEg_Destroy(Actor* thisx, PlayState* play);
@@ -49,7 +59,7 @@ void EnEg_Init(Actor* thisx, PlayState* play) {
void func_809FFDC8(EnEg* this, PlayState* play) {
if (!sVoided && (gSaveContext.subTimerSeconds <= 0) && Flags_GetSwitch(play, 0x36) &&
- (!OOT_DEBUG || kREG(0) == 0)) {
+ (!DEBUG_FEATURES || kREG(0) == 0)) {
// Void the player out
Play_TriggerRespawn(play);
gSaveContext.respawnFlag = -2;
@@ -65,8 +75,8 @@ void EnEg_Update(Actor* thisx, PlayState* play) {
s32 action = this->action;
if (((action < 0) || (0 < action)) || (sActionFuncs[action] == NULL)) {
- // "Main Mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
} else {
sActionFuncs[action](this, play);
}
diff --git a/src/overlays/actors/ovl_En_Eg/z_en_eg.h b/src/overlays/actors/ovl_En_Eg/z_en_eg.h
index ad02d8a6b7..c42994f61c 100644
--- a/src/overlays/actors/ovl_En_Eg/z_en_eg.h
+++ b/src/overlays/actors/ovl_En_Eg/z_en_eg.h
@@ -2,11 +2,11 @@
#define Z_EN_EG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnEg;
-typedef void (*EnEgActionFunc)(struct EnEg*, PlayState*);
+typedef void (*EnEgActionFunc)(struct EnEg*, struct PlayState*);
typedef struct EnEg {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c
index 63e509986b..9477eb0df1 100644
--- a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c
+++ b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c
@@ -1,4 +1,16 @@
#include "z_en_eiyer.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_ei/object_ei.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -47,7 +59,7 @@ ActorProfile En_Eiyer_Profile = {
/**/ EnEiyer_Draw,
};
-static ColliderCylinderInit sColCylInit = {
+static ColliderCylinderInit sColliderCylinderInit = {
{
COL_MATERIAL_HIT0,
AT_ON | AT_TYPE_ENEMY,
@@ -123,7 +135,7 @@ void EnEiyer_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 600.0f, ActorShadow_DrawCircle, 65.0f);
SkelAnime_Init(play, &this->skelanime, &gStingerSkel, &gStingerIdleAnim, this->jointTable, this->morphTable, 19);
Collider_InitCylinder(play, &this->collider);
- Collider_SetCylinder(play, &this->collider, &this->actor, &sColCylInit);
+ Collider_SetCylinder(play, &this->collider, &this->actor, &sColliderCylinderInit);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
if (this->actor.params < 3) {
@@ -215,7 +227,7 @@ void EnEiyer_SetupUnderground(EnEiyer* this) {
}
this->collider.base.acFlags |= AC_ON;
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
}
@@ -265,12 +277,12 @@ void EnEiyer_SetupDiveAttack(EnEiyer* this, PlayState* play) {
void EnEiyer_SetupLand(EnEiyer* this) {
Animation_MorphToPlayOnce(&this->skelanime, &gStingerDiveAnim, -3.0f);
this->collider.base.atFlags &= ~AT_ON;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
// Update BgCheck info, play sound, and spawn effect on the first frame of the land action
this->timer = -1;
this->actor.gravity = 0.0f;
- this->collider.dim.height = sColCylInit.dim.height;
+ this->collider.dim.height = sColliderCylinderInit.dim.height;
this->actionFunc = EnEiyer_Land;
}
@@ -316,7 +328,7 @@ void EnEiyer_SetupStunned(EnEiyer* this) {
this->actor.speed = 0.0f;
this->actor.velocity.y = 0.0f;
this->actor.gravity = -1.0f;
- this->collider.dim.height = sColCylInit.dim.height + 8;
+ this->collider.dim.height = sColliderCylinderInit.dim.height + 8;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 200, COLORFILTER_BUFFLAG_OPA, 80);
this->collider.base.atFlags &= ~AT_ON;
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
@@ -594,7 +606,7 @@ void EnEiyer_Stunned(EnEiyer* this, PlayState* play) {
if (this->timer == 0) {
this->actor.gravity = 0.0f;
this->actor.velocity.y = 0.0f;
- this->collider.dim.height = sColCylInit.dim.height;
+ this->collider.dim.height = sColliderCylinderInit.dim.height;
EnEiyer_SetupGlide(this);
}
}
@@ -626,7 +638,7 @@ void EnEiyer_UpdateDamage(EnEiyer* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_EIER_DAMAGE);
EnEiyer_SetupHurt(this);
} else {
- this->collider.dim.height = sColCylInit.dim.height;
+ this->collider.dim.height = sColliderCylinderInit.dim.height;
EnEiyer_SetupDie(this);
}
}
diff --git a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.h b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.h
index 7f756596aa..7626924496 100644
--- a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.h
+++ b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.h
@@ -2,11 +2,11 @@
#define Z_EN_EIYER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnEiyer;
-typedef void (*EnEiyerActionFunc)(struct EnEiyer*, PlayState*);
+typedef void (*EnEiyerActionFunc)(struct EnEiyer*, struct PlayState*);
typedef struct EnEiyer {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c
index a3f1a481ab..58cd30f3ff 100644
--- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c
+++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c
@@ -5,9 +5,31 @@
*/
#include "z_en_elf.h"
+#include "overlays/actors/ovl_Elf_Msg/z_elf_msg.h"
+
+#include "libc64/qrand.h"
+#include "libu64/debug.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64quest_hint.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
#define FAIRY_FLAG_TIMED (1 << 8)
#define FAIRY_FLAG_BIG (1 << 9)
@@ -1095,7 +1117,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
} else if (naviHoverActor == NULL || naviHoverActor->category == ACTORCAT_NPC) {
if (naviHoverActor != NULL) {
this->unk_2C0 = 100;
- player->stateFlags2 |= PLAYER_STATE2_20;
+ player->stateFlags2 |= PLAYER_STATE2_NAVI_ACTIVE;
temp = 0;
} else {
switch (this->unk_2A8) {
@@ -1116,7 +1138,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
this->unk_2AE--;
temp = 7;
} else {
- player->stateFlags2 |= PLAYER_STATE2_20;
+ player->stateFlags2 |= PLAYER_STATE2_NAVI_ACTIVE;
temp = 0;
}
} else {
@@ -1146,7 +1168,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
switch (temp) {
case 0:
- if (!(player->stateFlags2 & PLAYER_STATE2_20)) {
+ if (!(player->stateFlags2 & PLAYER_STATE2_NAVI_ACTIVE)) {
temp = 7;
if (this->unk_2C7 == 0) {
Actor_PlaySfx(&this->actor, NA_SE_EV_NAVY_VANISH);
@@ -1154,7 +1176,7 @@ void func_80A0461C(EnElf* this, PlayState* play) {
}
break;
case 8:
- if (player->stateFlags2 & PLAYER_STATE2_20) {
+ if (player->stateFlags2 & PLAYER_STATE2_NAVI_ACTIVE) {
func_80A0299C(this, 0x32);
this->unk_2C0 = 42;
temp = 11;
@@ -1164,10 +1186,10 @@ void func_80A0461C(EnElf* this, PlayState* play) {
}
break;
case 7:
- player->stateFlags2 &= ~PLAYER_STATE2_20;
+ player->stateFlags2 &= ~PLAYER_STATE2_NAVI_ACTIVE;
break;
default:
- player->stateFlags2 |= PLAYER_STATE2_20;
+ player->stateFlags2 |= PLAYER_STATE2_NAVI_ACTIVE;
break;
}
}
@@ -1378,7 +1400,7 @@ void func_80A053F0(Actor* thisx, PlayState* play) {
if (player->naviTextId == 0) {
if (player->focusActor == NULL) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (((gSaveContext.save.info.playerData.naviTimer >= 600) &&
(gSaveContext.save.info.playerData.naviTimer <= 3000)) ||
(nREG(89) != 0))
@@ -1396,7 +1418,7 @@ void func_80A053F0(Actor* thisx, PlayState* play) {
}
} else if (player->naviTextId < 0) {
// trigger dialog instantly for negative message IDs
- thisx->flags |= ACTOR_FLAG_16;
+ thisx->flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
if (Actor_TalkOfferAccepted(thisx, play)) {
@@ -1417,12 +1439,12 @@ void func_80A053F0(Actor* thisx, PlayState* play) {
this->elfMsg->actor.flags |= ACTOR_FLAG_TALK;
}
- thisx->flags &= ~ACTOR_FLAG_16;
+ thisx->flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
} else {
this->actionFunc(this, play);
thisx->shape.rot.y = this->unk_2BC;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
// `gSaveContext.save.info.sceneFlags[127].chest` (like in the debug string) instead of `HIGH_SCORE(HS_HBA)`
// matches too, but, with how the `SaveContext` struct is currently defined, it is an out-of-bounds read in the
// `sceneFlags` array. It is theorized the original `room_inf` (currently `sceneFlags`) was an array of length
diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.h b/src/overlays/actors/ovl_En_Elf/z_en_elf.h
index 106e3a5580..60e9940d75 100644
--- a/src/overlays/actors/ovl_En_Elf/z_en_elf.h
+++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.h
@@ -2,13 +2,13 @@
#define Z_EN_ELF_H
#include "ultra64.h"
-#include "global.h"
-#include "overlays/actors/ovl_Elf_Msg/z_elf_msg.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnElf;
-typedef void (*EnElfActionFunc)(struct EnElf*, PlayState*);
-typedef void (*EnElfUnkFunc)(struct EnElf*, PlayState*);
+typedef void (*EnElfActionFunc)(struct EnElf*, struct PlayState*);
+typedef void (*EnElfUnkFunc)(struct EnElf*, struct PlayState*);
typedef struct EnElf {
/* 0x0000 */ Actor actor;
@@ -22,7 +22,7 @@ typedef struct EnElf {
/* 0x0278 */ LightInfo lightInfoNoGlow;
/* 0x0288 */ LightNode* lightNodeNoGlow;
/* 0x028C */ Vec3f unk_28C;
- /* 0x0298 */ ElfMsg* elfMsg;
+ /* 0x0298 */ struct ElfMsg* elfMsg;
/* 0x029C */ f32 unk_29C;
/* 0x02A0 */ f32 unk_2A0;
/* 0x02A4 */ f32 unk_2A4;
diff --git a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c
index 2854fd88dd..92374ad12a 100644
--- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c
+++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c
@@ -1,8 +1,19 @@
#include "z_en_encount1.h"
-#include "terminal.h"
#include "overlays/actors/ovl_En_Tite/z_en_tite.h"
+#include "overlays/actors/ovl_En_Reeba/z_en_reeba.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_LOCK_ON_DISABLED)
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64debug_display.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_LOCK_ON_DISABLED)
void EnEncount1_Init(Actor* thisx, PlayState* play);
void EnEncount1_Update(Actor* thisx, PlayState* play);
@@ -321,7 +332,7 @@ void EnEncount1_Update(Actor* thisx, PlayState* play) {
this->updateFunc(this, play);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
if (this->outOfRangeTimer != 0) {
if ((this->outOfRangeTimer & 1) == 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
diff --git a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.h b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.h
index 2dc033f98c..b9c8c1d882 100644
--- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.h
+++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.h
@@ -2,14 +2,13 @@
#define Z_EN_ENCOUNT1_H
#include "ultra64.h"
-#include "global.h"
-#include "overlays/actors/ovl_En_Reeba/z_en_reeba.h"
+#include "z64actor.h"
#define SPAWNER_PARAMS(type, number, total) ((type << 0xB) | (number << 0x6) | total)
struct EnEncount1;
-typedef void (*EnEncount1UpdateFunc)(struct EnEncount1*, PlayState*);
+typedef void (*EnEncount1UpdateFunc)(struct EnEncount1*, struct PlayState*);
typedef struct EnEncount1 {
/* 0x0000 */ Actor actor;
@@ -27,7 +26,7 @@ typedef struct EnEncount1 {
/* 0x0164 */ s16 timer;
/* 0x0166 */ u8 reduceLeevers;
/* 0x0168 */ f32 spawnRange;
- /* 0x016C */ EnReeba* bigLeever;
+ /* 0x016C */ struct EnReeba* bigLeever;
} EnEncount1; // size = 0x0170
typedef enum EnEncount1type {
diff --git a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c
index 972f06b6f7..c3604dd321 100644
--- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c
+++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c
@@ -1,10 +1,24 @@
#include "z_en_encount2.h"
#include "overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.h"
+
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "printf.h"
#include "quake.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_efc_star_field/object_efc_star_field.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum Encount2State {
/* 0x0 */ ENCOUNT2_INACTIVE,
@@ -44,16 +58,16 @@ void EnEncount2_Init(Actor* thisx, PlayState* play) {
if (!this->isNotDeathMountain) {
PRINTF("\n\n");
- // "☆☆☆☆☆ Death Mountain Encount2 set ☆☆☆☆☆"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ デスマウンテンエンカウント2セットされました ☆☆☆☆☆ %d\n" VT_RST,
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ デスマウンテンエンカウント2セットされました ☆☆☆☆☆ %d\n",
+ "☆☆☆☆☆ Death Mountain Encount2 set ☆☆☆☆☆ %d\n") VT_RST,
this->actor.params);
if (LINK_IS_ADULT && GET_EVENTCHKINF(EVENTCHKINF_49)) { // flag for having used fire temple blue warp
Actor_Kill(thisx);
}
} else {
PRINTF("\n\n");
- // "☆☆☆☆☆ Ganon Tower Escape Encount2 set ☆☆☆☆☆"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ ガノンタワー脱出エンカウント2セットされました ☆☆☆☆☆ %d\n" VT_RST,
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ ガノンタワー脱出エンカウント2セットされました ☆☆☆☆☆ %d\n",
+ "☆☆☆☆☆ Ganon Tower Escape Encount2 set ☆☆☆☆☆ %d\n") VT_RST,
this->actor.params);
}
@@ -235,12 +249,11 @@ void EnEncount2_SpawnRocks(EnEncount2* this, PlayState* play) {
this->numSpawnedRocks++;
return;
}
- // "☆☆☆☆☆ Can't occur! ☆☆☆☆☆"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発生できません! ☆☆☆☆☆\n" VT_RST);
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発生できません! ☆☆☆☆☆\n" VT_RST);
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発生できません! ☆☆☆☆☆\n" VT_RST);
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発生できません! ☆☆☆☆☆\n" VT_RST);
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発生できません! ☆☆☆☆☆\n\n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発生できません! ☆☆☆☆☆\n", "☆☆☆☆☆ Can't occur! ☆☆☆☆☆\n") VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発生できません! ☆☆☆☆☆\n", "☆☆☆☆☆ Can't occur! ☆☆☆☆☆\n") VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発生できません! ☆☆☆☆☆\n", "☆☆☆☆☆ Can't occur! ☆☆☆☆☆\n") VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発生できません! ☆☆☆☆☆\n", "☆☆☆☆☆ Can't occur! ☆☆☆☆☆\n") VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発生できません! ☆☆☆☆☆\n\n", "☆☆☆☆☆ Can't occur! ☆☆☆☆☆\n\n") VT_RST);
}
}
}
diff --git a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.h b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.h
index c3e0a0655e..c91c7a7512 100644
--- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.h
+++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.h
@@ -2,11 +2,11 @@
#define Z_EN_ENCOUNT2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnEncount2;
-typedef void (*EnEncount2ActionFunc)(struct EnEncount2*, PlayState*);
+typedef void (*EnEncount2ActionFunc)(struct EnEncount2*, struct PlayState*);
#define EN_ENCOUNT2_EFFECT_COUNT 50
diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c
index 53507b0e39..e9c0d12dda 100644
--- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c
+++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c
@@ -6,10 +6,25 @@
#include "z_en_ex_item.h"
#include "overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64draw.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnExItem_Init(Actor* thisx, PlayState* play);
void EnExItem_Destroy(Actor* thisx, PlayState* play);
@@ -55,10 +70,10 @@ void EnExItem_Init(Actor* thisx, PlayState* play) {
this->type = PARAMS_GET_U(this->actor.params, 0, 8);
this->unusedParam = PARAMS_GET_U(this->actor.params, 8, 8);
PRINTF("\n\n");
- // "What will come out?"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ なにがでるかな? ☆☆☆☆☆ %d\n" VT_RST, this->type);
- // "What will come out?"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ なにがでるかな? ☆☆☆☆☆ %d\n" VT_RST, this->unusedParam);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ なにがでるかな? ☆☆☆☆☆ %d\n", "☆☆☆☆☆ What will you get? ☆☆☆☆☆ %d\n") VT_RST,
+ this->type);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ なにがでるかな? ☆☆☆☆☆ %d\n", "☆☆☆☆☆ What will you get? ☆☆☆☆☆ %d\n") VT_RST,
+ this->unusedParam);
this->initPos = this->actor.world.pos;
this->getItemObjectId = -1;
switch (this->type) {
@@ -107,10 +122,9 @@ void EnExItem_Init(Actor* thisx, PlayState* play) {
this->actor.draw = NULL;
if (this->requiredObjectSlot < 0) {
Actor_Kill(&this->actor);
- // "What?"
- PRINTF("なにみの? %d\n", this->actor.params);
- // "bank is funny"
- PRINTF(VT_FGCOL(MAGENTA) " バンクおかしいしぞ!%d\n" VT_RST "\n", this->actor.params);
+ PRINTF(T("なにみの? %d\n", "What? %d\n"), this->actor.params);
+ PRINTF(VT_FGCOL(MAGENTA) T(" バンクおかしいしぞ!%d\n", " The bank is weird!%d\n") VT_RST "\n",
+ this->actor.params);
return;
}
this->actionFunc = EnExItem_WaitForObject;
@@ -121,12 +135,16 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
s32 onCounter;
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
- // "End of transfer"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params);
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params);
- PRINTF(VT_FGCOL(BLUE) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params);
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params);
- PRINTF(VT_FGCOL(CYAN) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n\n" VT_RST, this->actor.params);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Transfer completed ☆☆☆☆☆ %d\n") VT_RST,
+ this->actor.params);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Transfer completed ☆☆☆☆☆ %d\n") VT_RST,
+ this->actor.params);
+ PRINTF(VT_FGCOL(BLUE) T("☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Transfer completed ☆☆☆☆☆ %d\n") VT_RST,
+ this->actor.params);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Transfer completed ☆☆☆☆☆ %d\n") VT_RST,
+ this->actor.params);
+ PRINTF(VT_FGCOL(CYAN) T("☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n\n", "☆☆☆☆☆ Transfer completed ☆☆☆☆☆ %d\n\n") VT_RST,
+ this->actor.params);
this->actor.objectSlot = this->requiredObjectSlot;
this->actor.draw = EnExItem_Draw;
this->stopRotate = false;
@@ -300,14 +318,13 @@ void EnExItem_BowlPrize(EnExItem* this, PlayState* play) {
this->actor.world.pos.z += (tmpf3 / tmpf4) * 5.0f;
}
} else {
- // "parent"
- PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 母親ー? ☆☆☆☆☆ %x\n" VT_RST, this->actor.parent);
- // "Can it move?"
- PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 動いてねー? ☆☆☆☆☆ %x\n" VT_RST, this->actor.parent->update);
+ PRINTF(VT_FGCOL(GREEN) T(" ☆☆☆☆☆ 母親ー? ☆☆☆☆☆ %x\n", " ☆☆☆☆☆ Mother? ☆☆☆☆☆ %x\n") VT_RST,
+ this->actor.parent);
+ PRINTF(VT_FGCOL(GREEN) T(" ☆☆☆☆☆ 動いてねー? ☆☆☆☆☆ %x\n", " ☆☆☆☆☆ Is it moving? ☆☆☆☆☆ %x\n") VT_RST,
+ this->actor.parent->update);
if ((this->actor.parent != NULL) && (this->actor.parent->update != NULL)) {
((EnBomBowlPit*)this->actor.parent)->exItemDone = 1;
- // "It can't move!"
- PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ さぁきえるぞ! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T(" ☆☆☆☆☆ さぁきえるぞ! ☆☆☆☆☆ \n", " ☆☆☆☆☆ Now it's gone! ☆☆☆☆☆ \n") VT_RST);
}
Actor_Kill(&this->actor);
}
@@ -412,8 +429,7 @@ void EnExItem_TargetPrizeGive(EnExItem* this, PlayState* play) {
void EnExItem_TargetPrizeFinish(EnExItem* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
- // "Successful completion"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n", "☆☆☆☆☆ Normal termination ☆☆☆☆☆ \n") VT_RST);
SET_ITEMGETINF(ITEMGETINF_1D);
Actor_Kill(&this->actor);
}
diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h
index 897826146c..eba20bc116 100644
--- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h
+++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h
@@ -2,12 +2,12 @@
#define Z_EN_EX_ITEM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnExItem;
-typedef void (*EnExItemActionFunc)(struct EnExItem* this, PlayState* play);
-typedef void (*EnExItemLightFunc)(Actor*, PlayState*, s32);
+typedef void (*EnExItemActionFunc)(struct EnExItem* this, struct PlayState* play);
+typedef void (*EnExItemLightFunc)(Actor*, struct PlayState*, s32);
typedef struct EnExItem {
/* 0x0000 */ Actor actor;
@@ -52,8 +52,4 @@ typedef enum EnExItemType {
/* 19 */ EXITEM_BULLET_BAG
} EnExItemType;
-#define EXITEM_COUNTER 5
-#define EXITEM_CHEST 10
-#define EXITEM_MAGIC 16
-
#endif
diff --git a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c
index 62c0faf5ff..0777494e6a 100644
--- a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c
+++ b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c
@@ -1,9 +1,25 @@
#include "z_en_ex_ruppy.h"
+#include "overlays/actors/ovl_En_Diving_Game/z_en_diving_game.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
-#include "../ovl_En_Diving_Game/z_en_diving_game.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnExRuppy_Init(Actor* thisx, PlayState* play);
void EnExRuppy_Destroy(Actor* thisx, PlayState* play);
@@ -48,8 +64,7 @@ void EnExRuppy_Init(Actor* thisx, PlayState* play) {
s16 temp3;
this->type = this->actor.params;
- // "Index"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ インデックス ☆☆☆☆☆ %x\n" VT_RST, this->type);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ インデックス ☆☆☆☆☆ %x\n", "☆☆☆☆☆ Index ☆☆☆☆☆ %x\n") VT_RST, this->type);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
switch (this->type) {
@@ -119,8 +134,7 @@ void EnExRuppy_Init(Actor* thisx, PlayState* play) {
this->colorIdx = (s16)Rand_ZeroFloat(3.99f) + 1;
}
this->actor.gravity = -3.0f;
- // "Wow Coin"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ わーなーコイン ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ わーなーコイン ☆☆☆☆☆ \n", "☆☆☆☆☆ Wow Coin ☆☆☆☆☆ \n") VT_RST);
this->actor.shape.shadowScale = 6.0f;
this->actor.shape.yOffset = 700.0f;
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
@@ -141,8 +155,7 @@ void EnExRuppy_Init(Actor* thisx, PlayState* play) {
break;
}
this->actor.gravity = -3.0f;
- // "Normal rupee"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ ノーマルルピー ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ ノーマルルピー ☆☆☆☆☆ \n", "☆☆☆☆☆ Normal rupee ☆☆☆☆☆ \n") VT_RST);
this->actor.shape.shadowScale = 6.0f;
this->actor.shape.yOffset = 700.0f;
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
@@ -327,10 +340,10 @@ void EnExRuppy_WaitToBlowUp(EnExRuppy* this, PlayState* play) {
parent->unk_226 = 1;
}
} else {
- // "That idiot! error"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ そ、そんなばかな!エラー!!!!! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ そ、そんなばかな!エラー!!!!! ☆☆☆☆☆ \n",
+ "☆☆☆☆☆ That's stupid! Error!!!!! ☆☆☆☆☆ \n") VT_RST);
}
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ バカめ! ☆☆☆☆☆ \n" VT_RST); // "Stupid!"
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ バカめ! ☆☆☆☆☆ \n", "☆☆☆☆☆ Stupid! ☆☆☆☆☆ \n") VT_RST);
explosionScale = 100;
explosionScaleStep = 30;
if (this->type == 2) {
@@ -338,7 +351,7 @@ void EnExRuppy_WaitToBlowUp(EnExRuppy* this, PlayState* play) {
explosionScaleStep = 6;
}
EffectSsBomb2_SpawnLayered(play, &this->actor.world.pos, &velocity, &accel, explosionScale, explosionScaleStep);
- func_8002F71C(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f);
Actor_PlaySfx(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
Actor_Kill(&this->actor);
}
diff --git a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h
index 33dcca4447..7ba20450e8 100644
--- a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h
+++ b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h
@@ -2,11 +2,11 @@
#define Z_EN_EX_RUPPY_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnExRuppy;
-typedef void (*EnExRuppyActionFunc)(struct EnExRuppy*, PlayState*);
+typedef void (*EnExRuppyActionFunc)(struct EnExRuppy*, struct PlayState*);
typedef struct EnExRuppy {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c
index 4ff76c923e..475c476bb5 100644
--- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c
+++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c
@@ -5,10 +5,27 @@
*/
#include "z_en_fd.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_fw/object_fw.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_9)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR)
void EnFd_Init(Actor* thisx, PlayState* play);
void EnFd_Destroy(Actor* thisx, PlayState* play);
@@ -39,11 +56,17 @@ ActorProfile En_Fd_Profile = {
/**/ EnFd_Draw,
};
+#if OOT_VERSION < NTSC_1_1
+#define FLARE_DANCER_BODY_DMG 0x00
+#else
+#define FLARE_DANCER_BODY_DMG 0x04
+#endif
+
static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040088, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON | ACELEM_HOOKABLE,
@@ -54,7 +77,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -65,7 +88,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -76,7 +99,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -87,7 +110,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -98,7 +121,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -109,7 +132,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -120,7 +143,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -131,7 +154,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -142,7 +165,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -153,7 +176,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -164,7 +187,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[12] = {
{
{
ELEM_MATERIAL_UNK0,
- { 0xFFCFFFFF, 0x01, 0x04 },
+ { 0xFFCFFFFF, 0x01, FLARE_DANCER_BODY_DMG },
{ 0x00040008, 0x00, 0x00 },
ATELEM_ON | ATELEM_SFX_NORMAL,
ACELEM_ON,
@@ -221,8 +244,8 @@ s32 EnFd_SpawnCore(EnFd* this, PlayState* play) {
this->actor.child->colChkInfo.health = 8;
}
- if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) {
- func_8002DE04(play, &this->actor, this->actor.child);
+ if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
+ Actor_SwapHookshotAttachment(play, &this->actor, this->actor.child);
}
this->coreActive = true;
@@ -303,7 +326,8 @@ s32 EnFd_ColliderCheck(EnFd* this, PlayState* play) {
}
this->attackTimer = 30;
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
- func_8002F71C(play, &this->actor, this->actor.speed + 2.0f, this->actor.yawTowardsPlayer, 6.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, this->actor.speed + 2.0f,
+ this->actor.yawTowardsPlayer, 6.0f);
}
return false;
}
@@ -325,7 +349,7 @@ s32 EnFd_CanSeeActor(EnFd* this, Actor* actor, PlayState* play) {
return false;
}
- // Check to see if the angle between this facing angle and `actor` is withing ~40 degrees
+ // Check to see if the angle between this facing angle and `actor` is within ~40 degrees
angle = (f32)Math_Vec3f_Yaw(&this->actor.world.pos, &actor->world.pos) - this->actor.shape.rot.y;
if (ABS(angle) > 0x1C70) {
return false;
@@ -450,10 +474,10 @@ void EnFd_Init(Actor* thisx, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gFlareDancerSkel, NULL, this->jointTable, this->morphTable, 27);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 32.0f);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colSphs);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0xF), &sColChkInit);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
Actor_SetScale(&this->actor, 0.01f);
this->firstUpdateFlag = true;
this->actor.gravity = -1.0f;
@@ -525,7 +549,7 @@ void EnFd_SpinAndSpawnFire(EnFd* this, PlayState* play) {
f32 tgtSpeed;
f32 rotSpeed;
- if ((this->spinTimer < 31) && (this->invincibilityTimer == 0)) {
+ if ((this->spinTimer <= 30) && (this->invincibilityTimer == 0)) {
Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FLAME_FIRE_ATTACK - SFX_FLAG);
} else {
Actor_PlaySfx_Flagged(&this->actor, NA_SE_EN_FLAME_ROLL - SFX_FLAG);
@@ -660,15 +684,14 @@ void EnFd_Update(Actor* thisx, PlayState* play) {
EnFd_SpawnDot(this, play);
}
- if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) {
- // has been hookshoted
+ if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
if (EnFd_SpawnCore(this, play)) {
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->invincibilityTimer = 30;
Actor_PlaySfx(&this->actor, NA_SE_EN_FLAME_DAMAGE);
Enemy_StartFinishingBlow(play, &this->actor);
} else {
- this->actor.flags &= ~ACTOR_FLAG_13;
+ this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED;
}
} else if (this->actionFunc != EnFd_WaitForCore) {
EnFd_ColliderCheck(this, play);
diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.h b/src/overlays/actors/ovl_En_Fd/z_en_fd.h
index 3559410526..3fc40a54cf 100644
--- a/src/overlays/actors/ovl_En_Fd/z_en_fd.h
+++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.h
@@ -2,11 +2,11 @@
#define Z_EN_FD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnFd;
-typedef void (*EnFdActionFunc)(struct EnFd* this, PlayState* play);
+typedef void (*EnFdActionFunc)(struct EnFd* this, struct PlayState* play);
typedef enum FDEffectType {
FD_EFFECT_NONE,
@@ -34,7 +34,7 @@ typedef struct EnFd {
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ EnFdActionFunc actionFunc;
/* 0x0194 */ ColliderJntSph collider;
- /* 0x01B4 */ ColliderJntSphElement colSphs[12];
+ /* 0x01B4 */ ColliderJntSphElement colliderElements[12];
/* 0x04B4 */ u8 coreActive;
/* 0x04B6 */ s16 initYawToInitPos;
/* 0x04B8 */ s16 curYawToInitPos;
diff --git a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c
index 472ff44b25..b124094a2c 100644
--- a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c
+++ b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c
@@ -1,7 +1,17 @@
#include "z_en_fd_fire.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnFdFire_Init(Actor* thisx, PlayState* play);
void EnFdFire_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.h b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.h
index 414fdf997a..d027a07972 100644
--- a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.h
+++ b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.h
@@ -2,11 +2,11 @@
#define Z_EN_FD_FIRE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnFdFire;
-typedef void (*EnFdFireActionFunc)(struct EnFdFire* this, PlayState* play);
+typedef void (*EnFdFireActionFunc)(struct EnFdFire* this, struct PlayState* play);
typedef struct EnFdFire {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c
index ced412103c..3eeb70ecb2 100644
--- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c
+++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c
@@ -5,13 +5,31 @@
*/
#include "z_en_fhg_fire.h"
-#include "assets/objects/object_fhg/object_fhg.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h"
#include "overlays/actors/ovl_En_fHG/z_en_fhg.h"
#include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_fhg/object_fhg.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum StrikeMode {
/* 0 */ STRIKE_INIT,
@@ -118,9 +136,9 @@ void EnFhgFire_Init(Actor* thisx, PlayState* play) {
this->collider.dim.height = this->actor.world.rot.x * 0.13f;
this->collider.dim.yShift = 0;
} else if (this->actor.params == FHGFIRE_SPEAR_LIGHT) {
- PRINTF("yari hikari ct 1\n"); // "light spear"
+ PRINTF(T("yari hikari ct 1\n", "spear light ct 1\n"));
EnFhgFire_SetUpdate(this, EnFhgFire_SpearLight);
- PRINTF("yari hikari ct 2\n");
+ PRINTF(T("yari hikari ct 2\n", "spear light ct 2\n"));
this->work[FHGFIRE_TIMER] = this->actor.world.rot.x;
this->work[FHGFIRE_FIRE_MODE] = this->actor.world.rot.y;
} else if ((this->actor.params == FHGFIRE_WARP_EMERGE) || (this->actor.params == FHGFIRE_WARP_RETREAT) ||
@@ -535,7 +553,8 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
if ((bossGnd->flyMode >= GND_FLY_VOLLEY) && (this->work[FHGFIRE_RETURN_COUNT] >= 2)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_FANTOM_LAUGH);
}
- func_8002F698(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 3, 0x10);
+ Actor_SetPlayerKnockback(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f,
+ PLAYER_KNOCKBACK_LARGE_SHOCK, 0x10);
}
break;
case FHGFIRE_LIGHT_BLUE:
@@ -637,8 +656,7 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
this->actor.speed = 20.0f;
}
Actor_PlaySfx(&this->actor, NA_SE_EN_FANTOM_FIRE - SFX_FLAG);
- // "Why ah ah ah ah"
- PRINTF("なぜだああああああああ %d\n", this->work[FHGFIRE_VARIANCE_TIMER]);
+ PRINTF(T("なぜだああああああああ %d\n", "Whyyyyyyyy %d\n"), this->work[FHGFIRE_VARIANCE_TIMER]);
}
}
diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h
index ac2682aaf1..59136f7dfd 100644
--- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h
+++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h
@@ -2,11 +2,12 @@
#define Z_EN_FHG_FIRE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnFhgFire;
-typedef void (*EnFhgFireUpdateFunc)(struct EnFhgFire*, PlayState*);
+typedef void (*EnFhgFireUpdateFunc)(struct EnFhgFire*, struct PlayState*);
typedef enum FhgFireParam {
/* 1 */ FHGFIRE_LIGHTNING_STRIKE = 1,
diff --git a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c
index e07030cab7..85a1fa0cee 100644
--- a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c
+++ b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c
@@ -1,9 +1,25 @@
#include "z_en_fire_rock.h"
#include "overlays/actors/ovl_En_Encount2/z_en_encount2.h"
+
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64debug_display.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_efc_star_field/object_efc_star_field.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnFireRock_Init(Actor* thisx, PlayState* play);
void EnFireRock_Destroy(Actor* thisx, PlayState* play);
@@ -85,16 +101,14 @@ void EnFireRock_Init(Actor* thisx, PlayState* play) {
switch (this->type) {
case FIRE_ROCK_CEILING_SPOT_SPAWNER:
this->actor.draw = NULL;
- // "☆☆☆☆☆ ceiling waiting rock ☆☆☆☆☆"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ 天井待ち岩 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ 天井待ち岩 ☆☆☆☆☆ \n", "☆☆☆☆☆ ceiling waiting rock ☆☆☆☆☆ \n") VT_RST);
this->actionFunc = FireRock_WaitSpawnRocksFromCeiling;
break;
case FIRE_ROCK_ON_FLOOR:
Actor_SetScale(&this->actor, 0.03f);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &D_80A12CCC);
- // "☆☆☆☆☆ floor rock ☆☆☆☆☆"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ 床岩 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ 床岩 ☆☆☆☆☆ \n", "☆☆☆☆☆ floor rock ☆☆☆☆☆ \n") VT_RST);
this->collider.dim.radius = 23;
this->collider.dim.height = 37;
this->collider.dim.yShift = -10;
@@ -139,8 +153,8 @@ void EnFireRock_Init(Actor* thisx, PlayState* play) {
this->actionFunc = EnFireRock_Fall;
break;
default:
- // "☆☆☆☆☆ No such rock! ERR !!!!!! ☆☆☆☆☆"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ そんな岩はねぇ!ERR!!!!!! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(YELLOW)
+ T("☆☆☆☆☆ そんな岩はねぇ!ERR!!!!!! ☆☆☆☆☆ \n", "☆☆☆☆☆ No such rock! ERR!!!!!! ☆☆☆☆☆ \n") VT_RST);
Actor_Kill(&this->actor);
break;
}
@@ -154,8 +168,9 @@ void EnFireRock_Destroy(Actor* thisx, PlayState* play) {
if ((spawner->actor.update != NULL) && (spawner->numSpawnedRocks > 0)) {
spawner->numSpawnedRocks--;
PRINTF("\n\n");
- // "☆☆☆☆☆ Number of spawned instances recovery ☆☆☆☆☆%d"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発生数回復 ☆☆☆☆☆%d\n" VT_RST, spawner->numSpawnedRocks);
+ PRINTF(VT_FGCOL(GREEN)
+ T("☆☆☆☆☆ 発生数回復 ☆☆☆☆☆%d\n", "☆☆☆☆☆ Number of spawned instances recovery ☆☆☆☆☆%d\n") VT_RST,
+ spawner->numSpawnedRocks);
PRINTF("\n\n");
}
}
@@ -284,7 +299,7 @@ void FireRock_WaitSpawnRocksFromCeiling(EnFireRock* this, PlayState* play) {
this->playerNearby = 0;
}
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 0, 255, 0, 255, 4, play->state.gfxCtx);
@@ -354,8 +369,8 @@ void EnFireRock_Update(Actor* thisx, PlayState* play) {
thisx->velocity.y = 0.0f;
thisx->speed = 0.0f;
this->actionFunc = EnFireRock_SpawnMoreBrokenPieces;
- // "☆☆☆☆☆ Shield Defense Lv1 ☆☆☆☆☆"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ シールド防御 Lv1 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ シールド防御 Lv1 ☆☆☆☆☆ \n", "☆☆☆☆☆ Shield Defense Lv1 ☆☆☆☆☆ \n")
+ VT_RST);
return;
}
setCollision = true;
@@ -367,7 +382,7 @@ void EnFireRock_Update(Actor* thisx, PlayState* play) {
this->collider.base.atFlags &= ~AT_HIT;
if (this->collider.base.at == playerActor) {
if (!(player->stateFlags1 & PLAYER_STATE1_26)) {
- func_8002F758(play, thisx, 2.0f, -player->actor.world.rot.y, 3.0f, 4);
+ Actor_SetPlayerKnockbackSmall(play, thisx, 2.0f, -player->actor.world.rot.y, 3.0f, 4);
}
return;
}
diff --git a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.h b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.h
index 6e387bdb39..9b88eaa2c0 100644
--- a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.h
+++ b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.h
@@ -2,7 +2,7 @@
#define Z_EN_FIRE_ROCK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "overlays/actors/ovl_En_Encount2/z_en_encount2.h"
@@ -17,7 +17,7 @@ typedef enum EnFireRockType {
struct EnFireRock;
-typedef void (*EnFireRockActionFunc)(struct EnFireRock*, PlayState*);
+typedef void (*EnFireRockActionFunc)(struct EnFireRock*, struct PlayState*);
typedef struct EnFireRock {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c
index e9d562c7ca..e674ee9bf5 100644
--- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c
+++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c
@@ -5,10 +5,26 @@
*/
#include "z_en_firefly.h"
-#include "assets/objects/object_firefly/object_firefly.h"
#include "overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_14)
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_firefly/object_firefly.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_CAN_ATTACH_TO_ARROW)
void EnFirefly_Init(Actor* thisx, PlayState* play);
void EnFirefly_Destroy(Actor* thisx, PlayState* play);
@@ -143,7 +159,7 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
SkelAnime_Init(play, &this->skelAnime, &gKeeseSkeleton, &gKeeseFlyAnim, this->jointTable, this->morphTable, 28);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
if (PARAMS_GET_NOSHIFT(this->actor.params, 15, 1) != 0) {
@@ -213,7 +229,7 @@ void EnFirefly_SetupFall(EnFirefly* this) {
this->actor.velocity.y = 0.0f;
Animation_Change(&this->skelAnime, &gKeeseFlyAnim, 0.5f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f);
Actor_PlaySfx(&this->actor, NA_SE_EN_FFLY_DEAD);
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 40);
this->actionFunc = EnFirefly_Fall;
}
@@ -260,7 +276,7 @@ void EnFirefly_SetupFrozenFall(EnFirefly* this, PlayState* play) {
s32 i;
Vec3f iceParticlePos;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->auraType = KEESE_AURA_NONE;
this->actor.speed = 0.0f;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 255);
@@ -422,7 +438,7 @@ void EnFirefly_Fall(EnFirefly* this, PlayState* play) {
this->actor.colorFilterTimer = 40;
SkelAnime_Update(&this->skelAnime);
Math_StepToF(&this->actor.speed, 0.0f, 0.5f);
- if (this->actor.flags & ACTOR_FLAG_15) {
+ if (this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW) {
this->actor.colorFilterTimer = 40;
} else {
Math_ScaledStepToS(&this->actor.shape.rot.x, 0x6800, 0x200);
@@ -553,7 +569,12 @@ void EnFirefly_Stunned(EnFirefly* this, PlayState* play) {
}
void EnFirefly_FrozenFall(EnFirefly* this, PlayState* play) {
- if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
+#if OOT_VERSION < NTSC_1_1
+ if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) || (this->actor.floorHeight == BGCHECK_Y_MIN))
+#else
+ if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight == BGCHECK_Y_MIN))
+#endif
+ {
this->actor.colorFilterTimer = 0;
EnFirefly_SetupDie(this);
} else {
@@ -681,7 +702,7 @@ void EnFirefly_Update(Actor* thisx, PlayState* play2) {
this->actionFunc(this, play);
- if (!(this->actor.flags & ACTOR_FLAG_15)) {
+ if (!(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) {
if ((this->actor.colChkInfo.health == 0) || (this->actionFunc == EnFirefly_Stunned)) {
Actor_MoveXZGravity(&this->actor);
} else {
diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h
index 165cc5c26e..7638036a82 100644
--- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h
+++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h
@@ -2,11 +2,11 @@
#define Z_EN_FIREFLY_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnFirefly;
-typedef void (*EnFireflyActionFunc)(struct EnFirefly*, PlayState*);
+typedef void (*EnFireflyActionFunc)(struct EnFirefly*, struct PlayState*);
typedef struct EnFirefly {
/* 0x0000 */ Actor actor;
@@ -21,7 +21,7 @@ typedef struct EnFirefly {
/* 0x0266 */ Vec3s morphTable[28];
/* 0x0310 */ f32 maxAltitude;
/* 0x0314 */ ColliderJntSph collider;
- /* 0x0344 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0344 */ ColliderJntSphElement colliderElements[1];
} EnFirefly; // size = 0x0374
typedef enum KeeseType {
diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c
index e86d8de3b6..f5964ebaea 100644
--- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c
+++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c
@@ -5,8 +5,21 @@
*/
#include "z_en_fish.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64item.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define FLAGS 0
@@ -78,9 +91,9 @@ ActorProfile En_Fish_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 900, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 40, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 700, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 900, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 40, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 700, ICHAIN_STOP),
};
f32 EnFish_XZDistanceSquared(Vec3f* v1, Vec3f* v2) {
@@ -116,7 +129,7 @@ void EnFish_SetCutsceneData(EnFish* this) {
thisx->shape.yOffset = 600.0f;
D_80A17014 = 10.0f;
D_80A17018 = 0.0f;
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
EnFish_SetOutOfWaterAnimation(this);
}
}
@@ -134,13 +147,13 @@ void EnFish_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(play, &this->skelAnime, &gFishSkel, &gFishInWaterAnim, this->jointTable, this->morphTable, 7);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
this->actor.colChkInfo.mass = 50;
this->slowPhase = Rand_ZeroOne() * (0xFFFF + 0.5f);
this->fastPhase = Rand_ZeroOne() * (0xFFFF + 0.5f);
if (params == FISH_DROPPED) {
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 8.0f);
EnFish_Dropped_SetupFall(this);
} else if (params == FISH_SWIMMING_UNIQUE) {
@@ -383,10 +396,10 @@ void EnFish_Dropped_Fall(EnFish* this, PlayState* play) {
EnFish_Dropped_SetupSwimAway(this);
} else if ((this->timer <= 0) && (this->actor.params == FISH_DROPPED) &&
(this->actor.floorHeight < BGCHECK_Y_MIN + 10.0f)) {
- PRINTF(VT_COL(YELLOW, BLACK));
- // "BG missing? Running Actor_delete"
- PRINTF("BG 抜け? Actor_delete します(%s %d)\n", "../z_en_sakana.c", 822);
- PRINTF(VT_RST);
+ PRINTF_COLOR_WARNING();
+ PRINTF(T("BG 抜け? Actor_delete します(%s %d)\n", "BG missing? Running Actor_delete (%s %d)\n"),
+ "../z_en_sakana.c", 822);
+ PRINTF_RST();
Actor_Kill(&this->actor);
}
}
@@ -475,7 +488,7 @@ void EnFish_Dropped_SetupSwimAway(EnFish* this) {
this->actor.gravity = 0.0f;
this->actor.minVelocityY = 0.0f;
this->actor.shape.yOffset = 0.0f;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->timer = 200;
EnFish_SetInWaterAnimation(this);
this->actionFunc = EnFish_Dropped_SwimAway;
@@ -627,9 +640,9 @@ void EnFish_UpdateCutscene(EnFish* this, PlayState* play) {
if (play) {}
if (cue == NULL) {
- // "Warning : DEMO ended without dousa (action) 3 termination being called"
- PRINTF("Warning : dousa 3 消滅 が呼ばれずにデモが終了した(%s %d)(arg_data 0x%04x)\n", "../z_en_sakana.c", 1169,
- this->actor.params);
+ PRINTF(T("Warning : dousa 3 消滅 が呼ばれずにデモが終了した(%s %d)(arg_data 0x%04x)\n",
+ "Warning : Demo ended without action 3 being called (%s %d)(arg_data 0x%04x)\n"),
+ "../z_en_sakana.c", 1169, this->actor.params);
EnFish_ClearCutsceneData(this);
Actor_Kill(&this->actor);
return;
@@ -646,14 +659,13 @@ void EnFish_UpdateCutscene(EnFish* this, PlayState* play) {
EnFish_Cutscene_WiggleFlyingThroughAir(this, play);
break;
case 3:
- // "DEMO fish termination"
- PRINTF("デモ魚消滅\n");
+ PRINTF(T("デモ魚消滅\n", "Demo fish disappearance\n"));
EnFish_ClearCutsceneData(this);
Actor_Kill(&this->actor);
return;
default:
- // "Improper DEMO action"
- PRINTF("不正なデモ動作(%s %d)(arg_data 0x%04x)\n", "../z_en_sakana.c", 1200, this->actor.params);
+ PRINTF(T("不正なデモ動作(%s %d)(arg_data 0x%04x)\n", "Incorrect demo behavior (%s %d)(arg_data 0x%04x)\n"),
+ "../z_en_sakana.c", 1200, this->actor.params);
break;
}
diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.h b/src/overlays/actors/ovl_En_Fish/z_en_fish.h
index 001d161766..d75de5b0a5 100644
--- a/src/overlays/actors/ovl_En_Fish/z_en_fish.h
+++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.h
@@ -2,16 +2,16 @@
#define Z_EN_FISH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnFish;
-typedef void (*EnFishActionFunc)(struct EnFish*, PlayState*);
+typedef void (*EnFishActionFunc)(struct EnFish*, struct PlayState*);
typedef struct EnFish {
/* 0x0000 */ Actor actor;
/* 0x014C */ ColliderJntSph collider;
- /* 0x016C */ ColliderJntSphElement colliderItems[1];
+ /* 0x016C */ ColliderJntSphElement colliderElements[1];
/* 0x01AC */ SkelAnime skelAnime;
/* 0x01F0 */ Vec3s jointTable[7];
/* 0x021A */ Vec3s morphTable[7];
diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c
index 9483d29d19..87747933d3 100644
--- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c
+++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c
@@ -5,9 +5,22 @@
*/
#include "z_en_floormas.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_wallmaster/object_wallmaster.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)
#define SPAWN_INVISIBLE 0x8000
#define SPAWN_SMALL 0x10
@@ -176,8 +189,8 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) {
void EnFloormas_Destroy(Actor* thisx, PlayState* play) {
EnFloormas* this = (EnFloormas*)thisx;
- ColliderCylinder* col = &this->collider;
- Collider_DestroyCylinder(play, col);
+
+ Collider_DestroyCylinder(play, &this->collider);
}
void EnFloormas_MakeInvulnerable(EnFloormas* this) {
@@ -279,8 +292,8 @@ void EnFloormas_SetupLand(EnFloormas* this) {
void EnFloormas_SetupSplit(EnFloormas* this) {
Actor_SetScale(&this->actor, 0.004f);
- this->actor.flags |= ACTOR_FLAG_4;
- if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
+ if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) {
this->actor.draw = EnFloormas_DrawHighlighted;
} else {
this->actor.draw = EnFloormas_Draw;
@@ -384,7 +397,7 @@ void EnFloormas_SetupSmallWait(EnFloormas* this) {
}
this->actor.draw = NULL;
this->actionFunc = EnFloormas_SmallWait;
- this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4);
+ this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED);
}
void EnFloormas_SetupTakeDamage(EnFloormas* this) {
@@ -911,7 +924,7 @@ void EnFloormas_Merge(EnFloormas* this, PlayState* play) {
if (SkelAnime_Update(&this->skelAnime)) {
if (this->actor.scale.x >= 0.01f) {
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
EnFloormas_MakeVulnerable(this);
this->actor.params = 0;
this->collider.elem.acElemFlags |= ACELEM_HOOKABLE;
@@ -1047,7 +1060,7 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) {
UPDBGCHECKINFO_FLAG_4);
Collider_UpdateCylinder(&this->actor, &this->collider);
if (this->actionFunc == EnFloormas_Charge) {
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
}
if (this->actionFunc != EnFloormas_GrabLink) {
diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.h b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.h
index 4c30b8773b..4aefd1ad97 100644
--- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.h
+++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.h
@@ -2,11 +2,11 @@
#define Z_EN_FLOORMAS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef struct EnFloormas EnFloormas;
-typedef void (*EnFloormasActionFunc)(EnFloormas* this, PlayState* play);
+typedef void (*EnFloormasActionFunc)(EnFloormas* this, struct PlayState* play);
struct EnFloormas{
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/src/overlays/actors/ovl_En_Fr/z_en_fr.c
index 443bbfc722..00d29dcc6f 100644
--- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c
+++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c
@@ -1,9 +1,35 @@
#include "z_en_fr.h"
-#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
+
+#include "array_count.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64debug_display.h"
+#include "z64effect.h"
+#include "z64light.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
#include "assets/objects/object_fr/object_fr.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnFr_Init(Actor* thisx, PlayState* play);
void EnFr_Destroy(Actor* thisx, PlayState* play);
@@ -77,7 +103,7 @@ sEnFrPointers.flags = 1 to 11:
- 5: frog 0 (Yellow)
- 7: frog 2 (Red)
- 9: frog 4 (White)
- - Will proceed when counter reachers 11
+ - Will proceed when counter reaches 11
sEnFrPointers.flags = 12
- Deactivate frogs, frogs will jump back into the water
@@ -106,22 +132,22 @@ static EnFrPointers sEnFrPointers = {
};
#define FROG_HAS_SONG_BEEN_PLAYED(frogSongIndex) \
- (gSaveContext.save.info.eventChkInf[EVENTCHKINF_SONGS_FOR_FROGS_INDEX] & \
+ (gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_SONGS_FOR_FROGS] & \
sFrogSongIndexToEventChkInfSongsForFrogsMask[frogSongIndex])
#define FROG_SET_SONG_PLAYED(frogSongIndex) \
- gSaveContext.save.info.eventChkInf[EVENTCHKINF_SONGS_FOR_FROGS_INDEX] |= \
+ gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_SONGS_FOR_FROGS] |= \
sFrogSongIndexToEventChkInfSongsForFrogsMask[frogSongIndex];
static u16 sFrogSongIndexToEventChkInfSongsForFrogsMask[] = {
- EVENTCHKINF_SONGS_FOR_FROGS_ZL_MASK, // FROG_ZL
- EVENTCHKINF_SONGS_FOR_FROGS_EPONA_MASK, // FROG_EPONA
- EVENTCHKINF_SONGS_FOR_FROGS_SARIA_MASK, // FROG_SARIA
- EVENTCHKINF_SONGS_FOR_FROGS_SUNS_MASK, // FROG_SUNS
- EVENTCHKINF_SONGS_FOR_FROGS_SOT_MASK, // FROG_SOT
- EVENTCHKINF_SONGS_FOR_FROGS_STORMS_MASK, // FROG_STORMS
- EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_MASK, // FROG_CHOIR_SONG
- 0, // FROG_NO_SONG
+ EVENTCHKINF_MASK(EVENTCHKINF_SONGS_FOR_FROGS_ZL), // FROG_ZL
+ EVENTCHKINF_MASK(EVENTCHKINF_SONGS_FOR_FROGS_EPONA), // FROG_EPONA
+ EVENTCHKINF_MASK(EVENTCHKINF_SONGS_FOR_FROGS_SARIA), // FROG_SARIA
+ EVENTCHKINF_MASK(EVENTCHKINF_SONGS_FOR_FROGS_SUNS), // FROG_SUNS
+ EVENTCHKINF_MASK(EVENTCHKINF_SONGS_FOR_FROGS_SOT), // FROG_SOT
+ EVENTCHKINF_MASK(EVENTCHKINF_SONGS_FOR_FROGS_STORMS), // FROG_STORMS
+ EVENTCHKINF_MASK(EVENTCHKINF_SONGS_FOR_FROGS_CHOIR), // FROG_CHOIR_SONG
+ 0, // FROG_NO_SONG
};
static u8 sFrogToFrogSongIndex[] = {
@@ -236,27 +262,26 @@ void EnFr_Init(Actor* thisx, PlayState* play) {
this->actor.destroy = NULL;
this->actor.draw = NULL;
this->actor.update = EnFr_UpdateIdle;
- this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4);
+ this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED);
this->actor.flags &= ~0;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP);
this->actor.textId = 0x40AC;
this->actionFunc = EnFr_Idle;
} else {
if ((this->actor.params >= 6) || (this->actor.params < 0)) {
- PRINTF(VT_COL(RED, WHITE));
- // "The argument is wrong!!"
- PRINTF("%s[%d] : 引数が間違っている!!(%d)\n", "../z_en_fr.c", 370, this->actor.params);
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("%s[%d] : 引数が間違っている!!(%d)\n", "%s[%d] : The argument is wrong!! (%d)\n"),
+ "../z_en_fr.c", 370, this->actor.params);
+ PRINTF_RST();
ASSERT(0, "0", "../z_en_fr.c", 372);
}
this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GAMEPLAY_FIELD_KEEP);
if (this->requiredObjectSlot < 0) {
Actor_Kill(&this->actor);
- PRINTF(VT_COL(RED, WHITE));
- // "There is no bank!!"
- PRINTF("%s[%d] : バンクが無いよ!!\n", "../z_en_fr.c", 380);
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("%s[%d] : バンクが無いよ!!\n", "%s[%d] : There is no bank!!\n"), "../z_en_fr.c", 380);
+ PRINTF_RST();
ASSERT(0, "0", "../z_en_fr.c", 382);
}
}
@@ -278,7 +303,7 @@ void EnFr_Update(Actor* thisx, PlayState* play) {
s32 pad2;
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
frogIndex = this->actor.params - 1;
sEnFrPointers.frogs[frogIndex] = this;
Actor_ProcessInitChain(&this->actor, sInitChain);
@@ -978,10 +1003,9 @@ void EnFr_Deactivate(EnFr* this, PlayState* play) {
EnFr* frog = sEnFrPointers.frogs[frogIndex];
if (frog == NULL) {
- PRINTF(VT_COL(RED, WHITE));
- // "There are no frogs!?"
- PRINTF("%s[%d]カエルがいない!?\n", "../z_en_fr.c", 1604);
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("%s[%d]カエルがいない!?\n", "%s[%d] There are no frogs!?\n"), "../z_en_fr.c", 1604);
+ PRINTF_RST();
return;
} else if (frog->isDeactivating != true) {
return;
@@ -992,10 +1016,9 @@ void EnFr_Deactivate(EnFr* this, PlayState* play) {
EnFr* frog = sEnFrPointers.frogs[frogIndex];
if (frog == NULL) {
- PRINTF(VT_COL(RED, WHITE));
- // "There are no frogs!?"
- PRINTF("%s[%d]カエルがいない!?\n", "../z_en_fr.c", 1618);
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("%s[%d]カエルがいない!?\n", "%s[%d] There are no frogs!?\n"), "../z_en_fr.c", 1618);
+ PRINTF_RST();
return;
}
frog->isDeactivating = false;
@@ -1029,7 +1052,7 @@ void EnFr_SetIdle(EnFr* this, PlayState* play) {
void EnFr_UpdateIdle(Actor* thisx, PlayState* play) {
EnFr* this = (EnFr*)thisx;
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 255, 0, 0, 255, 4, play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.h b/src/overlays/actors/ovl_En_Fr/z_en_fr.h
index 95a365dd9b..2bed02b4a0 100644
--- a/src/overlays/actors/ovl_En_Fr/z_en_fr.h
+++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.h
@@ -2,11 +2,12 @@
#define Z_EN_FR_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnFr;
-typedef void (*EnFrActionFunc)(struct EnFr*, PlayState*);
+typedef void (*EnFrActionFunc)(struct EnFr*, struct PlayState*);
typedef void (*EnFrBlinkFunc)(struct EnFr*);
typedef enum FrogType {
diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c
index 527df5b1fb..24818477d7 100644
--- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c
+++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c
@@ -5,10 +5,25 @@
*/
#include "z_en_fu.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_fu/object_fu.h"
#include "assets/scenes/indoors/hakasitarelay/hakasitarelay_scene.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_UPDATE_DURING_OCARINA)
#define FU_RESET_LOOK_ANGLE (1 << 0)
#define FU_WAIT (1 << 1)
@@ -134,7 +149,7 @@ void EnFu_WaitChild(EnFu* this, PlayState* play) {
u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_WINDMILL_MAN);
if (textId == 0) {
- textId = GET_EVENTCHKINF(EVENTCHKINF_67) ? 0x5033 : 0x5032;
+ textId = GET_EVENTCHKINF(EVENTCHKINF_DRAINED_WELL) ? 0x5033 : 0x5032;
}
// if ACTOR_FLAG_TALK is set and textId is 0x5033, change animation
@@ -167,11 +182,11 @@ void func_80A1DBD4(EnFu* this, PlayState* play) {
if (play->msgCtx.ocarinaMode >= OCARINA_MODE_04) {
this->actionFunc = EnFu_WaitAdult;
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
this->actionFunc = func_80A1DB60;
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
play->csCtx.script = SEGMENTED_TO_VIRTUAL(gSongOfStormsCs);
gSaveContext.cutsceneTrigger = 1;
Item_Give(play, ITEM_SONG_STORMS);
@@ -278,8 +293,8 @@ s32 EnFu_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
}
if (limbIndex == FU_LIMB_CHEST_MUSIC_BOX) {
- rot->y += (Math_SinS((play->state.frames * (limbIndex * 50 + 0x814))) * 200.0f);
- rot->z += (Math_CosS((play->state.frames * (limbIndex * 50 + 0x940))) * 200.0f);
+ rot->y += Math_SinS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y))) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z))) * FIDGET_AMPLITUDE;
}
return false;
}
diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.h b/src/overlays/actors/ovl_En_Fu/z_en_fu.h
index dbbcacfc54..af90b2cf05 100644
--- a/src/overlays/actors/ovl_En_Fu/z_en_fu.h
+++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.h
@@ -2,11 +2,11 @@
#define Z_EN_FU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnFu;
-typedef void (*EnFuActionFunc)(struct EnFu*, PlayState*);
+typedef void (*EnFuActionFunc)(struct EnFu*, struct PlayState*);
typedef enum EnFuLimb {
/* 0x00 */ FU_LIMB_ROOT,
diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/src/overlays/actors/ovl_En_Fw/z_en_fw.c
index 50bc3e3b7b..ba002aefbe 100644
--- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c
+++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c
@@ -5,11 +5,26 @@
*/
#include "z_en_fw.h"
-#include "assets/objects/object_fw/object_fw.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_9)
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_fw/object_fw.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR)
void EnFw_Init(Actor* thisx, PlayState* play);
void EnFw_Destroy(Actor* thisx, PlayState* play);
@@ -191,7 +206,7 @@ void EnFw_Init(Actor* thisx, PlayState* play) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENFW_ANIM_0);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->sphs);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x10), &D_80A1FB94);
Actor_SetScale(&this->actor, 0.01f);
this->runDirection = -this->actor.params;
@@ -361,8 +376,7 @@ void EnFw_Update(Actor* thisx, PlayState* play) {
EnFw* this = (EnFw*)thisx;
SkelAnime_Update(&this->skelAnime);
- if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) {
- // not attached to hookshot.
+ if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 20.0f, 0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
this->actionFunc(this, play);
diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.h b/src/overlays/actors/ovl_En_Fw/z_en_fw.h
index 7940a98157..b19f967111 100644
--- a/src/overlays/actors/ovl_En_Fw/z_en_fw.h
+++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.h
@@ -2,11 +2,11 @@
#define Z_EN_FW_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnFw;
-typedef void (*EnFwActionFunc)(struct EnFw* this, PlayState* play);
+typedef void (*EnFwActionFunc)(struct EnFw* this, struct PlayState* play);
#define EN_FW_EFFECT_COUNT 20
@@ -28,7 +28,7 @@ typedef struct EnFw {
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ EnFwActionFunc actionFunc;
/* 0x0194 */ ColliderJntSph collider;
- /* 0x01B4 */ ColliderJntSphElement sphs[1];
+ /* 0x01B4 */ ColliderJntSphElement colliderElements[1];
/* 0x01F4 */ Vec3f bompPos;
/* 0x0200 */ u8 lastDmgHook;
/* 0x0202 */ s16 runDirection;
diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c
index c7b14455b3..6ded127aef 100644
--- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c
+++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c
@@ -1,7 +1,22 @@
#include "z_en_fz.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_fz/object_fz.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_10)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)
void EnFz_Init(Actor* thisx, PlayState* play);
void EnFz_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.h b/src/overlays/actors/ovl_En_Fz/z_en_fz.h
index a7fa2d7134..277e039e2d 100644
--- a/src/overlays/actors/ovl_En_Fz/z_en_fz.h
+++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.h
@@ -2,11 +2,11 @@
#define Z_EN_FZ_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnFz;
-typedef void (*EnFzActionFunc)(struct EnFz*, PlayState*);
+typedef void (*EnFzActionFunc)(struct EnFz*, struct PlayState*);
typedef void (*EnFzSpawnIceSmokeFunc)(struct EnFz*);
typedef struct EnFzEffect {
diff --git a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c
index e1d6258611..5a6ad4a323 100644
--- a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c
+++ b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c
@@ -5,14 +5,34 @@
*/
#include "z_en_g_switch.h"
-#include "terminal.h"
#include "overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64debug_display.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_tsubo/object_tsubo.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum GSwitchMoveState {
/* 0 */ MOVE_TARGET,
@@ -85,22 +105,21 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) {
this->type = PARAMS_GET_U(this->actor.params, 12, 4);
this->switchFlag = PARAMS_GET_U(this->actor.params, 0, 6);
this->numEffects = EN_GSWITCH_EFFECT_COUNT;
- // "index"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ インデックス ☆☆☆☆☆ %x\n" VT_RST, this->type);
- // "save"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ セーブ\t ☆☆☆☆☆ %x\n" VT_RST, this->switchFlag);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ インデックス ☆☆☆☆☆ %x\n", "☆☆☆☆☆ Index ☆☆☆☆☆ %x\n") VT_RST, this->type);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ セーブ\t ☆☆☆☆☆ %x\n", "☆☆☆☆☆ Save\t ☆☆☆☆☆ %x\n") VT_RST, this->switchFlag);
switch (this->type) {
case ENGSWITCH_SILVER_TRACKER:
PRINTF("\n\n");
- // "parent switch spawn"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 親スイッチ発生 ☆☆☆☆☆ %x\n" VT_RST, this->actor.params);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 親スイッチ発生 ☆☆☆☆☆ %x\n", "☆☆☆☆☆ Parent switch spawn ☆☆☆☆☆ %x\n") VT_RST,
+ this->actor.params);
sCollectedCount = 0;
// Ideally the following two lines would be
// this->silverCount = PARAMS_GET_U(this->actor.params, 6, 6);
this->silverCount = PARAMS_GET_NOMASK(this->actor.params, 6);
this->silverCount &= 0x3F;
- // "maximum number of checks"
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 最大チェック数 ☆☆☆☆☆ %d\n" VT_RST, this->silverCount);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆☆☆ 最大チェック数 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Maximum number of checks ☆☆☆☆☆ %d\n")
+ VT_RST,
+ this->silverCount);
PRINTF("\n\n");
if (Flags_GetSwitch(play, this->switchFlag)) {
// This is a reference to Hokuto no Ken
@@ -112,8 +131,8 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) {
break;
case ENGSWITCH_SILVER_RUPEE:
PRINTF("\n\n");
- // "child switch spawn"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 子スイッチ発生 ☆☆☆☆☆ %x\n" VT_RST, this->actor.params);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 子スイッチ発生 ☆☆☆☆☆ %x\n", "☆☆☆☆☆ Child switch spawn ☆☆☆☆☆ %x\n") VT_RST,
+ this->actor.params);
this->colorIdx = 5;
this->numEffects = 20;
Collider_InitCylinder(play, &this->collider);
@@ -130,8 +149,8 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) {
break;
case ENGSWITCH_ARCHERY_POT:
PRINTF("\n\n");
- // "Horseback archery destructible pot"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ やぶさめぶち抜き壷 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ やぶさめぶち抜き壷 ☆☆☆☆☆ \n",
+ "☆☆☆☆☆ Horseback archery destructible pot ☆☆☆☆☆ \n") VT_RST);
this->actor.gravity = -3.0f;
this->colorIdx = Rand_ZeroFloat(2.99f);
Collider_InitCylinder(play, &this->collider);
@@ -144,10 +163,9 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) {
this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, this->objectId);
if (this->requiredObjectSlot < 0) {
Actor_Kill(&this->actor);
- // "what?"
- PRINTF(VT_FGCOL(MAGENTA) " なにみの? %d\n" VT_RST "\n", this->requiredObjectSlot);
- // "bank is funny"
- PRINTF(VT_FGCOL(CYAN) " バンクおかしいしぞ!%d\n" VT_RST "\n", this->actor.params);
+ PRINTF(VT_FGCOL(MAGENTA) T(" なにみの? %d\n", " What? %d\n") VT_RST "\n", this->requiredObjectSlot);
+ PRINTF(VT_FGCOL(CYAN) T(" バンクおかしいしぞ!%d\n", " Bank is weird! %d\n") VT_RST "\n",
+ this->actor.params);
}
this->collider.dim.radius = 24;
this->collider.dim.height = 74;
@@ -202,7 +220,7 @@ void EnGSwitch_Break(EnGSwitch* this, PlayState* play) {
void EnGSwitch_WaitForObject(EnGSwitch* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
this->actor.objectSlot = this->requiredObjectSlot;
this->actor.draw = EnGSwitch_DrawPot;
this->actionFunc = EnGSwitch_ArcheryPot;
@@ -214,18 +232,18 @@ void EnGSwitch_SilverRupeeTracker(EnGSwitch* this, PlayState* play) {
if (this->noteIndex < sCollectedCount) {
if (sCollectedCount < 5) {
- // "sound?"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 音? ☆☆☆☆☆ %d\n" VT_RST, this->noteIndex);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 音? ☆☆☆☆☆ %d\n", "sound?") VT_RST, this->noteIndex);
Audio_PlaySfxTransposed(&gSfxDefaultPos, NA_SE_EV_FIVE_COUNT_LUPY, majorScale[this->noteIndex]);
this->noteIndex = sCollectedCount;
}
}
if (sCollectedCount >= this->silverCount) {
- // "It is now the end of the century."
- // This another reference to Hokuto no Ken.
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 時はまさに世紀末〜 ☆☆☆☆☆ %d\n" VT_RST, this->switchFlag);
- // "Last!"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ らすとぉ! ☆☆☆☆☆ \n" VT_RST);
+ // This is another reference to Hokuto no Ken.
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 時はまさに世紀末〜 ☆☆☆☆☆ %d\n",
+ "☆☆☆☆☆ It is now the end of the century. ☆☆☆☆☆ %d\n") VT_RST,
+ this->switchFlag);
+ PRINTF(VT_FGCOL(GREEN)
+ T("☆☆☆☆☆ らすとぉ! ☆☆☆☆☆ \n", "☆☆☆☆☆ Last! ☆☆☆☆☆ \n") VT_RST);
if ((play->sceneId == SCENE_GERUDO_TRAINING_GROUND) && (this->actor.room == 2)) {
Flags_SetTempClear(play, this->actor.room);
} else {
@@ -348,8 +366,9 @@ void EnGSwitch_GalleryRupee(EnGSwitch* this, PlayState* play) {
gallery->targetState[this->index] = ENSYATEKIHIT_HIT;
Sfx_PlaySfxCentered(NA_SE_EV_HIT_SOUND);
Sfx_PlaySfxCentered(NA_SE_SY_GET_RUPY);
- // "Yeah !"
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ いぇぇーす!HIT!! ☆☆☆☆☆ %d\n" VT_RST, gallery->hitCount);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ いぇぇーす!HIT!! ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Yeah! HIT!! ☆☆☆☆☆ %d\n")
+ VT_RST,
+ gallery->hitCount);
EnGSwitch_Break(this, play);
this->killTimer = 50;
this->broken = true;
@@ -448,7 +467,7 @@ void EnGSwitch_Update(Actor* thisx, PlayState* play) {
}
}
- if (OOT_DEBUG && BREG(0) != 0 && (this->type == ENGSWITCH_SILVER_TRACKER)) {
+ if (DEBUG_FEATURES && BREG(0) != 0 && (this->type == ENGSWITCH_SILVER_TRACKER)) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 255, 0, 0, 255, 4, play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.h b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.h
index 58e19ea9c1..c680fb1440 100644
--- a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.h
+++ b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.h
@@ -2,11 +2,11 @@
#define Z_EN_G_SWITCH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGSwitch;
-typedef void (*EnGSwitchActionFunc)(struct EnGSwitch*, PlayState*);
+typedef void (*EnGSwitchActionFunc)(struct EnGSwitch*, struct PlayState*);
typedef enum EnGSwitchMoveMode {
/* 0 */ GSWITCH_NONE,
diff --git a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c
index c8fd6d8fba..d40a9a446d 100644
--- a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c
+++ b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c
@@ -5,9 +5,19 @@
*/
#include "z_en_ganon_mant.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnGanonMant_Init(Actor* thisx, PlayState* play);
void EnGanonMant_Destroy(Actor* thisx, PlayState* play);
@@ -425,7 +435,7 @@ void EnGanonMant_Draw(Actor* thisx, PlayState* play) {
midpoint.y = rightPos->y + yDiff * 0.5f;
midpoint.z = rightPos->z + zDiff * 0.5f;
- // Calculte base orientation for chosen endpoints
+ // Calculate base orientation for chosen endpoints
yaw = Math_Atan2F(zDiff, xDiff);
pitch = -Math_Atan2F(sqrtf(SQ(xDiff) + SQ(zDiff)), yDiff);
diffHalfDist = sqrtf(SQ(xDiff) + SQ(yDiff) + SQ(zDiff)) * 0.5f;
diff --git a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h
index f319bfbf83..61bf1826bc 100644
--- a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h
+++ b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h
@@ -2,7 +2,7 @@
#define Z_EN_GANON_MANT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGanonMant;
diff --git a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c
index 1a36f849ac..a002ce5e1b 100644
--- a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c
+++ b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c
@@ -5,9 +5,16 @@
*/
#include "z_en_ganon_organ.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+
#include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnGanonOrgan_Init(Actor* thisx, PlayState* play);
void EnGanonOrgan_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.h b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.h
index 0c301bddca..8d20bee4d3 100644
--- a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.h
+++ b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.h
@@ -2,7 +2,7 @@
#define Z_EN_GANON_ORGAN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGanonOrgan;
diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/src/overlays/actors/ovl_En_Gb/z_en_gb.c
index e7fa809a06..9565ceba98 100644
--- a/src/overlays/actors/ovl_En_Gb/z_en_gb.c
+++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.c
@@ -5,6 +5,22 @@
*/
#include "z_en_gb.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ps/object_ps.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -176,7 +192,7 @@ void EnGb_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->dyna.actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
Actor_SetScale(&this->dyna.actor, 0.01f);
- this->dyna.actor.colChkInfo.mass = 0xFF;
+ this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
this->dyna.actor.speed = 0.0f;
this->dyna.actor.velocity.y = 0.0f;
this->dyna.actor.gravity = -1.0f;
@@ -284,7 +300,7 @@ void func_80A2F83C(EnGb* this, PlayState* play) {
if (Actor_TalkOfferAccepted(&this->dyna.actor, play)) {
s32 pad;
- switch (func_8002F368(play)) {
+ switch (Actor_GetPlayerExchangeItemId(play)) {
case EXCH_ITEM_NONE:
func_80A2F180(this);
this->actionFunc = func_80A2F94C;
diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.h b/src/overlays/actors/ovl_En_Gb/z_en_gb.h
index 4005075c4c..24b7d30560 100644
--- a/src/overlays/actors/ovl_En_Gb/z_en_gb.h
+++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.h
@@ -2,11 +2,12 @@
#define Z_EN_GB_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnGb;
-typedef void (*EnGbActionFunc)(struct EnGb*, PlayState*);
+typedef void (*EnGbActionFunc)(struct EnGb*, struct PlayState*);
typedef struct EnGbCagedSoulInfo {
/* 0x00 */ Color_RGBA8 prim;
diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c
index 492d9d6bc7..8b6d821346 100644
--- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c
+++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c
@@ -5,7 +5,23 @@
*/
#include "z_en_ge1.h"
+
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64horse.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ge1/object_ge1.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -26,7 +42,7 @@ void EnGe1_Destroy(Actor* thisx, PlayState* play);
void EnGe1_Update(Actor* thisx, PlayState* play);
void EnGe1_Draw(Actor* thisx, PlayState* play);
-s32 EnGe1_CheckCarpentersFreed(void);
+s32 EnGe1_CheckAllCarpentersRescued(void);
void EnGe1_WatchForPlayerFrontOnly(EnGe1* this, PlayState* play);
void EnGe1_SetNormalText(EnGe1* this, PlayState* play);
void EnGe1_WatchForAndSensePlayer(EnGe1* this, PlayState* play);
@@ -101,7 +117,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
this->actor.attentionRangeType = ATTENTION_RANGE_6;
Actor_SetScale(&this->actor, 0.01f);
- this->actor.uncullZoneForward = ((play->sceneId == SCENE_GERUDO_VALLEY) ? 1000.0f : 1200.0f);
+ this->actor.cullingVolumeDistance = ((play->sceneId == SCENE_GERUDO_VALLEY) ? 1000.0f : 1200.0f);
switch (PARAMS_GET_U(this->actor.params, 0, 8)) {
@@ -113,7 +129,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
case GE1_TYPE_GATE_OPERATOR:
this->hairstyle = GE1_HAIR_STRAIGHT;
- if (EnGe1_CheckCarpentersFreed()) {
+ if (EnGe1_CheckAllCarpentersRescued()) {
this->actionFunc = EnGe1_CheckGate_GateOp;
} else {
this->actionFunc = EnGe1_WatchForPlayerFrontOnly;
@@ -123,7 +139,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
case GE1_TYPE_NORMAL:
this->hairstyle = GE1_HAIR_STRAIGHT;
- if (EnGe1_CheckCarpentersFreed()) {
+ if (EnGe1_CheckAllCarpentersRescued()) {
this->actionFunc = EnGe1_SetNormalText;
} else {
this->actionFunc = EnGe1_WatchForAndSensePlayer;
@@ -132,8 +148,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
case GE1_TYPE_VALLEY_FLOOR:
if (LINK_IS_ADULT) {
- // "Valley floor Gerudo withdrawal"
- PRINTF(VT_FGCOL(CYAN) "谷底 ゲルド 撤退 \n" VT_RST);
+ PRINTF(VT_FGCOL(CYAN) T("谷底 ゲルド 撤退 \n", "Valley floor Gerudo withdrawal \n") VT_RST);
Actor_Kill(&this->actor);
return;
}
@@ -148,12 +163,13 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
}
this->actor.attentionRangeType = ATTENTION_RANGE_3;
this->hairstyle = GE1_HAIR_BOB;
- // "Horseback archery Gerudo EVENT_INF(0) ="
- PRINTF(VT_FGCOL(CYAN) "やぶさめ ゲルド EVENT_INF(0) = %x\n" VT_RST, gSaveContext.eventInf[0]);
+ PRINTF(VT_FGCOL(CYAN)
+ T("やぶさめ ゲルド EVENT_INF(0) = %x\n", "Horseback archery Gerudo EVENT_INF(0) = %x\n") VT_RST,
+ gSaveContext.eventInf[0]);
if (GET_EVENTINF(EVENTINF_HORSES_08)) {
this->actionFunc = EnGe1_TalkAfterGame_Archery;
- } else if (EnGe1_CheckCarpentersFreed()) {
+ } else if (EnGe1_CheckAllCarpentersRescued()) {
this->actionFunc = EnGe1_Wait_Archery;
} else {
this->actionFunc = EnGe1_WatchForPlayerFrontOnly;
@@ -163,7 +179,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
case GE1_TYPE_TRAINING_GROUNDS_GUARD:
this->hairstyle = GE1_HAIR_STRAIGHT;
- if (EnGe1_CheckCarpentersFreed()) {
+ if (EnGe1_CheckAllCarpentersRescued()) {
this->actionFunc = EnGe1_CheckForCard_GTGGuard;
} else {
this->actionFunc = EnGe1_WatchForPlayerFrontOnly;
@@ -207,9 +223,9 @@ void EnGe1_SetAnimationIdle(EnGe1* this) {
this->animFunc = EnGe1_CueUpAnimation;
}
-s32 EnGe1_CheckCarpentersFreed(void) {
- if (!(GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(0)) && GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(1)) &&
- GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(2)) && GET_EVENTCHKINF(EVENTCHKINF_CARPENTERS_FREE(3)))) {
+s32 EnGe1_CheckAllCarpentersRescued(void) {
+ if (!(GET_EVENTCHKINF(EVENTCHKINF_CARPENTER_0_RESCUED) && GET_EVENTCHKINF(EVENTCHKINF_CARPENTER_1_RESCUED) &&
+ GET_EVENTCHKINF(EVENTCHKINF_CARPENTER_2_RESCUED) && GET_EVENTCHKINF(EVENTCHKINF_CARPENTER_3_RESCUED))) {
return false;
}
return true;
@@ -224,7 +240,7 @@ void EnGe1_KickPlayer(EnGe1* this, PlayState* play) {
if (this->cutsceneTimer > 0) {
this->cutsceneTimer--;
} else {
- func_8006D074(play);
+ Horse_ResetHorseData(play);
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
play->nextEntranceIndex = ENTR_GERUDO_VALLEY_1;
@@ -518,7 +534,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
s32 getItemId;
if (Actor_TextboxIsClosing(&this->actor, play)) {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actionFunc = EnGe1_WaitTillItemGiven_Archery;
}
@@ -545,7 +561,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
void EnGe1_TalkWinPrize_Archery(EnGe1* this, PlayState* play) {
if (Actor_TalkOfferAccepted(&this->actor, play)) {
this->actionFunc = EnGe1_BeginGiveItem_Archery;
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
} else {
Actor_OfferTalk(&this->actor, play, 200.0f);
}
@@ -567,7 +583,7 @@ void EnGe1_BeginGame_Archery(EnGe1* this, PlayState* play) {
Actor* horse;
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
switch (play->msgCtx.choiceIndex) {
case 0:
@@ -627,7 +643,7 @@ void EnGe1_TalkAfterGame_Archery(EnGe1* this, PlayState* play) {
// With the current `SaveContext` struct definition, the expression in the debug string is an out-of-bounds read,
// see the other occurrence of this for more details.
LOG_NUM("z_common_data.memory.information.room_inf[127][ 0 ]", HIGH_SCORE(HS_HBA), "../z_en_ge1.c", 1111);
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
if (HIGH_SCORE(HS_HBA) < gSaveContext.minigameScore) {
HIGH_SCORE(HS_HBA) = gSaveContext.minigameScore;
@@ -777,8 +793,8 @@ s32 EnGe1_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
// The purpose of the state flag GE1_STATE_STOP_FIDGET is to skip this code, which this actor has in lieu of an idle
// animation.
if ((limbIndex == GE1_LIMB_TORSO) || (limbIndex == GE1_LIMB_L_FOREARM) || (limbIndex == GE1_LIMB_R_FOREARM)) {
- rot->y += Math_SinS(play->state.frames * (limbIndex * 50 + 0x814)) * 200.0f;
- rot->z += Math_CosS(play->state.frames * (limbIndex * 50 + 0x940)) * 200.0f;
+ rot->y += Math_SinS(play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y)) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z)) * FIDGET_AMPLITUDE;
}
return 0;
}
diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h
index 7fb1692f62..6aaaf2ab37 100644
--- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h
+++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h
@@ -2,12 +2,12 @@
#define Z_EN_GE1_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGe1;
typedef void (*EnGe1AnimFunc)(struct EnGe1*);
-typedef void (*EnGe1ActionFunc)(struct EnGe1*, PlayState*);
+typedef void (*EnGe1ActionFunc)(struct EnGe1*, struct PlayState*);
typedef enum EnGe1Type {
/* 0x00 */ GE1_TYPE_GATE_GUARD,
diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
index 332dfc9d17..704ca69543 100644
--- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
+++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
@@ -5,10 +5,25 @@
*/
#include "z_en_ge2.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64horse.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_gla/object_gla.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
#define GE2_STATE_ANIMCOMPLETE (1 << 1)
#define GE2_STATE_KO (1 << 2)
@@ -38,7 +53,7 @@ void EnGe2_Destroy(Actor* thisx, PlayState* play);
void EnGe2_Update(Actor* thisx, PlayState* play);
void EnGe2_Draw(Actor* thisx, PlayState* play);
-s32 EnGe2_CheckCarpentersFreed(void);
+s32 EnGe2_CheckAllCarpentersRescued(void);
void EnGe2_CaptureClose(EnGe2* this, PlayState* play);
void EnGe2_CaptureCharge(EnGe2* this, PlayState* play);
void EnGe2_CaptureTurn(EnGe2* this, PlayState* play);
@@ -124,9 +139,9 @@ void EnGe2_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->actor, 0.01f);
if (play->sceneId == SCENE_GERUDO_VALLEY) {
- this->actor.uncullZoneForward = 1000.0f;
+ this->actor.cullingVolumeDistance = 1000.0f;
} else {
- this->actor.uncullZoneForward = 1200.0f;
+ this->actor.cullingVolumeDistance = 1200.0f;
}
this->yDetectRange = (this->actor.world.rot.z + 1) * 40.0f;
@@ -136,14 +151,14 @@ void EnGe2_Init(Actor* thisx, PlayState* play) {
switch (PARAMS_GET_S(thisx->params, 0, 8)) {
case GE2_TYPE_PATROLLING:
EnGe2_ChangeAction(this, GE2_ACTION_WALK);
- if (EnGe2_CheckCarpentersFreed()) {
+ if (EnGe2_CheckAllCarpentersRescued()) {
this->actor.update = EnGe2_UpdateFriendly;
this->actor.attentionRangeType = ATTENTION_RANGE_6;
}
break;
case GE2_TYPE_STATIONARY:
EnGe2_ChangeAction(this, GE2_ACTION_STAND);
- if (EnGe2_CheckCarpentersFreed()) {
+ if (EnGe2_CheckAllCarpentersRescued()) {
this->actor.update = EnGe2_UpdateFriendly;
this->actor.attentionRangeType = ATTENTION_RANGE_6;
}
@@ -223,13 +238,11 @@ s32 Ge2_DetectPlayerInUpdate(PlayState* play, EnGe2* this, Vec3f* pos, s16 yRot,
return 1;
}
-s32 EnGe2_CheckCarpentersFreed(void) {
- if (CHECK_FLAG_ALL(gSaveContext.save.info.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX] &
- (EVENTCHKINF_CARPENTERS_FREE_MASK_ALL | 0xF0),
- EVENTCHKINF_CARPENTERS_FREE_MASK_ALL)) {
- return 1;
+s32 EnGe2_CheckAllCarpentersRescued(void) {
+ if (GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED2()) {
+ return true;
}
- return 0;
+ return false;
}
// Actions
@@ -238,7 +251,7 @@ void EnGe2_CaptureClose(EnGe2* this, PlayState* play) {
if (this->timer > 0) {
this->timer--;
} else {
- func_8006D074(play);
+ Horse_ResetHorseData(play);
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
play->nextEntranceIndex = ENTR_GERUDO_VALLEY_1;
@@ -264,7 +277,7 @@ void EnGe2_CaptureCharge(EnGe2* this, PlayState* play) {
if (this->timer > 0) {
this->timer--;
} else {
- func_8006D074(play);
+ Horse_ResetHorseData(play);
if ((INV_CONTENT(ITEM_HOOKSHOT) == ITEM_NONE) || (INV_CONTENT(ITEM_LONGSHOT) == ITEM_NONE)) {
play->nextEntranceIndex = ENTR_GERUDO_VALLEY_1;
@@ -438,7 +451,7 @@ void EnGe2_SetActionAfterTalk(EnGe2* this, PlayState* play) {
break;
}
this->actor.update = EnGe2_UpdateFriendly;
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
EnGe2_TurnToFacePlayer(this, play);
}
@@ -459,7 +472,7 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, PlayState* play) {
void EnGe2_GiveCard(EnGe2* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actionFunc = EnGe2_WaitTillCardGiven;
Actor_OfferGetItem(&this->actor, play, GI_GERUDOS_CARD, 10000.0f, 50.0f);
}
@@ -471,7 +484,7 @@ void EnGe2_ForceTalk(EnGe2* this, PlayState* play) {
this->actionFunc = EnGe2_GiveCard;
} else {
this->actor.textId = 0x6004;
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferTalkExchange(&this->actor, play, 300.0f, 300.0f, EXCH_ITEM_NONE);
}
EnGe2_LookAtPlayer(this, play);
@@ -573,14 +586,12 @@ void EnGe2_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (Ge2_DetectPlayerInUpdate(play, this, &this->actor.focus.pos, this->actor.shape.rot.y, this->yDetectRange)) {
- // "Discovered!"
- PRINTF(VT_FGCOL(GREEN) "発見!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("発見!!!!!!!!!!!!\n", "Discovered!!!!!!!!!!!!\n") VT_RST);
EnGe2_SetupCapturePlayer(this, play);
}
if ((PARAMS_GET_S(this->actor.params, 0, 8) == GE2_TYPE_STATIONARY) && (this->actor.xzDistToPlayer < 100.0f)) {
- // "Discovered!"
- PRINTF(VT_FGCOL(GREEN) "発見!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("発見!!!!!!!!!!!!\n", "Discovered!!!!!!!!!!!!\n") VT_RST);
EnGe2_SetupCapturePlayer(this, play);
}
}
@@ -593,7 +604,7 @@ void EnGe2_Update(Actor* thisx, PlayState* play) {
}
EnGe2_MoveAndBlink(this, play);
- if (EnGe2_CheckCarpentersFreed() && !(this->stateFlags & GE2_STATE_KO)) {
+ if (EnGe2_CheckAllCarpentersRescued() && !(this->stateFlags & GE2_STATE_KO)) {
this->actor.update = EnGe2_UpdateFriendly;
this->actor.attentionRangeType = ATTENTION_RANGE_6;
}
@@ -619,7 +630,7 @@ void EnGe2_UpdateStunned(Actor* thisx, PlayState* play2) {
}
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
- if (EnGe2_CheckCarpentersFreed()) {
+ if (EnGe2_CheckAllCarpentersRescued()) {
this->actor.update = EnGe2_UpdateFriendly;
this->actor.attentionRangeType = ATTENTION_RANGE_6;
this->actor.colorFilterTimer = 0;
diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.h b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.h
index 7c78ad91a6..b453531040 100644
--- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.h
+++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.h
@@ -2,11 +2,11 @@
#define Z_EN_GE2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGe2;
-typedef void (*EnGe2ActionFunc)(struct EnGe2*, PlayState*);
+typedef void (*EnGe2ActionFunc)(struct EnGe2*, struct PlayState*);
typedef struct EnGe2 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
index df1619bf3c..5e0783bc30 100644
--- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
+++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
@@ -5,10 +5,21 @@
*/
#include "z_en_ge3.h"
-#include "assets/objects/object_geldb/object_geldb.h"
-#include "versions.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64item.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_geldb/object_geldb.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnGe3_Init(Actor* thisx, PlayState* play2);
void EnGe3_Destroy(Actor* thisx, PlayState* play);
@@ -128,7 +139,7 @@ void EnGe3_Wait(EnGe3* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
this->actionFunc = EnGe3_WaitLookAtPlayer;
this->actor.update = EnGe3_UpdateWhenNotTalking;
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
EnGe3_TurnToFacePlayer(this, play);
}
@@ -149,7 +160,7 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, PlayState* play) {
void EnGe3_GiveCard(EnGe3* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actionFunc = EnGe3_WaitTillCardGiven;
Actor_OfferGetItem(&this->actor, play, GI_GERUDOS_CARD, 10000.0f, 50.0f);
}
@@ -164,7 +175,7 @@ void EnGe3_ForceTalk(EnGe3* this, PlayState* play) {
this->unk_30C |= 4;
}
this->actor.textId = 0x6004;
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferTalkExchange(&this->actor, play, 300.0f, 300.0f, EXCH_ITEM_NONE);
}
EnGe3_LookAtPlayer(this, play);
diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.h b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.h
index 4bb5c7b3fc..d767ba6d9a 100644
--- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.h
+++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.h
@@ -2,12 +2,12 @@
#define Z_EN_GE3_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "overlays/actors/ovl_En_GeldB/z_en_geldb.h"
struct EnGe3;
-typedef void (*EnGe3ActionFunc)(struct EnGe3*, PlayState*);
+typedef void (*EnGe3ActionFunc)(struct EnGe3*, struct PlayState*);
typedef struct EnGe3 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
index 8d09f45342..a0fea77783 100644
--- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
+++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
@@ -5,9 +5,27 @@
*/
#include "z_en_geldb.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_geldb/object_geldb.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
typedef enum EnGeldBAction {
/* 0 */ GELDB_WAIT,
@@ -81,7 +99,7 @@ ActorProfile En_GeldB_Profile = {
/**/ EnGeldB_Draw,
};
-static ColliderCylinderInit sBodyCylInit = {
+static ColliderCylinderInit sBodyCylinderInit = {
{
COL_MATERIAL_HIT5,
AT_NONE,
@@ -235,7 +253,7 @@ void EnGeldB_Init(Actor* thisx, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoRedSkel, &gGerudoRedNeutralAnim, this->jointTable,
this->morphTable, GELDB_LIMB_MAX);
Collider_InitCylinder(play, &this->bodyCollider);
- Collider_SetCylinder(play, &this->bodyCollider, thisx, &sBodyCylInit);
+ Collider_SetCylinder(play, &this->bodyCollider, thisx, &sBodyCylinderInit);
Collider_InitTris(play, &this->blockCollider);
Collider_SetTris(play, &this->blockCollider, thisx, &sBlockTrisInit, this->blockElements);
Collider_InitQuad(play, &this->swordCollider);
@@ -923,7 +941,7 @@ void EnGeldB_SpinAttack(EnGeldB* this, PlayState* play) {
} else if (this->swordCollider.base.atFlags & AT_HIT) {
this->swordCollider.base.atFlags &= ~AT_HIT;
if (&player->actor == this->swordCollider.base.at) {
- func_8002F71C(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
this->spinAttackState = 2;
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_24);
Message_StartTextbox(play, 0x6003, &this->actor);
diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.h b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.h
index 8ca9f1ac6a..e1a7ff3ea0 100644
--- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.h
+++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.h
@@ -2,7 +2,7 @@
#define Z_EN_GELDB_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGeldB;
@@ -34,7 +34,7 @@ typedef enum EnGeldBLimb {
/* 0x18 */ GELDB_LIMB_MAX
} EnGeldBLimb;
-typedef void (*EnGeldBActionFunc)(struct EnGeldB*, PlayState*);
+typedef void (*EnGeldBActionFunc)(struct EnGeldB*, struct PlayState*);
typedef struct EnGeldB {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c
index c02438a6e9..aebb758cd7 100644
--- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c
+++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c
@@ -5,9 +5,17 @@
*/
#include "z_en_girla.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#include "printf.h"
+#include "rand.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64draw.h"
+#include "z64play.h"
+#include "z64save.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnGirlA_Init(Actor* thisx, PlayState* play);
void EnGirlA_Destroy(Actor* thisx, PlayState* play);
@@ -79,7 +87,7 @@ ActorProfile En_GirlA_Profile = {
/**/ NULL,
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static char* sShopItemDescriptions[] = {
"デクの実×5 ", // "Deku nut x5"
"矢×30 ", // "Arrow x30"
@@ -382,9 +390,9 @@ void EnGirlA_InitItem(EnGirlA* this, PlayState* play) {
if ((params >= SI_MAX) && (params < 0)) {
Actor_Kill(&this->actor);
- PRINTF(VT_COL(RED, WHITE));
+ PRINTF_COLOR_ERROR();
PRINTF("引数がおかしいよ(arg_data=%d)!!\n", this->actor.params);
- PRINTF(VT_RST);
+ PRINTF_RST();
ASSERT(0, "0", "../z_en_girlA.c", 1421);
return;
}
@@ -393,9 +401,9 @@ void EnGirlA_InitItem(EnGirlA* this, PlayState* play) {
if (this->requiredObjectSlot < 0) {
Actor_Kill(&this->actor);
- PRINTF(VT_COL(RED, WHITE));
+ PRINTF_COLOR_ERROR();
PRINTF("バンクが無いよ!!(%s)\n", sShopItemDescriptions[params]);
- PRINTF(VT_RST);
+ PRINTF_RST();
ASSERT(0, "0", "../z_en_girlA.c", 1434);
return;
}
@@ -982,7 +990,7 @@ void EnGirlA_WaitForObject(EnGirlA* this, PlayState* play) {
ShopItemEntry* itemEntry = &sShopItemEntries[params];
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.objectSlot = this->requiredObjectSlot;
switch (this->actor.params) {
case SI_KEATON_MASK:
diff --git a/src/overlays/actors/ovl_En_GirlA/z_en_girla.h b/src/overlays/actors/ovl_En_GirlA/z_en_girla.h
index 971d0109c4..504837044e 100644
--- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.h
+++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.h
@@ -2,14 +2,14 @@
#define Z_EN_GIRLA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGirlA;
-typedef void (*EnGirlAActionFunc)(struct EnGirlA*, PlayState*);
-typedef void (*EnGirlA2Func)(PlayState*, struct EnGirlA*);
-typedef void (*EnGirlA3Func)(Actor*, PlayState*, s32);
-typedef s32 (*EnGirlA4Func)(PlayState*, struct EnGirlA*);
+typedef void (*EnGirlAActionFunc)(struct EnGirlA*, struct PlayState*);
+typedef void (*EnGirlA2Func)(struct PlayState*, struct EnGirlA*);
+typedef void (*EnGirlA3Func)(Actor*, struct PlayState*, s32);
+typedef s32 (*EnGirlA4Func)(struct PlayState*, struct EnGirlA*);
typedef struct EnGirlA {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c
index f26c6db2ec..0c904a8808 100644
--- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c
+++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c
@@ -5,11 +5,25 @@
*/
#include "z_en_gm.h"
+
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_oF1d_map/object_oF1d_map.h"
#include "assets/objects/object_gm/object_gm.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnGm_Init(Actor* thisx, PlayState* play);
void EnGm_Destroy(Actor* thisx, PlayState* play);
@@ -67,16 +81,15 @@ void EnGm_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
- // "Medi Goron"
- PRINTF(VT_FGCOL(GREEN) "%s[%d] : 中ゴロン[%d]" VT_RST "\n", "../z_en_gm.c", 133, this->actor.params);
+ PRINTF(VT_FGCOL(GREEN) T("%s[%d] : 中ゴロン[%d]", "%s[%d] : Medi Goron [%d]") VT_RST "\n", "../z_en_gm.c", 133,
+ this->actor.params);
this->gmObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_GM);
if (this->gmObjectSlot < 0) {
- PRINTF(VT_COL(RED, WHITE));
- // "There is no model bank! !! (Medi Goron)"
- PRINTF("モデル バンクが無いよ!!(中ゴロン)\n");
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("モデル バンクが無いよ!!(中ゴロン)\n", "There is no model bank!! (Medi Goron)\n"));
+ PRINTF_RST();
ASSERT(0, "0", "../z_en_gm.c", 145);
}
@@ -103,9 +116,9 @@ s32 func_80A3D7C8(void) {
void func_80A3D838(EnGm* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->gmObjectSlot)) {
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, 18);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->gmObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->gmObjectSlot].segment);
Animation_Change(&this->skelAnime, &object_gm_Anim_0002B8, 1.0f, 0.0f,
Animation_GetLastFrame(&object_gm_Anim_0002B8), ANIMMODE_LOOP, 0.0f);
this->actor.draw = EnGm_Draw;
@@ -274,7 +287,7 @@ void func_80A3DF60(EnGm* this, PlayState* play) {
}
void func_80A3DFBC(EnGm* this, PlayState* play) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->gmObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->gmObjectSlot].segment);
this->timer++;
this->actionFunc(this, play);
this->actor.focus.rot.x = this->actor.world.rot.x;
diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.h b/src/overlays/actors/ovl_En_Gm/z_en_gm.h
index 3cfedca015..d5234bde14 100644
--- a/src/overlays/actors/ovl_En_Gm/z_en_gm.h
+++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.h
@@ -2,12 +2,12 @@
#define Z_EN_GM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGm;
-typedef void (*EnGmUpdateFunc)(struct EnGm*, PlayState*);
-typedef void (*EnGmActionFunc)(struct EnGm*, PlayState*);
+typedef void (*EnGmUpdateFunc)(struct EnGm*, struct PlayState*);
+typedef void (*EnGmActionFunc)(struct EnGm*, struct PlayState*);
typedef struct EnGm {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c
index 781bed2255..4f7f47630f 100644
--- a/src/overlays/actors/ovl_En_Go/z_en_go.c
+++ b/src/overlays/actors/ovl_En_Go/z_en_go.c
@@ -1,9 +1,26 @@
#include "z_en_go.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_oF1d_map/object_oF1d_map.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnGo_Init(Actor* thisx, PlayState* play);
void EnGo_Destroy(Actor* thisx, PlayState* play);
@@ -597,7 +614,7 @@ void func_80A3F908(EnGo* this, PlayState* play) {
if ((PARAMS_GET_NOSHIFT(this->actor.params, 4, 4) == 0x90) && (dialogStarted == true)) {
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_BROKEN_GORONS_SWORD) {
- if (func_8002F368(play) == EXCH_ITEM_BROKEN_GORONS_SWORD) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_BROKEN_GORONS_SWORD) {
if (GET_INFTABLE(INFTABLE_B4)) {
this->actor.textId = 0x3055;
} else {
@@ -610,7 +627,7 @@ void func_80A3F908(EnGo* this, PlayState* play) {
}
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYE_DROPS) {
- if (func_8002F368(play) == EXCH_ITEM_EYE_DROPS) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_EYE_DROPS) {
this->actor.textId = 0x3059;
} else {
this->actor.textId = 0x3058;
@@ -639,8 +656,8 @@ void EnGo_Init(Actor* thisx, PlayState* play) {
}
if (PARAMS_GET_NOSHIFT(this->actor.params, 4, 4) && (PARAMS_GET_NOSHIFT(this->actor.params, 4, 4) != 0x90)) {
- this->actor.flags &= ~ACTOR_FLAG_4;
- this->actor.flags &= ~ACTOR_FLAG_5;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
+ this->actor.flags &= ~ACTOR_FLAG_DRAW_CULLING_DISABLED;
}
EnGo_ChangeAnim(this, ENGO_ANIM_0);
@@ -714,7 +731,7 @@ void EnGo_StopRolling(EnGo* this, PlayState* play) {
if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) {
this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER;
play->damagePlayer(play, -4);
- func_8002F71C(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
this->unk_20E = 0x10;
}
}
@@ -1033,7 +1050,7 @@ void EnGo_Update(Actor* thisx, PlayState* play) {
if (this->actionFunc == EnGo_BiggoronActionFunc || this->actionFunc == EnGo_FireGenericActionFunc ||
this->actionFunc == func_80A40B1C) {
- func_80034F54(play, this->jointTable, this->morphTable, 18);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 18);
}
EnGo_UpdateShadow(this);
@@ -1103,8 +1120,8 @@ s32 EnGo_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Ve
}
if ((limb == 10) || (limb == 11) || (limb == 14)) {
- rot->y += Math_SinS(this->jointTable[limb]) * 200.0f;
- rot->z += Math_CosS(this->morphTable[limb]) * 200.0f;
+ rot->y += Math_SinS(this->fidgetTableY[limb]) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(this->fidgetTableZ[limb]) * FIDGET_AMPLITUDE;
}
return 0;
diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.h b/src/overlays/actors/ovl_En_Go/z_en_go.h
index b769cff78f..691472aef6 100644
--- a/src/overlays/actors/ovl_En_Go/z_en_go.h
+++ b/src/overlays/actors/ovl_En_Go/z_en_go.h
@@ -2,13 +2,13 @@
#define Z_EN_GO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGo;
-typedef void (*EnGoActionFunc)(struct EnGo*, PlayState*);
-typedef u16 (*callback1_80A3ED24)(PlayState*, struct EnGo*);
-typedef s16 (*callback2_80A3ED24)(PlayState*, struct EnGo*);
+typedef void (*EnGoActionFunc)(struct EnGo*, struct PlayState*);
+typedef u16 (*callback1_80A3ED24)(struct PlayState*, struct EnGo*);
+typedef s16 (*callback2_80A3ED24)(struct PlayState*, struct EnGo*);
// WIP type docs
// /* 0x00 */ GORON1_CITY_LINK,
@@ -22,7 +22,6 @@ typedef s16 (*callback2_80A3ED24)(PlayState*, struct EnGo*);
// /* 0x80 */ // Not Used
// /* 0x90 */ GORON1_DMT_BIGGORON,
-
#define EN_GO_EFFECT_COUNT 20
typedef struct EnGoEffect {
@@ -55,8 +54,8 @@ typedef struct EnGo {
/* 0x021A */ s16 unk_21A;
/* 0x021C */ s16 unk_21C;
/* 0x021E */ s16 unk_21E;
- /* 0x0220 */ s16 jointTable[18];
- /* 0x0244 */ s16 morphTable[18];
+ /* 0x0220 */ s16 fidgetTableY[18];
+ /* 0x0244 */ s16 fidgetTableZ[18];
/* 0x0268 */ EnGoEffect effects[EN_GO_EFFECT_COUNT];
} EnGo; // size = 0x06C8
diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c
index 579b193264..61c3d5f6e1 100644
--- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c
+++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c
@@ -1,11 +1,31 @@
#include "z_en_go2.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "quake.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_oF1d_map/object_oF1d_map.h"
-#include "quake.h"
-#include "versions.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
/*
FLAGS
@@ -572,7 +592,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
u8 dialogState = this->dialogState;
switch (EnGo2_GetDialogState(this, play)) {
+#if OOT_VERSION < PAL_1_0
+ case TEXT_STATE_CLOSING:
+#else
case TEXT_STATE_DONE:
+#endif
if (this->actor.textId == 0x305E) {
if (!gSaveContext.save.info.playerData.bgsFlag) {
EnGo2_GetItem(this, play, GI_SWORD_BIGGORON);
@@ -587,7 +611,7 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
case TEXT_STATE_DONE_FADING:
switch (this->actor.textId) {
case 0x305E:
- if (func_8002F368(play) != EXCH_ITEM_CLAIM_CHECK) {
+ if (Actor_GetPlayerExchangeItemId(play) != EXCH_ITEM_CLAIM_CHECK) {
break;
}
FALLTHROUGH;
@@ -884,7 +908,7 @@ s32 func_80A44AB0(EnGo2* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- this->actor.flags &= ~ACTOR_FLAG_24;
+ this->actor.flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
this->collider.base.acFlags &= ~AC_HIT;
EnGo2_StopRolling(this, play);
return true;
@@ -900,7 +924,7 @@ s32 func_80A44AB0(EnGo2* this, PlayState* play) {
arg2 = this->actionFunc == EnGo2_ContinueRolling ? 1.5f : this->actor.speed * 1.5f;
play->damagePlayer(play, -4);
- func_8002F71C(play, &this->actor, arg2, this->actor.yawTowardsPlayer, 6.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, arg2, this->actor.yawTowardsPlayer, 6.0f);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
this->collider.base.ocFlags1 &= ~OC1_TYPE_PLAYER;
}
@@ -1021,7 +1045,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
if (PARAMS_GET_S(this->actor.params, 0, 5) == GORON_DMT_BIGGORON) {
if (gSaveContext.save.info.playerData.bgsFlag) {
- if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_CLAIM_CHECK) {
this->actor.textId = 0x3003;
} else {
this->actor.textId = 0x305E;
@@ -1029,7 +1053,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
player->actor.textId = this->actor.textId;
} else if (!gSaveContext.save.info.playerData.bgsFlag && (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK)) {
- if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_CLAIM_CHECK) {
if (Environment_GetBgsDayCount() >= 3) {
textId = 0x305E;
} else {
@@ -1048,7 +1072,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
} else if ((INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_PRESCRIPTION) &&
(INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_CLAIM_CHECK)) {
- if (func_8002F368(play) == EXCH_ITEM_EYE_DROPS) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_EYE_DROPS) {
this->actor.textId = 0x3059;
} else {
this->actor.textId = 0x3058;
@@ -1059,7 +1083,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
player->actor.textId = this->actor.textId;
} else if (INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_BROKEN_GORONS_SWORD) {
- if (func_8002F368(play) == EXCH_ITEM_BROKEN_GORONS_SWORD) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_BROKEN_GORONS_SWORD) {
if (GET_INFTABLE(INFTABLE_B4)) {
textId = 0x3055;
} else {
@@ -1345,7 +1369,7 @@ void EnGo2_SetupRolling(EnGo2* this, PlayState* play) {
} else {
this->actor.speed = 6.0f;
}
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
this->animTimer = 10;
this->actor.shape.yOffset = 1800.0f;
this->actor.speed *= 2.0f; // Speeding up
@@ -1532,8 +1556,8 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
case GORON_CITY_LOST_WOODS:
case GORON_DMT_FAIRY_HINT:
case GORON_MARKET_BAZAAR:
- this->actor.flags &= ~ACTOR_FLAG_4;
- this->actor.flags &= ~ACTOR_FLAG_5;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
+ this->actor.flags &= ~ACTOR_FLAG_DRAW_CULLING_DISABLED;
}
EnGo2_SetColliderDim(this);
@@ -1790,7 +1814,9 @@ void EnGo2_ReverseRolling(EnGo2* this, PlayState* play) {
void EnGo2_SetupGetItem(EnGo2* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
+#if OOT_VERSION >= PAL_1_0
this->actor.parent = NULL;
+#endif
this->actionFunc = EnGo2_SetGetItem;
} else {
Actor_OfferGetItem(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer + 1.0f,
@@ -1980,12 +2006,16 @@ void EnGo2_Update(Actor* thisx, PlayState* play) {
EnGo2_RollForward(this);
Actor_UpdateBgCheckInfo(play, &this->actor, this->collider.dim.height * 0.5f, this->collider.dim.radius * 0.6f,
0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
+#if OOT_VERSION < PAL_1_0
+ func_80A44AB0(this, play);
+#else
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
func_80A44AB0(this, play);
}
+#endif
this->actionFunc(this, play);
if (this->unk_211 == true) {
- func_80034F54(play, this->unk_226, this->unk_24A, 18);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 18);
}
func_80A45288(this, play);
EnGo2_EyeMouthTexState(this);
@@ -2038,8 +2068,8 @@ s32 EnGo2_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, V
Matrix_RotateX(BINANG_TO_RAD_ALT(limbRot.x), MTXMODE_APPLY);
}
if ((limb == 10) || (limb == 11) || (limb == 14)) {
- rot->y += Math_SinS(this->unk_226[limb]) * 200.0f;
- rot->z += Math_CosS(this->unk_24A[limb]) * 200.0f;
+ rot->y += Math_SinS(this->fidgetTableY[limb]) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(this->fidgetTableZ[limb]) * FIDGET_AMPLITUDE;
}
return 0;
}
diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.h b/src/overlays/actors/ovl_En_Go2/z_en_go2.h
index 9651f6bfeb..0c49a30363 100644
--- a/src/overlays/actors/ovl_En_Go2/z_en_go2.h
+++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.h
@@ -2,12 +2,12 @@
#define Z_EN_GO2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "overlays/actors/ovl_En_Go/z_en_go.h"
struct EnGo2;
-typedef void (*EnGo2ActionFunc)(struct EnGo2*, PlayState*);
+typedef void (*EnGo2ActionFunc)(struct EnGo2*, struct PlayState*);
typedef enum GoronType {
/* 0x00 */ GORON_CITY_ROLLING_BIG,
@@ -73,7 +73,7 @@ typedef struct EnGo2 {
/* 0x0190 */ EnGo2ActionFunc actionFunc;
/* 0x0194 */ NpcInteractInfo interactInfo;
/* 0x01BC */ ColliderCylinder collider;
- /* 0x0208 */ Path* path;
+ /* 0x0208 */ struct Path* path;
/* 0x020C */ u8 unk_20C; // counter for GORON_CITY_LINK animation
/* 0x020D */ u8 dialogState;
/* 0x020E */ u8 reverse;
@@ -92,8 +92,8 @@ typedef struct EnGo2 {
/* 0x021C */ char unk_21C[0x04];
/* 0x0220 */ f32 alpha; // Set to 0, used by func_80A45360, smoothed to this->actor.shape.shadowAlpha from either 0 or 255.0f
/* 0x0224 */ s16 blinkTimer;
- /* 0x0226 */ s16 unk_226[18]; // Remains unknown
- /* 0x024A */ s16 unk_24A[18]; // Remains unknown
+ /* 0x0226 */ s16 fidgetTableY[18];
+ /* 0x024A */ s16 fidgetTableZ[18];
/* 0x026E */ u16 trackingMode;
/* 0x0270 */ EnGoEffect effects[EN_GO2_EFFECT_COUNT];
/* 0x04A0 */ Vec3f subCamEye;
diff --git a/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/src/overlays/actors/ovl_En_Goma/z_en_goma.c
index ceb7b3649d..82175795bd 100644
--- a/src/overlays/actors/ovl_En_Goma/z_en_goma.c
+++ b/src/overlays/actors/ovl_En_Goma/z_en_goma.c
@@ -1,10 +1,33 @@
+/*
+ * File: z_en_goma.c
+ * Overlay: ovl_En_Goma
+ * Description: Gohma Larva
+ */
+
#include "z_en_goma.h"
-#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
-#include "assets/objects/object_gol/object_gol.h"
#include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
+#include "assets/objects/object_gol/object_gol.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnGoma_Init(Actor* thisx, PlayState* play);
void EnGoma_Destroy(Actor* thisx, PlayState* play);
@@ -162,10 +185,10 @@ void EnGoma_Init(Actor* thisx, PlayState* play) {
this->eggScale = 1.0f;
this->eggSquishAngle = Rand_ZeroOne() * 1000.0f;
this->actionTimer = 50;
- Collider_InitCylinder(play, &this->colCyl1);
- Collider_SetCylinder(play, &this->colCyl1, &this->actor, &D_80A4B7A0);
- Collider_InitCylinder(play, &this->colCyl2);
- Collider_SetCylinder(play, &this->colCyl2, &this->actor, &D_80A4B7CC);
+ Collider_InitCylinder(play, &this->colliderCylinder1);
+ Collider_SetCylinder(play, &this->colliderCylinder1, &this->actor, &D_80A4B7A0);
+ Collider_InitCylinder(play, &this->colliderCylinder2);
+ Collider_SetCylinder(play, &this->colliderCylinder2, &this->actor, &D_80A4B7CC);
}
}
@@ -173,8 +196,8 @@ void EnGoma_Destroy(Actor* thisx, PlayState* play) {
EnGoma* this = (EnGoma*)thisx;
if (this->actor.params < 10) {
- Collider_DestroyCylinder(play, &this->colCyl1);
- Collider_DestroyCylinder(play, &this->colCyl2);
+ Collider_DestroyCylinder(play, &this->colliderCylinder1);
+ Collider_DestroyCylinder(play, &this->colliderCylinder2);
}
}
@@ -498,7 +521,7 @@ void EnGoma_SetupJump(EnGoma* this) {
}
void EnGoma_Jump(EnGoma* this, PlayState* play) {
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
SkelAnime_Update(&this->skelanime);
Math_ApproachF(&this->actor.speed, 10.0f, 0.5f, 5.0f);
@@ -612,15 +635,15 @@ void EnGoma_UpdateHit(EnGoma* this, PlayState* play) {
ColliderElement* acHitElem;
u8 swordDamage;
- if ((this->colCyl1.base.atFlags & AT_HIT) && this->actionFunc == EnGoma_Jump) {
+ if ((this->colliderCylinder1.base.atFlags & AT_HIT) && this->actionFunc == EnGoma_Jump) {
EnGoma_SetupLand(this);
this->actor.speed = 0.0f;
this->actor.velocity.y = 0.0f;
}
- if ((this->colCyl2.base.acFlags & AC_HIT) && (s8)this->actor.colChkInfo.health > 0) {
- acHitElem = this->colCyl2.elem.acHitElem;
- this->colCyl2.base.acFlags &= ~AC_HIT;
+ if ((this->colliderCylinder2.base.acFlags & AC_HIT) && (s8)this->actor.colChkInfo.health > 0) {
+ acHitElem = this->colliderCylinder2.elem.acHitElem;
+ this->colliderCylinder2.base.acFlags &= ~AC_HIT;
if (this->gomaType == ENGOMA_NORMAL) {
u32 dmgFlags = acHitElem->atDmgInfo.dmgFlags;
@@ -730,20 +753,20 @@ void EnGoma_Update(Actor* thisx, PlayState* play) {
EnGoma_UpdateEyeEnvColor(this);
this->visualState = 1;
if (player->meleeWeaponState != 0) {
- this->colCyl2.dim.radius = 35;
- this->colCyl2.dim.height = 35;
- this->colCyl2.dim.yShift = 0;
+ this->colliderCylinder2.dim.radius = 35;
+ this->colliderCylinder2.dim.height = 35;
+ this->colliderCylinder2.dim.yShift = 0;
} else {
- this->colCyl2.dim.radius = 15;
- this->colCyl2.dim.height = 30;
- this->colCyl2.dim.yShift = 10;
+ this->colliderCylinder2.dim.radius = 15;
+ this->colliderCylinder2.dim.height = 30;
+ this->colliderCylinder2.dim.yShift = 10;
}
if (this->invincibilityTimer == 0) {
- Collider_UpdateCylinder(&this->actor, &this->colCyl1);
- Collider_UpdateCylinder(&this->actor, &this->colCyl2);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colCyl1.base);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCyl2.base);
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colCyl1.base);
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinder1);
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinder2);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder1.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder2.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinder1.base);
}
}
}
diff --git a/src/overlays/actors/ovl_En_Goma/z_en_goma.h b/src/overlays/actors/ovl_En_Goma/z_en_goma.h
index a0a97f20fb..6b2f7cf309 100644
--- a/src/overlays/actors/ovl_En_Goma/z_en_goma.h
+++ b/src/overlays/actors/ovl_En_Goma/z_en_goma.h
@@ -2,7 +2,7 @@
#define Z_EN_GOMA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum GomaType {
/* 0 */ ENGOMA_NORMAL,
@@ -13,7 +13,7 @@ typedef enum GomaType {
struct EnGoma;
-typedef void (*EnGomaActionFunc)(struct EnGoma*, PlayState*);
+typedef void (*EnGomaActionFunc)(struct EnGoma*, struct PlayState*);
typedef enum EnGomaLimb {
/* 0 */ GOMA_LIMB_NONE,
@@ -73,8 +73,8 @@ typedef struct EnGoma {
/* 0x2F8 */ s16 stunTimer;
/* 0x2FC */ Vec3f shieldKnockbackVel;
/* 0x308 */ Gfx* bossLimbDL; // set by z_boss_goma
- /* 0x30C */ ColliderCylinder colCyl1;
- /* 0x358 */ ColliderCylinder colCyl2;
+ /* 0x30C */ ColliderCylinder colliderCylinder1;
+ /* 0x358 */ ColliderCylinder colliderCylinder2;
} EnGoma; // size = 0x03A4
#endif
diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c
index 650c346bfe..dfd8130d8d 100644
--- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c
+++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c
@@ -6,12 +6,27 @@
#include "z_en_goroiwa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "printf.h"
+#include "quake.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_goroiwa/object_goroiwa.h"
-#include "quake.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef s32 (*EnGoroiwaUnkFunc1)(EnGoroiwa* this, PlayState* play);
typedef void (*EnGoroiwaUnkFunc2)(EnGoroiwa* this);
@@ -86,7 +101,7 @@ static CollisionCheckInfoInit sColChkInfoInit = { 0, 12, 60, MASS_HEAVY };
static f32 sSpeeds[] = { 10.0f, 9.2f };
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define EN_GOROIWA_SPEED(this) (R_EN_GOROIWA_SPEED * 0.01f)
#else
#define EN_GOROIWA_SPEED(this) sSpeeds[(this)->isInKokiri]
@@ -105,7 +120,7 @@ void EnGoroiwa_InitCollider(EnGoroiwa* this, PlayState* play) {
s32 pad;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
EnGoroiwa_UpdateCollider(this);
this->collider.elements[0].dim.worldSphere.radius = 58;
}
@@ -135,12 +150,12 @@ s32 EnGoroiwa_Vec3fNormalize(Vec3f* ret, Vec3f* a) {
void EnGoroiwa_SetSpeed(EnGoroiwa* this, PlayState* play) {
if (play->sceneId == SCENE_KOKIRI_FOREST) {
this->isInKokiri = true;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
R_EN_GOROIWA_SPEED = 920;
#endif
} else {
this->isInKokiri = false;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
R_EN_GOROIWA_SPEED = 1000;
#endif
}
@@ -252,10 +267,9 @@ s32 EnGoroiwa_GetAscendDirection(EnGoroiwa* this, PlayState* play) {
Vec3s* currentPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->currentWaypoint;
if (nextPointPos->x == currentPointPos->x && nextPointPos->z == currentPointPos->z) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (nextPointPos->y == currentPointPos->y) {
- // "Error: Invalid path data (points overlap)"
- PRINTF("Error : レールデータ不正(点が重なっている)");
+ PRINTF(T("Error : レールデータ不正(点が重なっている)", "Error : Rail data is incorrect (dots overlap)"));
PRINTF("(%s %d)(arg_data 0x%04x)\n", "../z_en_gr.c", 559, this->actor.params);
}
#endif
@@ -536,9 +550,9 @@ void EnGoroiwa_SpawnFragments(EnGoroiwa* this, PlayState* play) {
}
static InitChainEntry sInitChain[] = {
- ICHAIN_F32_DIV1000(gravity, -860, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(minVelocityY, -15000, ICHAIN_CONTINUE),
- ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneForward, 1500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 150, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_STOP),
+ ICHAIN_F32_DIV1000(gravity, -860, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(minVelocityY, -15000, ICHAIN_CONTINUE),
+ ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), ICHAIN_F32(cullingVolumeDistance, 1500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 150, ICHAIN_CONTINUE), ICHAIN_F32(cullingVolumeDownward, 1500, ICHAIN_STOP),
};
void EnGoroiwa_Init(Actor* thisx, PlayState* play) {
@@ -550,14 +564,15 @@ void EnGoroiwa_Init(Actor* thisx, PlayState* play) {
EnGoroiwa_InitCollider(this, play);
pathIdx = PARAMS_GET_U(this->actor.params, 0, 8);
if (pathIdx == 0xFF) {
- // "Error: Invalid arg_data"
- PRINTF("Error : arg_data が不正(%s %d)(arg_data 0x%04x)\n", "../z_en_gr.c", 1033, this->actor.params);
+ PRINTF(T("Error : arg_data が不正(%s %d)(arg_data 0x%04x)\n",
+ "Error : Invalid arg_data (%s %d)(arg_data 0x%04x)\n"),
+ "../z_en_gr.c", 1033, this->actor.params);
Actor_Kill(&this->actor);
return;
}
if (play->pathList[pathIdx].count < 2) {
- // "Error: Invalid Path Data"
- PRINTF("Error : レールデータ が不正(%s %d)\n", "../z_en_gr.c", 1043);
+ PRINTF(T("Error : レールデータ が不正(%s %d)\n", "Error : Rail data is invalid (%s %d)\n"), "../z_en_gr.c",
+ 1043);
Actor_Kill(&this->actor);
return;
}
@@ -571,9 +586,9 @@ void EnGoroiwa_Init(Actor* thisx, PlayState* play) {
EnGoroiwa_InitRotation(this);
EnGoroiwa_FaceNextWaypoint(this, play);
EnGoroiwa_SetupRoll(this);
- // "(Goroiwa)"
- PRINTF("(ごろ岩)(arg 0x%04x)(rail %d)(end %d)(bgc %d)(hit %d)\n", this->actor.params,
- PARAMS_GET_U(this->actor.params, 0, 8), PARAMS_GET_U(this->actor.params, 8, 2),
+ PRINTF(T("(ごろ岩)(arg 0x%04x)(rail %d)(end %d)(bgc %d)(hit %d)\n",
+ "(Goroiwa)(arg 0x%04x)(rail %d)(end %d)(bgc %d)(hit %d)\n"),
+ this->actor.params, PARAMS_GET_U(this->actor.params, 0, 8), PARAMS_GET_U(this->actor.params, 8, 2),
PARAMS_GET_U(this->actor.params, 10, 1), this->actor.home.rot.z & 1);
}
@@ -609,10 +624,10 @@ void EnGoroiwa_Roll(EnGoroiwa* this, PlayState* play) {
EnGoroiwa_FaceNextWaypoint(this, play);
}
}
- func_8002F6D4(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 0);
- PRINTF(VT_FGCOL(CYAN));
- PRINTF("Player ぶっ飛ばし\n"); // "Player knocked down"
- PRINTF(VT_RST);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 0);
+ PRINTF_COLOR_CYAN();
+ PRINTF(T("Player ぶっ飛ばし\n", "Player knocked down\n"));
+ PRINTF_RST();
onHitSetupFuncs[PARAMS_GET_U(this->actor.params, 10, 1)](this);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
if ((this->actor.home.rot.z & 1) == 1) {
@@ -695,7 +710,7 @@ void EnGoroiwa_SetupMoveUp(EnGoroiwa* this) {
void EnGoroiwa_MoveUp(EnGoroiwa* this, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
- func_8002F6D4(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 4);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 4);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
if ((this->actor.home.rot.z & 1) == 1) {
this->collisionDisabledTimer = 50;
@@ -720,7 +735,7 @@ void EnGoroiwa_SetupMoveDown(EnGoroiwa* this) {
void EnGoroiwa_MoveDown(EnGoroiwa* this, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
- func_8002F6D4(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 4);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 4);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
if ((this->actor.home.rot.z & 1) == 1) {
this->collisionDisabledTimer = 50;
@@ -739,7 +754,7 @@ void EnGoroiwa_Update(Actor* thisx, PlayState* play) {
s32 pad;
s32 bgId;
- if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
+ if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
if (this->collisionDisabledTimer > 0) {
this->collisionDisabledTimer--;
}
diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h
index 6285432936..26a5810a2d 100644
--- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h
+++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h
@@ -2,17 +2,17 @@
#define Z_EN_GOROIWA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGoroiwa;
-typedef void (*EnGoroiwaActionFunc)(struct EnGoroiwa*, PlayState*);
+typedef void (*EnGoroiwaActionFunc)(struct EnGoroiwa*, struct PlayState*);
typedef struct EnGoroiwa {
/* 0x0000 */ Actor actor;
/* 0x014C */ EnGoroiwaActionFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
- /* 0x0170 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0170 */ ColliderJntSphElement colliderElements[1];
/* 0x01B0 */ Vec3f prevUnitRollAxis;
/* 0x01BC */ f32 prevRollAngleDiff;
/* 0x01C0 */ f32 rollRotSpeed;
diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c
index 41bc282cb9..4e590217f0 100644
--- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c
+++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c
@@ -5,11 +5,25 @@
*/
#include "z_en_gs.h"
-#include "assets/objects/object_gs/object_gs.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_25)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_gs/object_gs.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnGs_Init(Actor* thisx, PlayState* play);
void EnGs_Destroy(Actor* thisx, PlayState* play);
@@ -139,12 +153,12 @@ s32 func_80A4E3EC(EnGs* this, PlayState* play) {
void func_80A4E470(EnGs* this, PlayState* play) {
Player* player = GET_PLAYER(play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
bREG(15) = 0;
#endif
if (this->actor.xzDistToPlayer <= 100.0f) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
bREG(15) = 1;
#endif
@@ -356,8 +370,8 @@ void func_80A4ED34(EnGs* this, PlayState* play) {
Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG);
if (this->unk_200++ >= 40) {
this->unk_19E |= 0x10;
- this->actor.flags |= ACTOR_FLAG_4;
- this->actor.uncullZoneForward = 12000.0f;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
+ this->actor.cullingVolumeDistance = 12000.0f;
this->actor.gravity = 0.3f;
this->unk_19F++;
diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.h b/src/overlays/actors/ovl_En_Gs/z_en_gs.h
index 47edd278db..d7abdc676f 100644
--- a/src/overlays/actors/ovl_En_Gs/z_en_gs.h
+++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.h
@@ -2,11 +2,11 @@
#define Z_EN_GS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGs;
-typedef void (*EnGsActionFunc)(struct EnGs*, PlayState*);
+typedef void (*EnGsActionFunc)(struct EnGs*, struct PlayState*);
typedef struct EnGs {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c
index a5cfc07103..474912abb6 100644
--- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c
+++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c
@@ -5,11 +5,24 @@
*/
#include "z_en_guest.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_os_anime/object_os_anime.h"
#include "assets/objects/object_boj/object_boj.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnGuest_Init(Actor* thisx, PlayState* play);
void EnGuest_Destroy(Actor* thisx, PlayState* play);
@@ -57,10 +70,10 @@ void EnGuest_Init(Actor* thisx, PlayState* play) {
} else {
this->osAnimeObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_OS_ANIME);
if (this->osAnimeObjectSlot < 0) {
- PRINTF(VT_COL(RED, WHITE));
+ PRINTF_COLOR_ERROR();
// "No such bank!!"
PRINTF("%s[%d] : バンクが無いよ!!\n", "../z_en_guest.c", 129);
- PRINTF(VT_RST);
+ PRINTF_RST();
ASSERT(0, "0", "../z_en_guest.c", 132);
}
}
@@ -77,12 +90,11 @@ void EnGuest_Update(Actor* thisx, PlayState* play) {
s32 pad;
if (Object_IsLoaded(&play->objectCtx, this->osAnimeObjectSlot)) {
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
Actor_ProcessInitChain(&this->actor, sInitChain);
- SkelAnime_InitFlex(play, &this->skelAnime, &object_boj_Skel_0000F0, NULL, this->jointTable, this->morphTable,
- 16);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
+ SkelAnime_InitFlex(play, &this->skelAnime, &gHylianMan2Skel, NULL, this->jointTable, this->morphTable, 16);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
Animation_Change(&this->skelAnime, &gObjOsAnim_42AC, 1.0f, 0.0f, Animation_GetLastFrame(&gObjOsAnim_42AC),
ANIMMODE_LOOP, 0.0f);
@@ -158,9 +170,9 @@ void func_80A505CC(Actor* thisx, PlayState* play) {
}
Npc_TrackPoint(&this->actor, &this->interactInfo, 6, NPC_TRACKING_HEAD_AND_TORSO);
- func_80034F54(play, this->unk_2CC, this->unk_2EC, 16);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 16);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
SkelAnime_Update(&this->skelAnime);
Actor_SetFocus(&this->actor, 60.0f);
@@ -186,7 +198,7 @@ s32 EnGuest_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
OPEN_DISPS(play->state.gfxCtx, "../z_en_guest.c", 352);
if (limbIndex == 15) {
- *dList = object_boj_DL_0059B0;
+ *dList = gHylianMan2BeardedHeadDL;
Matrix_Translate(1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
limbRot = this->interactInfo.headRot;
Matrix_RotateX(BINANG_TO_RAD_ALT(limbRot.y), MTXMODE_APPLY);
@@ -201,8 +213,8 @@ s32 EnGuest_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
}
if (limbIndex == 8 || limbIndex == 9 || limbIndex == 12) {
- rot->y += Math_SinS(this->unk_2CC[limbIndex]) * 200.0f;
- rot->z += Math_CosS(this->unk_2EC[limbIndex]) * 200.0f;
+ rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * FIDGET_AMPLITUDE;
}
CLOSE_DISPS(play->state.gfxCtx, "../z_en_guest.c", 388);
@@ -212,9 +224,9 @@ s32 EnGuest_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
void EnGuest_Draw(Actor* thisx, PlayState* play) {
static void* D_80A50BA4[] = {
- object_boj_Tex_0005FC,
- object_boj_Tex_0006FC,
- object_boj_Tex_0007FC,
+ gHylianMan2MustachedEyeOpenTex,
+ gHylianMan2MustachedEyeHalfTex,
+ gHylianMan2MustachedEyeClosedTex,
};
EnGuest* this = (EnGuest*)thisx;
s32 pad;
diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.h b/src/overlays/actors/ovl_En_Guest/z_en_guest.h
index 6633f2741a..92dbc72d5c 100644
--- a/src/overlays/actors/ovl_En_Guest/z_en_guest.h
+++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.h
@@ -2,11 +2,11 @@
#define Z_EN_GUEST_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnGuest;
-typedef void (*EnGuestActionFunc)(struct EnGuest* this, PlayState* play);
+typedef void (*EnGuestActionFunc)(struct EnGuest* this, struct PlayState* play);
typedef struct EnGuest {
/* 0x0000 */ Actor actor;
@@ -18,8 +18,8 @@ typedef struct EnGuest {
/* 0x02A0 */ NpcInteractInfo interactInfo;
/* 0x02C8 */ s16 unk_2C8;
/* 0x02CA */ s16 unk_2CA;
- /* 0x02CC */ s16 unk_2CC[16];
- /* 0x02EC */ s16 unk_2EC[16];
+ /* 0x02CC */ s16 fidgetTableY[16];
+ /* 0x02EC */ s16 fidgetTableZ[16];
/* 0x030C */ s8 osAnimeObjectSlot;
/* 0x030D */ u8 unk_30D;
/* 0x030E */ u8 unk_30E;
diff --git a/src/overlays/actors/ovl_En_Hata/z_en_hata.c b/src/overlays/actors/ovl_En_Hata/z_en_hata.c
index a339b3c3f4..27cd1341ce 100644
--- a/src/overlays/actors/ovl_En_Hata/z_en_hata.c
+++ b/src/overlays/actors/ovl_En_Hata/z_en_hata.c
@@ -5,6 +5,15 @@
*/
#include "z_en_hata.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_hata/object_hata.h"
#define FLAGS 0
@@ -61,9 +70,9 @@ void EnHata_Init(Actor* thisx, PlayState* play) {
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&gFlagpoleCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
- this->dyna.actor.uncullZoneScale = 500.0f;
- this->dyna.actor.uncullZoneDownward = 550.0f;
- this->dyna.actor.uncullZoneForward = 2200.0f;
+ this->dyna.actor.cullingVolumeScale = 500.0f;
+ this->dyna.actor.cullingVolumeDownward = 550.0f;
+ this->dyna.actor.cullingVolumeDistance = 2200.0f;
this->invScale = 6;
this->maxStep = 1000;
this->minStep = 1;
diff --git a/src/overlays/actors/ovl_En_Hata/z_en_hata.h b/src/overlays/actors/ovl_En_Hata/z_en_hata.h
index e098bcaab3..82f6ba1a8b 100644
--- a/src/overlays/actors/ovl_En_Hata/z_en_hata.h
+++ b/src/overlays/actors/ovl_En_Hata/z_en_hata.h
@@ -2,7 +2,7 @@
#define Z_EN_HATA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum EnHataLimb {
diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c
index 7b49afeee3..4236fe05bd 100644
--- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c
+++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c
@@ -5,10 +5,29 @@
*/
#include "z_en_heishi1.h"
-#include "assets/objects/object_sd/object_sd.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/math64.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64debug_display.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_sd/object_sd.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnHeishi1_Init(Actor* thisx, PlayState* play2);
void EnHeishi1_Destroy(Actor* thisx, PlayState* play);
@@ -79,27 +98,32 @@ void EnHeishi1_Init(Actor* thisx, PlayState* play2) {
this->animParams[i] = sAnimParamsInit[this->type][i];
}
- // "type"
- PRINTF(VT_FGCOL(GREEN) " 種類☆☆☆☆☆☆☆☆☆☆☆☆☆ %d\n" VT_RST, this->type);
- // "path data"
+ PRINTF(VT_FGCOL(GREEN) T(" 種類☆☆☆☆☆☆☆☆☆☆☆☆☆ %d\n", " type ☆☆☆☆☆☆☆☆☆☆☆☆☆ %d\n") VT_RST,
+ this->type);
PRINTF(VT_FGCOL(YELLOW) " れえるでぇたぁ☆☆☆☆☆☆☆☆ %d\n" VT_RST, this->path);
PRINTF(VT_FGCOL(MAGENTA) " anime_frame_speed ☆☆☆☆☆☆ %f\n" VT_RST, this->animSpeed);
- // "interpolation frame"
- PRINTF(VT_FGCOL(MAGENTA) " 補間フレーム☆☆☆☆☆☆☆☆☆ %f\n" VT_RST, this->animMorphFrames);
- // "targeted movement speed value between points"
- PRINTF(VT_FGCOL(MAGENTA) " point間の移動スピード目標値 ☆ %f\n" VT_RST, this->moveSpeedTarget);
- // "maximum movement speed value between points"
- PRINTF(VT_FGCOL(MAGENTA) " point間の移動スピード最大 ☆☆ %f\n" VT_RST, this->moveSpeedMax);
- // "(body) targeted turning angle speed value"
- PRINTF(VT_FGCOL(MAGENTA) " (体)反転アングルスピード目標値 %f\n" VT_RST, this->bodyTurnSpeedTarget);
- // "(body) maximum turning angle speed"
- PRINTF(VT_FGCOL(MAGENTA) " (体)反転アングルスピード最大☆ %f\n" VT_RST, this->bodyTurnSpeedMax);
- // "(head) targeted turning angle speed value"
- PRINTF(VT_FGCOL(MAGENTA) " (頭)反転アングルスピード加算値 %f\n" VT_RST, this->headTurnSpeedScale);
- // "(head) maximum turning angle speed"
- PRINTF(VT_FGCOL(MAGENTA) " (頭)反転アングルスピード最大☆ %f\n" VT_RST, this->headTurnSpeedMax);
- PRINTF(VT_FGCOL(GREEN) " 今時間 %d\n" VT_RST, ((void)0, gSaveContext.save.dayTime)); // "current time"
- PRINTF(VT_FGCOL(YELLOW) " チェック時間 %d\n" VT_RST, CLOCK_TIME(17, 30) - 1); // "check time"
+ PRINTF(VT_FGCOL(MAGENTA) T(" 補間フレーム☆☆☆☆☆☆☆☆☆ %f\n", " interpolation frame ☆☆☆☆☆☆☆☆☆ %f\n") VT_RST,
+ this->animMorphFrames);
+ PRINTF(VT_FGCOL(MAGENTA)
+ T(" point間の移動スピード目標値 ☆ %f\n", " target speed of movement between points ☆ %f\n") VT_RST,
+ this->moveSpeedTarget);
+ PRINTF(VT_FGCOL(MAGENTA)
+ T(" point間の移動スピード最大 ☆☆ %f\n", " maximum speed of movement between points ☆☆ %f\n") VT_RST,
+ this->moveSpeedMax);
+ PRINTF(VT_FGCOL(MAGENTA)
+ T(" (体)反転アングルスピード目標値 %f\n", " (body) reversing angle speed target value %f\n") VT_RST,
+ this->bodyTurnSpeedTarget);
+ PRINTF(VT_FGCOL(MAGENTA)
+ T(" (体)反転アングルスピード最大☆ %f\n", " (body) maximum turning angle speed ☆ %f\n") VT_RST,
+ this->bodyTurnSpeedMax);
+ PRINTF(VT_FGCOL(MAGENTA)
+ T(" (頭)反転アングルスピード加算値 %f\n", " (head) reverse angle speed additional value %f\n") VT_RST,
+ this->headTurnSpeedScale);
+ PRINTF(VT_FGCOL(MAGENTA)
+ T(" (頭)反転アングルスピード最大☆ %f\n", " (head) maximum turning angle speed ☆ %f\n") VT_RST,
+ this->headTurnSpeedMax);
+ PRINTF(VT_FGCOL(GREEN) T(" 今時間 %d\n", " Current time %d\n") VT_RST, ((void)0, gSaveContext.save.dayTime));
+ PRINTF(VT_FGCOL(YELLOW) T(" チェック時間 %d\n", " Check time %d\n") VT_RST, CLOCK_TIME(17, 30) - 1);
PRINTF("\n\n");
if (this->path == 3) {
@@ -182,7 +206,7 @@ void EnHeishi1_Walk(EnHeishi1* this, PlayState* play) {
Math_ApproachF(&this->headAngle, this->headAngleTarget, this->headTurnSpeedScale, this->headTurnSpeedMax);
- if (OOT_DEBUG && (this->path == BREG(1)) && (BREG(0) != 0)) {
+ if (DEBUG_FEATURES && (this->path == BREG(1)) && (BREG(0) != 0)) {
PRINTF(VT_FGCOL(RED) " 種類 %d\n" VT_RST, this->path);
PRINTF(VT_FGCOL(RED) " ぱす %d\n" VT_RST, this->waypoint);
PRINTF(VT_FGCOL(RED) " 反転 %d\n" VT_RST, this->bodyTurnSpeed);
@@ -300,7 +324,7 @@ void EnHeishi1_Wait(EnHeishi1* this, PlayState* play) {
Math_ApproachF(&this->headAngle, this->headAngleTarget, this->headTurnSpeedScale,
this->headTurnSpeedMax + this->headTurnSpeedMax);
- if (OOT_DEBUG && (this->path == BREG(1)) && (BREG(0) != 0)) {
+ if (DEBUG_FEATURES && (this->path == BREG(1)) && (BREG(0) != 0)) {
PRINTF(VT_FGCOL(GREEN) " 種類 %d\n" VT_RST, this->path);
PRINTF(VT_FGCOL(GREEN) " ぱす %d\n" VT_RST, this->waypoint);
PRINTF(VT_FGCOL(GREEN) " 反転 %d\n" VT_RST, this->bodyTurnSpeed);
@@ -346,7 +370,7 @@ void EnHeishi1_Kick(EnHeishi1* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
if (!this->loadStarted) {
- SET_EVENTCHKINF(EVENTCHKINF_4E);
+ SET_EVENTCHKINF(EVENTCHKINF_CAUGHT_BY_CASTLE_GUARDS);
play->nextEntranceIndex = ENTR_HYRULE_CASTLE_3;
play->transitionTrigger = TRANS_TRIGGER_START;
this->loadStarted = true;
@@ -371,7 +395,7 @@ void EnHeishi1_WaitNight(EnHeishi1* this, PlayState* play) {
if (this->actor.xzDistToPlayer < 100.0f) {
Message_StartTextbox(play, 0x702D, &this->actor);
Sfx_PlaySfxCentered(NA_SE_SY_FOUND);
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!"
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発見! ☆☆☆☆☆ \n", "☆☆☆☆☆ Discovered! ☆☆☆☆☆ \n") VT_RST);
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
this->actionFunc = EnHeishi1_SetupKick;
}
@@ -404,9 +428,9 @@ void EnHeishi1_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
- this->actor.uncullZoneForward = 550.0f;
- this->actor.uncullZoneScale = 350.0f;
- this->actor.uncullZoneDownward = 700.0f;
+ this->actor.cullingVolumeDistance = 550.0f;
+ this->actor.cullingVolumeScale = 350.0f;
+ this->actor.cullingVolumeDownward = 700.0f;
if (this->type != 5) {
path = this->path * 2;
@@ -454,8 +478,8 @@ void EnHeishi1_Update(Actor* thisx, PlayState* play) {
// this 60 unit height check is so the player doesn't get caught when on the upper path
if (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 60.0f) {
Sfx_PlaySfxCentered(NA_SE_SY_FOUND);
- // "Discovered!"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発見! ☆☆☆☆☆ \n", "☆☆☆☆☆ Discovered! ☆☆☆☆☆ \n")
+ VT_RST);
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
sPlayerIsCaught = true;
this->actionFunc = EnHeishi1_SetupMoveToLink;
@@ -490,7 +514,7 @@ void EnHeishi1_Draw(Actor* thisx, PlayState* play) {
this);
func_80033C30(&this->actor.world.pos, &matrixScale, 0xFF, play);
- if (OOT_DEBUG && (this->path == BREG(1)) && (BREG(0) != 0)) {
+ if (DEBUG_FEATURES && (this->path == BREG(1)) && (BREG(0) != 0)) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y + 100.0f, this->actor.world.pos.z,
17000, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f, 1.0f, 255, 0, 0,
255, 4, play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.h b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.h
index 93bc570223..bc1837241e 100644
--- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.h
+++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.h
@@ -2,11 +2,11 @@
#define Z_EN_HEISHI1_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnHeishi1;
-typedef void (*EnHeishi1ActionFunc)(struct EnHeishi1*, PlayState*);
+typedef void (*EnHeishi1ActionFunc)(struct EnHeishi1*, struct PlayState*);
typedef struct EnHeishi1 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c
index 078ce5db13..f9d5999c88 100644
--- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c
+++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c
@@ -4,13 +4,27 @@
* Description: Hyrulian Guards
*/
-#include "terminal.h"
#include "z_en_heishi2.h"
+#include "overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.h"
+#include "overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h"
+#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_sd/object_sd.h"
#include "assets/objects/object_link_child/object_link_child.h"
-#include "overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.h"
-#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
-#include "overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -112,7 +126,7 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) {
this->actor.shape.rot.y = this->actor.world.rot.y;
Collider_DestroyCylinder(play, &this->collider);
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
- this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actionFunc = func_80A544AC;
}
} else {
@@ -140,8 +154,8 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) {
break;
case 6:
PRINTF("\n\n");
- // "Peep hole soldier!"
- PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 覗き穴奥兵士ふぃ〜 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T(" ☆☆☆☆☆ 覗き穴奥兵士ふぃ〜 ☆☆☆☆☆ \n", " ☆☆☆☆☆ Peep hole soldier ☆☆☆☆☆ \n")
+ VT_RST);
Collider_DestroyCylinder(play, collider);
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY);
this->actionFunc = EnHeishi_DoNothing2;
@@ -150,12 +164,14 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) {
this->unk_2F0 = PARAMS_GET_U(this->actor.params, 8, 8);
PRINTF("\n\n");
- // "Soldier Set 2 Completed!"
- PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 兵士2セット完了! ☆☆☆☆☆ %d\n" VT_RST, this->actor.params);
- // "Identification Completed!"
- PRINTF(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n" VT_RST, this->type);
- // "Message completed!"
- PRINTF(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST,
+ PRINTF(VT_FGCOL(GREEN) T(" ☆☆☆☆☆ 兵士2セット完了! ☆☆☆☆☆ %d\n", " ☆☆☆☆☆ Soldier Set 2 Completed! ☆☆☆☆☆ %d\n")
+ VT_RST,
+ this->actor.params);
+ PRINTF(VT_FGCOL(YELLOW) T(" ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n", " ☆☆☆☆☆ Identification Completed! ☆☆☆☆☆ %d\n")
+ VT_RST,
+ this->type);
+ PRINTF(VT_FGCOL(MAGENTA)
+ T(" ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n", " ☆☆☆☆☆ Message completed! ☆☆☆☆☆ %x\n\n") VT_RST,
PARAMS_GET_U(this->actor.params, 8, 4));
}
}
@@ -190,41 +206,39 @@ void func_80A53278(EnHeishi2* this, PlayState* play) {
this->unk_300 = TEXT_STATE_DONE;
this->actionFunc = func_80A5475C;
} else if (GET_EVENTCHKINF(EVENTCHKINF_09) && GET_EVENTCHKINF(EVENTCHKINF_25) && GET_EVENTCHKINF(EVENTCHKINF_37)) {
- // "Get all spiritual stones!"
- PRINTF(VT_FGCOL(GREEN) " ☆☆☆☆☆ 全部の精霊石GET! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T(" ☆☆☆☆☆ 全部の精霊石GET! ☆☆☆☆☆ \n", " ☆☆☆☆☆ All the spirit stones GET! ☆☆☆☆☆ \n")
+ VT_RST);
this->unk_300 = TEXT_STATE_DONE;
this->actor.textId = 0x7006;
this->actionFunc = func_80A5475C;
} else if (!IS_DAY) {
- // "Sleep early for children!"
- PRINTF(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 子供ははやくネロ! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(YELLOW) T(" ☆☆☆☆☆ 子供ははやくネロ! ☆☆☆☆☆ \n", " ☆☆☆☆☆ Sleep early for children! ☆☆☆☆☆ \n")
+ VT_RST);
this->unk_300 = TEXT_STATE_DONE;
this->actor.textId = 0x7002;
this->actionFunc = func_80A5475C;
} else if (this->unk_30C != 0) {
- // "Anything passes"
- PRINTF(VT_FGCOL(BLUE) " ☆☆☆☆☆ なんでも通るよ ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(BLUE) T(" ☆☆☆☆☆ なんでも通るよ ☆☆☆☆☆ \n", " ☆☆☆☆☆ Anything passes ☆☆☆☆☆ \n") VT_RST);
this->unk_300 = TEXT_STATE_DONE;
this->actor.textId = 0x7099;
this->actionFunc = func_80A5475C;
} else if (GET_EVENTCHKINF(EVENTCHKINF_RECEIVED_WEIRD_EGG)) {
if (this->unk_30E == 0) {
- // "Start under the first sleeve!"
- PRINTF(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(MAGENTA)
+ T(" ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n", " ☆☆☆☆☆ Start under the first sleeve! ☆☆☆☆☆ \n") VT_RST);
this->actor.textId = 0x7071;
this->unk_30E = 1;
} else {
- // "Start under the second sleeve!"
- PRINTF(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ 2回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(MAGENTA) T(" ☆☆☆☆☆ 2回目袖の下開始! ☆☆☆☆☆ \n",
+ " ☆☆☆☆☆ Start under the second sleeve! ☆☆☆☆☆ \n") VT_RST);
this->actor.textId = 0x7072;
}
this->unk_300 = TEXT_STATE_CHOICE;
this->actionFunc = func_80A5475C;
} else {
- // "That's okay"
- PRINTF(VT_FGCOL(CYAN) " ☆☆☆☆☆ それはとおらんよぉ ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(CYAN) T(" ☆☆☆☆☆ それはとおらんよぉ ☆☆☆☆☆ \n", " ☆☆☆☆☆ That won't work ☆☆☆☆☆ \n") VT_RST);
this->unk_300 = TEXT_STATE_DONE;
this->actor.textId = 0x7029;
this->actionFunc = func_80A5475C;
@@ -297,8 +311,9 @@ void func_80A53638(EnHeishi2* this, PlayState* play) {
break;
}
}
- // "I've come!"
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆ きたきたきたぁ! ☆☆☆ %x\n" VT_RST, actor->dyna.actor.next);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆ きたきたきたぁ! ☆☆☆ %x\n", "☆☆☆ It's here, it's here, it's here! ☆☆☆ %x\n")
+ VT_RST,
+ actor->dyna.actor.next);
this->actionFunc = func_80A5372C;
}
}
@@ -382,8 +397,8 @@ void func_80A5399C(EnHeishi2* this, PlayState* play) {
}
this->actionFunc = func_80A5475C;
} else {
- // "I don't know"
- PRINTF(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ とおしゃしねぇちゅーの ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(MAGENTA) T(" ☆☆☆☆☆ とおしゃしねぇちゅーの ☆☆☆☆☆ \n", " ☆☆☆☆☆ There is no way out ☆☆☆☆☆ \n")
+ VT_RST);
this->actionFunc = func_80A53AD4;
}
}
@@ -402,7 +417,7 @@ void func_80A53AD4(EnHeishi2* this, PlayState* play) {
this->unk_300 = TEXT_STATE_DONE;
if (Actor_TalkOfferAccepted(&this->actor, play)) {
- s32 exchangeItemId = func_8002F368(play);
+ s32 exchangeItemId = Actor_GetPlayerExchangeItemId(play);
if (exchangeItemId == EXCH_ITEM_ZELDAS_LETTER) {
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
@@ -464,8 +479,9 @@ void func_80A53D0C(EnHeishi2* this, PlayState* play) {
break;
}
}
- // "I've come!"
- PRINTF(VT_FGCOL(MAGENTA) "☆☆☆ きたきたきたぁ! ☆☆☆ %x\n" VT_RST, gate->dyna.actor.next);
+ PRINTF(VT_FGCOL(MAGENTA) T("☆☆☆ きたきたきたぁ! ☆☆☆ %x\n", "☆☆☆ It's here, it's here, it's here! ☆☆☆ %x\n")
+ VT_RST,
+ gate->dyna.actor.next);
this->actionFunc = func_80A53DF8;
}
}
@@ -640,7 +656,7 @@ void func_80A544AC(EnHeishi2* this, PlayState* play) {
this->actor.world.rot.z = this->actor.shape.rot.z;
if (this->actor.shape.rot.z < -6000) {
Message_StartTextbox(play, 0x708F, NULL);
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actionFunc = func_80A5455C;
this->unk_2E4 = 0.0f;
}
@@ -666,8 +682,7 @@ void func_80A5455C(EnHeishi2* this, PlayState* play) {
bomb->actor.velocity.y = Rand_CenteredFloat(5.0f) + 10.0f;
}
- // "This is down!"
- PRINTF(VT_FGCOL(YELLOW) " ☆☆☆☆☆ これでダウンだ! ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(YELLOW) T(" ☆☆☆☆☆ これでダウンだ! ☆☆☆☆☆ \n", " ☆☆☆☆☆ This is down! ☆☆☆☆☆ \n") VT_RST);
this->actionFunc = func_80A546DC;
}
}
diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h
index b4f6ea5e7b..3753012bee 100644
--- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h
+++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h
@@ -2,12 +2,12 @@
#define Z_EN_HEISHI2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnHeishi2;
-typedef void (*EnHeishi2ActionFunc)(struct EnHeishi2*, PlayState*);
+typedef void (*EnHeishi2ActionFunc)(struct EnHeishi2*, struct PlayState*);
typedef struct EnHeishi2 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c
index aa9c72cc5a..8e03fe3e62 100644
--- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c
+++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c
@@ -5,8 +5,20 @@
*/
#include "z_en_heishi3.h"
-#include "assets/objects/object_sd/object_sd.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sfx.h"
#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_sd/object_sd.h"
#define FLAGS 0
@@ -76,8 +88,8 @@ void EnHeishi3_Init(Actor* thisx, PlayState* play) {
this->actor.attentionRangeType = ATTENTION_RANGE_6;
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
- // "Castle Gate Soldier - Power Up"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 城門兵パワーアップ ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 城門兵パワーアップ ☆☆☆☆☆ \n", "☆☆☆☆☆ Castle gate soldier power-up ☆☆☆☆☆ \n")
+ VT_RST);
this->actor.gravity = -3.0f;
this->actor.focus.pos = this->actor.world.pos;
@@ -132,8 +144,11 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, PlayState* play) {
sPlayerCaught = 1;
Message_StartTextbox(play, 0x702D, &this->actor);
Sfx_PlaySfxCentered(NA_SE_SY_FOUND);
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!"
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発見! ☆☆☆☆☆ \n", "☆☆☆☆☆ Discovered! ☆☆☆☆☆ \n") VT_RST);
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
+#if OOT_PAL_N64
+ this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED;
+#endif
this->actionFunc = EnHeishi3_CatchStart;
}
}
@@ -160,8 +175,11 @@ void EnHeishi3_StandSentinelInCastle(EnHeishi3* this, PlayState* play) {
sPlayerCaught = 1;
Message_StartTextbox(play, 0x702D, &this->actor);
Sfx_PlaySfxCentered(NA_SE_SY_FOUND);
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!"
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 発見! ☆☆☆☆☆ \n", "☆☆☆☆☆ Discovered! ☆☆☆☆☆ \n") VT_RST);
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
+#if OOT_PAL_N64
+ this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED;
+#endif
this->actionFunc = EnHeishi3_CatchStart;
}
}
@@ -201,7 +219,7 @@ void func_80A55D00(EnHeishi3* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play) &&
(this->respawnFlag == 0)) {
- SET_EVENTCHKINF(EVENTCHKINF_4E);
+ SET_EVENTCHKINF(EVENTCHKINF_CAUGHT_BY_CASTLE_GUARDS);
play->nextEntranceIndex = ENTR_HYRULE_CASTLE_4;
play->transitionTrigger = TRANS_TRIGGER_START;
this->respawnFlag = 1;
diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.h b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.h
index 63b4311393..57eb11c61c 100644
--- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.h
+++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.h
@@ -2,11 +2,11 @@
#define Z_EN_HEISHI3_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnHeishi3;
-typedef void (*EnHeishi3ActionFunc)(struct EnHeishi3*, PlayState*);
+typedef void (*EnHeishi3ActionFunc)(struct EnHeishi3*, struct PlayState*);
typedef struct EnHeishi3 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c
index 51588714c8..b90c778114 100644
--- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c
+++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c
@@ -1,6 +1,15 @@
#include "z_en_heishi4.h"
-#include "assets/objects/object_sd/object_sd.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
#include "terminal.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_sd/object_sd.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h
index 48e09ca458..9ab928fe3e 100644
--- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h
+++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h
@@ -2,7 +2,7 @@
#define Z_EN_HEISHI4_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum Heishi4Type {
/* 0x00 */ HEISHI4_AT_KAKARIKO_ENTRANCE,
@@ -13,7 +13,7 @@ typedef enum Heishi4Type {
struct EnHeishi4;
-typedef void (*EnHeishi4ActionFunc)(struct EnHeishi4*, PlayState*);
+typedef void (*EnHeishi4ActionFunc)(struct EnHeishi4*, struct PlayState*);
typedef struct EnHeishi4 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c
index 2e7a8a16fb..454f83c2d0 100644
--- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c
+++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c
@@ -5,6 +5,13 @@
*/
#include "z_en_hintnuts.h"
+
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_hintnuts/object_hintnuts.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -78,8 +85,9 @@ void EnHintnuts_Init(Actor* thisx, PlayState* play) {
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE);
} else {
ActorShape_Init(&this->actor.shape, 0x0, ActorShadow_DrawCircle, 35.0f);
- SkelAnime_Init(play, &this->skelAnime, &gHintNutsSkel, &gHintNutsStandAnim, this->jointTable, this->morphTable,
- 10);
+ //! @bug Flex skeleton is used as normal skeleton
+ SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)&gHintNutsSkel, &gHintNutsStandAnim, this->jointTable,
+ this->morphTable, 10);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
@@ -170,7 +178,7 @@ void EnHintnuts_HitByScrubProjectile2(EnHintnuts* this) {
}
sPuzzleCounter--;
}
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actionFunc = EnHintnuts_BeginFreeze;
} else {
this->actionFunc = EnHintnuts_BeginRun;
@@ -195,7 +203,7 @@ void EnHintnuts_SetupLeave(EnHintnuts* this, PlayState* play) {
this->animFlagAndTimer = 100;
this->actor.world.rot.y = this->actor.shape.rot.y;
this->collider.base.ocFlags1 &= ~OC1_ON;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_DAMAGE);
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, 0x0, 0x0, 0x0, 0x3); // recovery heart
@@ -324,9 +332,9 @@ void EnHintnuts_BeginFreeze(EnHintnuts* this, PlayState* play) {
void EnHintnuts_CheckProximity(EnHintnuts* this, PlayState* play) {
if (this->actor.category != ACTORCAT_ENEMY) {
if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isLockedOn) {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
} else {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
if (this->actor.xzDistToPlayer < 130.0f) {
this->actor.textId = this->textIdCopy;
@@ -377,7 +385,8 @@ void EnHintnuts_Run(EnHintnuts* this, PlayState* play) {
fabsf(this->actor.world.pos.y - this->actor.home.pos.y) < 2.0f) {
this->actor.speed = 0.0f;
if (this->actor.category == ACTORCAT_BG) {
- this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_16);
+ this->actor.flags &=
+ ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED);
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);
}
@@ -450,7 +459,7 @@ void EnHintnuts_Freeze(EnHintnuts* this, PlayState* play) {
Actor_Kill(&this->actor);
} else {
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.colChkInfo.health = sColChkInfoInit.health;
this->actor.colorFilterTimer = 0;
EnHintnuts_SetupWait(this);
diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.h b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.h
index fcc0201659..a24b387fe1 100644
--- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.h
+++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.h
@@ -2,11 +2,11 @@
#define Z_EN_HINTNUTS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnHintnuts;
-typedef void (*EnHintnutsActionFunc)(struct EnHintnuts*, PlayState*);
+typedef void (*EnHintnutsActionFunc)(struct EnHintnuts*, struct PlayState*);
typedef struct EnHintnuts {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c
index c9af4d3b58..c3f8fa40ad 100644
--- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c
+++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c
@@ -1,6 +1,15 @@
#include "z_en_holl.h"
-#define FLAGS ACTOR_FLAG_4
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
/*
* Horizontal holls parameters (`ENHOLL_H_*`)
@@ -99,9 +108,9 @@ static EnHollActionFunc sActionFuncs[] = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 400, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 400, ICHAIN_STOP),
};
void EnHoll_SetupAction(EnHoll* this, EnHollActionFunc func) {
diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.h b/src/overlays/actors/ovl_En_Holl/z_en_holl.h
index 2c87dc346b..4a9409373a 100644
--- a/src/overlays/actors/ovl_En_Holl/z_en_holl.h
+++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.h
@@ -2,7 +2,7 @@
#define Z_EN_HOLL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#define ENHOLL_GET_TYPE(thisx) PARAMS_GET_U((thisx)->params, 6, 3)
#define ENHOLL_GET_SWITCH_FLAG(thisx) PARAMS_GET_U((thisx)->params, 0, 6)
@@ -35,7 +35,7 @@ typedef enum EnHollType {
struct EnHoll;
-typedef void (*EnHollActionFunc)(struct EnHoll*, PlayState*);
+typedef void (*EnHollActionFunc)(struct EnHoll*, struct PlayState*);
typedef struct EnHoll {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c
index c98881645d..5f884f8997 100644
--- a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c
+++ b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c
@@ -5,10 +5,26 @@
*/
#include "z_en_honotrap.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
#define HONOTRAP_AT_ACTIVE (1 << 0)
#define HONOTRAP_AC_ACTIVE (1 << 1)
@@ -121,9 +137,9 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit sColChkInfoInit = { 0, 9, 23, 1 };
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void EnHonotrap_FlameCollisionCheck(EnHonotrap* this, PlayState* play) {
@@ -319,7 +335,7 @@ void EnHonotrap_SetupFlameDrop(EnHonotrap* this) {
void EnHonotrap_FlameDrop(EnHonotrap* this, PlayState* play) {
if ((this->collider.cyl.base.atFlags & AT_HIT) || (this->timer <= 0)) {
if ((this->collider.cyl.base.atFlags & AT_HIT) && !(this->collider.cyl.base.atFlags & AT_BOUNCED)) {
- func_8002F71C(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 0.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 0.0f);
}
this->actor.velocity.x = this->actor.velocity.y = this->actor.velocity.z = 0.0f;
EnHonotrap_SetupFlameVanish(this);
diff --git a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.h b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.h
index f1b085686c..debd2bfb7c 100644
--- a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.h
+++ b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.h
@@ -2,11 +2,11 @@
#define Z_EN_HONOTRAP_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnHonotrap;
-typedef void (*EnHonotrapActionFunc)(struct EnHonotrap*, PlayState*);
+typedef void (*EnHonotrapActionFunc)(struct EnHonotrap*, struct PlayState*);
typedef union EnHonotrapCollider {
struct {
diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c
index 44dc68f52a..dded516560 100644
--- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c
+++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c
@@ -6,11 +6,36 @@
#include "z_en_horse.h"
#include "overlays/actors/ovl_En_In/z_en_in.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "regs.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64horse.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/object_horse/object_horse.h"
#include "assets/objects/object_hni/object_hni.h"
#include "assets/scenes/overworld/spot09/spot09_scene.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef void (*EnHorseCsFunc)(EnHorse*, PlayState*, CsCmdActorCue*);
typedef void (*EnHorseActionFunc)(EnHorse*, PlayState*);
@@ -118,7 +143,7 @@ static ColliderCylinderInit sCylinderInit2 = {
{ 20, 70, 0, { 0, 0, 0 } },
};
-static ColliderJntSphElementInit sJntSphItemsInit[1] = {
+static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -142,7 +167,7 @@ static ColliderJntSphInit sJntSphInit = {
COLSHAPE_JNTSPH,
},
1,
- sJntSphItemsInit,
+ sJntSphElementsInit,
};
static CollisionCheckInfoInit D_80A65F38 = { 10, 35, 100, MASS_HEAVY };
@@ -368,8 +393,8 @@ static RaceInfo sIngoRace = { ARRAY_COUNT(sIngoRaceWaypoints), sIngoRaceWaypoint
static s32 sAnimSoundFrames[] = { 0, 16 };
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 600, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 600, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 300, ICHAIN_STOP),
};
static u8 sResetNoInput[] = { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0 };
@@ -454,7 +479,7 @@ s32 EnHorse_BgCheckBridgeJumpPoint(EnHorse* this, PlayState* play) {
if (this->actor.speed < 12.8f) {
return false;
}
- if (GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
+ if (GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED()) {
return false;
}
@@ -523,7 +548,7 @@ void EnHorse_RaceWaypointPos(RaceWaypoint* waypoints, s32 index, Vec3f* pos) {
}
void EnHorse_RotateToPoint(EnHorse* this, PlayState* play, Vec3f* pos, s16 turnAmount) {
- func_8006DD9C(&this->actor, pos, turnAmount);
+ Horse_RotateToPoint(&this->actor, pos, turnAmount);
}
void EnHorse_UpdateIngoRaceInfo(EnHorse* this, PlayState* play, RaceInfo* raceInfo) {
@@ -558,7 +583,7 @@ void EnHorse_UpdateIngoRaceInfo(EnHorse* this, PlayState* play, RaceInfo* raceIn
EnHorse_RotateToPoint(this, play, &curWaypointPos, 400);
if (distSq < SQ(300.0f)) {
- if (this->actor.xzDistToPlayer < 130.0f || this->jntSph.elements[0].base.ocElemFlags & OCELEM_HIT) {
+ if (this->actor.xzDistToPlayer < 130.0f || this->colliderJntSph.elements[0].base.ocElemFlags & OCELEM_HIT) {
s32 pad;
if (Math_SinS(this->actor.yawTowardsPlayer - this->actor.world.rot.y) > 0.0f) {
@@ -643,7 +668,7 @@ int func_80A5BBBC(PlayState* play, EnHorse* this, Vec3f* pos) {
return false;
}
eyeDist = Math3D_Vec3f_DistXYZ(pos, &play->view.eye);
- return func_800314D4(play, &this->actor, &sp24, sp20) || eyeDist < 100.0f;
+ return Actor_CullingVolumeTest(play, &this->actor, &sp24, sp20) || eyeDist < 100.0f;
}
void EnHorse_IdleAnimSounds(EnHorse* this, PlayState* play) {
@@ -676,7 +701,7 @@ s32 EnHorse_Spawn(EnHorse* this, PlayState* play) {
if (play->sceneId != SCENE_LON_LON_RANCH ||
//! Same flag checked twice
(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) &&
- (GET_EVENTINF_HORSES_STATE() != EVENTINF_HORSES_STATE_6 ||
+ (GET_EVENTINF_INGO_RACE_STATE() != INGO_RACE_STATE_TRAPPED_WIN_EPONA ||
Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED))) ||
// always load two spawns inside lon lon
((sHorseSpawns[i].pos.x == 856 && sHorseSpawns[i].pos.y == 0 && sHorseSpawns[i].pos.z == -918) ||
@@ -699,8 +724,10 @@ s32 EnHorse_Spawn(EnHorse* this, PlayState* play) {
this->actor.world.rot.y = sHorseSpawns[i].angle;
this->actor.shape.rot.y = Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor);
spawn = true;
+#if OOT_VERSION >= PAL_1_0
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &this->actor.world.pos,
&this->actor.projectedPos, &this->actor.projectedW);
+#endif
}
}
}
@@ -720,7 +747,7 @@ void EnHorse_ResetRace(EnHorse* this, PlayState* play) {
s32 EnHorse_PlayerCanMove(EnHorse* this, PlayState* play) {
Player* player = GET_PLAYER(play);
- if ((player->stateFlags1 & PLAYER_STATE1_0) || func_8002DD78(GET_PLAYER(play)) == 1 ||
+ if ((player->stateFlags1 & PLAYER_STATE1_0) || func_8002DD78(GET_PLAYER(play)) == true ||
(player->stateFlags1 & PLAYER_STATE1_20) || ((this->stateFlags & ENHORSE_FLAG_19) && !this->inRace) ||
this->action == ENHORSE_ACT_HBA || player->actor.flags & ACTOR_FLAG_TALK ||
play->csCtx.state != CS_STATE_IDLE) {
@@ -743,7 +770,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
EnHorse* this = (EnHorse*)thisx;
PlayState* play = play2;
- AREG(6) = 0;
+ R_EXITED_SCENE_RIDING_HORSE = false;
Actor_ProcessInitChain(&this->actor, sInitChain);
EnHorse_ClearDustFlags(&this->dustFlags);
R_EPONAS_SONG_PLAYED = false;
@@ -778,7 +805,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
// params was -1
if (this->actor.params == 0x7FFF) {
- this->actor.params = 1;
+ this->actor.params = HORSE_PTYPE_1;
}
if (play->sceneId == SCENE_LON_LON_BUILDINGS) {
@@ -786,25 +813,25 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
} else if (play->sceneId == SCENE_GERUDOS_FORTRESS && this->type == HORSE_HNI) {
this->stateFlags = ENHORSE_FLAG_18 | ENHORSE_UNRIDEABLE;
} else {
- if (this->actor.params == 3) {
+ if (this->actor.params == HORSE_PTYPE_INGO_SPAWNED_RIDING) {
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP | ENHORSE_UNRIDEABLE;
- } else if (this->actor.params == 6) {
+ } else if (this->actor.params == HORSE_PTYPE_6) {
this->stateFlags = ENHORSE_FLAG_19 | ENHORSE_CANT_JUMP;
- if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || DREG(1) != 0) {
+ if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED) {
this->stateFlags &= ~ENHORSE_CANT_JUMP;
this->stateFlags |= ENHORSE_FLAG_26;
- } else if (GET_EVENTINF(EVENTINF_HORSES_06) && this->type == HORSE_HNI) {
+ } else if (GET_EVENTINF(EVENTINF_INGO_RACE_SECOND_RACE) && this->type == HORSE_HNI) {
this->stateFlags |= ENHORSE_FLAG_21 | ENHORSE_FLAG_20;
}
- } else if (this->actor.params == 1) {
+ } else if (this->actor.params == HORSE_PTYPE_1) {
this->stateFlags = ENHORSE_FLAG_7;
} else {
this->stateFlags = 0;
}
}
- if (play->sceneId == SCENE_LON_LON_RANCH && GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6 &&
- !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && !DREG(1)) {
+ if (play->sceneId == SCENE_LON_LON_RANCH && GET_EVENTINF_INGO_RACE_STATE() == INGO_RACE_STATE_TRAPPED_WIN_EPONA &&
+ !(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED)) {
this->stateFlags |= ENHORSE_FLAG_25;
}
@@ -813,12 +840,12 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawHorse, 20.0f);
this->action = ENHORSE_ACT_IDLE;
this->actor.speed = 0.0f;
- Collider_InitCylinder(play, &this->cyl1);
- Collider_SetCylinder(play, &this->cyl1, &this->actor, &sCylinderInit1);
- Collider_InitCylinder(play, &this->cyl2);
- Collider_SetCylinder(play, &this->cyl2, &this->actor, &sCylinderInit2);
- Collider_InitJntSph(play, &this->jntSph);
- Collider_SetJntSph(play, &this->jntSph, &this->actor, &sJntSphInit, &this->jntSphList);
+ Collider_InitCylinder(play, &this->colliderCylinder1);
+ Collider_SetCylinder(play, &this->colliderCylinder1, &this->actor, &sCylinderInit1);
+ Collider_InitCylinder(play, &this->colliderCylinder2);
+ Collider_SetCylinder(play, &this->colliderCylinder2, &this->actor, &sCylinderInit2);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
CollisionCheck_SetInfo(&this->actor.colChkInfo, DamageTable_Get(0xB), &D_80A65F38);
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 70.0f;
@@ -838,12 +865,13 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
Actor_Kill(&this->actor);
return;
}
- } else if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && !DREG(1) && !IS_DAY) {
+ } else if (!(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED) && !IS_DAY) {
Actor_Kill(&this->actor);
return;
}
} else if (play->sceneId == SCENE_STABLE) {
- if (IS_DAY || Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || DREG(1) != 0 || !LINK_IS_ADULT) {
+ if (IS_DAY || Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED ||
+ !LINK_IS_ADULT) {
Actor_Kill(&this->actor);
return;
}
@@ -861,24 +889,25 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
EnHorse_ResetRace(this, play);
EnHorse_ResetHorsebackArchery(this, play);
- if (this->actor.params == 2) {
+ if (this->actor.params == HORSE_PTYPE_INACTIVE) {
EnHorse_InitInactive(this);
- } else if (this->actor.params == 3) {
+ } else if (this->actor.params == HORSE_PTYPE_INGO_SPAWNED_RIDING) {
EnHorse_InitIngoHorse(this);
this->rider = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_IN, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, 1, 1);
ASSERT(this->rider != NULL, "this->race.rider != NULL", "../z_en_horse.c", 3077);
- if (!GET_EVENTINF(EVENTINF_HORSES_06)) {
+ if (!GET_EVENTINF(EVENTINF_INGO_RACE_SECOND_RACE)) {
this->ingoHorseMaxSpeed = 12.07f;
} else {
this->ingoHorseMaxSpeed = 12.625f;
}
- } else if (this->actor.params == 7) {
+ } else if (this->actor.params == HORSE_PTYPE_7) {
EnHorse_InitCutscene(this, play);
- } else if (this->actor.params == 8) {
+ } else if (this->actor.params == HORSE_PTYPE_HORSEBACK_ARCHERY) {
EnHorse_InitHorsebackArchery(this);
Interface_InitHorsebackArchery(play);
- } else if (play->sceneId == SCENE_LON_LON_RANCH && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && !DREG(1)) {
+ } else if (play->sceneId == SCENE_LON_LON_RANCH && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) &&
+ !R_DEBUG_FORCE_EPONA_OBTAINED) {
EnHorse_InitFleePlayer(this);
} else {
if (play->sceneId == SCENE_LON_LON_BUILDINGS) {
@@ -899,9 +928,9 @@ void EnHorse_Destroy(Actor* thisx, PlayState* play) {
Audio_StopSfxByPos(&this->unk_21C);
}
Skin_Free(play, &this->skin);
- Collider_DestroyCylinder(play, &this->cyl1);
- Collider_DestroyCylinder(play, &this->cyl2);
- Collider_DestroyJntSph(play, &this->jntSph);
+ Collider_DestroyCylinder(play, &this->colliderCylinder1);
+ Collider_DestroyCylinder(play, &this->colliderCylinder2);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
}
void EnHorse_RotateToPlayer(EnHorse* this, PlayState* play) {
@@ -914,15 +943,15 @@ void EnHorse_RotateToPlayer(EnHorse* this, PlayState* play) {
void EnHorse_Freeze(EnHorse* this) {
if (this->action != ENHORSE_ACT_CS_UPDATE && this->action != ENHORSE_ACT_HBA) {
- if (sResetNoInput[this->actor.params] != 0 && this->actor.params != 4) {
+ if (!(sResetNoInput[this->actor.params] == 0 || this->actor.params == HORSE_PTYPE_4)) {
this->noInputTimer = 0;
this->noInputTimerMax = 0;
}
this->prevAction = this->action;
this->action = ENHORSE_ACT_FROZEN;
- this->cyl1.base.ocFlags1 &= ~OC1_ON;
- this->cyl2.base.ocFlags1 &= ~OC1_ON;
- this->jntSph.base.ocFlags1 &= ~OC1_ON;
+ this->colliderCylinder1.base.ocFlags1 &= ~OC1_ON;
+ this->colliderCylinder2.base.ocFlags1 &= ~OC1_ON;
+ this->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
this->animationIdx = ENHORSE_ANIM_IDLE;
}
}
@@ -936,15 +965,15 @@ void EnHorse_Frozen(EnHorse* this, PlayState* play) {
this->actor.speed = 0.0f;
this->noInputTimer--;
if (this->noInputTimer < 0) {
- this->cyl1.base.ocFlags1 |= OC1_ON;
- this->cyl2.base.ocFlags1 |= OC1_ON;
- this->jntSph.base.ocFlags1 |= OC1_ON;
+ this->colliderCylinder1.base.ocFlags1 |= OC1_ON;
+ this->colliderCylinder2.base.ocFlags1 |= OC1_ON;
+ this->colliderJntSph.base.ocFlags1 |= OC1_ON;
if (this->playerControlled == true) {
this->stateFlags &= ~ENHORSE_FLAG_7;
- if (this->actor.params == 4) {
+ if (this->actor.params == HORSE_PTYPE_4) {
EnHorse_StartMountedIdleResetAnim(this);
- } else if (this->actor.params == 9) {
- this->actor.params = 5;
+ } else if (this->actor.params == HORSE_PTYPE_PLAYER_SPAWNED_RIDING) {
+ this->actor.params = HORSE_PTYPE_5;
if (play->csCtx.state != CS_STATE_IDLE) {
EnHorse_StartMountedIdle(this);
} else {
@@ -956,8 +985,8 @@ void EnHorse_Frozen(EnHorse* this, PlayState* play) {
} else {
EnHorse_StartMountedIdleResetAnim(this);
}
- if (this->actor.params != 0) {
- this->actor.params = 0;
+ if (this->actor.params != HORSE_PTYPE_0) {
+ this->actor.params = HORSE_PTYPE_0;
return;
}
} else {
@@ -1721,9 +1750,9 @@ void EnHorse_HighJump(EnHorse* this, PlayState* play) {
}
void EnHorse_InitInactive(EnHorse* this) {
- this->cyl1.base.ocFlags1 &= ~OC1_ON;
- this->cyl2.base.ocFlags1 &= ~OC1_ON;
- this->jntSph.base.ocFlags1 &= ~OC1_ON;
+ this->colliderCylinder1.base.ocFlags1 &= ~OC1_ON;
+ this->colliderCylinder2.base.ocFlags1 &= ~OC1_ON;
+ this->colliderJntSph.base.ocFlags1 &= ~OC1_ON;
this->action = ENHORSE_ACT_INACTIVE;
this->animationIdx = ENHORSE_ANIM_WALK;
this->stateFlags |= ENHORSE_INACTIVE;
@@ -1737,9 +1766,11 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play2) {
if (R_EPONAS_SONG_PLAYED && this->type == HORSE_EPONA) {
R_EPONAS_SONG_PLAYED = false;
- if (EnHorse_Spawn(this, play) != 0) {
+ if (EnHorse_Spawn(this, play)) {
+#if OOT_VERSION >= PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+#endif
this->stateFlags &= ~ENHORSE_INACTIVE;
gSaveContext.save.info.horseData.sceneId = play->sceneId;
@@ -1752,10 +1783,10 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play2) {
if (!(this->stateFlags & ENHORSE_INACTIVE)) {
this->followTimer = 0;
EnHorse_SetFollowAnimation(this, play);
- this->actor.params = 0;
- this->cyl1.base.ocFlags1 |= OC1_ON;
- this->cyl2.base.ocFlags1 |= OC1_ON;
- this->jntSph.base.ocFlags1 |= OC1_ON;
+ this->actor.params = HORSE_PTYPE_0;
+ this->colliderCylinder1.base.ocFlags1 |= OC1_ON;
+ this->colliderCylinder2.base.ocFlags1 |= OC1_ON;
+ this->colliderJntSph.base.ocFlags1 |= OC1_ON;
}
}
@@ -1814,8 +1845,10 @@ void EnHorse_Idle(EnHorse* this, PlayState* play) {
R_EPONAS_SONG_PLAYED = false;
if (!func_80A5BBBC(play, this, &this->actor.world.pos)) {
if (EnHorse_Spawn(this, play)) {
+#if OOT_VERSION >= PAL_1_0
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+#endif
this->followTimer = 0;
EnHorse_SetFollowAnimation(this, play);
Camera_SetViewParam(play->cameraPtrs[CAM_ID_MAIN], CAM_VIEW_TARGET, &this->actor);
@@ -1928,6 +1961,12 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) {
this->skin.skelAnime.playSpeed = 1.0f;
this->stateFlags &= ~ENHORSE_LAND2_SOUND;
this->unk_21C = this->unk_228;
+#if OOT_VERSION < PAL_1_0
+ if (this->stateFlags & ENHORSE_DRAW) {
+ Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
+ &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+ }
+#endif
} else if (this->stateFlags & ENHORSE_TURNING_TO_PLAYER) {
this->actor.world.rot.y += this->followPlayerTurnSpeed;
this->actor.shape.rot.y = this->actor.world.rot.y;
@@ -2383,7 +2422,7 @@ void EnHorse_CutsceneUpdate(EnHorse* this, PlayState* play) {
if (play->csCtx.state == 3) {
this->playerControlled = 1;
- this->actor.params = 10;
+ this->actor.params = HORSE_PTYPE_10;
this->action = ENHORSE_ACT_IDLE;
EnHorse_Freeze(this);
return;
@@ -3531,12 +3570,12 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
this->rider->shape.rot.y = thisx->shape.rot.y;
}
}
- if (this->jntSph.elements[0].base.ocElemFlags & OCELEM_HIT) {
+ if (this->colliderJntSph.elements[0].base.ocElemFlags & OCELEM_HIT) {
if (thisx->speed > 6.0f) {
thisx->speed -= 1.0f;
}
}
- if (this->jntSph.base.acFlags & AC_HIT) {
+ if (this->colliderJntSph.base.acFlags & AC_HIT) {
this->unk_21C = this->unk_228;
if (this->stateFlags & ENHORSE_DRAW) {
Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale,
@@ -3546,17 +3585,21 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
if (this->action != ENHORSE_ACT_INGO_RACE) {
EnHorse_TiltBody(this, play);
}
- Collider_UpdateCylinder(thisx, &this->cyl1);
- Collider_UpdateCylinder(thisx, &this->cyl2);
+ Collider_UpdateCylinder(thisx, &this->colliderCylinder1);
+ Collider_UpdateCylinder(thisx, &this->colliderCylinder2);
// Required to match
- this->cyl1.dim.pos.x = this->cyl1.dim.pos.x + (s16)(Math_SinS(thisx->shape.rot.y) * 11.0f);
- this->cyl1.dim.pos.z = this->cyl1.dim.pos.z + (s16)(Math_CosS(thisx->shape.rot.y) * 11.0f);
- this->cyl2.dim.pos.x = this->cyl2.dim.pos.x + (s16)(Math_SinS(thisx->shape.rot.y) * -18.0f);
- this->cyl2.dim.pos.z = this->cyl2.dim.pos.z + (s16)(Math_CosS(thisx->shape.rot.y) * -18.0f);
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->cyl1.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->cyl1.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->cyl2.base);
+ this->colliderCylinder1.dim.pos.x =
+ this->colliderCylinder1.dim.pos.x + (s16)(Math_SinS(thisx->shape.rot.y) * 11.0f);
+ this->colliderCylinder1.dim.pos.z =
+ this->colliderCylinder1.dim.pos.z + (s16)(Math_CosS(thisx->shape.rot.y) * 11.0f);
+ this->colliderCylinder2.dim.pos.x =
+ this->colliderCylinder2.dim.pos.x + (s16)(Math_SinS(thisx->shape.rot.y) * -18.0f);
+ this->colliderCylinder2.dim.pos.z =
+ this->colliderCylinder2.dim.pos.z + (s16)(Math_CosS(thisx->shape.rot.y) * -18.0f);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinder1.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder1.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder2.base);
if ((player->stateFlags1 & PLAYER_STATE1_0) && player->rideActor != NULL) {
if (play->sceneId != SCENE_LON_LON_RANCH ||
(play->sceneId == SCENE_LON_LON_RANCH && (thisx->world.pos.z < -2400.0f))) {
@@ -3578,7 +3621,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
this->stateFlags &= ~ENHORSE_FLAG_24;
}
- if (play->sceneId == SCENE_GERUDO_VALLEY && !GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
+ if (play->sceneId == SCENE_GERUDO_VALLEY && !GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED()) {
EnHorse_CheckBridgeJumps(this, play);
}
@@ -3594,15 +3637,15 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
}
if (thisx->speed == 0.0f && !(this->stateFlags & ENHORSE_FLAG_19)) {
- thisx->colChkInfo.mass = 0xFF;
+ thisx->colChkInfo.mass = MASS_IMMOVABLE;
} else {
- thisx->colChkInfo.mass = 0xFE;
+ thisx->colChkInfo.mass = MASS_HEAVY;
}
if (thisx->speed >= 5.0f) {
- this->cyl1.base.atFlags |= AT_ON;
+ this->colliderCylinder1.base.atFlags |= AT_ON;
} else {
- this->cyl1.base.atFlags &= ~AT_ON;
+ this->colliderCylinder1.base.atFlags &= ~AT_ON;
}
if (gSaveContext.save.entranceIndex != ENTR_LON_LON_RANCH_0 || gSaveContext.sceneLayer != 9) {
@@ -3797,17 +3840,17 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) {
}
}
- for (i = 0; i < this->jntSph.count; i++) {
- center.x = this->jntSph.elements[i].dim.modelSphere.center.x;
- center.y = this->jntSph.elements[i].dim.modelSphere.center.y;
- center.z = this->jntSph.elements[i].dim.modelSphere.center.z;
+ for (i = 0; i < this->colliderJntSph.count; i++) {
+ center.x = this->colliderJntSph.elements[i].dim.modelSphere.center.x;
+ center.y = this->colliderJntSph.elements[i].dim.modelSphere.center.y;
+ center.z = this->colliderJntSph.elements[i].dim.modelSphere.center.z;
- Skin_GetLimbPos(skin, this->jntSph.elements[i].dim.limb, ¢er, &newCenter);
- this->jntSph.elements[i].dim.worldSphere.center.x = newCenter.x;
- this->jntSph.elements[i].dim.worldSphere.center.y = newCenter.y;
- this->jntSph.elements[i].dim.worldSphere.center.z = newCenter.z;
- this->jntSph.elements[i].dim.worldSphere.radius =
- this->jntSph.elements[i].dim.modelSphere.radius * this->jntSph.elements[i].dim.scale;
+ Skin_GetLimbPos(skin, this->colliderJntSph.elements[i].dim.limb, ¢er, &newCenter);
+ this->colliderJntSph.elements[i].dim.worldSphere.center.x = newCenter.x;
+ this->colliderJntSph.elements[i].dim.worldSphere.center.y = newCenter.y;
+ this->colliderJntSph.elements[i].dim.worldSphere.center.z = newCenter.z;
+ this->colliderJntSph.elements[i].dim.worldSphere.radius =
+ this->colliderJntSph.elements[i].dim.modelSphere.radius * this->colliderJntSph.elements[i].dim.scale;
}
//! @bug Setting colliders in a draw function allows for duplicate entries to be added to their respective lists
@@ -3815,8 +3858,8 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) {
//! Actors will draw for a couple of frames between the pauses, but some important logic updates will not occur.
//! In the case of OC, this can cause unwanted effects such as a very large amount of displacement being applied to
//! a colliding actor.
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->jntSph.base);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->jntSph.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
// unused
diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.h b/src/overlays/actors/ovl_En_Horse/z_en_horse.h
index a0618973a0..0eed5c001c 100644
--- a/src/overlays/actors/ovl_En_Horse/z_en_horse.h
+++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.h
@@ -2,7 +2,8 @@
#define Z_EN_HORSE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64skin.h"
typedef enum EnHorseAction {
/* 0 */ ENHORSE_ACT_FROZEN,
@@ -27,7 +28,7 @@ typedef enum EnHorseAction {
/* 19 */ ENHORSE_ACT_FLEE_PLAYER
} EnHorseAction;
-
+// stateFlags
#define ENHORSE_BOOST (1 << 0) /* 0x1 */
#define ENHORSE_BOOST_DECEL (1 << 1) /* 0x2 */
#define ENHORSE_JUMPING (1 << 2) /* 0x4 */
@@ -89,7 +90,22 @@ typedef enum HorseType {
/* 1 */ HORSE_HNI
} HorseType;
-typedef void (*EnHorsePostdrawFunc)(struct EnHorse*, PlayState*);
+typedef enum HorseParamType {
+ /* 00 */ HORSE_PTYPE_0,
+ /* 01 */ HORSE_PTYPE_1,
+ /* 02 */ HORSE_PTYPE_INACTIVE, // Waits for Epona's Song to appear
+ /* 03 */ HORSE_PTYPE_INGO_SPAWNED_RIDING,
+ /* 04 */ HORSE_PTYPE_4,
+ /* 05 */ HORSE_PTYPE_5,
+ /* 06 */ HORSE_PTYPE_6,
+ /* 07 */ HORSE_PTYPE_7,
+ /* 08 */ HORSE_PTYPE_HORSEBACK_ARCHERY,
+ /* 09 */ HORSE_PTYPE_PLAYER_SPAWNED_RIDING,
+ /* 10 */ HORSE_PTYPE_10,
+ /* 11 */ HORSE_PTYPE_11
+} HorseParamType;
+
+typedef void (*EnHorsePostdrawFunc)(struct EnHorse*, struct PlayState*);
typedef struct EnHorse {
/* 0x0000 */ Actor actor;
@@ -124,10 +140,10 @@ typedef struct EnHorse {
/* 0x0264 */ Vec2f curStick;
/* 0x026C */ Vec2f lastStick;
/* 0x0274 */ f32 jumpStartY;
- /* 0x0278 */ ColliderCylinder cyl1;
- /* 0x02C4 */ ColliderCylinder cyl2;
- /* 0x0310 */ ColliderJntSph jntSph;
- /* 0x0330 */ ColliderJntSphElement jntSphList;
+ /* 0x0278 */ ColliderCylinder colliderCylinder1;
+ /* 0x02C4 */ ColliderCylinder colliderCylinder2;
+ /* 0x0310 */ ColliderJntSph colliderJntSph;
+ /* 0x0330 */ ColliderJntSphElement colliderJntSphElements[1];
/* 0x0370 */ u32 playerDir;
/* 0x0374 */ s16 unk_374;
/* 0x0376 */ s16 angleToPlayer;
diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c
index 25683388aa..eefef20798 100644
--- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c
+++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c
@@ -7,7 +7,20 @@
#include "z_en_horse_game_check.h"
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libu64/debug.h"
+#include "line_numbers.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sys_math3d.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
#define AT_FINISH_LINE(actor) \
(Math3D_PointInSquare2D(sFinishLine[0], sFinishLine[1], sFinishLine[2], sFinishLine[3], (actor)->world.pos.x, \
@@ -16,15 +29,15 @@
(Math3D_PointInSquare2D(sRanchExit[0], sRanchExit[1], sRanchExit[2], sRanchExit[3], (actor)->world.pos.x, \
(actor)->world.pos.z))
-#define INGORACE_PLAYER_MOVE (1 << 0)
-#define INGORACE_SET_TIMER (1 << 1)
-#define INGORACE_INGO_MOVE (1 << 2)
+#define INGO_RACE_PLAYER_MOVE (1 << 0)
+#define INGO_RACE_SET_TIMER (1 << 1)
+#define INGO_RACE_INGO_MOVE (1 << 2)
typedef enum HorseGameIngoRaceResult {
- /* 0 */ INGORACE_NO_RESULT,
- /* 1 */ INGORACE_PLAYER_WIN,
- /* 2 */ INGORACE_INGO_WIN,
- /* 3 */ INGORACE_TIME_UP
+ /* 0 */ INGO_RACE_NO_RESULT,
+ /* 1 */ INGO_RACE_PLAYER_WIN,
+ /* 2 */ INGO_RACE_INGO_WIN,
+ /* 3 */ INGO_RACE_TIME_UP
} HorseGameIngoRaceResult;
#define MALONRACE_PLAYER_MOVE (1 << 0)
@@ -90,11 +103,12 @@ s32 EnHorseGameCheck_InitIngoRace(EnHorseGameCheckBase* base, PlayState* play) {
this->ingoHorse = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -250.0f, 1.0f, -1650.0f, 0, 0x4000, 0, 0x8003);
if (this->ingoHorse == NULL) {
- LogUtils_HungupThread("../z_en_horse_game_check.c", 385);
+ LogUtils_HungupThread("../z_en_horse_game_check.c", LN1(382, 385));
}
+
this->startTimer = 0;
this->finishTimer = 0;
- this->result = INGORACE_NO_RESULT;
+ this->result = INGO_RACE_NO_RESULT;
this->playerFinish = 0;
this->ingoFinish = 0;
@@ -107,24 +121,24 @@ s32 EnHorseGameCheck_DestroyIngoRace(EnHorseGameCheckBase* base, PlayState* play
void EnHorseGameCheck_FinishIngoRace(EnHorseGameCheckIngoRace* this, PlayState* play) {
gSaveContext.save.cutsceneIndex = 0;
- if (this->result == INGORACE_PLAYER_WIN) {
+ if (this->result == INGO_RACE_PLAYER_WIN) {
play->nextEntranceIndex = ENTR_LON_LON_RANCH_7;
- if (GET_EVENTINF(EVENTINF_HORSES_06)) {
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_6);
- SET_EVENTINF_HORSES_0F(1);
+ if (GET_EVENTINF(EVENTINF_INGO_RACE_SECOND_RACE)) {
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_TRAPPED_WIN_EPONA);
+ WRITE_EVENTINF_INGO_RACE_0F(1);
play->transitionType = TRANS_TYPE_FADE_WHITE;
Environment_ForcePlaySequence(NA_BGM_INGO);
} else {
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_4);
- SET_EVENTINF_HORSES_0F(1);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_FIRST_WIN);
+ WRITE_EVENTINF_INGO_RACE_0F(1);
Environment_ForcePlaySequence(NA_BGM_INGO);
play->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_WHITE, TCS_FAST);
}
} else {
play->nextEntranceIndex = ENTR_LON_LON_RANCH_8;
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_3);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_PLAYER_LOSE);
play->transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);
- SET_EVENTINF_HORSES_0F(1);
+ WRITE_EVENTINF_INGO_RACE_0F(1);
}
DREG(25) = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
@@ -138,20 +152,20 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, PlayState* play)
EnHorse* ingoHorse;
Player* player2 = player;
- if ((this->startTimer > 50) && !(this->startFlags & INGORACE_SET_TIMER)) {
- this->startFlags |= INGORACE_SET_TIMER;
+ if ((this->startTimer > 50) && !(this->startFlags & INGO_RACE_SET_TIMER)) {
+ this->startFlags |= INGO_RACE_SET_TIMER;
Interface_SetTimer(0);
- } else if ((this->startTimer > 80) && (player->rideActor != NULL) && !(this->startFlags & INGORACE_PLAYER_MOVE)) {
+ } else if ((this->startTimer > 80) && (player->rideActor != NULL) && !(this->startFlags & INGO_RACE_PLAYER_MOVE)) {
EnHorse* horse;
- this->startFlags |= INGORACE_PLAYER_MOVE;
+ this->startFlags |= INGO_RACE_PLAYER_MOVE;
horse = (EnHorse*)player->rideActor;
horse->inRace = 1;
- } else if ((this->startTimer > 81) && !(this->startFlags & INGORACE_INGO_MOVE)) {
+ } else if ((this->startTimer > 81) && !(this->startFlags & INGO_RACE_INGO_MOVE)) {
ingoHorse = (EnHorse*)this->ingoHorse;
ingoHorse->inRace = 1;
- this->startFlags |= INGORACE_INGO_MOVE;
+ this->startFlags |= INGO_RACE_INGO_MOVE;
Audio_PlaySfxGeneral(NA_SE_SY_START_SHOT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
@@ -176,11 +190,11 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, PlayState* play)
}
}
- if (this->result == INGORACE_NO_RESULT) {
+ if (this->result == INGO_RACE_NO_RESULT) {
if ((player2->rideActor != NULL) && (this->playerCheck[2] == 1) && AT_FINISH_LINE(player2->rideActor)) {
this->playerFinish++;
if (this->playerFinish > 0) {
- this->result = INGORACE_PLAYER_WIN;
+ this->result = INGO_RACE_PLAYER_WIN;
this->finishTimer = 55;
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
Audio_PlaySfxGeneral(NA_SE_SY_START_SHOT, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
@@ -195,7 +209,7 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, PlayState* play)
if (this->ingoFinish > 0) {
ingoHorse = (EnHorse*)this->ingoHorse;
- this->result = INGORACE_INGO_WIN;
+ this->result = INGO_RACE_INGO_WIN;
this->finishTimer = 70;
ingoHorse->stateFlags |= ENHORSE_INGO_WON;
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
@@ -208,12 +222,12 @@ s32 EnHorseGameCheck_UpdateIngoRace(EnHorseGameCheckBase* base, PlayState* play)
}
if (((player2->rideActor != NULL) && AT_RANCH_EXIT(player2->rideActor)) || AT_RANCH_EXIT(&player2->actor)) {
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
- this->result = INGORACE_INGO_WIN;
+ this->result = INGO_RACE_INGO_WIN;
this->finishTimer = 20;
}
if ((gSaveContext.timerSeconds >= 180) && (this->startFlags & 2)) {
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_HORSE_GOAL);
- this->result = INGORACE_TIME_UP;
+ this->result = INGO_RACE_TIME_UP;
this->finishTimer = 20;
}
} else {
@@ -445,7 +459,8 @@ void EnHorseGameCheck_Init(Actor* thisx, PlayState* play) {
s32 pad;
EnHorseGameCheckBase* this = (EnHorseGameCheckBase*)thisx;
- if ((play->sceneId == SCENE_LON_LON_RANCH) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || DREG(1))) {
+ if ((play->sceneId == SCENE_LON_LON_RANCH) &&
+ (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED)) {
this->actor.params = HORSEGAME_MALON_RACE;
}
if (sInitFuncs[this->actor.params] != NULL) {
diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h
index 96834860e3..84ab117216 100644
--- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h
+++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h
@@ -2,11 +2,11 @@
#define Z_EN_HORSE_GAME_CHECK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnHorseGameCheckBase;
-typedef s32 (*EnHorseGameCheckFunc)(struct EnHorseGameCheckBase* this, PlayState* play);
+typedef s32 (*EnHorseGameCheckFunc)(struct EnHorseGameCheckBase* this, struct PlayState* play);
typedef struct EnHorseGameCheckBase {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c
index 0612993947..e1991688a1 100644
--- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c
+++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c
@@ -5,9 +5,21 @@
*/
#include "z_en_horse_ganon.h"
+
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64skin.h"
+
#include "assets/objects/object_horse_ganon/object_horse_ganon.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef struct unk_D_80A69248 {
/* 0x0 */ Vec3s unk_0;
@@ -102,7 +114,7 @@ static unk_D_80A69248 D_80A69248[] = {
static s32 D_80A692B8[] = { 0, 16 };
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 1200, ICHAIN_STOP),
};
static EnHorseGanonActionFunc sActionFuncs[] = { func_80A68AF0, func_80A68DB0 };
@@ -181,10 +193,10 @@ void EnHorseGanon_Init(Actor* thisx, PlayState* play) {
this->currentAnimation = 0;
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[0]);
- Collider_InitCylinder(play, &this->colliderBody);
- Collider_SetCylinder(play, &this->colliderBody, &this->actor, &sCylinderInit);
- Collider_InitJntSph(play, &this->colliderHead);
- Collider_SetJntSph(play, &this->colliderHead, &this->actor, &sJntSphInit, this->headElements);
+ Collider_InitCylinder(play, &this->bodyCollider);
+ Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sCylinderInit);
+ Collider_InitJntSph(play, &this->headCollider);
+ Collider_SetJntSph(play, &this->headCollider, &this->actor, &sJntSphInit, this->headColliderElements);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
func_80A68AC4(this);
@@ -194,8 +206,8 @@ void EnHorseGanon_Destroy(Actor* thisx, PlayState* play) {
EnHorseGanon* this = (EnHorseGanon*)thisx;
Skin_Free(play, &this->skin);
- Collider_DestroyCylinder(play, &this->colliderBody);
- Collider_DestroyJntSph(play, &this->colliderHead);
+ Collider_DestroyCylinder(play, &this->bodyCollider);
+ Collider_DestroyJntSph(play, &this->headCollider);
}
void func_80A68AC4(EnHorseGanon* this) {
@@ -293,8 +305,8 @@ void EnHorseGanon_Update(Actor* thisx, PlayState* play) {
UPDBGCHECKINFO_FLAG_4);
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 70.0f;
- Collider_UpdateCylinder(&this->actor, &this->colliderBody);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base);
+ Collider_UpdateCylinder(&this->actor, &this->bodyCollider);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base);
}
void EnHorseGanon_PostDraw(Actor* thisx, PlayState* play, Skin* skin) {
@@ -303,23 +315,23 @@ void EnHorseGanon_PostDraw(Actor* thisx, PlayState* play, Skin* skin) {
EnHorseGanon* this = (EnHorseGanon*)thisx;
s32 index;
- for (index = 0; index < this->colliderHead.count; index++) {
- sp4C.x = this->colliderHead.elements[index].dim.modelSphere.center.x;
- sp4C.y = this->colliderHead.elements[index].dim.modelSphere.center.y;
- sp4C.z = this->colliderHead.elements[index].dim.modelSphere.center.z;
+ for (index = 0; index < this->headCollider.count; index++) {
+ sp4C.x = this->headCollider.elements[index].dim.modelSphere.center.x;
+ sp4C.y = this->headCollider.elements[index].dim.modelSphere.center.y;
+ sp4C.z = this->headCollider.elements[index].dim.modelSphere.center.z;
- Skin_GetLimbPos(skin, this->colliderHead.elements[index].dim.limb, &sp4C, &sp40);
+ Skin_GetLimbPos(skin, this->headCollider.elements[index].dim.limb, &sp4C, &sp40);
- this->colliderHead.elements[index].dim.worldSphere.center.x = sp40.x;
- this->colliderHead.elements[index].dim.worldSphere.center.y = sp40.y;
- this->colliderHead.elements[index].dim.worldSphere.center.z = sp40.z;
+ this->headCollider.elements[index].dim.worldSphere.center.x = sp40.x;
+ this->headCollider.elements[index].dim.worldSphere.center.y = sp40.y;
+ this->headCollider.elements[index].dim.worldSphere.center.z = sp40.z;
- this->colliderHead.elements[index].dim.worldSphere.radius =
- this->colliderHead.elements[index].dim.modelSphere.radius * this->colliderHead.elements[index].dim.scale;
+ this->headCollider.elements[index].dim.worldSphere.radius =
+ this->headCollider.elements[index].dim.modelSphere.radius * this->headCollider.elements[index].dim.scale;
}
//! @bug see relevant comment in `EnHorse_SkinCallback1`
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderHead.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->headCollider.base);
}
void EnHorseGanon_Draw(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h
index 8083adeee6..473f6cecb4 100644
--- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h
+++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h
@@ -2,11 +2,12 @@
#define Z_EN_HORSE_GANON_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64skin.h"
struct EnHorseGanon;
-typedef void (*EnHorseGanonActionFunc)(struct EnHorseGanon*, PlayState*);
+typedef void (*EnHorseGanonActionFunc)(struct EnHorseGanon*, struct PlayState*);
typedef struct EnHorseGanon {
/* 0x0000 */ Actor actor;
@@ -19,9 +20,9 @@ typedef struct EnHorseGanon {
/* 0x01F0 */ u8 unk_1F0[0x04];
/* 0x01F4 */ f32 unk_1F4;
/* 0x01F8 */ u8 unk_1F8[0x04];
- /* 0x01FC */ ColliderCylinder colliderBody;
- /* 0x0248 */ ColliderJntSph colliderHead;
- /* 0x0268 */ ColliderJntSphElement headElements[1];
+ /* 0x01FC */ ColliderCylinder bodyCollider;
+ /* 0x0248 */ ColliderJntSph headCollider;
+ /* 0x0268 */ ColliderJntSphElement headColliderElements[1];
} EnHorseGanon; // size = 0x02A8
#endif
diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c
index a626ae27f3..1610147130 100644
--- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c
+++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c
@@ -5,9 +5,27 @@
*/
#include "z_en_horse_link_child.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "z_lib.h"
+#include "z64actor.h"
+#include "z64horse.h"
+#include "z64player.h"
+#include "z64play.h"
+#include "z64save.h"
+#include "z64skin.h"
+
#include "assets/objects/object_horse_link_child/object_horse_link_child.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnHorseLinkChild_Init(Actor* thisx, PlayState* play);
void EnHorseLinkChild_Destroy(Actor* thisx, PlayState* play);
@@ -55,7 +73,7 @@ static ColliderCylinderInitType1 sCylinderInit = {
{ 20, 100, 0, { 0, 0, 0 } },
};
-static ColliderJntSphElementInit sJntSphElementInit[1] = {
+static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -79,7 +97,7 @@ static ColliderJntSphInit sJntSphInit = {
COLSHAPE_JNTSPH,
},
1,
- sJntSphElementInit,
+ sJntSphElementsInit,
};
static CollisionCheckInfoInit sColCheckInfoInit = { 10, 35, 100, MASS_HEAVY };
@@ -136,7 +154,7 @@ f32 func_80A695A4(EnHorseLinkChild* this) {
}
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 1200, ICHAIN_STOP),
};
void EnHorseLinkChild_Init(Actor* thisx, PlayState* play) {
@@ -157,7 +175,7 @@ void EnHorseLinkChild_Init(Actor* thisx, PlayState* play) {
Collider_InitCylinder(play, &this->bodyCollider);
Collider_SetCylinderType1(play, &this->bodyCollider, &this->actor, &sCylinderInit);
Collider_InitJntSph(play, &this->headCollider);
- Collider_SetJntSph(play, &this->headCollider, &this->actor, &sJntSphInit, this->headElements);
+ Collider_SetJntSph(play, &this->headCollider, &this->actor, &sJntSphInit, this->headColliderElements);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColCheckInfoInit);
this->unk_1F0 = 0;
this->eyeTexIndex = 0;
@@ -451,7 +469,7 @@ void func_80A6A5A4(EnHorseLinkChild* this, PlayState* play) {
yawDiff = Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor) - this->actor.world.rot.y;
// 0.7071 = cos(pi/4)
if ((Math_CosS(yawDiff) < 0.7071f) && (this->animationIdx == 2)) {
- func_8006DD9C(&this->actor, &GET_PLAYER(play)->actor.world.pos, 300);
+ Horse_RotateToPoint(&this->actor, &GET_PLAYER(play)->actor.world.pos, 300);
}
if (SkelAnime_Update(&this->skin.skelAnime)) {
@@ -488,9 +506,9 @@ void func_80A6A7D0(EnHorseLinkChild* this, PlayState* play) {
if ((this->animationIdx == 4) || (this->animationIdx == 3) || (this->animationIdx == 2)) {
if (!this->unk_1E8) {
- func_8006DD9C(&this->actor, &player->actor.world.pos, 300);
+ Horse_RotateToPoint(&this->actor, &player->actor.world.pos, 300);
} else {
- func_8006DD9C(&this->actor, &this->actor.home.pos, 300);
+ Horse_RotateToPoint(&this->actor, &this->actor.home.pos, 300);
}
}
diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.h b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.h
index a61248c70a..a4e9b512d7 100644
--- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.h
+++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.h
@@ -2,11 +2,12 @@
#define Z_EN_HORSE_LINK_CHILD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64skin.h"
struct EnHorseLinkChild;
-typedef void (*EnHorseLinkChildActionFunc)(struct EnHorseLinkChild*, PlayState*);
+typedef void (*EnHorseLinkChildActionFunc)(struct EnHorseLinkChild*, struct PlayState*);
typedef struct EnHorseLinkChild {
/* 0x0000 */ Actor actor;
@@ -19,7 +20,7 @@ typedef struct EnHorseLinkChild {
/* 0x01F0 */ s32 unk_1F0;
/* 0x01F4 */ ColliderCylinder bodyCollider;
/* 0x0240 */ ColliderJntSph headCollider;
- /* 0x0260 */ ColliderJntSphElement headElements[1];
+ /* 0x0260 */ ColliderJntSphElement headColliderElements[1];
/* 0x02A0 */ s32 unk_2A0;
} EnHorseLinkChild; // size = 0x02A4
diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c
index 79e8998762..300711ff37 100644
--- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c
+++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c
@@ -5,6 +5,23 @@
*/
#include "z_en_horse_normal.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+#include "z64skin.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_horse_normal/object_horse_normal.h"
@@ -177,8 +194,8 @@ f32 func_80A6B30C(EnHorseNormal* this) {
}
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 300, ICHAIN_STOP),
};
void EnHorseNormal_Init(Actor* thisx, PlayState* play) {
@@ -197,7 +214,7 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) {
Collider_InitCylinder(play, &this->bodyCollider);
Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sCylinderInit1);
Collider_InitJntSph(play, &this->headCollider);
- Collider_SetJntSph(play, &this->headCollider, &this->actor, &sJntSphInit, this->headElements);
+ Collider_SetJntSph(play, &this->headCollider, &this->actor, &sJntSphInit, this->headColliderElements);
Collider_InitCylinder(play, &this->cloneCollider);
Collider_SetCylinder(play, &this->cloneCollider, &this->actor, &sCylinderInit2);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
@@ -216,7 +233,7 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) {
Actor_Kill(&this->actor);
return;
}
- } else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0)) {
+ } else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED) {
if (this->actor.world.rot.z != 7) {
Actor_Kill(&this->actor);
return;
@@ -276,7 +293,7 @@ void EnHorseNormal_Destroy(Actor* thisx, PlayState* play) {
}
void func_80A6B91C(EnHorseNormal* this, PlayState* play) {
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->action = HORSE_FOLLOW_PATH;
this->animationIdx = 6;
this->waypoint = 0;
@@ -520,7 +537,7 @@ void func_80A6C6B0(EnHorseNormal* this) {
this->unk_218 = 0.0f;
this->unk_21C = 0;
this->unk_21E = 0;
- this->actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f,
Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, 0.0f);
}
@@ -706,7 +723,7 @@ void EnHorseNormal_Draw(Actor* thisx, PlayState* play2) {
if (mtx == NULL) {
return;
}
- gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_OPA_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(POLY_OPA_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_800A63CC(&this->actor, play, &this->skin, NULL, NULL, true, 0,
SKIN_DRAW_FLAG_CUSTOM_TRANSFORMS | SKIN_DRAW_FLAG_CUSTOM_MATRIX);
diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h
index f9445eb186..01ddd44608 100644
--- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h
+++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h
@@ -2,11 +2,12 @@
#define Z_EN_HORSE_NORMAL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64skin.h"
struct EnHorseNormal;
-typedef void (*EnHorseNormalActionFunc)(struct EnHorseNormal*, PlayState*);
+typedef void (*EnHorseNormalActionFunc)(struct EnHorseNormal*, struct PlayState*);
typedef struct EnHorseNormal {
/* 0x0000 */ Actor actor;
@@ -26,7 +27,7 @@ typedef struct EnHorseNormal {
/* 0x0224 */ char unk_224[0x04];
/* 0x0228 */ ColliderCylinder bodyCollider;
/* 0x0274 */ ColliderJntSph headCollider;
- /* 0x0294 */ ColliderJntSphElement headElements[1];
+ /* 0x0294 */ ColliderJntSphElement headColliderElements[1];
/* 0x02D4 */ ColliderCylinder cloneCollider;
/* 0x0320 */ char unk_320[0x04];
/* 0x0324 */ s32 waypoint;
diff --git a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c
index dd8068cd2c..fb59c5b84a 100644
--- a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c
+++ b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c
@@ -5,9 +5,21 @@
*/
#include "z_en_horse_zelda.h"
+
+#include "libc64/math64.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_horse_zelda/object_horse_zelda.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnHorseZelda_Init(Actor* thisx, PlayState* play);
void EnHorseZelda_Destroy(Actor* thisx, PlayState* play);
@@ -97,7 +109,7 @@ static HorsePosSpeed sHorseFieldPositions[] = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 1200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 1200, ICHAIN_STOP),
};
static EnHorseZeldaActionFunc sActionFuncs[] = {
@@ -163,8 +175,8 @@ void EnHorseZelda_Init(Actor* thisx, PlayState* play) {
Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[0]);
Collider_InitCylinder(play, &this->colliderCylinder);
Collider_SetCylinderType1(play, &this->colliderCylinder, &this->actor, &sCylinderInit);
- Collider_InitJntSph(play, &this->colliderSphere);
- Collider_SetJntSph(play, &this->colliderSphere, &this->actor, &sJntSphInit, &this->colliderSphereItem);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
this->animationIndex = 0;
EnHorseZelda_SetupStop(this);
@@ -174,7 +186,7 @@ void EnHorseZelda_Destroy(Actor* thisx, PlayState* play) {
EnHorseZelda* this = (EnHorseZelda*)thisx;
Collider_DestroyCylinder(play, &this->colliderCylinder);
- Collider_DestroyJntSph(play, &this->colliderSphere);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
Skin_Free(play, &this->skin);
}
@@ -250,23 +262,23 @@ void EnHorseZelda_PostDraw(Actor* thisx, PlayState* play, Skin* skin) {
EnHorseZelda* this = (EnHorseZelda*)thisx;
s32 i;
- for (i = 0; i < this->colliderSphere.count; i++) {
- offset.x = this->colliderSphere.elements[i].dim.modelSphere.center.x;
- offset.y = this->colliderSphere.elements[i].dim.modelSphere.center.y;
- offset.z = this->colliderSphere.elements[i].dim.modelSphere.center.z;
+ for (i = 0; i < this->colliderJntSph.count; i++) {
+ offset.x = this->colliderJntSph.elements[i].dim.modelSphere.center.x;
+ offset.y = this->colliderJntSph.elements[i].dim.modelSphere.center.y;
+ offset.z = this->colliderJntSph.elements[i].dim.modelSphere.center.z;
- Skin_GetLimbPos(skin, this->colliderSphere.elements[i].dim.limb, &offset, &dst);
+ Skin_GetLimbPos(skin, this->colliderJntSph.elements[i].dim.limb, &offset, &dst);
- this->colliderSphere.elements[i].dim.worldSphere.center.x = dst.x;
- this->colliderSphere.elements[i].dim.worldSphere.center.y = dst.y;
- this->colliderSphere.elements[i].dim.worldSphere.center.z = dst.z;
+ this->colliderJntSph.elements[i].dim.worldSphere.center.x = dst.x;
+ this->colliderJntSph.elements[i].dim.worldSphere.center.y = dst.y;
+ this->colliderJntSph.elements[i].dim.worldSphere.center.z = dst.z;
- this->colliderSphere.elements[i].dim.worldSphere.radius =
- this->colliderSphere.elements[i].dim.modelSphere.radius * this->colliderSphere.elements[i].dim.scale;
+ this->colliderJntSph.elements[i].dim.worldSphere.radius =
+ this->colliderJntSph.elements[i].dim.modelSphere.radius * this->colliderJntSph.elements[i].dim.scale;
}
//! @bug see relevant comment in `EnHorse_SkinCallback1`
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSphere.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
void EnHorseZelda_Draw(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h
index 7ce6cace3a..86b851c77b 100644
--- a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h
+++ b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h
@@ -2,11 +2,12 @@
#define Z_EN_HORSE_ZELDA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64skin.h"
struct EnHorseZelda;
-typedef void (*EnHorseZeldaActionFunc)(struct EnHorseZelda*, PlayState*);
+typedef void (*EnHorseZeldaActionFunc)(struct EnHorseZelda*, struct PlayState*);
typedef struct EnHorseZelda {
/* 0x0000 */ Actor actor;
@@ -19,8 +20,8 @@ typedef struct EnHorseZelda {
/* 0x01F4 */ f32 floorYForwards;
/* 0x01F8 */ char unk_1F8[0x4];
/* 0x01FC */ ColliderCylinder colliderCylinder;
- /* 0x0248 */ ColliderJntSph colliderSphere;
- /* 0x0268 */ ColliderJntSphElement colliderSphereItem;
+ /* 0x0248 */ ColliderJntSph colliderJntSph;
+ /* 0x0268 */ ColliderJntSphElement colliderJntSphElements[1];
} EnHorseZelda; // size = 0x02A8
#endif
diff --git a/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/src/overlays/actors/ovl_En_Hs/z_en_hs.c
index b5c521da2d..935fdedd97 100644
--- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c
+++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c
@@ -5,7 +5,18 @@
*/
#include "z_en_hs.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_hs/object_hs.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -206,7 +217,7 @@ void func_80A6E9AC(EnHs* this, PlayState* play) {
s16 yawDiff;
if (Actor_TalkOfferAccepted(&this->actor, play)) {
- if (func_8002F368(play) == EXCH_ITEM_COJIRO) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_COJIRO) {
player->actor.textId = 0x10B2;
func_80A6E3A0(this, func_80A6E8CC);
Animation_Change(&this->skelAnime, &object_hs_Anim_000304, 1.0f, 0.0f,
diff --git a/src/overlays/actors/ovl_En_Hs/z_en_hs.h b/src/overlays/actors/ovl_En_Hs/z_en_hs.h
index f4b89ce153..f938b51518 100644
--- a/src/overlays/actors/ovl_En_Hs/z_en_hs.h
+++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.h
@@ -2,11 +2,11 @@
#define Z_EN_HS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnHs;
-typedef void (*EnHsActionFunc)(struct EnHs*, PlayState*);
+typedef void (*EnHsActionFunc)(struct EnHs*, struct PlayState*);
typedef struct EnHs {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c
index b1b04107f0..71005a3afb 100644
--- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c
+++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c
@@ -5,7 +5,16 @@
*/
#include "z_en_hs2.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+
#include "assets/objects/object_hs/object_hs.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
diff --git a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.h b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.h
index e2f66f79c3..dec1533f89 100644
--- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.h
+++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.h
@@ -2,11 +2,11 @@
#define Z_EN_HS2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnHs2;
-typedef void (*EnHs2ActionFunc)(struct EnHs2*, PlayState*);
+typedef void (*EnHs2ActionFunc)(struct EnHs2*, struct PlayState*);
typedef struct EnHs2 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/src/overlays/actors/ovl_En_Hy/z_en_hy.c
index 3ad2e8b943..8680d13aa6 100644
--- a/src/overlays/actors/ovl_En_Hy/z_en_hy.c
+++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.c
@@ -5,6 +5,22 @@
*/
#include "z_en_hy.h"
+
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_aob/object_aob.h"
#include "assets/objects/object_ahg/object_ahg.h"
#include "assets/objects/object_bob/object_bob.h"
@@ -15,22 +31,22 @@
#include "assets/objects/object_cob/object_cob.h"
#include "assets/objects/object_os_anime/object_os_anime.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnHy_Init(Actor* thisx, PlayState* play);
void EnHy_Destroy(Actor* thisx, PlayState* play);
void EnHy_Update(Actor* thisx, PlayState* play);
void EnHy_Draw(Actor* thisx, PlayState* play);
-void EnHy_InitImpl(EnHy* this, PlayState* play);
-void func_80A7134C(EnHy* this, PlayState* play);
-void func_80A71530(EnHy* this, PlayState* play);
-void func_80A711B4(EnHy* this, PlayState* play);
-void func_80A712C0(EnHy* this, PlayState* play);
-void func_80A710F8(EnHy* this, PlayState* play);
-void func_80A7127C(EnHy* this, PlayState* play);
+void EnHy_WaitForObjects(EnHy* this, PlayState* play);
+void EnHy_Pace(EnHy* this, PlayState* play);
+void EnHy_FinishGivingDogFoundReward(EnHy* this, PlayState* play);
+void EnHy_Walk(EnHy* this, PlayState* play);
+void EnHy_SetupPace(EnHy* this, PlayState* play);
+void EnHy_WatchDog(EnHy* this, PlayState* play);
+void EnHy_Fidget(EnHy* this, PlayState* play);
void EnHy_DoNothing(EnHy* this, PlayState* play);
-void func_80A714C4(EnHy* this, PlayState* play);
+void EnHy_WaitDogFoundRewardGiven(EnHy* this, PlayState* play);
ActorProfile En_Hy_Profile = {
/**/ ACTOR_EN_HY,
@@ -44,7 +60,7 @@ ActorProfile En_Hy_Profile = {
/**/ EnHy_Draw,
};
-static ColliderCylinderInit sColCylInit = {
+static ColliderCylinderInit sColliderCylinderInit = {
{
COL_MATERIAL_NONE,
AT_NONE,
@@ -67,82 +83,110 @@ static ColliderCylinderInit sColCylInit = {
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
// NULL-terminated arrays of eye textures
-static void* sEyeTexturesAOB[] = { gDogLadyEyeOpenTex, gDogLadyEyeHalfTex, gDogLadyEyeClosedTex, NULL };
-static void* sEyeTexturesAHG7[] = { object_ahg_Tex_00057C, object_ahg_Tex_00067C, object_ahg_Tex_00077C, NULL };
-static void* sEyeTexturesBBA[] = { object_bba_Tex_0004C8, NULL };
-static void* sEyeTexturesBJI13[] = { object_bji_Tex_0005FC, object_bji_Tex_0009FC, object_bji_Tex_000DFC, NULL };
-static void* sEyeTexturesBOJ2[] = { object_boj_Tex_0005FC, object_boj_Tex_0006FC, object_boj_Tex_0007FC, NULL };
-static void* sEyeTexturesBOB[] = { object_bob_Tex_0007C8, object_bob_Tex_000FC8, object_bob_Tex_0017C8, NULL };
+static void* sHylianWoman1EyeTextures[] = {
+ gHylianWoman1EyeOpenTex,
+ gHylianWoman1EyeHalfTex,
+ gHylianWoman1EyeClosedTex,
+ NULL,
+};
+static void* sHylianMan1EyeTextures[] = {
+ gHylianMan1BeardedEyeOpenTex,
+ gHylianMan1BeardedEyeHalfTex,
+ gHylianMan1BeardedEyeClosedTex,
+ NULL,
+};
+static void* sHylainOldWomanEyeTextures[] = {
+ gHylianOldWomanEyeTex,
+ NULL,
+};
+static void* sHylianOldManEyeTextures[] = {
+ gHylianOldManEyeOpenTex,
+ gHylianOldManEyeHalfTex,
+ gHylianOldManEyeClosedTex,
+ NULL,
+};
+static void* sHylianMan2EyeTextures[] = {
+ gHylianMan2MustachedEyeOpenTex,
+ gHylianMan2MustachedEyeHalfTex,
+ gHylianMan2MustachedEyeClosedTex,
+ NULL,
+};
+static void* sHylianWoman2EyeTextures[] = {
+ gHylianWoman2EyeOpenTex,
+ gHylianWoman2EyeHalfTex,
+ gHylianWoman2EyeClosedTex,
+ NULL,
+};
typedef struct EnHyHeadInfo {
- /* 0x00 */ s16 objectId;
- /* 0x04 */ Gfx* headDList;
- /* 0x08 */ void** eyeTextures;
+ /* 0x0 */ s16 objectId;
+ /* 0x4 */ Gfx* headDList;
+ /* 0x8 */ void** eyeTextures;
} EnHyHeadInfo; // size = 0xC
-typedef enum EnHyHeadIndex {
- /* 0 */ ENHY_HEAD_AOB,
- /* 1 */ ENHY_HEAD_BOB,
- /* 2 */ ENHY_HEAD_BOJ_2,
- /* 3 */ ENHY_HEAD_BOJ_3,
- /* 4 */ ENHY_HEAD_BOJ_4,
- /* 5 */ ENHY_HEAD_BOJ_5,
- /* 6 */ ENHY_HEAD_BOJ_6,
- /* 7 */ ENHY_HEAD_AHG_7,
- /* 8 */ ENHY_HEAD_AHG_8,
- /* 9 */ ENHY_HEAD_AHG_9,
- /* 10 */ ENHY_HEAD_BBA,
- /* 11 */ ENHY_HEAD_CNE_11,
- /* 12 */ ENHY_HEAD_CNE_12,
- /* 13 */ ENHY_HEAD_BJI_13,
- /* 14 */ ENHY_HEAD_BJI_14,
- /* 15 */ ENHY_HEAD_COB
+typedef enum {
+ /* 0 */ ENHY_HEAD_WOMAN_1,
+ /* 1 */ ENHY_HEAD_WOMAN_2,
+ /* 2 */ ENHY_HEAD_MAN_2_MUSTACHE,
+ /* 3 */ ENHY_HEAD_MAN_2_BALD,
+ /* 4 */ ENHY_HEAD_MAN_2_LONG_HAIR,
+ /* 5 */ ENHY_HEAD_MAN_2_ALT_MUSTACHE,
+ /* 6 */ ENHY_HEAD_MAN_2_BEARD,
+ /* 7 */ ENHY_HEAD_MAN_1_BEARD,
+ /* 8 */ ENHY_HEAD_MAN_1_SHAVED,
+ /* 9 */ ENHY_HEAD_MAN_1_BOWL_CUT,
+ /* 10 */ ENHY_HEAD_OLD_WOMAN,
+ /* 11 */ ENHY_HEAD_YOUNG_WOMAN_BROWN_HAIR,
+ /* 12 */ ENHY_HEAD_YOUNG_WOMAN_ORANGE_HAIR,
+ /* 13 */ ENHY_HEAD_OLD_MAN,
+ /* 14 */ ENHY_HEAD_OLD_MAN_BALD,
+ /* 15 */ ENHY_HEAD_WOMAN_3
} EnHyHeadIndex;
static EnHyHeadInfo sHeadInfo[] = {
- /* ENHY_HEAD_AOB */ { OBJECT_AOB, gDogLadyHeadDL, sEyeTexturesAOB },
- /* ENHY_HEAD_BOB */ { OBJECT_BOB, object_bob_DL_003B78, sEyeTexturesBOB },
- /* ENHY_HEAD_BOJ_2 */ { OBJECT_BOJ, object_boj_DL_0026F0, sEyeTexturesBOJ2 },
- /* ENHY_HEAD_BOJ_3 */ { OBJECT_BOJ, object_boj_DL_0052E0, NULL },
- /* ENHY_HEAD_BOJ_4 */ { OBJECT_BOJ, object_boj_DL_005528, NULL },
- /* ENHY_HEAD_BOJ_5 */ { OBJECT_BOJ, object_boj_DL_005738, NULL },
- /* ENHY_HEAD_BOJ_6 */ { OBJECT_BOJ, object_boj_DL_0059B0, NULL },
- /* ENHY_HEAD_AHG_7 */ { OBJECT_AHG, object_ahg_DL_0030F0, sEyeTexturesAHG7 },
- /* ENHY_HEAD_AHG_8 */ { OBJECT_AHG, object_ahg_DL_005508, NULL },
- /* ENHY_HEAD_AHG_9 */ { OBJECT_AHG, object_ahg_DL_005728, NULL },
- /* ENHY_HEAD_BBA */ { OBJECT_BBA, object_bba_DL_002948, sEyeTexturesBBA },
- /* ENHY_HEAD_CNE_11 */ { OBJECT_CNE, gCneHeadBrownHairDL, NULL },
- /* ENHY_HEAD_CNE_12 */ { OBJECT_CNE, gCneHeadOrangeHairDL, NULL },
- /* ENHY_HEAD_BJI_13 */ { OBJECT_BJI, object_bji_DL_002560, sEyeTexturesBJI13 },
- /* ENHY_HEAD_BJI_14 */ { OBJECT_BJI, object_bji_DL_003F68, NULL },
- /* ENHY_HEAD_COB */ { OBJECT_COB, object_cob_DL_001300, NULL },
+ /* ENHY_HEAD_WOMAN_1 */ { OBJECT_AOB, gHylianWoman1HeadDL, sHylianWoman1EyeTextures },
+ /* ENHY_HEAD_WOMAN_2 */ { OBJECT_BOB, gHylianWoman2HeadDL, sHylianWoman2EyeTextures },
+ /* ENHY_HEAD_MAN_2_MUSTACHE */ { OBJECT_BOJ, gHylianMan2MustachedHeadDL, sHylianMan2EyeTextures },
+ /* ENHY_HEAD_MAN_2_BALD */ { OBJECT_BOJ, gHylianMan2BaldHeadDL, NULL },
+ /* ENHY_HEAD_MAN_2_LONG_HAIR */ { OBJECT_BOJ, gHylianMan2LongHairHeadDL, NULL },
+ /* ENHY_HEAD_MAN_2_ALT_MUSTACHE */ { OBJECT_BOJ, gHylianMan2AltMustachedHeadDL, NULL },
+ /* ENHY_HEAD_MAN_2_BEARD */ { OBJECT_BOJ, gHylianMan2BeardedHeadDL, NULL },
+ /* ENHY_HEAD_MAN_1_BEARD */ { OBJECT_AHG, gHylianMan1BeardedHeadDL, sHylianMan1EyeTextures },
+ /* ENHY_HEAD_MAN_1_SHAVED */ { OBJECT_AHG, gHylianMan1ShavedHeadDL, NULL },
+ /* ENHY_HEAD_MAN_1_BOWL_CUT */ { OBJECT_AHG, gHylianMan1BowlCutHeadDL, NULL },
+ /* ENHY_HEAD_OLD_WOMAN */ { OBJECT_BBA, gHylianOldWomanHeadDL, sHylainOldWomanEyeTextures },
+ /* ENHY_HEAD_YOUNG_WOMAN_BROWN_HAIR */ { OBJECT_CNE, gHylianYoungWomanBrownHairHeadDL, NULL },
+ /* ENHY_HEAD_YOUNG_WOMAN_ORANGE_HAIR */ { OBJECT_CNE, gHylianYoungWomanOrangeHairHeadDL, NULL },
+ /* ENHY_HEAD_OLD_MAN */ { OBJECT_BJI, gHylianOldManHeadDL, sHylianOldManEyeTextures },
+ /* ENHY_HEAD_OLD_MAN_BALD */ { OBJECT_BJI, gHylianOldManBaldHeadDL, NULL },
+ /* ENHY_HEAD_WOMAN_3 */ { OBJECT_COB, gHylianWoman3HeadDL, NULL },
};
typedef struct EnHySkeletonInfo {
- /* 0x00 */ s16 objectId;
- /* 0x04 */ FlexSkeletonHeader* skeleton;
+ /* 0x0 */ s16 objectId;
+ /* 0x4 */ FlexSkeletonHeader* skeleton;
} EnHySkeletonInfo; // size = 0x8
-typedef enum EnHySkeletonIndex {
- /* 0 */ ENHY_SKEL_AOB,
- /* 1 */ ENHY_SKEL_BOB,
- /* 2 */ ENHY_SKEL_BOJ,
- /* 3 */ ENHY_SKEL_AHG,
- /* 4 */ ENHY_SKEL_BBA,
- /* 5 */ ENHY_SKEL_CNE,
- /* 6 */ ENHY_SKEL_BJI,
- /* 7 */ ENHY_SKEL_COB
+typedef enum {
+ /* 0 */ ENHY_SKEL_WOMAN_1,
+ /* 1 */ ENHY_SKEL_WOMAN_2,
+ /* 2 */ ENHY_SKEL_MAN_2,
+ /* 3 */ ENHY_SKEL_MAN_1,
+ /* 4 */ ENHY_SKEL_OLD_WOMAN,
+ /* 5 */ ENHY_SKEL_YOUNG_WOMAN,
+ /* 6 */ ENHY_SKEL_OLD_MAN,
+ /* 7 */ ENHY_SKEL_WOMAN_3
} EnHySkeletonIndex;
static EnHySkeletonInfo sSkeletonInfo[] = {
- /* ENHY_SKEL_AOB */ { OBJECT_AOB, &gDogLadySkel },
- /* ENHY_SKEL_BOB */ { OBJECT_BOB, &object_bob_Skel_0000F0 },
- /* ENHY_SKEL_BOJ */ { OBJECT_BOJ, &object_boj_Skel_0000F0 },
- /* ENHY_SKEL_AHG */ { OBJECT_AHG, &object_ahg_Skel_0000F0 },
- /* ENHY_SKEL_BBA */ { OBJECT_BBA, &object_bba_Skel_0000F0 },
- /* ENHY_SKEL_CNE */ { OBJECT_CNE, &gCneSkel },
- /* ENHY_SKEL_BJI */ { OBJECT_BJI, &object_bji_Skel_0000F0 },
- /* ENHY_SKEL_COB */ { OBJECT_COB, &object_cob_Skel_0021F8 },
+ /* ENHY_SKEL_WOMAN_1 */ { OBJECT_AOB, &gHylianWoman1Skel },
+ /* ENHY_SKEL_WOMAN_2 */ { OBJECT_BOB, &gHylianWoman2Skel },
+ /* ENHY_SKEL_MAN_2 */ { OBJECT_BOJ, &gHylianMan2Skel },
+ /* ENHY_SKEL_MAN_1 */ { OBJECT_AHG, &gHylianMan1Skel },
+ /* ENHY_SKEL_OLD_WOMAN */ { OBJECT_BBA, &gHylianOldWomanSkel },
+ /* ENHY_SKEL_YOUNG_WOMAN */ { OBJECT_CNE, &gHylianYoungWomanSkel },
+ /* ENHY_SKEL_OLD_MAN */ { OBJECT_BJI, &gHylianOldManSkel },
+ /* ENHY_SKEL_WOMAN_3 */ { OBJECT_COB, &gHylianWoman3Skel },
};
typedef enum EnHyAnimationIndex {
@@ -176,117 +220,264 @@ typedef enum EnHyAnimationIndex {
} EnHyAnimationIndex;
static AnimationInfo sAnimationInfo[] = {
- /* ENHY_ANIM_0 */ { &gObjOsAnim_092C, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_1 */ { &gObjOsAnim_0228, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_2 */ { &gObjOsAnim_4CF4, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_3 */ { &gObjOsAnim_16EC, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_4 */ { &gObjOsAnim_265C, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_5 */ { &gObjOsAnim_42AC, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_6 */ { &gObjOsAnim_28DC, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_7 */ { &gObjOsAnim_2160, 1.0f, 0.0f, -1.0f, 0x00, -10.0f },
- /* ENHY_ANIM_8 */ { &gObjOsAnim_265C, 1.0f, 0.0f, -1.0f, 0x00, -10.0f },
- /* ENHY_ANIM_9 */ { &gObjOsAnim_4E90, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_10 */ { &gObjOsAnim_1E7C, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_11 */ { &gObjOsAnim_0170, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_12 */ { &gObjOsAnim_00B4, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_13 */ { &gObjOsAnim_3D84, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_14 */ { &gObjOsAnim_41F8, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_15 */ { &gObjOsAnim_300C, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_16 */ { &gObjOsAnim_31B0, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_17 */ { &gObjOsAnim_31B0, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
- /* ENHY_ANIM_18 */ { &gObjOsAnim_2D0C, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_19 */ { &gObjOsAnim_2DC0, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_20 */ { &gObjOsAnim_4408, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_21 */ { &gObjOsAnim_1F18, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_22 */ { &gObjOsAnim_4F28, 1.0f, 0.0f, -1.0f, 0x00, 0.0f },
- /* ENHY_ANIM_23 */ { &gObjOsAnim_33B4, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
- /* ENHY_ANIM_24 */ { &gObjOsAnim_12E8, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
- /* ENHY_ANIM_25 */ { &gObjOsAnim_0FE4, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
- /* ENHY_ANIM_26 */ { &gObjOsAnim_0BFC, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
+ /* ENHY_ANIM_0 */ { &gObjOsAnim_092C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_1 */ { &gObjOsAnim_0228, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_2 */ { &gObjOsAnim_4CF4, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_3 */ { &gObjOsAnim_16EC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_4 */ { &gObjOsAnim_265C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_5 */ { &gObjOsAnim_42AC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_6 */ { &gObjOsAnim_28DC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_7 */ { &gObjOsAnim_2160, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
+ /* ENHY_ANIM_8 */ { &gObjOsAnim_265C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
+ /* ENHY_ANIM_9 */ { &gObjOsAnim_4E90, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_10 */ { &gObjOsAnim_1E7C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_11 */ { &gObjOsAnim_0170, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_12 */ { &gObjOsAnim_00B4, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_13 */ { &gObjOsAnim_3D84, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_14 */ { &gObjOsAnim_41F8, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_15 */ { &gObjOsAnim_300C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_16 */ { &gObjOsAnim_31B0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_17 */ { &gObjOsAnim_31B0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
+ /* ENHY_ANIM_18 */ { &gObjOsAnim_2D0C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_19 */ { &gObjOsAnim_2DC0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_20 */ { &gObjOsAnim_4408, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_21 */ { &gObjOsAnim_1F18, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_22 */ { &gObjOsAnim_4F28, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ /* ENHY_ANIM_23 */ { &gObjOsAnim_33B4, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
+ /* ENHY_ANIM_24 */ { &gObjOsAnim_12E8, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
+ /* ENHY_ANIM_25 */ { &gObjOsAnim_0FE4, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
+ /* ENHY_ANIM_26 */ { &gObjOsAnim_0BFC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
};
typedef struct EnHyModelInfo {
- /* 0x00 */ u8 headInfoIndex; // EnHyHeadIndex
- /* 0x01 */ u8 skelInfoIndex2; // EnHySkeletonIndex, see EnHy.objectSlotSkel2
- /* 0x02 */ Color_RGBA8 envColorSeg8;
- /* 0x06 */ u8 skelInfoIndex1; // EnHySkeletonIndex, see EnHy.objectSlotSkel1
- /* 0x07 */ Color_RGBA8 envColorSeg9;
- /* 0x0B */ u8 animInfoIndex; // EnHyAnimationIndex
-} EnHyModelInfo; // size = 0xC
+ /* 0x0 */ u8 headInfoIndex; // EnHyHeadIndex
+ /* 0x1 */ u8 upperSkelInfoIndex; // EnHySkeletonIndex, see EnHy.objectSlotUpperSkel
+ /* 0x2 */ Color_RGBA8 envColorSeg8;
+ /* 0x6 */ u8 lowerSkelInfoIndex; // EnHySkeletonIndex, see EnHy.objectSlotLowerSkel
+ /* 0x7 */ Color_RGBA8 envColorSeg9;
+ /* 0xB */ u8 animInfoIndex; // EnHyAnimationIndex
+} EnHyModelInfo; // size = 0xC
static EnHyModelInfo sModelInfo[] = {
- /* ENHY_TYPE_AOB */
- { ENHY_HEAD_AOB, ENHY_SKEL_AOB, { 255, 255, 255, 255 }, ENHY_SKEL_AOB, { 255, 255, 255, 255 }, ENHY_ANIM_0 },
- /* ENHY_TYPE_COB */
- { ENHY_HEAD_COB, ENHY_SKEL_COB, { 255, 255, 255, 255 }, ENHY_SKEL_COB, { 255, 255, 255, 255 }, ENHY_ANIM_22 },
- /* ENHY_TYPE_AHG_2 */
- { ENHY_HEAD_AHG_7, ENHY_SKEL_AHG, { 255, 255, 255, 255 }, ENHY_SKEL_AHG, { 255, 255, 255, 255 }, ENHY_ANIM_1 },
- /* ENHY_TYPE_BOJ_3 */
- { ENHY_HEAD_BOJ_3, ENHY_SKEL_BOJ, { 255, 255, 255, 0 }, ENHY_SKEL_BOJ, { 55, 55, 255, 0 }, ENHY_ANIM_15 },
- /* ENHY_TYPE_AHG_4 */
- { ENHY_HEAD_AHG_8, ENHY_SKEL_AHG, { 0, 0, 0, 0 }, ENHY_SKEL_AHG, { 255, 0, 0, 0 }, ENHY_ANIM_11 },
- /* ENHY_TYPE_BOJ_5 */
- { ENHY_HEAD_BOJ_4, ENHY_SKEL_BOJ, { 50, 80, 0, 0 }, ENHY_SKEL_BOJ, { 50, 80, 0, 0 }, ENHY_ANIM_16 },
- /* ENHY_TYPE_BBA */
- { ENHY_HEAD_BBA, ENHY_SKEL_BBA, { 255, 255, 255, 255 }, ENHY_SKEL_BBA, { 255, 255, 255, 255 }, ENHY_ANIM_10 },
- /* ENHY_TYPE_BJI_7 */
- { ENHY_HEAD_BJI_13, ENHY_SKEL_BJI, { 0, 50, 160, 0 }, ENHY_SKEL_BJI, { 255, 255, 255, 0 }, ENHY_ANIM_4 },
- /* ENHY_TYPE_CNE_8 */
- { ENHY_HEAD_CNE_11, ENHY_SKEL_CNE, { 160, 180, 255, 0 }, ENHY_SKEL_CNE, { 160, 180, 255, 0 }, ENHY_ANIM_9 },
- /* ENHY_TYPE_BOJ_9 */
- { ENHY_HEAD_BOJ_2, ENHY_SKEL_BOJ, { 220, 0, 80, 0 }, ENHY_SKEL_BOJ, { 255, 255, 255, 0 }, ENHY_ANIM_13 },
- /* ENHY_TYPE_BOJ_10 */
- { ENHY_HEAD_BOJ_2, ENHY_SKEL_BOJ, { 0, 130, 220, 0 }, ENHY_SKEL_BOJ, { 255, 255, 255, 0 }, ENHY_ANIM_14 },
- /* ENHY_TYPE_CNE_11 */
- { ENHY_HEAD_CNE_12, ENHY_SKEL_CNE, { 70, 160, 230, 0 }, ENHY_SKEL_CNE, { 255, 255, 100, 0 }, ENHY_ANIM_20 },
- /* ENHY_TYPE_BOJ_12 */
- { ENHY_HEAD_BOJ_5, ENHY_SKEL_BOJ, { 150, 60, 90, 0 }, ENHY_SKEL_BOJ, { 255, 240, 150, 0 }, ENHY_ANIM_18 },
- /* ENHY_TYPE_AHG_13 */
- { ENHY_HEAD_AHG_9, ENHY_SKEL_AHG, { 200, 180, 255, 0 }, ENHY_SKEL_AHG, { 200, 180, 255, 0 }, ENHY_ANIM_12 },
- /* ENHY_TYPE_BOJ_14 */
- { ENHY_HEAD_BOJ_6, ENHY_SKEL_BOJ, { 140, 255, 110, 0 }, ENHY_SKEL_BOJ, { 255, 255, 255, 0 }, ENHY_ANIM_19 },
- /* ENHY_TYPE_BJI_15 */
- { ENHY_HEAD_BJI_14, ENHY_SKEL_BJI, { 130, 70, 20, 0 }, ENHY_SKEL_BJI, { 130, 180, 255, 0 }, ENHY_ANIM_21 },
- /* ENHY_TYPE_BOJ_16 */
- { ENHY_HEAD_BOJ_2, ENHY_SKEL_BOJ, { 255, 255, 255, 255 }, ENHY_SKEL_BOJ, { 255, 255, 255, 255 }, ENHY_ANIM_5 },
- /* ENHY_TYPE_AHG_17 */
- { ENHY_HEAD_AHG_8, ENHY_SKEL_AHG, { 90, 100, 20, 255 }, ENHY_SKEL_AHG, { 100, 140, 50, 255 }, ENHY_ANIM_11 },
- /* ENHY_TYPE_BOB_18 */
- { ENHY_HEAD_BOB, ENHY_SKEL_BOB, { 255, 255, 255, 255 }, ENHY_SKEL_BOB, { 255, 255, 255, 255 }, ENHY_ANIM_6 },
- /* ENHY_TYPE_BJI_19 */
- { ENHY_HEAD_BJI_14, ENHY_SKEL_BJI, { 160, 0, 100, 0 }, ENHY_SKEL_BJI, { 70, 130, 210, 0 }, ENHY_ANIM_21 },
- /* ENHY_TYPE_AHG_20 */
- { ENHY_HEAD_AHG_9, ENHY_SKEL_AHG, { 160, 230, 0, 0 }, ENHY_SKEL_AHG, { 0, 150, 110, 0 }, ENHY_ANIM_12 },
+ /* ENHY_TYPE_DOG_LADY */
+ {
+ ENHY_HEAD_WOMAN_1,
+ ENHY_SKEL_WOMAN_1,
+ { 255, 255, 255, 255 },
+ ENHY_SKEL_WOMAN_1,
+ { 255, 255, 255, 255 },
+ ENHY_ANIM_0,
+ },
+ /* ENHY_TYPE_WOMAN_3 */
+ {
+ ENHY_HEAD_WOMAN_3,
+ ENHY_SKEL_WOMAN_3,
+ { 255, 255, 255, 255 },
+ ENHY_SKEL_WOMAN_3,
+ { 255, 255, 255, 255 },
+ ENHY_ANIM_22,
+ },
+ /* ENHY_TYPE_MAN_1_BEARD */
+ {
+ ENHY_HEAD_MAN_1_BEARD,
+ ENHY_SKEL_MAN_1,
+ { 255, 255, 255, 255 },
+ ENHY_SKEL_MAN_1,
+ { 255, 255, 255, 255 },
+ ENHY_ANIM_1,
+ },
+ /* ENHY_TYPE_MAN_2_BALD */
+ {
+ ENHY_HEAD_MAN_2_BALD,
+ ENHY_SKEL_MAN_2,
+ { 255, 255, 255, 0 },
+ ENHY_SKEL_MAN_2,
+ { 55, 55, 255, 0 },
+ ENHY_ANIM_15,
+ },
+ /* ENHY_TYPE_MAN_1_SHAVED_BLACK_SHIRT */
+ {
+ ENHY_HEAD_MAN_1_SHAVED,
+ ENHY_SKEL_MAN_1,
+ { 0, 0, 0, 0 },
+ ENHY_SKEL_MAN_1,
+ { 255, 0, 0, 0 },
+ ENHY_ANIM_11,
+ },
+ /* ENHY_TYPE_BEGGAR */
+ {
+ ENHY_HEAD_MAN_2_LONG_HAIR,
+ ENHY_SKEL_MAN_2,
+ { 50, 80, 0, 0 },
+ ENHY_SKEL_MAN_2,
+ { 50, 80, 0, 0 },
+ ENHY_ANIM_16,
+ },
+ /* ENHY_TYPE_OLD_WOMAN */
+ {
+ ENHY_HEAD_OLD_WOMAN,
+ ENHY_SKEL_OLD_WOMAN,
+ { 255, 255, 255, 255 },
+ ENHY_SKEL_OLD_WOMAN,
+ { 255, 255, 255, 255 },
+ ENHY_ANIM_10,
+ },
+ /* ENHY_TYPE_OLD_MAN */
+ {
+ ENHY_HEAD_OLD_MAN,
+ ENHY_SKEL_OLD_MAN,
+ { 0, 50, 160, 0 },
+ ENHY_SKEL_OLD_MAN,
+ { 255, 255, 255, 0 },
+ ENHY_ANIM_4,
+ },
+ /* ENHY_TYPE_YOUNG_WOMAN_BROWN_HAIR */
+ {
+ ENHY_HEAD_YOUNG_WOMAN_BROWN_HAIR,
+ ENHY_SKEL_YOUNG_WOMAN,
+ { 160, 180, 255, 0 },
+ ENHY_SKEL_YOUNG_WOMAN,
+ { 160, 180, 255, 0 },
+ ENHY_ANIM_9,
+ },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT */
+ {
+ ENHY_HEAD_MAN_2_MUSTACHE,
+ ENHY_SKEL_MAN_2,
+ { 220, 0, 80, 0 },
+ ENHY_SKEL_MAN_2,
+ { 255, 255, 255, 0 },
+ ENHY_ANIM_13,
+ },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT */
+ {
+ ENHY_HEAD_MAN_2_MUSTACHE,
+ ENHY_SKEL_MAN_2,
+ { 0, 130, 220, 0 },
+ ENHY_SKEL_MAN_2,
+ { 255, 255, 255, 0 },
+ ENHY_ANIM_14,
+ },
+ /* ENHY_TYPE_YOUNG_WOMAN_ORANGE_HAIR */
+ {
+ ENHY_HEAD_YOUNG_WOMAN_ORANGE_HAIR,
+ ENHY_SKEL_YOUNG_WOMAN,
+ { 70, 160, 230, 0 },
+ ENHY_SKEL_YOUNG_WOMAN,
+ { 255, 255, 100, 0 },
+ ENHY_ANIM_20,
+ },
+ /* ENHY_TYPE_MAN_2_ALT_MUSTACHE */
+ {
+ ENHY_HEAD_MAN_2_ALT_MUSTACHE,
+ ENHY_SKEL_MAN_2,
+ { 150, 60, 90, 0 },
+ ENHY_SKEL_MAN_2,
+ { 255, 240, 150, 0 },
+ ENHY_ANIM_18,
+ },
+ /* ENHY_TYPE_MAN_1_BOWL_CUT_PURPLE_SHIRT */
+ {
+ ENHY_HEAD_MAN_1_BOWL_CUT,
+ ENHY_SKEL_MAN_1,
+ { 200, 180, 255, 0 },
+ ENHY_SKEL_MAN_1,
+ { 200, 180, 255, 0 },
+ ENHY_ANIM_12,
+ },
+ /* ENHY_TYPE_MAN_2_BEARD */
+ {
+ ENHY_HEAD_MAN_2_BEARD,
+ ENHY_SKEL_MAN_2,
+ { 140, 255, 110, 0 },
+ ENHY_SKEL_MAN_2,
+ { 255, 255, 255, 0 },
+ ENHY_ANIM_19,
+ },
+ /* ENHY_TYPE_OLD_MAN_BALD_BROWN_ROBE */
+ {
+ ENHY_HEAD_OLD_MAN_BALD,
+ ENHY_SKEL_OLD_MAN,
+ { 130, 70, 20, 0 },
+ ENHY_SKEL_OLD_MAN,
+ { 130, 180, 255, 0 },
+ ENHY_ANIM_21,
+ },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_WHITE_SHIRT */
+ {
+ ENHY_HEAD_MAN_2_MUSTACHE,
+ ENHY_SKEL_MAN_2,
+ { 255, 255, 255, 255 },
+ ENHY_SKEL_MAN_2,
+ { 255, 255, 255, 255 },
+ ENHY_ANIM_5,
+ },
+ /* ENHY_TYPE_MAN_1_SHAVED_GREEN_SHIRT */
+ {
+ ENHY_HEAD_MAN_1_SHAVED,
+ ENHY_SKEL_MAN_1,
+ { 90, 100, 20, 255 },
+ ENHY_SKEL_MAN_1,
+ { 100, 140, 50, 255 },
+ ENHY_ANIM_11,
+ },
+ /* ENHY_TYPE_WOMAN_2 */
+ {
+ ENHY_HEAD_WOMAN_2,
+ ENHY_SKEL_WOMAN_2,
+ { 255, 255, 255, 255 },
+ ENHY_SKEL_WOMAN_2,
+ { 255, 255, 255, 255 },
+ ENHY_ANIM_6,
+ },
+ /* ENHY_TYPE_OLD_MAN_BALD_PURPLE_ROBE */
+ {
+ ENHY_HEAD_OLD_MAN_BALD,
+ ENHY_SKEL_OLD_MAN,
+ { 160, 0, 100, 0 },
+ ENHY_SKEL_OLD_MAN,
+ { 70, 130, 210, 0 },
+ ENHY_ANIM_21,
+ },
+ /* ENHY_TYPE_MAN_1_BOWL_CUT_GREEN_SHIRT */
+ {
+ ENHY_HEAD_MAN_1_BOWL_CUT,
+ ENHY_SKEL_MAN_1,
+ { 160, 230, 0, 0 },
+ ENHY_SKEL_MAN_1,
+ { 0, 150, 110, 0 },
+ ENHY_ANIM_12,
+ },
};
typedef struct EnHyColliderInfo {
- /* 0x00 */ Vec3s offset;
- /* 0x06 */ s16 radius;
- /* 0x08 */ s16 height;
+ /* 0x0 */ Vec3s offset;
+ /* 0x6 */ s16 radius;
+ /* 0x8 */ s16 height;
} EnHyColliderInfo; // size 0xA
static EnHyColliderInfo sColliderInfo[] = {
- /* ENHY_TYPE_AOB */ { { 0, 0, 4 }, 24, 70 },
- /* ENHY_TYPE_COB */ { { 0, 0, 8 }, 28, 62 },
- /* ENHY_TYPE_AHG_2 */ { { 0, 0, 4 }, 20, 60 },
- /* ENHY_TYPE_BOJ_3 */ { { 0, 0, 2 }, 20, 60 },
- /* ENHY_TYPE_AHG_4 */ { { 0, 0, -2 }, 20, 60 },
- /* ENHY_TYPE_BOJ_5 */ { { 0, 0, 8 }, 24, 40 },
- /* ENHY_TYPE_BBA */ { { 0, 0, 10 }, 26, 40 },
- /* ENHY_TYPE_BJI_7 */ { { 0, 0, 12 }, 26, 58 },
- /* ENHY_TYPE_CNE_8 */ { { 0, 0, 2 }, 18, 68 },
- /* ENHY_TYPE_BOJ_9 */ { { 0, 0, 4 }, 20, 60 },
- /* ENHY_TYPE_BOJ_10 */ { { 0, 0, 4 }, 20, 60 },
- /* ENHY_TYPE_CNE_11 */ { { 0, 0, 6 }, 20, 64 },
- /* ENHY_TYPE_BOJ_12 */ { { 0, 0, 0 }, 18, 60 },
- /* ENHY_TYPE_AHG_13 */ { { 0, 0, 0 }, 16, 60 },
- /* ENHY_TYPE_BOJ_14 */ { { 0, 0, 0 }, 16, 64 },
- /* ENHY_TYPE_BJI_15 */ { { 0, 0, 8 }, 20, 58 },
- /* ENHY_TYPE_BOJ_16 */ { { 4, 0, 0 }, 18, 62 },
- /* ENHY_TYPE_AHG_17 */ { { 4, 0, 0 }, 18, 62 },
- /* ENHY_TYPE_BOB_18 */ { { 0, 0, 8 }, 28, 62 },
- /* ENHY_TYPE_BJI_19 */ { { 0, 0, 0 }, 16, 60 },
- /* ENHY_TYPE_AHG_20 */ { { 0, 0, 8 }, 20, 58 },
+ /* ENHY_TYPE_DOG_LADY */ { { 0, 0, 4 }, 24, 70 },
+ /* ENHY_TYPE_WOMAN_3 */ { { 0, 0, 8 }, 28, 62 },
+ /* ENHY_TYPE_MAN_1_BEARD */ { { 0, 0, 4 }, 20, 60 },
+ /* ENHY_TYPE_MAN_2_BALD */ { { 0, 0, 2 }, 20, 60 },
+ /* ENHY_TYPE_MAN_1_SHAVED_BLACK_SHIRT */ { { 0, 0, -2 }, 20, 60 },
+ /* ENHY_TYPE_BEGGAR */ { { 0, 0, 8 }, 24, 40 },
+ /* ENHY_TYPE_OLD_WOMAN */ { { 0, 0, 10 }, 26, 40 },
+ /* ENHY_TYPE_OLD_MAN */ { { 0, 0, 12 }, 26, 58 },
+ /* ENHY_TYPE_YOUNG_WOMAN_BROWN_HAIR */ { { 0, 0, 2 }, 18, 68 },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT */ { { 0, 0, 4 }, 20, 60 },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT */ { { 0, 0, 4 }, 20, 60 },
+ /* ENHY_TYPE_YOUNG_WOMAN_ORANGE_HAIR */ { { 0, 0, 6 }, 20, 64 },
+ /* ENHY_TYPE_MAN_2_ALT_MUSTACHE */ { { 0, 0, 0 }, 18, 60 },
+ /* ENHY_TYPE_MAN_1_BOWL_CUT_PURPLE_SHIRT */ { { 0, 0, 0 }, 16, 60 },
+ /* ENHY_TYPE_MAN_2_BEARD */ { { 0, 0, 0 }, 16, 64 },
+ /* ENHY_TYPE_OLD_MAN_BALD_BROWN_ROBE */ { { 0, 0, 8 }, 20, 58 },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_WHITE_SHIRT */ { { 4, 0, 0 }, 18, 62 },
+ /* ENHY_TYPE_MAN_1_SHAVED_GREEN_SHIRT */ { { 4, 0, 0 }, 18, 62 },
+ /* ENHY_TYPE_WOMAN_2 */ { { 0, 0, 8 }, 28, 62 },
+ /* ENHY_TYPE_OLD_MAN_BALD_PURPLE_ROBE */ { { 0, 0, 0 }, 16, 60 },
+ /* ENHY_TYPE_MAN_1_BOWL_CUT_GREEN_SHIRT */ { { 0, 0, 8 }, 20, 58 },
};
typedef struct EnHyPlayerTrackingInfo {
@@ -296,27 +487,27 @@ typedef struct EnHyPlayerTrackingInfo {
} EnHyPlayerTrackingInfo; // size = 0xC
static EnHyPlayerTrackingInfo sPlayerTrackingInfo[] = {
- /* ENHY_TYPE_AOB */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_COB */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_AHG_2 */ { 0x07, 40.0f, 20.0f },
- /* ENHY_TYPE_BOJ_3 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_AHG_4 */ { 0x07, 40.0f, 20.0f },
- /* ENHY_TYPE_BOJ_5 */ { 0x08, 0.0f, -20.0f },
- /* ENHY_TYPE_BBA */ { 0x09, 20.0f, 0.0f },
- /* ENHY_TYPE_BJI_7 */ { 0x09, 20.0f, 0.0f },
- /* ENHY_TYPE_CNE_8 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_BOJ_9 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_BOJ_10 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_CNE_11 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_BOJ_12 */ { 0x00, 0.0f, 0.0f },
- /* ENHY_TYPE_AHG_13 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_BOJ_14 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_BJI_15 */ { 0x0A, 20.0f, 0.0f },
- /* ENHY_TYPE_BOJ_16 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_AHG_17 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_BOB_18 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_BJI_19 */ { 0x06, 20.0f, 10.0f },
- /* ENHY_TYPE_AHG_20 */ { 0x0A, 20.0f, 0.0f },
+ /* ENHY_TYPE_DOG_LADY */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_WOMAN_3 */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_MAN_1_BEARD */ { 7, 40.0f, 20.0f },
+ /* ENHY_TYPE_MAN_2_BALD */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_MAN_1_SHAVED_BLACK_SHIRT */ { 7, 40.0f, 20.0f },
+ /* ENHY_TYPE_BEGGAR */ { 8, 0.0f, -20.0f },
+ /* ENHY_TYPE_OLD_WOMAN */ { 9, 20.0f, 0.0f },
+ /* ENHY_TYPE_OLD_MAN */ { 9, 20.0f, 0.0f },
+ /* ENHY_TYPE_YOUNG_WOMAN_BROWN_HAIR */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_YOUNG_WOMAN_ORANGE_HAIR */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_MAN_2_ALT_MUSTACHE */ { 0, 0.0f, 0.0f },
+ /* ENHY_TYPE_MAN_1_BOWL_CUT_PURPLE_SHIRT */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_MAN_2_BEARD */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_OLD_MAN_BALD_BROWN_ROBE */ { 10, 20.0f, 0.0f },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_WHITE_SHIRT */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_MAN_1_SHAVED_GREEN_SHIRT */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_WOMAN_2 */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_OLD_MAN_BALD_PURPLE_ROBE */ { 6, 20.0f, 10.0f },
+ /* ENHY_TYPE_MAN_1_BOWL_CUT_GREEN_SHIRT */ { 10, 20.0f, 0.0f },
};
typedef struct EnHyInit2Info {
@@ -328,41 +519,41 @@ typedef struct EnHyInit2Info {
} EnHyInit2Info; // size = 0x1C
static EnHyInit2Info sInit2Info[] = {
- /* ENHY_TYPE_AOB */ { 36.0f, { 0.0f, 0.0f, 600.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_COB */ { 40.0f, { -100.0f, 0.0f, 400.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_AHG_2 */ { 22.0f, { 0.0f, 0.0f, -200.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BOJ_3 */ { 20.0f, { -100.0f, 0.0f, 0.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_AHG_4 */ { 22.0f, { 0.0f, 0.0f, 0.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BOJ_5 */ { 21.0f, { 0.0f, 0.0f, 0.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BBA */ { 25.0f, { -100.0f, 0.0f, 600.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BJI_7 */ { 28.0f, { -100.0f, 0.0f, 800.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_CNE_8 */ { 17.0f, { 0.0f, 0.0f, 700.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BOJ_9 */ { 18.0f, { 0.0f, 0.0f, 100.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BOJ_10 */ { 18.0f, { 0.0f, 0.0f, -200.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_CNE_11 */ { 17.0f, { 0.0f, 0.0f, 700.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BOJ_12 */ { 21.0f, { 0.0f, 0.0f, -300.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_AHG_13 */ { 20.0f, { 0.0f, 0.0f, -200.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BOJ_14 */ { 18.0f, { -200.0f, 0.0f, -200.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BJI_15 */ { 27.0f, { -100.0f, 0.0f, 800.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BOJ_16 */ { 19.0f, { 400.0f, 0.0f, 0.0f }, 0.01f, 0x04, 30.0f },
- /* ENHY_TYPE_AHG_17 */ { 19.0f, { 400.0f, 0.0f, 0.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BOB_18 */ { 40.0f, { -100.0f, 0.0f, 400.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_BJI_19 */ { 17.0f, { 0.0f, 0.0f, 700.0f }, 0.01f, 0x06, 30.0f },
- /* ENHY_TYPE_AHG_20 */ { 20.0f, { 0.0f, 0.0f, -200.0f }, 0.01f, 0x06, 30.0f },
+ /* ENHY_TYPE_DOG_LADY */ { 36.0f, { 0.0f, 0.0f, 600.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_WOMAN_3 */ { 40.0f, { -100.0f, 0.0f, 400.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_MAN_1_BEARD */ { 22.0f, { 0.0f, 0.0f, -200.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_MAN_2_BALD */ { 20.0f, { -100.0f, 0.0f, 0.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_MAN_1_SHAVED_BLACK_SHIRT */ { 22.0f, { 0.0f, 0.0f, 0.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_BEGGAR */ { 21.0f, { 0.0f, 0.0f, 0.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_OLD_WOMAN */ { 25.0f, { -100.0f, 0.0f, 600.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_OLD_MAN */ { 28.0f, { -100.0f, 0.0f, 800.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_YOUNG_WOMAN_BROWN_HAIR */ { 17.0f, { 0.0f, 0.0f, 700.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT */ { 18.0f, { 0.0f, 0.0f, 100.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT */ { 18.0f, { 0.0f, 0.0f, -200.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_YOUNG_WOMAN_ORANGE_HAIR */ { 17.0f, { 0.0f, 0.0f, 700.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_MAN_2_ALT_MUSTACHE */ { 21.0f, { 0.0f, 0.0f, -300.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_MAN_1_BOWL_CUT_PURPLE_SHIRT */ { 20.0f, { 0.0f, 0.0f, -200.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_MAN_2_BEARD */ { 18.0f, { -200.0f, 0.0f, -200.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_OLD_MAN_BALD_BROWN_ROBE */ { 27.0f, { -100.0f, 0.0f, 800.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_MAN_2_MUSTACHE_WHITE_SHIRT */ { 19.0f, { 400.0f, 0.0f, 0.0f }, 0.01f, 4, 30.0f },
+ /* ENHY_TYPE_MAN_1_SHAVED_GREEN_SHIRT */ { 19.0f, { 400.0f, 0.0f, 0.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_WOMAN_2 */ { 40.0f, { -100.0f, 0.0f, 400.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_OLD_MAN_BALD_PURPLE_ROBE */ { 17.0f, { 0.0f, 0.0f, 700.0f }, 0.01f, 6, 30.0f },
+ /* ENHY_TYPE_MAN_1_BOWL_CUT_GREEN_SHIRT */ { 20.0f, { 0.0f, 0.0f, -200.0f }, 0.01f, 6, 30.0f },
};
s32 EnHy_FindSkelAndHeadObjects(EnHy* this, PlayState* play) {
- u8 headInfoIndex = sModelInfo[PARAMS_GET_S(this->actor.params, 0, 7)].headInfoIndex;
- u8 skelInfoIndex2 = sModelInfo[PARAMS_GET_S(this->actor.params, 0, 7)].skelInfoIndex2;
- u8 skelInfoIndex1 = sModelInfo[PARAMS_GET_S(this->actor.params, 0, 7)].skelInfoIndex1;
+ u8 headInfoIndex = sModelInfo[ENHY_GET_TYPE(&this->actor)].headInfoIndex;
+ u8 upperSkelInfoIndex = sModelInfo[ENHY_GET_TYPE(&this->actor)].upperSkelInfoIndex;
+ u8 lowerSkelInfoIndex = sModelInfo[ENHY_GET_TYPE(&this->actor)].lowerSkelInfoIndex;
- this->objectSlotSkel1 = Object_GetSlot(&play->objectCtx, sSkeletonInfo[skelInfoIndex1].objectId);
- if (this->objectSlotSkel1 < 0) {
+ this->objectSlotLowerSkel = Object_GetSlot(&play->objectCtx, sSkeletonInfo[lowerSkelInfoIndex].objectId);
+ if (this->objectSlotLowerSkel < 0) {
return false;
}
- this->objectSlotSkel2 = Object_GetSlot(&play->objectCtx, sSkeletonInfo[skelInfoIndex2].objectId);
- if (this->objectSlotSkel2 < 0) {
+ this->objectSlotUpperSkel = Object_GetSlot(&play->objectCtx, sSkeletonInfo[upperSkelInfoIndex].objectId);
+ if (this->objectSlotUpperSkel < 0) {
return false;
}
@@ -375,11 +566,11 @@ s32 EnHy_FindSkelAndHeadObjects(EnHy* this, PlayState* play) {
}
s32 EnHy_AreSkelAndHeadObjectsLoaded(EnHy* this, PlayState* play) {
- if (!Object_IsLoaded(&play->objectCtx, this->objectSlotSkel1)) {
+ if (!Object_IsLoaded(&play->objectCtx, this->objectSlotLowerSkel)) {
return false;
}
- if (!Object_IsLoaded(&play->objectCtx, this->objectSlotSkel2)) {
+ if (!Object_IsLoaded(&play->objectCtx, this->objectSlotUpperSkel)) {
return false;
}
@@ -408,8 +599,8 @@ s32 EnHy_IsOsAnimeObjectLoaded(EnHy* this, PlayState* play) {
return true;
}
-void func_80A6F7CC(EnHy* this, PlayState* play, s32 getItemId) {
- this->unkGetItemId = getItemId;
+void EnHy_GiveItem(EnHy* this, PlayState* play, s32 getItemId) {
+ this->getItemId = getItemId;
Actor_OfferGetItem(&this->actor, play, getItemId, this->actor.xzDistToPlayer + 1.0f,
fabsf(this->actor.yDistToPlayer) + 1.0f);
}
@@ -417,19 +608,19 @@ void func_80A6F7CC(EnHy* this, PlayState* play, s32 getItemId) {
u16 EnHy_GetTextId(PlayState* play, Actor* thisx) {
Player* player = GET_PLAYER(play);
EnHy* this = (EnHy*)thisx;
- u16 textId = MaskReaction_GetTextId(play, MASK_REACTION_SET_37 + PARAMS_GET_S(this->actor.params, 0, 7));
+ u16 textId = MaskReaction_GetTextId(play, ENHY_GET_TYPE(&this->actor) + MASK_REACTION_SET_DOG_LADY);
if (textId != 0) {
- if (PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_BOJ_5) {
+ if (ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_BEGGAR) {
player->exchangeItemId = EXCH_ITEM_BOTTLE_BLUE_FIRE;
}
return textId;
}
- switch (PARAMS_GET_S(this->actor.params, 0, 7)) {
- case ENHY_TYPE_AOB:
+ switch (ENHY_GET_TYPE(&this->actor)) {
+ case ENHY_TYPE_DOG_LADY:
if (play->sceneId == SCENE_KAKARIKO_CENTER_GUEST_HOUSE) {
- return (this->unk_330 & EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_MASK)
+ return (this->talonEventChkInf & EVENTCHKINF_MASK(EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO))
? 0x508D
: (GET_INFTABLE(INFTABLE_CB) ? 0x508C : 0x508B);
} else if (play->sceneId == SCENE_MARKET_DAY) {
@@ -438,7 +629,7 @@ u16 EnHy_GetTextId(PlayState* play, Actor* thisx) {
s16 followingDog = (gSaveContext.dogParams & 0xF00) >> 8;
if (followingDog != 0) {
- this->unk_215 = false;
+ this->playedSfx = false;
return (followingDog == 1) ? 0x709F : 0x709E;
} else {
return 0x709D;
@@ -446,13 +637,15 @@ u16 EnHy_GetTextId(PlayState* play, Actor* thisx) {
} else {
return 0x70A0;
}
- case ENHY_TYPE_COB:
+
+ case ENHY_TYPE_WOMAN_3:
if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
return GET_INFTABLE(INFTABLE_C1) ? 0x7017 : 0x7045;
} else {
return GET_INFTABLE(INFTABLE_C0) ? 0x7017 : 0x7016;
}
- case ENHY_TYPE_AHG_2:
+
+ case ENHY_TYPE_MAN_1_BEARD:
if (play->sceneId == SCENE_KAKARIKO_CENTER_GUEST_HOUSE) {
return 0x5086;
} else if (play->sceneId == SCENE_KAKARIKO_VILLAGE) {
@@ -468,16 +661,21 @@ u16 EnHy_GetTextId(PlayState* play, Actor* thisx) {
} else {
return 0x701A;
}
- case ENHY_TYPE_BOJ_3:
+
+ case ENHY_TYPE_MAN_2_BALD:
return GET_EVENTCHKINF(EVENTCHKINF_80) ? (GET_INFTABLE(INFTABLE_C4) ? 0x7001 : 0x70EB) : 0x7001;
- case ENHY_TYPE_AHG_4:
+
+ case ENHY_TYPE_MAN_1_SHAVED_BLACK_SHIRT:
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704B : (GET_INFTABLE(INFTABLE_C5) ? 0x7024 : 0x7023);
- case ENHY_TYPE_BOJ_5:
+
+ case ENHY_TYPE_BEGGAR:
player->exchangeItemId = EXCH_ITEM_BOTTLE_BLUE_FIRE;
return 0x700C;
- case ENHY_TYPE_BBA:
+
+ case ENHY_TYPE_OLD_WOMAN:
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704A : (GET_INFTABLE(INFTABLE_C6) ? 0x7022 : 0x7021);
- case ENHY_TYPE_BJI_7:
+
+ case ENHY_TYPE_OLD_MAN:
if (play->sceneId == SCENE_KAKARIKO_CENTER_GUEST_HOUSE) {
return 0x5088;
} else if (play->sceneId == SCENE_KAKARIKO_VILLAGE) {
@@ -485,13 +683,15 @@ u16 EnHy_GetTextId(PlayState* play, Actor* thisx) {
} else {
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x704D : (GET_INFTABLE(INFTABLE_C7) ? 0x7028 : 0x7027);
}
- case ENHY_TYPE_CNE_8:
+
+ case ENHY_TYPE_YOUNG_WOMAN_BROWN_HAIR:
if (GET_EVENTCHKINF(EVENTCHKINF_80)) {
return GET_INFTABLE(INFTABLE_C9) ? 0x701E : 0x7048;
} else {
return GET_INFTABLE(INFTABLE_C8) ? 0x701E : 0x701D;
}
- case ENHY_TYPE_BOJ_9:
+
+ case ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT:
if (play->sceneId == SCENE_KAKARIKO_CENTER_GUEST_HOUSE) {
return GET_EVENTCHKINF(EVENTCHKINF_AA) ? 0x5082 : 0x5081;
} else if (play->sceneId == SCENE_KAKARIKO_VILLAGE) {
@@ -499,32 +699,44 @@ u16 EnHy_GetTextId(PlayState* play, Actor* thisx) {
} else {
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7049 : (GET_INFTABLE(INFTABLE_CA) ? 0x7020 : 0x701F);
}
- case ENHY_TYPE_BOJ_10:
+
+ case ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT:
if (play->sceneId == SCENE_IMPAS_HOUSE) {
return GET_EVENTCHKINF(EVENTCHKINF_AA) ? 0x507E : 0x507D;
} else if (play->sceneId == SCENE_KAKARIKO_VILLAGE) {
return CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) ? 0x507C : 0x507B;
} else {
+#if OOT_VERSION < NTSC_1_1
+ return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7046 : (GET_INFTABLE(INFTABLE_CB) ? 0x7019 : 0x7018);
+#else
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7046 : (GET_INFTABLE(INFTABLE_CD) ? 0x7019 : 0x7018);
+#endif
}
- case ENHY_TYPE_CNE_11:
+
+ case ENHY_TYPE_YOUNG_WOMAN_ORANGE_HAIR:
return GET_INFTABLE(INFTABLE_MALON_SPAWNED_AT_HYRULE_CASTLE) ? (GET_INFTABLE(INFTABLE_CC) ? 0x7014 : 0x70A4)
: 0x7014;
- case ENHY_TYPE_BOJ_12:
+
+ case ENHY_TYPE_MAN_2_ALT_MUSTACHE:
if (play->sceneId == SCENE_KAKARIKO_VILLAGE) {
return !IS_DAY ? 0x5084 : 0x5083;
} else {
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x7044 : 0x7015;
}
- case ENHY_TYPE_AHG_13:
+
+ case ENHY_TYPE_MAN_1_BOWL_CUT_PURPLE_SHIRT:
return 0x7055;
- case ENHY_TYPE_BOJ_14:
+
+ case ENHY_TYPE_MAN_2_BEARD:
return 0x7089;
- case ENHY_TYPE_BJI_15:
+
+ case ENHY_TYPE_OLD_MAN_BALD_BROWN_ROBE:
return 0x708A;
- case ENHY_TYPE_BOJ_16:
+
+ case ENHY_TYPE_MAN_2_MUSTACHE_WHITE_SHIRT:
return 0x700E;
- case ENHY_TYPE_AHG_17:
+
+ case ENHY_TYPE_MAN_1_SHAVED_GREEN_SHIRT:
if (!LINK_IS_ADULT) {
if (IS_DAY) {
return GET_INFTABLE(INFTABLE_160) ? 0x5058 : 0x5057;
@@ -536,18 +748,22 @@ u16 EnHy_GetTextId(PlayState* play, Actor* thisx) {
} else {
return 0x5058;
}
- case ENHY_TYPE_BOB_18:
+
+ case ENHY_TYPE_WOMAN_2:
if (!LINK_IS_ADULT) {
return GET_EVENTCHKINF(EVENTCHKINF_80) ? 0x505F : (GET_INFTABLE(INFTABLE_163) ? 0x505E : 0x505D);
} else {
- return (this->unk_330 & EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_MASK)
+ return (this->talonEventChkInf & EVENTCHKINF_MASK(EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO))
? 0x5062
: (GET_INFTABLE(INFTABLE_164) ? 0x5061 : 0x5060);
}
- case ENHY_TYPE_BJI_19:
+
+ case ENHY_TYPE_OLD_MAN_BALD_PURPLE_ROBE:
return 0x7120;
- case ENHY_TYPE_AHG_20:
+
+ case ENHY_TYPE_MAN_1_BOWL_CUT_GREEN_SHIRT:
return 0x7121;
+
default:
return 0;
}
@@ -567,17 +783,19 @@ s16 EnHy_UpdateTalkState(PlayState* play, Actor* thisx) {
case TEXT_STATE_8:
case TEXT_STATE_9:
return NPC_TALK_STATE_TALKING;
+
case TEXT_STATE_DONE_FADING:
switch (this->actor.textId) {
case 0x709E:
case 0x709F:
- if (!this->unk_215) {
+ if (!this->playedSfx) {
Audio_PlaySfxGeneral(this->actor.textId == 0x709F ? NA_SE_SY_CORRECT_CHIME : NA_SE_SY_ERROR,
&gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- this->unk_215 = true;
+ this->playedSfx = true;
}
break;
+
case 0x70F0:
case 0x70F1:
case 0x70F2:
@@ -589,6 +807,7 @@ s16 EnHy_UpdateTalkState(PlayState* play, Actor* thisx) {
break;
}
return NPC_TALK_STATE_TALKING;
+
case TEXT_STATE_CLOSING:
switch (this->actor.textId) {
case 0x70F0:
@@ -599,86 +818,113 @@ s16 EnHy_UpdateTalkState(PlayState* play, Actor* thisx) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_17);
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE_EMPTY, PLAYER_IA_BOTTLE);
break;
+
case 0x7016:
SET_INFTABLE(INFTABLE_C0);
break;
+
case 0x7045:
SET_INFTABLE(INFTABLE_C1);
break;
+
case 0x701B:
SET_INFTABLE(INFTABLE_C2);
break;
+
case 0x7047:
SET_INFTABLE(INFTABLE_C3);
break;
+
case 0x70EB:
SET_INFTABLE(INFTABLE_C4);
break;
+
case 0x7023:
SET_INFTABLE(INFTABLE_C5);
break;
+
case 0x7021:
SET_INFTABLE(INFTABLE_C6);
break;
+
case 0x7027:
SET_INFTABLE(INFTABLE_C7);
break;
+
case 0x701D:
SET_INFTABLE(INFTABLE_C8);
break;
+
case 0x7048:
SET_INFTABLE(INFTABLE_C9);
break;
+
case 0x701F:
SET_INFTABLE(INFTABLE_CA);
break;
+
case 0x7018:
+#if OOT_VERSION < NTSC_1_1
+ SET_INFTABLE(INFTABLE_CB);
+#else
SET_INFTABLE(INFTABLE_CD);
+#endif
break;
+
case 0x70A4:
SET_INFTABLE(INFTABLE_CC);
break;
+
case 0x5057:
SET_INFTABLE(INFTABLE_160);
break;
+
case 0x5059:
SET_INFTABLE(INFTABLE_161);
break;
+
case 0x505B:
SET_INFTABLE(INFTABLE_162);
break;
+
case 0x505D:
SET_INFTABLE(INFTABLE_163);
break;
+
case 0x5060:
SET_INFTABLE(INFTABLE_164);
break;
+
case 0x508B:
SET_INFTABLE(INFTABLE_CB);
break;
+
case 0x709E:
gSaveContext.dogParams = 0;
break;
+
case 0x709F:
- func_80A6F7CC(this, play, GET_INFTABLE(INFTABLE_191) ? GI_RUPEE_BLUE : GI_HEART_PIECE);
- this->actionFunc = func_80A714C4;
+ EnHy_GiveItem(this, play, GET_INFTABLE(INFTABLE_191) ? GI_RUPEE_BLUE : GI_HEART_PIECE);
+ this->actionFunc = EnHy_WaitDogFoundRewardGiven;
break;
}
return NPC_TALK_STATE_IDLE;
+
case TEXT_STATE_EVENT:
if (!Message_ShouldAdvance(play)) {
return NPC_TALK_STATE_TALKING;
} else {
return NPC_TALK_STATE_ACTION;
}
- }
- return NPC_TALK_STATE_TALKING;
+ default:
+ return NPC_TALK_STATE_TALKING;
+ }
}
void EnHy_UpdateEyes(EnHy* this) {
if (DECR(this->nextEyeIndexTimer) == 0) {
- u8 headInfoIndex = sModelInfo[PARAMS_GET_S(this->actor.params, 0, 7)].headInfoIndex;
+ u8 headInfoIndex = sModelInfo[ENHY_GET_TYPE(&this->actor)].headInfoIndex;
this->curEyeIndex++;
if ((sHeadInfo[headInfoIndex].eyeTextures != NULL) &&
@@ -690,14 +936,14 @@ void EnHy_UpdateEyes(EnHy* this) {
}
void EnHy_InitCollider(EnHy* this) {
- u8 type = PARAMS_GET_S(this->actor.params, 0, 7);
+ u8 type = ENHY_GET_TYPE(&this->actor);
this->collider.dim.radius = sColliderInfo[type].radius;
this->collider.dim.height = sColliderInfo[type].height;
}
void EnHy_InitSetProperties(EnHy* this) {
- u8 type = PARAMS_GET_S(this->actor.params, 0, 7);
+ u8 type = ENHY_GET_TYPE(&this->actor);
this->actor.shape.shadowScale = sInit2Info[type].shadowScale;
Actor_SetScale(&this->actor, sInit2Info[type].scale);
@@ -713,25 +959,26 @@ void EnHy_UpdateCollider(EnHy* this, PlayState* play) {
pos.x = this->actor.world.pos.x;
pos.y = this->actor.world.pos.y;
pos.z = this->actor.world.pos.z;
- pos.x += sColliderInfo[PARAMS_GET_S(this->actor.params, 0, 7)].offset.x;
- pos.y += sColliderInfo[PARAMS_GET_S(this->actor.params, 0, 7)].offset.y;
- pos.z += sColliderInfo[PARAMS_GET_S(this->actor.params, 0, 7)].offset.z;
+ pos.x += sColliderInfo[ENHY_GET_TYPE(&this->actor)].offset.x;
+ pos.y += sColliderInfo[ENHY_GET_TYPE(&this->actor)].offset.y;
+ pos.z += sColliderInfo[ENHY_GET_TYPE(&this->actor)].offset.z;
this->collider.dim.pos = pos;
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
}
-void func_80A70834(EnHy* this, PlayState* play) {
+void EnHy_OfferBuyBottledItem(EnHy* this, PlayState* play) {
Player* player = GET_PLAYER(play);
- if (PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_BOJ_5) {
+ if (ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_BEGGAR) {
if (!Inventory_HasSpecificBottle(ITEM_BOTTLE_BLUE_FIRE) && !Inventory_HasSpecificBottle(ITEM_BOTTLE_BUG) &&
!Inventory_HasSpecificBottle(ITEM_BOTTLE_FISH)) {
- switch (func_8002F368(play)) {
+ switch (Actor_GetPlayerExchangeItemId(play)) {
case EXCH_ITEM_BOTTLE_POE:
case EXCH_ITEM_BOTTLE_BIG_POE:
case EXCH_ITEM_BOTTLE_RUTOS_LETTER:
this->actor.textId = 0x70EF;
break;
+
default:
if (Player_GetMask(play) == PLAYER_MASK_NONE) {
this->actor.textId = 0x70ED;
@@ -739,16 +986,19 @@ void func_80A70834(EnHy* this, PlayState* play) {
break;
}
} else {
- switch (func_8002F368(play)) {
+ switch (Actor_GetPlayerExchangeItemId(play)) {
case EXCH_ITEM_BOTTLE_BLUE_FIRE:
this->actor.textId = 0x70F0;
break;
+
case EXCH_ITEM_BOTTLE_FISH:
this->actor.textId = 0x70F1;
break;
+
case EXCH_ITEM_BOTTLE_BUG:
this->actor.textId = 0x70F2;
break;
+
default:
if (Player_GetMask(play) == PLAYER_MASK_NONE) {
this->actor.textId = 0x700C;
@@ -761,30 +1011,34 @@ void func_80A70834(EnHy* this, PlayState* play) {
}
}
-void func_80A70978(EnHy* this, PlayState* play) {
+void EnHy_UpdateNPC(EnHy* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s16 trackingMode;
- switch (PARAMS_GET_S(this->actor.params, 0, 7)) {
- case ENHY_TYPE_BOJ_3:
- case ENHY_TYPE_BJI_7:
- case ENHY_TYPE_BOJ_9:
- case ENHY_TYPE_BOJ_10:
+ switch (ENHY_GET_TYPE(&this->actor)) {
+ case ENHY_TYPE_MAN_2_BALD:
+ case ENHY_TYPE_OLD_MAN:
+ case ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT:
+ case ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT:
trackingMode =
(this->interactInfo.talkState == NPC_TALK_STATE_IDLE) ? NPC_TRACKING_NONE : NPC_TRACKING_HEAD_AND_TORSO;
break;
- case ENHY_TYPE_BOJ_12:
+
+ case ENHY_TYPE_MAN_2_ALT_MUSTACHE:
trackingMode = NPC_TRACKING_NONE;
break;
- case ENHY_TYPE_AHG_2:
- case ENHY_TYPE_AHG_17:
+
+ case ENHY_TYPE_MAN_1_BEARD:
+ case ENHY_TYPE_MAN_1_SHAVED_GREEN_SHIRT:
trackingMode = NPC_TRACKING_FULL_BODY;
break;
- case ENHY_TYPE_AOB:
- case ENHY_TYPE_BOB_18:
+
+ case ENHY_TYPE_DOG_LADY:
+ case ENHY_TYPE_WOMAN_2:
trackingMode = (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) ? NPC_TRACKING_HEAD_AND_TORSO
: NPC_TRACKING_FULL_BODY;
break;
+
default:
trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
break;
@@ -793,48 +1047,50 @@ void func_80A70978(EnHy* this, PlayState* play) {
this->interactInfo.trackPos = player->actor.world.pos;
if (LINK_IS_ADULT) {
- this->interactInfo.yOffset = sPlayerTrackingInfo[PARAMS_GET_S(this->actor.params, 0, 7)].adultYOffset;
+ this->interactInfo.yOffset = sPlayerTrackingInfo[ENHY_GET_TYPE(&this->actor)].adultYOffset;
} else {
- this->interactInfo.yOffset = sPlayerTrackingInfo[PARAMS_GET_S(this->actor.params, 0, 7)].childYOffset;
+ this->interactInfo.yOffset = sPlayerTrackingInfo[ENHY_GET_TYPE(&this->actor)].childYOffset;
}
- Npc_TrackPoint(&this->actor, &this->interactInfo,
- sPlayerTrackingInfo[PARAMS_GET_S(this->actor.params, 0, 7)].presetIndex, trackingMode);
+ Npc_TrackPoint(&this->actor, &this->interactInfo, sPlayerTrackingInfo[ENHY_GET_TYPE(&this->actor)].presetIndex,
+ trackingMode);
if (Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->interactRange, EnHy_GetTextId,
EnHy_UpdateTalkState)) {
- func_80A70834(this, play);
+ EnHy_OfferBuyBottledItem(this, play);
}
}
s32 EnHy_ShouldSpawn(EnHy* this, PlayState* play) {
switch (play->sceneId) {
case SCENE_KAKARIKO_VILLAGE:
- if (!(PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_BOJ_9 ||
- PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_BOJ_10 ||
- PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_BOJ_12 ||
- PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_AHG_2 ||
- PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_BJI_7)) {
+ if (!(ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT ||
+ ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT ||
+ ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_MAN_2_ALT_MUSTACHE ||
+ ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_MAN_1_BEARD ||
+ ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_OLD_MAN)) {
return true;
} else if (!LINK_IS_ADULT) {
return true;
- } else if (PARAMS_GET_S(this->actor.params, 0, 7) != ENHY_TYPE_BOJ_12 && IS_NIGHT) {
+ } else if (ENHY_GET_TYPE(&this->actor) != ENHY_TYPE_MAN_2_ALT_MUSTACHE && IS_NIGHT) {
return false;
} else {
return true;
}
+
case SCENE_IMPAS_HOUSE:
- if (PARAMS_GET_S(this->actor.params, 0, 7) != ENHY_TYPE_BOJ_10) {
+ if (ENHY_GET_TYPE(&this->actor) != ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT) {
return true;
} else if (LINK_IS_CHILD) {
return false;
- } else if (PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_BOJ_10 && IS_DAY) {
+ } else if (ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT && IS_DAY) {
return false;
} else {
return true;
}
+
case SCENE_DOG_LADY_HOUSE:
- if (PARAMS_GET_S(this->actor.params, 0, 7) != ENHY_TYPE_AOB) {
+ if (ENHY_GET_TYPE(&this->actor) != ENHY_TYPE_DOG_LADY) {
return true;
} else if (IS_DAY) {
return false;
@@ -842,11 +1098,11 @@ s32 EnHy_ShouldSpawn(EnHy* this, PlayState* play) {
return true;
}
case SCENE_KAKARIKO_CENTER_GUEST_HOUSE:
- if (PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_AOB) {
+ if (ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_DOG_LADY) {
return !LINK_IS_ADULT ? false : true;
- } else if (!(PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_BOJ_9 ||
- PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_AHG_2 ||
- PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_BJI_7)) {
+ } else if (!(ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT ||
+ ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_MAN_1_BEARD ||
+ ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_OLD_MAN)) {
return true;
} else if (IS_DAY) {
return false;
@@ -855,9 +1111,10 @@ s32 EnHy_ShouldSpawn(EnHy* this, PlayState* play) {
} else {
return true;
}
+
case SCENE_BACK_ALLEY_DAY:
case SCENE_BACK_ALLEY_NIGHT:
- if (PARAMS_GET_S(this->actor.params, 0, 7) != ENHY_TYPE_BOJ_14) {
+ if (ENHY_GET_TYPE(&this->actor) != ENHY_TYPE_MAN_2_BEARD) {
return true;
} else if (IS_NIGHT) {
return false;
@@ -866,22 +1123,25 @@ s32 EnHy_ShouldSpawn(EnHy* this, PlayState* play) {
} else {
return true;
}
+
default:
- switch (PARAMS_GET_S(this->actor.params, 0, 7)) {
- case ENHY_TYPE_BJI_19:
- case ENHY_TYPE_AHG_20:
+ switch (ENHY_GET_TYPE(&this->actor)) {
+ case ENHY_TYPE_OLD_MAN_BALD_PURPLE_ROBE:
+ case ENHY_TYPE_MAN_1_BOWL_CUT_GREEN_SHIRT:
if (LINK_IS_ADULT) {
return false;
}
+ FALLTHROUGH;
+ default:
+ return true;
}
- return true;
}
}
void EnHy_Init(Actor* thisx, PlayState* play) {
EnHy* this = (EnHy*)thisx;
- if (PARAMS_GET_S(this->actor.params, 0, 7) >= ENHY_TYPE_MAX || !EnHy_FindOsAnimeObject(this, play) ||
+ if ((ENHY_GET_TYPE(&this->actor) >= ENHY_TYPE_MAX) || !EnHy_FindOsAnimeObject(this, play) ||
!EnHy_FindSkelAndHeadObjects(this, play)) {
Actor_Kill(&this->actor);
}
@@ -890,7 +1150,7 @@ void EnHy_Init(Actor* thisx, PlayState* play) {
Actor_Kill(&this->actor);
}
- this->actionFunc = EnHy_InitImpl;
+ this->actionFunc = EnHy_WaitForObjects;
}
void EnHy_Destroy(Actor* thisx, PlayState* play) {
@@ -899,73 +1159,76 @@ void EnHy_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->collider);
}
-void EnHy_InitImpl(EnHy* this, PlayState* play) {
+void EnHy_WaitForObjects(EnHy* this, PlayState* play) {
if (EnHy_IsOsAnimeObjectLoaded(this, play) && EnHy_AreSkelAndHeadObjectsLoaded(this, play)) {
- this->actor.objectSlot = this->objectSlotSkel1;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
+ this->actor.objectSlot = this->objectSlotLowerSkel;
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime,
- sSkeletonInfo[sModelInfo[PARAMS_GET_S(this->actor.params, 0, 7)].skelInfoIndex1].skeleton,
- NULL, this->jointTable, this->morphTable, 16);
+ sSkeletonInfo[sModelInfo[ENHY_GET_TYPE(&this->actor)].lowerSkelInfoIndex].skeleton, NULL,
+ this->jointTable, this->morphTable, ENHY_LIMB_MAX);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
Collider_InitCylinder(play, &this->collider);
- Collider_SetCylinder(play, &this->collider, &this->actor, &sColCylInit);
+ Collider_SetCylinder(play, &this->collider, &this->actor, &sColliderCylinderInit);
EnHy_InitCollider(this);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo,
- sModelInfo[PARAMS_GET_S(this->actor.params, 0, 7)].animInfoIndex);
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, sModelInfo[ENHY_GET_TYPE(&this->actor)].animInfoIndex);
if ((play->sceneId == SCENE_BACK_ALLEY_DAY) || (play->sceneId == SCENE_MARKET_DAY)) {
- this->actor.flags &= ~ACTOR_FLAG_4;
- this->actor.uncullZoneScale = 0.0f;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
+ this->actor.cullingVolumeScale = 0.0f;
}
if (play->sceneId == SCENE_KAKARIKO_CENTER_GUEST_HOUSE) {
- this->unk_330 = gSaveContext.save.info.eventChkInf[EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_INDEX];
+ this->talonEventChkInf = gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_TALON_RETURNED_FROM_KAKARIKO];
}
EnHy_InitSetProperties(this);
- this->path = Path_GetByIndex(play, PARAMS_GET_S(this->actor.params, 7, 4), 15);
+ this->path = Path_GetByIndex(play, ENHY_GET_PATH_INDEX(&this->actor), 15);
- switch (PARAMS_GET_S(this->actor.params, 0, 7)) {
- case ENHY_TYPE_BOJ_3:
+ switch (ENHY_GET_TYPE(&this->actor)) {
+ case ENHY_TYPE_MAN_2_BALD:
if (this->path != NULL) {
this->actor.speed = 3.0f;
}
- this->actionFunc = func_80A711B4;
+ this->actionFunc = EnHy_Walk;
break;
- case ENHY_TYPE_BJI_7:
+
+ case ENHY_TYPE_OLD_MAN:
this->pathReverse = false;
- this->actionFunc = func_80A712C0;
+ this->actionFunc = EnHy_SetupPace;
break;
- case ENHY_TYPE_AOB:
+
+ case ENHY_TYPE_DOG_LADY:
if (play->sceneId == SCENE_MARKET_DAY) {
- this->actionFunc = func_80A710F8;
+ this->actionFunc = EnHy_WatchDog;
break;
}
FALLTHROUGH;
- case ENHY_TYPE_COB:
- case ENHY_TYPE_AHG_2:
- case ENHY_TYPE_AHG_4:
- case ENHY_TYPE_BBA:
- case ENHY_TYPE_CNE_8:
- case ENHY_TYPE_AHG_13:
- case ENHY_TYPE_BOJ_14:
- case ENHY_TYPE_BJI_15:
- case ENHY_TYPE_BOJ_16:
- case ENHY_TYPE_AHG_17:
- case ENHY_TYPE_BOB_18:
- case ENHY_TYPE_BJI_19:
- case ENHY_TYPE_AHG_20:
- this->actionFunc = func_80A7127C;
+ case ENHY_TYPE_WOMAN_3:
+ case ENHY_TYPE_MAN_1_BEARD:
+ case ENHY_TYPE_MAN_1_SHAVED_BLACK_SHIRT:
+ case ENHY_TYPE_OLD_WOMAN:
+ case ENHY_TYPE_YOUNG_WOMAN_BROWN_HAIR:
+ case ENHY_TYPE_MAN_1_BOWL_CUT_PURPLE_SHIRT:
+ case ENHY_TYPE_MAN_2_BEARD:
+ case ENHY_TYPE_OLD_MAN_BALD_BROWN_ROBE:
+ case ENHY_TYPE_MAN_2_MUSTACHE_WHITE_SHIRT:
+ case ENHY_TYPE_MAN_1_SHAVED_GREEN_SHIRT:
+ case ENHY_TYPE_WOMAN_2:
+ case ENHY_TYPE_OLD_MAN_BALD_PURPLE_ROBE:
+ case ENHY_TYPE_MAN_1_BOWL_CUT_GREEN_SHIRT:
+ this->actionFunc = EnHy_Fidget;
break;
- case ENHY_TYPE_BOJ_5:
- case ENHY_TYPE_BOJ_9:
- case ENHY_TYPE_BOJ_10:
- case ENHY_TYPE_CNE_11:
- case ENHY_TYPE_BOJ_12:
+
+ case ENHY_TYPE_BEGGAR:
+ case ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT:
+ case ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT:
+ case ENHY_TYPE_YOUNG_WOMAN_ORANGE_HAIR:
+ case ENHY_TYPE_MAN_2_ALT_MUSTACHE:
this->actionFunc = EnHy_DoNothing;
break;
+
default:
Actor_Kill(&this->actor);
break;
@@ -973,7 +1236,7 @@ void EnHy_InitImpl(EnHy* this, PlayState* play) {
}
}
-void func_80A710F8(EnHy* this, PlayState* play) {
+void EnHy_WatchDog(EnHy* this, PlayState* play) {
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
if (this->skelAnime.animation != &gObjOsAnim_0BFC) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_26);
@@ -987,7 +1250,7 @@ void func_80A710F8(EnHy* this, PlayState* play) {
}
}
-void func_80A711B4(EnHy* this, PlayState* play) {
+void EnHy_Walk(EnHy* this, PlayState* play) {
s16 yaw;
f32 distSq;
@@ -1003,24 +1266,24 @@ void func_80A711B4(EnHy* this, PlayState* play) {
}
}
-void func_80A7127C(EnHy* this, PlayState* play) {
- func_80034F54(play, this->unk_21C, this->unk_23C, 16);
+void EnHy_Fidget(EnHy* this, PlayState* play) {
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENHY_LIMB_MAX);
}
void EnHy_DoNothing(EnHy* this, PlayState* play) {
}
-void func_80A712C0(EnHy* this, PlayState* play) {
+void EnHy_SetupPace(EnHy* this, PlayState* play) {
if ((this->actor.xzDistToPlayer <= 100.0f) && (this->path != NULL)) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_7);
this->actor.speed = 0.4f;
- this->actionFunc = func_80A7134C;
+ this->actionFunc = EnHy_Pace;
}
- func_80034F54(play, this->unk_21C, this->unk_23C, 16);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENHY_LIMB_MAX);
}
-void func_80A7134C(EnHy* this, PlayState* play) {
+void EnHy_Pace(EnHy* this, PlayState* play) {
s16 yaw;
f32 distSq;
@@ -1054,23 +1317,24 @@ void func_80A7134C(EnHy* this, PlayState* play) {
}
}
-void func_80A714C4(EnHy* this, PlayState* play) {
+void EnHy_WaitDogFoundRewardGiven(EnHy* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
- this->actionFunc = func_80A71530;
+ this->actionFunc = EnHy_FinishGivingDogFoundReward;
} else {
- Actor_OfferGetItem(&this->actor, play, this->unkGetItemId, this->actor.xzDistToPlayer + 1.0f,
+ Actor_OfferGetItem(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer + 1.0f,
fabsf(this->actor.yDistToPlayer) + 1.0f);
}
}
-void func_80A71530(EnHy* this, PlayState* play) {
+void EnHy_FinishGivingDogFoundReward(EnHy* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
- switch (this->unkGetItemId) {
+ switch (this->getItemId) {
case GI_HEART_PIECE:
gSaveContext.dogParams = 0;
gSaveContext.dogIsLost = false;
SET_INFTABLE(INFTABLE_191);
break;
+
case GI_RUPEE_BLUE:
Rupees_ChangeBy(5);
gSaveContext.dogParams = 0;
@@ -1078,15 +1342,15 @@ void func_80A71530(EnHy* this, PlayState* play) {
break;
}
- this->actionFunc = func_80A7127C;
+ this->actionFunc = EnHy_Fidget;
}
}
void EnHy_Update(Actor* thisx, PlayState* play) {
EnHy* this = (EnHy*)thisx;
- if (this->actionFunc != EnHy_InitImpl) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
+ if (this->actionFunc != EnHy_WaitForObjects) {
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
SkelAnime_Update(&this->skelAnime);
EnHy_UpdateEyes(this);
@@ -1098,7 +1362,7 @@ void EnHy_Update(Actor* thisx, PlayState* play) {
}
this->actionFunc(this, play);
- func_80A70978(this, play);
+ EnHy_UpdateNPC(this, play);
EnHy_UpdateCollider(this, play);
}
@@ -1106,26 +1370,26 @@ s32 EnHy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
EnHy* this = (EnHy*)thisx;
s32 pad;
Vec3s limbRot;
- u8 i;
- void* ptr;
+ u8 headInfoIndex;
+ void* eyeTex;
OPEN_DISPS(play->state.gfxCtx, "../z_en_hy.c", 2170);
- if (limbIndex == 15) {
+ if (limbIndex == ENHY_LIMB_HEAD) {
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->objectSlotHead].segment);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotHead].segment);
- i = sModelInfo[PARAMS_GET_S(this->actor.params, 0, 7)].headInfoIndex;
- *dList = sHeadInfo[i].headDList;
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotHead].segment);
+ headInfoIndex = sModelInfo[ENHY_GET_TYPE(&this->actor)].headInfoIndex;
+ *dList = sHeadInfo[headInfoIndex].headDList;
- if (sHeadInfo[i].eyeTextures != NULL) {
- ptr = sHeadInfo[i].eyeTextures[this->curEyeIndex];
- gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(ptr));
+ if (sHeadInfo[headInfoIndex].eyeTextures != NULL) {
+ eyeTex = sHeadInfo[headInfoIndex].eyeTextures[this->curEyeIndex];
+ gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(eyeTex));
}
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotSkel1].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotLowerSkel].segment);
}
- if (limbIndex == 15) {
+ if (limbIndex == ENHY_LIMB_HEAD) {
Matrix_Translate(1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
limbRot = this->interactInfo.headRot;
Matrix_RotateX(BINANG_TO_RAD_ALT(limbRot.y), MTXMODE_APPLY);
@@ -1133,15 +1397,16 @@ s32 EnHy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
Matrix_Translate(-1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
}
- if (limbIndex == 8) {
+ if (limbIndex == ENHY_LIMB_TORSO) {
limbRot = this->interactInfo.torsoRot;
Matrix_RotateX(BINANG_TO_RAD_ALT(-limbRot.y), MTXMODE_APPLY);
Matrix_RotateZ(BINANG_TO_RAD_ALT(limbRot.x), MTXMODE_APPLY);
}
- if ((limbIndex == 8) || (limbIndex == 9) || (limbIndex == 12)) {
- rot->y += Math_SinS(this->unk_21C[limbIndex]) * 200.0f;
- rot->z += Math_CosS(this->unk_23C[limbIndex]) * 200.0f;
+ if ((limbIndex == ENHY_LIMB_TORSO) || (limbIndex == ENHY_LIMB_LEFT_UPPER_ARM) ||
+ (limbIndex == ENHY_LIMB_RIGHT_UPPER_ARM)) {
+ rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * FIDGET_AMPLITUDE;
}
CLOSE_DISPS(play->state.gfxCtx, "../z_en_hy.c", 2228);
@@ -1152,34 +1417,33 @@ s32 EnHy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
void EnHy_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnHy* this = (EnHy*)thisx;
s32 pad;
- Vec3f sp3C = { 400.0f, 0.0f, 0.0f };
+ Vec3f focusOffset = { 400.0f, 0.0f, 0.0f };
OPEN_DISPS(play->state.gfxCtx, "../z_en_hy.c", 2255);
- if (limbIndex == 7) {
- gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->objectSlotSkel2].segment);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotSkel2].segment);
+ if (limbIndex == ENHY_LIMB_RIGHT_FOOT) {
+ gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->objectSlotUpperSkel].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotUpperSkel].segment);
}
- if (PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_BOJ_3 && limbIndex == 8) {
- gSPDisplayList(POLY_OPA_DISP++, object_boj_DL_005BC8);
+ if (ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_MAN_2_BALD && limbIndex == ENHY_LIMB_TORSO) {
+ gSPDisplayList(POLY_OPA_DISP++, gHylianMan2BagDL);
}
- if (limbIndex == 15) {
- Matrix_MultVec3f(&sp3C, &this->actor.focus.pos);
+ if (limbIndex == ENHY_LIMB_HEAD) {
+ Matrix_MultVec3f(&focusOffset, &this->actor.focus.pos);
}
CLOSE_DISPS(play->state.gfxCtx, "../z_en_hy.c", 2281);
}
-Gfx* EnHy_SetEnvColor(GraphicsContext* play, u8 envR, u8 envG, u8 envB, u8 envA) {
- Gfx* dList;
+Gfx* EnHy_SetEnvColor(GraphicsContext* gfxCtx, u8 envR, u8 envG, u8 envB, u8 envA) {
+ Gfx* gfx = GRAPH_ALLOC(gfxCtx, 2 * sizeof(Gfx));
- dList = GRAPH_ALLOC(play, 2 * sizeof(Gfx));
- gDPSetEnvColor(dList, envR, envG, envB, envA);
- gSPEndDisplayList(dList + 1);
+ gDPSetEnvColor(&gfx[0], envR, envG, envB, envA);
+ gSPEndDisplayList(&gfx[1]);
- return dList;
+ return gfx;
}
void EnHy_Draw(Actor* thisx, PlayState* play) {
@@ -1190,34 +1454,30 @@ void EnHy_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_en_hy.c", 2318);
- if (this->actionFunc != EnHy_InitImpl) {
+ if (this->actionFunc != EnHy_WaitForObjects) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Matrix_Translate(this->modelOffset.x, this->modelOffset.y, this->modelOffset.z, MTXMODE_APPLY);
- envColorSeg8 = sModelInfo[PARAMS_GET_S(this->actor.params, 0, 7)].envColorSeg8;
- envColorSeg9 = sModelInfo[PARAMS_GET_S(this->actor.params, 0, 7)].envColorSeg9;
+ envColorSeg8 = sModelInfo[ENHY_GET_TYPE(&this->actor)].envColorSeg8;
+ envColorSeg9 = sModelInfo[ENHY_GET_TYPE(&this->actor)].envColorSeg9;
- switch (PARAMS_GET_S(this->actor.params, 0, 7)) {
- // ENHY_TYPE_AOB
- // ENHY_TYPE_COB
- case ENHY_TYPE_AHG_2:
- case ENHY_TYPE_BOJ_3:
- case ENHY_TYPE_AHG_4:
- case ENHY_TYPE_BOJ_5:
- // ENHY_TYPE_BBA
- case ENHY_TYPE_BJI_7:
- case ENHY_TYPE_CNE_8:
- case ENHY_TYPE_BOJ_9:
- case ENHY_TYPE_BOJ_10:
- case ENHY_TYPE_CNE_11:
- case ENHY_TYPE_BOJ_12:
- case ENHY_TYPE_AHG_13:
- case ENHY_TYPE_BOJ_14:
- case ENHY_TYPE_BJI_15:
- case ENHY_TYPE_BOJ_16:
- case ENHY_TYPE_AHG_17:
- // ENHY_TYPE_BOB_18
- case ENHY_TYPE_BJI_19:
- case ENHY_TYPE_AHG_20:
+ switch (ENHY_GET_TYPE(&this->actor)) {
+ case ENHY_TYPE_MAN_1_BEARD:
+ case ENHY_TYPE_MAN_2_BALD:
+ case ENHY_TYPE_MAN_1_SHAVED_BLACK_SHIRT:
+ case ENHY_TYPE_BEGGAR:
+ case ENHY_TYPE_OLD_MAN:
+ case ENHY_TYPE_YOUNG_WOMAN_BROWN_HAIR:
+ case ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT:
+ case ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT:
+ case ENHY_TYPE_YOUNG_WOMAN_ORANGE_HAIR:
+ case ENHY_TYPE_MAN_2_ALT_MUSTACHE:
+ case ENHY_TYPE_MAN_1_BOWL_CUT_PURPLE_SHIRT:
+ case ENHY_TYPE_MAN_2_BEARD:
+ case ENHY_TYPE_OLD_MAN_BALD_BROWN_ROBE:
+ case ENHY_TYPE_MAN_2_MUSTACHE_WHITE_SHIRT:
+ case ENHY_TYPE_MAN_1_SHAVED_GREEN_SHIRT:
+ case ENHY_TYPE_OLD_MAN_BALD_PURPLE_ROBE:
+ case ENHY_TYPE_MAN_1_BOWL_CUT_GREEN_SHIRT:
gSPSegment(POLY_OPA_DISP++, 0x08,
EnHy_SetEnvColor(play->state.gfxCtx, envColorSeg8.r, envColorSeg8.g, envColorSeg8.b,
envColorSeg8.a));
@@ -1225,12 +1485,12 @@ void EnHy_Draw(Actor* thisx, PlayState* play) {
EnHy_SetEnvColor(play->state.gfxCtx, envColorSeg9.r, envColorSeg9.g, envColorSeg9.b,
envColorSeg9.a));
- if (PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_CNE_8 ||
- PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_CNE_11) {
- if (PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_CNE_8) {
+ if (ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_YOUNG_WOMAN_BROWN_HAIR ||
+ ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_YOUNG_WOMAN_ORANGE_HAIR) {
+ if (ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_YOUNG_WOMAN_BROWN_HAIR) {
envColorSeg10 = envColorSeg8;
}
- if (PARAMS_GET_S(this->actor.params, 0, 7) == ENHY_TYPE_CNE_11) {
+ if (ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_YOUNG_WOMAN_ORANGE_HAIR) {
envColorSeg10.r = envColorSeg10.g = envColorSeg10.b = 255;
envColorSeg10.a = 0;
}
@@ -1239,6 +1499,13 @@ void EnHy_Draw(Actor* thisx, PlayState* play) {
envColorSeg10.a));
}
break;
+
+ // ENHY_TYPE_DOG_LADY
+ // ENHY_TYPE_WOMAN_3
+ // ENHY_TYPE_OLD_WOMAN
+ // ENHY_TYPE_WOMAN_2
+ default:
+ break;
}
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.h b/src/overlays/actors/ovl_En_Hy/z_en_hy.h
index c8e28bdd4b..50bdc90933 100644
--- a/src/overlays/actors/ovl_En_Hy/z_en_hy.h
+++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.h
@@ -2,36 +2,59 @@
#define Z_EN_HY_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+
+#define ENHY_GET_TYPE(thisx) PARAMS_GET_S((thisx)->params, 0, 7)
+#define ENHY_GET_PATH_INDEX(thisx) PARAMS_GET_S((thisx)->params, 7, 4)
typedef enum EnHyType {
- /* 0 */ ENHY_TYPE_AOB,
- /* 1 */ ENHY_TYPE_COB,
- /* 2 */ ENHY_TYPE_AHG_2,
- /* 3 */ ENHY_TYPE_BOJ_3,
- /* 4 */ ENHY_TYPE_AHG_4,
- /* 5 */ ENHY_TYPE_BOJ_5,
- /* 6 */ ENHY_TYPE_BBA,
- /* 7 */ ENHY_TYPE_BJI_7,
- /* 8 */ ENHY_TYPE_CNE_8,
- /* 9 */ ENHY_TYPE_BOJ_9,
- /* 10 */ ENHY_TYPE_BOJ_10,
- /* 11 */ ENHY_TYPE_CNE_11,
- /* 12 */ ENHY_TYPE_BOJ_12,
- /* 13 */ ENHY_TYPE_AHG_13,
- /* 14 */ ENHY_TYPE_BOJ_14,
- /* 15 */ ENHY_TYPE_BJI_15,
- /* 16 */ ENHY_TYPE_BOJ_16,
- /* 17 */ ENHY_TYPE_AHG_17,
- /* 18 */ ENHY_TYPE_BOB_18,
- /* 19 */ ENHY_TYPE_BJI_19,
- /* 20 */ ENHY_TYPE_AHG_20,
+ /* 0 */ ENHY_TYPE_DOG_LADY,
+ /* 1 */ ENHY_TYPE_WOMAN_3,
+ /* 2 */ ENHY_TYPE_MAN_1_BEARD,
+ /* 3 */ ENHY_TYPE_MAN_2_BALD,
+ /* 4 */ ENHY_TYPE_MAN_1_SHAVED_BLACK_SHIRT,
+ /* 5 */ ENHY_TYPE_BEGGAR,
+ /* 6 */ ENHY_TYPE_OLD_WOMAN,
+ /* 7 */ ENHY_TYPE_OLD_MAN,
+ /* 8 */ ENHY_TYPE_YOUNG_WOMAN_BROWN_HAIR,
+ /* 9 */ ENHY_TYPE_MAN_2_MUSTACHE_RED_SHIRT,
+ /* 10 */ ENHY_TYPE_MAN_2_MUSTACHE_BLUE_SHIRT,
+ /* 11 */ ENHY_TYPE_YOUNG_WOMAN_ORANGE_HAIR,
+ /* 12 */ ENHY_TYPE_MAN_2_ALT_MUSTACHE,
+ /* 13 */ ENHY_TYPE_MAN_1_BOWL_CUT_PURPLE_SHIRT,
+ /* 14 */ ENHY_TYPE_MAN_2_BEARD,
+ /* 15 */ ENHY_TYPE_OLD_MAN_BALD_BROWN_ROBE,
+ /* 16 */ ENHY_TYPE_MAN_2_MUSTACHE_WHITE_SHIRT,
+ /* 17 */ ENHY_TYPE_MAN_1_SHAVED_GREEN_SHIRT,
+ /* 18 */ ENHY_TYPE_WOMAN_2,
+ /* 19 */ ENHY_TYPE_OLD_MAN_BALD_PURPLE_ROBE,
+ /* 20 */ ENHY_TYPE_MAN_1_BOWL_CUT_GREEN_SHIRT,
/* 21 */ ENHY_TYPE_MAX
} EnHyType;
+typedef enum EnHyLimb {
+ /* 0x00 */ ENHY_LIMB_NONE,
+ /* 0x01 */ ENHY_LIMB_PELVIS,
+ /* 0x02 */ ENHY_LIMB_LEFT_THIGH,
+ /* 0x03 */ ENHY_LIMB_LEFT_SHIN,
+ /* 0x04 */ ENHY_LIMB_LEFT_FOOT,
+ /* 0x05 */ ENHY_LIMB_RIGHT_THIGH,
+ /* 0x06 */ ENHY_LIMB_RIGHT_SHIN,
+ /* 0x07 */ ENHY_LIMB_RIGHT_FOOT,
+ /* 0x08 */ ENHY_LIMB_TORSO,
+ /* 0x09 */ ENHY_LIMB_LEFT_UPPER_ARM,
+ /* 0x0A */ ENHY_LIMB_LEFT_FOREARM,
+ /* 0x0B */ ENHY_LIMB_LEFT_HAND,
+ /* 0x0C */ ENHY_LIMB_RIGHT_UPPER_ARM,
+ /* 0x0D */ ENHY_LIMB_RIGHT_FOREARM,
+ /* 0x0E */ ENHY_LIMB_RIGHT_HAND,
+ /* 0x0F */ ENHY_LIMB_HEAD,
+ /* 0x10 */ ENHY_LIMB_MAX
+} EnHyLimb;
+
struct EnHy;
-typedef void (*EnHyActionFunc)(struct EnHy*, PlayState*);
+typedef void (*EnHyActionFunc)(struct EnHy*, struct PlayState*);
typedef struct EnHy {
/* 0x0000 */ Actor actor;
@@ -40,25 +63,25 @@ typedef struct EnHy {
/* 0x0194 */ char unk_194; // unused
/* 0x0195 */ u8 pathReverse;
/* 0x0196 */ s8 objectSlotHead;
- /* 0x0197 */ s8 objectSlotSkel2; // 7 < limb < 15 (upper part?) (always same as objectSlotSkel1)
- /* 0x0198 */ s8 objectSlotSkel1; // sets the object used when drawing the skeleton for limb <= 7 (lower part?)
+ /* 0x0197 */ s8 objectSlotUpperSkel; // upper body limbs object, 7 < limb < 15 (always same as objectSlotLowerSkel),
+ /* 0x0198 */ s8 objectSlotLowerSkel; // lower body limbs object, limb <= 7
/* 0x0199 */ s8 objectSlotOsAnime;
/* 0x019C */ ColliderCylinder collider;
/* 0x01E8 */ NpcInteractInfo interactInfo;
- /* 0x0210 */ Path* path;
+ /* 0x0210 */ struct Path* path;
/* 0x0214 */ s8 waypoint;
- /* 0x0215 */ s8 unk_215;
+ /* 0x0215 */ s8 playedSfx;
/* 0x0216 */ char unk_216[2]; // unused
/* 0x0218 */ s16 curEyeIndex;
/* 0x021A */ s16 nextEyeIndexTimer;
- /* 0x021C */ s16 unk_21C[16]; // bodyWiggleY ?
- /* 0x023C */ s16 unk_23C[16]; // bodyWiggleZ ?
+ /* 0x021C */ s16 fidgetTableY[ENHY_LIMB_MAX];
+ /* 0x023C */ s16 fidgetTableZ[ENHY_LIMB_MAX];
/* 0x025C */ f32 interactRange;
- /* 0x0260 */ s32 unkGetItemId;
+ /* 0x0260 */ s32 getItemId;
/* 0x0264 */ Vec3f modelOffset;
- /* 0x0270 */ Vec3s jointTable[16];
- /* 0x02D0 */ Vec3s morphTable[16];
- /* 0x0330 */ u16 unk_330;
+ /* 0x0270 */ Vec3s jointTable[ENHY_LIMB_MAX];
+ /* 0x02D0 */ Vec3s morphTable[ENHY_LIMB_MAX];
+ /* 0x0330 */ u16 talonEventChkInf;
} EnHy; // size = 0x0334
#endif
diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c
index ecd1ad5d3e..8db6b38d0f 100644
--- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c
+++ b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c
@@ -5,6 +5,20 @@
*/
#include "z_en_ice_hono.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64item.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define FLAGS 0
@@ -79,21 +93,21 @@ static ColliderCylinderInit sCylinderInitDroppedFlame = {
static InitChainEntry sInitChainCapturableFlame[] = {
ICHAIN_U8(attentionRangeType, ATTENTION_RANGE_0, ICHAIN_CONTINUE),
ICHAIN_F32(lockOnArrowOffset, 60, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
static InitChainEntry sInitChainDroppedFlame[] = {
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
static InitChainEntry sInitChainSmallFlame[] = {
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
f32 EnIceHono_XZDistanceSquared(Vec3f* v1, Vec3f* v2) {
@@ -357,7 +371,7 @@ void EnIceHono_Update(Actor* thisx, PlayState* play) {
sin154 = Math_SinS(this->unk_154);
intensity = (Rand_ZeroOne() * 0.05f) + ((sin154 * 0.125f) + (sin156 * 0.1f)) + 0.425f;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if ((intensity > 0.7f) || (intensity < 0.2f)) {
PRINTF("ありえない値(ratio = %f)\n", intensity); // "impossible value(ratio = %f)"
}
diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h
index e5ad5fd1cf..ea975199aa 100644
--- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h
+++ b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h
@@ -2,11 +2,12 @@
#define Z_EN_ICE_HONO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnIceHono;
-typedef void (*EnIceHonoActionFunc)(struct EnIceHono*, PlayState*);
+typedef void (*EnIceHonoActionFunc)(struct EnIceHono*, struct PlayState*);
typedef struct EnIceHono {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c
index 003e5a5c3b..582455f17e 100644
--- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c
+++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c
@@ -5,11 +5,33 @@
*/
#include "z_en_ik.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sequence.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
+
#include "assets/scenes/dungeons/jyasinboss/jyasinboss_scene.h"
#include "assets/objects/object_ik/object_ik.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef void (*EnIkDrawFunc)(struct EnIk*, PlayState*);
@@ -201,12 +223,12 @@ void EnIk_InitImpl(Actor* thisx, PlayState* play) {
thisx->update = EnIk_UpdateEnemy;
thisx->draw = EnIk_DrawEnemy;
- thisx->flags |= ACTOR_FLAG_10;
+ thisx->flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
Collider_InitCylinder(play, &this->bodyCollider);
Collider_SetCylinder(play, &this->bodyCollider, thisx, &sCylinderInit);
Collider_InitTris(play, &this->shieldCollider);
- Collider_SetTris(play, &this->shieldCollider, thisx, &sTrisInit, this->shieldColliderItems);
+ Collider_SetTris(play, &this->shieldCollider, thisx, &sTrisInit, this->shieldColliderElements);
Collider_InitQuad(play, &this->axeCollider);
Collider_SetQuad(play, &this->axeCollider, thisx, &sQuadInit);
@@ -757,9 +779,11 @@ void EnIk_UpdateDamage(EnIk* this, PlayState* play) {
} else if (this->actor.colChkInfo.health <= 10) {
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_BOSS);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_LAST_DAMAGE);
+#if !OOT_PAL_N64
if (this->switchFlag != 0xFF) {
Flags_SetSwitch(play, this->switchFlag);
}
+#endif
return;
} else if (prevHealth == 50) {
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);
@@ -817,7 +841,7 @@ void EnIk_UpdateEnemy(Actor* thisx, PlayState* play) {
prevInvincibilityTimer = player->invincibilityTimer;
if (player->invincibilityTimer <= 0) {
- if (player->invincibilityTimer < -39) {
+ if (player->invincibilityTimer <= -40) {
player->invincibilityTimer = 0;
} else {
player->invincibilityTimer = 0;
@@ -826,7 +850,7 @@ void EnIk_UpdateEnemy(Actor* thisx, PlayState* play) {
}
}
- func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
player->invincibilityTimer = prevInvincibilityTimer;
}
}
@@ -1231,6 +1255,9 @@ void EnIk_CsAction4(EnIk* this, PlayState* play) {
void EnIk_CsAction5(EnIk* this, PlayState* play) {
if (EnIk_GetCue(play, 4) == NULL) {
+#if OOT_PAL_N64
+ Flags_SetSwitch(play, this->switchFlag);
+#endif
Actor_Kill(&this->actor);
}
}
@@ -1353,7 +1380,8 @@ void EnIk_HandleCsCues(EnIk* this, PlayState* play) {
break;
default:
- PRINTF("En_Ik_inConfrontion_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Ik_inConfrontion_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Ik_inConfrontion_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
@@ -1388,7 +1416,8 @@ void EnIk_UpdateCutscene(Actor* thisx, PlayState* play) {
EnIk* this = (EnIk*)thisx;
if (this->csAction < 0 || this->csAction >= ARRAY_COUNT(sCsActionFuncs) || sCsActionFuncs[this->csAction] == NULL) {
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
@@ -1482,7 +1511,8 @@ void EnIk_DrawCutscene(Actor* thisx, PlayState* play) {
if (this->csDrawMode < 0 || this->csDrawMode >= ARRAY_COUNT(sCsDrawFuncs) ||
sCsDrawFuncs[this->csDrawMode] == NULL) {
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
@@ -1522,7 +1552,7 @@ void EnIk_StartDefeatCutscene(Actor* thisx, PlayState* play) {
Cutscene_SetScript(play, gSpiritBossNabooruKnuckleDefeatCs);
gSaveContext.cutsceneTrigger = 1;
Actor_SetScale(&this->actor, 0.01f);
- SET_EVENTCHKINF(EVENTCHKINF_3C);
+ SET_EVENTCHKINF(EVENTCHKINF_DEFEATED_NABOORU_KNUCKLE);
EnIk_SetupCsAction3(this, play);
}
}
@@ -1531,7 +1561,8 @@ void EnIk_Init(Actor* thisx, PlayState* play) {
EnIk* this = (EnIk*)thisx;
s32 upperParams = IK_GET_UPPER_PARAMS(&this->actor);
- if (((IK_GET_ARMOR_TYPE(&this->actor) == IK_TYPE_NABOORU) && GET_EVENTCHKINF(EVENTCHKINF_3C)) ||
+ if (((IK_GET_ARMOR_TYPE(&this->actor) == IK_TYPE_NABOORU) &&
+ GET_EVENTCHKINF(EVENTCHKINF_DEFEATED_NABOORU_KNUCKLE)) ||
(upperParams != 0 && Flags_GetSwitch(play, upperParams >> 8))) {
Actor_Kill(&this->actor);
} else {
diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.h b/src/overlays/actors/ovl_En_Ik/z_en_ik.h
index 70c45063b5..9b4c16d7b9 100644
--- a/src/overlays/actors/ovl_En_Ik/z_en_ik.h
+++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.h
@@ -2,11 +2,11 @@
#define Z_EN_IK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnIk;
-typedef void (*EnIkActionFunc)(struct EnIk*, PlayState*);
+typedef void (*EnIkActionFunc)(struct EnIk*, struct PlayState*);
#define IK_GET_UPPER_PARAMS(thisx) PARAMS_GET_NOSHIFT(this->actor.params, 8, 8)
#define IK_GET_ARMOR_TYPE(thisx) PARAMS_GET_U((thisx)->params, 0, 8)
@@ -109,7 +109,7 @@ typedef struct EnIk {
/* 0x0320 */ ColliderCylinder bodyCollider;
/* 0x036C */ ColliderQuad axeCollider;
/* 0x03EC */ ColliderTris shieldCollider;
- /* 0x040C */ ColliderTrisElement shieldColliderItems[2];
+ /* 0x040C */ ColliderTrisElement shieldColliderElements[2];
/* 0x04C4 */ s32 blureIdx;
/* 0x04C8 */ s32 csAction;
/* 0x04CC */ s32 csDrawMode;
diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c
index 74e132152a..521b8dcbfa 100644
--- a/src/overlays/actors/ovl_En_In/z_en_in.c
+++ b/src/overlays/actors/ovl_En_In/z_en_in.c
@@ -1,8 +1,28 @@
#include "z_en_in.h"
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "letterbox.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_in/object_in.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnIn_Init(Actor* thisx, PlayState* play);
void EnIn_Destroy(Actor* thisx, PlayState* play);
@@ -71,6 +91,14 @@ typedef enum EnInAnimation {
/* 9 */ ENIN_ANIM_9
} EnInAnimation;
+typedef enum EnInStartMode {
+ /* 0 */ ENIN_START_MODE_0,
+ /* 1 */ ENIN_START_MODE_1,
+ /* 2 */ ENIN_START_MODE_2,
+ /* 3 */ ENIN_START_MODE_3,
+ /* 4 */ ENIN_START_MODE_4
+} EnInStartMode;
+
static AnimationFrameCountInfo sAnimationInfo[] = {
{ &object_in_Anim_001CC0, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_in_Anim_001CC0, 1.0f, ANIMMODE_LOOP, -10.0f },
{ &object_in_Anim_013C6C, 1.0f, ANIMMODE_LOOP, 0.0f }, { &object_in_Anim_013C6C, 1.0f, ANIMMODE_LOOP, -10.0f },
@@ -139,8 +167,8 @@ u16 EnIn_GetTextIdAdult(PlayState* play) {
if (IS_NIGHT) {
return 0x204E;
}
- switch (GET_EVENTINF_HORSES_STATE()) {
- case EVENTINF_HORSES_STATE_1:
+ switch (GET_EVENTINF_INGO_RACE_STATE()) {
+ case INGO_RACE_STATE_HORSE_RENTAL_PERIOD:
if (!(player->stateFlags1 & PLAYER_STATE1_23)) {
return 0x2036;
} else if (GET_EVENTCHKINF(EVENTCHKINF_1B)) {
@@ -152,24 +180,27 @@ u16 EnIn_GetTextIdAdult(PlayState* play) {
} else {
return 0x2037;
}
- case EVENTINF_HORSES_STATE_3:
- if (GET_EVENTINF(EVENTINF_HORSES_06) || GET_EVENTINF(EVENTINF_HORSES_05)) {
+ case INGO_RACE_STATE_PLAYER_LOSE:
+ if (GET_EVENTINF(EVENTINF_INGO_RACE_SECOND_RACE) || GET_EVENTINF(EVENTINF_INGO_RACE_LOST_ONCE)) {
return 0x203E;
} else {
return 0x203D;
}
- case EVENTINF_HORSES_STATE_4:
+ case INGO_RACE_STATE_FIRST_WIN:
return 0x203A;
- case EVENTINF_HORSES_STATE_5:
- case EVENTINF_HORSES_STATE_6:
+ case INGO_RACE_STATE_TRAPPED_WIN_UNUSED:
+ case INGO_RACE_STATE_TRAPPED_WIN_EPONA:
return 0x203C;
- case EVENTINF_HORSES_STATE_7:
+ case INGO_RACE_STATE_REMATCH:
+ // Ask to race again after losing race
return 0x205B;
- case EVENTINF_HORSES_STATE_2:
+ case INGO_RACE_STATE_RACING:
default:
if (GET_INFTABLE(INFTABLE_9A)) {
+ // Pay to Ride
return 0x2031;
} else {
+ // Adult Ingo first dialog, branches to pay to ride
return 0x2030;
}
}
@@ -255,9 +286,9 @@ s16 EnIn_UpdateTalkStateOnChoice(PlayState* play, Actor* thisx) {
talkState = NPC_TALK_STATE_ACTION;
} else {
Message_ContinueTextbox(play, this->actor.textId = 0x2039);
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_0);
- CLEAR_EVENTINF(EVENTINF_HORSES_05);
- CLEAR_EVENTINF(EVENTINF_HORSES_06);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_OFFER_RENTAL);
+ CLEAR_EVENTINF(EVENTINF_INGO_RACE_LOST_ONCE);
+ CLEAR_EVENTINF(EVENTINF_INGO_RACE_SECOND_RACE);
this->actionFunc = func_80A7A4C8;
}
break;
@@ -337,8 +368,8 @@ void func_80A795C8(EnIn* this, PlayState* play) {
void func_80A79690(SkelAnime* skelAnime, EnIn* this, PlayState* play) {
if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) {
- skelAnime->moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
- AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f);
+ skelAnime->movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, skelAnime, 1.0f);
}
}
@@ -360,40 +391,40 @@ s32 func_80A7975C(EnIn* this, PlayState* play) {
return 1;
}
-s32 func_80A79830(EnIn* this, PlayState* play) {
+s32 EnIn_GetStartMode(EnIn* this, PlayState* play) {
if (play->sceneId == SCENE_LON_LON_RANCH && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 1 &&
!GET_EVENTCHKINF(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
- return 1;
+ return ENIN_START_MODE_1;
}
if (play->sceneId == SCENE_STABLE && LINK_IS_CHILD && IS_DAY && this->actor.shape.rot.z == 3 &&
GET_EVENTCHKINF(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
- return 1;
+ return ENIN_START_MODE_1;
}
if (play->sceneId == SCENE_STABLE && LINK_IS_CHILD && IS_NIGHT) {
if ((this->actor.shape.rot.z == 2) && !GET_EVENTCHKINF(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
- return 1;
+ return ENIN_START_MODE_1;
}
if ((this->actor.shape.rot.z == 4) && GET_EVENTCHKINF(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
- return 1;
+ return ENIN_START_MODE_1;
}
}
if (play->sceneId == SCENE_LON_LON_RANCH && LINK_IS_ADULT && IS_DAY) {
if ((this->actor.shape.rot.z == 5) && !GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
- return 2;
+ return ENIN_START_MODE_2;
}
if ((this->actor.shape.rot.z == 7) && GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
- return 4;
+ return ENIN_START_MODE_4;
}
}
if (play->sceneId == SCENE_LON_LON_BUILDINGS && LINK_IS_ADULT && IS_NIGHT) {
if (this->actor.shape.rot.z == 6 && !GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
- return 3;
+ return ENIN_START_MODE_3;
}
if (this->actor.shape.rot.z == 8 && GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
- return 3;
+ return ENIN_START_MODE_3;
}
}
- return 0;
+ return ENIN_START_MODE_0;
}
void EnIn_UpdateEyes(EnIn* this) {
@@ -433,7 +464,7 @@ void func_80A79BAC(EnIn* this, PlayState* play, s32 index, u32 transitionType) {
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_8);
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
if (index == 0) {
- AREG(6) = 0;
+ R_EXITED_SCENE_RIDING_HORSE = false;
}
gSaveContext.timerState = TIMER_STATE_OFF;
}
@@ -488,7 +519,7 @@ void EnIn_Init(Actor* thisx, PlayState* play) {
respawnPos = respawn->pos;
// hardcoded coords for lon lon entrance
if (D_80A7B998 == 0 && respawnPos.x == 1107.0f && respawnPos.y == 0.0f && respawnPos.z == -3740.0f) {
- gSaveContext.eventInf[EVENTINF_HORSES_INDEX] = 0;
+ gSaveContext.eventInf[EVENTINF_INDEX_HORSES] = 0;
D_80A7B998 = 1;
}
this->actionFunc = EnIn_WaitForObject;
@@ -505,7 +536,7 @@ void EnIn_Destroy(Actor* thisx, PlayState* play) {
// This function does not actually wait since it waits for OBJECT_IN,
// but the object is already loaded at this point from being set in the ActorProfile data
void EnIn_WaitForObject(EnIn* this, PlayState* play) {
- s32 sp3C = 0;
+ s32 staySpawned = false;
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot) || this->actor.params <= 0) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
@@ -514,7 +545,7 @@ void EnIn_WaitForObject(EnIn* this, PlayState* play) {
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
if (func_80A7975C(this, play)) {
- SET_EVENTINF_HORSES_0F(0);
+ WRITE_EVENTINF_INGO_RACE_0F(0);
return;
}
Actor_SetScale(&this->actor, 0.01f);
@@ -522,83 +553,83 @@ void EnIn_WaitForObject(EnIn* this, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
this->actionFunc = func_80A7A4BC;
- switch (func_80A79830(this, play)) {
- case 1:
+ switch (EnIn_GetStartMode(this, play)) {
+ case ENIN_START_MODE_1:
EnIn_ChangeAnim(this, ENIN_ANIM_9);
this->actionFunc = func_80A7A4BC;
break;
- case 3:
+ case ENIN_START_MODE_3:
EnIn_ChangeAnim(this, ENIN_ANIM_7);
this->actionFunc = func_80A7A4BC;
if (!GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
this->actor.params = 5;
}
break;
- case 4:
+ case ENIN_START_MODE_4:
EnIn_ChangeAnim(this, ENIN_ANIM_8);
this->eyeIndex = 3;
this->actionFunc = func_80A7A4BC;
break;
- case 0:
+ case ENIN_START_MODE_0:
Actor_Kill(&this->actor);
break;
- default:
- switch (GET_EVENTINF_HORSES_STATE()) {
- case EVENTINF_HORSES_STATE_0:
- case EVENTINF_HORSES_STATE_2:
- case EVENTINF_HORSES_STATE_3:
- case EVENTINF_HORSES_STATE_4:
- case EVENTINF_HORSES_STATE_7:
+ default: // ENIN_START_MODE_2
+ switch (GET_EVENTINF_INGO_RACE_STATE()) {
+ case INGO_RACE_STATE_OFFER_RENTAL:
+ case INGO_RACE_STATE_RACING:
+ case INGO_RACE_STATE_PLAYER_LOSE:
+ case INGO_RACE_STATE_FIRST_WIN:
+ case INGO_RACE_STATE_REMATCH:
if (this->actor.params == 2) {
- sp3C = 1;
+ staySpawned = true;
}
break;
- case EVENTINF_HORSES_STATE_1:
+ case INGO_RACE_STATE_HORSE_RENTAL_PERIOD:
if (this->actor.params == 3) {
- sp3C = 1;
+ staySpawned = true;
}
break;
- case EVENTINF_HORSES_STATE_5:
- case EVENTINF_HORSES_STATE_6:
+ case INGO_RACE_STATE_TRAPPED_WIN_UNUSED:
+ case INGO_RACE_STATE_TRAPPED_WIN_EPONA:
if (this->actor.params == 4) {
- sp3C = 1;
+ staySpawned = true;
}
break;
}
- if (sp3C != 1) {
+ if (staySpawned != true) {
Actor_Kill(&this->actor);
return;
}
- switch (GET_EVENTINF_HORSES_STATE()) {
- case EVENTINF_HORSES_STATE_0:
- case EVENTINF_HORSES_STATE_2:
+ switch (GET_EVENTINF_INGO_RACE_STATE()) {
+ case INGO_RACE_STATE_OFFER_RENTAL:
+ case INGO_RACE_STATE_RACING:
EnIn_ChangeAnim(this, ENIN_ANIM_2);
this->actionFunc = func_80A7A4C8;
- gSaveContext.eventInf[EVENTINF_HORSES_INDEX] = 0;
+ gSaveContext.eventInf[EVENTINF_INDEX_HORSES] = 0;
break;
- case EVENTINF_HORSES_STATE_1:
+ case INGO_RACE_STATE_HORSE_RENTAL_PERIOD:
this->actor.attentionRangeType = ATTENTION_RANGE_3;
EnIn_ChangeAnim(this, ENIN_ANIM_2);
this->actionFunc = func_80A7A568;
Interface_SetTimer(60);
break;
- case EVENTINF_HORSES_STATE_3:
+ case INGO_RACE_STATE_PLAYER_LOSE:
EnIn_ChangeAnim(this, ENIN_ANIM_4);
this->actionFunc = func_80A7A770;
break;
- case EVENTINF_HORSES_STATE_4:
+ case INGO_RACE_STATE_FIRST_WIN:
EnIn_ChangeAnim(this, ENIN_ANIM_6);
this->unk_1EC = 8;
this->actionFunc = func_80A7A940;
break;
- case EVENTINF_HORSES_STATE_5:
- case EVENTINF_HORSES_STATE_6:
+ case INGO_RACE_STATE_TRAPPED_WIN_UNUSED:
+ case INGO_RACE_STATE_TRAPPED_WIN_EPONA:
this->actor.attentionRangeType = ATTENTION_RANGE_3;
EnIn_ChangeAnim(this, ENIN_ANIM_6);
this->unk_1EC = 8;
this->actionFunc = func_80A7AA40;
break;
- case EVENTINF_HORSES_STATE_7:
+ case INGO_RACE_STATE_REMATCH:
EnIn_ChangeAnim(this, ENIN_ANIM_2);
this->actionFunc = func_80A7A848;
break;
@@ -639,8 +670,8 @@ void func_80A7A4BC(EnIn* this, PlayState* play) {
void func_80A7A4C8(EnIn* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
func_80A79BAC(this, play, 1, TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST));
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_1);
- SET_EVENTINF_HORSES_0F(1);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_HORSE_RENTAL_PERIOD);
+ WRITE_EVENTINF_INGO_RACE_0F(1);
CLEAR_INFTABLE(INFTABLE_A2);
Environment_ForcePlaySequence(NA_BGM_HORSE);
play->msgCtx.stateTimer = 0;
@@ -671,8 +702,8 @@ void func_80A7A568(EnIn* this, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
return;
}
- SET_EVENTINF_HORSES_HORSETYPE(((EnHorse*)GET_PLAYER(play)->rideActor)->type);
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_2);
+ WRITE_EVENTINF_INGO_RACE_HORSETYPE(((EnHorse*)GET_PLAYER(play)->rideActor)->type);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_RACING);
phi_a2 = 2;
transitionType = TRANS_TYPE_FADE_BLACK;
} else {
@@ -684,13 +715,13 @@ void func_80A7A568(EnIn* this, PlayState* play) {
SET_INFTABLE(INFTABLE_AB);
}
}
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_0);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_OFFER_RENTAL);
phi_a2 = 0;
transitionType = TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST);
}
func_80A79BAC(this, play, phi_a2, transitionType);
play->msgCtx.stateTimer = 0;
- SET_EVENTINF_HORSES_0F(1);
+ WRITE_EVENTINF_INGO_RACE_0F(1);
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
}
@@ -698,17 +729,16 @@ void func_80A7A568(EnIn* this, PlayState* play) {
void func_80A7A770(EnIn* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
} else if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
Rupees_ChangeBy(-50);
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
EnIn_ChangeAnim(this, ENIN_ANIM_3);
this->actionFunc = func_80A7A848;
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_7);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_REMATCH);
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
- gSaveContext.eventInf[EVENTINF_HORSES_INDEX] =
- (gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & 0xFFFF) | EVENTINF_HORSES_05_MASK;
- if (!GET_EVENTINF(EVENTINF_HORSES_06)) {
+ SET_EVENTINF_INGO_RACE_FLAG(EVENTINF_INGO_RACE_LOST_ONCE);
+ if (!GET_EVENTINF(EVENTINF_INGO_RACE_SECOND_RACE)) {
play->msgCtx.stateTimer = 4;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
}
@@ -719,24 +749,24 @@ void func_80A7A848(EnIn* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
if ((play->msgCtx.choiceIndex == 0 && gSaveContext.save.info.playerData.rupees < 50) ||
play->msgCtx.choiceIndex == 1) {
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_0);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_OFFER_RENTAL);
this->actionFunc = func_80A7A4C8;
} else {
func_80A79BAC(this, play, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_2);
- SET_EVENTINF_HORSES_0F(1);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_RACING);
+ WRITE_EVENTINF_INGO_RACE_0F(1);
play->msgCtx.stateTimer = 0;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
}
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
- CLEAR_EVENTINF(EVENTINF_HORSES_05);
- CLEAR_EVENTINF(EVENTINF_HORSES_06);
+ CLEAR_EVENTINF(EVENTINF_INGO_RACE_LOST_ONCE);
+ CLEAR_EVENTINF(EVENTINF_INGO_RACE_SECOND_RACE);
}
}
void func_80A7A940(EnIn* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
return;
}
if (this->unk_1EC != 0) {
@@ -746,15 +776,14 @@ void func_80A7A940(EnIn* this, PlayState* play) {
}
}
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
func_80A79BAC(this, play, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_2);
- SET_EVENTINF_HORSES_0F(1);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_RACING);
+ WRITE_EVENTINF_INGO_RACE_0F(1);
play->msgCtx.stateTimer = 0;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
- gSaveContext.eventInf[EVENTINF_HORSES_INDEX] =
- (gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & 0xFFFF) | EVENTINF_HORSES_06_MASK;
+ SET_EVENTINF_INGO_RACE_FLAG(EVENTINF_INGO_RACE_SECOND_RACE);
}
}
@@ -903,8 +932,8 @@ void func_80A7B024(EnIn* this, PlayState* play) {
}
func_80A79BAC(this, play, 0, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
- SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_0);
- SET_EVENTINF_HORSES_0F(1);
+ SET_EVENTINF_INGO_RACE_STATE(INGO_RACE_STATE_OFFER_RENTAL);
+ WRITE_EVENTINF_INGO_RACE_0F(1);
play->msgCtx.stateTimer = 4;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
@@ -924,7 +953,7 @@ void EnIn_Update(Actor* thisx, PlayState* play) {
if (this->actionFunc != func_80A7A304) {
SkelAnime_Update(&this->skelAnime);
if (this->skelAnime.animation == &object_in_Anim_001BE0 &&
- GET_EVENTINF_HORSES_STATE() != EVENTINF_HORSES_STATE_6) {
+ GET_EVENTINF_INGO_RACE_STATE() != INGO_RACE_STATE_TRAPPED_WIN_EPONA) {
func_80A79690(&this->skelAnime, this, play);
}
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
@@ -933,6 +962,15 @@ void EnIn_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
if (this->actionFunc != func_80A7A304) {
func_80A79AB4(this, play);
+#if OOT_VERSION < PAL_1_0
+ Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState,
+ ((this->actor.attentionRangeType == 6) ? 80.0f : 320.0f) + this->collider.dim.radius,
+ EnIn_GetTextId, EnIn_UpdateTalkState);
+ if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
+ this->unk_1FA = this->unk_1F8;
+ this->unk_1F8 = Message_GetState(&play->msgCtx);
+ }
+#else
if ((gSaveContext.subTimerSeconds < 6) && (gSaveContext.subTimerState != SUBTIMER_STATE_OFF) &&
this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
if (Actor_TalkOfferAccepted(&this->actor, play)) {}
@@ -945,6 +983,7 @@ void EnIn_Update(Actor* thisx, PlayState* play) {
this->unk_1F8 = Message_GetState(&play->msgCtx);
}
}
+#endif
func_80A795C8(this, play);
}
}
diff --git a/src/overlays/actors/ovl_En_In/z_en_in.h b/src/overlays/actors/ovl_En_In/z_en_in.h
index 84b5db8bac..00774d0ddb 100644
--- a/src/overlays/actors/ovl_En_In/z_en_in.h
+++ b/src/overlays/actors/ovl_En_In/z_en_in.h
@@ -2,11 +2,11 @@
#define Z_EN_IN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnIn;
-typedef void (*EnInActionFunc)(struct EnIn*, PlayState*);
+typedef void (*EnInActionFunc)(struct EnIn*, struct PlayState*);
typedef enum IngoLimb {
/* 0x00 */ INGO_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c
index b98c864f9f..16a4b5abf1 100644
--- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c
+++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c
@@ -5,7 +5,22 @@
*/
#include "z_en_insect.h"
+#include "overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_math3d.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define FLAGS 0
@@ -54,7 +69,7 @@ ActorProfile En_Insect_Profile = {
/**/ EnInsect_Draw,
};
-static ColliderJntSphElementInit sColliderItemInit[1] = {
+static ColliderJntSphElementInit sColliderElementsInit[1] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -68,7 +83,7 @@ static ColliderJntSphElementInit sColliderItemInit[1] = {
},
};
-static ColliderJntSphInit sColliderInit = {
+static ColliderJntSphInit sColliderJntSphInit = {
{
COL_MATERIAL_NONE,
AT_NONE,
@@ -78,7 +93,7 @@ static ColliderJntSphInit sColliderInit = {
COLSHAPE_JNTSPH,
},
1,
- sColliderItemInit,
+ sColliderElementsInit,
};
/**
@@ -93,9 +108,9 @@ static u16 sInitInsectFlags[] = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 700, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 20, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 600, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 700, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 20, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 600, ICHAIN_STOP),
};
void EnInsect_InitFlags(EnInsect* this) {
@@ -191,7 +206,7 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) {
SkelAnime_Init(play, &this->skelAnime, &gBugSkel, &gBugCrawlAnim, this->jointTable, this->morphTable, 24);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderInit, &this->colliderItem);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderElements);
this->actor.colChkInfo.mass = 30;
@@ -202,7 +217,7 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) {
if (this->insectFlags & INSECT_FLAG_IS_SHORT_LIVED) {
this->lifeTimer = Rand_S16Offset(200, 40);
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
if (type == INSECT_TYPE_FIRST_DROPPED || type == INSECT_TYPE_EXTRA_DROPPED) {
@@ -577,10 +592,10 @@ void EnInsect_Dropped(EnInsect* this, PlayState* play) {
distanceSq = Math3D_Vec3fDistSq(&this->actor.world.pos, &this->soilActor->actor.world.pos);
} else {
if (this->insectFlags & INSECT_FLAG_FOUND_SOIL) {
- PRINTF(VT_COL(YELLOW, BLACK));
+ PRINTF_COLOR_WARNING();
// "warning: target Actor is NULL"
PRINTF("warning:目標 Actor が NULL (%s %d)\n", "../z_en_mushi.c", 1046);
- PRINTF(VT_RST);
+ PRINTF_RST();
}
distanceSq = 40.0f;
}
@@ -705,10 +720,10 @@ void EnInsect_Dropped(EnInsect* this, PlayState* play) {
} else if ((type == INSECT_TYPE_FIRST_DROPPED || type == INSECT_TYPE_EXTRA_DROPPED) &&
(this->insectFlags & INSECT_FLAG_0) && this->lifeTimer <= 0 && this->actionTimer <= 0 &&
this->actor.floorHeight < BGCHECK_Y_MIN + 10.0f) {
- PRINTF(VT_COL(YELLOW, BLACK));
+ PRINTF_COLOR_WARNING();
// "BG missing? To do Actor_delete"
PRINTF("BG 抜け? Actor_delete します(%s %d)\n", "../z_en_mushi.c", 1197);
- PRINTF(VT_RST);
+ PRINTF_RST();
Actor_Kill(&this->actor);
}
}
diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.h b/src/overlays/actors/ovl_En_Insect/z_en_insect.h
index 6ed7b95860..7bf443a2ea 100644
--- a/src/overlays/actors/ovl_En_Insect/z_en_insect.h
+++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.h
@@ -2,12 +2,11 @@
#define Z_EN_INSECT_H
#include "ultra64.h"
-#include "global.h"
-#include "overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h"
+#include "z64actor.h"
struct EnInsect;
-typedef void (*EnInsectActionFunc)(struct EnInsect*, PlayState*);
+typedef void (*EnInsectActionFunc)(struct EnInsect*, struct PlayState*);
#define INSECT_FLAG_0 (1 << 0)
#define INSECT_FLAG_1 (1 << 1)
@@ -22,7 +21,7 @@ typedef void (*EnInsectActionFunc)(struct EnInsect*, PlayState*);
typedef struct EnInsect {
/* 0x0000 */ Actor actor;
/* 0x014C */ ColliderJntSph collider;
- /* 0x016C */ ColliderJntSphElement colliderItem;
+ /* 0x016C */ ColliderJntSphElement colliderElements[1];
/* 0x01AC */ SkelAnime skelAnime;
/* 0x01F0 */ Vec3s jointTable[24];
/* 0x0280 */ Vec3s morphTable[24];
@@ -33,7 +32,7 @@ typedef struct EnInsect {
/* 0x031A */ s16 actionTimer;
/* 0x031C */ s16 lifeTimer;
/* 0x031E */ s16 crawlSoundDelay;
- /* 0x0320 */ ObjMakekinsuta* soilActor;
+ /* 0x0320 */ struct ObjMakekinsuta* soilActor;
/* 0x0324 */ f32 unk_324;
/* 0x0328 */ s16 unk_328;
/* 0x032A */ u8 unk_32A;
diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
index a14b34e922..bcf59dfbe7 100644
--- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
+++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
@@ -7,11 +7,28 @@
#include "z_en_ishi.h"
#include "overlays/actors/ovl_En_Insect/z_en_insect.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
-#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "quake.h"
#include "terminal.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64item.h"
+#include "z64play.h"
-#define FLAGS ACTOR_FLAG_23
+#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
+
+#define FLAGS ACTOR_FLAG_THROW_ONLY
void EnIshi_Init(Actor* thisx, PlayState* play);
void EnIshi_Destroy(Actor* thisx, PlayState* play2);
@@ -125,10 +142,10 @@ s32 EnIshi_SnapToFloor(EnIshi* this, PlayState* play, f32 arg2) {
Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos);
return true;
} else {
- PRINTF(VT_COL(YELLOW, BLACK));
+ PRINTF_COLOR_WARNING();
// "Failure attaching to ground"
PRINTF("地面に付着失敗(%s %d)\n", "../z_en_ishi.c", 388);
- PRINTF(VT_RST);
+ PRINTF_RST();
return false;
}
}
@@ -293,16 +310,16 @@ static InitChainEntry sInitChains[][5] = {
{
ICHAIN_F32_DIV1000(gravity, -1200, ICHAIN_CONTINUE),
ICHAIN_F32_DIV1000(minVelocityY, -20000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 150, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 400, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 150, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 400, ICHAIN_STOP),
},
{
ICHAIN_F32_DIV1000(gravity, -2500, ICHAIN_CONTINUE),
ICHAIN_F32_DIV1000(minVelocityY, -20000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 250, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 250, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 500, ICHAIN_STOP),
},
};
@@ -312,7 +329,7 @@ void EnIshi_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChains[type]);
if (play->csCtx.state != CS_STATE_IDLE) {
- this->actor.uncullZoneForward += 1000.0f;
+ this->actor.cullingVolumeDistance += 1000.0f;
}
if (this->actor.shape.rot.y == 0) {
this->actor.shape.rot.y = this->actor.world.rot.y = Rand_ZeroFloat(0x10000);
@@ -382,7 +399,7 @@ void EnIshi_Wait(EnIshi* this, PlayState* play) {
void EnIshi_SetupLiftedUp(EnIshi* this) {
this->actionFunc = EnIshi_LiftedUp;
this->actor.room = -1;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
void EnIshi_LiftedUp(EnIshi* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.h b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.h
index 3a7ab66fbd..731929a384 100644
--- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.h
+++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.h
@@ -2,11 +2,11 @@
#define Z_EN_ISHI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
// The switch flag value for this actor is constructed in a unique way.
-// There are two seperate param values which get OR'd together to create one final switch flag index.
-// These two values are seperated within the overall actor param value. See below:
+// There are two separate param values which get OR'd together to create one final switch flag index.
+// These two values are separated within the overall actor param value. See below:
//
// | A B C D | _ _ _ _ | E F | _ _ _ _ _ _ |
// 16 12 8 6 0
@@ -25,9 +25,9 @@ typedef enum EnIshiType {
struct EnIshi;
-typedef void (*EnIshiActionFunc)(struct EnIshi*, PlayState*);
-typedef void (*EnIshiEffectSpawnFunc)(struct EnIshi*, PlayState*);
-typedef void (*EnIshiDrawFunc)(struct EnIshi*, PlayState*);
+typedef void (*EnIshiActionFunc)(struct EnIshi*, struct PlayState*);
+typedef void (*EnIshiEffectSpawnFunc)(struct EnIshi*, struct PlayState*);
+typedef void (*EnIshiDrawFunc)(struct EnIshi*, struct PlayState*);
typedef struct EnIshi {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_It/z_en_it.c b/src/overlays/actors/ovl_En_It/z_en_it.c
index 312ceec96e..975fe8411f 100644
--- a/src/overlays/actors/ovl_En_It/z_en_it.c
+++ b/src/overlays/actors/ovl_En_It/z_en_it.c
@@ -6,6 +6,8 @@
#include "z_en_it.h"
+#include "z64play.h"
+
#define FLAGS 0
void EnIt_Init(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_It/z_en_it.h b/src/overlays/actors/ovl_En_It/z_en_it.h
index fb150fcb0d..9f1f794e4f 100644
--- a/src/overlays/actors/ovl_En_It/z_en_it.h
+++ b/src/overlays/actors/ovl_En_It/z_en_it.h
@@ -2,7 +2,7 @@
#define Z_EN_IT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnIt;
diff --git a/src/overlays/actors/ovl_En_Jj/z_en_jj.c b/src/overlays/actors/ovl_En_Jj/z_en_jj.c
index 999e97cd24..3f6b3c587c 100644
--- a/src/overlays/actors/ovl_En_Jj/z_en_jj.c
+++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.c
@@ -5,10 +5,22 @@
*/
#include "z_en_jj.h"
-#include "assets/objects/object_jj/object_jj.h"
#include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_jj/object_jj.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum EnJjEyeState {
/* 0 */ JABUJABU_EYE_OPEN,
@@ -68,9 +80,9 @@ static ColliderCylinderInit sCylinderInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 87, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 3300, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1100, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 3300, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1100, ICHAIN_STOP),
};
void EnJj_SetupAction(EnJj* this, EnJjActionFunc actionFunc) {
@@ -96,7 +108,7 @@ void EnJj_Init(Actor* thisx, PlayState* play2) {
this->extraBlinkCounter = 0;
this->extraBlinkTotal = 0;
- if (GET_EVENTCHKINF(EVENTCHKINF_3A)) { // Fish given
+ if (GET_EVENTCHKINF(EVENTCHKINF_OPENED_JABU_JABU)) {
EnJj_SetupAction(this, EnJj_WaitToOpenMouth);
} else {
EnJj_SetupAction(this, EnJj_WaitForFish);
@@ -214,11 +226,11 @@ void EnJj_BeginCutscene(EnJj* this, PlayState* play) {
this->cutsceneCountdownTimer--;
} else {
EnJj_SetupAction(this, EnJj_RemoveDust);
- play->csCtx.script = D_80A88164;
+ play->csCtx.script = gJabuInhalingCs;
gSaveContext.cutsceneTrigger = 1;
DynaPoly_DisableCollision(play, &play->colCtx.dyna, bodyCollisionActor->bgId);
Camera_SetFinishedFlag(GET_ACTIVE_CAM(play));
- SET_EVENTCHKINF(EVENTCHKINF_3A);
+ SET_EVENTCHKINF(EVENTCHKINF_OPENED_JABU_JABU);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
}
}
diff --git a/src/overlays/actors/ovl_En_Jj/z_en_jj.h b/src/overlays/actors/ovl_En_Jj/z_en_jj.h
index c5d6241204..9ac2df8bb4 100644
--- a/src/overlays/actors/ovl_En_Jj/z_en_jj.h
+++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.h
@@ -2,11 +2,11 @@
#define Z_EN_JJ_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnJj;
-typedef void (*EnJjActionFunc)(struct EnJj*, PlayState*);
+typedef void (*EnJjActionFunc)(struct EnJj*, struct PlayState*);
typedef struct EnJj {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_En_Jj/z_en_jj_cutscene_data.inc.c b/src/overlays/actors/ovl_En_Jj/z_en_jj_cutscene_data.inc.c
index 14331f81d8..0cf56d63e6 100644
--- a/src/overlays/actors/ovl_En_Jj/z_en_jj_cutscene_data.inc.c
+++ b/src/overlays/actors/ovl_En_Jj/z_en_jj_cutscene_data.inc.c
@@ -2,25 +2,25 @@
#include "z64cutscene_commands.h"
// clang-format off
-static CutsceneData D_80A88164[] = {
- CS_BEGIN_CUTSCENE(26, 1629),
+static CutsceneData gJabuInhalingCs[] = {
+ CS_HEADER(26, 1629),
CS_PLAYER_CUE_LIST(4),
CS_PLAYER_CUE(PLAYER_CUEID_5, 0, 240, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_3, 240, 255, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_6, 255, 285, 0x0000, 0x4000, 0x0000, -1732, 52, -44, -1732, 52, -44, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_32, 285, 300, 0x0000, 0xC000, 0x0000, -1732, 52, -44, -1537, 109, -44, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
- CS_ACTOR_CUE_LIST(68, 4),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_1_7, 4),
CS_ACTOR_CUE(0x0001, 0, 234, 0x0000, 0x4000, 0x0000, -1665, 52, -44, -1665, 52, -44, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_ACTOR_CUE(0x0002, 234, 241, 0x41F8, 0x0000, 0x0000, -1665, 52, -44, -1603, 130, -47, CS_FLOAT(0x410DB6DB, 8.857142f), CS_FLOAT(0x41324925, 11.142858f), CS_FLOAT(0xC10DB6DB, -8.857142f)),
CS_ACTOR_CUE(0x0002, 241, 280, 0x4031, 0x0000, 0x0000, -1603, 130, -47, -549, 130, -52, CS_FLOAT(0x41D83483, 27.02564f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xC1D83483, -27.02564f)),
CS_ACTOR_CUE(0x0003, 280, 300, 0x0000, 0x0000, 0x0000, -549, 130, -52, -549, 130, -52, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(67, 5),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_2_4, 5),
CS_ACTOR_CUE(0x0001, 0, 93, 0x0000, 0x0000, 0x0000, 0, 51, 124, 0, 51, 124, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0003, 93, 121, 0x0000, 0x0000, 0x0000, 0, 51, 124, 0, 51, 124, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0001, 121, 146, 0x0000, 0x0000, 0x0000, 0, 51, 124, 0, 51, 124, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 146, 241, 0x0000, 0x0000, 0x0000, 0, 51, 124, 0, 51, 124, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0001, 241, 441, 0x0000, 0x0000, 0x0000, 0, 51, 124, 0, 51, 124, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(69, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_2_5, 3),
CS_ACTOR_CUE(0x0001, 0, 90, 0x0000, 0x0000, 0x0000, 0, -33, 9, 0, -33, 9, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 90, 330, 0x0000, 0x0000, 0x0000, 0, -33, 9, 0, -62, 22, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xBDF77777, -0.12083333f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0003, 330, 380, 0x0000, 0x0000, 0x0000, 0, -62, 22, 0, -62, 22, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
@@ -151,8 +151,8 @@ static CutsceneData D_80A88164[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42726667, 60.600002f), -1721, 82, -42, 0x0000),
CS_TRANSITION(CS_TRANS_BLACK_FILL_IN, 335, 342),
CS_DESTINATION(CS_DEST_JABU_JABU, 345, 395),
- CS_ACTOR_CUE_LIST(62, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_8_0, 1),
CS_ACTOR_CUE(0x0001, 305, 494, 0x0000, 0x0000, 0x0000, -1399, 452, -53, -1399, 452, -53, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c
index ec0820043c..f5aee34c6a 100644
--- a/src/overlays/actors/ovl_En_Js/z_en_js.c
+++ b/src/overlays/actors/ovl_En_Js/z_en_js.c
@@ -5,6 +5,15 @@
*/
#include "z_en_js.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "regs.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_js/object_js.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -103,7 +112,7 @@ void func_80A89008(EnJs* this) {
void func_80A89078(EnJs* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
func_80A89008(this);
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
}
@@ -119,7 +128,7 @@ void func_80A8910C(EnJs* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
this->actor.textId = 0x6078;
En_Js_SetupAction(this, func_80A890C0);
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
}
diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.h b/src/overlays/actors/ovl_En_Js/z_en_js.h
index f1e356b2c1..e1e22f547d 100644
--- a/src/overlays/actors/ovl_En_Js/z_en_js.h
+++ b/src/overlays/actors/ovl_En_Js/z_en_js.h
@@ -2,11 +2,11 @@
#define Z_EN_JS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnJs;
-typedef void (*EnJsActionFunc)(struct EnJs*, PlayState*);
+typedef void (*EnJsActionFunc)(struct EnJs*, struct PlayState*);
typedef struct EnJs {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c
index 6650e31715..fce6c4ef03 100644
--- a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c
+++ b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c
@@ -7,6 +7,17 @@
#include "z_en_jsjutan.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
void EnJsjutan_Init(Actor* thisx, PlayState* play);
@@ -27,6 +38,8 @@ ActorProfile En_Jsjutan_Profile = {
};
// Shadow texture. 32x64 I8.
+#define sShadowTex_WIDTH 32
+#define sShadowTex_HEIGHT 64
static u8 sShadowTex[0x800];
static Vec3s D_80A8EE10[0x90];
diff --git a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.h b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.h
index 63a694bad6..b6c4b07591 100644
--- a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.h
+++ b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.h
@@ -2,7 +2,7 @@
#define Z_EN_JSJUTAN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnJsjutan;
diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
index c82d070bcf..d2d807cd28 100644
--- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
+++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
@@ -5,10 +5,25 @@
*/
#include "z_en_kakasi.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "sfx.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ka/object_ka.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_25)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnKakasi_Init(Actor* thisx, PlayState* play);
void EnKakasi_Destroy(Actor* thisx, PlayState* play);
@@ -73,7 +88,7 @@ void EnKakasi_Init(Actor* thisx, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelanime, &object_ka_Skel_0065B0, &object_ka_Anim_000214, NULL, NULL, 0);
this->rot = this->actor.world.rot;
- this->actor.flags |= ACTOR_FLAG_10;
+ this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
Actor_SetScale(&this->actor, 0.01f);
diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.h b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.h
index ceef6afe9c..c2eff368ca 100644
--- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.h
+++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.h
@@ -2,11 +2,11 @@
#define Z_EN_KAKASI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnKakasi;
-typedef void (*EnKakasiFunc)(struct EnKakasi*, PlayState*);
+typedef void (*EnKakasiFunc)(struct EnKakasi*, struct PlayState*);
typedef struct EnKakasi {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c
index b624b5f890..7651842925 100644
--- a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c
+++ b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c
@@ -5,10 +5,25 @@
*/
#include "z_en_kakasi2.h"
+
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64debug_display.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ka/object_ka.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25 | ACTOR_FLAG_LOCK_ON_DISABLED)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED | \
+ ACTOR_FLAG_UPDATE_DURING_OCARINA | ACTOR_FLAG_LOCK_ON_DISABLED)
static ColliderCylinderInit sCylinderInit = {
{
@@ -89,7 +104,7 @@ void EnKakasi2_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->height = 60.0f;
Actor_SetScale(&this->actor, 0.01f);
- this->actor.flags |= ACTOR_FLAG_10;
+ this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
this->unk_198 = this->actor.shape.rot.y;
if (this->switchFlag >= 0 && Flags_GetSwitch(play, this->switchFlag)) {
@@ -116,7 +131,7 @@ void func_80A90264(EnKakasi2* this, PlayState* play) {
this->unk_194++;
- if (OOT_DEBUG && (BREG(1) != 0) && (this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
+ if (DEBUG_FEATURES && (BREG(1) != 0) && (this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < this->maxSpawnDistance.y)) {
this->actor.draw = func_80A90948;
@@ -214,7 +229,7 @@ void EnKakasi2_Update(Actor* thisx, PlayState* play2) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
}
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
if (BREG(5) != 0) {
PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ this->actor.player_distance ☆☆☆☆☆ %f\n" VT_RST, this->actor.xzDistToPlayer);
PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ this->hosei.x ☆☆☆☆☆ %f\n" VT_RST, this->maxSpawnDistance.x);
diff --git a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.h b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.h
index 9309c16725..c3398d7e7f 100644
--- a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.h
+++ b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.h
@@ -2,11 +2,11 @@
#define Z_EN_KAKASI2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnKakasi2;
-typedef void (*EnKakasi2ActionFunc)(struct EnKakasi2*, PlayState*);
+typedef void (*EnKakasi2ActionFunc)(struct EnKakasi2*, struct PlayState*);
typedef struct EnKakasi2 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c
index 1cc893ad5e..8f4d21e36d 100644
--- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c
+++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c
@@ -5,10 +5,25 @@
*/
#include "z_en_kakasi3.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "sfx.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ka/object_ka.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_25)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnKakasi3_Init(Actor* thisx, PlayState* play);
void EnKakasi3_Destroy(Actor* thisx, PlayState* play);
@@ -76,7 +91,7 @@ void EnKakasi3_Init(Actor* thisx, PlayState* play) {
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
SkelAnime_InitFlex(play, &this->skelAnime, &object_ka_Skel_0065B0, &object_ka_Anim_000214, NULL, NULL, 0);
- this->actor.flags |= ACTOR_FLAG_10;
+ this->actor.flags |= ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER;
this->rot = this->actor.world.rot;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
Actor_SetScale(&this->actor, 0.01f);
diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.h b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.h
index f402ab5ded..e09b98a9fb 100644
--- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.h
+++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.h
@@ -2,11 +2,11 @@
#define Z_EN_KAKASI3_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnKakasi3;
-typedef void (*EnKakasi3ActionFunc)(struct EnKakasi3*, PlayState*);
+typedef void (*EnKakasi3ActionFunc)(struct EnKakasi3*, struct PlayState*);
typedef struct EnKakasi3 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c
index c2631f471b..844a7ee2a8 100644
--- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c
+++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c
@@ -5,12 +5,30 @@
*/
#include "z_en_kanban.h"
-#include "global.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_kanban/object_kanban.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
#define PART_UPPER_LEFT (1 << 0)
#define PART_LEFT_UPPER (1 << 1)
@@ -406,7 +424,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
}
piece->airTimer = 100;
piece->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- piece->actor.flags |= ACTOR_FLAG_25;
+ piece->actor.flags |= ACTOR_FLAG_UPDATE_DURING_OCARINA;
this->cutMarkTimer = 5;
Actor_PlaySfx(&this->actor, NA_SE_IT_SWORD_STRIKE);
}
@@ -463,7 +481,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
this->actor.bgCheckFlags = tempBgFlags;
this->actor.depthInWater = tempDepthInWater;
- PRINTF(VT_RST);
+ PRINTF_RST();
if (1) {
u8 onGround = (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND);
@@ -727,9 +745,9 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
bomb = bomb->next;
}
}
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("OCARINA_MODE %d\n", play->msgCtx.ocarinaMode);
- PRINTF(VT_RST);
+ PRINTF_RST();
switch (this->ocarinaFlag) {
case 0:
if (play->msgCtx.ocarinaMode == OCARINA_MODE_01) {
diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban_gfx.inc.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban_gfx.inc.c
index c38e9df942..3dca1d6259 100644
--- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban_gfx.inc.c
+++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban_gfx.inc.c
@@ -1,4 +1,4 @@
-#include "z_en_kanban.h"
+#include "ultra64.h"
static u16 sShadowTexFlags[] = {
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x100,
diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
index f17108e82e..be3b0eacb5 100644
--- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
+++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
@@ -5,9 +5,21 @@
*/
#include "z_en_karebaba.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_dekubaba/object_dekubaba.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -178,7 +190,7 @@ void EnKarebaba_SetupDying(EnKarebaba* this) {
this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000;
this->actor.speed = 3.0f;
Actor_PlaySfx(&this->actor, NA_SE_EN_DEKU_JR_DEAD);
- this->actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
this->actionFunc = EnKarebaba_Dying;
}
@@ -191,7 +203,7 @@ void EnKarebaba_SetupDeadItemDrop(EnKarebaba* this, PlayState* play) {
this->actor.shape.shadowScale = 3.0f;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_MISC);
this->actor.params = 200;
- this->actor.flags &= ~ACTOR_FLAG_5;
+ this->actor.flags &= ~ACTOR_FLAG_DRAW_CULLING_DISABLED;
this->actionFunc = EnKarebaba_DeadItemDrop;
}
@@ -399,7 +411,7 @@ void EnKarebaba_Regrow(EnKarebaba* this, PlayState* play) {
this->actor.world.pos.y = this->actor.home.pos.y + (14.0f * scaleFactor);
if (this->actor.params == 20) {
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);
EnKarebaba_SetupIdle(this);
diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.h b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.h
index 0687ade588..97b04f1a7f 100644
--- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.h
+++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.h
@@ -2,11 +2,11 @@
#define Z_EN_KAREBABA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnKarebaba;
-typedef void (*EnKarebabaActionFunc)(struct EnKarebaba*, PlayState*);
+typedef void (*EnKarebabaActionFunc)(struct EnKarebaba*, struct PlayState*);
typedef struct EnKarebaba {
/* 0x0000 */ Actor actor;
@@ -14,7 +14,7 @@ typedef struct EnKarebaba {
/* 0x0190 */ EnKarebabaActionFunc actionFunc;
/* 0x0194 */ Vec3s jointTable[8];
/* 0x01C4 */ Vec3s morphTable[8];
- /* 0x01F4 */ CollisionPoly* boundFloor;
+ /* 0x01F4 */ struct CollisionPoly* boundFloor;
/* 0x01F8 */ ColliderCylinder headCollider;
/* 0x0244 */ ColliderCylinder bodyCollider;
} EnKarebaba; // size = 0x0290
diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/src/overlays/actors/ovl_En_Ko/z_en_ko.c
index d66689e0d7..2ba0af36ef 100644
--- a/src/overlays/actors/ovl_En_Ko/z_en_ko.c
+++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.c
@@ -5,13 +5,27 @@
*/
#include "z_en_ko.h"
+
+#include "attributes.h"
+#include "gfx.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_fa/object_fa.h"
#include "assets/objects/object_os_anime/object_os_anime.h"
#include "assets/objects/object_km1/object_km1.h"
#include "assets/objects/object_kw1/object_kw1.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
#define ENKO_TYPE PARAMS_GET_S(this->actor.params, 0, 8)
#define ENKO_PATH PARAMS_GET_S(this->actor.params, 8, 8)
@@ -585,7 +599,11 @@ s16 EnKo_UpdateTalkState(PlayState* play, Actor* thisx) {
Message_ContinueTextbox(play, this->actor.textId);
break;
case 0x10B7:
+#if OOT_VERSION < NTSC_1_1
+ SET_INFTABLE(INFTABLE_B6);
+#else
SET_INFTABLE(INFTABLE_BC);
+#endif
FALLTHROUGH;
case 0x10B8:
this->actor.textId = (play->msgCtx.choiceIndex == 0) ? 0x10BA : 0x10B9;
@@ -704,7 +722,7 @@ s32 func_80A97D68(EnKo* this, PlayState* play) {
s32 func_80A97E18(EnKo* this, PlayState* play) {
s16 trackingMode;
- func_80034F54(play, this->unk_2E4, this->unk_304, 16);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 16);
if (EnKo_IsWithinTalkAngle(this) == true) {
trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
} else {
@@ -723,7 +741,7 @@ s32 func_80A97EB0(EnKo* this, PlayState* play) {
s16 trackingMode;
s32 result;
- func_80034F54(play, this->unk_2E4, this->unk_304, 16);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 16);
result = EnKo_IsWithinTalkAngle(this);
trackingMode = (result == true) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, trackingMode);
@@ -731,7 +749,7 @@ s32 func_80A97EB0(EnKo* this, PlayState* play) {
}
s32 func_80A97F20(EnKo* this, PlayState* play) {
- func_80034F54(play, this->unk_2E4, this->unk_304, 16);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 16);
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY);
return 1;
}
@@ -743,7 +761,7 @@ s32 func_80A97F70(EnKo* this, PlayState* play) {
if ((this->skelAnime.animation == &gKokiriBlockingAnim) == false) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_BLOCKING_STATIC);
}
- func_80034F54(play, this->unk_2E4, this->unk_304, 16);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 16);
trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
} else {
if ((this->skelAnime.animation == &gKokiriCuttingGrassAnim) == false) {
@@ -763,7 +781,7 @@ s32 func_80A98034(EnKo* this, PlayState* play) {
if ((this->skelAnime.animation == &gKokiriBlockingAnim) == false) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_BLOCKING_STATIC);
}
- func_80034F54(play, this->unk_2E4, this->unk_304, 16);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 16);
result = EnKo_IsWithinTalkAngle(this);
trackingMode = (result == true) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
} else {
@@ -779,7 +797,7 @@ s32 func_80A98034(EnKo* this, PlayState* play) {
// Same as func_80A97F20
s32 func_80A98124(EnKo* this, PlayState* play) {
- func_80034F54(play, this->unk_2E4, this->unk_304, 16);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 16);
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY);
return 1;
}
@@ -793,7 +811,7 @@ s32 func_80A98174(EnKo* this, PlayState* play) {
this->skelAnime.playSpeed = 1.0f;
}
if (this->skelAnime.playSpeed == 0.0f) {
- func_80034F54(play, this->unk_2E4, this->unk_304, 16);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 16);
}
Npc_TrackPoint(&this->actor, &this->interactInfo, 2,
(this->skelAnime.playSpeed == 0.0f) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE);
@@ -829,6 +847,8 @@ s32 EnKo_ChildStart(EnKo* this, PlayState* play) {
case ENKO_TYPE_CHILD_FADO:
return func_80A97E18(this, play);
}
+ // Note this function assumes the kokiri type is valid
+ UNREACHABLE();
}
s32 EnKo_ChildStone(EnKo* this, PlayState* play) {
@@ -860,6 +880,8 @@ s32 EnKo_ChildStone(EnKo* this, PlayState* play) {
case ENKO_TYPE_CHILD_FADO:
return func_80A97E18(this, play);
}
+ // Note this function assumes the kokiri type is valid
+ UNREACHABLE();
}
s32 EnKo_ChildSaria(EnKo* this, PlayState* play) {
@@ -891,6 +913,8 @@ s32 EnKo_ChildSaria(EnKo* this, PlayState* play) {
case ENKO_TYPE_CHILD_FADO:
return func_80A97E18(this, play);
}
+ // Note this function assumes the kokiri type is valid
+ UNREACHABLE();
}
s32 EnKo_AdultEnemy(EnKo* this, PlayState* play) {
@@ -922,6 +946,8 @@ s32 EnKo_AdultEnemy(EnKo* this, PlayState* play) {
case ENKO_TYPE_CHILD_FADO:
return func_80A97E18(this, play);
}
+ // Note this function assumes the kokiri type is valid
+ UNREACHABLE();
}
s32 EnKo_AdultSaved(EnKo* this, PlayState* play) {
@@ -953,7 +979,10 @@ s32 EnKo_AdultSaved(EnKo* this, PlayState* play) {
case ENKO_TYPE_CHILD_FADO:
return func_80A97E18(this, play);
}
+ // Note this function assumes the kokiri type is valid
+ UNREACHABLE();
}
+
void func_80A9877C(EnKo* this, PlayState* play) {
Player* player = GET_PLAYER(play);
@@ -975,8 +1004,12 @@ void func_80A9877C(EnKo* this, PlayState* play) {
ENKO_TYPE == ENKO_TYPE_CHILD_FADO && play->sceneId == SCENE_LOST_WOODS) {
this->actor.textId = INV_CONTENT(ITEM_TRADE_ADULT) > ITEM_ODD_POTION ? 0x10B9 : 0x10DF;
- if (func_8002F368(play) == EXCH_ITEM_ODD_POTION) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_ODD_POTION) {
+#if OOT_VERSION < NTSC_1_1
+ this->actor.textId = GET_INFTABLE(INFTABLE_B6) ? 0x10B8 : 0x10B7;
+#else
this->actor.textId = GET_INFTABLE(INFTABLE_BC) ? 0x10B8 : 0x10B7;
+#endif
this->unk_210 = 0;
}
player->actor.textId = this->actor.textId;
@@ -1127,6 +1160,8 @@ s32 func_80A98ECC(EnKo* this, PlayState* play) {
case ENKO_FQS_ADULT_SAVED:
return EnKo_AdultSaved(this, play);
}
+ // Note this function assumes the kokiri type is valid
+ UNREACHABLE();
}
void EnKo_Init(Actor* thisx, PlayState* play) {
@@ -1149,13 +1184,13 @@ void EnKo_Destroy(Actor* thisx, PlayState* play) {
void func_80A99048(EnKo* this, PlayState* play) {
if (EnKo_IsOsAnimeLoaded(this, play) && EnKo_AreObjectsLoaded(this, play)) {
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.objectSlot = this->legsObjectSlot;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime, sSkeleton[sModelInfo[ENKO_TYPE].legsId].flexSkeletonHeader, NULL,
this->jointTable, this->morphTable, 16);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
@@ -1270,7 +1305,7 @@ void EnKo_Update(Actor* thisx, PlayState* play) {
if (this->actionFunc != func_80A99048) {
if ((s32)this->modelAlpha != 0) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
SkelAnime_Update(&this->skelAnime);
func_80A98DB4(this, play);
EnKo_Blink(this);
@@ -1303,7 +1338,7 @@ s32 EnKo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
if (limbIndex == 15) {
gSPSegment((*gfx)++, 0x06, play->objectCtx.slots[this->headObjectSlot].segment);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->headObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->headObjectSlot].segment);
headId = sModelInfo[ENKO_TYPE].headId;
*dList = sHead[headId].dList;
@@ -1311,7 +1346,7 @@ s32 EnKo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
eyeTexture = sHead[headId].eyeTextures[this->eyeTextureIndex];
gSPSegment((*gfx)++, 0x0A, SEGMENTED_TO_VIRTUAL(eyeTexture));
}
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->legsObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->legsObjectSlot].segment);
}
if (limbIndex == 8) {
limbRot = this->interactInfo.torsoRot;
@@ -1326,8 +1361,8 @@ s32 EnKo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
Matrix_Translate(-1200.0f, 0.0f, 0.0f, MTXMODE_APPLY);
}
if (limbIndex == 8 || limbIndex == 9 || limbIndex == 12) {
- rot->y += Math_SinS(this->unk_2E4[limbIndex]) * 200.0f;
- rot->z += Math_CosS(this->unk_304[limbIndex]) * 200.0f;
+ rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * FIDGET_AMPLITUDE;
}
return false;
}
@@ -1339,7 +1374,7 @@ void EnKo_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* rot,
if (limbIndex == 7) {
gSPSegment((*gfx)++, 0x06, play->objectCtx.slots[this->bodyObjectSlot].segment);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->bodyObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->bodyObjectSlot].segment);
}
if (limbIndex == 15) {
Matrix_MultVec3f(&D_80A9A774, &this->actor.focus.pos);
diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.h b/src/overlays/actors/ovl_En_Ko/z_en_ko.h
index 08aff76f1d..d9531e57e6 100644
--- a/src/overlays/actors/ovl_En_Ko/z_en_ko.h
+++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.h
@@ -2,11 +2,11 @@
#define Z_EN_KO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnKo;
-typedef void (*EnKoActionFunc)(struct EnKo*, PlayState*);
+typedef void (*EnKoActionFunc)(struct EnKo*, struct PlayState*);
typedef struct EnKo {
/* 0x0000 */ Actor actor;
@@ -17,7 +17,7 @@ typedef struct EnKo {
/* 0x0196 */ s8 legsObjectSlot;
/* 0x0197 */ s8 osAnimeObjectSlot;
/* 0x0198 */ ColliderCylinder collider;
- /* 0x01E4 */ Path* path;
+ /* 0x01E4 */ struct Path* path;
/* 0x01E8 */ NpcInteractInfo interactInfo;
/* 0x0210 */ u8 unk_210; // block trade quest sfx
/* 0x0212 */ s16 forestQuestState;
@@ -28,8 +28,8 @@ typedef struct EnKo {
/* 0x0220 */ f32 modelAlpha;
/* 0x0224 */ Vec3s jointTable[16];
/* 0x0284 */ Vec3s morphTable[16];
- /* 0x02E4 */ s16 unk_2E4[16];
- /* 0x0304 */ s16 unk_304[16];
+ /* 0x02E4 */ s16 fidgetTableY[16];
+ /* 0x0304 */ s16 fidgetTableZ[16];
} EnKo; // size = 0x0324
typedef enum KokiriChildren {
diff --git a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
index eacb01ca3e..aa955365dd 100644
--- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
+++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
@@ -7,12 +7,24 @@
#include "z_en_kusa.h"
#include "overlays/actors/ovl_En_Insect/z_en_insect.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
#include "assets/objects/object_kusa/object_kusa.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_23)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_THROW_ONLY)
void EnKusa_Init(Actor* thisx, PlayState* play);
void EnKusa_Destroy(Actor* thisx, PlayState* play2);
@@ -88,8 +100,8 @@ static s16 sFragmentScales[] = { 108, 102, 96, 84, 66, 55, 42, 38 };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 400, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(gravity, -3200, ICHAIN_CONTINUE),
- ICHAIN_F32_DIV1000(minVelocityY, -17000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneDownward, 120, ICHAIN_STOP),
+ ICHAIN_F32_DIV1000(minVelocityY, -17000, ICHAIN_CONTINUE), ICHAIN_F32(cullingVolumeDistance, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 100, ICHAIN_CONTINUE), ICHAIN_F32(cullingVolumeDownward, 120, ICHAIN_STOP),
};
void EnKusa_SetupAction(EnKusa* this, EnKusaActionFunc actionFunc) {
@@ -115,10 +127,10 @@ s32 EnKusa_SnapToFloor(EnKusa* this, PlayState* play, f32 yOffset) {
Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos);
return true;
} else {
- PRINTF(VT_COL(YELLOW, BLACK));
+ PRINTF_COLOR_WARNING();
// "Failure attaching to ground"
PRINTF("地面に付着失敗(%s %d)\n", "../z_en_kusa.c", 323);
- PRINTF(VT_RST);
+ PRINTF_RST();
return false;
}
}
@@ -234,7 +246,7 @@ void EnKusa_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
if (play->csCtx.state != CS_STATE_IDLE) {
- this->actor.uncullZoneForward += 1000.0f;
+ this->actor.cullingVolumeDistance += 1000.0f;
}
EnKusa_InitCollider(thisx, play);
@@ -278,7 +290,7 @@ void EnKusa_SetupWaitForObject(EnKusa* this) {
void EnKusa_WaitForObject(EnKusa* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot)) {
- if (this->actor.flags & ACTOR_FLAG_ENKUSA_CUT) {
+ if (this->actor.flags & ACTOR_FLAG_GRASS_DESTROYED) {
EnKusa_SetupCut(this);
} else {
EnKusa_SetupMain(this);
@@ -286,13 +298,13 @@ void EnKusa_WaitForObject(EnKusa* this, PlayState* play) {
this->actor.draw = EnKusa_Draw;
this->actor.objectSlot = this->requiredObjectSlot;
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
}
void EnKusa_SetupMain(EnKusa* this) {
EnKusa_SetupAction(this, EnKusa_Main);
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
void EnKusa_Main(EnKusa* this, PlayState* play) {
@@ -317,7 +329,7 @@ void EnKusa_Main(EnKusa* this, PlayState* play) {
}
EnKusa_SetupCut(this);
- this->actor.flags |= ACTOR_FLAG_ENKUSA_CUT;
+ this->actor.flags |= ACTOR_FLAG_GRASS_DESTROYED;
} else {
if (!(this->collider.base.ocFlags1 & OC1_TYPE_PLAYER) && (this->actor.xzDistToPlayer > 12.0f)) {
this->collider.base.ocFlags1 |= OC1_TYPE_PLAYER;
@@ -340,7 +352,7 @@ void EnKusa_Main(EnKusa* this, PlayState* play) {
void EnKusa_SetupLiftedUp(EnKusa* this) {
EnKusa_SetupAction(this, EnKusa_LiftedUp);
this->actor.room = -1;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
void EnKusa_LiftedUp(EnKusa* this, PlayState* play) {
@@ -466,7 +478,7 @@ void EnKusa_SetupRegrow(EnKusa* this) {
EnKusa_SetupAction(this, EnKusa_Regrow);
EnKusa_SetScaleSmall(this);
this->actor.shape.rot = this->actor.home.rot;
- this->actor.flags &= ~ACTOR_FLAG_ENKUSA_CUT;
+ this->actor.flags &= ~ACTOR_FLAG_GRASS_DESTROYED;
}
void EnKusa_Regrow(EnKusa* this, PlayState* play) {
@@ -490,7 +502,7 @@ void EnKusa_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
- if (this->actor.flags & ACTOR_FLAG_ENKUSA_CUT) {
+ if (this->actor.flags & ACTOR_FLAG_GRASS_DESTROYED) {
this->actor.shape.yOffset = -6.25f;
} else {
this->actor.shape.yOffset = 0.0f;
@@ -501,7 +513,7 @@ void EnKusa_Draw(Actor* thisx, PlayState* play) {
static Gfx* dLists[] = { gFieldBushDL, object_kusa_DL_000140, object_kusa_DL_000140 };
EnKusa* this = (EnKusa*)thisx;
- if (this->actor.flags & ACTOR_FLAG_ENKUSA_CUT) {
+ if (this->actor.flags & ACTOR_FLAG_GRASS_DESTROYED) {
Gfx_DrawDListOpa(play, object_kusa_DL_0002E0);
} else {
Gfx_DrawDListOpa(play, dLists[PARAMS_GET_U(thisx->params, 0, 2)]);
diff --git a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.h b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.h
index 4a895fe15a..a375581cf9 100644
--- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.h
+++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.h
@@ -2,11 +2,11 @@
#define Z_EN_KUSA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnKusa;
-typedef void (*EnKusaActionFunc)(struct EnKusa*, PlayState*);
+typedef void (*EnKusaActionFunc)(struct EnKusa*, struct PlayState*);
typedef enum EnKusaType {
/* 0 */ ENKUSA_TYPE_0,
diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c
index bae3ee5818..7caa735739 100644
--- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c
+++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c
@@ -5,6 +5,21 @@
*/
#include "z_en_kz.h"
+
+#include "libc64/math64.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_kz/object_kz.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -73,7 +88,7 @@ u16 EnKz_GetTextIdChild(PlayState* play, EnKz* this) {
if (CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) {
return 0x402B;
- } else if (GET_EVENTCHKINF(EVENTCHKINF_33)) {
+ } else if (GET_EVENTCHKINF(EVENTCHKINF_GAVE_LETTER_TO_KING_ZORA)) {
return 0x401C;
} else {
player->exchangeItemId = EXCH_ITEM_BOTTLE_RUTOS_LETTER;
@@ -120,6 +135,27 @@ s16 EnKz_UpdateTalkState(PlayState* play, Actor* thisx) {
s16 talkState = NPC_TALK_STATE_TALKING;
switch (Message_GetState(&play->msgCtx)) {
+ case TEXT_STATE_NONE:
+ case TEXT_STATE_DONE_HAS_NEXT:
+ break;
+#if OOT_VERSION < PAL_1_0
+ case TEXT_STATE_CLOSING:
+ talkState = NPC_TALK_STATE_IDLE;
+ switch (this->actor.textId) {
+ case 0x4012:
+ SET_INFTABLE(INFTABLE_139);
+ FALLTHROUGH;
+ case 0x401B:
+ talkState = NPC_TALK_STATE_ACTION;
+ break;
+ case 0x401F:
+ SET_INFTABLE(INFTABLE_139);
+ break;
+ }
+ break;
+#else
+ case TEXT_STATE_CLOSING:
+ break;
case TEXT_STATE_DONE:
talkState = NPC_TALK_STATE_IDLE;
switch (this->actor.textId) {
@@ -135,6 +171,7 @@ s16 EnKz_UpdateTalkState(PlayState* play, Actor* thisx) {
break;
}
break;
+#endif
case TEXT_STATE_DONE_FADING:
if (this->actor.textId != 0x4014) {
if (this->actor.textId == 0x401B && !this->sfxPlayed) {
@@ -154,7 +191,9 @@ s16 EnKz_UpdateTalkState(PlayState* play, Actor* thisx) {
}
if (this->actor.textId == 0x4014) {
if (play->msgCtx.choiceIndex == 0) {
+#if OOT_VERSION >= PAL_1_0
EnKz_SetupGetItem(this, play);
+#endif
talkState = NPC_TALK_STATE_ACTION;
} else {
this->actor.textId = 0x4016;
@@ -167,9 +206,13 @@ s16 EnKz_UpdateTalkState(PlayState* play, Actor* thisx) {
talkState = NPC_TALK_STATE_ACTION;
}
break;
- case TEXT_STATE_NONE:
- case TEXT_STATE_DONE_HAS_NEXT:
- case TEXT_STATE_CLOSING:
+#if OOT_VERSION < PAL_1_0
+ case TEXT_STATE_DONE:
+ if (Message_ShouldAdvance(play)) {
+ talkState = NPC_TALK_STATE_ITEM_GIVEN;
+ }
+ break;
+#endif
case TEXT_STATE_SONG_DEMO_DONE:
case TEXT_STATE_8:
case TEXT_STATE_9:
@@ -206,6 +249,7 @@ s32 EnKz_UpdateTalking(PlayState* play, Actor* thisx, s16* talkState, f32 intera
return true;
}
+#if OOT_VERSION >= PAL_1_0
if (*talkState != NPC_TALK_STATE_IDLE) {
*talkState = updateTalkState(play, thisx);
return false;
@@ -219,12 +263,20 @@ s32 EnKz_UpdateTalking(PlayState* play, Actor* thisx, s16* talkState, f32 intera
}
thisx->flags |= ACTOR_FLAG_ATTENTION_ENABLED;
+#endif
Actor_GetScreenPos(play, thisx, &x, &y);
if (!((x >= -30) && (x < 361) && (y >= -10) && (y < 241))) {
return false;
}
+#if OOT_VERSION < PAL_1_0
+ if (*talkState != NPC_TALK_STATE_IDLE) {
+ *talkState = updateTalkState(play, thisx);
+ return false;
+ }
+#endif
+
xzDistToPlayer = thisx->xzDistToPlayer;
thisx->xzDistToPlayer = Math_Vec3f_DistXZ(&thisx->home.pos, &player->actor.world.pos);
if (Actor_OfferTalk(thisx, play, interactRange) == 0) {
@@ -239,11 +291,22 @@ s32 EnKz_UpdateTalking(PlayState* play, Actor* thisx, s16* talkState, f32 intera
void func_80A9CB18(EnKz* this, PlayState* play) {
Player* player = GET_PLAYER(play);
+ f32 yaw;
+
+#if OOT_VERSION < PAL_1_0
+ yaw = Math_Vec3f_Yaw(&this->actor.home.pos, &player->actor.world.pos);
+ yaw -= this->actor.shape.rot.y;
+ if (fabsf(yaw) > 1820.0f) {
+ this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
+ return;
+ }
+ this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
+#endif
if (EnKz_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, 340.0f, EnKz_GetTextId,
EnKz_UpdateTalkState)) {
- if ((this->actor.textId == 0x401A) && !GET_EVENTCHKINF(EVENTCHKINF_33)) {
- if (func_8002F368(play) == EXCH_ITEM_BOTTLE_RUTOS_LETTER) {
+ if ((this->actor.textId == 0x401A) && !GET_EVENTCHKINF(EVENTCHKINF_GAVE_LETTER_TO_KING_ZORA)) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_BOTTLE_RUTOS_LETTER) {
this->actor.textId = 0x401B;
this->sfxPlayed = false;
} else {
@@ -255,15 +318,19 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
if (LINK_IS_ADULT) {
if ((INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_PRESCRIPTION) &&
- (func_8002F368(play) == EXCH_ITEM_PRESCRIPTION)) {
+ (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_PRESCRIPTION)) {
this->actor.textId = 0x4014;
this->sfxPlayed = false;
player->actor.textId = this->actor.textId;
+#if OOT_VERSION >= PAL_1_0
this->isTrading = true;
+#endif
return;
}
+#if OOT_VERSION >= PAL_1_0
this->isTrading = false;
+#endif
if (GET_INFTABLE(INFTABLE_139)) {
this->actor.textId = CHECK_QUEST_ITEM(QUEST_SONG_SERENADE) ? 0x4045 : 0x401A;
player->actor.textId = this->actor.textId;
@@ -336,7 +403,7 @@ void EnKz_Init(Actor* thisx, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
Animation_ChangeByInfo(&this->skelanime, sAnimationInfo, ENKZ_ANIM_0);
- if (GET_EVENTCHKINF(EVENTCHKINF_33)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_GAVE_LETTER_TO_KING_ZORA)) {
EnKz_SetMovedPos(this, play);
}
@@ -363,7 +430,7 @@ void EnKz_PreMweepWait(EnKz* this, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
this->actionFunc = EnKz_SetupMweep;
} else {
- func_80034F54(play, this->unk_2A6, this->unk_2BE, 12);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 12);
}
}
@@ -402,7 +469,7 @@ void EnKz_Mweep(EnKz* this, PlayState* play) {
Animation_ChangeByInfo(&this->skelanime, sAnimationInfo, ENKZ_ANIM_1);
Inventory_ReplaceItem(play, ITEM_BOTTLE_RUTOS_LETTER, ITEM_BOTTLE_EMPTY);
EnKz_SetMovedPos(this, play);
- SET_EVENTCHKINF(EVENTCHKINF_33);
+ SET_EVENTCHKINF(EVENTCHKINF_GAVE_LETTER_TO_KING_ZORA);
this->actor.speed = 0.0;
this->actionFunc = EnKz_StopMweep;
}
@@ -420,10 +487,13 @@ void EnKz_StopMweep(EnKz* this, PlayState* play) {
void EnKz_Wait(EnKz* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
+#if OOT_VERSION < PAL_1_0
+ this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
+#endif
this->actionFunc = EnKz_SetupGetItem;
EnKz_SetupGetItem(this, play);
} else {
- func_80034F54(play, this->unk_2A6, this->unk_2BE, 12);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 12);
}
}
@@ -437,7 +507,11 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
this->actionFunc = EnKz_StartTimer;
} else {
+#if OOT_VERSION < PAL_1_0
+ getItemId = Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_PRESCRIPTION ? GI_EYEBALL_FROG : GI_TUNIC_ZORA;
+#else
getItemId = this->isTrading == true ? GI_EYEBALL_FROG : GI_TUNIC_ZORA;
+#endif
yRange = fabsf(this->actor.yDistToPlayer) + 1.0f;
xzRange = this->actor.xzDistToPlayer + 1.0f;
Actor_OfferGetItem(&this->actor, play, getItemId, xzRange, yRange);
@@ -445,7 +519,12 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
}
void EnKz_StartTimer(EnKz* this, PlayState* play) {
- if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
+#if OOT_VERSION < PAL_1_0
+ if (this->interactInfo.talkState == NPC_TALK_STATE_ITEM_GIVEN)
+#else
+ if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play))
+#endif
+ {
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEBALL_FROG) {
Interface_SetSubTimer(180);
CLEAR_EVENTINF(EVENTINF_MARATHON_ACTIVE);
@@ -467,9 +546,13 @@ void EnKz_Update(Actor* thisx, PlayState* play) {
SkelAnime_Update(&this->skelanime);
EnKz_UpdateEyes(this);
Actor_MoveXZGravity(&this->actor);
+#if OOT_VERSION < PAL_1_0
+ func_80A9CB18(this, play);
+#else
if (this->actionFunc != EnKz_StartTimer) {
func_80A9CB18(this, play);
}
+#endif
this->actionFunc(this, play);
}
@@ -477,8 +560,8 @@ s32 EnKz_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
EnKz* this = (EnKz*)thisx;
if (limbIndex == 8 || limbIndex == 9 || limbIndex == 10) {
- rot->y += Math_SinS(this->unk_2A6[limbIndex]) * 200.0f;
- rot->z += Math_CosS(this->unk_2BE[limbIndex]) * 200.0f;
+ rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * FIDGET_AMPLITUDE;
}
if (limbIndex) {}
return false;
diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.h b/src/overlays/actors/ovl_En_Kz/z_en_kz.h
index 588dea1778..933fbe2617 100644
--- a/src/overlays/actors/ovl_En_Kz/z_en_kz.h
+++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.h
@@ -2,11 +2,11 @@
#define Z_EN_KZ_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnKz;
-typedef void (*EnKzActionFunc)(struct EnKz*, PlayState*);
+typedef void (*EnKzActionFunc)(struct EnKz*, struct PlayState*);
typedef struct EnKz {
/* 0x0000 */ Actor actor;
@@ -24,8 +24,8 @@ typedef struct EnKz {
/* 0x0214 */ s16 returnToCamId;
/* 0x0216 */ Vec3s jointTable[12];
/* 0x025E */ Vec3s morphTable[12];
- /* 0x02A6 */ s16 unk_2A6[12];
- /* 0x02BE */ s16 unk_2BE[12];
+ /* 0x02A6 */ s16 fidgetTableY[12];
+ /* 0x02BE */ s16 fidgetTableZ[12];
} EnKz; // size = 0x02D8
#endif
diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c
index 33d671a95f..f0cc5dddc6 100644
--- a/src/overlays/actors/ovl_En_Light/z_en_light.c
+++ b/src/overlays/actors/ovl_En_Light/z_en_light.c
@@ -5,6 +5,17 @@
*/
#include "z_en_light.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.h b/src/overlays/actors/ovl_En_Light/z_en_light.h
index 1cbf786b00..035471f47d 100644
--- a/src/overlays/actors/ovl_En_Light/z_en_light.h
+++ b/src/overlays/actors/ovl_En_Light/z_en_light.h
@@ -2,7 +2,8 @@
#define Z_EN_LIGHT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnLight;
diff --git a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c
index ab27f30954..b4bd3af91b 100644
--- a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c
+++ b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c
@@ -5,9 +5,15 @@
*/
#include "z_en_lightbox.h"
+
+#include "regs.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_lightbox/object_lightbox.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnLightbox_Init(Actor* thisx, PlayState* play);
void EnLightbox_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.h b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.h
index e24afd44e1..c09c77f850 100644
--- a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.h
+++ b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.h
@@ -2,7 +2,7 @@
#define Z_EN_LIGHTBOX_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnLightbox;
diff --git a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c
index 9acedc1552..2097bb9d26 100644
--- a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c
+++ b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c
@@ -6,6 +6,9 @@
#include "z_en_m_fire1.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#define FLAGS 0
void EnMFire1_Init(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.h b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.h
index 10d3e3fef7..59ebb44318 100644
--- a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.h
+++ b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.h
@@ -2,7 +2,7 @@
#define Z_EN_M_FIRE1_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMFire1;
diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c
index eb7745aa86..ba34f9adcc 100644
--- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c
+++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c
@@ -1,4 +1,17 @@
#include "z_en_m_thunder.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define FLAGS 0
diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h
index 4cb7ad215c..8c7cdd7a1f 100644
--- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h
+++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h
@@ -2,11 +2,12 @@
#define Z_EN_M_THUNDER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnMThunder;
-typedef void (*EnMThunderActionFunc)(struct EnMThunder*, PlayState*);
+typedef void (*EnMThunderActionFunc)(struct EnMThunder*, struct PlayState*);
typedef struct EnMThunder {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c
index 24644bb5ef..9c1689a524 100644
--- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c
+++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c
@@ -5,9 +5,25 @@
*/
#include "z_en_ma1.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64face_reaction.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ma1/object_ma1.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnMa1_Init(Actor* thisx, PlayState* play);
void EnMa1_Destroy(Actor* thisx, PlayState* play);
@@ -348,7 +364,7 @@ void EnMa1_IdleTeachSong(EnMa1* this, PlayState* play) {
this->actor.textId = 0x2061;
Message_StartTextbox(play, this->actor.textId, NULL);
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actionFunc = EnMa1_StartTeachSong;
} else if (this->actor.xzDistToPlayer < 30.0f + this->collider.dim.radius) {
player->stateFlags2 |= PLAYER_STATE2_23;
@@ -361,7 +377,7 @@ void EnMa1_StartTeachSong(EnMa1* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_MALON);
Message_StartOcarina(play, OCARINA_ACTION_TEACH_EPONA);
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actionFunc = EnMa1_TeachSong;
}
}
diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h
index ef69c0c8e4..3664fc98a8 100644
--- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h
+++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h
@@ -2,11 +2,11 @@
#define Z_EN_MA1_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMa1;
-typedef void (*EnMa1ActionFunc)(struct EnMa1*, PlayState*);
+typedef void (*EnMa1ActionFunc)(struct EnMa1*, struct PlayState*);
typedef struct EnMa1 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
index 868b523728..aed88bb92c 100644
--- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
+++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
@@ -1,7 +1,24 @@
#include "z_en_ma2.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64face_reaction.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ma2/object_ma2.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnMa2_Init(Actor* thisx, PlayState* play);
void EnMa2_Destroy(Actor* thisx, PlayState* play);
@@ -255,7 +272,7 @@ void EnMa2_Destroy(Actor* thisx, PlayState* play) {
void func_80AA2018(EnMa2* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
}
}
@@ -298,10 +315,10 @@ void func_80AA21C8(EnMa2* this, PlayState* play) {
player->stateFlags2 |= PLAYER_STATE2_23;
} else {
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Message_CloseTextbox(play);
} else {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actionFunc = func_80AA2018;
}
}
diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h
index 390c61da21..81fddf7672 100644
--- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h
+++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h
@@ -2,11 +2,11 @@
#define Z_EN_MA2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMa2;
-typedef void (*EnMa2ActionFunc)(struct EnMa2*, PlayState*);
+typedef void (*EnMa2ActionFunc)(struct EnMa2*, struct PlayState*);
typedef enum AdultMalonLimb {
/* 0x00 */ MALON_ADULT_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
index b5702dc0c5..cdac009221 100644
--- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
+++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
@@ -5,9 +5,25 @@
*/
#include "z_en_ma3.h"
+
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "versions.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ma2/object_ma2.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnMa3_Init(Actor* thisx, PlayState* play);
void EnMa3_Destroy(Actor* thisx, PlayState* play);
@@ -77,7 +93,7 @@ u16 EnMa3_GetTextId(PlayState* play, Actor* thisx) {
if (GET_EVENTINF(EVENTINF_HORSES_0A)) {
gSaveContext.timerSeconds = gSaveContext.timerSeconds;
- thisx->flags |= ACTOR_FLAG_16;
+ thisx->flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
if (((void)0, gSaveContext.timerSeconds) > 210) {
return 0x208E;
@@ -155,7 +171,7 @@ s16 EnMa3_UpdateTalkState(PlayState* play, Actor* thisx) {
FALLTHROUGH;
case 0x208E:
CLEAR_EVENTINF(EVENTINF_HORSES_0A);
- thisx->flags &= ~ACTOR_FLAG_16;
+ thisx->flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
talkState = NPC_TALK_STATE_IDLE;
gSaveContext.timerState = TIMER_STATE_STOP;
break;
@@ -282,11 +298,48 @@ void EnMa3_Destroy(Actor* thisx, PlayState* play) {
void func_80AA3200(EnMa3* this, PlayState* play) {
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
}
}
+#if OOT_PAL_N64
+// Same as Npc_UpdateTalking, but with an additional check for the subtimer state
+s32 EnMa3_UpdateTalking(PlayState* play, Actor* actor, s16* talkState, f32 interactRange, NpcGetTextIdFunc getTextId,
+ NpcUpdateTalkStateFunc updateTalkState) {
+ s16 x;
+ s16 y;
+
+ if (Actor_TalkOfferAccepted(actor, play)) {
+ *talkState = NPC_TALK_STATE_TALKING;
+ return true;
+ }
+
+ if (*talkState != NPC_TALK_STATE_IDLE) {
+ *talkState = updateTalkState(play, actor);
+ return false;
+ }
+
+ Actor_GetScreenPos(play, actor, &x, &y);
+ if ((x < 0) || (x > SCREEN_WIDTH) || (y < 0) || (y > SCREEN_HEIGHT)) {
+ // Actor is offscreen
+ return false;
+ }
+
+ if ((gSaveContext.subTimerState != 0) && (gSaveContext.subTimerSeconds < 6)) {
+ return false;
+ }
+
+ if (!Actor_OfferTalk(actor, play, interactRange)) {
+ return false;
+ }
+
+ actor->textId = getTextId(play, actor);
+
+ return false;
+}
+#endif
+
void EnMa3_Update(Actor* thisx, PlayState* play) {
EnMa3* this = (EnMa3*)thisx;
s32 pad;
@@ -297,8 +350,16 @@ void EnMa3_Update(Actor* thisx, PlayState* play) {
EnMa3_UpdateEyes(this);
this->actionFunc(this, play);
func_80AA2E54(this, play);
+
+#if !OOT_PAL_N64
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 150.0f,
EnMa3_GetTextId, EnMa3_UpdateTalkState);
+#else
+ EnMa3_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 150.0f,
+ EnMa3_GetTextId, EnMa3_UpdateTalkState);
+#endif
+
+#if OOT_VERSION >= PAL_1_0
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
if (this->isNotSinging) {
// Turn on singing
@@ -310,6 +371,7 @@ void EnMa3_Update(Actor* thisx, PlayState* play) {
Audio_ToggleMalonSinging(true);
this->isNotSinging = true;
}
+#endif
}
s32 EnMa3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h
index 2b9dea812d..ecf637561e 100644
--- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h
+++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h
@@ -2,11 +2,11 @@
#define Z_EN_MA3_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMa3;
-typedef void (*EnMa3ActionFunc)(struct EnMa3*, PlayState*);
+typedef void (*EnMa3ActionFunc)(struct EnMa3*, struct PlayState*);
typedef enum AdultMalonLimb {
/* 0x00 */ MALON_ADULT_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c
index 6d992e457f..5c1e68f77d 100644
--- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c
+++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c
@@ -5,14 +5,30 @@
*/
#include "z_en_mag.h"
-#include "versions.h"
-#include "assets/objects/object_mag/object_mag.h"
+
+#include "array_count.h"
+#include "avoid_ub.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "gfxalloc.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "translation.h"
#include "versions.h"
+#include "z64audio.h"
+#include "z64cutscene_flags.h"
+#include "z64play.h"
+#include "z64save.h"
+#include "z64ss_sram.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "assets/objects/object_mag/object_mag.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnMag_Init(Actor* thisx, PlayState* play);
void EnMag_Destroy(Actor* thisx, PlayState* play);
@@ -33,10 +49,13 @@ ActorProfile En_Mag_Profile = {
static s16 sDelayTimer = 0;
-#if OOT_VERSION < GC_US
+#if OOT_VERSION < GC_US || PLATFORM_IQUE
void EnMag_ResetSram(void) {
static u8 buffer[0x2000];
+ PRINTF(T("\n\n\n==========\n SRAM初期化\n\n==========\n\n\n",
+ "\n\n\n==========\n SRAM initialization\n\n==========\n\n\n"));
+
bzero(buffer, 0x800);
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), buffer, 0x800, 1);
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000800), buffer, 0x800, 1);
@@ -55,14 +74,14 @@ void EnMag_ResetSram(void) {
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8007000), buffer, 0x800, 1);
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8007800), buffer, 0x800, 1);
- gSaveContext.audioSetting = 0;
- gSaveContext.zTargetSetting = 0;
- func_800F6700(gSaveContext.audioSetting);
+ gSaveContext.soundSetting = gSaveContext.zTargetSetting = 0; // SOUND_SETTING_STEREO/Z_TARGET_SETTING_SWITCH
+ Audio_SetSoundOutputMode(gSaveContext.soundSetting);
}
#endif
void EnMag_Init(Actor* thisx, PlayState* play) {
EnMag* this = (EnMag*)thisx;
+ Font* font = &this->font;
YREG(1) = 63;
YREG(3) = 80;
@@ -131,7 +150,7 @@ void EnMag_Init(Actor* thisx, PlayState* play) {
gSaveContext.transWipeSpeed = 255;
}
- Font_LoadOrderedFont(&this->font);
+ Font_LoadOrderedFont(font);
this->unk_E316 = 0;
this->unk_E318 = 0;
@@ -142,18 +161,19 @@ void EnMag_Init(Actor* thisx, PlayState* play) {
void EnMag_Destroy(Actor* thisx, PlayState* play) {
}
-#if OOT_VERSION < GC_US
+#if OOT_VERSION < GC_US || PLATFORM_IQUE
void EnMag_CheckSramResetCode(PlayState* play, EnMag* this) {
static s32 sSramResetCode[] = {
BTN_DUP, BTN_DDOWN, BTN_DLEFT, BTN_DRIGHT, BTN_START, BTN_B, BTN_CDOWN,
BTN_L, BTN_CRIGHT, BTN_CLEFT, BTN_A, BTN_CUP, BTN_R, BTN_Z,
};
+ Input* input = &play->state.input[2];
s32 var_v1;
var_v1 =
play->state.input[2].cur.button & (BTN_A | BTN_B | BTN_Z | BTN_START | BTN_DUP | BTN_DDOWN | BTN_DLEFT |
BTN_DRIGHT | BTN_L | BTN_R | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT);
- if (this->unk_E31C == var_v1) {
+ if (var_v1 == this->unk_E31C) {
this->unk_E320--;
if (this->unk_E320 < 0) {
this->unk_E320 = 1;
@@ -166,13 +186,13 @@ void EnMag_CheckSramResetCode(PlayState* play, EnMag* this) {
}
if (this->unk_E316 < 4) {
- if (sSramResetCode[this->unk_E316] & var_v1) {
+ if (var_v1 & sSramResetCode[this->unk_E316]) {
this->unk_E316++;
} else if (var_v1 != 0) {
this->unk_E316 = 0;
}
} else {
- if (CHECK_BTN_ALL(play->state.input[2].press.button, sSramResetCode[this->unk_E316])) {
+ if (CHECK_BTN_ALL(input->press.button, sSramResetCode[this->unk_E316])) {
this->unk_E316++;
} else if (var_v1 != 0) {
this->unk_E316 = 0;
@@ -187,18 +207,18 @@ void EnMag_CheckSramResetCode(PlayState* play, EnMag* this) {
#endif
void EnMag_Update(Actor* thisx, PlayState* play) {
- s32 pad[2];
+ s32 pad;
+ Input* input = &play->state.input[0];
EnMag* this = (EnMag*)thisx;
-#if OOT_VERSION < GC_US
+#if OOT_VERSION < GC_US || PLATFORM_IQUE
EnMag_CheckSramResetCode(play, this);
#endif
if (gSaveContext.fileNum != 0xFEDC) {
if (this->globalState < MAG_STATE_DISPLAY) {
- if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) ||
- CHECK_BTN_ALL(play->state.input[0].press.button, BTN_A) ||
- CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B)) {
+ if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_A) ||
+ CHECK_BTN_ALL(input->press.button, BTN_B)) {
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -232,9 +252,8 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
}
} else if (this->globalState >= MAG_STATE_DISPLAY) {
if (sDelayTimer == 0) {
- if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) ||
- CHECK_BTN_ALL(play->state.input[0].press.button, BTN_A) ||
- CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B)) {
+ if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_A) ||
+ CHECK_BTN_ALL(input->press.button, BTN_B)) {
if (play->transitionTrigger != TRANS_TRIGGER_START) {
Audio_SetCutsceneFlag(0);
@@ -259,7 +278,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
if (this->globalState == MAG_STATE_FADE_IN) {
if (this->effectFadeInState == 0) {
-#if PLATFORM_N64
+#if !PLATFORM_GC
this->effectPrimLodFrac += 0.8f;
this->effectAlpha += 6.375f;
#else
@@ -289,7 +308,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
this->effectFadeInState = 1;
}
} else if (this->effectFadeInState == 1) {
-#if PLATFORM_N64
+#if !PLATFORM_GC
this->effectPrimLodFrac += 2.4f;
#endif
#if !OOT_MQ
@@ -299,7 +318,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
this->effectPrimColor[0] += -2.125f;
this->effectEnvColor[0] += -1.375f;
#endif
-#if !PLATFORM_N64
+#if PLATFORM_GC
this->effectPrimLodFrac += 2.4f;
#endif
@@ -378,8 +397,8 @@ void EnMag_Update(Actor* thisx, PlayState* play) {
}
}
-void EnMag_DrawTextureI8(Gfx** gfxP, void* texture, s16 texWidth, s16 texHeight, s16 rectLeft, s16 rectTop,
- s16 rectWidth, s16 rectHeight, u16 dsdx, u16 dtdy) {
+BAD_RETURN(s32) EnMag_DrawTextureI8(Gfx** gfxP, void* texture, s16 texWidth, s16 texHeight, s16 rectLeft, s16 rectTop,
+ s16 rectWidth, s16 rectHeight, u16 dsdx, u16 dtdy) {
Gfx* gfx = *gfxP;
gDPLoadTextureBlock(gfx++, texture, G_IM_FMT_I, G_IM_SIZ_8b, texWidth, texHeight, 0, G_TX_NOMIRROR | G_TX_WRAP,
@@ -391,9 +410,10 @@ void EnMag_DrawTextureI8(Gfx** gfxP, void* texture, s16 texWidth, s16 texHeight,
*gfxP = gfx;
}
-void EnMag_DrawEffectTextures(Gfx** gfxP, void* maskTex, void* effectTex, s16 maskWidth, s16 maskHeight,
- s16 effectWidth, s16 effectHeight, s16 rectLeft, s16 rectTop, s16 rectWidth,
- s16 rectHeight, u16 dsdx, u16 dtdy, u16 shifts, u16 shiftt, u16 flag, EnMag* this) {
+BAD_RETURN(s32) EnMag_DrawEffectTextures(Gfx** gfxP, void* maskTex, void* effectTex, s16 maskWidth, s16 maskHeight,
+ s16 effectWidth, s16 effectHeight, s16 rectLeft, s16 rectTop, s16 rectWidth,
+ s16 rectHeight, u16 dsdx, u16 dtdy, u16 shifts, u16 shiftt, u16 flag,
+ EnMag* this) {
Gfx* gfx = *gfxP;
gDPLoadMultiBlock_4b(gfx++, maskTex, 0x0000, G_TX_RENDERTILE, G_IM_FMT_I, maskWidth, maskHeight, 0,
@@ -514,13 +534,17 @@ void EnMag_DrawCharTexture(Gfx** gfxP, u8* texture, s32 rectLeft, s32 rectTop) {
*gfxP = gfx;
}
+#if PLATFORM_IQUE
+#include "assets/overlays/ovl_En_Mag/ovl_En_Mag.c"
+#endif
+
// Title logo is shifted to the left in Master Quest
#if !OOT_MQ
#define LOGO_X_SHIFT 0
-#define JPN_SUBTITLE_X_SHIFT 0
+#define TITLE_X_SHIFT 0
#else
#define LOGO_X_SHIFT (-8)
-#define JPN_SUBTITLE_X_SHIFT (-32)
+#define TITLE_X_SHIFT (-32)
#endif
void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
@@ -532,10 +556,20 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
FILENAME_UPPERCASE('N'), FILENAME_UPPERCASE('T'), FILENAME_UPPERCASE('R'), FILENAME_UPPERCASE('O'),
FILENAME_UPPERCASE('L'), FILENAME_UPPERCASE('L'), FILENAME_UPPERCASE('E'), FILENAME_UPPERCASE('R'),
};
+ // For iQue, the word "PRESS" is drawn below as a Chinese character instead (gTitlePressCHN)
static u8 pressStartFontIndices[] = {
- FILENAME_UPPERCASE('P'), FILENAME_UPPERCASE('R'), FILENAME_UPPERCASE('E'), FILENAME_UPPERCASE('S'),
- FILENAME_UPPERCASE('S'), FILENAME_UPPERCASE('S'), FILENAME_UPPERCASE('T'), FILENAME_UPPERCASE('A'),
- FILENAME_UPPERCASE('R'), FILENAME_UPPERCASE('T'),
+#if !PLATFORM_IQUE
+ FILENAME_UPPERCASE('P'),
+ FILENAME_UPPERCASE('R'),
+ FILENAME_UPPERCASE('E'),
+ FILENAME_UPPERCASE('S'),
+ FILENAME_UPPERCASE('S'),
+#endif
+ FILENAME_UPPERCASE('S'),
+ FILENAME_UPPERCASE('T'),
+ FILENAME_UPPERCASE('A'),
+ FILENAME_UPPERCASE('R'),
+ FILENAME_UPPERCASE('T'),
};
static void* effectMaskTextures[] = {
gTitleEffectMask00Tex, gTitleEffectMask01Tex, gTitleEffectMask02Tex,
@@ -568,11 +602,12 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
255);
if ((s16)this->effectPrimLodFrac != 0) {
- for (k = 0, i = 0, rectTop = 0; i < 3; i++, rectTop += 64) {
+ for (k = 0, i = 0, rectTop = 0; i < 3; i++) {
for (j = 0, rectLeft = 64 + LOGO_X_SHIFT; j < 3; j++, k++, rectLeft += 64) {
EnMag_DrawEffectTextures(&gfx, effectMaskTextures[k], gTitleFlameEffectTex, 64, 64, 32, 32, rectLeft,
rectTop, 64, 64, 1024, 1024, 1, 1, k, this);
}
+ rectTop += 64;
}
}
@@ -640,7 +675,10 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
}
#if OOT_NTSC
- if (gSaveContext.language == LANGUAGE_JPN) {
+#if !PLATFORM_IQUE
+ if (gSaveContext.language == LANGUAGE_JPN)
+#endif
+ {
this->unk_E30C++;
gDPPipeSync(gfx++);
gDPSetCycleType(gfx++, G_CYC_2CYCLE);
@@ -661,15 +699,21 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
#endif
if ((s16)this->subAlpha != 0) {
+#if !PLATFORM_IQUE
gDPLoadTextureBlock(gfx++, gTitleTitleJPNTex, G_IM_FMT_I, G_IM_SIZ_8b, 128, 16, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOLOD);
+#else
+ gDPLoadTextureBlock(gfx++, gTitleTitleCHNTex, G_IM_FMT_I, G_IM_SIZ_8b, 128, 16, 0,
+ G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP,
+ G_TX_NOMASK, G_TX_NOLOD);
+#endif
gDPLoadMultiBlock(gfx++, gTitleFlameEffectTex, 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, 2, 1);
gDPSetTileSize(gfx++, 1, this->unk_E30C & 0x7F, this->effectScroll & 0x7F,
(this->unk_E30C & 0x7F) + ((32 - 1) << 2), (this->effectScroll & 0x7F) + ((32 - 1) << 2));
- gSPTextureRectangle(gfx++, 424 + JPN_SUBTITLE_X_SHIFT, 576, 424 + JPN_SUBTITLE_X_SHIFT + 512, 576 + 64,
- G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+ gSPTextureRectangle(gfx++, 424 + TITLE_X_SHIFT, 576, 424 + TITLE_X_SHIFT + 512, 576 + 64, G_TX_RENDERTILE,
+ 0, 0, 1 << 10, 1 << 10);
}
}
#endif
@@ -687,11 +731,13 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
gDPLoadTextureBlock(gfx++, gTitleCopyright1998Tex, G_IM_FMT_IA, G_IM_SIZ_8b, 128, 16, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
-#elif OOT_VERSION < GC_US
+ gSPTextureRectangle(gfx++, 94 << 2, 198 << 2, 222 << 2, 214 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+#elif PLATFORM_GC && OOT_VERSION < GC_US
gDPLoadTextureBlock(gfx++, gTitleCopyright19982002Tex, G_IM_FMT_IA, G_IM_SIZ_8b, 160, 16, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
-#elif OOT_NTSC
+ gSPTextureRectangle(gfx++, 78 << 2, 198 << 2, 238 << 2, 214 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+#elif PLATFORM_GC && OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
gDPLoadTextureBlock(gfx++, gTitleCopyright19982002Tex, G_IM_FMT_IA, G_IM_SIZ_8b, 160, 16, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
@@ -701,16 +747,17 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
}
-#else
+ gSPTextureRectangle(gfx++, 78 << 2, 198 << 2, 238 << 2, 214 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+#elif PLATFORM_GC && OOT_PAL
gDPLoadTextureBlock(gfx++, gTitleCopyright19982003Tex, G_IM_FMT_IA, G_IM_SIZ_8b, 160, 16, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
-#endif
-
-#if PLATFORM_N64
- gSPTextureRectangle(gfx++, 94 << 2, 198 << 2, 222 << 2, 214 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
-#else
gSPTextureRectangle(gfx++, 78 << 2, 198 << 2, 238 << 2, 214 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+#elif PLATFORM_IQUE
+ gDPLoadTextureBlock(gfx++, gTitleCopyright19982003IQueTex, G_IM_FMT_IA, G_IM_SIZ_8b, 128, 32, 0,
+ G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
+ G_TX_NOLOD, G_TX_NOLOD);
+ gSPTextureRectangle(gfx++, 94 << 2, 198 << 2, 222 << 2, 230 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
#endif
}
@@ -757,6 +804,7 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
textAlpha = 255;
}
+#if !PLATFORM_IQUE
// Text Shadow
gDPPipeSync(gfx++);
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
@@ -786,6 +834,41 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
rectLeft += YREG(9);
}
}
+#else
+ // Text Shadow
+ gDPPipeSync(gfx++);
+ gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
+ 0);
+ gDPSetPrimColor(gfx++, 0, 0, 0, 0, 0, textAlpha);
+
+ rectLeft = YREG(7) + 1;
+
+ rectLeft += YREG(8) * 2;
+ EnMag_DrawCharTexture(&gfx, (u8*)gTitlePressCHN, rectLeft, YREG(10) + 172);
+ rectLeft += YREG(9) + YREG(8);
+
+ for (i = 0; i < ARRAY_COUNT(pressStartFontIndices); i++) {
+ EnMag_DrawCharTexture(&gfx, font->fontBuf + pressStartFontIndices[i] * FONT_CHAR_TEX_SIZE, rectLeft,
+ YREG(10) + 172);
+ rectLeft += YREG(8);
+ }
+
+ // Actual Text
+ gDPPipeSync(gfx++);
+ gDPSetPrimColor(gfx++, 0, 0, YREG(4), YREG(5), YREG(6), textAlpha);
+
+ rectLeft = YREG(7);
+
+ rectLeft += YREG(8) * 2;
+ EnMag_DrawCharTexture(&gfx, (u8*)gTitlePressCHN, rectLeft, YREG(10) + 171);
+ rectLeft += YREG(9) + YREG(8);
+
+ for (i = 0; i < ARRAY_COUNT(pressStartFontIndices); i++) {
+ EnMag_DrawCharTexture(&gfx, font->fontBuf + pressStartFontIndices[i] * FONT_CHAR_TEX_SIZE, rectLeft,
+ YREG(10) + 171);
+ rectLeft += YREG(8);
+ }
+#endif
}
if (textFadeDirection != 0) {
diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.h b/src/overlays/actors/ovl_En_Mag/z_en_mag.h
index e7c516c629..ace8427278 100644
--- a/src/overlays/actors/ovl_En_Mag/z_en_mag.h
+++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.h
@@ -2,7 +2,8 @@
#define Z_EN_MAG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64message.h"
struct EnMag;
diff --git a/src/overlays/actors/ovl_En_Mb/z_en_mb.c b/src/overlays/actors/ovl_En_Mb/z_en_mb.c
index 9fa90fb8c5..a69a25f0d5 100644
--- a/src/overlays/actors/ovl_En_Mb/z_en_mb.c
+++ b/src/overlays/actors/ovl_En_Mb/z_en_mb.c
@@ -5,8 +5,24 @@
*/
#include "z_en_mb.h"
-#include "assets/objects/object_mb/object_mb.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_mb/object_mb.h"
/*
* This actor can have three behaviors:
@@ -15,7 +31,7 @@
* - "Spear Patrol" (variable 0xPP00 PP=pathId): uses a spear, patrols following a path, charges
*/
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
typedef enum EnMbType {
/* -1 */ ENMB_TYPE_SPEAR_GUARD = -1,
@@ -110,7 +126,7 @@ static ColliderCylinderInit sBodyColliderInit = {
{ 20, 70, 0, { 0, 0, 0 } },
};
-static ColliderTrisElementInit sFrontShieldingTrisInit[2] = {
+static ColliderTrisElementInit sFrontShieldingTrisElementsInit[2] = {
{
{
ELEM_MATERIAL_UNK2,
@@ -135,7 +151,7 @@ static ColliderTrisElementInit sFrontShieldingTrisInit[2] = {
},
};
-static ColliderTrisInit sFrontShieldingInit = {
+static ColliderTrisInit sFrontShieldingTrisInit = {
{
COL_MATERIAL_METAL,
AT_NONE,
@@ -145,10 +161,10 @@ static ColliderTrisInit sFrontShieldingInit = {
COLSHAPE_TRIS,
},
2,
- sFrontShieldingTrisInit,
+ sFrontShieldingTrisElementsInit,
};
-static ColliderQuadInit sAttackColliderInit = {
+static ColliderQuadInit sAttackColliderQuadInit = {
{
COL_MATERIAL_NONE,
AT_ON | AT_TYPE_ENEMY,
@@ -268,10 +284,11 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.damageTable = &sSpearMoblinDamageTable;
Collider_InitCylinder(play, &this->bodyCollider);
Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sBodyColliderInit);
- Collider_InitTris(play, &this->frontShielding);
- Collider_SetTris(play, &this->frontShielding, &this->actor, &sFrontShieldingInit, this->frontShieldingTris);
+ Collider_InitTris(play, &this->frontShieldingCollider);
+ Collider_SetTris(play, &this->frontShieldingCollider, &this->actor, &sFrontShieldingTrisInit,
+ this->frontShieldingColliderElements);
Collider_InitQuad(play, &this->attackCollider);
- Collider_SetQuad(play, &this->attackCollider, &this->actor, &sAttackColliderInit);
+ Collider_SetQuad(play, &this->attackCollider, &this->actor, &sAttackColliderQuadInit);
switch (this->actor.params) {
case ENMB_TYPE_SPEAR_GUARD:
@@ -293,9 +310,9 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->actor, 0.02f);
this->bodyCollider.dim.height = 170;
this->bodyCollider.dim.radius = 45;
- this->actor.uncullZoneForward = 4000.0f;
- this->actor.uncullZoneScale = 800.0f;
- this->actor.uncullZoneDownward = 1800.0f;
+ this->actor.cullingVolumeDistance = 4000.0f;
+ this->actor.cullingVolumeScale = 800.0f;
+ this->actor.cullingVolumeDownward = 1800.0f;
this->playerDetectionRange = 710.0f;
this->attackCollider.elem.atDmgInfo.dmgFlags = DMG_UNBLOCKABLE;
@@ -333,7 +350,7 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
void EnMb_Destroy(Actor* thisx, PlayState* play) {
EnMb* this = (EnMb*)thisx;
- Collider_DestroyTris(play, &this->frontShielding);
+ Collider_DestroyTris(play, &this->frontShieldingCollider);
Collider_DestroyCylinder(play, &this->bodyCollider);
Collider_DestroyQuad(play, &this->attackCollider);
}
@@ -605,8 +622,10 @@ void EnMb_Stunned(EnMb* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
+#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
- func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
+#endif
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
this->attack = ENMB_ATTACK_NONE;
}
@@ -714,17 +733,21 @@ void EnMb_ClubWaitAfterAttack(EnMb* this, PlayState* play) {
* Slow down, charge again if the player is near, or resume walking.
*/
void EnMb_SpearPatrolEndCharge(EnMb* this, PlayState* play) {
+#if OOT_VERSION >= PAL_1_0
Player* player = GET_PLAYER(play);
+#endif
f32 lastFrame;
s16 relYawFromPlayer;
s16 yawPlayerToWaypoint;
+#if OOT_VERSION >= PAL_1_0
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
- func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
}
+#endif
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 1.5f, 0.0f);
@@ -840,8 +863,9 @@ void EnMb_ClubAttack(EnMb* this, PlayState* play) {
}
}
- func_8002F71C(play, &this->actor, (650.0f - this->actor.xzDistToPlayer) * 0.04f + 4.0f,
- this->actor.world.rot.y, 8.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor,
+ (650.0f - this->actor.xzDistToPlayer) * 0.04f + 4.0f,
+ this->actor.world.rot.y, 8.0f);
player->invincibilityTimer = prevPlayerInvincibilityTimer;
}
@@ -911,7 +935,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
if (this->attackCollider.base.at == &player->actor) {
if (!endCharge && !(player->stateFlags2 & PLAYER_STATE2_7)) {
if (player->invincibilityTimer < 0) {
- if (player->invincibilityTimer < -39) {
+ if (player->invincibilityTimer <= -40) {
player->invincibilityTimer = 0;
} else {
player->invincibilityTimer = 0;
@@ -944,19 +968,24 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
if (endCharge) {
if (hasHitPlayer || (player->stateFlags2 & PLAYER_STATE2_7)) {
-#if OOT_VERSION < NTSC_1_2
+#if OOT_VERSION < PAL_1_0
+ player->stateFlags2 &= ~PLAYER_STATE2_7;
+ this->attackCollider.base.atFlags &= ~AT_HIT;
+ player->actor.parent = NULL;
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
+#elif OOT_VERSION < NTSC_1_2
player->stateFlags2 &= ~PLAYER_STATE2_7;
this->attackCollider.base.atFlags &= ~AT_HIT;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
- func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
#else
this->attackCollider.base.atFlags &= ~AT_HIT;
if (player->stateFlags2 & PLAYER_STATE2_7) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
- func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
}
#endif
}
@@ -1021,19 +1050,24 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) {
if (endCharge) {
if (hasHitPlayer || (player->stateFlags2 & PLAYER_STATE2_7)) {
-#if OOT_VERSION < NTSC_1_2
+#if OOT_VERSION < PAL_1_0
+ this->attackCollider.base.atFlags &= ~AT_HIT;
+ player->stateFlags2 &= ~PLAYER_STATE2_7;
+ player->actor.parent = NULL;
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
+#elif OOT_VERSION < NTSC_1_2
this->attackCollider.base.atFlags &= ~AT_HIT;
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
- func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
#else
this->attackCollider.base.atFlags &= ~AT_HIT;
if (player->stateFlags2 & PLAYER_STATE2_7) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
- func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
}
#endif
this->attack = ENMB_ATTACK_NONE;
@@ -1308,17 +1342,30 @@ void EnMb_SetupSpearDead(EnMb* this) {
}
void EnMb_SpearDead(EnMb* this, PlayState* play) {
+#if OOT_VERSION >= NTSC_1_1
Player* player = GET_PLAYER(play);
+#endif
Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 0.5f, 0.0f);
+#if OOT_VERSION < NTSC_1_1
+ // Empty
+#elif OOT_VERSION < PAL_1_0
+ if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
+ player->stateFlags2 &= ~PLAYER_STATE2_7;
+ player->actor.parent = NULL;
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
+ this->attack = ENMB_ATTACK_NONE;
+ }
+#else
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
- func_8002F71C(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
this->attack = ENMB_ATTACK_NONE;
}
+#endif
if (SkelAnime_Update(&this->skelAnime)) {
if (this->timer1 > 0) {
@@ -1388,8 +1435,8 @@ void EnMb_ClubUpdateAttackCollider(Actor* thisx, PlayState* play) {
void EnMb_CheckColliding(EnMb* this, PlayState* play) {
Player* player = GET_PLAYER(play);
- if (this->frontShielding.base.acFlags & AC_HIT) {
- this->frontShielding.base.acFlags &= ~(AC_HIT | AC_BOUNCED);
+ if (this->frontShieldingCollider.base.acFlags & AC_HIT) {
+ this->frontShieldingCollider.base.acFlags &= ~(AC_HIT | AC_BOUNCED);
this->bodyCollider.base.acFlags &= ~AC_HIT;
} else if ((this->bodyCollider.base.acFlags & AC_HIT) && this->state >= ENMB_STATE_STUNNED) {
this->bodyCollider.base.acFlags &= ~AC_HIT;
@@ -1398,8 +1445,10 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
+#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
- func_8002F71C(play, &this->actor, 6.0f, this->actor.world.rot.y, 6.0f);
+#endif
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 6.0f, this->actor.world.rot.y, 6.0f);
}
this->damageEffect = this->actor.colChkInfo.damageEffect;
this->attack = ENMB_ATTACK_NONE;
@@ -1454,7 +1503,7 @@ void EnMb_Update(Actor* thisx, PlayState* play) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base);
}
if (this->state >= ENMB_STATE_IDLE) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->frontShielding.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->frontShieldingCollider.base);
}
if (this->attack > ENMB_ATTACK_NONE) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->attackCollider.base);
@@ -1553,9 +1602,9 @@ void EnMb_Draw(Actor* thisx, PlayState* play) {
Matrix_MultVec3f(&frontShieldingTriModel0[i], &frontShieldingTri0[i]);
Matrix_MultVec3f(&frontShieldingTriModel1[i], &frontShieldingTri1[i]);
}
- Collider_SetTrisVertices(&this->frontShielding, 0, &frontShieldingTri0[0], &frontShieldingTri0[1],
+ Collider_SetTrisVertices(&this->frontShieldingCollider, 0, &frontShieldingTri0[0], &frontShieldingTri0[1],
&frontShieldingTri0[2]);
- Collider_SetTrisVertices(&this->frontShielding, 1, &frontShieldingTri1[0], &frontShieldingTri1[1],
+ Collider_SetTrisVertices(&this->frontShieldingCollider, 1, &frontShieldingTri1[0], &frontShieldingTri1[1],
&frontShieldingTri1[2]);
}
diff --git a/src/overlays/actors/ovl_En_Mb/z_en_mb.h b/src/overlays/actors/ovl_En_Mb/z_en_mb.h
index 66afb9eeb1..776e7421e0 100644
--- a/src/overlays/actors/ovl_En_Mb/z_en_mb.h
+++ b/src/overlays/actors/ovl_En_Mb/z_en_mb.h
@@ -2,11 +2,11 @@
#define Z_EN_MB_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMb;
-typedef void (*EnMbActionFunc)(struct EnMb*, PlayState*);
+typedef void (*EnMbActionFunc)(struct EnMb*, struct PlayState*);
typedef enum EnMbState {
/* 0 */ ENMB_STATE_SPEAR_SPEARPATH_DAMAGED,
@@ -46,8 +46,8 @@ typedef struct EnMb {
/* 0x0364 */ f32 playerDetectionRange;
/* 0x0368 */ ColliderCylinder bodyCollider;
/* 0x03B4 */ ColliderQuad attackCollider; // for attacking the player
- /* 0x0434 */ ColliderTris frontShielding; // Moblins don't have shields, but this acts as one
- /* 0x0454 */ ColliderTrisElement frontShieldingTris[2];
+ /* 0x0434 */ ColliderTris frontShieldingCollider; // Moblins don't have shields, but this acts as one
+ /* 0x0454 */ ColliderTrisElement frontShieldingColliderElements[2];
} EnMb; // size = 0x050C
#endif
diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c
index 37ae4b40fd..296f4d42af 100644
--- a/src/overlays/actors/ovl_En_Md/z_en_md.c
+++ b/src/overlays/actors/ovl_En_Md/z_en_md.c
@@ -5,21 +5,37 @@
*/
#include "z_en_md.h"
-#include "assets/objects/object_md/object_md.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "libc64/math64.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_md/object_md.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnMd_Init(Actor* thisx, PlayState* play);
void EnMd_Destroy(Actor* thisx, PlayState* play);
void EnMd_Update(Actor* thisx, PlayState* play);
void EnMd_Draw(Actor* thisx, PlayState* play);
-void func_80AAB874(EnMd* this, PlayState* play);
-void func_80AAB8F8(EnMd* this, PlayState* play);
-void func_80AAB948(EnMd* this, PlayState* play);
-void func_80AABC10(EnMd* this, PlayState* play);
-void func_80AABD0C(EnMd* this, PlayState* play);
+void EnMd_Idle(EnMd* this, PlayState* play);
+void EnMd_Watch(EnMd* this, PlayState* play);
+void EnMd_BlockPath(EnMd* this, PlayState* play);
+void EnMd_ListenToOcarina(EnMd* this, PlayState* play);
+void EnMd_Walk(EnMd* this, PlayState* play);
ActorProfile En_Md_Profile = {
/**/ ACTOR_EN_MD,
@@ -55,41 +71,56 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
-typedef enum EnMdAnimation {
- /* 0 */ ENMD_ANIM_0,
- /* 1 */ ENMD_ANIM_1,
- /* 2 */ ENMD_ANIM_2,
- /* 3 */ ENMD_ANIM_3,
- /* 4 */ ENMD_ANIM_4,
- /* 5 */ ENMD_ANIM_5,
- /* 6 */ ENMD_ANIM_6,
- /* 7 */ ENMD_ANIM_7,
- /* 8 */ ENMD_ANIM_8,
- /* 9 */ ENMD_ANIM_9,
- /* 10 */ ENMD_ANIM_10,
- /* 11 */ ENMD_ANIM_11,
- /* 12 */ ENMD_ANIM_12,
- /* 13 */ ENMD_ANIM_13
-} EnMdAnimation;
+typedef enum EnMdAnimSequence {
+ /* 0x0 */ ENMD_ANIM_SEQ_NONE,
+ /* 0x1 */ ENMD_ANIM_SEQ_IDLE_TO_HALT, // hands on hips -> halt gesture
+ /* 0x2 */ ENMD_ANIM_SEQ_HALT_TO_CURIOUS, // halt gesture -> tilted head
+ /* 0x3 */ ENMD_ANIM_SEQ_WALK_AWAY, // stop halt gesture -> start walking -> walking
+ /* 0x4 */ ENMD_ANIM_SEQ_TWITCH_IDLE_UNUSED, // start walking -> hands on hips; never set
+ /* 0x5 */ ENMD_ANIM_SEQ_HALT_TO_IDLE, // halt gesture -> hands on hips
+ /* 0x6 */ ENMD_ANIM_SEQ_SURPRISE_TO_ANNOYED, // slightly raise arms from hips -> look away
+ /* 0x7 */ ENMD_ANIM_SEQ_SURPRISE_TO_IDLE, // lower slightly raised arms to hips -> hands on hips
+ /* 0x8 */ ENMD_ANIM_SEQ_CURIOUS_TO_ANNOYED, // tilted head and *slam* -> looking away
+ /* 0x9 */ ENMD_ANIM_SEQ_ANNOYED_TO_HALT, // looking away -> halt gesture
+ /* 0xA */ ENMD_ANIM_SEQ_IDLE_TO_ANNOYED, // hands on hips -> looking away
+ /* 0xB */ ENMD_ANIM_SEQ_STOP_WALKING // stop walking -> hands on hips
+} EnMdAnimSequence;
+
+typedef enum EnMdAnimIndex {
+ /* 0 */ ENMD_ANIM_INDEX_IDLE_DEFAULT, // hands on hips; default idle
+ /* 1 */ ENMD_ANIM_INDEX_IDLE_UNUSED, // hands on hips; never set
+ /* 2 */ ENMD_ANIM_INDEX_IDLE_TO_HALT, // hands on hips -> halt gesture
+ /* 3 */ ENMD_ANIM_INDEX_HALT, // halt gesture
+ /* 4 */ ENMD_ANIM_INDEX_HALT_TO_CURIOUS, // halt gesture -> tilted head
+ /* 5 */ ENMD_ANIM_INDEX_CURIOUS, // tilted head
+ /* 6 */ ENMD_ANIM_INDEX_ANNOYED, // looking away
+ /* 7 */ ENMD_ANIM_INDEX_IDLE_TO_WALK, // hands on hips -> walking
+ /* 8 */ ENMD_ANIM_INDEX_WALK, // walking
+ /* 9 */ ENMD_ANIM_INDEX_IDLE_TO_SURPISE, // hands on hips -> slightly raised arms
+ /* 10 */ ENMD_ANIM_INDEX_IDLE, // hands on hips
+ /* 11 */ ENMD_ANIM_INDEX_CURIOUS_TO_ANNOYED, // tilted head -> looking away
+ /* 12 */ ENMD_ANIM_INDEX_ANNOYED_TO_HALT, // looking away -> halt gesture
+ /* 13 */ ENMD_ANIM_INDEX_IDLE_TO_ANNOYED // hands on hips -> looking away
+} EnMdAnimIndex;
static AnimationInfo sAnimationInfo[] = {
- { &gMidoHandsOnHipsIdleAnim, 0.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
- { &gMidoHandsOnHipsIdleAnim, 0.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
- { &gMidoRaiseHand1Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
+ { &gMidoIdleAnim, 0.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
+ { &gMidoIdleAnim, 0.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
+ { &gMidoIdleToHaltAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
{ &gMidoHaltAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
- { &gMidoPutHandDownAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
- { &gMidoAnnoyedPointedHeadIdle1Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
- { &gMidoAnnoyedPointedHeadIdle2Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
- { &gMidoAnim_92B0, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
- { &gMidoWalkingAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
- { &gMidoHandsOnHipsTransitionAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
- { &gMidoHandsOnHipsIdleAnim, 0.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
- { &gMidoSlamAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
- { &gMidoRaiseHand2Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
- { &gMidoAngryHeadTurnAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
+ { &gMidoHaltToCuriousAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
+ { &gMidoCuriousAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
+ { &gMidoAnnoyedAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
+ { &gMidoIdleToWalkAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
+ { &gMidoWalkAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
+ { &gMidoIdleToSurpriseAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
+ { &gMidoIdleAnim, 0.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
+ { &gMidoCuriousToAnnoyedAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
+ { &gMidoAnnoyedToHaltAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -1.0f },
+ { &gMidoIdleToAnnoyedAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -1.0f },
};
-void func_80AAA250(EnMd* this) {
+void EnMd_ReverseAnimation(EnMd* this) {
f32 startFrame;
startFrame = this->skelAnime.startFrame;
@@ -99,289 +130,290 @@ void func_80AAA250(EnMd* this) {
this->skelAnime.playSpeed = -1.0f;
}
-void func_80AAA274(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_IdleToHalt(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_2);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE_TO_HALT);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_3);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_HALT);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA308(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_HaltToCurious(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_4);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_HALT_TO_CURIOUS);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_5);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_CURIOUS);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA39C(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_WalkAway(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_2);
- func_80AAA250(this);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE_TO_HALT);
+ EnMd_ReverseAnimation(this);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_7);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE_TO_WALK);
+ this->animSequenceEntry++;
} else {
break;
}
FALLTHROUGH;
case 2:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_8);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_WALK);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA474(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_TwitchIdle_Unused(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_7);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE_TO_WALK);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_10);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA508(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_HaltToIdle(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_2);
- func_80AAA250(this);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE_TO_HALT);
+ EnMd_ReverseAnimation(this);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_10);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA5A4(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_SurpriseToAnnoyed(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_9);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE_TO_SURPISE);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_6);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_ANNOYED);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA638(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_SurpriseToIdle(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_9);
- func_80AAA250(this);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE_TO_SURPISE);
+ EnMd_ReverseAnimation(this);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_10);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA6D4(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_CuriousToAnnoyed(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_11);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_CURIOUS_TO_ANNOYED);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_6);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_ANNOYED);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA768(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_AnnoyedToHalt(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_12);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_ANNOYED_TO_HALT);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_3);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_HALT);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA7FC(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_IdleToAnnoyed(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_13);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE_TO_ANNOYED);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_6);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_ANNOYED);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA890(EnMd* this) {
- switch (this->unk_20A) {
+void EnMd_UpdateAnimSequence_StopWalking(EnMd* this) {
+ switch (this->animSequenceEntry) {
case 0:
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_7);
- func_80AAA250(this);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE_TO_WALK);
+ EnMd_ReverseAnimation(this);
+ this->animSequenceEntry++;
FALLTHROUGH;
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_10);
- this->unk_20A++;
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE);
+ this->animSequenceEntry++;
}
break;
}
}
-void func_80AAA92C(EnMd* this, u8 arg1) {
- this->unk_20B = arg1;
- this->unk_20A = 0;
+void EnMd_SetAnimSequence(EnMd* this, u8 state) {
+ this->animSequence = state;
+ this->animSequenceEntry = 0;
}
-void func_80AAA93C(EnMd* this) {
- switch (this->unk_20B) {
- case 1:
- func_80AAA274(this);
+void EnMd_UpdateAnimSequence(EnMd* this) {
+ switch (this->animSequence) {
+ case ENMD_ANIM_SEQ_IDLE_TO_HALT:
+ EnMd_UpdateAnimSequence_IdleToHalt(this);
break;
- case 2:
- func_80AAA308(this);
+ case ENMD_ANIM_SEQ_HALT_TO_CURIOUS:
+ EnMd_UpdateAnimSequence_HaltToCurious(this);
break;
- case 3:
- func_80AAA39C(this);
+ case ENMD_ANIM_SEQ_WALK_AWAY:
+ EnMd_UpdateAnimSequence_WalkAway(this);
break;
- case 4:
- func_80AAA474(this);
+ case ENMD_ANIM_SEQ_TWITCH_IDLE_UNUSED:
+ // unreachable
+ EnMd_UpdateAnimSequence_TwitchIdle_Unused(this);
break;
- case 5:
- func_80AAA508(this);
+ case ENMD_ANIM_SEQ_HALT_TO_IDLE:
+ EnMd_UpdateAnimSequence_HaltToIdle(this);
break;
- case 6:
- func_80AAA5A4(this);
+ case ENMD_ANIM_SEQ_SURPRISE_TO_ANNOYED:
+ EnMd_UpdateAnimSequence_SurpriseToAnnoyed(this);
break;
- case 7:
- func_80AAA638(this);
+ case ENMD_ANIM_SEQ_SURPRISE_TO_IDLE:
+ EnMd_UpdateAnimSequence_SurpriseToIdle(this);
break;
- case 8:
- func_80AAA6D4(this);
+ case ENMD_ANIM_SEQ_CURIOUS_TO_ANNOYED:
+ EnMd_UpdateAnimSequence_CuriousToAnnoyed(this);
break;
- case 9:
- func_80AAA768(this);
+ case ENMD_ANIM_SEQ_ANNOYED_TO_HALT:
+ EnMd_UpdateAnimSequence_AnnoyedToHalt(this);
break;
- case 10:
- func_80AAA7FC(this);
+ case ENMD_ANIM_SEQ_IDLE_TO_ANNOYED:
+ EnMd_UpdateAnimSequence_IdleToAnnoyed(this);
break;
- case 11:
- func_80AAA890(this);
+ case ENMD_ANIM_SEQ_STOP_WALKING:
+ EnMd_UpdateAnimSequence_StopWalking(this);
}
}
-void func_80AAAA24(EnMd* this) {
+void EnMd_UpdateAnimSequence_WithTalking(EnMd* this) {
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
switch (this->actor.textId) {
case 0x102F:
- if ((this->unk_208 == 0) && (this->unk_20B != 1)) {
- func_80AAA92C(this, 1);
+ if ((this->messageEntry == 0) && (this->animSequence != ENMD_ANIM_SEQ_IDLE_TO_HALT)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_IDLE_TO_HALT);
}
- if ((this->unk_208 == 2) && (this->unk_20B != 2)) {
- func_80AAA92C(this, 2);
+ if ((this->messageEntry == 2) && (this->animSequence != ENMD_ANIM_SEQ_HALT_TO_CURIOUS)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_HALT_TO_CURIOUS);
}
- if ((this->unk_208 == 5) && (this->unk_20B != 8)) {
- func_80AAA92C(this, 8);
+ if ((this->messageEntry == 5) && (this->animSequence != ENMD_ANIM_SEQ_CURIOUS_TO_ANNOYED)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_CURIOUS_TO_ANNOYED);
}
- if ((this->unk_208 == 11) && (this->unk_20B != 9)) {
- func_80AAA92C(this, 9);
+ if ((this->messageEntry == 11) && (this->animSequence != ENMD_ANIM_SEQ_ANNOYED_TO_HALT)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_ANNOYED_TO_HALT);
}
break;
case 0x1033:
- if ((this->unk_208 == 0) && (this->unk_20B != 1)) {
- func_80AAA92C(this, 1);
+ if ((this->messageEntry == 0) && (this->animSequence != ENMD_ANIM_SEQ_IDLE_TO_HALT)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_IDLE_TO_HALT);
}
- if ((this->unk_208 == 1) && (this->unk_20B != 2)) {
- func_80AAA92C(this, 2);
+ if ((this->messageEntry == 1) && (this->animSequence != ENMD_ANIM_SEQ_HALT_TO_CURIOUS)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_HALT_TO_CURIOUS);
}
- if ((this->unk_208 == 5) && (this->unk_20B != 10)) {
- func_80AAA92C(this, 10);
+ if ((this->messageEntry == 5) && (this->animSequence != ENMD_ANIM_SEQ_IDLE_TO_ANNOYED)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_IDLE_TO_ANNOYED);
}
- if ((this->unk_208 == 7) && (this->unk_20B != 9)) {
- func_80AAA92C(this, 9);
+ if ((this->messageEntry == 7) && (this->animSequence != ENMD_ANIM_SEQ_ANNOYED_TO_HALT)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_ANNOYED_TO_HALT);
}
break;
case 0x1030:
case 0x1034:
case 0x1045:
- if ((this->unk_208 == 0) && (this->unk_20B != 1)) {
- func_80AAA92C(this, 1);
+ if ((this->messageEntry == 0) && (this->animSequence != ENMD_ANIM_SEQ_IDLE_TO_HALT)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_IDLE_TO_HALT);
}
break;
case 0x1046:
- if ((this->unk_208 == 0) && (this->unk_20B != 6)) {
- func_80AAA92C(this, 6);
+ if ((this->messageEntry == 0) && (this->animSequence != ENMD_ANIM_SEQ_SURPRISE_TO_ANNOYED)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_SURPRISE_TO_ANNOYED);
}
break;
}
- } else if (this->skelAnime.animation != &gMidoHandsOnHipsIdleAnim) {
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_10);
- func_80AAA92C(this, 0);
+ } else if (this->skelAnime.animation != &gMidoIdleAnim) {
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE);
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_NONE);
}
- func_80AAA93C(this);
+ EnMd_UpdateAnimSequence(this);
}
-s16 func_80AAAC78(EnMd* this, PlayState* play) {
- s16 dialogState = Message_GetState(&play->msgCtx);
+s16 EnMd_TrackMessageState(EnMd* this, PlayState* play) {
+ s16 messageState = Message_GetState(&play->msgCtx);
- if ((this->unk_209 == TEXT_STATE_AWAITING_NEXT) || (this->unk_209 == TEXT_STATE_EVENT) ||
- (this->unk_209 == TEXT_STATE_CLOSING) || (this->unk_209 == TEXT_STATE_DONE_HAS_NEXT)) {
- if (this->unk_209 != dialogState) {
- this->unk_208++;
+ if ((this->messageState == TEXT_STATE_AWAITING_NEXT) || (this->messageState == TEXT_STATE_EVENT) ||
+ (this->messageState == TEXT_STATE_CLOSING) || (this->messageState == TEXT_STATE_DONE_HAS_NEXT)) {
+ if (this->messageState != messageState) {
+ this->messageEntry++;
}
}
- this->unk_209 = dialogState;
- return dialogState;
+ this->messageState = messageState;
+ return messageState;
}
u16 EnMd_GetTextIdKokiriForest(PlayState* play, EnMd* this) {
@@ -391,8 +423,8 @@ u16 EnMd_GetTextIdKokiriForest(PlayState* play, EnMd* this) {
return textId;
}
- this->unk_208 = 0;
- this->unk_209 = TEXT_STATE_NONE;
+ this->messageEntry = 0;
+ this->messageState = TEXT_STATE_NONE;
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
return 0x1045;
@@ -415,8 +447,8 @@ u16 EnMd_GetTextIdKokiriForest(PlayState* play, EnMd* this) {
}
u16 EnMd_GetTextIdMidosHouse(PlayState* play, EnMd* this) {
- this->unk_208 = 0;
- this->unk_209 = TEXT_STATE_NONE;
+ this->messageEntry = 0;
+ this->messageState = TEXT_STATE_NONE;
if (GET_EVENTCHKINF(EVENTCHKINF_40)) {
return 0x1028;
@@ -426,8 +458,8 @@ u16 EnMd_GetTextIdMidosHouse(PlayState* play, EnMd* this) {
}
u16 EnMd_GetTextIdLostWoods(PlayState* play, EnMd* this) {
- this->unk_208 = 0;
- this->unk_209 = TEXT_STATE_NONE;
+ this->messageEntry = 0;
+ this->messageState = TEXT_STATE_NONE;
if (GET_EVENTCHKINF(EVENTCHKINF_48)) {
if (GET_INFTABLE(INFTABLE_19)) {
@@ -464,7 +496,7 @@ u16 EnMd_GetTextId(PlayState* play, Actor* thisx) {
s16 EnMd_UpdateTalkState(PlayState* play, Actor* thisx) {
EnMd* this = (EnMd*)thisx;
- switch (func_80AAAC78(this, play)) {
+ switch (EnMd_TrackMessageState(this, play)) {
case TEXT_STATE_NONE:
case TEXT_STATE_DONE_HAS_NEXT:
case TEXT_STATE_DONE_FADING:
@@ -480,7 +512,7 @@ s16 EnMd_UpdateTalkState(PlayState* play, Actor* thisx) {
SET_EVENTCHKINF(EVENTCHKINF_0F);
break;
case 0x102F:
- SET_EVENTCHKINF(EVENTCHKINF_02);
+ SET_EVENTCHKINF(EVENTCHKINF_MIDO_DENIED_DEKU_TREE_ACCESS);
SET_INFTABLE(INFTABLE_0C);
break;
case 0x1060:
@@ -528,19 +560,19 @@ u8 EnMd_ShouldSpawn(EnMd* this, PlayState* play) {
void EnMd_UpdateEyes(EnMd* this) {
if (DECR(this->blinkTimer) == 0) {
- this->eyeIdx++;
- if (this->eyeIdx > 2) {
+ this->eyeTexIndex++;
+ if (this->eyeTexIndex > 2) {
this->blinkTimer = Rand_S16Offset(30, 30);
- this->eyeIdx = 0;
+ this->eyeTexIndex = 0;
}
}
}
-void func_80AAB158(EnMd* this, PlayState* play) {
+void EnMd_UpdateTalking(EnMd* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s16 absYawDiff;
s16 trackingMode;
- s16 temp2;
+ s16 canUpdateTalking;
s16 yawDiff;
if (this->actor.xzDistToPlayer < 170.0f) {
@@ -549,23 +581,23 @@ void func_80AAB158(EnMd* this, PlayState* play) {
trackingMode =
absYawDiff <= Npc_GetTrackingPresetMaxPlayerYaw(2) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
- temp2 = 1;
+ canUpdateTalking = true;
} else {
trackingMode = NPC_TRACKING_NONE;
- temp2 = 0;
+ canUpdateTalking = false;
}
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
trackingMode = NPC_TRACKING_FULL_BODY;
}
- if (this->actionFunc == func_80AABD0C) {
+ if (this->actionFunc == EnMd_Walk) {
trackingMode = NPC_TRACKING_NONE;
- temp2 = 0;
+ canUpdateTalking = false;
}
- if (this->actionFunc == func_80AAB8F8) {
+ if (this->actionFunc == EnMd_Watch) {
trackingMode = NPC_TRACKING_FULL_BODY;
- temp2 = 1;
+ canUpdateTalking = true;
}
if ((play->csCtx.state != CS_STATE_IDLE) || gDebugCamEnabled) {
@@ -578,8 +610,8 @@ void func_80AAB158(EnMd* this, PlayState* play) {
}
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, trackingMode);
- if (this->actionFunc != func_80AABC10) {
- if (temp2) {
+ if (this->actionFunc != EnMd_ListenToOcarina) {
+ if (canUpdateTalking) {
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 30.0f,
EnMd_GetTextId, EnMd_UpdateTalkState);
}
@@ -592,11 +624,11 @@ u8 EnMd_FollowPath(EnMd* this, PlayState* play) {
f32 pathDiffX;
f32 pathDiffZ;
- if (PARAMS_GET_NOSHIFT(this->actor.params, 8, 8) == 0xFF00) {
+ if (ENMD_GET_PATH_INDEX_NOSHIFT(this) == (ENMD_PATH_NONE << 8)) {
return 0;
}
- path = &play->pathList[PARAMS_GET_S(this->actor.params, 8, 8)];
+ path = &play->pathList[ENMD_GET_PATH_INDEX(this)];
pointPos = SEGMENTED_TO_VIRTUAL(path->points);
pointPos += this->waypoint;
@@ -619,11 +651,11 @@ u8 EnMd_SetMovedPos(EnMd* this, PlayState* play) {
Path* path;
Vec3s* lastPointPos;
- if (PARAMS_GET_NOSHIFT(this->actor.params, 8, 8) == 0xFF00) {
+ if (ENMD_GET_PATH_INDEX_NOSHIFT(this) == (ENMD_PATH_NONE << 8)) {
return 0;
}
- path = &play->pathList[PARAMS_GET_S(this->actor.params, 8, 8)];
+ path = &play->pathList[ENMD_GET_PATH_INDEX(this)];
lastPointPos = SEGMENTED_TO_VIRTUAL(path->points);
lastPointPos += path->count - 1;
@@ -634,15 +666,15 @@ u8 EnMd_SetMovedPos(EnMd* this, PlayState* play) {
return 1;
}
-void func_80AAB5A4(EnMd* this, PlayState* play) {
- f32 temp;
+void EnMd_UpdateAlphaByDistance(EnMd* this, PlayState* play) {
+ f32 radius;
if (play->sceneId != SCENE_MIDOS_HOUSE) {
- temp = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) &&
- (play->sceneId == SCENE_KOKIRI_FOREST))
- ? 100.0f
- : 400.0f;
- this->alpha = func_80034DD4(&this->actor, play, this->alpha, temp);
+ radius = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) &&
+ (play->sceneId == SCENE_KOKIRI_FOREST))
+ ? 100.0f
+ : 400.0f;
+ this->alpha = Actor_UpdateAlphaByDistance(&this->actor, play, this->alpha, radius);
this->actor.shape.shadowAlpha = this->alpha;
} else {
this->alpha = 255;
@@ -665,7 +697,7 @@ void EnMd_Init(Actor* thisx, PlayState* play) {
return;
}
- Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_0);
+ Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENMD_ANIM_INDEX_IDLE_DEFAULT);
Actor_SetScale(&this->actor, 0.01f);
this->actor.attentionRangeType = ATTENTION_RANGE_6;
this->alpha = 255;
@@ -677,7 +709,7 @@ void EnMd_Init(Actor* thisx, PlayState* play) {
CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) ||
((play->sceneId == SCENE_LOST_WOODS) && !GET_EVENTCHKINF(EVENTCHKINF_0A))) {
this->actor.home.pos = this->actor.world.pos;
- this->actionFunc = func_80AAB948;
+ this->actionFunc = EnMd_BlockPath;
return;
}
@@ -685,7 +717,7 @@ void EnMd_Init(Actor* thisx, PlayState* play) {
EnMd_SetMovedPos(this, play);
}
- this->actionFunc = func_80AAB874;
+ this->actionFunc = EnMd_Idle;
}
void EnMd_Destroy(Actor* thisx, PlayState* play) {
@@ -693,30 +725,31 @@ void EnMd_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->collider);
}
-void func_80AAB874(EnMd* this, PlayState* play) {
- if (this->skelAnime.animation == &gMidoHandsOnHipsIdleAnim) {
- func_80034F54(play, this->unk_214, this->unk_236, ENMD_LIMB_MAX);
- } else if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (this->unk_20B != 7)) {
- func_80AAA92C(this, 7);
+void EnMd_Idle(EnMd* this, PlayState* play) {
+ if (this->skelAnime.animation == &gMidoIdleAnim) {
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENMD_LIMB_MAX);
+ } else if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) &&
+ (this->animSequence != ENMD_ANIM_SEQ_SURPRISE_TO_IDLE)) {
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_SURPRISE_TO_IDLE);
}
- func_80AAAA24(this);
+ EnMd_UpdateAnimSequence_WithTalking(this);
}
-void func_80AAB8F8(EnMd* this, PlayState* play) {
- if (this->skelAnime.animation == &gMidoHandsOnHipsIdleAnim) {
- func_80034F54(play, this->unk_214, this->unk_236, ENMD_LIMB_MAX);
+void EnMd_Watch(EnMd* this, PlayState* play) {
+ if (this->skelAnime.animation == &gMidoIdleAnim) {
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENMD_LIMB_MAX);
}
- func_80AAA93C(this);
+ EnMd_UpdateAnimSequence(this);
}
-void func_80AAB948(EnMd* this, PlayState* play) {
+void EnMd_BlockPath(EnMd* this, PlayState* play) {
Player* player = GET_PLAYER(play);
f32 temp;
Actor* actorToBlock = &GET_PLAYER(play)->actor;
s16 yaw;
- func_80AAAA24(this);
+ EnMd_UpdateAnimSequence_WithTalking(this);
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
@@ -747,17 +780,17 @@ void func_80AAB948(EnMd* this, PlayState* play) {
SET_EVENTCHKINF(EVENTCHKINF_0A);
}
- func_80AAA92C(this, 3);
- func_80AAA93C(this);
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_WALK_AWAY);
+ EnMd_UpdateAnimSequence(this);
this->waypoint = 1;
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
- this->actionFunc = func_80AABD0C;
+ this->actionFunc = EnMd_Walk;
this->actor.speed = 1.5f;
return;
}
- if (this->skelAnime.animation == &gMidoHandsOnHipsIdleAnim) {
- func_80034F54(play, this->unk_214, this->unk_236, ENMD_LIMB_MAX);
+ if (this->skelAnime.animation == &gMidoIdleAnim) {
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENMD_LIMB_MAX);
}
if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (play->sceneId == SCENE_LOST_WOODS)) {
@@ -765,7 +798,7 @@ void func_80AAB948(EnMd* this, PlayState* play) {
player->stateFlags2 |= PLAYER_STATE2_25;
player->unk_6A8 = &this->actor;
Message_StartOcarina(play, OCARINA_ACTION_CHECK_SARIA);
- this->actionFunc = func_80AABC10;
+ this->actionFunc = EnMd_ListenToOcarina;
return;
}
@@ -775,11 +808,11 @@ void func_80AAB948(EnMd* this, PlayState* play) {
}
}
-void func_80AABC10(EnMd* this, PlayState* play) {
+void EnMd_ListenToOcarina(EnMd* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (play->msgCtx.ocarinaMode >= OCARINA_MODE_04) {
- this->actionFunc = func_80AAB948;
+ this->actionFunc = EnMd_BlockPath;
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
@@ -787,16 +820,16 @@ void func_80AABC10(EnMd* this, PlayState* play) {
this->actor.textId = 0x1067;
Actor_OfferTalk(&this->actor, play, this->collider.dim.radius + 30.0f);
- this->actionFunc = func_80AAB948;
+ this->actionFunc = EnMd_BlockPath;
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
} else {
player->stateFlags2 |= PLAYER_STATE2_23;
}
}
-void func_80AABD0C(EnMd* this, PlayState* play) {
- func_80034F54(play, this->unk_214, this->unk_236, ENMD_LIMB_MAX);
- func_80AAA93C(this);
+void EnMd_Walk(EnMd* this, PlayState* play) {
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENMD_LIMB_MAX);
+ EnMd_UpdateAnimSequence(this);
if (!(EnMd_FollowPath(this, play)) || (this->waypoint != 0)) {
this->actor.shape.rot = this->actor.world.rot;
@@ -811,12 +844,12 @@ void func_80AABD0C(EnMd* this, PlayState* play) {
return;
}
- func_80AAA92C(this, 11);
+ EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_STOP_WALKING);
this->skelAnime.playSpeed = 0.0f;
this->actor.speed = 0.0f;
this->actor.home.pos = this->actor.world.pos;
- this->actionFunc = func_80AAB8F8;
+ this->actionFunc = EnMd_Watch;
}
void EnMd_Update(Actor* thisx, PlayState* play) {
@@ -827,9 +860,9 @@ void EnMd_Update(Actor* thisx, PlayState* play) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
SkelAnime_Update(&this->skelAnime);
EnMd_UpdateEyes(this);
- func_80AAB5A4(this, play);
+ EnMd_UpdateAlphaByDistance(this, play);
Actor_MoveXZGravity(&this->actor);
- func_80AAB158(this, play);
+ EnMd_UpdateTalking(this, play);
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
this->actionFunc(this, play);
}
@@ -853,8 +886,8 @@ s32 EnMd_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
if (((limbIndex == ENMD_LIMB_TORSO) || (limbIndex == ENMD_LIMB_LEFT_UPPER_ARM)) ||
(limbIndex == ENMD_LIMB_RIGHT_UPPER_ARM)) {
- rot->y += Math_SinS(this->unk_214[limbIndex]) * 200.0f;
- rot->z += Math_CosS(this->unk_236[limbIndex]) * 200.0f;
+ rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * FIDGET_AMPLITUDE;
}
return false;
@@ -880,10 +913,10 @@ void EnMd_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_en_md.c", 1280);
if (this->alpha == 255) {
- gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIdx]));
+ gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeTexIndex]));
func_80034BA0(play, &this->skelAnime, EnMd_OverrideLimbDraw, EnMd_PostLimbDraw, &this->actor, this->alpha);
} else if (this->alpha != 0) {
- gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIdx]));
+ gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeTexIndex]));
func_80034CC4(play, &this->skelAnime, EnMd_OverrideLimbDraw, EnMd_PostLimbDraw, &this->actor, this->alpha);
}
diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.h b/src/overlays/actors/ovl_En_Md/z_en_md.h
index 57b693a39a..bfd9b0450a 100644
--- a/src/overlays/actors/ovl_En_Md/z_en_md.h
+++ b/src/overlays/actors/ovl_En_Md/z_en_md.h
@@ -2,7 +2,7 @@
#define Z_EN_MD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMd;
@@ -27,7 +27,12 @@ typedef enum EnMdLimb {
ENMD_LIMB_MAX
} EnMdLimb;
-typedef void (*EnMdActionFunc)(struct EnMd*, PlayState*);
+typedef void (*EnMdActionFunc)(struct EnMd*, struct PlayState*);
+
+#define ENMD_GET_PATH_INDEX(this) PARAMS_GET_S(this->actor.params, 8, 8)
+#define ENMD_GET_PATH_INDEX_NOSHIFT(this) PARAMS_GET_NOSHIFT(this->actor.params, 8, 8)
+
+#define ENMD_PATH_NONE 0xFF
typedef struct EnMd {
/* 0x0000 */ Actor actor;
@@ -35,16 +40,16 @@ typedef struct EnMd {
/* 0x0190 */ EnMdActionFunc actionFunc;
/* 0x0194 */ ColliderCylinder collider;
/* 0x01E0 */ NpcInteractInfo interactInfo;
- /* 0x0208 */ u8 unk_208;
- /* 0x0209 */ u8 unk_209;
- /* 0x020A */ u8 unk_20A;
- /* 0x020B */ u8 unk_20B;
+ /* 0x0208 */ u8 messageEntry; // tracks message state changes, like with `BOX_BREAK` or `TEXTID`
+ /* 0x0209 */ u8 messageState; // last known result of `Message_GetState`
+ /* 0x020A */ u8 animSequenceEntry; // each one changes animation info and waits
+ /* 0x020B */ u8 animSequence;
/* 0x020C */ s16 blinkTimer;
- /* 0x020E */ s16 eyeIdx;
+ /* 0x020E */ s16 eyeTexIndex;
/* 0x0210 */ s16 alpha;
/* 0x0212 */ s16 waypoint;
- /* 0x0214 */ s16 unk_214[ENMD_LIMB_MAX];
- /* 0x0236 */ s16 unk_236[ENMD_LIMB_MAX];
+ /* 0x0214 */ s16 fidgetTableY[ENMD_LIMB_MAX];
+ /* 0x0236 */ s16 fidgetTableZ[ENMD_LIMB_MAX];
/* 0x0258 */ Vec3s jointTable[ENMD_LIMB_MAX];
/* 0x02BE */ Vec3s morphTable[ENMD_LIMB_MAX];
} EnMd; // size = 0x0324
diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/src/overlays/actors/ovl_En_Mk/z_en_mk.c
index 42bb01c703..f035f2d331 100644
--- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c
+++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c
@@ -5,9 +5,20 @@
*/
#include "z_en_mk.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_mk/object_mk.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnMk_Init(Actor* thisx, PlayState* play);
void EnMk_Destroy(Actor* thisx, PlayState* play);
@@ -60,7 +71,7 @@ void EnMk_Init(Actor* thisx, PlayState* play) {
Animation_PlayLoop(&this->skelAnime, &object_mk_Anim_000D88);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
- this->actor.colChkInfo.mass = 0xFF;
+ this->actor.colChkInfo.mass = MASS_IMMOVABLE;
Actor_SetScale(&this->actor, 0.01f);
this->actionFunc = EnMk_Wait;
@@ -81,7 +92,7 @@ void EnMk_Destroy(Actor* thisx, PlayState* play) {
void func_80AACA40(EnMk* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actionFunc = EnMk_Wait;
}
@@ -216,7 +227,7 @@ void EnMk_Wait(EnMk* this, PlayState* play) {
s32 playerExchangeItem;
if (Actor_TalkOfferAccepted(&this->actor, play)) {
- playerExchangeItem = func_8002F368(play);
+ playerExchangeItem = Actor_GetPlayerExchangeItemId(play);
if (this->actor.textId != 0x4018) {
player->actor.textId = this->actor.textId;
diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.h b/src/overlays/actors/ovl_En_Mk/z_en_mk.h
index 5b8a438a00..53df56b76a 100644
--- a/src/overlays/actors/ovl_En_Mk/z_en_mk.h
+++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.h
@@ -2,11 +2,11 @@
#define Z_EN_MK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMk;
-typedef void (*EnMkActionFunc)(struct EnMk*, PlayState*);
+typedef void (*EnMkActionFunc)(struct EnMk*, struct PlayState*);
typedef struct EnMk {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c
index cb4b3b106e..75969dd224 100644
--- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c
+++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c
@@ -5,10 +5,24 @@
*/
#include "z_en_mm.h"
+
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_mm/object_mm.h"
#include "assets/objects/object_link_child/object_link_child.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
typedef enum RunningManAnimIndex {
/* 0 */ RM_ANIM_RUN,
@@ -130,7 +144,7 @@ static EnMmPathInfo sPathInfo[] = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_STOP),
};
void EnMm_ChangeAnim(EnMm* this, s32 index, s32* currentIndex) {
@@ -462,7 +476,7 @@ void func_80AAE294(EnMm* this, PlayState* play) {
}
if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) {
- func_8002F71C(play, &this->actor, 3.0f, this->actor.yawTowardsPlayer, 4.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 3.0f, this->actor.yawTowardsPlayer, 4.0f);
}
}
}
diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.h b/src/overlays/actors/ovl_En_Mm/z_en_mm.h
index 7646e1f044..555073753f 100644
--- a/src/overlays/actors/ovl_En_Mm/z_en_mm.h
+++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.h
@@ -2,11 +2,11 @@
#define Z_EN_MM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMm;
-typedef void (*EnMmActionFunc)(struct EnMm*, PlayState*);
+typedef void (*EnMmActionFunc)(struct EnMm*, struct PlayState*);
typedef struct EnMm {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c
index f4876f70ed..d2f444a193 100644
--- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c
+++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c
@@ -5,10 +5,22 @@
*/
#include "z_en_mm2.h"
+
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_mm/object_mm.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
typedef enum RunningManAnimIndex {
/* 0 */ RM2_ANIM_RUN,
@@ -75,7 +87,7 @@ static AnimationSpeedInfo sAnimationInfo[] = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_STOP),
};
void EnMm2_ChangeAnim(EnMm2* this, s32 index, s32* currentIndex) {
@@ -100,7 +112,7 @@ void EnMm2_ChangeAnim(EnMm2* this, s32 index, s32* currentIndex) {
}
void func_80AAEF70(EnMm2* this, PlayState* play) {
- if (!GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
+ if (!GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED()) {
this->actor.textId = 0x6086;
} else if (GET_INFTABLE(INFTABLE_17F)) {
if (GET_EVENTINF(EVENTINF_MARATHON_ACTIVE)) {
diff --git a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.h b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.h
index a5edeb9cb5..8e48261d7c 100644
--- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.h
+++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.h
@@ -2,11 +2,11 @@
#define Z_EN_MM2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMm2;
-typedef void (*EnMm2ActionFunc)(struct EnMm2*, PlayState*);
+typedef void (*EnMm2ActionFunc)(struct EnMm2*, struct PlayState*);
typedef struct EnMm2 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c
index 35796e1eb7..18ebac054a 100644
--- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c
+++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c
@@ -5,6 +5,15 @@
*/
#include "z_en_ms.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_ms/object_ms.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.h b/src/overlays/actors/ovl_En_Ms/z_en_ms.h
index 53c6bbeaca..9ace7bc2d0 100644
--- a/src/overlays/actors/ovl_En_Ms/z_en_ms.h
+++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.h
@@ -2,11 +2,11 @@
#define Z_EN_MS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMs;
-typedef void (*EnMsActionFunc)(struct EnMs*, PlayState*);
+typedef void (*EnMsActionFunc)(struct EnMs*, struct PlayState*);
typedef struct EnMs {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Mu/z_en_mu.c b/src/overlays/actors/ovl_En_Mu/z_en_mu.c
index 4e50a89e08..7360dd7f18 100644
--- a/src/overlays/actors/ovl_En_Mu/z_en_mu.c
+++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.c
@@ -5,6 +5,15 @@
*/
#include "z_en_mu.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_mu/object_mu.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -58,21 +67,21 @@ void EnMu_SetupAction(EnMu* this, EnMuActionFunc actionFunc) {
void EnMu_Interact(EnMu* this, PlayState* play) {
u8 textIdOffset[] = { 0x42, 0x43, 0x3F, 0x41, 0x3E };
u8 bitmask[] = {
- EVENTINF_20_MASK, EVENTINF_21_MASK, EVENTINF_22_MASK, EVENTINF_23_MASK, EVENTINF_24_MASK,
+ EVENTINF_MASK(EVENTINF_HAGGLING_TOWNSFOLK_MESG_0), EVENTINF_MASK(EVENTINF_HAGGLING_TOWNSFOLK_MESG_1),
+ EVENTINF_MASK(EVENTINF_HAGGLING_TOWNSFOLK_MESG_2), EVENTINF_MASK(EVENTINF_HAGGLING_TOWNSFOLK_MESG_3),
+ EVENTINF_MASK(EVENTINF_HAGGLING_TOWNSFOLK_MESG_4),
};
- u8 textFlags;
+ u8 talkFlags;
s32 randomIndex;
s32 i;
- textFlags = gSaveContext.eventInf[EVENTINF_20_21_22_23_24_INDEX] &
- (EVENTINF_20_MASK | EVENTINF_21_MASK | EVENTINF_22_MASK | EVENTINF_23_MASK | EVENTINF_24_MASK);
- gSaveContext.eventInf[EVENTINF_20_21_22_23_24_INDEX] &=
- ~(EVENTINF_20_MASK | EVENTINF_21_MASK | EVENTINF_22_MASK | EVENTINF_23_MASK | EVENTINF_24_MASK);
+ talkFlags = GET_EVENTINF_ENMU_TALK_FLAGS();
+ RESET_EVENTINF_ENMU_TALK_FLAGS();
randomIndex = (play->state.frames + (s32)(Rand_ZeroOne() * 5.0f)) % 5;
+ // Starting at randomIndex, scan sequentially for the next unspoken message
for (i = 0; i < 5; i++) {
-
- if (!(textFlags & bitmask[randomIndex])) {
+ if (!(talkFlags & bitmask[randomIndex])) {
break;
}
@@ -82,6 +91,7 @@ void EnMu_Interact(EnMu* this, PlayState* play) {
}
}
+ // If all 5 messages have been spoken, reset but prevent the last message from being repeated
if (i == 5) {
if (this->defaultTextId == (textIdOffset[randomIndex] | 0x7000)) {
randomIndex++;
@@ -89,13 +99,12 @@ void EnMu_Interact(EnMu* this, PlayState* play) {
randomIndex = 0;
}
}
- textFlags = 0;
+ talkFlags = 0;
}
- textFlags |= bitmask[randomIndex];
+ talkFlags |= (u8)bitmask[randomIndex];
this->defaultTextId = textIdOffset[randomIndex] | 0x7000;
- textFlags &= EVENTINF_20_MASK | EVENTINF_21_MASK | EVENTINF_22_MASK | EVENTINF_23_MASK | EVENTINF_24_MASK | 0xE0;
- gSaveContext.eventInf[EVENTINF_20_21_22_23_24_INDEX] |= textFlags;
+ SET_EVENTINF_ENMU_TALK_FLAGS(talkFlags);
}
u16 EnMu_GetTextId(PlayState* play, Actor* thisx) {
@@ -152,7 +161,7 @@ void EnMu_Destroy(Actor* thisx, PlayState* play) {
}
void EnMu_Pose(EnMu* this, PlayState* play) {
- func_80034F54(play, this->unk_20A, this->unk_22A, 16);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 16);
}
void EnMu_Update(Actor* thisx, PlayState* play) {
@@ -183,8 +192,8 @@ s32 EnMu_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
if ((limbIndex == 5) || (limbIndex == 6) || (limbIndex == 7) || (limbIndex == 11) || (limbIndex == 12) ||
(limbIndex == 13) || (limbIndex == 14)) {
- rot->y += Math_SinS(this->unk_20A[limbIndex]) * 200.0f;
- rot->z += Math_CosS(this->unk_22A[limbIndex]) * 200.0f;
+ rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * FIDGET_AMPLITUDE;
}
return false;
}
diff --git a/src/overlays/actors/ovl_En_Mu/z_en_mu.h b/src/overlays/actors/ovl_En_Mu/z_en_mu.h
index 22082271e5..417ce242b1 100644
--- a/src/overlays/actors/ovl_En_Mu/z_en_mu.h
+++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.h
@@ -2,7 +2,7 @@
#define Z_EN_MU_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnMu;
@@ -15,8 +15,8 @@ typedef struct EnMu {
/* 0x0194 */ ColliderCylinder collider;
/* 0x01E0 */ NpcInteractInfo npcInfo;
/* 0x0208 */ u16 defaultTextId;
- /* 0x020A */ s16 unk_20A[16];
- /* 0x022A */ s16 unk_22A[17];
+ /* 0x020A */ s16 fidgetTableY[16];
+ /* 0x022A */ s16 fidgetTableZ[16];
} EnMu; // size = 0x024C
#endif
diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c
index 688350196b..2a00eb9ef6 100644
--- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c
+++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c
@@ -5,11 +5,30 @@
*/
#include "z_en_nb.h"
-#include "terminal.h"
-#include "assets/objects/object_nb/object_nb.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/math64.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_nb/object_nb.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum EnNbAction {
/* 0x00 */ NB_CHAMBER_INIT,
@@ -83,7 +102,7 @@ static void* sEyeTextures[] = {
gNabooruEyeClosedTex,
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static s32 D_80AB4318 = 0;
#endif
@@ -194,7 +213,7 @@ void EnNb_UpdateEyes(EnNb* this) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void func_80AB11EC(EnNb* this) {
this->action = NB_ACTION_7;
this->drawMode = NB_DRAW_NOTHING;
@@ -349,7 +368,7 @@ void EnNb_SetupChamberCsImpl(EnNb* this, PlayState* play) {
if ((gSaveContext.chamberCutsceneNum == CHAMBER_CS_SPIRIT) && !IS_CUTSCENE_LAYER) {
player = GET_PLAYER(play);
this->action = NB_CHAMBER_UNDERGROUND;
- play->csCtx.script = D_80AB431C;
+ play->csCtx.script = gSpiritMedallionCs;
gSaveContext.cutsceneTrigger = 2;
Item_Give(play, ITEM_MEDALLION_SPIRIT);
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
@@ -533,7 +552,7 @@ void EnNb_SetupLightOrb(EnNb* this, PlayState* play) {
void EnNb_Hide(EnNb* this, PlayState* play) {
EnNb_SetupHide(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AB1210(this, play);
#endif
}
@@ -543,7 +562,7 @@ void EnNb_Fade(EnNb* this, PlayState* play) {
EnNb_UpdateSkelAnime(this);
EnNb_UpdateEyes(this);
EnNb_CheckToFade(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AB1210(this, play);
#endif
}
@@ -553,7 +572,7 @@ void EnNb_CreateLightOrb(EnNb* this, PlayState* play) {
EnNb_UpdateSkelAnime(this);
EnNb_UpdateEyes(this);
EnNb_SetupLightOrb(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AB1210(this, play);
#endif
}
@@ -676,8 +695,8 @@ void EnNb_CheckKidnapCsMode(EnNb* this, PlayState* play) {
Actor_Kill(&this->actor);
break;
default:
- // "Operation Doesn't Exist!!!!!!!!"
- PRINTF("En_Nb_Kidnap_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Nb_Kidnap_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Nb_Kidnap_Check_DemoMode: There is no such action!!!!!!!!\n"));
break;
}
this->cueId = nextCueId;
@@ -756,8 +775,8 @@ void EnNb_InitDemo6KInConfrontation(EnNb* this, PlayState* play) {
}
void func_80AB2688(EnNb* this, PlayState* play) {
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80AB26C8(EnNb* this) {
@@ -895,8 +914,8 @@ void EnNb_CheckConfrontationCsMode(EnNb* this, PlayState* play) {
EnNb_SetupConfrontationDestroy(this);
break;
default:
- // "En_Nb_Confrontion_Check_DemoMode: Operation doesn't exist!!!!!!!!"
- PRINTF("En_Nb_Confrontion_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Nb_Confrontion_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Nb_Confrontion_Check_DemoMode: There is no such action!!!!!!!!\n"));
break;
}
this->cueId = nextCueId;
@@ -1083,8 +1102,8 @@ void EnNb_CheckCreditsCsModeImpl(EnNb* this, PlayState* play) {
EnNb_SetupCreditsHeadTurn(this);
break;
default:
- // "En_Nb_inEnding_Check_DemoMode: Operation doesn't exist!!!!!!!!"
- PRINTF("En_Nb_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Nb_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Nb_inEnding_Check_DemoMode: There is no such action!!!!!!!!\n"));
break;
}
this->cueId = nextCueId;
@@ -1442,8 +1461,8 @@ void EnNb_Update(Actor* thisx, PlayState* play) {
EnNb* this = (EnNb*)thisx;
if (this->action < 0 || this->action > 30 || sActionFuncs[this->action] == NULL) {
- // "Main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
@@ -1550,8 +1569,8 @@ void EnNb_Draw(Actor* thisx, PlayState* play) {
EnNb* this = (EnNb*)thisx;
if (this->drawMode < 0 || this->drawMode >= 5 || sDrawFuncs[this->drawMode] == NULL) {
- // "Draw mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.h b/src/overlays/actors/ovl_En_Nb/z_en_nb.h
index 997af0f573..3ed08cbf8e 100644
--- a/src/overlays/actors/ovl_En_Nb/z_en_nb.h
+++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.h
@@ -2,7 +2,7 @@
#define Z_EN_NB_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnNb;
@@ -29,8 +29,8 @@ typedef enum EnNbLimb {
/* 0x13 */ NB_LIMB_MAX
} EnNbLimb;
-typedef void (*EnNbActionFunc)(struct EnNb*, PlayState*);
-typedef void (*EnNbDrawFunc)(struct EnNb*, PlayState*);
+typedef void (*EnNbActionFunc)(struct EnNb*, struct PlayState*);
+typedef void (*EnNbDrawFunc)(struct EnNb*, struct PlayState*);
typedef struct EnNb {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.inc.c b/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.inc.c
index 13614e7c31..3c3a68311c 100644
--- a/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.inc.c
+++ b/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.inc.c
@@ -2,11 +2,11 @@
#include "z64cutscene_commands.h"
// clang-format off
-static CutsceneData D_80AB431C[] = {
- CS_BEGIN_CUTSCENE(27, 3011),
+static CutsceneData gSpiritMedallionCs[] = {
+ CS_HEADER(27, 3011),
CS_UNK_DATA_LIST(0x00000020, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(31, 5),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_6_0, 5),
CS_ACTOR_CUE(0x0001, 0, 501, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 501, 502, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 502, 573, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
@@ -16,13 +16,13 @@ static CutsceneData D_80AB431C[] = {
CS_PLAYER_CUE(PLAYER_CUEID_13, 0, 240, 0x0000, 0x1555, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_5, 240, 461, 0x0000, 0x1555, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_19, 461, 1616, 0x0000, 0x9555, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
- CS_ACTOR_CUE_LIST(49, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_7_0, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -16, -121, 0, -16, -121, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_LIGHT_SETTING_LIST(1),
CS_LIGHT_SETTING(0x0003, 0, 3000, 0x0000, 0x00000000, 0xFFFFFF9E, 0x00000000, 0x0000002F, 0xFFFFFF9E, 0x00000000, 0x0000002F, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(39, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_0_5, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, 0, -2, 0, 0, -2, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(40, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_1_4, 3),
CS_ACTOR_CUE(0x0001, 0, 145, 0x0000, 0x0000, 0x0000, -97, 6, -167, -97, 6, -167, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 145, 431, 0x0000, 0x0000, 0x0000, -97, 6, -167, -97, 6, -167, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0003, 431, 1399, 0x0000, 0x0000, 0x0000, -97, 6, -167, -97, 6, -167, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
@@ -31,16 +31,16 @@ static CutsceneData D_80AB431C[] = {
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 765, 795),
CS_TEXT_LIST(10),
CS_TEXT_NONE(0, 345),
- CS_TEXT(0x6035, 345, 353, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x6035, 345, 353, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(353, 374),
- CS_TEXT(0x6039, 374, 399, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x6039, 374, 399, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(399, 400),
- CS_TEXT(0x603A, 400, 424, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x603A, 400, 424, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(424, 760),
- CS_TEXT(0x003F, 760, 765, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x003F, 760, 765, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(765, 825),
- CS_TEXT(0x6036, 825, 835, 0x0000, 0x0000, 0x0000),
- CS_ACTOR_CUE_LIST(62, 1),
+ CS_TEXT(0x6036, 825, 835, CS_TEXT_NORMAL, 0x0000, 0x0000),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_8_0, 1),
CS_ACTOR_CUE(0x0004, 0, 3000, 0x0000, 0x0000, 0x0000, 50, 80, 56, 50, 80, 56, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_DESTINATION(CS_DEST_DESERT_COLOSSUS_FROM_CHAMBER_OF_SAGES, 865, 907),
CS_START_SEQ_LIST(1),
@@ -165,6 +165,6 @@ static CutsceneData D_80AB431C[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 1000, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x013D),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x013F),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x002E),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/src/overlays/actors/ovl_En_Niw/z_en_niw.c
index 508a4e543a..6be5e39db0 100644
--- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c
+++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c
@@ -5,11 +5,32 @@
*/
#include "z_en_niw.h"
-#include "assets/objects/object_niw/object_niw.h"
#include "overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_23)
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_niw/object_niw.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_THROW_ONLY)
void EnNiw_Init(Actor* thisx, PlayState* play);
void EnNiw_Destroy(Actor* thisx, PlayState* play);
@@ -65,8 +86,8 @@ static Vec3f sKakarikoPosList[] = {
};
static s16 sKakarikoFlagList[] = {
- INFTABLE_199_MASK, INFTABLE_19A_MASK, INFTABLE_19B_MASK, INFTABLE_19C_MASK,
- INFTABLE_19D_MASK, INFTABLE_19E_MASK, INFTABLE_19F_MASK,
+ INFTABLE_MASK(INFTABLE_199), INFTABLE_MASK(INFTABLE_19A), INFTABLE_MASK(INFTABLE_19B), INFTABLE_MASK(INFTABLE_19C),
+ INFTABLE_MASK(INFTABLE_19D), INFTABLE_MASK(INFTABLE_19E), INFTABLE_MASK(INFTABLE_19F),
};
static u8 sLowerRiverSpawned = false;
@@ -161,7 +182,7 @@ void EnNiw_Init(Actor* thisx, PlayState* play) {
fabsf(this->actor.world.pos.z - sKakarikoPosList[i].z) < 40.0f) {
this->unk_2AA = i;
PRINTF(VT_FGCOL(YELLOW) " 通常鶏index %d\n" VT_RST, this->unk_2AA);
- if (gSaveContext.save.info.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX] &
+ if (gSaveContext.save.info.infTable[INFTABLE_INDEX_199_19A_19B_19C_19D_19E_19F] &
sKakarikoFlagList[i]) {
this->actor.world.pos.x = 300.0f;
this->actor.world.pos.y = 100.0f;
@@ -1055,8 +1076,13 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
dist = 20.0f;
- if (this->unk_2A8 != 0 && thisx->xyzDistToPlayerSq < SQ(dist) && player->invincibilityTimer == 0) {
- func_8002F6D4(play, &this->actor, 2.0f, thisx->world.rot.y, 0.0f, 0x10);
+#if OOT_VERSION < NTSC_1_1
+ if (this->unk_2A8 != 0 && thisx->xyzDistToPlayerSq < SQ(dist) && !(player->stateFlags1 & PLAYER_STATE1_26))
+#else
+ if (this->unk_2A8 != 0 && thisx->xyzDistToPlayerSq < SQ(dist) && player->invincibilityTimer == 0)
+#endif
+ {
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, thisx->world.rot.y, 0.0f, 0x10);
}
func_80AB747C(this, play);
diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.h b/src/overlays/actors/ovl_En_Niw/z_en_niw.h
index 283b6a52cd..a0f58d0a35 100644
--- a/src/overlays/actors/ovl_En_Niw/z_en_niw.h
+++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.h
@@ -2,11 +2,11 @@
#define Z_EN_NIW_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnNiw;
-typedef void (*EnNiwActionFunc)(struct EnNiw*, PlayState*);
+typedef void (*EnNiwActionFunc)(struct EnNiw*, struct PlayState*);
typedef struct EnNiwEffect {
/* 0x0000 */ u8 type;
diff --git a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c
index dab07959e4..6a2468f93f 100644
--- a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c
+++ b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c
@@ -5,10 +5,24 @@
*/
#include "z_en_niw_girl.h"
-#include "assets/objects/object_gr/object_gr.h"
-#include "terminal.h"
+#include "overlays/actors/ovl_En_Niw/z_en_niw.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_gr/object_gr.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnNiwGirl_Init(Actor* thisx, PlayState* play);
void EnNiwGirl_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.h b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.h
index e63e2df72f..422cf33e48 100644
--- a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.h
+++ b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.h
@@ -2,12 +2,11 @@
#define Z_EN_NIW_GIRL_H
#include "ultra64.h"
-#include "global.h"
-#include "../ovl_En_Niw/z_en_niw.h"
+#include "z64actor.h"
struct EnNiwGirl;
-typedef void (*EnNiwGirlActionFunc)(struct EnNiwGirl*, PlayState*);
+typedef void (*EnNiwGirlActionFunc)(struct EnNiwGirl*, struct PlayState*);
typedef struct EnNiwGirl {
/* 0x0000 */ Actor actor;
@@ -27,7 +26,7 @@ typedef struct EnNiwGirl {
/* 0x027A */ s16 unk_27A;
/* 0x027C */ f32 unk_27C;
/* 0x0280 */ f32 unk_280;
- /* 0x0284 */ EnNiw* chasedEnNiw;
+ /* 0x0284 */ struct EnNiw* chasedEnNiw;
/* 0x0288 */ ColliderCylinder collider;
/* 0x02D4 */ NpcInteractInfo interactInfo;
} EnNiwGirl; // size = 0x02FC
diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c
index 11a788ec5a..1ea6397096 100644
--- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c
+++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c
@@ -1,10 +1,27 @@
#include "z_en_niw_lady.h"
+#include "overlays/actors/ovl_En_Niw/z_en_niw.h"
+
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ane/object_ane.h"
#include "assets/objects/object_os_anime/object_os_anime.h"
-#include "overlays/actors/ovl_En_Niw/z_en_niw.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnNiwLady_Init(Actor* thisx, PlayState* play);
void EnNiwLady_Destroy(Actor* thisx, PlayState* play);
@@ -42,8 +59,8 @@ static s16 sMissingCuccoTextIds[] = {
};
static s16 D_80ABB3B4[] = {
- INFTABLE_199_MASK, INFTABLE_19A_MASK, INFTABLE_19B_MASK, INFTABLE_19C_MASK,
- INFTABLE_19D_MASK, INFTABLE_19E_MASK, INFTABLE_19F_MASK,
+ INFTABLE_MASK(INFTABLE_199), INFTABLE_MASK(INFTABLE_19A), INFTABLE_MASK(INFTABLE_19B), INFTABLE_MASK(INFTABLE_19C),
+ INFTABLE_MASK(INFTABLE_19D), INFTABLE_MASK(INFTABLE_19E), INFTABLE_MASK(INFTABLE_19F),
};
static ColliderCylinderInit sCylinderInit = {
@@ -84,10 +101,11 @@ void EnNiwLady_Init(Actor* thisx, PlayState* play) {
Actor_Kill(thisx);
return;
}
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ ねぇちゃんうっふん ☆☆☆☆☆ %d\n" VT_RST, this->unk_278);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ ねぇちゃんうっふん ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Neechan ugh ☆☆☆☆☆ %d\n") VT_RST,
+ this->unk_278);
PRINTF("\n\n");
this->actionFunc = func_80AB9F24;
- thisx->uncullZoneForward = 600.0f;
+ thisx->cullingVolumeDistance = 600.0f;
}
void EnNiwLady_Destroy(Actor* thisx, PlayState* play) {
@@ -155,9 +173,9 @@ void func_80AB9F24(EnNiwLady* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->aneObjectSlot) &&
Object_IsLoaded(&play->objectCtx, this->osAnimeObjectSlot)) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->aneObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->aneObjectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoLadySkel, NULL, this->jointTable, this->morphTable, 16);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
this->unk_27E = 1;
this->actor.gravity = -3.0f;
Actor_SetScale(&this->actor, 0.01f);
@@ -209,22 +227,23 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) {
if ((fabsf(currentCucco->actor.world.pos.x - 330.0f) < 90.0f) &&
(fabsf(currentCucco->actor.world.pos.z - 1610.0f) < 190.0f)) {
if (this->unk_26C == 0) {
- gSaveContext.save.info.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX] |=
+ gSaveContext.save.info.infTable[INFTABLE_INDEX_199_19A_19B_19C_19D_19E_19F] |=
D_80ABB3B4[currentCucco->unk_2AA];
if (BREG(1) != 0) {
- // "GET inside the chicken fence!"
- PRINTF(VT_FGCOL(GREEN) "☆ 鶏柵内GET!☆ %x\n" VT_RST, D_80ABB3B4[currentCucco->unk_2AA]);
+ PRINTF(VT_FGCOL(GREEN) T("☆ 鶏柵内GET!☆ %x\n", "☆ GET inside the chicken fence! ☆ %x\n")
+ VT_RST,
+ D_80ABB3B4[currentCucco->unk_2AA]);
}
}
this->cuccosInPen++;
} else if (this->unk_26C == 0) {
- gSaveContext.save.info.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX] &=
+ gSaveContext.save.info.infTable[INFTABLE_INDEX_199_19A_19B_19C_19D_19E_19F] &=
~D_80ABB3B4[currentCucco->unk_2AA];
}
}
currentCucco = (EnNiw*)currentCucco->actor.next;
}
- if (OOT_DEBUG && BREG(7) != 0) {
+ if (DEBUG_FEATURES && BREG(7) != 0) {
this->cuccosInPen = BREG(7) - 1;
}
phi_s1 = this->cuccosInPen;
@@ -251,14 +270,24 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) {
}
if (Actor_TalkOfferAccepted(&this->actor, play)) {
PRINTF("\n\n");
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ ねぇちゃん選択\t ☆☆☆☆ %d\n" VT_RST, phi_s1);
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ ねぇちゃんハート ☆☆☆☆ %d\n" VT_RST, this->unk_26C);
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ ねぇちゃん保存 ☆☆☆☆ %d\n" VT_RST, this->unk_26A);
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ ねぇちゃん今\t ☆☆☆☆ %d\n" VT_RST, this->cuccosInPen);
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ this->actor.talk_message ☆☆ %x\n" VT_RST, this->actor.textId);
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ this->message_end_code ☆☆ %d\n" VT_RST, this->unk_262);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ ねぇちゃん選択\t ☆☆☆☆ %d\n", "☆☆☆☆☆ Select your sister\t ☆☆☆☆ %d\n") VT_RST,
+ phi_s1);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ ねぇちゃんハート ☆☆☆☆ %d\n", "☆☆☆☆☆ Neechan Heart ☆☆☆☆ %d\n") VT_RST,
+ this->unk_26C);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ ねぇちゃん保存 ☆☆☆☆ %d\n", "☆☆☆☆☆ Save my sister ☆☆☆☆ %d\n")
+ VT_RST,
+ this->unk_26A);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ ねぇちゃん今\t ☆☆☆☆ %d\n", "☆☆☆☆☆ Neechan now\t ☆☆☆☆ %d\n") VT_RST,
+ this->cuccosInPen);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ this->actor.talk_message ☆☆ %x\n", "☆☆☆☆☆ this->actor.talk_message ☆☆ %x\n")
+ VT_RST,
+ this->actor.textId);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ this->message_end_code ☆☆ %d\n", "☆☆☆☆☆ this->message_end_code ☆☆ %d\n")
+ VT_RST,
+ this->unk_262);
PRINTF("\n\n");
if (MaskReaction_GetTextId(play, MASK_REACTION_SET_CUCCO_LADY) == 0) {
+#if OOT_VERSION >= NTSC_1_1
if (this->actor.textId == 0x503C) {
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
this->unk_26C = 2;
@@ -266,19 +295,23 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) {
this->actionFunc = func_80ABA654;
return;
}
+#endif
this->unk_26E = phi_s1 + 1;
if (phi_s1 == 7) {
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
this->unk_26C = 1;
this->unk_262 = TEXT_STATE_EVENT;
this->unk_26A = this->cuccosInPen;
- PRINTF(VT_FGCOL(CYAN) "☆☆☆☆☆ 柵内BIT変更前 ☆☆ %x\n" VT_RST,
- gSaveContext.save.info.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX]);
- gSaveContext.save.info.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX] &=
- (u16) ~(INFTABLE_199_MASK | INFTABLE_19A_MASK | INFTABLE_19B_MASK | INFTABLE_19C_MASK |
- INFTABLE_19D_MASK | INFTABLE_19E_MASK | INFTABLE_19F_MASK);
- PRINTF(VT_FGCOL(CYAN) "☆☆☆☆☆ 柵内BIT変更後 ☆☆ %x\n" VT_RST,
- gSaveContext.save.info.infTable[INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX]);
+ PRINTF(VT_FGCOL(CYAN) T("☆☆☆☆☆ 柵内BIT変更前 ☆☆ %x\n", "☆☆☆☆☆ Before changing the fence BIT ☆☆ %x\n")
+ VT_RST,
+ gSaveContext.save.info.infTable[INFTABLE_INDEX_199_19A_19B_19C_19D_19E_19F]);
+ gSaveContext.save.info.infTable[INFTABLE_INDEX_199_19A_19B_19C_19D_19E_19F] &=
+ (u16) ~(INFTABLE_MASK(INFTABLE_199) | INFTABLE_MASK(INFTABLE_19A) | INFTABLE_MASK(INFTABLE_19B) |
+ INFTABLE_MASK(INFTABLE_19C) | INFTABLE_MASK(INFTABLE_19D) | INFTABLE_MASK(INFTABLE_19E) |
+ INFTABLE_MASK(INFTABLE_19F));
+ PRINTF(VT_FGCOL(CYAN) T("☆☆☆☆☆ 柵内BIT変更後 ☆☆ %x\n",
+ "☆☆☆☆☆ After changing the BIT inside the fence ☆☆ %x\n") VT_RST,
+ gSaveContext.save.info.infTable[INFTABLE_INDEX_199_19A_19B_19C_19D_19E_19F]);
PRINTF("\n\n");
this->actionFunc = func_80ABA654;
return;
@@ -286,6 +319,13 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) {
if (this->unk_26A != this->cuccosInPen) {
if (this->cuccosInPen < this->unk_26A) {
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
+#if OOT_VERSION < NTSC_1_1
+ if (phi_s1 == 9) {
+ this->unk_26C = 2;
+ this->unk_262 = TEXT_STATE_EVENT;
+ this->actionFunc = func_80ABA654;
+ }
+#endif
} else if (phi_s1 + 1 < 9) {
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
}
@@ -303,8 +343,8 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) {
void func_80ABA654(EnNiwLady* this, PlayState* play) {
if (this->unk_262 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ ハート ☆☆☆☆☆ %d\n" VT_RST, this->unk_26C);
- PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ 爆弾 ☆☆☆☆☆ %d\n" VT_RST, this->unk_272);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ ハート ☆☆☆☆☆ %d\n", "☆☆☆☆☆ heart ☆☆☆☆☆ %d\n") VT_RST, this->unk_26C);
+ PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ 爆弾 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ bomb ☆☆☆☆☆ %d\n") VT_RST, this->unk_272);
PRINTF("\n\n");
this->unk_26E = 0xB;
if (!GET_ITEMGETINF(ITEMGETINF_0C)) {
@@ -327,8 +367,7 @@ static s16 sTradeItemTextIds[] = { 0x503E, 0x503F, 0x5047, 0x5040, 0x5042, 0x504
0x5044, 0x00CF, 0x5045, 0x5042, 0x5027 };
void func_80ABA778(EnNiwLady* this, PlayState* play) {
- // "☆☆☆☆☆ Adult message check ☆☆☆☆☆"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ アダルトメッセージチェック ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ アダルトメッセージチェック ☆☆☆☆☆ \n", "☆☆☆☆☆ Adult message check ☆☆☆☆☆ \n") VT_RST);
this->unk_262 = TEXT_STATE_DONE;
this->unk_273 = 0;
if (!GET_ITEMGETINF(ITEMGETINF_2C)) {
@@ -364,7 +403,7 @@ void func_80ABA878(EnNiwLady* this, PlayState* play) {
this->unk_26E = 11;
}
if (Actor_TalkOfferAccepted(&this->actor, play)) {
- s8 playerExchangeItemId = func_8002F368(play);
+ s8 playerExchangeItemId = Actor_GetPlayerExchangeItemId(play);
if ((playerExchangeItemId == EXCH_ITEM_POCKET_CUCCO) && GET_EVENTCHKINF(EVENTCHKINF_TALON_WOKEN_IN_KAKARIKO)) {
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
@@ -454,7 +493,7 @@ void func_80ABAC84(EnNiwLady* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) != TEXT_STATE_DONE) || !Message_ShouldAdvance(play)) {
return;
}
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n", "☆☆☆☆☆ Normal termination ☆☆☆☆☆ \n") VT_RST);
if (LINK_IS_ADULT) {
if (!GET_ITEMGETINF(ITEMGETINF_2C)) {
SET_ITEMGETINF(ITEMGETINF_2C);
@@ -470,7 +509,7 @@ void func_80ABAC84(EnNiwLady* this, PlayState* play) {
}
void func_80ABAD38(EnNiwLady* this, PlayState* play) {
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 通常メッセージチェック ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 通常メッセージチェック ☆☆☆☆☆ \n", "☆☆☆☆☆ Normal message check ☆☆☆☆☆ \n") VT_RST);
this->unk_262 = TEXT_STATE_DONE;
this->actionFunc = func_80ABAD7C;
}
@@ -508,7 +547,7 @@ void EnNiwLady_Update(Actor* thisx, PlayState* play) {
if (this->unk_276 == 0) {
Math_SmoothStepToS(&this->headRot.y, 0, 5, 3000, 0);
}
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
if (this->osAnimeObjectSlot >= 0) {
if (this->unk_27E != 0) {
if (this->unk_26E != 0) {
@@ -568,8 +607,10 @@ s32 EnNiwLady_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3
}
if (this->unk_275 != 0) {
if ((limbIndex == 8) || (limbIndex == 10) || (limbIndex == 13)) {
- rot->y += (Math_SinS((play->state.frames * ((limbIndex * 0x32) + 0x814))) * 200.0f);
- rot->z += (Math_CosS((play->state.frames * ((limbIndex * 0x32) + 0x940))) * 200.0f);
+ // clang-format off
+ rot->y += Math_SinS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y))) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z))) * FIDGET_AMPLITUDE;
+ // clang-format on
}
}
return false;
diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h
index 7ecb165cca..a6167454da 100644
--- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h
+++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h
@@ -2,11 +2,11 @@
#define Z_EN_NIW_LADY_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnNiwLady;
-typedef void (*EnNiwLadyActionFunc)(struct EnNiwLady*, PlayState*);
+typedef void (*EnNiwLadyActionFunc)(struct EnNiwLady*, struct PlayState*);
typedef struct EnNiwLady {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c
index 5a89a5e2b3..3511a3c45d 100644
--- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c
+++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c
@@ -6,13 +6,23 @@
#include "z_en_nutsball.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_dekunuts/object_dekunuts.h"
#include "assets/objects/object_hintnuts/object_hintnuts.h"
#include "assets/objects/object_shopnuts/object_shopnuts.h"
#include "assets/objects/object_dns/object_dns.h"
#include "assets/objects/object_dnk/object_dnk.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnNutsball_Init(Actor* thisx, PlayState* play);
void EnNutsball_Destroy(Actor* thisx, PlayState* play);
@@ -147,7 +157,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 pad;
- if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
+ if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29)) ||
(this->actionFunc == func_80ABBB34)) {
this->actionFunc(this, play);
@@ -156,7 +166,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play) {
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
Collider_UpdateCylinder(&this->actor, &this->collider);
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.h b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.h
index 00fe77a05c..bcd4e0a936 100644
--- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.h
+++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.h
@@ -2,7 +2,7 @@
#define Z_EN_NUTSBALL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#define NUTSBALL_GET_TYPE(thisx) ((thisx)->params)
@@ -16,7 +16,7 @@ typedef enum EnNutsballType {
struct EnNutsball;
-typedef void (*EnNutsballActionFunc)(struct EnNutsball*, PlayState*);
+typedef void (*EnNutsballActionFunc)(struct EnNutsball*, struct PlayState*);
typedef struct EnNutsball {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c
index 00ba57f4ad..a5f322def6 100644
--- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c
+++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c
@@ -5,9 +5,17 @@
*/
#include "z_en_nwc.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_nwc/object_nwc.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnNwc_Init(Actor* thisx, PlayState* play);
void EnNwc_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.h b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.h
index e927cb3b66..fbb64d1ca2 100644
--- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.h
+++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.h
@@ -2,13 +2,13 @@
#define Z_EN_NWC_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnNwc;
struct EnNwcChick;
-typedef void (*EnNwcUpdateFunc)(struct EnNwc*, PlayState*);
-typedef void (*EnNwcChickFunc)(struct EnNwcChick*, struct EnNwc*, PlayState*);
+typedef void (*EnNwcUpdateFunc)(struct EnNwc*, struct PlayState*);
+typedef void (*EnNwcChickFunc)(struct EnNwcChick*, struct EnNwc*, struct PlayState*);
typedef struct EnNwcChick {
/* 0x00 */ s8 type;
@@ -21,8 +21,8 @@ typedef struct EnNwcChick {
/* 0x2C */ f32 velY;
/* 0x30 */ Vec3s rot;
/* 0x36 */ u16 height;
- /* 0x38 */ CollisionPoly* floorPoly;
- /* 0x44 */ char unk_3C[0x20];
+ /* 0x38 */ struct CollisionPoly* floorPoly;
+ /* 0x3C */ char unk_3C[0x20];
} EnNwcChick; // size = 0x5C
typedef struct EnNwc {
diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.c b/src/overlays/actors/ovl_En_Ny/z_en_ny.c
index 2c04b71db8..5423fad2d2 100644
--- a/src/overlays/actors/ovl_En_Ny/z_en_ny.c
+++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.c
@@ -1,4 +1,19 @@
#include "z_en_ny.h"
+
+#include "libc64/math64.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_ny/object_ny.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -49,7 +64,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[1] = {
},
};
-static ColliderJntSphInit sColliderInit = {
+static ColliderJntSphInit sColliderJntSphInit = {
{
COL_MATERIAL_NONE,
AT_ON | AT_TYPE_ENEMY,
@@ -110,7 +125,7 @@ void EnNy_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.damageTable = &sDamageTable;
this->actor.colChkInfo.health = 2;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderInit, this->elements);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderElements);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
this->unk_1CA = 0;
this->unk_1D0 = 0;
@@ -138,7 +153,7 @@ void EnNy_Init(Actor* thisx, PlayState* play) {
// "Dummy new initials"
PRINTF("ダミーニュウ イニシャル[ %d ] !!\n", this->actor.params);
PRINTF("En_Ny_actor_move2[ %x ] !!\n", EnNy_UpdateUnused);
- this->actor.colChkInfo.mass = 0xFF;
+ this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.update = EnNy_UpdateUnused;
this->collider.base.colMaterial = COL_MATERIAL_METAL;
}
diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.h b/src/overlays/actors/ovl_En_Ny/z_en_ny.h
index 18c109cc51..03cace42fb 100644
--- a/src/overlays/actors/ovl_En_Ny/z_en_ny.h
+++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.h
@@ -2,17 +2,17 @@
#define Z_EN_NY_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnNy;
-typedef void (*EnNyActionFunc)(struct EnNy*, PlayState*);
+typedef void (*EnNyActionFunc)(struct EnNy*, struct PlayState*);
typedef struct EnNy {
/* 0x0000 */ Actor actor;
/* 0x014C */ EnNyActionFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
- /* 0x0170 */ ColliderJntSphElement elements[1];
+ /* 0x0170 */ ColliderJntSphElement colliderElements[1];
/* 0x01B0 */ char unk_1B0[0x18];
/* 0x01C8 */ s16 timer;
/* 0x01CA */ s16 unk_1CA;
diff --git a/src/overlays/actors/ovl_En_OE2/z_en_oe2.c b/src/overlays/actors/ovl_En_OE2/z_en_oe2.c
index f89eb3ce99..f568d1812b 100644
--- a/src/overlays/actors/ovl_En_OE2/z_en_oe2.c
+++ b/src/overlays/actors/ovl_En_OE2/z_en_oe2.c
@@ -6,6 +6,8 @@
#include "z_en_oe2.h"
+#include "z64play.h"
+
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
void EnOE2_Init(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_OE2/z_en_oe2.h b/src/overlays/actors/ovl_En_OE2/z_en_oe2.h
index 635495bb7d..062e103819 100644
--- a/src/overlays/actors/ovl_En_OE2/z_en_oe2.h
+++ b/src/overlays/actors/ovl_En_OE2/z_en_oe2.h
@@ -2,11 +2,11 @@
#define Z_EN_OE2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnOE2;
-typedef void (*EnOE2ActionFunc)(struct EnOE2*, PlayState*);
+typedef void (*EnOE2ActionFunc)(struct EnOE2*, struct PlayState*);
typedef struct EnOE2 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c
index 9d8edf6a1e..eb9941b46b 100644
--- a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c
+++ b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c
@@ -5,11 +5,20 @@
*/
#include "z_en_okarina_effect.h"
+
+#include "printf.h"
+#include "regs.h"
+#include "sequence.h"
#include "terminal.h"
-
+#include "versions.h"
+#include "z64audio.h"
+#include "z64cutscene_flags.h"
+#include "z64debug_display.h"
#include "z64frame_advance.h"
+#include "z64play.h"
+#include "z64save.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnOkarinaEffect_Init(Actor* thisx, PlayState* play);
void EnOkarinaEffect_Destroy(Actor* thisx, PlayState* play);
@@ -38,8 +47,13 @@ void EnOkarinaEffect_Destroy(Actor* thisx, PlayState* play) {
EnOkarinaEffect* this = (EnOkarinaEffect*)thisx;
play->envCtx.precipitation[PRECIP_SOS_MAX] = 0;
+#if OOT_VERSION < PAL_1_0
+ if ((gWeatherMode == WEATHER_MODE_CLEAR) && (play->envCtx.stormRequest == STORM_REQUEST_START))
+#else
if ((gWeatherMode != WEATHER_MODE_RAIN) && (gWeatherMode != WEATHER_MODE_HEAVY_RAIN) &&
- (play->envCtx.stormRequest == STORM_REQUEST_START)) {
+ (play->envCtx.stormRequest == STORM_REQUEST_START))
+#endif
+ {
play->envCtx.stormRequest = STORM_REQUEST_STOP;
Environment_StopStormNatureAmbience(play);
}
@@ -118,7 +132,7 @@ void EnOkarinaEffect_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 0xFF, 0, 0xFF, 0xFF, 4, play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.h b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.h
index f45c4a88ee..bca8c99234 100644
--- a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.h
+++ b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.h
@@ -2,11 +2,11 @@
#define Z_EN_OKARINA_EFFECT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnOkarinaEffect;
-typedef void (*EnOkarinaEffectActionFunc)(struct EnOkarinaEffect*, PlayState*);
+typedef void (*EnOkarinaEffectActionFunc)(struct EnOkarinaEffect*, struct PlayState*);
typedef struct EnOkarinaEffect {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c
index 3fe68d7218..2ec4c8f08f 100644
--- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c
+++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c
@@ -5,11 +5,26 @@
*/
#include "z_en_okarina_tag.h"
+
+#include "attributes.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64debug_display.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/scenes/misc/hakaana_ouke/hakaana_ouke_scene.h"
#include "assets/scenes/overworld/spot02/spot02_scene.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnOkarinaTag_Init(Actor* thisx, PlayState* play);
void EnOkarinaTag_Destroy(Actor* thisx, PlayState* play);
@@ -34,8 +49,8 @@ ActorProfile En_Okarina_Tag_Profile = {
/**/ NULL,
};
-extern CutsceneData D_80ABF9D0[];
-extern CutsceneData D_80ABFB40[];
+extern CutsceneData gWindmillSpinningFasterCs[];
+extern CutsceneData gDoorOfTimeOpeningCs[];
void EnOkarinaTag_Destroy(Actor* thisx, PlayState* play) {
}
@@ -152,10 +167,14 @@ void func_80ABF0CC(EnOkarinaTag* this, PlayState* play) {
if (play->sceneId == SCENE_WATER_TEMPLE) {
play->msgCtx.msgMode = MSGMODE_PAUSED;
}
+#if OOT_VERSION < NTSC_1_1
+ play->msgCtx.ocarinaMode = OCARINA_MODE_04;
+#else
if ((play->sceneId != SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) &&
(play->sceneId != SCENE_GREAT_FAIRYS_FOUNTAIN_SPELLS)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
}
+#endif
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
this->actionFunc = func_80ABEF2C;
return;
@@ -190,7 +209,7 @@ void func_80ABF28C(EnOkarinaTag* this, PlayState* play) {
if ((this->ocarinaSong != 6) || (gSaveContext.save.info.scarecrowSpawnSongSet)) {
if ((this->switchFlag >= 0) && Flags_GetSwitch(play, this->switchFlag)) {
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- } else if (((this->type != 4) || !GET_EVENTCHKINF(EVENTCHKINF_4B)) &&
+ } else if (((this->type != 4) || !GET_EVENTCHKINF(EVENTCHKINF_OPENED_DOOR_OF_TIME)) &&
((this->type != 6) || !GET_EVENTCHKINF(EVENTCHKINF_1D)) &&
(this->actor.xzDistToPlayer < (90.0f + this->interactRange)) &&
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 80.0f)) {
@@ -242,19 +261,19 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
SET_EVENTCHKINF(EVENTCHKINF_39);
break;
case 2:
- play->csCtx.script = D_80ABF9D0;
+ play->csCtx.script = gWindmillSpinningFasterCs;
gSaveContext.cutsceneTrigger = 1;
// Increase pitch by 3 semitones i.e. 2^(3/12), scale tempo by same ratio
// Applies to the windmill bgm once the song of storms fanfare is complete
Audio_SetMainBgmTempoFreqAfterFanfare(1.18921f, 90);
break;
case 4:
- play->csCtx.script = D_80ABFB40;
+ play->csCtx.script = gDoorOfTimeOpeningCs;
gSaveContext.cutsceneTrigger = 1;
break;
case 6:
- play->csCtx.script = LINK_IS_ADULT ? SEGMENTED_TO_VIRTUAL(spot02_scene_Cs_003C80)
- : SEGMENTED_TO_VIRTUAL(spot02_scene_Cs_005020);
+ play->csCtx.script = LINK_IS_ADULT ? SEGMENTED_TO_VIRTUAL(gGraveyardTombOpeningAdultCs)
+ : SEGMENTED_TO_VIRTUAL(gGraveyardTombOpeningChildCs);
gSaveContext.cutsceneTrigger = 1;
SET_EVENTCHKINF(EVENTCHKINF_1D);
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
@@ -319,7 +338,7 @@ void EnOkarinaTag_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
if (this->unk_15A != 0) {
if (!(this->unk_15A & 1)) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.h b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.h
index 1192d0cfce..76ac1581a5 100644
--- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.h
+++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.h
@@ -2,11 +2,11 @@
#define Z_EN_OKARINA_TAG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnOkarinaTag;
-typedef void (*EnOkarinaTagActionFunc)(struct EnOkarinaTag*, PlayState*);
+typedef void (*EnOkarinaTagActionFunc)(struct EnOkarinaTag*, struct PlayState*);
typedef struct EnOkarinaTag {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c
index fe0ecb8ecf..2ff69c780e 100644
--- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c
+++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c
@@ -1,9 +1,10 @@
-#include "z_en_okarina_tag.h"
+#include "sequence.h"
#include "z64cutscene_commands.h"
+#include "z64player.h"
// clang-format off
-CutsceneData D_80ABF9D0[] = {
- CS_BEGIN_CUTSCENE(4, 360),
+CutsceneData gWindmillSpinningFasterCs[] = {
+ CS_HEADER(4, 360),
CS_DESTINATION(CS_DEST_KAKARIKO_VILLAGE_DRAIN_WELL, 200, 201),
CS_CAM_EYE_SPLINE(0, 331),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42700000, 60.0f), 3100, 201, -100, 0x3235),
@@ -25,11 +26,11 @@ CutsceneData D_80ABF9D0[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 3118, 142, 96, 0x2C20),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_SET_FLAG_FAST_WINDMILL, 30, 31, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x00000002, 0xFFFFFFFE, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
-CutsceneData D_80ABFB40[] = {
- CS_BEGIN_CUTSCENE(18, 3000),
+CutsceneData gDoorOfTimeOpeningCs[] = {
+ CS_HEADER(18, 3000),
CS_UNK_DATA_LIST(0x00000021, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFAA, 0xFFFFFFAE, 0x00000000, 0xFFFFFFAA, 0xFFFFFFAE, 0x00000000, 0x00000000, 0x00000000),
CS_PLAYER_CUE_LIST(3),
@@ -38,9 +39,9 @@ CutsceneData D_80ABFB40[] = {
CS_PLAYER_CUE(PLAYER_CUEID_5, 201, 662, 0x0000, 0x8000, 0x0000, 0, -40, 1400, 0, -40, 1400, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_TRIFORCE_FLASH, 510, 611, 0x0000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(48, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_1_5, 1),
CS_ACTOR_CUE(0x0003, 160, 289, 0x0000, 0x0000, 0x0000, 0, 20, 1400, 0, 60, 1400, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x3E9EC27B, 0.31007752f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(48, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_1_5, 3),
CS_ACTOR_CUE(0x0004, 340, 420, 0x0000, 0x0000, 0x0000, 0, 120, 1335, 0, 40, 1335, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xBF800000, -1.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 420, 465, 0x0000, 0x0000, 0x0000, 0, 40, 1335, 0, 16, 1335, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xBF088889, -0.53333336f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 465, 519, 0x0000, 0x0000, 0x0000, 0, 16, 1335, 0, 16, 1335, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
@@ -132,6 +133,6 @@ CutsceneData D_80ABFB40[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0xC9A5),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0xA5A2),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x42700000, 60.0f), 68, -2, 1424, 0xA5BB),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c
index 04450335d0..b7063e0f00 100644
--- a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c
+++ b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c
@@ -1,4 +1,18 @@
#include "z_en_okuta.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_okuta/object_okuta.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
@@ -146,7 +160,7 @@ void EnOkuta_Init(Actor* thisx, PlayState* play) {
} else {
ActorShape_Init(&thisx->shape, 1100.0f, ActorShadow_DrawCircle, 18.0f);
thisx->flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- thisx->flags |= ACTOR_FLAG_4;
+ thisx->flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, thisx, &sProjectileColliderInit);
Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_PROP);
@@ -578,7 +592,7 @@ void EnOkuta_Update(Actor* thisx, PlayState* play2) {
Vec3f prevPos;
s32 canRestorePrevPos;
- if (!(player->stateFlags1 & (PLAYER_STATE1_6 | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
+ if (!(player->stateFlags1 & (PLAYER_STATE1_TALKING | PLAYER_STATE1_DEAD | PLAYER_STATE1_28 | PLAYER_STATE1_29))) {
if (this->actor.params == 0) {
EnOkuta_ColliderCheck(this, play);
if (!WaterBox_GetSurfaceImpl(play, &play->colCtx, this->actor.world.pos.x, this->actor.world.pos.z,
@@ -624,7 +638,7 @@ void EnOkuta_Update(Actor* thisx, PlayState* play2) {
this->collider.dim.radius = sOctorockColliderInit.dim.radius * this->actor.scale.x * 100.0f;
}
if (this->actor.params == 0x10) {
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
}
if (this->actionFunc != EnOkuta_WaitToAppear) {
diff --git a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.h b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.h
index 01c2ba1140..5409481022 100644
--- a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.h
+++ b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.h
@@ -2,11 +2,11 @@
#define Z_EN_OKUTA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnOkuta;
-typedef void (*EnOkutaActionFunc)(struct EnOkuta*, PlayState*);
+typedef void (*EnOkutaActionFunc)(struct EnOkuta*, struct PlayState*);
typedef struct EnOkuta {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
index e72837d85d..9d70c9019a 100644
--- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
+++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
@@ -1,5 +1,23 @@
#include "z_en_ossan.h"
+#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
+#include "overlays/actors/ovl_En_GirlA/z_en_girla.h"
+#include "overlays/actors/ovl_En_Tana/z_en_tana.h"
+
+#include "libc64/qrand.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_ossan/object_ossan.h"
#include "assets/objects/object_oF1d_map/object_oF1d_map.h"
@@ -7,14 +25,13 @@
#include "assets/objects/object_zo/object_zo.h"
#include "assets/objects/object_rs/object_rs.h"
#include "assets/objects/object_ds2/object_ds2.h"
-#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
#include "assets/objects/object_masterkokiri/object_masterkokiri.h"
#include "assets/objects/object_km1/object_km1.h"
#include "assets/objects/object_mastergolon/object_mastergolon.h"
#include "assets/objects/object_masterzoora/object_masterzoora.h"
#include "assets/objects/object_masterkokirihead/object_masterkokirihead.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
#if !PLATFORM_GC
#define CURSOR_COLOR_R 0
@@ -153,7 +170,7 @@ static s16 sItemShelfRot[] = { 0xEAAC, 0xEAAC, 0xEAAC, 0xEAAC, 0x1554, 0x1554, 0
// unused values?
static s16 D_80AC8904[] = { 0x001E, 0x001F, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025 };
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static char* sShopkeeperPrintName[] = {
"コキリの店 ", // "Kokiri Shop"
"薬屋 ", // "Potion Shop"
@@ -593,9 +610,9 @@ void EnOssan_Init(Actor* thisx, PlayState* play) {
//! @bug This check will always evaluate to false, it should be || not &&
if (this->actor.params > OSSAN_TYPE_MASK && this->actor.params < OSSAN_TYPE_KOKIRI) {
Actor_Kill(&this->actor);
- PRINTF(VT_COL(RED, WHITE));
+ PRINTF_COLOR_ERROR();
PRINTF("引数がおかしいよ(arg_data=%d)!!\n", this->actor.params);
- PRINTF(VT_RST);
+ PRINTF_RST();
ASSERT(0, "0", "../z_en_oB1.c", 1246);
return;
}
@@ -622,18 +639,18 @@ void EnOssan_Init(Actor* thisx, PlayState* play) {
if (this->objectSlot1 < 0) {
Actor_Kill(&this->actor);
- PRINTF(VT_COL(RED, WHITE));
+ PRINTF_COLOR_ERROR();
PRINTF("バンクが無いよ!!(%s)\n", sShopkeeperPrintName[this->actor.params]);
- PRINTF(VT_RST);
+ PRINTF_RST();
ASSERT(0, "0", "../z_en_oB1.c", 1284);
return;
}
if (EnOssan_TryGetObjBankIndices(this, play, objectIds) == 0) {
Actor_Kill(&this->actor);
- PRINTF(VT_COL(RED, WHITE));
+ PRINTF_COLOR_ERROR();
PRINTF("予備バンクが無いよ!!(%s)\n", sShopkeeperPrintName[this->actor.params]);
- PRINTF(VT_RST);
+ PRINTF_RST();
ASSERT(0, "0", "../z_en_oB1.c", 1295);
return;
}
@@ -877,18 +894,18 @@ void EnOssan_TryPaybackMask(EnOssan* this, PlayState* play) {
Rupees_ChangeBy(-price);
if (this->happyMaskShopState == OSSAN_HAPPY_STATE_REQUEST_PAYMENT_BUNNY_HOOD) {
- SET_EVENTCHKINF(EVENTCHKINF_8F);
+ SET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_BUNNY_HOOD);
Message_ContinueTextbox(play, 0x70A9);
this->happyMaskShopState = OSSAN_HAPPY_STATE_ALL_MASKS_SOLD;
return;
}
if (this->happyMaskShopState == OSSAN_HAPPY_STATE_REQUEST_PAYMENT_KEATON_MASK) {
- SET_EVENTCHKINF(EVENTCHKINF_8C);
+ SET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_KEATON_MASK);
} else if (this->happyMaskShopState == OSSAN_HAPPY_STATE_REQUEST_PAYMENT_SPOOKY_MASK) {
- SET_EVENTCHKINF(EVENTCHKINF_8E);
+ SET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_SPOOKY_MASK);
} else if (this->happyMaskShopState == OSSAN_HAPPY_STATE_REQUEST_PAYMENT_SKULL_MASK) {
- SET_EVENTCHKINF(EVENTCHKINF_8D);
+ SET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_SKULL_MASK);
}
Message_ContinueTextbox(play, 0x70A7);
@@ -2008,7 +2025,7 @@ void EnOssan_InitBazaarShopkeeper(EnOssan* this, PlayState* play) {
void EnOssan_InitKokiriShopkeeper(EnOssan* this, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gKm1Skel, NULL, NULL, NULL, 0);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
Animation_Change(&this->skelAnime, &object_masterkokiri_Anim_0004A8, 1.0f, 0.0f,
Animation_GetLastFrame(&object_masterkokiri_Anim_0004A8), 0, 0.0f);
this->actor.draw = EnOssan_DrawKokiriShopkeeper;
@@ -2019,7 +2036,7 @@ void EnOssan_InitKokiriShopkeeper(EnOssan* this, PlayState* play) {
void EnOssan_InitGoronShopkeeper(EnOssan* this, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, NULL, NULL, 0);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
Animation_Change(&this->skelAnime, &gGoronShopkeeperAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGoronShopkeeperAnim),
0, 0.0f);
this->actor.draw = EnOssan_DrawGoronShopkeeper;
@@ -2028,7 +2045,7 @@ void EnOssan_InitGoronShopkeeper(EnOssan* this, PlayState* play) {
void EnOssan_InitZoraShopkeeper(EnOssan* this, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, NULL, NULL, NULL, 0);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
Animation_Change(&this->skelAnime, &gZoraShopkeeperAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gZoraShopkeeperAnim),
0, 0.0f);
this->actor.draw = EnOssan_DrawZoraShopkeeper;
@@ -2059,7 +2076,7 @@ u16 EnOssan_SetupHelloDialog(EnOssan* this) {
if (this->actor.params == OSSAN_TYPE_MASK) {
if (INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_SOLD_OUT) {
if (GET_ITEMGETINF(ITEMGETINF_3B)) {
- if (!GET_EVENTCHKINF(EVENTCHKINF_8F)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_BUNNY_HOOD)) {
// Pay back Bunny Hood
this->happyMaskShopState = OSSAN_HAPPY_STATE_REQUEST_PAYMENT_BUNNY_HOOD;
return 0x70C6;
@@ -2068,7 +2085,7 @@ u16 EnOssan_SetupHelloDialog(EnOssan* this) {
}
}
if (GET_ITEMGETINF(ITEMGETINF_3A)) {
- if (!GET_EVENTCHKINF(EVENTCHKINF_8E)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_SPOOKY_MASK)) {
// Pay back Spooky Mask
this->happyMaskShopState = OSSAN_HAPPY_STATE_REQUEST_PAYMENT_SPOOKY_MASK;
return 0x70C5;
@@ -2077,7 +2094,7 @@ u16 EnOssan_SetupHelloDialog(EnOssan* this) {
}
}
if (GET_ITEMGETINF(ITEMGETINF_39)) {
- if (!GET_EVENTCHKINF(EVENTCHKINF_8D)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_SKULL_MASK)) {
// Pay back Skull Mask
this->happyMaskShopState = OSSAN_HAPPY_STATE_REQUEST_PAYMENT_SKULL_MASK;
return 0x70C4;
@@ -2086,7 +2103,7 @@ u16 EnOssan_SetupHelloDialog(EnOssan* this) {
}
}
if (GET_ITEMGETINF(ITEMGETINF_38)) {
- if (!GET_EVENTCHKINF(EVENTCHKINF_8C)) {
+ if (!GET_EVENTCHKINF(EVENTCHKINF_PAID_BACK_KEATON_MASK)) {
// Pay back Keaton Mask
this->happyMaskShopState = OSSAN_HAPPY_STATE_REQUEST_PAYMENT_KEATON_MASK;
return 0x70A5;
@@ -2120,17 +2137,17 @@ void EnOssan_InitActionFunc(EnOssan* this, PlayState* play) {
ShopItem* items;
if (EnOssan_AreShopkeeperObjectsLoaded(this, play)) {
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.objectSlot = this->objectSlot1;
Actor_SetObjectDependency(play, &this->actor);
this->shelves = (EnTana*)Actor_Find(&play->actorCtx, ACTOR_EN_TANA, ACTORCAT_PROP);
if (this->shelves == NULL) {
- PRINTF(VT_COL(RED, WHITE));
+ PRINTF_COLOR_ERROR();
// "Warning!! There are no shelves!!"
PRINTF("★★★ 警告!! 棚がないよ!! ★★★\n");
- PRINTF(VT_RST);
+ PRINTF_RST();
return;
}
@@ -2211,7 +2228,7 @@ void EnOssan_InitActionFunc(EnOssan* this, PlayState* play) {
}
void EnOssan_Obj3ToSeg6(EnOssan* this, PlayState* play) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot3].segment);
}
void EnOssan_MainActionFunc(EnOssan* this, PlayState* play) {
@@ -2381,7 +2398,7 @@ s32 EnOssan_OverrideLimbDrawKokiriShopkeeper(PlayState* play, s32 limbIndex, Gfx
if (limbIndex == 15) {
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[this->objectSlot2].segment);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot2].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlot2].segment);
*dList = gKokiriShopkeeperHeadDL;
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sKokiriShopkeeperEyeTextures[this->eyeTextureIdx]));
}
diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h
index c2101e9d9e..7df4be57b8 100644
--- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h
+++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h
@@ -2,17 +2,15 @@
#define Z_EN_OSSAN_H
#include "ultra64.h"
-#include "global.h"
-#include "overlays/actors/ovl_En_Tana/z_en_tana.h"
-#include "overlays/actors/ovl_En_GirlA/z_en_girla.h"
+#include "z64actor.h"
struct EnOssan;
-typedef void (*EnOssanActionFunc)(struct EnOssan*, PlayState*);
-typedef void (*EnOssanTalkOwnerFunc)(PlayState*);
-typedef void (*EnOssanInitFunc)(struct EnOssan*, PlayState*);
+typedef void (*EnOssanActionFunc)(struct EnOssan*, struct PlayState*);
+typedef void (*EnOssanTalkOwnerFunc)(struct PlayState*);
+typedef void (*EnOssanInitFunc)(struct EnOssan*, struct PlayState*);
typedef s16 (*EnOssanGetGirlAParamsFunc)(s16);
-typedef void (*EnOssanStateFunc)(struct EnOssan*, PlayState*, Player*);
+typedef void (*EnOssanStateFunc)(struct EnOssan*, struct PlayState*, struct Player*);
typedef struct StickDirectionPrompt {
/* 0x00 */ u32 stickColorR;
@@ -37,7 +35,7 @@ typedef struct EnOssan {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ EnOssanActionFunc actionFunc;
- /* 0x0194 */ void (*obj3ToSeg6Func)(struct EnOssan*, PlayState*);
+ /* 0x0194 */ void (*obj3ToSeg6Func)(struct EnOssan*, struct PlayState*);
/* 0x0198 */ ColliderCylinder collider; // unused
/* 0x01E4 */ s16 timer;
/* 0x01E6 */ s16 delayTimer;
@@ -53,11 +51,11 @@ typedef struct EnOssan {
/* 0x01F8 */ void (*blinkFunc)(struct EnOssan*);
/* 0x01FC */ s16 stateFlag;
/* 0x01FE */ s16 tempStateFlag;
- /* 0x0200 */ EnGirlA* shelfSlots[8];
+ /* 0x0200 */ struct EnGirlA* shelfSlots[8];
// Shelves are indexed as such:
/* 7 5 3 1 */
/* 6 4 2 0 */
- /* 0x0220 */ EnTana* shelves;
+ /* 0x0220 */ struct EnTana* shelves;
/* 0x0224 */ s32 stickAccumX;
/* 0x0228 */ s32 stickAccumY;
/* 0x022C */ u8 moveHorizontal;
diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c
index 7a3cf46d80..3ec065c696 100644
--- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c
+++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c
@@ -5,12 +5,33 @@
*/
#include "z_en_owl.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_owl/object_owl.h"
#include "assets/scenes/overworld/spot06/spot06_scene.h"
#include "assets/scenes/overworld/spot16/spot16_scene.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnOwl_Init(Actor* thisx, PlayState* play);
void EnOwl_Destroy(Actor* thisx, PlayState* play);
@@ -99,9 +120,9 @@ static ColliderCylinderInit sOwlCylinderInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 25, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 2400, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 2400, ICHAIN_STOP),
};
void EnOwl_Init(Actor* thisx, PlayState* play) {
@@ -146,7 +167,7 @@ void EnOwl_Init(Actor* thisx, PlayState* play) {
switch (owlType) {
case OWL_DEFAULT:
this->actionFunc = EnOwl_WaitDefault;
- this->actor.uncullZoneForward = 4000.0f;
+ this->actor.cullingVolumeDistance = 4000.0f;
this->unk_40A = 0;
break;
case OWL_OUTSIDE_KOKIRI:
@@ -220,11 +241,11 @@ void EnOwl_Init(Actor* thisx, PlayState* play) {
break;
default:
// Outside kokiri forest
- PRINTF(VT_FGCOL(CYAN));
+ PRINTF_COLOR_CYAN();
PRINTF("no = %d \n", owlType);
PRINTF(T("未完成のフクロウ未完成のフクロウ未完成のフクロウ\n",
"Unfinished owl unfinished owl unfinished owl\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
this->actionFlags |= 2;
this->unk_3EE = 0x20;
this->actionFunc = EnOwl_WaitOutsideKokiri;
@@ -276,7 +297,7 @@ s32 EnOwl_CheckInitTalk(EnOwl* this, PlayState* play, u16 textId, f32 targetDist
this->actor.textId = textId;
distCheck = (flags & 2) ? 200.0f : 1000.0f;
if (this->actor.xzDistToPlayer < targetDist) {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferTalkExchange(&this->actor, play, targetDist, distCheck, EXCH_ITEM_NONE);
}
return false;
@@ -342,7 +363,7 @@ void func_80ACA76C(EnOwl* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
func_80ACA62C(this, play);
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
}
@@ -358,7 +379,7 @@ void func_80ACA7E0(EnOwl* this, PlayState* play) {
func_80ACA71C(this);
this->actionFunc = func_80ACA690;
}
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
}
@@ -552,7 +573,7 @@ void func_80ACB03C(EnOwl* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0);
func_80ACA62C(this, play);
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
}
}
@@ -833,7 +854,7 @@ void func_80ACBAB8(EnOwl* this, PlayState* play) {
}
void func_80ACBC0C(EnOwl* this, PlayState* play) {
- this->actor.flags |= ACTOR_FLAG_5;
+ this->actor.flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
if (this->actor.xzDistToPlayer > 6000.0f && !(this->actionFlags & 0x80)) {
Actor_Kill(&this->actor);
@@ -927,14 +948,14 @@ void func_80ACC00C(EnOwl* this, PlayState* play) {
if (this->actor.xzDistToPlayer < 50.0f) {
if (!Play_InCsMode(play)) {
owlType = PARAMS_GET_S(this->actor.params, 6, 6);
- PRINTF(VT_FGCOL(CYAN));
+ PRINTF_COLOR_CYAN();
PRINTF(T("%dのフクロウ\n", "%d owl\n"), owlType);
- PRINTF(VT_RST);
+ PRINTF_RST();
switch (owlType) {
case 7:
- PRINTF(VT_FGCOL(CYAN));
+ PRINTF_COLOR_CYAN();
PRINTF(T("SPOT 06 の デモがはしった\n", "Demo of SPOT 06 has been completed\n"));
- PRINTF(VT_RST);
+ PRINTF_RST();
play->csCtx.script = SEGMENTED_TO_VIRTUAL(gLakeHyliaOwlCs);
this->actor.draw = NULL;
break;
diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.h b/src/overlays/actors/ovl_En_Owl/z_en_owl.h
index 4f92ef1b41..2f9e0939f8 100644
--- a/src/overlays/actors/ovl_En_Owl/z_en_owl.h
+++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.h
@@ -2,11 +2,11 @@
#define Z_EN_OWL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnOwl;
-typedef void (*EnOwlActionFunc)(struct EnOwl*, PlayState*);
+typedef void (*EnOwlActionFunc)(struct EnOwl*, struct PlayState*);
typedef void (*OwlFunc)(struct EnOwl*);
typedef struct EnOwl {
diff --git a/src/overlays/actors/ovl_En_Part/z_en_part.c b/src/overlays/actors/ovl_En_Part/z_en_part.c
index 1d3eb0fd42..c10a8edcb4 100644
--- a/src/overlays/actors/ovl_En_Part/z_en_part.c
+++ b/src/overlays/actors/ovl_En_Part/z_en_part.c
@@ -5,10 +5,24 @@
*/
#include "z_en_part.h"
+
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_tite/object_tite.h"
#include "assets/objects/object_ik/object_ik.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnPart_Init(Actor* thisx, PlayState* play);
void EnPart_Destroy(Actor* thisx, PlayState* play);
@@ -196,8 +210,9 @@ void func_80ACE5C8(EnPart* this, PlayState* play) {
play->damagePlayer(play, -8);
}
}
- func_8002F71C(play, this->actor.parent, (650.0f - this->actor.parent->xzDistToPlayer) * 0.04f + 4.0f,
- this->actor.parent->world.rot.y, 8.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, this->actor.parent,
+ (650.0f - this->actor.parent->xzDistToPlayer) * 0.04f + 4.0f,
+ this->actor.parent->world.rot.y, 8.0f);
player->invincibilityTimer = prevInvincibilityTimer;
this->timer = 1;
}
diff --git a/src/overlays/actors/ovl_En_Part/z_en_part.h b/src/overlays/actors/ovl_En_Part/z_en_part.h
index 3502d80a80..405e795e75 100644
--- a/src/overlays/actors/ovl_En_Part/z_en_part.h
+++ b/src/overlays/actors/ovl_En_Part/z_en_part.h
@@ -2,11 +2,11 @@
#define Z_EN_PART_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnPart;
-typedef void (*EnPartActionFunc)(struct EnPart*, PlayState*);
+typedef void (*EnPartActionFunc)(struct EnPart*, struct PlayState*);
typedef struct EnPart {
/* 0x000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
index 2543995736..2246b3df16 100644
--- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
+++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
@@ -1,9 +1,27 @@
#include "z_en_peehat.h"
-#include "assets/objects/object_peehat/object_peehat.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_24)
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_peehat/object_peehat.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT)
#define GROUND_HOVER_HEIGHT 75.0f
#define MAX_LARVA 3
@@ -72,7 +90,7 @@ static ColliderCylinderInit sCylinderInit = {
{ 50, 160, -70, { 0, 0, 0 } },
};
-static ColliderJntSphElementInit sJntSphElemInit[1] = {
+static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -96,7 +114,7 @@ static ColliderJntSphInit sJntSphInit = {
COLSHAPE_JNTSPH,
},
1,
- sJntSphElemInit,
+ sJntSphElementsInit,
};
static ColliderQuadInit sQuadInit = {
@@ -201,25 +219,25 @@ void EnPeehat_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.health = 6;
this->actor.colChkInfo.damageTable = &sDamageTable;
this->actor.floorHeight = this->actor.world.pos.y;
- Collider_InitCylinder(play, &this->colCylinder);
- Collider_SetCylinder(play, &this->colCylinder, &this->actor, &sCylinderInit);
- Collider_InitQuad(play, &this->colQuad);
- Collider_SetQuad(play, &this->colQuad, &this->actor, &sQuadInit);
- Collider_InitJntSph(play, &this->colJntSph);
- Collider_SetJntSph(play, &this->colJntSph, &this->actor, &sJntSphInit, this->colJntSphItemList);
+ Collider_InitCylinder(play, &this->colliderCylinder);
+ Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit);
+ Collider_InitQuad(play, &this->colliderQuad);
+ Collider_SetQuad(play, &this->colliderQuad, &this->actor, &sQuadInit);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
this->actor.naviEnemyId = NAVI_ENEMY_PEAHAT;
this->xzDistToRise = 740.0f;
this->xzDistMax = 1200.0f;
- this->actor.uncullZoneForward = 4000.0f;
- this->actor.uncullZoneScale = 800.0f;
- this->actor.uncullZoneDownward = 1800.0f;
+ this->actor.cullingVolumeDistance = 4000.0f;
+ this->actor.cullingVolumeScale = 800.0f;
+ this->actor.cullingVolumeDownward = 1800.0f;
switch (this->actor.params) {
case PEAHAT_TYPE_GROUNDED:
EnPeehat_Ground_SetStateGround(this);
break;
case PEAHAT_TYPE_FLYING:
- this->actor.uncullZoneForward = 4200.0f;
+ this->actor.cullingVolumeDistance = 4200.0f;
this->xzDistToRise = 2800.0f;
this->xzDistMax = 1400.0f;
EnPeehat_Flying_SetStateGround(this);
@@ -228,12 +246,12 @@ void EnPeehat_Init(Actor* thisx, PlayState* play) {
case PEAHAT_TYPE_LARVA:
this->actor.scale.x = this->actor.scale.z = 0.006f;
this->actor.scale.y = 0.003f;
- this->colCylinder.dim.radius = 25;
- this->colCylinder.dim.height = 15;
- this->colCylinder.dim.yShift = -5;
- this->colCylinder.elem.acDmgInfo.dmgFlags = DMG_ARROW | DMG_SLINGSHOT;
- this->colQuad.base.atFlags = AT_ON | AT_TYPE_ENEMY;
- this->colQuad.base.acFlags = AC_ON | AC_TYPE_PLAYER;
+ this->colliderCylinder.dim.radius = 25;
+ this->colliderCylinder.dim.height = 15;
+ this->colliderCylinder.dim.yShift = -5;
+ this->colliderCylinder.elem.acDmgInfo.dmgFlags = DMG_ARROW | DMG_SLINGSHOT;
+ this->colliderQuad.base.atFlags = AT_ON | AT_TYPE_ENEMY;
+ this->colliderQuad.base.acFlags = AC_ON | AC_TYPE_PLAYER;
this->actor.naviEnemyId = NAVI_ENEMY_PEAHAT_LARVA;
EnPeehat_Larva_SetStateSeekPlayer(this);
break;
@@ -244,8 +262,8 @@ void EnPeehat_Destroy(Actor* thisx, PlayState* play) {
EnPeehat* this = (EnPeehat*)thisx;
EnPeehat* parent;
- Collider_DestroyCylinder(play, &this->colCylinder);
- Collider_DestroyJntSph(play, &this->colJntSph);
+ Collider_DestroyCylinder(play, &this->colliderCylinder);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
// If PEAHAT_TYPE_LARVA, decrement total larva spawned
if (this->actor.params > 0) {
@@ -278,7 +296,7 @@ void EnPeehat_SpawnDust(PlayState* play, EnPeehat* this, Vec3f* pos, f32 arg3, s
* Handles being hit when on the ground
*/
void EnPeehat_HitWhenGrounded(EnPeehat* this, PlayState* play) {
- this->colCylinder.base.acFlags &= ~AC_HIT;
+ this->colliderCylinder.base.acFlags &= ~AC_HIT;
if ((play->gameplayFrames & 0xF) == 0) {
Vec3f itemDropPos = this->actor.world.pos;
@@ -290,7 +308,7 @@ void EnPeehat_HitWhenGrounded(EnPeehat* this, PlayState* play) {
} else {
s32 i;
- this->colCylinder.base.acFlags &= ~AC_HIT;
+ this->colliderCylinder.base.acFlags &= ~AC_HIT;
for (i = MAX_LARVA - this->unk_2FA; i > 0; i--) {
Actor* larva =
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_PEEHAT,
@@ -316,7 +334,7 @@ void EnPeehat_Ground_SetStateGround(EnPeehat* this) {
this->unk_2D4 = 0;
this->unk_2FA = 0;
this->state = PEAHAT_STATE_3;
- this->colCylinder.base.acFlags &= ~AC_HIT;
+ this->colliderCylinder.base.acFlags &= ~AC_HIT;
EnPeehat_SetupAction(this, EnPeehat_Ground_StateGround);
}
@@ -341,7 +359,7 @@ void EnPeehat_Ground_StateGround(EnPeehat* this, PlayState* play) {
} else {
Math_SmoothStepToF(&this->scaleShift, 0.0f, 1.0f, 0.005f, 0.0f);
}
- } else if (this->colCylinder.base.acFlags & AC_HIT) {
+ } else if (this->colliderCylinder.base.acFlags & AC_HIT) {
EnPeehat_HitWhenGrounded(this, play);
}
}
@@ -371,7 +389,7 @@ void EnPeehat_Flying_StateGrounded(EnPeehat* this, PlayState* play) {
} else {
Math_SmoothStepToF(&this->scaleShift, 0.0f, 1.0f, 0.005f, 0.0f);
}
- } else if (this->colCylinder.base.acFlags & AC_HIT) {
+ } else if (this->colliderCylinder.base.acFlags & AC_HIT) {
EnPeehat_HitWhenGrounded(this, play);
}
}
@@ -558,22 +576,22 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) {
this->bladeRot += this->bladeRotVel;
Math_SmoothStepToF(&this->scaleShift, 0.075f, 1.0f, 0.005f, 0.0f);
Actor_PlaySfx(&this->actor, NA_SE_EN_PIHAT_SM_FLY - SFX_FLAG);
- if (this->colQuad.base.atFlags & AT_BOUNCED) {
+ if (this->colliderQuad.base.atFlags & AT_BOUNCED) {
this->actor.colChkInfo.health = 0;
- this->colQuad.base.acFlags &= ~AC_BOUNCED;
+ this->colliderQuad.base.acFlags &= ~AC_BOUNCED;
EnPeehat_SetStateAttackRecoil(this);
- } else if ((this->colQuad.base.atFlags & AT_HIT) || (this->colCylinder.base.acFlags & AC_HIT) ||
+ } else if ((this->colliderQuad.base.atFlags & AT_HIT) || (this->colliderCylinder.base.acFlags & AC_HIT) ||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
Player* player = GET_PLAYER(play);
- this->colQuad.base.atFlags &= ~AT_HIT;
- if (!(this->colCylinder.base.acFlags & AC_HIT) && &player->actor == this->colQuad.base.at) {
+ this->colliderQuad.base.atFlags &= ~AT_HIT;
+ if (!(this->colliderCylinder.base.acFlags & AC_HIT) && &player->actor == this->colliderQuad.base.at) {
if (Rand_ZeroOne() > 0.5f) {
this->actor.world.rot.y += 0x2000;
} else {
this->actor.world.rot.y -= 0x2000;
}
this->unk_2D4 = 40;
- } else if (this->colCylinder.base.acFlags & AC_HIT || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
+ } else if (this->colliderCylinder.base.acFlags & AC_HIT || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
Vec3f zeroVec = { 0, 0, 0 };
s32 i;
for (i = 4; i >= 0; i--) {
@@ -584,7 +602,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) {
EffectSsDeadDb_Spawn(play, &pos, &zeroVec, &zeroVec, 40, 7, 255, 255, 255, 255, 255, 0, 0, 1, 9, 1);
}
}
- if (&player->actor != this->colQuad.base.at || this->colCylinder.base.acFlags & AC_HIT) {
+ if (&player->actor != this->colliderQuad.base.at || this->colliderCylinder.base.acFlags & AC_HIT) {
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_PIHAT_SM_DEAD, 1, 1, 40);
}
@@ -877,13 +895,13 @@ void EnPeehat_StateExplode(EnPeehat* this, PlayState* play) {
}
void EnPeehat_Adult_CollisionCheck(EnPeehat* this, PlayState* play) {
- if ((this->colCylinder.base.acFlags & AC_BOUNCED) || (this->colQuad.base.acFlags & AC_BOUNCED)) {
- this->colQuad.base.acFlags &= ~AC_BOUNCED;
- this->colCylinder.base.acFlags &= ~AC_BOUNCED;
- this->colJntSph.base.acFlags &= ~AC_HIT;
- } else if (this->colJntSph.base.acFlags & AC_HIT) {
- this->colJntSph.base.acFlags &= ~AC_HIT;
- Actor_SetDropFlagJntSph(&this->actor, &this->colJntSph, true);
+ if ((this->colliderCylinder.base.acFlags & AC_BOUNCED) || (this->colliderQuad.base.acFlags & AC_BOUNCED)) {
+ this->colliderQuad.base.acFlags &= ~AC_BOUNCED;
+ this->colliderCylinder.base.acFlags &= ~AC_BOUNCED;
+ this->colliderJntSph.base.acFlags &= ~AC_HIT;
+ } else if (this->colliderJntSph.base.acFlags & AC_HIT) {
+ this->colliderJntSph.base.acFlags &= ~AC_HIT;
+ Actor_SetDropFlagJntSph(&this->actor, &this->colliderJntSph, true);
if (this->actor.colChkInfo.damageEffect == PEAHAT_DMG_EFF_NUT ||
this->actor.colChkInfo.damageEffect == PEAHAT_DMG_EFF_LIGHT_ICE_ARROW) {
return;
@@ -946,9 +964,9 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) {
// if PEAHAT_TYPE_GROUNDED
if (thisx->params < 0) {
// Set the Z-Target point on the Peahat's weak point
- thisx->focus.pos.x = this->colJntSph.elements[0].dim.worldSphere.center.x;
- thisx->focus.pos.y = this->colJntSph.elements[0].dim.worldSphere.center.y;
- thisx->focus.pos.z = this->colJntSph.elements[0].dim.worldSphere.center.z;
+ thisx->focus.pos.x = this->colliderJntSph.elements[0].dim.worldSphere.center.x;
+ thisx->focus.pos.y = this->colliderJntSph.elements[0].dim.worldSphere.center.y;
+ thisx->focus.pos.z = this->colliderJntSph.elements[0].dim.worldSphere.center.z;
if (this->state == PEAHAT_STATE_SEEK_PLAYER) {
Math_SmoothStepToS(&thisx->shape.rot.x, 6000, 1, 300, 0);
} else {
@@ -957,21 +975,21 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) {
} else {
thisx->focus.pos = thisx->world.pos;
}
- Collider_UpdateCylinder(thisx, &this->colCylinder);
+ Collider_UpdateCylinder(thisx, &this->colliderCylinder);
if (thisx->colChkInfo.health > 0) {
// If Adult Peahat
if (thisx->params <= 0) {
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colCylinder.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colJntSph.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
if (thisx->colorFilterTimer == 0 || !(thisx->colorFilterParams & 0x4000)) {
if (this->state != PEAHAT_STATE_EXPLODE) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colJntSph.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
}
}
- if (thisx->params != PEAHAT_TYPE_FLYING && this->colQuad.base.atFlags & AT_HIT) {
- this->colQuad.base.atFlags &= ~AT_HIT;
- if (&player->actor == this->colQuad.base.at) {
+ if (thisx->params != PEAHAT_TYPE_FLYING && this->colliderQuad.base.atFlags & AT_HIT) {
+ this->colliderQuad.base.atFlags &= ~AT_HIT;
+ if (&player->actor == this->colliderQuad.base.at) {
EnPeehat_SetStateAttackRecoil(this);
}
}
@@ -979,11 +997,11 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) {
if (this->state == PEAHAT_STATE_15 || this->state == PEAHAT_STATE_SEEK_PLAYER || this->state == PEAHAT_STATE_FLY ||
this->state == PEAHAT_STATE_RETURN_HOME || this->state == PEAHAT_STATE_EXPLODE) {
if (thisx->params != PEAHAT_TYPE_FLYING) {
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colQuad.base);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colQuad.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderQuad.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderQuad.base);
}
// if PEAHAT_TYPE_GROUNDED
- if (thisx->params < 0 && (thisx->flags & ACTOR_FLAG_6)) {
+ if (thisx->params < 0 && (thisx->flags & ACTOR_FLAG_INSIDE_CULLING_VOLUME)) {
for (i = 1; i >= 0; i--) {
poly = NULL;
posB = &this->bladeTip[i];
@@ -995,10 +1013,10 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) {
}
}
} else if (thisx->params != PEAHAT_TYPE_FLYING) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base);
}
} else {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base);
}
Math_SmoothStepToF(&this->scaleShift, 0.0f, 1.0f, 0.001f, 0.0f);
}
@@ -1047,7 +1065,7 @@ void EnPeehat_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r
OPEN_DISPS(play->state.gfxCtx, "../z_en_peehat.c", 1981);
Matrix_Push();
Matrix_Translate(-1000.0f, 0.0f, 0.0f, MTXMODE_APPLY);
- Collider_UpdateSpheres(0, &this->colJntSph);
+ Collider_UpdateSpheres(0, &this->colliderJntSph);
Matrix_Translate(500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
if (this->actor.colorFilterTimer != 0 && (this->actor.colorFilterParams & 0x4000)) {
damageYRot = Math_SinS(this->actor.colorFilterTimer * 0x4E20) * 0.35f;
@@ -1071,11 +1089,11 @@ void EnPeehat_Draw(Actor* thisx, PlayState* play) {
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPeehat_OverrideLimbDraw,
EnPeehat_PostLimbDraw, this);
if (this->actor.speed != 0.0f || this->actor.velocity.y != 0.0f) {
- Matrix_MultVec3f(&D_80AD285C[0], &this->colQuad.dim.quad[1]);
- Matrix_MultVec3f(&D_80AD285C[1], &this->colQuad.dim.quad[0]);
- Matrix_MultVec3f(&D_80AD285C[2], &this->colQuad.dim.quad[3]);
- Matrix_MultVec3f(&D_80AD285C[3], &this->colQuad.dim.quad[2]);
- Collider_SetQuadVertices(&this->colQuad, &this->colQuad.dim.quad[0], &this->colQuad.dim.quad[1],
- &this->colQuad.dim.quad[2], &this->colQuad.dim.quad[3]);
+ Matrix_MultVec3f(&D_80AD285C[0], &this->colliderQuad.dim.quad[1]);
+ Matrix_MultVec3f(&D_80AD285C[1], &this->colliderQuad.dim.quad[0]);
+ Matrix_MultVec3f(&D_80AD285C[2], &this->colliderQuad.dim.quad[3]);
+ Matrix_MultVec3f(&D_80AD285C[3], &this->colliderQuad.dim.quad[2]);
+ Collider_SetQuadVertices(&this->colliderQuad, &this->colliderQuad.dim.quad[0], &this->colliderQuad.dim.quad[1],
+ &this->colliderQuad.dim.quad[2], &this->colliderQuad.dim.quad[3]);
}
}
diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.h b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.h
index 2449fc3405..deb24089f6 100644
--- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.h
+++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.h
@@ -2,7 +2,7 @@
#define Z_EN_PEEHAT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum PeahatType {
/* -1 */ PEAHAT_TYPE_GROUNDED = -1,
@@ -12,7 +12,7 @@ typedef enum PeahatType {
struct EnPeehat;
-typedef void (*EnPeehatActionFunc)(struct EnPeehat*, PlayState*);
+typedef void (*EnPeehatActionFunc)(struct EnPeehat*, struct PlayState*);
typedef struct EnPeehat {
/* 0x0000 */ Actor actor;
@@ -38,10 +38,10 @@ typedef struct EnPeehat {
/* 0x02FA */ s16 unk_2FA; // larva count (PEAHAT_TYPE_FLYING, PEAHAT_TYPE_GROUNDED),
// shape rotation direction (PEAHAT_TYPE_GROUNDED)
/* 0x02FC */ s16 animTimer;
- /* 0x0300 */ ColliderCylinder colCylinder;
- /* 0x034C */ ColliderJntSph colJntSph;
- /* 0x036C */ ColliderJntSphElement colJntSphItemList[1];
- /* 0x03AC */ ColliderQuad colQuad;
+ /* 0x0300 */ ColliderCylinder colliderCylinder;
+ /* 0x034C */ ColliderJntSph colliderJntSph;
+ /* 0x036C */ ColliderJntSphElement colliderJntSphElements[1];
+ /* 0x03AC */ ColliderQuad colliderQuad;
} EnPeehat; // size = 0x042C
#endif
diff --git a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c
index d6c5348862..8110c00f3e 100644
--- a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c
+++ b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c
@@ -5,9 +5,21 @@
*/
#include "z_en_po_desert.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64light.h"
+#include "z64play.h"
+
#include "assets/objects/object_po_field/object_po_field.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_REACT_TO_LENS | ACTOR_FLAG_IGNORE_QUAKE)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_REACT_TO_LENS | ACTOR_FLAG_IGNORE_QUAKE)
void EnPoDesert_Init(Actor* thisx, PlayState* play);
void EnPoDesert_Destroy(Actor* thisx, PlayState* play);
@@ -31,7 +43,7 @@ ActorProfile En_Po_Desert_Profile = {
/**/ EnPoDesert_Draw,
};
-static ColliderCylinderInit sColliderInit = {
+static ColliderCylinderInit sColliderCylinderInit = {
{
COL_MATERIAL_HIT3,
AT_NONE,
@@ -53,7 +65,7 @@ static ColliderCylinderInit sColliderInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_S8(naviEnemyId, NAVI_ENEMY_POE_WASTELAND, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
ICHAIN_F32(lockOnArrowOffset, 3200, ICHAIN_STOP),
};
@@ -64,7 +76,7 @@ void EnPoDesert_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_Init(play, &this->skelAnime, &gPoeFieldSkel, &gPoeFieldFloatAnim, this->jointTable, this->morphTable, 10);
Collider_InitCylinder(play, &this->collider);
- Collider_SetCylinder(play, &this->collider, &this->actor, &sColliderInit);
+ Collider_SetCylinder(play, &this->collider, &this->actor, &sColliderCylinderInit);
this->lightColor.r = 255;
this->lightColor.g = 255;
this->lightColor.b = 210;
@@ -214,7 +226,7 @@ s32 EnPoDesert_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec
mtxScale = this->actionTimer / 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
}
- if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
+ if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) {
*dList = NULL;
}
return false;
@@ -234,7 +246,7 @@ void EnPoDesert_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
color.r = (s16)(rand * 30.0f) + 225;
color.g = (s16)(rand * 100.0f) + 155;
color.b = (s16)(rand * 160.0f) + 95;
- if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
+ if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) {
gDPPipeSync((*gfxP)++);
gDPSetEnvColor((*gfxP)++, color.r, color.g, color.b, 255);
MATRIX_FINALIZE_AND_LOAD((*gfxP)++, play->state.gfxCtx, "../z_en_po_desert.c", 523);
diff --git a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.h b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.h
index aeb2503edc..3f93eeb01d 100644
--- a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.h
+++ b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.h
@@ -2,11 +2,12 @@
#define Z_EN_PO_DESERT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnPoDesert;
-typedef void (*EnPoDesertActionFunc)(struct EnPoDesert*, PlayState*);
+typedef void (*EnPoDesertActionFunc)(struct EnPoDesert*, struct PlayState*);
typedef struct EnPoDesert {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c
index c3c9252c94..30218e20e5 100644
--- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c
+++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c
@@ -5,11 +5,27 @@
*/
#include "z_en_po_field.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_po_field/object_po_field.h"
-#define FLAGS \
- (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_IGNORE_QUAKE)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_IGNORE_QUAKE)
void EnPoField_Init(Actor* thisx, PlayState* play);
void EnPoField_Destroy(Actor* thisx, PlayState* play);
@@ -142,6 +158,9 @@ static EnPoFieldInfo sPoFieldInfo[2] = {
static Vec3f D_80AD714C = { 0.0f, 1400.0f, 0.0f };
+#pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128 ntsc-1.0:128 ntsc-1.1:128" \
+ "ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
+
static Vec3s sSpawnPositions[10];
static u8 sSpawnSwitchFlags[10];
static MtxF sLimb7Mtx;
@@ -193,7 +212,7 @@ void EnPoField_SetupWaitForSpawn(EnPoField* this, PlayState* play) {
Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0);
this->actionTimer = 200;
Actor_SetScale(&this->actor, 0.0f);
- this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_16);
+ this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED);
this->collider.base.acFlags &= ~AC_ON;
this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_ALL;
this->actor.colChkInfo.health = D_80AD70D8.health;
@@ -653,15 +672,15 @@ void func_80AD58D4(EnPoField* this, PlayState* play) {
}
if (this->actionTimer == 0) {
Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH);
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
EnPoField_SetupSoulDisappear(this);
return;
}
if (this->collider.base.ocFlags1 & OC1_HIT) {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play);
} else {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
}
this->actor.world.pos.y = Math_SinS(this->unk_194 * 0x800) * 5.0f + this->actor.home.pos.y;
diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h
index f07a9233d7..17e08ee999 100644
--- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h
+++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h
@@ -2,11 +2,12 @@
#define Z_EN_PO_FIELD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnPoField;
-typedef void (*EnPoFieldActionFunc)(struct EnPoField*, PlayState*);
+typedef void (*EnPoFieldActionFunc)(struct EnPoField*, struct PlayState*);
typedef enum EnPoFieldSize {
EN_PO_FIELD_SMALL,
diff --git a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c
index f0322a91a7..983dbf0d71 100644
--- a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c
+++ b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c
@@ -6,10 +6,28 @@
#include "z_en_po_relay.h"
#include "overlays/actors/ovl_En_Honotrap/z_en_honotrap.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_tk/object_tk.h"
-#define FLAGS \
- (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_16)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED)
void EnPoRelay_Init(Actor* thisx, PlayState* play);
void EnPoRelay_Destroy(Actor* thisx, PlayState* play);
@@ -161,10 +179,10 @@ void EnPoRelay_CorrectY(EnPoRelay* this) {
void EnPoRelay_Idle(EnPoRelay* this, PlayState* play) {
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x100);
if (Actor_TalkOfferAccepted(&this->actor, play)) {
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actionFunc = EnPoRelay_Talk;
} else if (this->actor.xzDistToPlayer < 250.0f) {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
this->actor.textId = this->textId;
Actor_OfferTalk(&this->actor, play, 250.0f);
}
diff --git a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.h b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.h
index 70567ada79..e4a440d940 100644
--- a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.h
+++ b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.h
@@ -2,11 +2,12 @@
#define Z_EN_PO_RELAY_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnPoRelay;
-typedef void (*EnPoRelayActionFunc)(struct EnPoRelay*, PlayState*);
+typedef void (*EnPoRelayActionFunc)(struct EnPoRelay*, struct PlayState*);
typedef struct EnPoRelay {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c
index a648327dc6..ba165bd3ad 100644
--- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c
+++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c
@@ -5,12 +5,30 @@
*/
#include "z_en_po_sisters.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "rand.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "ichain.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_po_sisters/object_po_sisters.h"
-#define FLAGS \
- (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_9 | ACTOR_FLAG_IGNORE_QUAKE | \
- ACTOR_FLAG_14)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_IGNORE_QUAKE | ACTOR_FLAG_CAN_ATTACH_TO_ARROW)
void EnPoSisters_Init(Actor* thisx, PlayState* play);
void EnPoSisters_Destroy(Actor* thisx, PlayState* play);
@@ -210,7 +228,7 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) {
this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER;
func_80AD9AA8(this, play);
} else {
- this->actor.flags &= ~(ACTOR_FLAG_9 | ACTOR_FLAG_14);
+ this->actor.flags &= ~(ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR | ACTOR_FLAG_CAN_ATTACH_TO_ARROW);
this->collider.elem.elemMaterial = ELEM_MATERIAL_UNK4;
this->collider.elem.acDmgInfo.dmgFlags |= DMG_DEKU_NUT;
this->collider.base.ocFlags1 = OC1_NONE;
@@ -701,7 +719,7 @@ void func_80ADA9E8(EnPoSisters* this, PlayState* play) {
}
void func_80ADAAA4(EnPoSisters* this, PlayState* play) {
- if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & ACTOR_FLAG_15)) {
+ if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW)) {
if (this->actor.colChkInfo.health != 0) {
if (this->unk_194 != 0) {
func_80AD96A4(this);
@@ -1216,7 +1234,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) {
this->unk_198 = CLAMP_MIN(temp, 1);
}
if (this->actionFunc == func_80ADA8C0) {
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
}
if (this->unk_199 & 1) {
diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h
index 524f8a867f..bc25e9d035 100644
--- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h
+++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h
@@ -2,11 +2,12 @@
#define Z_EN_PO_SISTERS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnPoSisters;
-typedef void (*EnPoSistersActionFunc)(struct EnPoSisters*, PlayState*);
+typedef void (*EnPoSistersActionFunc)(struct EnPoSisters*, struct PlayState*);
typedef struct EnPoSisters {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c
index 9e8f56721e..fceb18ef7c 100644
--- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c
+++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c
@@ -5,10 +5,26 @@
*/
#include "z_en_poh.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_poh/object_poh.h"
#include "assets/objects/object_po_composer/object_po_composer.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_IGNORE_QUAKE)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_IGNORE_QUAKE)
void EnPoh_Init(Actor* thisx, PlayState* play);
void EnPoh_Destroy(Actor* thisx, PlayState* play);
@@ -74,7 +90,7 @@ static ColliderCylinderInit sCylinderInit = {
{ 20, 40, 20, { 0, 0, 0 } },
};
-static ColliderJntSphElementInit D_80AE1AA0[1] = {
+static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -98,7 +114,7 @@ static ColliderJntSphInit sJntSphInit = {
COLSHAPE_JNTSPH,
},
1,
- D_80AE1AA0,
+ sJntSphElementsInit,
};
static CollisionCheckInfoInit sColChkInfoInit = { 4, 25, 50, 40 };
@@ -188,14 +204,14 @@ void EnPoh_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
- Collider_InitJntSph(play, &this->colliderSph);
- Collider_SetJntSph(play, &this->colliderSph, &this->actor, &sJntSphInit, &this->colliderSphItem);
- this->colliderSph.elements[0].dim.worldSphere.radius = 0;
- this->colliderSph.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x;
- this->colliderSph.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y;
- this->colliderSph.elements[0].dim.worldSphere.center.z = this->actor.world.pos.z;
- Collider_InitCylinder(play, &this->colliderCyl);
- Collider_SetCylinder(play, &this->colliderCyl, &this->actor, &sCylinderInit);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
+ this->colliderJntSph.elements[0].dim.worldSphere.radius = 0;
+ this->colliderJntSph.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x;
+ this->colliderJntSph.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y;
+ this->colliderJntSph.elements[0].dim.worldSphere.center.z = this->actor.world.pos.z;
+ Collider_InitCylinder(play, &this->colliderCylinder);
+ Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
this->unk_194 = 0;
this->unk_195 = 32;
@@ -248,8 +264,8 @@ void EnPoh_Destroy(Actor* thisx, PlayState* play) {
EnPoh* this = (EnPoh*)thisx;
LightContext_RemoveLight(play, &play->lightCtx, this->lightNode);
- Collider_DestroyJntSph(play, &this->colliderSph);
- Collider_DestroyCylinder(play, &this->colliderCyl);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
+ Collider_DestroyCylinder(play, &this->colliderCylinder);
if (this->actor.params == EN_POH_RUPEE) {
D_80AE1A50--;
}
@@ -293,12 +309,12 @@ void func_80ADE28C(EnPoh* this) {
} else {
Animation_PlayOnce(&this->skelAnime, &gPoeComposerDamagedAnim);
}
- if (this->colliderCyl.elem.acHitElem->atDmgInfo.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
- this->actor.world.rot.y = this->colliderCyl.base.ac->world.rot.y;
+ if (this->colliderCylinder.elem.acHitElem->atDmgInfo.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
+ this->actor.world.rot.y = this->colliderCylinder.base.ac->world.rot.y;
} else {
- this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->colliderCyl.base.ac) + 0x8000;
+ this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->colliderCylinder.base.ac) + 0x8000;
}
- this->colliderCyl.base.acFlags &= ~AC_ON;
+ this->colliderCylinder.base.acFlags &= ~AC_ON;
this->actor.speed = 5.0f;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16);
this->actionFunc = func_80ADEECC;
@@ -308,7 +324,7 @@ void func_80ADE368(EnPoh* this) {
Animation_MorphToLoop(&this->skelAnime, this->info->fleeAnim, -5.0f);
this->actor.speed = 5.0f;
this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000;
- this->colliderCyl.base.acFlags |= AC_ON;
+ this->colliderCylinder.base.acFlags |= AC_ON;
this->unk_198 = 200;
this->actionFunc = func_80ADF894;
}
@@ -372,7 +388,7 @@ void EnPoh_SetupDeath(EnPoh* this, PlayState* play) {
this->actor.draw = EnPoh_DrawSoul;
this->actor.shape.shadowDraw = NULL;
Actor_SetScale(&this->actor, 0.01f);
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.gravity = -1.0f;
this->actor.shape.yOffset = 1500.0f;
this->actor.world.pos.y -= 15.0f;
@@ -412,13 +428,13 @@ void func_80ADE6D4(EnPoh* this) {
void EnPoh_Talk(EnPoh* this, PlayState* play) {
this->actor.home.pos.y = this->actor.world.pos.y;
Actor_SetFocus(&this->actor, -10.0f);
- this->colliderCyl.dim.radius = 13;
- this->colliderCyl.dim.height = 30;
- this->colliderCyl.dim.yShift = 0;
- this->colliderCyl.dim.pos.x = this->actor.world.pos.x;
- this->colliderCyl.dim.pos.y = this->actor.world.pos.y - 20.0f;
- this->colliderCyl.dim.pos.z = this->actor.world.pos.z;
- this->colliderCyl.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER;
+ this->colliderCylinder.dim.radius = 13;
+ this->colliderCylinder.dim.height = 30;
+ this->colliderCylinder.dim.yShift = 0;
+ this->colliderCylinder.dim.pos.x = this->actor.world.pos.x;
+ this->colliderCylinder.dim.pos.y = this->actor.world.pos.y - 20.0f;
+ this->colliderCylinder.dim.pos.z = this->actor.world.pos.z;
+ this->colliderCylinder.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER;
if (this->actor.params == EN_POH_FLAT || this->actor.params == EN_POH_SHARP) {
if (CHECK_QUEST_ITEM(QUEST_SONG_SUN)) {
this->actor.textId = 0x5000;
@@ -773,15 +789,15 @@ void func_80ADFE80(EnPoh* this, PlayState* play) {
}
if (this->unk_198 == 0) {
func_80ADE950(this, 1);
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
return;
}
- if (this->colliderCyl.base.ocFlags1 & OC1_HIT) {
- this->actor.flags |= ACTOR_FLAG_16;
+ if (this->colliderCylinder.base.ocFlags1 & OC1_HIT) {
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play);
} else {
- this->actor.flags &= ~ACTOR_FLAG_16;
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCyl.base);
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder.base);
}
this->actor.world.pos.y = Math_SinS(this->unk_195 * 0x800) * 5.0f + this->actor.home.pos.y;
if (this->unk_195 != 0) {
@@ -790,7 +806,7 @@ void func_80ADFE80(EnPoh* this, PlayState* play) {
if (this->unk_195 == 0) {
this->unk_195 = 32;
}
- this->colliderCyl.dim.pos.y = this->actor.world.pos.y - 20.0f;
+ this->colliderCylinder.dim.pos.y = this->actor.world.pos.y - 20.0f;
Actor_SetFocus(&this->actor, -10.0f);
Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, this->info->lightColor.r, this->info->lightColor.g,
@@ -862,8 +878,8 @@ void EnPoh_TalkComposer(EnPoh* this, PlayState* play) {
}
void func_80AE032C(EnPoh* this, PlayState* play) {
- if (this->colliderCyl.base.acFlags & AC_HIT) {
- this->colliderCyl.base.acFlags &= ~AC_HIT;
+ if (this->colliderCylinder.base.acFlags & AC_HIT) {
+ this->colliderCylinder.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Enemy_StartFinishingBlow(play, &this->actor);
@@ -917,14 +933,14 @@ void EnPoh_Update(Actor* thisx, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gPoeComposerSkel, &gPoeComposerFloatAnim, this->jointTable,
this->morphTable, 12);
this->actor.draw = EnPoh_DrawComposer;
- this->colliderSph.elements[0].dim.limb = 9;
- this->colliderSph.elements[0].dim.modelSphere.center.y *= -1;
+ this->colliderJntSph.elements[0].dim.limb = 9;
+ this->colliderJntSph.elements[0].dim.modelSphere.center.y *= -1;
this->actor.shape.rot.y = this->actor.world.rot.y = -0x4000;
- this->colliderCyl.dim.radius = 20;
- this->colliderCyl.dim.height = 55;
- this->colliderCyl.dim.yShift = 15;
+ this->colliderCylinder.dim.radius = 20;
+ this->colliderCylinder.dim.height = 55;
+ this->colliderCylinder.dim.yShift = 15;
}
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
EnPoh_SetupInitialAction(this);
}
}
@@ -987,8 +1003,8 @@ void EnPoh_UpdateLiving(Actor* thisx, PlayState* play) {
Vec3f checkPos;
s32 bgId;
- if (this->colliderSph.base.atFlags & AT_HIT) {
- this->colliderSph.base.atFlags &= ~AT_HIT;
+ if (this->colliderJntSph.base.atFlags & AT_HIT) {
+ this->colliderJntSph.base.atFlags &= ~AT_HIT;
func_80ADE4C8(this);
}
func_80AE032C(this, play);
@@ -996,15 +1012,15 @@ void EnPoh_UpdateLiving(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
Actor_MoveXZGravity(&this->actor);
if (this->actionFunc == EnPoh_Attack && this->unk_198 < 10) {
- this->actor.flags |= ACTOR_FLAG_24;
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base);
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
}
- Collider_UpdateCylinder(&this->actor, &this->colliderCyl);
- if ((this->colliderCyl.base.acFlags & AC_ON) && this->lightColor.a == 255) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCyl.base);
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinder);
+ if ((this->colliderCylinder.base.acFlags & AC_ON) && this->lightColor.a == 255) {
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base);
}
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCyl.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSph.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
Actor_SetFocus(&this->actor, 42.0f);
if (this->actionFunc != func_80ADEECC && this->actionFunc != func_80ADF574) {
if (this->actionFunc == func_80ADF894) {
@@ -1043,7 +1059,7 @@ s32 EnPoh_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
void EnPoh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfxP) {
EnPoh* this = (EnPoh*)thisx;
- Collider_UpdateSpheres(limbIndex, &this->colliderSph);
+ Collider_UpdateSpheres(limbIndex, &this->colliderJntSph);
if (this->actionFunc == func_80ADF15C && this->unk_198 >= 2 && limbIndex == this->info->unk_7) {
MATRIX_FINALIZE_AND_LOAD((*gfxP)++, play->state.gfxCtx, "../z_en_poh.c", 2460);
gSPDisplayList((*gfxP)++, this->info->burnDisplayList);
@@ -1059,9 +1075,9 @@ void EnPoh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
this->actor.world.pos.y = this->unk_368.yw;
this->actor.world.pos.z = this->unk_368.zw;
}
- Lights_PointGlowSetInfo(&this->lightInfo, this->colliderSph.elements[0].dim.worldSphere.center.x,
- this->colliderSph.elements[0].dim.worldSphere.center.y,
- this->colliderSph.elements[0].dim.worldSphere.center.z, this->envColor.r,
+ Lights_PointGlowSetInfo(&this->lightInfo, this->colliderJntSph.elements[0].dim.worldSphere.center.x,
+ this->colliderJntSph.elements[0].dim.worldSphere.center.y,
+ this->colliderJntSph.elements[0].dim.worldSphere.center.z, this->envColor.r,
this->envColor.g, this->envColor.b, this->envColor.a * (200.0f / 255));
}
}
diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.h b/src/overlays/actors/ovl_En_Poh/z_en_poh.h
index 749047b75f..7e7db7d997 100644
--- a/src/overlays/actors/ovl_En_Poh/z_en_poh.h
+++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.h
@@ -2,11 +2,12 @@
#define Z_EN_POH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct EnPoh;
-typedef void (*EnPohActionFunc)(struct EnPoh*, PlayState*);
+typedef void (*EnPohActionFunc)(struct EnPoh*, struct PlayState*);
typedef enum EnPohType {
EN_POH_NORMAL,
@@ -53,9 +54,9 @@ typedef struct EnPoh {
/* 0x02A4 */ EnPohInfo* info;
/* 0x02A8 */ LightNode* lightNode;
/* 0x02AC */ LightInfo lightInfo;
- /* 0x02BC */ ColliderCylinder colliderCyl;
- /* 0x0308 */ ColliderJntSph colliderSph;
- /* 0x0328 */ ColliderJntSphElement colliderSphItem;
+ /* 0x02BC */ ColliderCylinder colliderCylinder;
+ /* 0x0308 */ ColliderJntSph colliderJntSph;
+ /* 0x0328 */ ColliderJntSphElement colliderJntSphElements[1];
/* 0x0368 */ MtxF unk_368;
} EnPoh; // size = 0x03A8
diff --git a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c
index d9441d5506..e984f316f7 100644
--- a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c
+++ b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c
@@ -5,9 +5,14 @@
*/
#include "z_en_pu_box.h"
+
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_pu_box/object_pu_box.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnPubox_Init(Actor* thisx, PlayState* play);
void EnPubox_Destroy(Actor* thisx, PlayState* play);
@@ -48,8 +53,8 @@ void EnPubox_Init(Actor* thisx, PlayState* play) {
this->unk_164 = 1;
thisx->colChkInfo.cylRadius = 20;
thisx->colChkInfo.cylHeight = 50;
- thisx->uncullZoneDownward = 1200.0f;
- thisx->uncullZoneScale = 720.0f;
+ thisx->cullingVolumeDownward = 1200.0f;
+ thisx->cullingVolumeScale = 720.0f;
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 6.0f);
this->dyna.interactFlags = 0;
this->dyna.transformFlags = 0;
diff --git a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h
index 0aa0aaaf4b..cd15c66c18 100644
--- a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h
+++ b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h
@@ -2,7 +2,7 @@
#define Z_EN_PU_BOX_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnPubox;
diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c
index a6592d3c95..af9ed8f112 100644
--- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c
+++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c
@@ -1,7 +1,31 @@
+/*
+ * File: z_en_rd.c
+ * Overlay: ovl_En_Rd
+ * Description: Redead and Gibdo
+ */
+
#include "z_en_rd.h"
+
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_rd/object_rd.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_10)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)
void EnRd_Init(Actor* thisx, PlayState* play);
void EnRd_Destroy(Actor* thisx, PlayState* play);
@@ -361,8 +385,17 @@ void EnRd_WalkToPlayer(EnRd* this, PlayState* play) {
if (this->playerStunWaitTimer == 0) {
if (!(this->rdFlags & 0x80)) {
player->actor.freezeTimer = 40;
- func_8008EEAC(play, &this->actor);
- GET_PLAYER(play)->unk_684 = &this->actor;
+
+ // `player->actor.freezeTimer` gets set above which will prevent Player from updating.
+ // Because of this, he cannot update things related to Z-Targeting.
+ // If Player can't update, `player->zTargetActiveTimer` won't update, which means
+ // the Attention system will not be notified of a new actor lock-on occurring.
+ // So, no reticle will appear. But the camera will still focus on the actor.
+ Player_SetAutoLockOnActor(play, &this->actor);
+
+ // This is redundant, `autoLockOnActor` gets set by `Player_SetAutoLockOnActor` above
+ GET_PLAYER(play)->autoLockOnActor = &this->actor;
+
Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150);
}
@@ -606,7 +639,9 @@ void EnRd_AttemptPlayerFreeze(EnRd* this, PlayState* play) {
if (!(this->rdFlags & 0x80)) {
player->actor.freezeTimer = 60;
Rumble_Request(this->actor.xzDistToPlayer, 255, 20, 150);
- func_8008EEAC(play, &this->actor);
+
+ // The same note mentioned with this function call in `EnRd_WalkToPlayer` applies here too
+ Player_SetAutoLockOnActor(play, &this->actor);
}
Actor_PlaySfx(&this->actor, NA_SE_EN_REDEAD_AIM);
diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.h b/src/overlays/actors/ovl_En_Rd/z_en_rd.h
index 4c46a5e1e1..5e9f328dee 100644
--- a/src/overlays/actors/ovl_En_Rd/z_en_rd.h
+++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.h
@@ -2,11 +2,11 @@
#define Z_EN_RD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnRd;
-typedef void (*EnRdActionFunc)(struct EnRd*, PlayState*);
+typedef void (*EnRdActionFunc)(struct EnRd*, struct PlayState*);
#define REDEAD_GET_RDFLAGS(thisx) PARAMS_GET_S((thisx)->params, 8, 8)
diff --git a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c
index 69f9bc1d7f..856958e81e 100644
--- a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c
+++ b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c
@@ -7,10 +7,28 @@
#include "z_en_reeba.h"
#include "overlays/actors/ovl_En_Encount1/z_en_encount1.h"
+
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "sfx.h"
#include "terminal.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64debug_display.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_reeba/object_reeba.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_LOCK_ON_DISABLED)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_LOCK_ON_DISABLED)
void EnReeba_Init(Actor* thisx, PlayState* play);
void EnReeba_Destroy(Actor* thisx, PlayState* play);
@@ -695,7 +713,7 @@ void EnReeba_Draw(Actor* thisx, PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx, "../z_en_reeba.c", 1088);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
Vec3f debugPos;
debugPos.x = (Math_SinS(this->actor.world.rot.y) * 30.0f) + this->actor.world.pos.x;
diff --git a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.h b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.h
index 36173bf355..a357af86ef 100644
--- a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.h
+++ b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.h
@@ -2,11 +2,11 @@
#define Z_EN_REEBA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnReeba;
-typedef void (*EnReebaActionFunc)(struct EnReeba*, PlayState*);
+typedef void (*EnReebaActionFunc)(struct EnReeba*, struct PlayState*);
typedef struct EnReeba {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c
index 8aa760ecaf..871cf6668f 100644
--- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c
+++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c
@@ -6,7 +6,16 @@
#include "z_en_river_sound.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnRiverSound_Init(Actor* thisx, PlayState* play);
void EnRiverSound_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.h b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.h
index c647185217..4332af6021 100644
--- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.h
+++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.h
@@ -2,7 +2,7 @@
#define Z_EN_RIVER_SOUND_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnRiverSound;
diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c
index ad648f5eb1..ff57761161 100644
--- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c
+++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c
@@ -5,10 +5,22 @@
*/
#include "z_en_rl.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_rl/object_rl.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnRl_Init(Actor* thisx, PlayState* play);
void EnRl_Destroy(Actor* thisx, PlayState* play);
@@ -50,7 +62,7 @@ void func_80AE72D0(EnRl* this) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void func_80AE7358(EnRl* this) {
Animation_Change(&this->skelAnime, &object_rl_Anim_000A3C, 1.0f, 0.0f,
Animation_GetLastFrame(&object_rl_Anim_000A3C), ANIMMODE_LOOP, 0.0f);
@@ -272,7 +284,7 @@ void func_80AE7BF8(EnRl* this, s32 arg1) {
void func_80AE7C64(EnRl* this, PlayState* play) {
func_80AE7954(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AE73D8(this, play);
#endif
}
@@ -282,7 +294,7 @@ void func_80AE7C94(EnRl* this, PlayState* play) {
func_80AE7494(this);
func_80AE72D0(this);
func_80AE79A4(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AE73D8(this, play);
#endif
}
@@ -294,7 +306,7 @@ void func_80AE7CE8(EnRl* this, PlayState* play) {
temp = func_80AE7494(this);
func_80AE72D0(this);
func_80AE7BF8(this, temp);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AE73D8(this, play);
#endif
}
@@ -304,7 +316,7 @@ void func_80AE7D40(EnRl* this, PlayState* play) {
func_80AE7494(this);
func_80AE72D0(this);
func_80AE7AF8(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AE73D8(this, play);
#endif
}
@@ -339,7 +351,8 @@ void EnRl_Update(Actor* thisx, PlayState* play) {
EnRl* this = (EnRl*)thisx;
if ((this->action < 0) || (this->action > 7) || (sActionFuncs[this->action] == NULL)) {
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sActionFuncs[this->action](this, play);
@@ -388,7 +401,8 @@ void EnRl_Draw(Actor* thisx, PlayState* play) {
EnRl* this = (EnRl*)thisx;
if (this->drawConfig < 0 || this->drawConfig >= 3 || sDrawFuncs[this->drawConfig] == NULL) {
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sDrawFuncs[this->drawConfig](this, play);
diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.h b/src/overlays/actors/ovl_En_Rl/z_en_rl.h
index 9aa6b9ae6c..9ce9949aa6 100644
--- a/src/overlays/actors/ovl_En_Rl/z_en_rl.h
+++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.h
@@ -2,12 +2,12 @@
#define Z_EN_RL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnRl;
-typedef void (*EnRlActionFunc)(struct EnRl*, PlayState*);
-typedef void (*EnRlDrawFunc)(struct EnRl*, PlayState*);
+typedef void (*EnRlActionFunc)(struct EnRl*, struct PlayState*);
+typedef void (*EnRlDrawFunc)(struct EnRl*, struct PlayState*);
typedef struct EnRl {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c
index 985083560c..b4e136a75a 100644
--- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c
+++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c
@@ -5,10 +5,30 @@
*/
#include "z_en_rr.h"
-#include "assets/objects/object_rr/object_rr.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10)
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_rr/object_rr.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)
#define RR_MESSAGE_SHIELD (1 << 0)
#define RR_MESSAGE_TUNIC (1 << 1)
@@ -76,7 +96,7 @@ ActorProfile En_Rr_Profile = {
/**/ EnRr_Draw,
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static char* sDropNames[] = {
// "type 7", "small magic jar", "arrow", "fairy", "20 rupees", "50 rupees"
"タイプ7 ", "魔法の壷小", "矢 ", "妖精 ", "20ルピー ", "50ルピー ",
@@ -324,7 +344,7 @@ void EnRr_SetupReleasePlayer(EnRr* this, PlayState* play) {
break;
}
PRINTF(VT_FGCOL(YELLOW) "%s[%d] : Rr_Catch_Cancel" VT_RST "\n", "../z_en_rr.c", 650);
- func_8002F6D4(play, &this->actor, 4.0f, this->actor.shape.rot.y, 12.0f, 8);
+ Actor_SetPlayerKnockbackLarge(play, &this->actor, 4.0f, this->actor.shape.rot.y, 12.0f, 8);
if (this->actor.colorFilterTimer == 0) {
this->actionFunc = EnRr_Approach;
Actor_PlaySfx(&this->actor, NA_SE_EN_LIKE_THROW);
@@ -480,11 +500,16 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
if (this->actor.colChkInfo.health == 0) {
this->dropType = RR_DROP_RANDOM_RUPEE;
}
+#if OOT_VERSION < NTSC_1_1
+ this->effectTimer = 20;
+ Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU, 80);
+#else
if (this->actor.colorFilterTimer == 0) {
this->effectTimer = 20;
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_XLU,
80);
}
+#endif
EnRr_SetupStunned(this);
return;
case RR_DMG_LIGHT_MAGIC: // Unused light magic
diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.h b/src/overlays/actors/ovl_En_Rr/z_en_rr.h
index 44ac232668..f0ed5b5c30 100644
--- a/src/overlays/actors/ovl_En_Rr/z_en_rr.h
+++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.h
@@ -2,11 +2,11 @@
#define Z_EN_RR_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnRr;
-typedef void (*EnRrActionFunc)(struct EnRr*, PlayState*);
+typedef void (*EnRrActionFunc)(struct EnRr*, struct PlayState*);
typedef struct EnRrBodySegment {
/* 0x00 */ f32 height;
diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
index e07536cbde..85ef778479 100644
--- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
+++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
@@ -5,11 +5,32 @@
*/
#include "z_en_ru1.h"
-#include "assets/objects/object_ru1/object_ru1.h"
-#include "terminal.h"
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4 | ACTOR_FLAG_26)
+#include "libc64/math64.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_ru1/object_ru1.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_CAN_PRESS_SWITCHES)
void EnRu1_Init(Actor* thisx, PlayState* play);
void EnRu1_Destroy(Actor* thisx, PlayState* play);
@@ -340,7 +361,7 @@ s32 func_80AEB1B4(PlayState* play) {
return Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void func_80AEB1D8(EnRu1* this) {
this->action = 36;
this->drawConfig = 0;
@@ -391,17 +412,17 @@ s32 EnRu1_UpdateSkelAnime(EnRu1* this) {
}
void func_80AEB364(EnRu1* this, PlayState* play) {
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80AEB3A4(EnRu1* this, PlayState* play) {
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
func_80AEB364(this, play);
}
void func_80AEB3CC(EnRu1* this) {
- this->skelAnime.moveFlags &= ~ANIM_FLAG_UPDATE_XZ;
+ this->skelAnime.movementFlags &= ~ANIM_FLAG_UPDATE_XZ;
}
void func_80AEB3DC(EnRu1* this, PlayState* play) {
@@ -462,8 +483,8 @@ void func_80AEB6E0(EnRu1* this, PlayState* play) {
SkelAnime* skelAnime = &this->skelAnime;
if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) {
- skelAnime->moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
- AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f);
+ skelAnime->movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, skelAnime, 1.0f);
}
}
@@ -473,13 +494,13 @@ void func_80AEB738(EnRu1* this, PlayState* play) {
skelAnime->baseTransl = skelAnime->jointTable[0];
skelAnime->prevTransl = skelAnime->jointTable[0];
if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) {
- skelAnime->moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
- AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f);
+ skelAnime->movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, skelAnime, 1.0f);
}
}
void func_80AEB7D0(EnRu1* this) {
- this->skelAnime.moveFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
+ this->skelAnime.movementFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
}
f32 func_80AEB7E0(CsCmdActorCue* cue, PlayState* play) {
@@ -861,7 +882,7 @@ void func_80AEC780(EnRu1* this, PlayState* play) {
(!(player->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21))) &&
(player->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
- play->csCtx.script = D_80AF0880;
+ play->csCtx.script = gRutoFirstMeetingCs;
gSaveContext.cutsceneTrigger = 1;
player->speedXZ = 0.0f;
this->action = 8;
@@ -1551,7 +1572,7 @@ s32 func_80AEE394(EnRu1* this, PlayState* play) {
if (dynaPolyActor != NULL && dynaPolyActor->actor.id == ACTOR_BG_BDAN_OBJECTS &&
dynaPolyActor->actor.params == 0 && !Player_InCsMode(play) && play->msgCtx.msgLength == 0) {
func_80AEE02C(this);
- play->csCtx.script = D_80AF10A4;
+ play->csCtx.script = gRutoObtainingSapphireCs;
gSaveContext.cutsceneTrigger = 1;
this->action = 36;
this->drawConfig = 0;
@@ -1624,7 +1645,7 @@ s32 func_80AEE6D0(EnRu1* this, PlayState* play) {
func_80AED600(this);
this->action = 34;
this->unk_26C = 0.0f;
- play->csCtx.script = D_80AF1728;
+ play->csCtx.script = gRutoFoundSapphireCs;
gSaveContext.cutsceneTrigger = 1;
}
this->roomNum3 = curRoomNum;
@@ -1657,7 +1678,7 @@ void func_80AEE7C4(EnRu1* this, PlayState* play) {
*unk_370 = 0.0f;
} else {
player = GET_PLAYER(play);
- if (player->stateFlags2 & PLAYER_STATE2_28) {
+ if (player->stateFlags2 & PLAYER_STATE2_IDLE_FIDGET) {
this->unk_370 += 1.0f;
if (this->action != 32) {
if (*unk_370 > 30.0f) {
@@ -2022,7 +2043,7 @@ void func_80AEF890(EnRu1* this, PlayState* play) {
s32 pad[2];
s8 curRoomNum;
- if (!(OOT_DEBUG && IS_CUTSCENE_LAYER) && EnRu1_IsCsStateIdle(play)) {
+ if (!(DEBUG_FEATURES && IS_CUTSCENE_LAYER) && EnRu1_IsCsStateIdle(play)) {
curRoomNum = play->roomCtx.curRoom.num;
SET_INFTABLE(INFTABLE_145);
Flags_SetSwitch(play, func_80AEADE0(this));
@@ -2036,7 +2057,11 @@ void func_80AEF930(EnRu1* this, PlayState* play) {
if (func_80AEB104(this) == 3) {
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY;
this->actor.textId = 0x4048;
+#if !OOT_PAL_N64
Message_ContinueTextbox(play, this->actor.textId);
+#else
+ Message_StartTextbox(play, this->actor.textId, NULL);
+#endif
func_80AEF4A8(this, play);
this->action = 43;
this->drawConfig = 0;
@@ -2055,7 +2080,7 @@ void func_80AEF9D8(EnRu1* this, PlayState* play) {
EnRu1_UpdateSkelAnime(this);
EnRu1_UpdateEyes(this);
func_80AEF624(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AEB220(this, play);
#endif
}
@@ -2071,7 +2096,7 @@ void func_80AEFA2C(EnRu1* this, PlayState* play) {
func_80AEF5B8(this);
func_80AEF40C(this);
func_80AEF728(this, something);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AEB220(this, play);
#endif
}
@@ -2081,7 +2106,7 @@ void func_80AEFAAC(EnRu1* this, PlayState* play) {
func_80AEAECC(this, play);
EnRu1_UpdateSkelAnime(this);
func_80AEF79C(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AEB220(this, play);
#endif
}
@@ -2094,7 +2119,7 @@ void func_80AEFB04(EnRu1* this, PlayState* play) {
something = EnRu1_UpdateSkelAnime(this);
EnRu1_UpdateEyes(this);
func_80AEF820(this, something);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AEB220(this, play);
#endif
}
@@ -2105,7 +2130,7 @@ void func_80AEFB68(EnRu1* this, PlayState* play) {
EnRu1_UpdateSkelAnime(this);
EnRu1_UpdateEyes(this);
func_80AEF890(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80AEB220(this, play);
#endif
}
@@ -2150,7 +2175,7 @@ void func_80AEFCE8(EnRu1* this, PlayState* play) {
void func_80AEFD38(EnRu1* this, PlayState* play) {
if (GET_EVENTCHKINF(EVENTCHKINF_37) && LINK_IS_CHILD) {
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->action = 44;
this->drawConfig = 1;
} else {
@@ -2230,7 +2255,7 @@ void func_80AEFF94(EnRu1* this, PlayState* play) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void func_80AF0050(EnRu1* this, PlayState* play) {
func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0);
this->action = 36;
@@ -2244,8 +2269,8 @@ void EnRu1_Update(Actor* thisx, PlayState* play) {
EnRu1* this = (EnRu1*)thisx;
if (this->action < 0 || this->action >= ARRAY_COUNT(sActionFuncs) || sActionFuncs[this->action] == NULL) {
- // "Main mode is improper!"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
@@ -2281,7 +2306,7 @@ void EnRu1_Init(Actor* thisx, PlayState* play) {
case 6:
func_80AEFF94(this, play);
break;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
case 10:
func_80AF0050(this, play);
break;
@@ -2398,8 +2423,8 @@ void EnRu1_Draw(Actor* thisx, PlayState* play) {
EnRu1* this = (EnRu1*)thisx;
if (this->drawConfig < 0 || this->drawConfig >= ARRAY_COUNT(sDrawFuncs) || sDrawFuncs[this->drawConfig] == NULL) {
- // "Draw mode is improper!"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sDrawFuncs[this->drawConfig](this, play);
diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h
index 8223bfda43..8778174ef5 100644
--- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h
+++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h
@@ -2,16 +2,16 @@
#define Z_EN_RU1_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
struct EnRu1;
-typedef void (*EnRu1ActionFunc)(struct EnRu1*, PlayState*);
-typedef void (*EnRu1DrawFunc)(struct EnRu1*, PlayState*);
-typedef void (*EnRu1PreLimbDrawFunc)(struct EnRu1*, PlayState*, s32, Vec3s*);
+typedef void (*EnRu1ActionFunc)(struct EnRu1*, struct PlayState*);
+typedef void (*EnRu1DrawFunc)(struct EnRu1*, struct PlayState*);
+typedef void (*EnRu1PreLimbDrawFunc)(struct EnRu1*, struct PlayState*, s32, Vec3s*);
typedef struct EnRu1 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.inc.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.inc.c
index 6e8c8f4d31..bce6bf6cac 100644
--- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.inc.c
+++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1_cutscene_data.inc.c
@@ -2,8 +2,8 @@
#include "z64cutscene_commands.h"
// clang-format off
-static CutsceneData D_80AF0880[] = {
- CS_BEGIN_CUTSCENE(15, 1306),
+static CutsceneData gRutoFirstMeetingCs[] = {
+ CS_HEADER(15, 1306),
CS_PLAYER_CUE_LIST(10),
CS_PLAYER_CUE(PLAYER_CUEID_39, 0, 50, 0x0000, 0x6C16, 0x0000, 12, -340, -2810, 12, -340, -2810, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_3, 50, 70, 0x0000, 0x6C16, 0x0000, 12, -340, -2810, 12, -340, -2810, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
@@ -15,7 +15,7 @@ static CutsceneData D_80AF0880[] = {
CS_PLAYER_CUE(PLAYER_CUEID_3, 259, 276, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 100, -340, -2991, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_2, 276, 297, 0x0000, 0x6C16, 0x0000, 100, -340, -2991, 182, -340, -3132, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_5, 297, 843, 0x0000, 0x6C16, 0x0000, 182, -340, -3132, 182, -340, -3132, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
- CS_ACTOR_CUE_LIST(63, 4),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_3_5, 4),
CS_ACTOR_CUE(0x0002, 0, 178, 0x0000, 0xEC16, 0x0000, 127, -340, -3041, 127, -340, -3041, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_ACTOR_CUE(0x0003, 178, 245, 0x0000, 0x6C16, 0x0000, 127, -340, -3041, 127, -340, -3041, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_ACTOR_CUE(0x0004, 245, 260, 0x0000, 0x6C16, 0x0000, 127, -340, -3041, 127, -340, -3041, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
@@ -24,9 +24,9 @@ static CutsceneData D_80AF0880[] = {
CS_MISC(CS_MISC_STOP_CUTSCENE, 315, 345, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0x00000000, 0x00000000),
CS_TEXT_LIST(4),
CS_TEXT_NONE(0, 157),
- CS_TEXT(0x404B, 157, 175, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x404B, 157, 175, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_TEXT_NONE(175, 252),
- CS_TEXT(0x401E, 252, 300, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x401E, 252, 300, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_CAM_EYE_SPLINE(0, 247),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x4235998B, 45.399944f), 55, -290, -2749, 0x20BA),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x4235998B, 45.399944f), 55, -290, -2749, 0x44B8),
@@ -107,39 +107,39 @@ static CutsceneData D_80AF0880[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x423B3327, 46.799953f), 305, -272, -3274, 0x5B80),
CS_START_SEQ_LIST(1),
CS_START_SEQ(NA_BGM_APPEAR, 74, 75, 0x0000, 0x00000000, 0xFFFFFFF1, 0x00000000, 0x0000004E, 0xFFFFFFF1, 0x00000000, 0x0000004E),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
static u32 D_80AF10A0 = 0;
-static CutsceneData D_80AF10A4[] = {
- CS_BEGIN_CUTSCENE(14, 1299),
+static CutsceneData gRutoObtainingSapphireCs[] = {
+ CS_HEADER(14, 1299),
CS_PLAYER_CUE_LIST(3),
CS_PLAYER_CUE(PLAYER_CUEID_5, 0, 272, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_3, 272, 292, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_5, 292, 777, 0x0000, 0xC000, 0x0000, -1085, -1025, -3347, -1085, -1025, -3347, CS_FLOAT(0xF671408, 1.1393037e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 330, 627, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(66, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_3_7, 3),
CS_ACTOR_CUE(0x0001, 0, 40, 0x0000, 0x4000, 0x0000, -1352, -969, -3341, -1352, -969, -3341, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_ACTOR_CUE(0x0002, 40, 213, 0x0000, 0x4000, 0x0000, -1352, -969, -3341, -1360, -969, -3343, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_ACTOR_CUE(0x0003, 213, 1000, 0x0000, 0x4000, 0x0000, -1360, -969, -3343, -1360, -969, -3343, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
- CS_ACTOR_CUE_LIST(48, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_1_5, 1),
CS_ACTOR_CUE(0x0002, 0, 90, 0x0000, 0x0000, 0x0000, -1360, -963, -3343, -1360, -963, -3343, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(48, 2),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_1_5, 2),
CS_ACTOR_CUE(0x0002, 90, 211, 0x0000, 0x0000, 0x0000, -1352, -922, -3341, -1352, -922, -3341, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0006, 211, 311, 0x0000, 0x0000, 0x0000, -1352, -922, -3341, -1352, -922, -3341, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(62, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_8_0, 3),
CS_ACTOR_CUE(0x0004, 0, 210, 0x0000, 0x0000, 0x0000, -1065, -972, -3305, -1065, -978, -3305, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xBCEA0EA1, -0.028571429f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 210, 220, 0x8000, 0x0000, 0x0000, -1065, -978, -3305, -1065, -973, -3344, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x3F000000, 0.5f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 220, 410, 0x0000, 0x0000, 0x0000, -1065, -973, -3344, -1065, -976, -3344, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xBC8158ED, -0.015789473f), CS_FLOAT(0x0, 0.0f)),
CS_TEXT_LIST(6),
CS_TEXT_NONE(0, 162),
- CS_TEXT(0x4050, 162, 211, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x4050, 162, 211, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_TEXT_NONE(211, 232),
- CS_TEXT(0x4051, 232, 241, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x4051, 232, 241, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_TEXT_NONE(241, 247),
- CS_TEXT(0x4052, 247, 299, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x4052, 247, 299, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_START_SEQ_LIST(1),
CS_START_SEQ(NA_BGM_ITEM_GET, 112, 113, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC7, 0x000000B1, 0x00000000, 0xFFFFFFC7, 0x000000B1),
CS_CAM_EYE_SPLINE(0, 1176),
@@ -196,16 +196,16 @@ static CutsceneData D_80AF10A4[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x41F273D3, 30.306555f), -1426, -857, -3190, 0x00D7),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x41F273D3, 30.306555f), -1426, -857, -3190, 0x00E8),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x41F273D3, 30.306555f), -1426, -857, -3190, 0x00EA),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
static u32 D_80AF1724 = 0;
-static CutsceneData D_80AF1728[] = {
- CS_BEGIN_CUTSCENE(7, 1160),
+static CutsceneData gRutoFoundSapphireCs[] = {
+ CS_HEADER(7, 1160),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 75, 627, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0xFFFFFFC0, 0x00000032, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(48, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_1_5, 1),
CS_ACTOR_CUE(0x0002, 0, 90, 0x0000, 0x0000, 0x0000, -1360, -963, -3343, -1360, -963, -3343, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_CAM_EYE_SPLINE(0, 1091),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 0, CS_FLOAT(0x42226662, 40.599983f), -1381, -958, -3331, 0x8BC0),
@@ -233,7 +233,7 @@ static CutsceneData D_80AF1728[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x424B3339, 50.800022f), -35, 56, -93, 0x0000),
CS_TEXT_LIST(2),
CS_TEXT_NONE(0, 35),
- CS_TEXT(0x404F, 35, 70, 0x0000, 0xFFFF, 0xFFFF),
- CS_END(),
+ CS_TEXT(0x404F, 35, 70, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
index 733aefd47d..b6c7405a03 100644
--- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
+++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
@@ -5,43 +5,89 @@
*/
#include "z_en_ru2.h"
-#include "assets/objects/object_ru2/object_ru2.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_ru2/object_ru2.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnRu2_Init(Actor* thisx, PlayState* play);
void EnRu2_Destroy(Actor* thisx, PlayState* play);
void EnRu2_Update(Actor* thisx, PlayState* play);
void EnRu2_Draw(Actor* thisx, PlayState* play);
-void func_80AF2CB4(EnRu2* this, PlayState* play);
-void func_80AF2CD4(EnRu2* this, PlayState* play);
-void func_80AF2CF4(EnRu2* this, PlayState* play);
-void func_80AF2D2C(EnRu2* this, PlayState* play);
-void func_80AF2D6C(EnRu2* this, PlayState* play);
-void func_80AF2DAC(EnRu2* this, PlayState* play);
-void func_80AF2DEC(EnRu2* this, PlayState* play);
-void func_80AF3144(EnRu2* this, PlayState* play);
-void func_80AF3174(EnRu2* this, PlayState* play);
-void func_80AF31C8(EnRu2* this, PlayState* play);
-void func_80AF3604(EnRu2* this, PlayState* play);
-void func_80AF3624(EnRu2* this, PlayState* play);
-void func_80AF366C(EnRu2* this, PlayState* play);
-void func_80AF36AC(EnRu2* this, PlayState* play);
-void func_80AF3BC8(EnRu2* this, PlayState* play);
-void func_80AF3C04(EnRu2* this, PlayState* play);
-void func_80AF3C64(EnRu2* this, PlayState* play);
-void func_80AF3CB8(EnRu2* this, PlayState* play);
-void func_80AF3D0C(EnRu2* this, PlayState* play);
-void func_80AF3D60(EnRu2* this, PlayState* play);
+void EnRu2_SetupWaterMedallionCutscene(EnRu2* this, PlayState* play);
+void EnRu2_AwaitBlueWarp(EnRu2* this, PlayState* play);
+void EnRu2_RiseThroughBlueWarp(EnRu2* this, PlayState* play);
+void EnRu2_SageOfWaterDialog(EnRu2* this, PlayState* play);
+void EnRu2_RaiseArms(EnRu2* this, PlayState* play);
+void EnRu2_AwaitWaterMedallion(EnRu2* this, PlayState* play);
+void EnRu2_FinishWaterMedallionCutscene(EnRu2* this, PlayState* play);
+void EnRu2_WaterTrialInvisible(EnRu2* this, PlayState* play);
+void EnRu2_WaterTrialFade(EnRu2* this, PlayState* play);
+void EnRu2_AwaitSpawnLightBall(EnRu2* this, PlayState* play);
+void EnRu2_CreditsInvisible(EnRu2* this, PlayState* play);
+void EnRu2_CreditsFadeIn(EnRu2* this, PlayState* play);
+void EnRu2_CreditsVisible(EnRu2* this, PlayState* play);
+void EnRu2_CreditsTurnHeadDownLeft(EnRu2* this, PlayState* play);
+void EnRu2_WaterTempleEncounterRangeCheck(EnRu2* this, PlayState* play);
+void EnRu2_WaterTempleEncounterUnconditional(EnRu2* this, PlayState* play);
+void EnRu2_WaterTempleEncounterBegin(EnRu2* this, PlayState* play);
+void EnRu2_WaterTempleEncounterDialog(EnRu2* this, PlayState* play);
+void EnRu2_WaterTempleEncounterEnd(EnRu2* this, PlayState* play);
+void EnRu2_WaterTempleSwimmingUp(EnRu2* this, PlayState* play);
-void func_80AF3F14(EnRu2* this, PlayState* play);
-void func_80AF3F20(EnRu2* this, PlayState* play);
-void func_80AF321C(EnRu2* this, PlayState* play);
+void EnRu2_DrawNothing(EnRu2* this, PlayState* play);
+void EnRu2_DrawOpa(EnRu2* this, PlayState* play);
+void EnRu2_DrawXlu(EnRu2* this, PlayState* play);
-void func_80AF2AB4(EnRu2* this, PlayState* play);
+void EnRu2_CheckWaterMedallionCutscene(EnRu2* this, PlayState* play);
+
+typedef enum {
+ /* 00 */ ENRU2_SETUP_WATER_MEDALLION_CS,
+ /* 01 */ ENRU2_AWAIT_BLUE_WARP,
+ /* 02 */ ENRU2_RISE_THROUGH_BLUE_WARP,
+ /* 03 */ ENRU2_SAGE_OF_WATER_DIALOG,
+ /* 04 */ ENRU2_RAISE_ARMS,
+ /* 05 */ ENRU2_AWAIT_SPAWN_WATER_MEDALLION,
+ /* 06 */ ENRU2_FINISH_WATER_MEDALLION_CS,
+ /* 07 */ ENRU2_WATER_TRIAL_INVISIBLE,
+ /* 08 */ ENRU2_WATER_TRIAL_FADE,
+ /* 09 */ ENRU2_AWAIT_SPAWN_LIGHT_BALL,
+ /* 10 */ ENRU2_CREDITS_INVISIBLE,
+ /* 11 */ ENRU2_CREDITS_FADE_IN,
+ /* 12 */ ENRU2_CREDITS_VISIBLE,
+ /* 13 */ ENRU2_CREDITS_TURN_HEAD_DOWN_LEFT,
+ /* 14 */ ENRU2_WATER_TEMPLE_ENCOUNTER_RANGE_CHECK,
+ /* 15 */ ENRU2_WATER_TEMPLE_ENCOUNTER_UNCONDITIONAL, // unused
+ /* 16 */ ENRU2_WATER_TEMPLE_ENCOUNTER_BEGINNING,
+ /* 17 */ ENRU2_WATER_TEMPLE_ENCOUNTER_DIALOG,
+ /* 18 */ ENRU2_WATER_TEMPLE_ENCOUNTER_END,
+ /* 19 */ ENRU2_WATER_TEMPLE_SWIMMING_UP
+} EnRu2Action;
+
+typedef enum {
+ /* 00 */ ENRU2_DRAW_NOTHING,
+ /* 01 */ ENRU2_DRAW_OPA,
+ /* 02 */ ENRU2_DRAW_XLU
+} EnRu2DrawConfig;
static ColliderCylinderInitType1 sCylinderInit = {
{
@@ -61,22 +107,39 @@ static void* sEyeTextures[] = {
gAdultRutoEyeClosedTex,
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static UNK_TYPE D_80AF4118 = 0;
#endif
#include "z_en_ru2_cutscene_data.inc.c"
static EnRu2ActionFunc sActionFuncs[] = {
- func_80AF2CB4, func_80AF2CD4, func_80AF2CF4, func_80AF2D2C, func_80AF2D6C, func_80AF2DAC, func_80AF2DEC,
- func_80AF3144, func_80AF3174, func_80AF31C8, func_80AF3604, func_80AF3624, func_80AF366C, func_80AF36AC,
- func_80AF3BC8, func_80AF3C04, func_80AF3C64, func_80AF3CB8, func_80AF3D0C, func_80AF3D60,
+ EnRu2_SetupWaterMedallionCutscene,
+ EnRu2_AwaitBlueWarp,
+ EnRu2_RiseThroughBlueWarp,
+ EnRu2_SageOfWaterDialog,
+ EnRu2_RaiseArms,
+ EnRu2_AwaitWaterMedallion,
+ EnRu2_FinishWaterMedallionCutscene,
+ EnRu2_WaterTrialInvisible,
+ EnRu2_WaterTrialFade,
+ EnRu2_AwaitSpawnLightBall,
+ EnRu2_CreditsInvisible,
+ EnRu2_CreditsFadeIn,
+ EnRu2_CreditsVisible,
+ EnRu2_CreditsTurnHeadDownLeft,
+ EnRu2_WaterTempleEncounterRangeCheck,
+ EnRu2_WaterTempleEncounterUnconditional,
+ EnRu2_WaterTempleEncounterBegin,
+ EnRu2_WaterTempleEncounterDialog,
+ EnRu2_WaterTempleEncounterEnd,
+ EnRu2_WaterTempleSwimmingUp,
};
static EnRu2DrawFunc sDrawFuncs[] = {
- func_80AF3F14,
- func_80AF3F20,
- func_80AF321C,
+ EnRu2_DrawNothing,
+ EnRu2_DrawOpa,
+ EnRu2_DrawXlu,
};
ActorProfile En_Ru2_Profile = {
@@ -91,14 +154,14 @@ ActorProfile En_Ru2_Profile = {
/**/ EnRu2_Draw,
};
-void func_80AF2550(Actor* thisx, PlayState* play) {
+void EnRu2_InitCollider(Actor* thisx, PlayState* play) {
EnRu2* this = (EnRu2*)thisx;
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinderType1(play, &this->collider, &this->actor, &sCylinderInit);
}
-void func_80AF259C(EnRu2* this, PlayState* play) {
+void EnRu2_UpdateCollider(EnRu2* this, PlayState* play) {
s32 pad[5];
Collider_UpdateCylinder(&this->actor, &this->collider);
@@ -111,41 +174,41 @@ void EnRu2_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->collider);
}
-void func_80AF2608(EnRu2* this) {
+void EnRu2_UpdateEyes(EnRu2* this) {
s32 pad[3];
- s16* unk_2A6 = &this->unk_2A6;
- s16* unk_2A4 = &this->unk_2A4;
+ s16* blinkTimer = &this->blinkTimer;
+ s16* eyeIndex = &this->eyeIndex;
- if (DECR(*unk_2A6) == 0) {
- *unk_2A6 = Rand_S16Offset(0x3C, 0x3C);
+ if (DECR(*blinkTimer) == 0) {
+ *blinkTimer = Rand_S16Offset(60, 60);
}
- *unk_2A4 = *unk_2A6;
- if (*unk_2A4 >= 3) {
- *unk_2A4 = 0;
+ *eyeIndex = *blinkTimer;
+ if (*eyeIndex >= 3) {
+ *eyeIndex = 0;
}
}
-s32 func_80AF2690(EnRu2* this) {
- s32 params_shift = PARAMS_GET_U(this->actor.params, 8, 8);
+s32 EnRu2_GetSwitchFlag(EnRu2* this) {
+ s32 switchFlag = ENRU2_GET_SWITCH_FLAG(this);
- return params_shift;
+ return switchFlag;
}
-s32 func_80AF26A0(EnRu2* this) {
- s32 params = PARAMS_GET_U(this->actor.params, 0, 8);
+s32 EnRu2_GetType(EnRu2* this) {
+ s32 type = ENRU2_GET_TYPE(this);
- return params;
+ return type;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void func_80AF26AC(EnRu2* this) {
- this->action = 7;
- this->drawConfig = 0;
+ this->action = ENRU2_WATER_TRIAL_INVISIBLE;
+ this->drawConfig = ENRU2_DRAW_NOTHING;
this->alpha = 0;
- this->unk_2B8 = 0;
+ this->isLightBall = false;
this->actor.shape.shadowAlpha = 0;
- this->unk_2B0 = 0.0f;
+ this->fadeTimer = 0.0f;
}
void func_80AF26D0(EnRu2* this, PlayState* play) {
@@ -168,7 +231,7 @@ void func_80AF26D0(EnRu2* this, PlayState* play) {
}
#endif
-void func_80AF2744(EnRu2* this, PlayState* play) {
+void EnRu2_UpdateBgCheckInfo(EnRu2* this, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 30.0f, 30.0f, UPDBGCHECKINFO_FLAG_2);
}
@@ -186,7 +249,7 @@ CsCmdActorCue* EnRu2_GetCue(PlayState* play, s32 cueChannel) {
return NULL;
}
-s32 func_80AF27D0(EnRu2* this, PlayState* play, u16 cueId, s32 cueChannel) {
+s32 EnRu2_CheckCueMatchingId(EnRu2* this, PlayState* play, u16 cueId, s32 cueChannel) {
CsCmdActorCue* cue = EnRu2_GetCue(play, cueChannel);
if ((cue != NULL) && (cue->id == cueId)) {
@@ -195,7 +258,7 @@ s32 func_80AF27D0(EnRu2* this, PlayState* play, u16 cueId, s32 cueChannel) {
return false;
}
-s32 func_80AF281C(EnRu2* this, PlayState* play, u16 cueId, s32 cueChannel) {
+s32 EnRu2_CheckCueNotMatchingId(EnRu2* this, PlayState* play, u16 cueId, s32 cueChannel) {
CsCmdActorCue* cue = EnRu2_GetCue(play, cueChannel);
if ((cue != NULL) && (cue->id != cueId)) {
@@ -204,7 +267,10 @@ s32 func_80AF281C(EnRu2* this, PlayState* play, u16 cueId, s32 cueChannel) {
return false;
}
-void func_80AF2868(EnRu2* this, PlayState* play, u32 cueChannel) {
+/**
+ * Checks cutscene data and, if applicable, configures Ruto's position accordingly.
+ */
+void EnRu2_InitPositionFromCue(EnRu2* this, PlayState* play, u32 cueChannel) {
CsCmdActorCue* cue = EnRu2_GetCue(play, cueChannel);
Actor* thisx = &this->actor;
@@ -217,35 +283,50 @@ void func_80AF2868(EnRu2* this, PlayState* play, u32 cueChannel) {
}
}
-void func_80AF28E8(EnRu2* this, AnimationHeader* animation, u8 arg2, f32 morphFrames, s32 arg4) {
+/**
+ * Changes the animation for Ruto's actor. The direction argument decides whether to play the animation
+ * forwards (if 0) or backwards (otherwise).
+ */
+void EnRu2_AnimationChange(EnRu2* this, AnimationHeader* animation, u8 mode, f32 morphFrames, s32 direction) {
f32 frameCount = Animation_GetLastFrame(animation);
f32 playbackSpeed;
- f32 unk0;
- f32 fc;
+ f32 startFrame;
+ f32 endFrame;
- if (arg4 == 0) {
- unk0 = 0.0f;
- fc = frameCount;
+ if (direction == 0) {
+ startFrame = 0.0f;
+ endFrame = frameCount;
playbackSpeed = 1.0f;
} else {
- unk0 = frameCount;
- fc = 0.0f;
+ startFrame = frameCount;
+ endFrame = 0.0f;
playbackSpeed = -1.0f;
}
- Animation_Change(&this->skelAnime, animation, playbackSpeed, unk0, fc, arg2, morphFrames);
+ Animation_Change(&this->skelAnime, animation, playbackSpeed, startFrame, endFrame, mode, morphFrames);
}
-void func_80AF2978(EnRu2* this, PlayState* play) {
+/**
+ * Gradually increases Ruto's model's Y-offset as she rises up through the blue warp in the Chamber of Sages.
+ */
+void EnRu2_Rise(EnRu2* this, PlayState* play) {
this->actor.shape.yOffset += 250.0f / 3.0f;
}
-void func_80AF2994(EnRu2* this, PlayState* play) {
- func_80AF28E8(this, &gAdultRutoIdleAnim, 0, 0.0f, 0);
+/**
+ * Sets up Ruto's actor in the Chamber of Sages.
+ * Note: All sages actors are present in the Chamber of Sages, regardless of which dungeon was just completed.
+ * This function runs unconditionally, even if it is not relevant for Ruto.
+ */
+void EnRu2_InitChamberOfSages(EnRu2* this, PlayState* play) {
+ EnRu2_AnimationChange(this, &gAdultRutoIdleAnim, 0, 0.0f, 0);
this->actor.shape.yOffset = -10000.0f;
}
-void func_80AF29DC(EnRu2* this, PlayState* play) {
+/**
+ * Spawns the blue warp for Ruto to rise up through in the Chamber of Sages.
+ */
+void EnRu2_SpawnBlueWarp(EnRu2* this, PlayState* play) {
Actor* thisx = &this->actor;
f32 posX = thisx->world.pos.x;
f32 posY = thisx->world.pos.y;
@@ -254,34 +335,43 @@ void func_80AF29DC(EnRu2* this, PlayState* play) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_SAGES);
}
-void func_80AF2A38(EnRu2* this, PlayState* play) {
+/**
+ * Spawns the Water Medallion.
+ */
+void EnRu2_SpawnWaterMedallion(EnRu2* this, PlayState* play) {
Player* player = GET_PLAYER(play);
f32 posX = player->actor.world.pos.x;
f32 posY = player->actor.world.pos.y + 50.0f;
f32 posZ = player->actor.world.pos.z;
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0, 10);
+ // Give the water medallion. This is redundant as it was already given in `EnRu2_CheckWaterMedallionCutscene`
Item_Give(play, ITEM_MEDALLION_WATER);
}
-void func_80AF2AB4(EnRu2* this, PlayState* play) {
+/**
+ * Sets up the Water Medallion Cutscene if coming from Water Temple.
+ * All sage actors are present in the Chamber of Sages regardless of which dungeon was just completed.
+ * This function will loop endlessly if the current sage cutscene is not for the Water Medallion.
+ */
+void EnRu2_CheckWaterMedallionCutscene(EnRu2* this, PlayState* play) {
s32 pad[2];
Player* player;
- s16 temp;
+ s16 yaw;
if ((gSaveContext.chamberCutsceneNum == CHAMBER_CS_WATER) && !IS_CUTSCENE_LAYER) {
player = GET_PLAYER(play);
- this->action = 1;
- play->csCtx.script = D_80AF411C;
+ this->action = ENRU2_AWAIT_BLUE_WARP;
+ play->csCtx.script = gWaterMedallionCs;
gSaveContext.cutsceneTrigger = 2;
Item_Give(play, ITEM_MEDALLION_WATER);
- temp = this->actor.world.rot.y + 0x8000;
- player->actor.shape.rot.y = temp;
- player->actor.world.rot.y = temp;
+ yaw = this->actor.world.rot.y + 0x8000;
+ player->actor.shape.rot.y = yaw;
+ player->actor.world.rot.y = yaw;
}
}
-void func_80AF2B44(EnRu2* this, PlayState* play) {
+void EnRu2_CheckIfBlueWarpShouldSpawn(EnRu2* this, PlayState* play) {
CutsceneContext* csCtx = &play->csCtx;
CsCmdActorCue* cue;
@@ -289,21 +379,27 @@ void func_80AF2B44(EnRu2* this, PlayState* play) {
cue = csCtx->actorCues[3];
if ((cue != NULL) && (cue->id == 2)) {
- this->action = 2;
- this->drawConfig = 1;
- func_80AF29DC(this, play);
+ this->action = ENRU2_RISE_THROUGH_BLUE_WARP;
+ this->drawConfig = ENRU2_DRAW_OPA;
+ EnRu2_SpawnBlueWarp(this, play);
}
}
}
-void func_80AF2B94(EnRu2* this) {
+/**
+ * Halts Ruto's rise up through the blue warp in the Chamber of Sages once finished.
+ */
+void EnRu2_EndRise(EnRu2* this) {
if (this->actor.shape.yOffset >= 0.0f) {
- this->action = 3;
+ this->action = ENRU2_SAGE_OF_WATER_DIALOG;
this->actor.shape.yOffset = 0.0f;
}
}
-void func_80AF2BC0(EnRu2* this, PlayState* play) {
+/**
+ * Sets up the animation for Ruto to raise her arms to give Link the Water Medallion.
+ */
+void EnRu2_CheckStartRaisingArms(EnRu2* this, PlayState* play) {
AnimationHeader* animation = &gAdultRutoRaisingArmsUpAnim;
CsCmdActorCue* cue;
@@ -313,175 +409,198 @@ void func_80AF2BC0(EnRu2* this, PlayState* play) {
if ((cue != NULL) && (cue->id == 3)) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE,
0.0f);
- this->action = 4;
+ this->action = ENRU2_RAISE_ARMS;
}
}
}
-void func_80AF2C54(EnRu2* this, s32 arg1) {
- if (arg1 != 0) {
- this->action = 5;
+/**
+ * At the end of Ruto's arms-raising animation, cues the next action: spawning the
+ * Water Medallion.
+ */
+void EnRu2_HoldArmsUp(EnRu2* this, s32 doneRaising) {
+ if (doneRaising != 0) {
+ this->action = ENRU2_AWAIT_SPAWN_WATER_MEDALLION;
}
}
-void func_80AF2C68(EnRu2* this, PlayState* play) {
+/**
+ * Checks to see if the Water Medallion should spawn.
+ */
+void EnRu2_CheckIfWaterMedallionShouldSpawn(EnRu2* this, PlayState* play) {
CsCmdActorCue* cue;
if (play->csCtx.state != CS_STATE_IDLE) {
cue = play->csCtx.actorCues[6];
if ((cue != NULL) && (cue->id == 2)) {
- this->action = 6;
- func_80AF2A38(this, play);
+ this->action = ENRU2_FINISH_WATER_MEDALLION_CS;
+ EnRu2_SpawnWaterMedallion(this, play);
}
}
}
-void func_80AF2CB4(EnRu2* this, PlayState* play) {
- func_80AF2AB4(this, play);
+void EnRu2_SetupWaterMedallionCutscene(EnRu2* this, PlayState* play) {
+ EnRu2_CheckWaterMedallionCutscene(this, play);
}
-void func_80AF2CD4(EnRu2* this, PlayState* play) {
- func_80AF2B44(this, play);
+void EnRu2_AwaitBlueWarp(EnRu2* this, PlayState* play) {
+ EnRu2_CheckIfBlueWarpShouldSpawn(this, play);
}
-void func_80AF2CF4(EnRu2* this, PlayState* play) {
- func_80AF2978(this, play);
+void EnRu2_RiseThroughBlueWarp(EnRu2* this, PlayState* play) {
+ EnRu2_Rise(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
- func_80AF2B94(this);
+ EnRu2_UpdateEyes(this);
+ EnRu2_EndRise(this);
}
-void func_80AF2D2C(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
+void EnRu2_SageOfWaterDialog(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
- func_80AF2BC0(this, play);
+ EnRu2_UpdateEyes(this);
+ EnRu2_CheckStartRaisingArms(this, play);
}
-void func_80AF2D6C(EnRu2* this, PlayState* play) {
- s32 something;
+void EnRu2_RaiseArms(EnRu2* this, PlayState* play) {
+ s32 animDone;
- func_80AF2744(this, play);
- something = EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
- func_80AF2C54(this, something);
+ EnRu2_UpdateBgCheckInfo(this, play);
+ animDone = EnRu2_UpdateSkelAnime(this);
+ EnRu2_UpdateEyes(this);
+ EnRu2_HoldArmsUp(this, animDone);
}
-void func_80AF2DAC(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
+void EnRu2_AwaitWaterMedallion(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
- func_80AF2C68(this, play);
+ EnRu2_UpdateEyes(this);
+ EnRu2_CheckIfWaterMedallionShouldSpawn(this, play);
}
-void func_80AF2DEC(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
+void EnRu2_FinishWaterMedallionCutscene(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
+ EnRu2_UpdateEyes(this);
}
-void func_80AF2E1C(EnRu2* this, PlayState* play) {
- func_80AF28E8(this, &gAdultRutoCrossingArmsAnim, 2, 0.0f, 0);
- this->action = 7;
+/**
+ * Sets up Ruto in her arms-crossing pose. Used in the Water Trial in Ganon's Castle and in the
+ * Chamber of Sages during the "Sealing Ganon" cutscene.
+ */
+void EnRu2_InitWaterTrial(EnRu2* this, PlayState* play) {
+ EnRu2_AnimationChange(this, &gAdultRutoCrossingArmsAnim, 2, 0.0f, 0);
+ this->action = ENRU2_WATER_TRIAL_INVISIBLE;
this->actor.shape.shadowAlpha = 0;
}
-void func_80AF2E64(void) {
+void EnRu2_PlayWhiteOutSound(void) {
Sfx_PlaySfxCentered2(NA_SE_SY_WHITE_OUT_T);
}
-void func_80AF2E84(EnRu2* this, PlayState* play) {
+/**
+ * Spawns the ball of light that replaces Ruto's actor in the Water Trial.
+ */
+void EnRu2_SpawnLightBall(EnRu2* this, PlayState* play) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_6K, this->actor.world.pos.x,
kREG(19) + 24.0f + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 8);
}
-void func_80AF2F04(EnRu2* this, PlayState* play) {
- if (func_80AF27D0(this, play, 4, 3)) {
- this->action = 8;
- this->drawConfig = 2;
+/**
+ * Checks to see if it's time for Ruto to fade in while crossing her arms.
+ */
+void EnRu2_CheckFadeIn(EnRu2* this, PlayState* play) {
+ if (EnRu2_CheckCueMatchingId(this, play, 4, 3)) {
+ this->action = ENRU2_WATER_TRIAL_FADE;
+ this->drawConfig = ENRU2_DRAW_XLU;
this->alpha = 0;
this->actor.shape.shadowAlpha = 0;
- this->unk_2B0 = 0.0f;
- func_80AF2E64();
+ this->fadeTimer = 0.0f;
+ EnRu2_PlayWhiteOutSound();
}
}
-void func_80AF2F58(EnRu2* this, PlayState* play) {
- f32* unk_2B0 = &this->unk_2B0;
+/**
+ * Fades Ruto's actor in or out. Both happen during the Water Trial.
+ */
+void EnRu2_Fade(EnRu2* this, PlayState* play) {
+ f32* fadeTimer = &this->fadeTimer;
s32 alpha;
- if (func_80AF27D0(this, play, 4, 3)) {
- *unk_2B0 += 1.0f;
- if (*unk_2B0 >= kREG(5) + 10.0f) {
- this->action = 9;
- this->drawConfig = 1;
- *unk_2B0 = kREG(5) + 10.0f;
+ if (EnRu2_CheckCueMatchingId(this, play, 4, 3)) {
+ *fadeTimer += 1.0f;
+ if (*fadeTimer >= kREG(5) + 10.0f) {
+ this->action = ENRU2_AWAIT_SPAWN_LIGHT_BALL;
+ this->drawConfig = ENRU2_DRAW_OPA;
+ *fadeTimer = kREG(5) + 10.0f;
this->alpha = 255;
this->actor.shape.shadowAlpha = 0xFF;
return;
}
} else {
- *unk_2B0 -= 1.0f;
- if (*unk_2B0 <= 0.0f) {
- this->action = 7;
- this->drawConfig = 0;
- *unk_2B0 = 0.0f;
+ *fadeTimer -= 1.0f;
+ if (*fadeTimer <= 0.0f) {
+ this->action = ENRU2_WATER_TRIAL_INVISIBLE;
+ this->drawConfig = ENRU2_DRAW_NOTHING;
+ *fadeTimer = 0.0f;
this->alpha = 0;
this->actor.shape.shadowAlpha = 0;
return;
}
}
- alpha = (*unk_2B0 / (kREG(5) + 10.0f)) * 255.0f;
+ alpha = (*fadeTimer / (kREG(5) + 10.0f)) * 255.0f;
this->alpha = alpha;
this->actor.shape.shadowAlpha = alpha;
}
-void func_80AF30AC(EnRu2* this, PlayState* play) {
- if (func_80AF281C(this, play, 4, 3)) {
- this->action = 8;
- this->drawConfig = 2;
- this->unk_2B0 = kREG(5) + 10.0f;
+/**
+ * Checks to see if it's time for Ruto to fade out while her arms are crossed.
+ */
+void EnRu2_CheckFadeOut(EnRu2* this, PlayState* play) {
+ if (EnRu2_CheckCueNotMatchingId(this, play, 4, 3)) {
+ this->action = ENRU2_WATER_TRIAL_FADE;
+ this->drawConfig = ENRU2_DRAW_XLU;
+ this->fadeTimer = kREG(5) + 10.0f;
this->alpha = 255;
- if (this->unk_2B8 == 0) {
- func_80AF2E84(this, play);
- this->unk_2B8 = 1;
+ if (!this->isLightBall) {
+ EnRu2_SpawnLightBall(this, play);
+ this->isLightBall = true;
}
this->actor.shape.shadowAlpha = 0xFF;
}
}
-void func_80AF3144(EnRu2* this, PlayState* play) {
- func_80AF2F04(this, play);
-#if OOT_DEBUG
+void EnRu2_WaterTrialInvisible(EnRu2* this, PlayState* play) {
+ EnRu2_CheckFadeIn(this, play);
+#if DEBUG_FEATURES
func_80AF26D0(this, play);
#endif
}
-void func_80AF3174(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
+void EnRu2_WaterTrialFade(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
- func_80AF2F58(this, play);
-#if OOT_DEBUG
+ EnRu2_UpdateEyes(this);
+ EnRu2_Fade(this, play);
+#if DEBUG_FEATURES
func_80AF26D0(this, play);
#endif
}
-void func_80AF31C8(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
+void EnRu2_AwaitSpawnLightBall(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
- func_80AF30AC(this, play);
-#if OOT_DEBUG
+ EnRu2_UpdateEyes(this);
+ EnRu2_CheckFadeOut(this, play);
+#if DEBUG_FEATURES
func_80AF26D0(this, play);
#endif
}
-void func_80AF321C(EnRu2* this, PlayState* play) {
+void EnRu2_DrawXlu(EnRu2* this, PlayState* play) {
s32 pad[2];
- s16 temp = this->unk_2A4;
- void* tex = sEyeTextures[temp];
+ s16 eyeIndex = this->eyeIndex;
+ void* tex = sEyeTextures[eyeIndex];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(play->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 264);
@@ -499,56 +618,74 @@ void func_80AF321C(EnRu2* this, PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 291);
}
-void func_80AF3394(EnRu2* this, PlayState* play) {
- func_80AF28E8(this, &gAdultRutoIdleHandsOnHipsAnim, 0, 0.0f, 0);
- this->action = 10;
- this->drawConfig = 0;
+/**
+ * Sets up Ruto's hands-on-hips pose during the credits sequence.
+ */
+void EnRu2_InitCredits(EnRu2* this, PlayState* play) {
+ EnRu2_AnimationChange(this, &gAdultRutoIdleHandsOnHipsAnim, 0, 0.0f, 0);
+ this->action = ENRU2_CREDITS_INVISIBLE;
+ this->drawConfig = ENRU2_DRAW_NOTHING;
this->actor.shape.shadowAlpha = 0;
}
-void func_80AF33E0(EnRu2* this) {
- f32* unk_2B0 = &this->unk_2B0;
- f32 temp_f0;
- s32 temp_f18;
+/**
+ * Fades in Ruto's actor during the credits sequence.
+ */
+void EnRu2_FadeInCredits(EnRu2* this) {
+ f32* fadeTimer = &this->fadeTimer;
+ f32 fadeDuration;
+ s32 alpha;
- *unk_2B0 += 1.0f;
+ *fadeTimer += 1.0f;
- temp_f0 = kREG(17) + 10.0f;
- if (temp_f0 <= *unk_2B0) {
+ fadeDuration = kREG(17) + 10.0f;
+ if (fadeDuration <= *fadeTimer) {
this->alpha = 255;
this->actor.shape.shadowAlpha = 0xFF;
} else {
- temp_f18 = (*unk_2B0 / temp_f0) * 255.0f;
- this->alpha = temp_f18;
- this->actor.shape.shadowAlpha = temp_f18;
+ alpha = (*fadeTimer / fadeDuration) * 255.0f;
+ this->alpha = alpha;
+ this->actor.shape.shadowAlpha = alpha;
}
}
-void func_80AF346C(EnRu2* this, PlayState* play) {
- func_80AF2868(this, play, 3);
- this->action = 11;
- this->drawConfig = 2;
+void EnRu2_InitCreditsPosition(EnRu2* this, PlayState* play) {
+ EnRu2_InitPositionFromCue(this, play, 3);
+ this->action = ENRU2_CREDITS_FADE_IN;
+ this->drawConfig = ENRU2_DRAW_XLU;
}
-void func_80AF34A4(EnRu2* this) {
- if (this->unk_2B0 >= kREG(17) + 10.0f) {
- this->action = 12;
- this->drawConfig = 1;
+/**
+ * Checks for the end of Ruto's fade-in during the credits sequence.
+ */
+void EnRu2_CheckVisibleInCredits(EnRu2* this) {
+ if (this->fadeTimer >= kREG(17) + 10.0f) {
+ this->action = ENRU2_CREDITS_VISIBLE;
+ this->drawConfig = ENRU2_DRAW_OPA;
}
}
-void func_80AF34F0(EnRu2* this) {
- func_80AF28E8(this, &gAdultRutoHeadTurnDownLeftAnim, 2, 0.0f, 0);
- this->action = 13;
+/**
+ * Starts Ruto's animation to look down towards Nabooru during the credits sequence.
+ */
+void EnRu2_SetupTurnHeadDownLeftAnimation(EnRu2* this) {
+ EnRu2_AnimationChange(this, &gAdultRutoHeadTurnDownLeftAnim, 2, 0.0f, 0);
+ this->action = ENRU2_CREDITS_TURN_HEAD_DOWN_LEFT;
}
-void func_80AF3530(EnRu2* this, s32 arg1) {
- if (arg1 != 0) {
- func_80AF28E8(this, &gAdultRutoLookingDownLeftAnim, 0, 0.0f, 0);
+/**
+ * Holds Ruto's pose looking down towards Nabooru during the credits sequence.
+ */
+void EnRu2_HoldLookingDownLeftPose(EnRu2* this, s32 isDoneTurning) {
+ if (isDoneTurning != 0) {
+ EnRu2_AnimationChange(this, &gAdultRutoLookingDownLeftAnim, 0, 0.0f, 0);
}
}
-void func_80AF3564(EnRu2* this, PlayState* play) {
+/**
+ * Advances Ruto's actions in two different places.
+ */
+void EnRu2_NextCreditsAction(EnRu2* this, PlayState* play) {
CsCmdActorCue* cue = EnRu2_GetCue(play, 3);
s32 nextCueId;
s32 currentCueId;
@@ -560,14 +697,14 @@ void func_80AF3564(EnRu2* this, PlayState* play) {
if (nextCueId != currentCueId) {
switch (nextCueId) {
case 7:
- func_80AF346C(this, play);
+ EnRu2_InitCreditsPosition(this, play);
break;
case 8:
- func_80AF34F0(this);
+ EnRu2_SetupTurnHeadDownLeftAnimation(this);
break;
default:
- // "There is no such action!"
- PRINTF("En_Ru2_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Ru2_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Ru2_inEnding_Check_DemoMode: There is no such action!!!!!!!!\n"));
break;
}
this->cueId = nextCueId;
@@ -575,65 +712,71 @@ void func_80AF3564(EnRu2* this, PlayState* play) {
}
}
-void func_80AF3604(EnRu2* this, PlayState* play) {
- func_80AF3564(this, play);
+void EnRu2_CreditsInvisible(EnRu2* this, PlayState* play) {
+ EnRu2_NextCreditsAction(this, play);
}
-void func_80AF3624(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
+void EnRu2_CreditsFadeIn(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
- func_80AF33E0(this);
- func_80AF34A4(this);
+ EnRu2_UpdateEyes(this);
+ EnRu2_FadeInCredits(this);
+ EnRu2_CheckVisibleInCredits(this);
}
-void func_80AF366C(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
+void EnRu2_CreditsVisible(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
- func_80AF3564(this, play);
+ EnRu2_UpdateEyes(this);
+ EnRu2_NextCreditsAction(this, play);
}
-void func_80AF36AC(EnRu2* this, PlayState* play) {
- s32 something;
+void EnRu2_CreditsTurnHeadDownLeft(EnRu2* this, PlayState* play) {
+ s32 animDone;
- func_80AF2744(this, play);
- something = EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
- func_80AF3530(this, something);
+ EnRu2_UpdateBgCheckInfo(this, play);
+ animDone = EnRu2_UpdateSkelAnime(this);
+ EnRu2_UpdateEyes(this);
+ EnRu2_HoldLookingDownLeftPose(this, animDone);
}
-void func_80AF36EC(EnRu2* this, PlayState* play) {
- Flags_SetSwitch(play, func_80AF2690(this));
+void EnRu2_SetEncounterSwitchFlag(EnRu2* this, PlayState* play) {
+ Flags_SetSwitch(play, EnRu2_GetSwitchFlag(this));
}
-s32 func_80AF3718(EnRu2* this, PlayState* play) {
- return Flags_GetSwitch(play, func_80AF2690(this));
+s32 EnRu2_GetEncounterSwitchFlag(EnRu2* this, PlayState* play) {
+ return Flags_GetSwitch(play, EnRu2_GetSwitchFlag(this));
}
-void func_80AF3744(EnRu2* this, PlayState* play) {
- if (func_80AF3718(this, play)) {
+/**
+ * Initializes Ruto's actor in the Water Temple, or destroys it if the encounter already happened.
+ */
+void EnRu2_InitWaterTempleEncounter(EnRu2* this, PlayState* play) {
+ if (EnRu2_GetEncounterSwitchFlag(this, play)) {
Actor_Kill(&this->actor);
} else {
- func_80AF28E8(this, &gAdultRutoIdleAnim, 0, 0.0f, 0);
- this->action = 14;
- this->drawConfig = 1;
+ EnRu2_AnimationChange(this, &gAdultRutoIdleAnim, 0, 0.0f, 0);
+ this->action = ENRU2_WATER_TEMPLE_ENCOUNTER_RANGE_CHECK;
+ this->drawConfig = ENRU2_DRAW_OPA;
}
}
-void func_80AF37AC(void) {
+void EnRu2_PlayFanfare(void) {
Audio_PlayFanfare(NA_BGM_APPEAR);
}
-void func_80AF37CC(EnRu2* this) {
+/**
+ * Accelerates Ruto's actor upwards as she swims.
+ */
+void EnRu2_SwimUpProgress(EnRu2* this) {
f32 funcFloat;
- this->unk_2C0++;
- funcFloat = Environment_LerpWeightAccelDecel((kREG(2) + 0x96) & 0xFFFF, 0, this->unk_2C0, 8, 0);
+ this->swimmingUpFrame++;
+ funcFloat = Environment_LerpWeightAccelDecel((kREG(2) + 0x96) & 0xFFFF, 0, this->swimmingUpFrame, 8, 0);
this->actor.world.pos.y = this->actor.home.pos.y + (300.0f * funcFloat);
}
-s32 func_80AF383C(EnRu2* this, PlayState* play) {
+s32 EnRu2_IsPlayerInRangeForEncounter(EnRu2* this, PlayState* play) {
Player* player = GET_PLAYER(play);
f32 thisPosX = this->actor.world.pos.x;
f32 playerPosX = player->actor.world.pos.x;
@@ -644,32 +787,42 @@ s32 func_80AF383C(EnRu2* this, PlayState* play) {
return 0;
}
-void func_80AF3878(EnRu2* this, PlayState* play) {
- if (func_80AF383C(this, play) && !Play_InCsMode(play)) {
- this->action = 16;
+/**
+ * Checks if Link is close enough to Ruto and conditionally triggers the encounter cutscene in the Water Temple.
+ */
+void EnRu2_CheckRangeToStartEncounter(EnRu2* this, PlayState* play) {
+ if (EnRu2_IsPlayerInRangeForEncounter(this, play) && !Play_InCsMode(play)) {
+ this->action = ENRU2_WATER_TEMPLE_ENCOUNTER_BEGINNING;
OnePointCutscene_Init(play, 3130, -99, &this->actor, CAM_ID_MAIN);
}
}
-void func_80AF38D0(EnRu2* this, PlayState* play) {
- this->action = 16;
+/**
+ * Triggers the encounter cutscene in the Water Temple, unconditionally. Appears to be unused.
+ */
+void EnRu2_StartEncounter(EnRu2* this, PlayState* play) {
+ this->action = ENRU2_WATER_TEMPLE_ENCOUNTER_BEGINNING;
OnePointCutscene_Init(play, 3130, -99, &this->actor, CAM_ID_MAIN);
}
-void func_80AF390C(EnRu2* this, PlayState* play) {
- f32* unk_2C4 = &this->unk_2C4;
+/**
+ * Handles the starting moments of Ruto's encounter with Link at the Water Temple. Responds to a running timer to
+ * initiate, on cue, both the fanfare and Ruto's dialogue.
+ */
+void EnRu2_EncounterBeginningHandler(EnRu2* this, PlayState* play) {
+ f32* encounterTimer = &this->encounterTimer;
- *unk_2C4 += 1.0f;
- if (*unk_2C4 == kREG(6) + 40.0f) {
- func_80AF37AC();
- } else if (*unk_2C4 > kREG(4) + 50.0f) {
+ *encounterTimer += 1.0f;
+ if (*encounterTimer == kREG(6) + 40.0f) {
+ EnRu2_PlayFanfare();
+ } else if (*encounterTimer > kREG(4) + 50.0f) {
this->actor.textId = 0x403E;
Message_StartTextbox(play, this->actor.textId, NULL);
- this->action = 17;
+ this->action = ENRU2_WATER_TEMPLE_ENCOUNTER_DIALOG;
}
}
-void func_80AF39DC(EnRu2* this, PlayState* play) {
+void EnRu2_DialogCameraHandler(EnRu2* this, PlayState* play) {
s32 pad;
MessageContext* msgCtx;
s32 pad2;
@@ -681,11 +834,11 @@ void func_80AF39DC(EnRu2* this, PlayState* play) {
dialogState = Message_GetState(msgCtx);
if (dialogState == TEXT_STATE_DONE_FADING) {
- if (this->unk_2C3 != TEXT_STATE_DONE_FADING) {
+ if (this->lastDialogState != TEXT_STATE_DONE_FADING) {
// "I'm Komatsu!" (cinema scene dev)
PRINTF("おれが小松だ! \n");
- this->unk_2C2++;
- if (this->unk_2C2 % 6 == 3) {
+ this->textboxCount++;
+ if (this->textboxCount % 6 == 3) {
player = GET_PLAYER(play);
// "uorya-!" (screeming sound)
PRINTF("うおりゃー! \n");
@@ -697,82 +850,82 @@ void func_80AF39DC(EnRu2* this, PlayState* play) {
}
}
- this->unk_2C3 = dialogState;
+ this->lastDialogState = dialogState;
if (Message_GetState(msgCtx) == TEXT_STATE_CLOSING) {
- this->action = 18;
+ this->action = ENRU2_WATER_TEMPLE_ENCOUNTER_END;
Camera_SetFinishedFlag(GET_ACTIVE_CAM(play));
}
}
-void func_80AF3ADC(EnRu2* this, PlayState* play) {
- this->unk_2C4 += 1.0f;
- if (this->unk_2C4 > kREG(5) + 100.0f) {
- func_80AF28E8(this, &gAdultRutoSwimmingUpAnim, 0, -12.0f, 0);
- this->action = 19;
- func_80AF36EC(this, play);
+void EnRu2_StartSwimmingUp(EnRu2* this, PlayState* play) {
+ this->encounterTimer += 1.0f;
+ if (this->encounterTimer > kREG(5) + 100.0f) {
+ EnRu2_AnimationChange(this, &gAdultRutoSwimmingUpAnim, 0, -12.0f, 0);
+ this->action = ENRU2_WATER_TEMPLE_SWIMMING_UP;
+ EnRu2_SetEncounterSwitchFlag(this, play);
}
}
-void func_80AF3B74(EnRu2* this, PlayState* play) {
- if (this->unk_2C0 > ((((u16)(kREG(3) + 0x28)) + ((u16)(kREG(2) + 0x96))) & 0xFFFF)) {
+void EnRu2_EndSwimmingUp(EnRu2* this, PlayState* play) {
+ if (this->swimmingUpFrame > ((((u16)(kREG(3) + 0x28)) + ((u16)(kREG(2) + 0x96))) & 0xFFFF)) {
Actor_Kill(&this->actor);
}
}
-void func_80AF3BC8(EnRu2* this, PlayState* play) {
- func_80AF3878(this, play);
+void EnRu2_WaterTempleEncounterRangeCheck(EnRu2* this, PlayState* play) {
+ EnRu2_CheckRangeToStartEncounter(this, play);
Actor_SetFocus(&this->actor, 50.0f);
- func_80AF259C(this, play);
+ EnRu2_UpdateCollider(this, play);
}
-void func_80AF3C04(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
- func_80AF259C(this, play);
+void EnRu2_WaterTempleEncounterUnconditional(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
+ EnRu2_UpdateCollider(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
+ EnRu2_UpdateEyes(this);
Actor_SetFocus(&this->actor, 50.0f);
- func_80AF38D0(this, play);
+ EnRu2_StartEncounter(this, play);
}
-void func_80AF3C64(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
+void EnRu2_WaterTempleEncounterBegin(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
+ EnRu2_UpdateEyes(this);
Actor_SetFocus(&this->actor, 50.0f);
- func_80AF390C(this, play);
+ EnRu2_EncounterBeginningHandler(this, play);
}
-void func_80AF3CB8(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
+void EnRu2_WaterTempleEncounterDialog(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
+ EnRu2_UpdateEyes(this);
Actor_SetFocus(&this->actor, 50.0f);
- func_80AF39DC(this, play);
+ EnRu2_DialogCameraHandler(this, play);
}
-void func_80AF3D0C(EnRu2* this, PlayState* play) {
- func_80AF2744(this, play);
+void EnRu2_WaterTempleEncounterEnd(EnRu2* this, PlayState* play) {
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
+ EnRu2_UpdateEyes(this);
Actor_SetFocus(&this->actor, 50.0f);
- func_80AF3ADC(this, play);
+ EnRu2_StartSwimmingUp(this, play);
}
-void func_80AF3D60(EnRu2* this, PlayState* play) {
- func_80AF37CC(this);
- func_80AF2744(this, play);
+void EnRu2_WaterTempleSwimmingUp(EnRu2* this, PlayState* play) {
+ EnRu2_SwimUpProgress(this);
+ EnRu2_UpdateBgCheckInfo(this, play);
EnRu2_UpdateSkelAnime(this);
- func_80AF2608(this);
+ EnRu2_UpdateEyes(this);
Actor_SetFocus(&this->actor, 50.0f);
- func_80AF3B74(this, play);
+ EnRu2_EndSwimmingUp(this, play);
}
void EnRu2_Update(Actor* thisx, PlayState* play) {
EnRu2* this = (EnRu2*)thisx;
if ((this->action < 0) || (this->action >= ARRAY_COUNT(sActionFuncs)) || (sActionFuncs[this->action] == NULL)) {
- // "Main Mode is improper!"
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sActionFuncs[this->action](this, play);
@@ -782,35 +935,35 @@ void EnRu2_Init(Actor* thisx, PlayState* play) {
EnRu2* this = (EnRu2*)thisx;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
- func_80AF2550(thisx, play);
+ EnRu2_InitCollider(thisx, play);
SkelAnime_InitFlex(play, &this->skelAnime, &gAdultRutoSkel, NULL, this->jointTable, this->morphTable, 23);
- switch (func_80AF26A0(this)) {
+ switch (EnRu2_GetType(this)) {
case 2:
- func_80AF2E1C(this, play);
+ EnRu2_InitWaterTrial(this, play);
break;
case 3:
- func_80AF3394(this, play);
+ EnRu2_InitCredits(this, play);
break;
case 4:
- func_80AF3744(this, play);
+ EnRu2_InitWaterTempleEncounter(this, play);
break;
default:
- func_80AF2994(this, play);
+ EnRu2_InitChamberOfSages(this, play);
break;
}
- this->unk_2C2 = 0;
- this->unk_2C3 = TEXT_STATE_DONE_FADING;
+ this->textboxCount = 0;
+ this->lastDialogState = TEXT_STATE_DONE_FADING;
}
-void func_80AF3F14(EnRu2* this, PlayState* play) {
+void EnRu2_DrawNothing(EnRu2* this, PlayState* play) {
}
-void func_80AF3F20(EnRu2* this, PlayState* play) {
+void EnRu2_DrawOpa(EnRu2* this, PlayState* play) {
s32 pad[2];
- s16 temp = this->unk_2A4;
- void* tex = sEyeTextures[temp];
+ s16 eyeIndex = this->eyeIndex;
+ void* tex = sEyeTextures[eyeIndex];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(play->state.gfxCtx, "../z_en_ru2.c", 642);
@@ -832,8 +985,8 @@ void EnRu2_Draw(Actor* thisx, PlayState* play) {
if ((this->drawConfig < 0) || (this->drawConfig >= ARRAY_COUNT(sDrawFuncs)) ||
(sDrawFuncs[this->drawConfig] == NULL)) {
- // "Draw Mode is improper!"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sDrawFuncs[this->drawConfig](this, play);
diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h
index 530f0c4a57..ca051d1800 100644
--- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h
+++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h
@@ -2,30 +2,33 @@
#define Z_EN_RU2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+
+#define ENRU2_GET_SWITCH_FLAG(thisx) PARAMS_GET_U(thisx->actor.params, 8, 8)
+#define ENRU2_GET_TYPE(thisx) PARAMS_GET_U(thisx->actor.params, 0, 8)
struct EnRu2;
-typedef void (*EnRu2ActionFunc)(struct EnRu2*, PlayState*);
-typedef void (*EnRu2DrawFunc)(struct EnRu2*, PlayState*);
+typedef void (*EnRu2ActionFunc)(struct EnRu2*, struct PlayState*);
+typedef void (*EnRu2DrawFunc)(struct EnRu2*, struct PlayState*);
typedef struct EnRu2 {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ Vec3s jointTable[23];
/* 0x021A */ Vec3s morphTable[23];
- /* 0x02A4 */ s16 unk_2A4;
- /* 0x02A6 */ s16 unk_2A6;
+ /* 0x02A4 */ s16 eyeIndex;
+ /* 0x02A6 */ s16 blinkTimer;
/* 0x02A8 */ s32 action;
/* 0x02AC */ s32 drawConfig;
- /* 0x02B0 */ f32 unk_2B0;
+ /* 0x02B0 */ f32 fadeTimer;
/* 0x02B4 */ u32 alpha;
- /* 0x02B8 */ s32 unk_2B8;
+ /* 0x02B8 */ s32 isLightBall;
/* 0x02BC */ s32 cueId;
- /* 0x02C0 */ u16 unk_2C0;
- /* 0x02C2 */ u8 unk_2C2;
- /* 0x02C3 */ u8 unk_2C3;
- /* 0x02C4 */ f32 unk_2C4;
+ /* 0x02C0 */ u16 swimmingUpFrame;
+ /* 0x02C2 */ u8 textboxCount; // increments on advancement through dialogue in Water Temple
+ /* 0x02C3 */ u8 lastDialogState;
+ /* 0x02C4 */ f32 encounterTimer;
/* 0x02C8 */ ColliderCylinder collider;
} EnRu2; // size = 0x0314
diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2_cutscene_data.inc.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2_cutscene_data.inc.c
index 5a46e41014..4efe6fb390 100644
--- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2_cutscene_data.inc.c
+++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2_cutscene_data.inc.c
@@ -2,11 +2,11 @@
#include "z64cutscene_commands.h"
// clang-format off
-static CutsceneData D_80AF411C[] = {
- CS_BEGIN_CUTSCENE(35, 3338),
+static CutsceneData gWaterMedallionCs[] = {
+ CS_HEADER(35, 3338),
CS_UNK_DATA_LIST(0x00000020, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0xFFFFFFFC, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(31, 5),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_6_0, 5),
CS_ACTOR_CUE(0x0001, 0, 829, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 829, 830, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 830, 898, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
@@ -18,7 +18,7 @@ static CutsceneData D_80AF411C[] = {
CS_PLAYER_CUE(PLAYER_CUEID_3, 520, 550, 0x0000, 0x4000, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_PLAYER_CUE(PLAYER_CUEID_5, 550, 801, 0x0000, 0x4000, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_PLAYER_CUE(PLAYER_CUEID_19, 801, 1956, 0x0000, 0xC000, 0x0000, 0, 6, 0, 0, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(49, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_7_0, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -16, -121, 0, -16, -121, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_LIGHT_SETTING_LIST(5),
CS_LIGHT_SETTING(0x0004, 0, 384, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
@@ -26,9 +26,9 @@ static CutsceneData D_80AF411C[] = {
CS_LIGHT_SETTING(0x0004, 454, 554, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
CS_LIGHT_SETTING(0x0005, 554, 624, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
CS_LIGHT_SETTING(0x0004, 624, 3001, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(39, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_0_5, 1),
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, 0, -2, 0, 0, -2, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
- CS_ACTOR_CUE_LIST(42, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_3_2, 3),
CS_ACTOR_CUE(0x0001, 0, 146, 0x0000, 0x0000, 0x0000, 195, 6, 0, 195, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0002, 146, 754, 0x0000, 0x0000, 0x0000, 195, 6, 0, 195, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0003, 754, 2628, 0x0000, 0x0000, 0x0000, 195, 6, 0, 195, 6, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
@@ -197,28 +197,28 @@ static CutsceneData D_80AF411C[] = {
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 1000, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x0000),
CS_CAM_POINT(CS_CAM_CONTINUE, 0x00, 30, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x0000),
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x4289332C, 68.599945f), 0, 42, 16, 0x0164),
- CS_ACTOR_CUE_LIST(62, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_8_0, 1),
CS_ACTOR_CUE(0x0004, 0, 3000, 0xC10F, 0x0000, 0x0000, 77, 80, -2, 0, 80, 0, CS_FLOAT(0xBCD242E7, -0.025666667f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x3CD242E7, 0.025666667f)),
CS_TEXT_LIST(14),
CS_TEXT_NONE(0, 394),
- CS_TEXT(0x4041, 394, 444, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x4041, 394, 444, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(444, 464),
- CS_TEXT(0x4046, 464, 543, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x4046, 464, 543, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(543, 564),
- CS_TEXT(0x4049, 564, 613, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x4049, 564, 613, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(613, 634),
- CS_TEXT(0x4047, 634, 684, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x4047, 634, 684, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(684, 704),
- CS_TEXT(0x404A, 704, 750, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x404A, 704, 750, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(750, 1085),
- CS_TEXT(0x003D, 1085, 1090, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x003D, 1085, 1090, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_TEXT_NONE(1090, 1150),
- CS_TEXT(0x4042, 1150, 1160, 0x0000, 0x0000, 0x0000),
+ CS_TEXT(0x4042, 1150, 1160, CS_TEXT_NORMAL, 0x0000, 0x0000),
CS_DESTINATION(CS_DEST_LAKE_HYLIA_WATER_RESTORED, 1190, 1213),
CS_START_SEQ_LIST(1),
CS_START_SEQ(NA_BGM_MEDALLION_GET, 900, 901, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC7, 0x00000034, 0x00000000, 0xFFFFFFC7, 0x00000034),
CS_FADE_OUT_SEQ_LIST(1),
CS_FADE_OUT_SEQ(CS_FADE_OUT_BGM_MAIN, 800, 850, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC6, 0x00000030, 0x00000000, 0xFFFFFFC6, 0x00000030),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/src/overlays/actors/ovl_En_Sa/z_en_sa.c
index bd7f2d3b4f..fb834576fb 100644
--- a/src/overlays/actors/ovl_En_Sa/z_en_sa.c
+++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.c
@@ -1,10 +1,24 @@
#include "z_en_sa.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
+
+#include "attributes.h"
+#include "gfx.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_sa/object_sa.h"
#include "assets/scenes/overworld/spot04/spot04_scene.h"
#include "assets/scenes/overworld/spot05/spot05_scene.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnSa_Init(Actor* thisx, PlayState* play);
void EnSa_Destroy(Actor* thisx, PlayState* play);
@@ -155,7 +169,7 @@ u16 EnSa_GetTextId(PlayState* play, Actor* thisx) {
return 0x1047;
}
}
- if (GET_EVENTCHKINF(EVENTCHKINF_02)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_MIDO_DENIED_DEKU_TREE_ACCESS)) {
this->unk_208 = 0;
this->unk_209 = TEXT_STATE_NONE;
if (GET_INFTABLE(INFTABLE_03)) {
@@ -503,7 +517,7 @@ void EnSa_Init(Actor* thisx, PlayState* play) {
case 4:
this->unk_210 = 0;
this->actor.gravity = -1.0f;
- play->csCtx.script = SEGMENTED_TO_VIRTUAL(gSpot04Cs_10E20);
+ play->csCtx.script = SEGMENTED_TO_VIRTUAL(gKokiriForestSariaGreetingCs);
gSaveContext.cutsceneTrigger = 1;
EnSa_ChangeAnim(this, ENSA_ANIM1_4);
this->actionFunc = func_80AF68E4;
@@ -625,7 +639,7 @@ void func_80AF683C(EnSa* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!(player->actor.world.pos.z >= -2220.0f) && !Play_InCsMode(play)) {
- play->csCtx.script = SEGMENTED_TO_VIRTUAL(spot05_scene_Cs_005730);
+ play->csCtx.script = SEGMENTED_TO_VIRTUAL(gMeadowSariasSongCs);
gSaveContext.cutsceneTrigger = 1;
this->actionFunc = func_80AF68E4;
}
@@ -738,7 +752,7 @@ void EnSa_Update(Actor* thisx, PlayState* play) {
}
if (this->actionFunc != func_80AF68E4) {
- this->alpha = func_80034DD4(&this->actor, play, this->alpha, 400.0f);
+ this->alpha = Actor_UpdateAlphaByDistance(&this->actor, play, this->alpha, 400.0f);
} else {
this->alpha = 255;
}
diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.h b/src/overlays/actors/ovl_En_Sa/z_en_sa.h
index 27c2c740f0..0132877731 100644
--- a/src/overlays/actors/ovl_En_Sa/z_en_sa.h
+++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.h
@@ -2,11 +2,11 @@
#define Z_EN_SA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSa;
-typedef void (*EnSaActionFunc)(struct EnSa*, PlayState*);
+typedef void (*EnSaActionFunc)(struct EnSa*, struct PlayState*);
typedef struct EnSa {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c
index 647d321273..152f5ea753 100644
--- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c
+++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c
@@ -5,7 +5,18 @@
*/
#include "z_en_sb.h"
+
+#include "attributes.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "sfx.h"
#include "terminal.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_sb/object_sb.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.h b/src/overlays/actors/ovl_En_Sb/z_en_sb.h
index a6dbd2cdf8..f2f0e42adb 100644
--- a/src/overlays/actors/ovl_En_Sb/z_en_sb.h
+++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.h
@@ -2,11 +2,11 @@
#define Z_EN_SB_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSb;
-typedef void (*EnSbActionFunc)(struct EnSb*, PlayState*);
+typedef void (*EnSbActionFunc)(struct EnSb*, struct PlayState*);
typedef struct EnSb {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c
index 26d322f9b5..425b30b8f4 100644
--- a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c
+++ b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c
@@ -6,6 +6,10 @@
#include "z_en_scene_change.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "z64play.h"
+
#define FLAGS 0
void EnSceneChange_Init(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.h b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.h
index 4add7d11ee..d1fcb16d90 100644
--- a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.h
+++ b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.h
@@ -2,11 +2,11 @@
#define Z_ITEM_SCENE_CHANGE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSceneChange;
-typedef void (*EnSceneChangeActionFunc)(struct EnSceneChange*, PlayState*);
+typedef void (*EnSceneChangeActionFunc)(struct EnSceneChange*, struct PlayState*);
typedef struct EnSceneChange {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Sda/z_en_sda.c b/src/overlays/actors/ovl_En_Sda/z_en_sda.c
index 4452c86610..7cec1579b8 100644
--- a/src/overlays/actors/ovl_En_Sda/z_en_sda.c
+++ b/src/overlays/actors/ovl_En_Sda/z_en_sda.c
@@ -6,7 +6,15 @@
#include "z_en_sda.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnSda_Init(Actor* thisx, PlayState* play);
void EnSda_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Sda/z_en_sda.h b/src/overlays/actors/ovl_En_Sda/z_en_sda.h
index 4dd2abd3a6..27cba99665 100644
--- a/src/overlays/actors/ovl_En_Sda/z_en_sda.h
+++ b/src/overlays/actors/ovl_En_Sda/z_en_sda.h
@@ -2,7 +2,7 @@
#define Z_EN_SDA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSda;
diff --git a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c
index 8eb853a808..4e082fcd47 100644
--- a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c
+++ b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c
@@ -5,6 +5,18 @@
*/
#include "z_en_shopnuts.h"
+#include "overlays/actors/ovl_En_Dns/z_en_dns.h"
+#include "overlays/actors/ovl_En_Nutsball/z_en_nutsball.h"
+
+#include "gfx.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
+#include "assets/objects/object_shopnuts/object_shopnuts.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
diff --git a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.h b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.h
index 33971269f7..8bea3a0a68 100644
--- a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.h
+++ b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.h
@@ -2,15 +2,14 @@
#define Z_EN_SHOPNUTS_H
#include "ultra64.h"
-#include "global.h"
-#include "overlays/actors/ovl_En_Dns/z_en_dns.h"
-#include "overlays/actors/ovl_En_Nutsball/z_en_nutsball.h"
+#include "z64actor.h"
+#include "assets/objects/object_shopnuts/object_shopnuts.h"
struct EnShopnuts;
#define SHOPNUTS_GET_TYPE(thisx) ((thisx)->params)
-typedef void (*EnShopnutsActionFunc)(struct EnShopnuts*, PlayState*);
+typedef void (*EnShopnutsActionFunc)(struct EnShopnuts*, struct PlayState*);
typedef struct EnShopnuts {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Si/z_en_si.c b/src/overlays/actors/ovl_En_Si/z_en_si.c
index f6619976d8..b5bf27be16 100644
--- a/src/overlays/actors/ovl_En_Si/z_en_si.c
+++ b/src/overlays/actors/ovl_En_Si/z_en_si.c
@@ -6,7 +6,15 @@
#include "z_en_si.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_9)
+#include "sequence.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64draw.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR)
void EnSi_Init(Actor* thisx, PlayState* play);
void EnSi_Destroy(Actor* thisx, PlayState* play);
@@ -80,7 +88,7 @@ s32 func_80AFB748(EnSi* this, PlayState* play) {
void func_80AFB768(EnSi* this, PlayState* play) {
Player* player = GET_PLAYER(play);
- if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) {
+ if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
this->actionFunc = func_80AFB89C;
} else {
Math_SmoothStepToF(&this->actor.scale.x, 0.25f, 0.4f, 1.0f, 0.0f);
@@ -113,7 +121,7 @@ void func_80AFB89C(EnSi* this, PlayState* play) {
Actor_SetScale(&this->actor, this->actor.scale.x);
this->actor.shape.rot.y += 0x400;
- if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) {
+ if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
Item_Give(play, ITEM_SKULL_TOKEN);
player->actor.freezeTimer = 10;
Message_StartTextbox(play, 0xB4, NULL);
diff --git a/src/overlays/actors/ovl_En_Si/z_en_si.h b/src/overlays/actors/ovl_En_Si/z_en_si.h
index b52e831a30..a4ec863028 100644
--- a/src/overlays/actors/ovl_En_Si/z_en_si.h
+++ b/src/overlays/actors/ovl_En_Si/z_en_si.h
@@ -2,11 +2,11 @@
#define Z_EN_SI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSi;
-typedef void (*EnSiActionFunc)(struct EnSi*, PlayState*);
+typedef void (*EnSiActionFunc)(struct EnSi*, struct PlayState*);
typedef struct EnSi {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c
index 20a655101a..ecdab8d5b2 100644
--- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c
+++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c
@@ -5,9 +5,23 @@
*/
#include "z_en_siofuki.h"
+
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_siofuki/object_siofuki.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnSiofuki_Init(Actor* thisx, PlayState* play);
void EnSiofuki_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.h b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.h
index 23074bfac1..56a08bff6f 100644
--- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.h
+++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.h
@@ -2,7 +2,7 @@
#define Z_EN_SIOFUKI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum EnSiofukiType {
/* 0x00 */ EN_SIOFUKI_RAISING,
@@ -11,7 +11,7 @@ typedef enum EnSiofukiType {
struct EnSiofuki;
-typedef void (*EnSiofukiActionFunc)(struct EnSiofuki*, PlayState*);
+typedef void (*EnSiofukiActionFunc)(struct EnSiofuki*, struct PlayState*);
typedef struct EnSiofuki {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c
index 824528d5d9..52e521df9c 100644
--- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c
+++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c
@@ -6,9 +6,24 @@
#include "z_en_skb.h"
#include "overlays/actors/ovl_En_Encount1/z_en_encount1.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_skb/object_skb.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
typedef enum StalchildBehavior {
SKB_BEHAVIOR_BURIED,
@@ -160,7 +175,7 @@ void EnSkb_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.damageTable = &sDamageTable;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
this->actor.focus.pos = this->actor.world.pos;
- this->actor.colChkInfo.mass = 0xFE;
+ this->actor.colChkInfo.mass = MASS_HEAVY;
this->actor.colChkInfo.health = 2;
this->actor.shape.yOffset = -8000.0f;
SkelAnime_Init(play, &this->skelAnime, &gStalchildSkel, &gStalchildUncurlingAnim, this->jointTable,
@@ -168,7 +183,7 @@ void EnSkb_Init(Actor* thisx, PlayState* play) {
this->actor.naviEnemyId = NAVI_ENEMY_STALCHILD;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItem);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
Actor_SetScale(&this->actor, ((this->actor.params * 0.1f) + 1.0f) * 0.01f);
this->collider.elements[0].dim.modelSphere.radius = this->collider.elements[0].dim.worldSphere.radius =
diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.h b/src/overlays/actors/ovl_En_Skb/z_en_skb.h
index 216b5848cc..dd96d9e16e 100644
--- a/src/overlays/actors/ovl_En_Skb/z_en_skb.h
+++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.h
@@ -2,11 +2,11 @@
#define Z_EN_SKB_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSkb;
-typedef void (*EnSkbActionFunc)(struct EnSkb*, PlayState*);
+typedef void (*EnSkbActionFunc)(struct EnSkb*, struct PlayState*);
typedef struct EnSkb {
/* 0x0000 */ Actor actor;
@@ -21,7 +21,7 @@ typedef struct EnSkb {
/* 0x0288 */ s16 headlessYawOffset;
/* 0x028C */ BodyBreak bodyBreak;
/* 0x02A4 */ ColliderJntSph collider;
- /* 0x02C4 */ ColliderJntSphElement colliderItem[2];
+ /* 0x02C4 */ ColliderJntSphElement colliderElements[2];
} EnSkb; // size = 0x0344
#endif
diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c
index 16fb37be74..52b1c4ae3f 100644
--- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c
+++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c
@@ -1,8 +1,31 @@
#include "z_en_skj.h"
#include "overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64debug_display.h"
+#include "z64face_reaction.h"
+#include "z64ocarina.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_skj/object_skj.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_UPDATE_DURING_OCARINA)
void EnSkj_Init(Actor* thisx, PlayState* play2);
void EnSkj_Destroy(Actor* thisx, PlayState* play);
@@ -412,7 +435,7 @@ void EnSkj_Init(Actor* thisx, PlayState* play2) {
}
if ((type < 0) || (type >= 7)) {
- this->actor.flags &= ~ACTOR_FLAG_25;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_DURING_OCARINA;
}
if ((type > 0) && (type < 3)) {
@@ -444,7 +467,7 @@ void EnSkj_Init(Actor* thisx, PlayState* play2) {
this->actor.gravity = -1.0f;
EnSkj_CalculateCenter(this);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
{
Player* player = GET_PLAYER(play);
@@ -1349,7 +1372,7 @@ void EnSkj_SariasSongShortStumpUpdate(Actor* thisx, PlayState* play) {
D_80B01EA0 = Actor_TalkOfferAccepted(&this->actor, play);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 255, 0, 0, 255, 4, play->state.gfxCtx);
@@ -1591,7 +1614,7 @@ void EnSkj_OcarinaMinigameShortStumpUpdate(Actor* thisx, PlayState* play) {
this->actor.focus.pos.y = -90.0f;
this->actor.focus.pos.z = 450.0f;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.h b/src/overlays/actors/ovl_En_Skj/z_en_skj.h
index dc0f97cc92..1d49c81c42 100644
--- a/src/overlays/actors/ovl_En_Skj/z_en_skj.h
+++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.h
@@ -2,11 +2,11 @@
#define Z_EN_SKJ_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSkj;
-typedef void (*EnSkjActionFunc)(struct EnSkj*, PlayState*);
+typedef void (*EnSkjActionFunc)(struct EnSkj*, struct PlayState*);
typedef struct EnSkj {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c
index 14da6adb97..91e9273054 100644
--- a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c
+++ b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c
@@ -5,9 +5,16 @@
*/
#include "z_en_skjneedle.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+
#include "assets/objects/object_skj/object_skj.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_9)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR)
void EnSkjneedle_Init(Actor* thisx, PlayState* play);
void EnSkjneedle_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.h b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.h
index 1c4f444946..08ec8f4639 100644
--- a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.h
+++ b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.h
@@ -2,7 +2,7 @@
#define Z_EN_SKJNEEDLE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSkjneedle;
diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c
index 09fa048cae..95abf52374 100644
--- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c
+++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c
@@ -1,7 +1,22 @@
#include "z_en_ssh.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ssh/object_ssh.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
#define SSH_STATE_STUNNED (1 << 0)
#define SSH_STATE_GROUND_START (1 << 2)
@@ -196,25 +211,25 @@ void EnSsh_InitColliders(EnSsh* this, PlayState* play) {
s32 pad;
for (i = 0; i < ARRAY_COUNT(cylinders); i++) {
- Collider_InitCylinder(play, &this->colCylinder[i]);
- Collider_SetCylinder(play, &this->colCylinder[i], &this->actor, cylinders[i]);
+ Collider_InitCylinder(play, &this->colliderCylinders[i]);
+ Collider_SetCylinder(play, &this->colliderCylinders[i], &this->actor, cylinders[i]);
}
- this->colCylinder[0].elem.acDmgInfo.dmgFlags =
+ this->colliderCylinders[0].elem.acDmgInfo.dmgFlags =
DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT;
- this->colCylinder[1].elem.acDmgInfo.dmgFlags =
+ this->colliderCylinders[1].elem.acDmgInfo.dmgFlags =
DMG_DEFAULT & ~(DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT) &
~(DMG_MAGIC_LIGHT | DMG_MAGIC_ICE);
- this->colCylinder[2].base.colMaterial = COL_MATERIAL_METAL;
- this->colCylinder[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO;
- this->colCylinder[2].elem.elemMaterial = ELEM_MATERIAL_UNK2;
- this->colCylinder[2].elem.acDmgInfo.dmgFlags =
+ this->colliderCylinders[2].base.colMaterial = COL_MATERIAL_METAL;
+ this->colliderCylinders[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO;
+ this->colliderCylinders[2].elem.elemMaterial = ELEM_MATERIAL_UNK2;
+ this->colliderCylinders[2].elem.acDmgInfo.dmgFlags =
DMG_DEFAULT & ~(DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(2), &sColChkInfoInit);
- Collider_InitJntSph(play, &this->colSph);
- Collider_SetJntSph(play, &this->colSph, &this->actor, &sJntSphInit, this->colSphElements);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
}
f32 EnSsh_SetAnimation(EnSsh* this, s32 animIndex) {
@@ -268,21 +283,21 @@ void EnSsh_SetColliderScale(EnSsh* this, f32 scale, f32 radiusMod) {
f32 yShift;
s32 i;
- radius = this->colSph.elements[0].dim.modelSphere.radius;
+ radius = this->colliderJntSph.elements[0].dim.modelSphere.radius;
radius *= scale;
- this->colSph.elements[0].dim.modelSphere.radius = radius;
+ this->colliderJntSph.elements[0].dim.modelSphere.radius = radius;
for (i = 0; i < 6; i++) {
- yShift = this->colCylinder[i].dim.yShift;
- radius = this->colCylinder[i].dim.radius;
- height = this->colCylinder[i].dim.height;
+ yShift = this->colliderCylinders[i].dim.yShift;
+ radius = this->colliderCylinders[i].dim.radius;
+ height = this->colliderCylinders[i].dim.height;
yShift *= scale;
radius *= scale * radiusMod;
height *= scale;
- this->colCylinder[i].dim.yShift = yShift;
- this->colCylinder[i].dim.radius = radius;
- this->colCylinder[i].dim.height = height;
+ this->colliderCylinders[i].dim.yShift = yShift;
+ this->colliderCylinders[i].dim.radius = radius;
+ this->colliderCylinders[i].dim.height = height;
}
Actor_SetScale(&this->actor, 0.04f * scale);
this->floorHeightOffset = 40.0f * scale;
@@ -434,17 +449,17 @@ void EnSsh_Sway(EnSsh* this) {
}
void EnSsh_CheckBodyStickHit(EnSsh* this, PlayState* play) {
- ColliderElement* elem = &this->colCylinder[0].elem;
+ ColliderElement* elem = &this->colliderCylinders[0].elem;
Player* player = GET_PLAYER(play);
if (player->unk_860 != 0) {
elem->acDmgInfo.dmgFlags |= DMG_DEKU_STICK;
- this->colCylinder[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK;
- this->colCylinder[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK;
+ this->colliderCylinders[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK;
+ this->colliderCylinders[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK;
} else {
elem->acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK;
- this->colCylinder[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK;
- this->colCylinder[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK;
+ this->colliderCylinders[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK;
+ this->colliderCylinders[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK;
}
}
@@ -456,8 +471,8 @@ s32 EnSsh_CheckHitPlayer(EnSsh* this, PlayState* play) {
return false;
}
for (i = 0; i < 3; i++) {
- if (this->colCylinder[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) {
- this->colCylinder[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER;
+ if (this->colliderCylinders[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) {
+ this->colliderCylinders[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER;
hit = true;
}
}
@@ -471,7 +486,7 @@ s32 EnSsh_CheckHitPlayer(EnSsh* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_STALTU_ROLL);
Actor_PlaySfx(&this->actor, NA_SE_VO_ST_ATTACK);
play->damagePlayer(play, -8);
- func_8002F71C(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
this->hitCount--;
return true;
}
@@ -479,13 +494,13 @@ s32 EnSsh_CheckHitPlayer(EnSsh* this, PlayState* play) {
s32 EnSsh_CheckHitFront(EnSsh* this) {
u32 acFlags;
- if (this->colCylinder[2].base.acFlags) {} // Needed for matching
- acFlags = this->colCylinder[2].base.acFlags;
+ if (this->colliderCylinders[2].base.acFlags) {} // Needed for matching
+ acFlags = this->colliderCylinders[2].base.acFlags;
if (!!(acFlags & AC_HIT) == 0) {
return 0;
} else {
- this->colCylinder[2].base.acFlags &= ~AC_HIT;
+ this->colliderCylinders[2].base.acFlags &= ~AC_HIT;
this->invincibilityTimer = 8;
if ((this->swayTimer == 0) && (this->hitTimer == 0) && (this->stunTimer == 0)) {
this->swayTimer = 60;
@@ -495,16 +510,16 @@ s32 EnSsh_CheckHitFront(EnSsh* this) {
}
s32 EnSsh_CheckHitBack(EnSsh* this, PlayState* play) {
- ColliderCylinder* cyl = &this->colCylinder[0];
+ ColliderCylinder* collider = &this->colliderCylinders[0];
s32 hit = false;
- if (cyl->base.acFlags & AC_HIT) {
- cyl->base.acFlags &= ~AC_HIT;
+ if (collider->base.acFlags & AC_HIT) {
+ collider->base.acFlags &= ~AC_HIT;
hit = true;
}
- cyl = &this->colCylinder[1];
- if (cyl->base.acFlags & AC_HIT) {
- cyl->base.acFlags &= ~AC_HIT;
+ collider = &this->colliderCylinders[1];
+ if (collider->base.acFlags & AC_HIT) {
+ collider->base.acFlags &= ~AC_HIT;
hit = true;
}
if (!hit) {
@@ -545,19 +560,19 @@ s32 EnSsh_CollisionCheck(EnSsh* this, PlayState* play) {
}
void EnSsh_SetBodyCylinderAC(EnSsh* this, PlayState* play) {
- Collider_UpdateCylinder(&this->actor, &this->colCylinder[0]);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[0].base);
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[0]);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[0].base);
}
void EnSsh_SetLegsCylinderAC(EnSsh* this, PlayState* play) {
s16 angleTowardsLink = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y));
if (angleTowardsLink < 90 * (0x10000 / 360)) {
- Collider_UpdateCylinder(&this->actor, &this->colCylinder[2]);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[2].base);
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[2]);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[2].base);
} else {
- Collider_UpdateCylinder(&this->actor, &this->colCylinder[1]);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[1].base);
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[1]);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[1].base);
}
}
@@ -580,18 +595,18 @@ s32 EnSsh_SetCylinderOC(EnSsh* this, PlayState* play) {
Matrix_RotateY(BINANG_TO_RAD_ALT(this->initialYaw), MTXMODE_APPLY);
Matrix_MultVec3f(&cyloffsets[i], &cylPos);
Matrix_Pop();
- this->colCylinder[i + 3].dim.pos.x = cylPos.x;
- this->colCylinder[i + 3].dim.pos.y = cylPos.y;
- this->colCylinder[i + 3].dim.pos.z = cylPos.z;
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colCylinder[i + 3].base);
+ this->colliderCylinders[i + 3].dim.pos.x = cylPos.x;
+ this->colliderCylinders[i + 3].dim.pos.y = cylPos.y;
+ this->colliderCylinders[i + 3].dim.pos.z = cylPos.z;
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinders[i + 3].base);
}
return 1;
}
void EnSsh_SetColliders(EnSsh* this, PlayState* play) {
if (this->actor.colChkInfo.health == 0) {
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colSph.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colSph.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
} else {
if (this->hitTimer == 0) {
EnSsh_SetCylinderOC(this, play);
@@ -643,9 +658,9 @@ void EnSsh_Destroy(Actor* thisx, PlayState* play) {
Effect_Delete(play, this->blureIdx);
for (i = 0; i < 6; i++) {
- Collider_DestroyCylinder(play, &this->colCylinder[i]);
+ Collider_DestroyCylinder(play, &this->colliderCylinders[i]);
}
- Collider_DestroyJntSph(play, &this->colSph);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
}
void EnSsh_Wait(EnSsh* this, PlayState* play) {
@@ -867,7 +882,7 @@ s32 EnSsh_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
void EnSsh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnSsh* this = (EnSsh*)thisx;
- Collider_UpdateSpheres(limbIndex, &this->colSph);
+ Collider_UpdateSpheres(limbIndex, &this->colliderJntSph);
}
void EnSsh_Draw(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h
index 3060fb6fb7..741770cec5 100644
--- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h
+++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h
@@ -2,11 +2,11 @@
#define Z_EN_SSH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSsh;
-typedef void (*EnSshActionFunc)(struct EnSsh*, PlayState*);
+typedef void (*EnSshActionFunc)(struct EnSsh*, struct PlayState*);
typedef struct EnSsh {
/* 0x0000 */ Actor actor;
@@ -14,9 +14,9 @@ typedef struct EnSsh {
/* 0x0190 */ Vec3s jointTable[30];
/* 0x0244 */ Vec3s morphTable[30];
/* 0x02F8 */ EnSshActionFunc actionFunc;
- /* 0x02FC */ ColliderCylinder colCylinder[6];
- /* 0x04C4 */ ColliderJntSph colSph;
- /* 0x04E4 */ ColliderJntSphElement colSphElements[1];
+ /* 0x02FC */ ColliderCylinder colliderCylinders[6];
+ /* 0x04C4 */ ColliderJntSph colliderJntSph;
+ /* 0x04E4 */ ColliderJntSphElement colliderJntSphElements[1];
/* 0x0524 */ s16 initialYaw;
/* 0x0526 */ s16 maxTurnRate;
/* 0x0528 */ s16 unkTimer;
diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c
index 69b1f17244..d0e8f79ecc 100644
--- a/src/overlays/actors/ovl_En_St/z_en_st.c
+++ b/src/overlays/actors/ovl_En_St/z_en_st.c
@@ -5,9 +5,24 @@
*/
#include "z_en_st.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_st/object_st.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnSt_Init(Actor* thisx, PlayState* play);
void EnSt_Destroy(Actor* thisx, PlayState* play);
@@ -281,58 +296,58 @@ void EnSt_InitColliders(EnSt* this, PlayState* play) {
s32 pad;
for (i = 0; i < ARRAY_COUNT(cylinders); i++) {
- Collider_InitCylinder(play, &this->colCylinder[i]);
- Collider_SetCylinder(play, &this->colCylinder[i], &this->actor, cylinders[i]);
+ Collider_InitCylinder(play, &this->colliderCylinders[i]);
+ Collider_SetCylinder(play, &this->colliderCylinders[i], &this->actor, cylinders[i]);
}
- this->colCylinder[0].elem.acDmgInfo.dmgFlags =
+ this->colliderCylinders[0].elem.acDmgInfo.dmgFlags =
DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT;
- this->colCylinder[1].elem.acDmgInfo.dmgFlags =
+ this->colliderCylinders[1].elem.acDmgInfo.dmgFlags =
DMG_DEFAULT &
~(DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT) &
~(DMG_MAGIC_LIGHT | DMG_MAGIC_ICE);
- this->colCylinder[2].base.colMaterial = COL_MATERIAL_METAL;
- this->colCylinder[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO;
- this->colCylinder[2].elem.elemMaterial = ELEM_MATERIAL_UNK2;
- this->colCylinder[2].elem.acDmgInfo.dmgFlags =
+ this->colliderCylinders[2].base.colMaterial = COL_MATERIAL_METAL;
+ this->colliderCylinders[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO;
+ this->colliderCylinders[2].elem.elemMaterial = ELEM_MATERIAL_UNK2;
+ this->colliderCylinders[2].elem.acDmgInfo.dmgFlags =
DMG_DEFAULT &
~(DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(2), &sColChkInit);
- Collider_InitJntSph(play, &this->colSph);
- Collider_SetJntSph(play, &this->colSph, &this->actor, &sJntSphInit, this->colSphItems);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
}
void EnSt_CheckBodyStickHit(EnSt* this, PlayState* play) {
- ColliderElement* bodyElem = &this->colCylinder[0].elem;
+ ColliderElement* bodyElem = &this->colliderCylinders[0].elem;
Player* player = GET_PLAYER(play);
if (player->unk_860 != 0) {
bodyElem->acDmgInfo.dmgFlags |= DMG_DEKU_STICK;
- this->colCylinder[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK;
- this->colCylinder[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK;
+ this->colliderCylinders[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK;
+ this->colliderCylinders[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK;
} else {
bodyElem->acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK;
- this->colCylinder[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK;
- this->colCylinder[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK;
+ this->colliderCylinders[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK;
+ this->colliderCylinders[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK;
}
}
void EnSt_SetBodyCylinderAC(EnSt* this, PlayState* play) {
- Collider_UpdateCylinder(&this->actor, &this->colCylinder[0]);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[0].base);
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[0]);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[0].base);
}
void EnSt_SetLegsCylinderAC(EnSt* this, PlayState* play) {
s16 angleTowardsLink = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y));
if (angleTowardsLink < 0x3FFC) {
- Collider_UpdateCylinder(&this->actor, &this->colCylinder[2]);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[2].base);
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[2]);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[2].base);
} else {
- Collider_UpdateCylinder(&this->actor, &this->colCylinder[1]);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[1].base);
+ Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[1]);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[1].base);
}
}
@@ -352,13 +367,13 @@ s32 EnSt_SetCylinderOC(EnSt* this, PlayState* play) {
cyloffsets[i].z *= this->colliderScale;
Matrix_Push();
Matrix_Translate(cylPos.x, cylPos.y, cylPos.z, MTXMODE_NEW);
- Matrix_RotateY(BINANG_TO_RAD_ALT(this->initalYaw), MTXMODE_APPLY);
+ Matrix_RotateY(BINANG_TO_RAD_ALT(this->initialYaw), MTXMODE_APPLY);
Matrix_MultVec3f(&cyloffsets[i], &cylPos);
Matrix_Pop();
- this->colCylinder[i + 3].dim.pos.x = cylPos.x;
- this->colCylinder[i + 3].dim.pos.y = cylPos.y;
- this->colCylinder[i + 3].dim.pos.z = cylPos.z;
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colCylinder[i + 3].base);
+ this->colliderCylinders[i + 3].dim.pos.x = cylPos.x;
+ this->colliderCylinders[i + 3].dim.pos.y = cylPos.y;
+ this->colliderCylinders[i + 3].dim.pos.z = cylPos.z;
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinders[i + 3].base);
}
return true;
@@ -386,10 +401,10 @@ s32 EnSt_CheckHitPlayer(EnSt* this, PlayState* play) {
s32 i;
for (i = 0, hit = 0; i < 3; i++) {
- if (((this->colCylinder[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) != 0) == 0) {
+ if (((this->colliderCylinders[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) != 0) == 0) {
continue;
}
- this->colCylinder[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER;
+ this->colliderCylinders[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER;
hit = true;
}
@@ -404,18 +419,18 @@ s32 EnSt_CheckHitPlayer(EnSt* this, PlayState* play) {
this->gaveDamageSpinTimer = 30;
play->damagePlayer(play, -8);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
- func_8002F71C(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
+ Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
return true;
}
s32 EnSt_CheckHitFrontside(EnSt* this) {
- u8 acFlags = this->colCylinder[2].base.acFlags;
+ u8 acFlags = this->colliderCylinders[2].base.acFlags;
if (!!(acFlags & AC_HIT) == 0) {
// not hit
return false;
} else {
- this->colCylinder[2].base.acFlags &= ~AC_HIT;
+ this->colliderCylinders[2].base.acFlags &= ~AC_HIT;
this->invulnerableTimer = 8;
this->playSwayFlag = 0;
this->swayTimer = 60;
@@ -424,21 +439,21 @@ s32 EnSt_CheckHitFrontside(EnSt* this) {
}
s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) {
- ColliderCylinder* cyl = &this->colCylinder[0];
+ ColliderCylinder* collider = &this->colliderCylinders[0];
s32 flags = 0; // damage flags from colliders 0 and 1
s32 hit = false;
- if (cyl->base.acFlags & AC_HIT) {
- cyl->base.acFlags &= ~AC_HIT;
+ if (collider->base.acFlags & AC_HIT) {
+ collider->base.acFlags &= ~AC_HIT;
hit = true;
- flags |= cyl->elem.acHitElem->atDmgInfo.dmgFlags;
+ flags |= collider->elem.acHitElem->atDmgInfo.dmgFlags;
}
- cyl = &this->colCylinder[1];
- if (cyl->base.acFlags & AC_HIT) {
- cyl->base.acFlags &= ~AC_HIT;
+ collider = &this->colliderCylinders[1];
+ if (collider->base.acFlags & AC_HIT) {
+ collider->base.acFlags &= ~AC_HIT;
hit = true;
- flags |= cyl->elem.acHitElem->atDmgInfo.dmgFlags;
+ flags |= collider->elem.acHitElem->atDmgInfo.dmgFlags;
}
if (!hit) {
@@ -519,21 +534,21 @@ void EnSt_SetColliderScale(EnSt* this) {
scaleAmount = 1.4f;
}
- radius = this->colSph.elements[0].dim.modelSphere.radius;
+ radius = this->colliderJntSph.elements[0].dim.modelSphere.radius;
radius *= scaleAmount;
- this->colSph.elements[0].dim.modelSphere.radius = radius;
+ this->colliderJntSph.elements[0].dim.modelSphere.radius = radius;
for (i = 0; i < 6; i++) {
- yShift = this->colCylinder[i].dim.yShift;
- radius = this->colCylinder[i].dim.radius;
- height = this->colCylinder[i].dim.height;
+ yShift = this->colliderCylinders[i].dim.yShift;
+ radius = this->colliderCylinders[i].dim.radius;
+ height = this->colliderCylinders[i].dim.height;
yShift *= scaleAmount;
radius *= scaleAmount;
height *= scaleAmount;
- this->colCylinder[i].dim.yShift = yShift;
- this->colCylinder[i].dim.radius = radius;
- this->colCylinder[i].dim.height = height;
+ this->colliderCylinders[i].dim.yShift = yShift;
+ this->colliderCylinders[i].dim.radius = radius;
+ this->colliderCylinders[i].dim.height = height;
}
Actor_SetScale(&this->actor, 0.04f * scaleAmount);
this->colliderScale = scaleAmount;
@@ -563,7 +578,9 @@ s32 EnSt_DecrStunTimer(EnSt* this) {
if (this->stunTimer == 0) {
return 0;
}
- this->stunTimer--; //! @bug no return but v0 ends up being stunTimer before decrement
+ this->stunTimer--;
+ //! @bug No return, v0 ends up being stunTimer before decrement.
+ //! The return value is not used so it doesn't matter.
}
/**
@@ -623,7 +640,7 @@ void EnSt_UpdateYaw(EnSt* this, PlayState* play) {
// calculate the new yaw to or away from the player.
rot = this->actor.shape.rot;
- yawTarget = (this->actionFunc == EnSt_WaitOnGround ? this->actor.yawTowardsPlayer : this->initalYaw);
+ yawTarget = (this->actionFunc == EnSt_WaitOnGround ? this->actor.yawTowardsPlayer : this->initialYaw);
yawDiff = rot.y - (yawTarget ^ yawDir);
if (ABS(yawDiff) <= 0x4000) {
Math_SmoothStepToS(&rot.y, yawTarget ^ yawDir, 4, 0x2000, 1);
@@ -714,7 +731,7 @@ s32 EnSt_IsCloseToPlayer(EnSt* this, PlayState* play) {
return true;
}
-s32 EnSt_IsCloseToInitalPos(EnSt* this) {
+s32 EnSt_IsCloseToInitialPos(EnSt* this) {
f32 velY = this->actor.velocity.y;
f32 checkY = this->actor.world.pos.y + (velY * 2.0f);
@@ -798,11 +815,11 @@ void EnSt_Init(Actor* thisx, PlayState* play) {
this->actor.naviEnemyId = NAVI_ENEMY_SKULLTULA;
}
EnSt_CheckCeilingPos(this, play);
- this->actor.flags |= ACTOR_FLAG_14;
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_CAN_ATTACH_TO_ARROW;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
EnSt_SetColliderScale(this);
this->actor.gravity = 0.0f;
- this->initalYaw = this->actor.world.rot.y;
+ this->initialYaw = this->actor.world.rot.y;
EnSt_SetupAction(this, EnSt_StartOnCeilingOrGround);
}
@@ -812,9 +829,9 @@ void EnSt_Destroy(Actor* thisx, PlayState* play) {
Effect_Delete(play, this->blureIdx);
for (i = 0; i < 6; i++) {
- Collider_DestroyCylinder(play, &this->colCylinder[i]);
+ Collider_DestroyCylinder(play, &this->colliderCylinders[i]);
}
- Collider_DestroyJntSph(play, &this->colSph);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
}
void EnSt_WaitOnCeiling(EnSt* this, PlayState* play) {
@@ -926,7 +943,7 @@ void EnSt_ReturnToCeiling(EnSt* this, PlayState* play) {
// player came back into range
EnSt_SetDropAnimAndVel(this);
EnSt_SetupAction(this, EnSt_MoveToGround);
- } else if (EnSt_IsCloseToInitalPos(this)) {
+ } else if (EnSt_IsCloseToInitialPos(this)) {
// the Skulltula is close to the initial postion.
EnSt_SetWaitingAnimation(this);
EnSt_SetupAction(this, EnSt_WaitOnCeiling);
@@ -1013,7 +1030,7 @@ void EnSt_Update(Actor* thisx, PlayState* play) {
s32 pad;
Color_RGBA8 color = { 0, 0, 0, 0 };
- if (this->actor.flags & ACTOR_FLAG_15) {
+ if (this->actor.flags & ACTOR_FLAG_ATTACHED_TO_ARROW) {
SkelAnime_Update(&this->skelAnime);
} else if (!EnSt_CheckColliders(this, play)) {
// no collision has been detected.
@@ -1081,7 +1098,7 @@ s32 EnSt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dListP, Vec3f* p
void EnSt_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dListP, Vec3s* rot, void* thisx) {
EnSt* this = (EnSt*)thisx;
- Collider_UpdateSpheres(limbIndex, &this->colSph);
+ Collider_UpdateSpheres(limbIndex, &this->colliderJntSph);
}
void EnSt_Draw(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_St/z_en_st.h b/src/overlays/actors/ovl_En_St/z_en_st.h
index 5b65c82e42..08e9e8bd8d 100644
--- a/src/overlays/actors/ovl_En_St/z_en_st.h
+++ b/src/overlays/actors/ovl_En_St/z_en_st.h
@@ -2,20 +2,20 @@
#define Z_EN_ST_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSt;
-typedef void (*EnStActionFunc)(struct EnSt* this, PlayState* play);
+typedef void (*EnStActionFunc)(struct EnSt* this, struct PlayState* play);
typedef struct EnSt {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ EnStActionFunc actionFunc;
- /* 0x0194 */ ColliderCylinder colCylinder[6];
- /* 0x035C */ ColliderJntSph colSph;
- /* 0x037C */ ColliderJntSphElement colSphItems[1];
- /* 0x03BC */ s16 initalYaw;
+ /* 0x0194 */ ColliderCylinder colliderCylinders[6];
+ /* 0x035C */ ColliderJntSph colliderJntSph;
+ /* 0x037C */ ColliderJntSphElement colliderJntSphElements[1];
+ /* 0x03BC */ s16 initialYaw;
/* 0x03BE */ s16 deathYawTarget;
/* 0x03C0 */ s16 groundBounces;
/* 0x03C2 */ s16 animFrames;
diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c
index 755f1ea208..9eb1679a56 100644
--- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c
+++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c
@@ -4,12 +4,22 @@
* Description: Uncursed House of Skulltula People
*/
-#include "terminal.h"
#include "z_en_sth.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_ahg/object_ahg.h"
#include "assets/objects/object_boj/object_boj.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnSth_Init(Actor* thisx, PlayState* play);
void EnSth_Destroy(Actor* thisx, PlayState* play);
@@ -61,8 +71,7 @@ static s16 sObjectIds[6] = {
};
static FlexSkeletonHeader* sSkeletons[6] = {
- &object_ahg_Skel_0000F0, &object_boj_Skel_0000F0, &object_boj_Skel_0000F0,
- &object_boj_Skel_0000F0, &object_boj_Skel_0000F0, &object_boj_Skel_0000F0,
+ &gHylianMan1Skel, &gHylianMan2Skel, &gHylianMan2Skel, &gHylianMan2Skel, &gHylianMan2Skel, &gHylianMan2Skel,
};
static AnimationHeader* sAnimations[6] = {
@@ -75,19 +84,18 @@ static EnSthActionFunc sRewardObtainedWaitActions[6] = {
};
static u16 sEventFlags[6] = {
- 0, EVENTCHKINF_DA_MASK, EVENTCHKINF_DB_MASK, EVENTCHKINF_DC_MASK, EVENTCHKINF_DD_MASK, EVENTCHKINF_DE_MASK,
+ 0,
+ EVENTCHKINF_MASK(EVENTCHKINF_SKULLTULA_REWARD_10),
+ EVENTCHKINF_MASK(EVENTCHKINF_SKULLTULA_REWARD_20),
+ EVENTCHKINF_MASK(EVENTCHKINF_SKULLTULA_REWARD_30),
+ EVENTCHKINF_MASK(EVENTCHKINF_SKULLTULA_REWARD_40),
+ EVENTCHKINF_MASK(EVENTCHKINF_SKULLTULA_REWARD_50),
};
static s16 sGetItemIds[6] = {
GI_RUPEE_GOLD, GI_WALLET_ADULT, GI_STONE_OF_AGONY, GI_WALLET_GIANT, GI_BOMBCHUS_10, GI_HEART_PIECE,
};
-static Vec3f D_80B0B49C = { 700.0f, 400.0f, 0.0f };
-
-static Color_RGB8 sTunicColors[6] = {
- { 190, 110, 0 }, { 0, 180, 110 }, { 0, 255, 80 }, { 255, 160, 60 }, { 190, 230, 250 }, { 240, 230, 120 },
-};
-
void EnSth_SetupAction(EnSth* this, EnSthActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
@@ -115,7 +123,7 @@ void EnSth_Init(Actor* thisx, PlayState* play) {
}
objectId = sObjectIds[params];
- if (objectId != 1) {
+ if (objectId != OBJECT_GAMEPLAY_KEEP) {
objectSlot = Object_GetSlot(&play->objectCtx, objectId);
} else {
objectSlot = 0;
@@ -150,14 +158,14 @@ void EnSth_SetupAfterObjectLoaded(EnSth* this, PlayState* play) {
s16* params;
EnSth_SetupShapeColliderUpdate2AndDraw(this, play);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime, sSkeletons[this->actor.params], NULL, this->jointTable, this->morphTable,
16);
Animation_PlayLoop(&this->skelAnime, sAnimations[this->actor.params]);
- this->eventFlag = sEventFlags[this->actor.params];
params = &this->actor.params;
- if (gSaveContext.save.info.eventChkInf[EVENTCHKINF_DA_DB_DC_DD_DE_INDEX] & this->eventFlag) {
+ this->eventFlag = sEventFlags[*params];
+ if (gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_SKULLTULA_REWARD] & this->eventFlag) {
EnSth_SetupAction(this, sRewardObtainedWaitActions[*params]);
} else {
EnSth_SetupAction(this, EnSth_RewardUnobtainedWait);
@@ -257,7 +265,7 @@ void EnSth_GiveReward(EnSth* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actor.parent = NULL;
EnSth_SetupAction(this, EnSth_RewardObtainedTalk);
- gSaveContext.save.info.eventChkInf[EVENTCHKINF_DA_DB_DC_DD_DE_INDEX] |= this->eventFlag;
+ gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_SKULLTULA_REWARD] |= this->eventFlag;
} else {
EnSth_GivePlayerItem(this, play);
}
@@ -337,7 +345,7 @@ void EnSth_Update2(Actor* thisx, PlayState* play) {
s32 EnSth_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnSth* this = (EnSth*)thisx;
- s32 temp_v1;
+ s32 fidgetFrequency;
if (limbIndex == 15) {
rot->x += this->headRot.y;
@@ -351,14 +359,15 @@ s32 EnSth_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
}
if ((limbIndex == 8) || (limbIndex == 10) || (limbIndex == 13)) {
- temp_v1 = limbIndex * 0x32;
- rot->y += (Math_SinS(play->state.frames * (temp_v1 + 0x814)) * 200.0f);
- rot->z += (Math_CosS(play->state.frames * (temp_v1 + 0x940)) * 200.0f);
+ fidgetFrequency = limbIndex * FIDGET_FREQ_LIMB;
+ rot->y += Math_SinS(play->state.frames * (fidgetFrequency + FIDGET_FREQ_Y)) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(play->state.frames * (fidgetFrequency + FIDGET_FREQ_Z)) * FIDGET_AMPLITUDE;
}
return 0;
}
void EnSth_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
+ static Vec3f D_80B0B49C = { 700.0f, 400.0f, 0.0f };
EnSth* this = (EnSth*)thisx;
if (limbIndex == 15) {
@@ -384,17 +393,20 @@ Gfx* EnSth_AllocColorDList(GraphicsContext* play, u8 envR, u8 envG, u8 envB, u8
}
void EnSth_Draw(Actor* thisx, PlayState* play) {
+ static Color_RGB8 sShirtColors[6] = {
+ { 190, 110, 0 }, { 0, 180, 110 }, { 0, 255, 80 }, { 255, 160, 60 }, { 190, 230, 250 }, { 240, 230, 120 },
+ };
EnSth* this = (EnSth*)thisx;
Color_RGB8* envColor1;
OPEN_DISPS(play->state.gfxCtx, "../z_en_sth.c", 2133);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
Gfx_SetupDL_37Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08,
- EnSth_AllocColorDList(play->state.gfxCtx, sTunicColors[this->actor.params].r,
- sTunicColors[this->actor.params].g, sTunicColors[this->actor.params].b, 255));
+ EnSth_AllocColorDList(play->state.gfxCtx, sShirtColors[this->actor.params].r,
+ sShirtColors[this->actor.params].g, sShirtColors[this->actor.params].b, 255));
if (this->actor.params == 0) {
gSPSegment(POLY_OPA_DISP++, 0x09, EnSth_AllocColorDList(play->state.gfxCtx, 190, 110, 0, 255));
diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.h b/src/overlays/actors/ovl_En_Sth/z_en_sth.h
index 9408c542dd..a135fea2aa 100644
--- a/src/overlays/actors/ovl_En_Sth/z_en_sth.h
+++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.h
@@ -2,11 +2,11 @@
#define Z_EN_STH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSth;
-typedef void (*EnSthActionFunc)(struct EnSth*, PlayState*);
+typedef void (*EnSthActionFunc)(struct EnSth*, struct PlayState*);
typedef struct EnSth {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/src/overlays/actors/ovl_En_Stream/z_en_stream.c
index 57ff345d61..118328e793 100644
--- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c
+++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c
@@ -5,9 +5,20 @@
*/
#include "z_en_stream.h"
+
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_stream/object_stream.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnStream_Init(Actor* thisx, PlayState* play);
void EnStream_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.h b/src/overlays/actors/ovl_En_Stream/z_en_stream.h
index 199d1c6797..0a21d54d84 100644
--- a/src/overlays/actors/ovl_En_Stream/z_en_stream.h
+++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.h
@@ -2,11 +2,11 @@
#define Z_EN_STREAM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnStream;
-typedef void (*EnStreamActionFunc)(struct EnStream*, PlayState*);
+typedef void (*EnStreamActionFunc)(struct EnStream*, struct PlayState*);
typedef struct EnStream {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c
index 393ea46839..2b2cdc33f0 100644
--- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c
+++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c
@@ -5,9 +5,25 @@
*/
#include "z_en_sw.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_st/object_st.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnSw_Init(Actor* thisx, PlayState* play);
void EnSw_Destroy(Actor* thisx, PlayState* play);
@@ -38,7 +54,7 @@ ActorProfile En_Sw_Profile = {
/**/ EnSw_Draw,
};
-static ColliderJntSphElementInit sJntSphItemsInit[1] = {
+static ColliderJntSphElementInit sJntSphElementsInit[1] = {
{
{ ELEM_MATERIAL_UNK0, { 0xFFCFFFFF, 0x00, 0x08 }, { 0xFFC3FFFE, 0x00, 0x00 }, 0x01, 0x05, 0x01 },
{ 2, { { 0, -300, 0 }, 21 }, 100 },
@@ -48,7 +64,7 @@ static ColliderJntSphElementInit sJntSphItemsInit[1] = {
static ColliderJntSphInit sJntSphInit = {
{ COL_MATERIAL_HIT6, 0x11, 0x09, 0x39, 0x10, COLSHAPE_JNTSPH },
1,
- sJntSphItemsInit,
+ sJntSphElementsInit,
};
static CollisionCheckInfoInit2 D_80B0F074 = { 1, 2, 25, 25, MASS_IMMOVABLE };
@@ -251,7 +267,7 @@ void EnSw_Init(Actor* thisx, PlayState* play) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENSW_ANIM_0);
ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->sphs);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0xE), &D_80B0F074);
this->actor.scale.x = 0.02f;
diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.h b/src/overlays/actors/ovl_En_Sw/z_en_sw.h
index 68326e1043..4d4fc587b9 100644
--- a/src/overlays/actors/ovl_En_Sw/z_en_sw.h
+++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.h
@@ -2,18 +2,18 @@
#define Z_EN_SW_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSw;
-typedef void (*EnSwActionFunc)(struct EnSw* this, PlayState* play);
+typedef void (*EnSwActionFunc)(struct EnSw* this, struct PlayState* play);
typedef struct EnSw {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ EnSwActionFunc actionFunc;
/* 0x0194 */ ColliderJntSph collider;
- /* 0x01B4 */ ColliderJntSphElement sphs[1];
+ /* 0x01B4 */ ColliderJntSphElement colliderElements[1];
/* 0x01F4 */ Color_RGBA8 limb4Color; // never set past black.
/* 0x01F8 */ Vec3s jointTable[30];
/* 0x02AC */ Vec3s morphTable[30];
@@ -34,7 +34,7 @@ typedef struct EnSw {
/* 0x0420 */ f32 rotateMag;
/* 0x0424 */ char unk_424[0x8];
/* 0x042C */ u8 moveGoldBool; // set during EnSw_MoveGold, rever read.
- /* 0x0430 */ CollisionPoly* wallPoly;
+ /* 0x0430 */ struct CollisionPoly* wallPoly;
/* 0x0434 */ Vec3f unk_434; // set during EnSW_LineTestWall, never read. another target pos?
/* 0x0440 */ s16 sfxTimer;
/* 0x0442 */ s16 dashTimer;
diff --git a/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c b/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c
index 341f15e13d..e409e9c246 100644
--- a/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c
+++ b/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c
@@ -1,10 +1,20 @@
#include "z_en_syateki_itm.h"
-#include "terminal.h"
#include "overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h"
#include "overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h"
#include "overlays/actors/ovl_En_G_Switch/z_en_g_switch.h"
-#define FLAGS ACTOR_FLAG_4
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64debug_display.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum EnSyatekItemRound {
SYATEKI_ROUND_GREEN_APPEAR,
@@ -343,7 +353,7 @@ void EnSyatekiItm_Update(Actor* thisx, PlayState* play) {
this->unkTimer--;
}
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 255, 0, 0, 255, 4, play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.h b/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.h
index c670208bec..46f54b7c79 100644
--- a/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.h
+++ b/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.h
@@ -2,11 +2,11 @@
#define Z_EN_SYATEKI_ITM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSyatekiItm;
-typedef void (*EnSyatekiItmActionFunc)(struct EnSyatekiItm*, PlayState*);
+typedef void (*EnSyatekiItmActionFunc)(struct EnSyatekiItm*, struct PlayState*);
typedef enum EnSyatekiSignal {
/* 0 */ ENSYATEKI_NONE,
diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c
index 4db0f056c9..5829aa68f1 100644
--- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c
+++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c
@@ -1,9 +1,25 @@
#include "z_en_syateki_man.h"
-#include "terminal.h"
#include "overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "regs.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ossan/object_ossan.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_LOCK_ON_DISABLED)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_LOCK_ON_DISABLED)
typedef enum EnSyatekiManGameResult {
/* 0 */ SYATEKI_RESULT_NONE,
@@ -40,7 +56,7 @@ void EnSyatekiMan_RestartGame(EnSyatekiMan* this, PlayState* play);
void EnSyatekiMan_BlinkWait(EnSyatekiMan* this);
void EnSyatekiMan_Blink(EnSyatekiMan* this);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void EnSyatekiMan_SetBgm(void);
#endif
@@ -56,7 +72,7 @@ ActorProfile En_Syateki_Man_Profile = {
/**/ EnSyatekiMan_Draw,
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static u16 sBgmList[] = {
NA_BGM_GENERAL_SFX,
NA_BGM_NATURE_AMBIENCE,
@@ -158,8 +174,8 @@ void EnSyatekiMan_Init(Actor* thisx, PlayState* play) {
EnSyatekiMan* this = (EnSyatekiMan*)thisx;
PRINTF("\n\n");
- // "Old man appeared!! Muhohohohohohohon"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 親父登場!!むほほほほほほほーん ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 親父登場!!むほほほほほほほーん ☆☆☆☆☆ \n",
+ "☆☆☆☆☆ Old man appears!! Muhohohohohohoon ☆☆☆☆☆ \n") VT_RST);
this->actor.attentionRangeType = ATTENTION_RANGE_1;
Actor_SetScale(&this->actor, 0.01f);
SkelAnime_InitFlex(play, &this->skelAnime, &gObjectOssanSkel, &gObjectOssanAnim_000338, this->jointTable,
@@ -406,8 +422,7 @@ void EnSyatekiMan_GivePrize(EnSyatekiMan* this, PlayState* play) {
void EnSyatekiMan_FinishPrize(EnSyatekiMan* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
- // "Successful completion"
- PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
+ PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n", "☆☆☆☆☆ Normal termination ☆☆☆☆☆ \n") VT_RST);
if (!LINK_IS_ADULT) {
SET_ITEMGETINF(ITEMGETINF_0D);
} else if ((this->getItemId == GI_QUIVER_40) || (this->getItemId == GI_QUIVER_50)) {
@@ -429,8 +444,7 @@ void EnSyatekiMan_RestartGame(EnSyatekiMan* this, PlayState* play) {
gallery->signal = ENSYATEKI_START;
this->gameResult = SYATEKI_RESULT_NONE;
this->actionFunc = EnSyatekiMan_WaitForGame;
- // "Let's try again! Baby!"
- PRINTF(VT_FGCOL(BLUE) "再挑戦だぜ!ベイビー!" VT_RST "\n");
+ PRINTF(VT_FGCOL(BLUE) T("再挑戦だぜ!ベイビー!", "Let's try again! Baby!") VT_RST "\n");
}
}
}
@@ -473,7 +487,7 @@ void EnSyatekiMan_Update(Actor* thisx, PlayState* play) {
}
this->actionFunc(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
EnSyatekiMan_SetBgm();
#endif
@@ -511,7 +525,7 @@ void EnSyatekiMan_Draw(Actor* thisx, PlayState* play) {
EnSyatekiMan_OverrideLimbDraw, NULL, this);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void EnSyatekiMan_SetBgm(void) {
if (BREG(80)) {
BREG(80) = false;
diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h
index eea46817ff..306c33104f 100644
--- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h
+++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h
@@ -2,11 +2,11 @@
#define Z_EN_SYATEKI_MAN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSyatekiMan;
-typedef void (*EnSyatekiManActionFunc) (struct EnSyatekiMan*, PlayState*);
+typedef void (*EnSyatekiManActionFunc) (struct EnSyatekiMan*, struct PlayState*);
typedef void (*EnSyatekiManOtherFunc) (struct EnSyatekiMan*);
typedef struct EnSyatekiMan {
diff --git a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c
index 566a866f9a..970ebb32d3 100644
--- a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c
+++ b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c
@@ -5,10 +5,25 @@
*/
#include "z_en_syateki_niw.h"
-#include "assets/objects/object_niw/object_niw.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_niw/object_niw.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnSyatekiNiw_Init(Actor* thisx, PlayState* play);
void EnSyatekiNiw_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h
index 9f35c2b05d..37db3e65fd 100644
--- a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h
+++ b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h
@@ -2,11 +2,11 @@
#define Z_EN_SYATEKI_NIW_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnSyatekiNiw;
-typedef void (*EnSyatekiNiwActionFunc)(struct EnSyatekiNiw*, PlayState*);
+typedef void (*EnSyatekiNiwActionFunc)(struct EnSyatekiNiw*, struct PlayState*);
typedef struct EnSyatekiNiwEffect {
/* 0x00 */ u8 state;
@@ -34,7 +34,7 @@ typedef struct EnSyatekiNiw {
/* 0x025A */ s16 archeryTimer;
/* 0x025C */ s16 hopTimer; // intervals of jumping
/* 0x025E */ s16 movementTimer; // intervals of changing location
- /* 0x0260 */ s16 sootTimer; // cucco is covered in soot, smoke emmits
+ /* 0x0260 */ s16 sootTimer; // cucco is covered in soot, smoke emits
/* 0x0262 */ s16 cluckTimer; // intervals of clucking SFX
/* 0x0264 */ f32 headRotXTarget;
/* 0x0268 */ f32 rightWingRotXTarget;
diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c
index f6a11e4751..68335d64b2 100644
--- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c
+++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c
@@ -5,7 +5,28 @@
*/
#include "z_en_ta.h"
+#include "overlays/actors/ovl_En_Niw/z_en_niw.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_ta/object_ta.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -219,7 +240,7 @@ void EnTa_Init(Actor* thisx, PlayState* play2) {
Actor_Kill(&this->actor);
} else {
if (IS_DAY) {
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->superCuccoTimers[0] = this->superCuccoTimers[1] = this->superCuccoTimers[2] = 7;
this->superCuccos[0] = (EnNiw*)Actor_Spawn(
&play->actorCtx, play, ACTOR_EN_NIW, this->actor.world.pos.x + 5.0f,
@@ -368,7 +389,7 @@ void EnTa_IdleAsleepInCastle(EnTa* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (Actor_TalkOfferAccepted(&this->actor, play)) {
- s32 exchangeItemId = func_8002F368(play);
+ s32 exchangeItemId = Actor_GetPlayerExchangeItemId(play);
switch (exchangeItemId) {
case EXCH_ITEM_CHICKEN:
@@ -403,7 +424,7 @@ void EnTa_IdleAsleepInKakariko(EnTa* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (Actor_TalkOfferAccepted(&this->actor, play)) {
- s32 exchangeItemId = func_8002F368(play);
+ s32 exchangeItemId = Actor_GetPlayerExchangeItemId(play);
switch (exchangeItemId) {
case EXCH_ITEM_POCKET_CUCCO:
@@ -501,7 +522,7 @@ void EnTa_RunAwayStart(EnTa* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_VO_TA_CRY_1);
EnTa_SetupAction(this, EnTa_RunAwayRunSouth, EnTa_AnimRepeatCurrent);
this->timer = 65;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
}
@@ -622,7 +643,7 @@ s32 EnTa_IsPlayerHoldingSuperCucco(EnTa* this, PlayState* play, s32 cuccoIdx) {
Player* player = GET_PLAYER(play);
Actor* interactRangeActor;
- if (player->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) {
+ if (player->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
interactRangeActor = player->interactRangeActor;
if (interactRangeActor != NULL && interactRangeActor->id == ACTOR_EN_NIW &&
interactRangeActor == &this->superCuccos[cuccoIdx]->actor) {
@@ -658,7 +679,7 @@ void EnTa_TalkFoundSuperCucco(EnTa* this, PlayState* play) {
if (player->heldActor == &this->superCuccos[lastFoundSuperCuccoIdx]->actor) {
player->heldActor = NULL;
}
- player->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
this->superCuccos[lastFoundSuperCuccoIdx] = NULL;
}
this->stateFlags |= TALON_STATE_FLAG_TRACKING_PLAYER;
@@ -668,7 +689,7 @@ void EnTa_IdleFoundSuperCucco(EnTa* this, PlayState* play) {
if (Actor_TalkOfferAccepted(&this->actor, play)) {
this->actionFunc = EnTa_TalkFoundSuperCucco;
// Unset auto-talking
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
} else {
Actor_OfferTalk(&this->actor, play, 1000.0f);
}
@@ -784,7 +805,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) {
this->actionFunc = EnTa_IdleFoundSuperCucco;
// Automatically talk to player
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferTalk(&this->actor, play, 1000.0f);
return;
}
@@ -1130,9 +1151,9 @@ void EnTa_IdleAfterCuccoGameFinished(EnTa* this, PlayState* play) {
this->actionFunc = EnTa_TalkAfterCuccoGameWon;
break;
}
- this->actor.flags &= ~ACTOR_FLAG_16;
+ this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
} else {
- this->actor.flags |= ACTOR_FLAG_16;
+ this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED;
Actor_OfferTalk(&this->actor, play, 1000.0f);
}
this->stateFlags |= TALON_STATE_FLAG_TRACKING_PLAYER;
@@ -1282,10 +1303,10 @@ s32 EnTa_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
this->stateFlags &= ~TALON_STATE_FLAG_SUPPRESS_ROCKING_ANIM;
} else if ((limbIndex == ENTA_LIMB_CHEST) || (limbIndex == ENTA_LIMB_LEFT_ARM) ||
(limbIndex == ENTA_LIMB_RIGHT_ARM)) {
- s32 limbIdx50 = limbIndex * 50;
+ s32 fidgetFrequency = limbIndex * FIDGET_FREQ_LIMB;
- rot->y += Math_SinS(play->state.frames * (limbIdx50 + 0x814)) * 200.0f;
- rot->z += Math_CosS(play->state.frames * (limbIdx50 + 0x940)) * 200.0f;
+ rot->y += Math_SinS(play->state.frames * (fidgetFrequency + FIDGET_FREQ_Y)) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(play->state.frames * (fidgetFrequency + FIDGET_FREQ_Z)) * FIDGET_AMPLITUDE;
}
return false;
diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.h b/src/overlays/actors/ovl_En_Ta/z_en_ta.h
index eeab7dc775..d230c2b757 100644
--- a/src/overlays/actors/ovl_En_Ta/z_en_ta.h
+++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.h
@@ -2,13 +2,11 @@
#define Z_EN_TA_H
#include "ultra64.h"
-#include "global.h"
-
-#include "overlays/actors/ovl_En_Niw/z_en_niw.h"
+#include "z64actor.h"
struct EnTa;
-typedef void (*EnTaActionFunc)(struct EnTa*, PlayState*);
+typedef void (*EnTaActionFunc)(struct EnTa*, struct PlayState*);
typedef void (*EnTaBlinkFunc)(struct EnTa*);
typedef void (*EnTaAnimFunc)(struct EnTa*);
@@ -50,7 +48,7 @@ typedef struct EnTa {
/* 0x02B0 */ EnTaBlinkFunc blinkFunc;
/* 0x02B4 */ s16 eyeIndex;
/* 0x02B6 */ s16 blinkTimer;
- /* 0x02B8 */ EnNiw* superCuccos[3];
+ /* 0x02B8 */ struct EnNiw* superCuccos[3];
/* 0x02C4 */ s16 superCuccoTimers[3]; // This is used to time animations and actions for super-cuccos
/* 0x02CA */ u8 lastFoundSuperCuccoIdx;
/* 0x02CC */ s16 timer;
diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c
index b90485149a..8d51dae459 100644
--- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c
+++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c
@@ -5,11 +5,22 @@
*/
#include "z_en_takara_man.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
#include "terminal.h"
+#include "versions.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_ts/object_ts.h"
-#define FLAGS \
- (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_LOCK_ON_DISABLED)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_LOCK_ON_DISABLED)
void EnTakaraMan_Init(Actor* thisx, PlayState* play);
void EnTakaraMan_Destroy(Actor* thisx, PlayState* play);
@@ -161,7 +172,11 @@ void func_80B17A6C(EnTakaraMan* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = func_80B17AC4;
} else {
+#if OOT_VERSION < NTSC_1_1
+ Actor_OfferGetItem(&this->actor, play, GI_SMALL_KEY, 2000.0f, 1000.0f);
+#else
Actor_OfferGetItem(&this->actor, play, GI_DOOR_KEY, 2000.0f, 1000.0f);
+#endif
}
}
diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.h b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.h
index 48898909bc..e7d51c4b07 100644
--- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.h
+++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.h
@@ -2,11 +2,11 @@
#define Z_EN_TAKARA_MAN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnTakaraMan;
-typedef void (*EnTakaraManActionFunc)(struct EnTakaraMan*, PlayState*);
+typedef void (*EnTakaraManActionFunc)(struct EnTakaraMan*, struct PlayState*);
typedef struct EnTakaraMan {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Tana/z_en_tana.c b/src/overlays/actors/ovl_En_Tana/z_en_tana.c
index 1c3e4b2ab7..ddb9e8d8d9 100644
--- a/src/overlays/actors/ovl_En_Tana/z_en_tana.c
+++ b/src/overlays/actors/ovl_En_Tana/z_en_tana.c
@@ -5,6 +5,14 @@
*/
#include "z_en_tana.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+
#include "assets/objects/object_shop_dungen/object_shop_dungen.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -27,7 +35,7 @@ ActorProfile En_Tana_Profile = {
/**/ NULL,
};
-#if OOT_DEBUG
+#if DEBUG_FEATURES
//! @bug A third entry is missing here. When printing the string indexed by `params` for type 2, the
//! next data entry will be dereferenced and print garbage, stopping any future printing.
//! In a non-matching context, this can cause a crash if the next item isn't a valid pointer.
diff --git a/src/overlays/actors/ovl_En_Tana/z_en_tana.h b/src/overlays/actors/ovl_En_Tana/z_en_tana.h
index 763d1303c6..1804bcd798 100644
--- a/src/overlays/actors/ovl_En_Tana/z_en_tana.h
+++ b/src/overlays/actors/ovl_En_Tana/z_en_tana.h
@@ -2,7 +2,7 @@
#define Z_EN_TANA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnTana;
diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.c b/src/overlays/actors/ovl_En_Test/z_en_test.c
index aec8b5c293..17a18d8a6a 100644
--- a/src/overlays/actors/ovl_En_Test/z_en_test.c
+++ b/src/overlays/actors/ovl_En_Test/z_en_test.c
@@ -5,9 +5,24 @@
*/
#include "z_en_test.h"
+
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_sk2/object_sk2.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnTest_Init(Actor* thisx, PlayState* play);
void EnTest_Destroy(Actor* thisx, PlayState* play);
@@ -177,7 +192,7 @@ static ColliderCylinderInit sShieldColliderInit = {
{ 20, 70, -50, { 0, 0, 0 } },
};
-static ColliderQuadInit sSwordColliderInit = {
+static ColliderQuadInit sSwordColliderQuadInit = {
{
COL_MATERIAL_NONE,
AT_ON | AT_TYPE_ENEMY,
@@ -279,7 +294,7 @@ void EnTest_Init(Actor* thisx, PlayState* play) {
Collider_SetCylinder(play, &this->shieldCollider, &this->actor, &sShieldColliderInit);
Collider_InitQuad(play, &this->swordCollider);
- Collider_SetQuad(play, &this->swordCollider, &this->actor, &sSwordColliderInit);
+ Collider_SetQuad(play, &this->swordCollider, &this->actor, &sSwordColliderQuadInit);
this->actor.colChkInfo.mass = MASS_HEAVY;
this->actor.colChkInfo.health = 10;
@@ -1593,7 +1608,7 @@ void func_8086318C(EnTest* this, PlayState* play) {
void EnTest_SetupRecoil(EnTest* this) {
this->swordState = 0;
- this->skelAnime.moveFlags = ANIM_FLAG_UPDATE_Y;
+ this->skelAnime.movementFlags = ANIM_FLAG_UPDATE_Y;
this->unk_7C8 = 0x13;
this->skelAnime.playSpeed = -1.0f;
this->skelAnime.startFrame = this->skelAnime.curFrame;
@@ -1838,7 +1853,7 @@ s32 EnTest_OverrideLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3f*
}
if ((this->actor.params == STALFOS_TYPE_INVISIBLE) &&
- !CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) {
+ !ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) {
*dList = NULL;
}
diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.h b/src/overlays/actors/ovl_En_Test/z_en_test.h
index 397682cd5a..030fcf740f 100644
--- a/src/overlays/actors/ovl_En_Test/z_en_test.h
+++ b/src/overlays/actors/ovl_En_Test/z_en_test.h
@@ -2,11 +2,11 @@
#define Z_EN_TEST_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnTest;
-typedef void (*EnTestActionFunc)(struct EnTest*, PlayState*);
+typedef void (*EnTestActionFunc)(struct EnTest*, struct PlayState*);
typedef enum StalfosLimb {
/* 0x00 */ STALFOS_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/src/overlays/actors/ovl_En_Tg/z_en_tg.c
index 42f32f0eb7..1fc830181b 100644
--- a/src/overlays/actors/ovl_En_Tg/z_en_tg.c
+++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.c
@@ -5,6 +5,12 @@
*/
#include "z_en_tg.h"
+
+#include "gfx.h"
+#include "sys_matrix.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+
#include "assets/objects/object_mu/object_mu.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.h b/src/overlays/actors/ovl_En_Tg/z_en_tg.h
index 4571638d77..b4d9bfe063 100644
--- a/src/overlays/actors/ovl_En_Tg/z_en_tg.h
+++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.h
@@ -2,11 +2,11 @@
#define Z_EN_TG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnTg;
-typedef void (*EnTgActionFunc)(struct EnTg*, PlayState*);
+typedef void (*EnTgActionFunc)(struct EnTg*, struct PlayState*);
typedef struct EnTg {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c
index eb28e6a164..3435b040fc 100644
--- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c
+++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c
@@ -7,10 +7,25 @@
#include "z_en_tite.h"
#include "overlays/actors/ovl_En_Encount1/z_en_encount1.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_tite/object_tite.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
// EnTite_Idle
#define vIdleTimer actionVar1
@@ -191,7 +206,7 @@ void EnTite_Init(Actor* thisx, PlayState* play) {
thisx->colChkInfo.health = 2;
thisx->colChkInfo.mass = MASS_HEAVY;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, &this->colliderItem);
+ Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->colliderElements);
this->unk_2DC = UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4;
if (this->actor.params == TEKTITE_BLUE) {
this->unk_2DC |= UPDBGCHECKINFO_FLAG_6; // Don't use the actor engine's ripple spawning code
@@ -288,7 +303,7 @@ void EnTite_Attack(EnTite* this, PlayState* play) {
case TEKTITE_MID_LUNGE:
// Continue trajectory until tektite has negative velocity and has landed on ground/water surface
// Snap to ground/water surface, or if falling fast dip into the water and slow fall speed
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
if ((this->actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH)) ||
((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & BGCHECKFLAG_WATER))) {
if (this->actor.velocity.y <= 0.0f) {
@@ -364,7 +379,7 @@ void EnTite_Attack(EnTite* this, PlayState* play) {
func_800355B8(play, &this->backLeftFootPos);
}
}
- if (!(this->collider.base.atFlags & AT_HIT) && (this->actor.flags & ACTOR_FLAG_6)) {
+ if (!(this->collider.base.atFlags & AT_HIT) && (this->actor.flags & ACTOR_FLAG_INSIDE_CULLING_VOLUME)) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
} else {
Player* player = GET_PLAYER(play);
@@ -571,7 +586,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, PlayState* play) {
} else {
this->actor.velocity.y = 10.0f;
this->actor.speed = 4.0f;
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
this->actor.gravity = -1.0f;
if ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & BGCHECKFLAG_WATER)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP_WATER);
@@ -582,7 +597,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, PlayState* play) {
} else {
this->actor.velocity.y = 10.0f;
this->actor.speed = 4.0f;
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
this->actor.gravity = -1.0f;
if ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & BGCHECKFLAG_WATER)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP_WATER);
@@ -593,7 +608,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, PlayState* play) {
// If in midair:
} else {
// Turn slowly toward player
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 1000, 0);
if (this->actor.velocity.y >= 6.0f) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.h b/src/overlays/actors/ovl_En_Tite/z_en_tite.h
index a049cabaae..d4ec9ab8dd 100755
--- a/src/overlays/actors/ovl_En_Tite/z_en_tite.h
+++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.h
@@ -2,11 +2,11 @@
#define Z_EN_TITE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnTite;
-typedef void (*EnTiteActionFunc)(struct EnTite*, PlayState*);
+typedef void (*EnTiteActionFunc)(struct EnTite*, struct PlayState*);
typedef enum EnTiteType {
/* -2 */ TEKTITE_BLUE = -2,
@@ -28,7 +28,7 @@ typedef struct EnTite {
/* 0x02E3 */ u8 spawnIceTimer;
/* 0x02E4 */ u8 damageEffect;
/* 0x02E8 */ ColliderJntSph collider;
- /* 0x0308 */ ColliderJntSphElement colliderItem;
+ /* 0x0308 */ ColliderJntSphElement colliderElements[1];
/* 0x0348 */ Vec3f frontLeftFootPos;
/* 0x0354 */ Vec3f frontRightFootPos;
/* 0x0360 */ Vec3f backRightFootPos;
diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c
index 747b0085c6..4f697c29b8 100644
--- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c
+++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c
@@ -5,6 +5,22 @@
*/
#include "z_en_tk.h"
+
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_tk/object_tk.h"
diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.h b/src/overlays/actors/ovl_En_Tk/z_en_tk.h
index 208b4e81d7..2ce0b9ef87 100644
--- a/src/overlays/actors/ovl_En_Tk/z_en_tk.h
+++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.h
@@ -2,8 +2,7 @@
#define Z_EN_TK_H
#include "ultra64.h"
-#include "global.h"
-#include "z64.h"
+#include "z64actor.h"
/* Dirt particle effect */
struct EnTkEff;
@@ -22,7 +21,7 @@ typedef struct EnTkEff {
struct EnTk;
-typedef void (*EnTkActionFunc)(struct EnTk*, PlayState*);
+typedef void (*EnTkActionFunc)(struct EnTk*, struct PlayState*);
typedef struct EnTk {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Torch/z_en_torch.c b/src/overlays/actors/ovl_En_Torch/z_en_torch.c
index e60e16c0de..6e406c6bab 100644
--- a/src/overlays/actors/ovl_En_Torch/z_en_torch.c
+++ b/src/overlays/actors/ovl_En_Torch/z_en_torch.c
@@ -1,10 +1,14 @@
/*
* File: z_en_torch.c
* Overlay: ovl_En_Torch
- * Description: Spawns a chest with the appropriate contents then unloads. Used in grottos.
+ * Description: Spawns a chest with the appropriate contents then dies. Used in grottos.
*/
#include "z_en_torch.h"
+#include "overlays/actors/ovl_En_Box/z_en_box.h"
+
+#include "z64play.h"
+#include "z64save.h"
#define FLAGS 0
diff --git a/src/overlays/actors/ovl_En_Torch/z_en_torch.h b/src/overlays/actors/ovl_En_Torch/z_en_torch.h
index 78be1fb2dd..fc3e2dabac 100644
--- a/src/overlays/actors/ovl_En_Torch/z_en_torch.h
+++ b/src/overlays/actors/ovl_En_Torch/z_en_torch.h
@@ -2,7 +2,7 @@
#define Z_EN_TORCH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnTorch;
diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c
index 72b6c4587c..a02e9bc3bb 100644
--- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c
+++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c
@@ -5,10 +5,29 @@
*/
#include "z_en_torch2.h"
-#include "assets/objects/object_torch2/object_torch2.h"
-#include "versions.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/qrand.h"
+#include "libu64/pad.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sequence.h"
+#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/object_torch2/object_torch2.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
+ ACTOR_FLAG_DRAW_CULLING_DISABLED)
typedef enum EnTorch2ActionStates {
/* 0 */ ENTORCH2_WAIT,
@@ -408,7 +427,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
sStickAngle = thisx->yawTowardsPlayer;
if ((90.0f >= this->actor.xzDistToPlayer) && (this->actor.xzDistToPlayer > 70.0f) &&
(ABS(sp5A) >= 0x7800) &&
- (this->actor.isLockedOn || !(player->stateFlags1 & PLAYER_STATE1_22))) {
+ (this->actor.isLockedOn || !(player->stateFlags1 & PLAYER_STATE1_SHIELDING))) {
EnTorch2_SwingSword(play, input, this);
} else {
f32 sp50 = 0.0f;
@@ -581,11 +600,11 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
if (!Actor_ApplyDamage(&this->actor)) {
func_800F5B58();
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE);
- this->unk_8A1 = 2;
- this->unk_8A4 = 6.0f;
- this->unk_8A8 = 6.0f;
- this->unk_8A0 = this->actor.colChkInfo.damage;
- this->unk_8A2 = this->actor.yawTowardsPlayer + 0x8000;
+ this->knockbackType = PLAYER_KNOCKBACK_LARGE;
+ this->knockbackSpeed = 6.0f;
+ this->knockbackYVelocity = 6.0f;
+ this->knockbackDamage = this->actor.colChkInfo.damage;
+ this->knockbackRot = this->actor.yawTowardsPlayer + 0x8000;
sDeathFlag++;
sActionState = ENTORCH2_DEATH;
Enemy_StartFinishingBlow(play, &this->actor);
@@ -601,11 +620,11 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
}
} else {
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- this->unk_8A0 = this->actor.colChkInfo.damage;
- this->unk_8A1 = 1;
- this->unk_8A8 = 6.0f;
- this->unk_8A4 = 8.0f;
- this->unk_8A2 = this->actor.yawTowardsPlayer + 0x8000;
+ this->knockbackDamage = this->actor.colChkInfo.damage;
+ this->knockbackType = PLAYER_KNOCKBACK_SMALL;
+ this->knockbackYVelocity = 6.0f;
+ this->knockbackSpeed = 8.0f;
+ this->knockbackRot = this->actor.yawTowardsPlayer + 0x8000;
Actor_SetDropFlag(&this->actor, &this->cylinder.elem, true);
this->stateFlags3 &= ~PLAYER_STATE3_2;
this->stateFlags3 |= PLAYER_STATE3_0;
@@ -618,7 +637,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
}
}
this->actor.colChkInfo.damage = 0;
- this->unk_8A0 = 0;
+ this->knockbackDamage = 0;
}
// Handles being frozen by a deku nut
diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.h b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.h
index d96b08527e..bb132bc91e 100644
--- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.h
+++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.h
@@ -2,7 +2,7 @@
#define Z_EN_TORCH2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
// Uses the Player struct (from z64player.h)
diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c
index da109eb82e..2ac84162c6 100644
--- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c
+++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c
@@ -5,6 +5,17 @@
*/
#include "z_en_toryo.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_toryo/object_toryo.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -248,7 +259,7 @@ u32 EnToryo_ReactToExchangeItem(EnToryo* this, PlayState* play) {
ret = 0x200F;
}
}
- //! @bug return value may be unitialized
+ //! @bug return value may be uninitialized
return ret;
}
@@ -258,7 +269,7 @@ s32 EnToryo_GetTextId(EnToryo* this, PlayState* play) {
if (textId == 0) {
if (this->stateFlags & 1) {
- if (GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
+ if (GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED()) {
ret = 0x606C;
} else if (GET_INFTABLE(INFTABLE_170)) {
ret = 0x606B;
@@ -318,7 +329,7 @@ void EnToryo_HandleTalking(EnToryo* this, PlayState* play) {
if (this->messageState == 0) {
if (Actor_TalkOfferAccepted(&this->actor, play)) {
- this->exchangeItemId = func_8002F368(play);
+ this->exchangeItemId = Actor_GetPlayerExchangeItemId(play);
if (this->exchangeItemId != EXCH_ITEM_NONE) {
player->actor.textId = EnToryo_ReactToExchangeItem(this, play);
this->actor.textId = player->actor.textId;
diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h
index 769ea637b9..f8d04e74ac 100644
--- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h
+++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h
@@ -2,11 +2,11 @@
#define Z_EN_TORYO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnToryo;
-typedef void (*EnToryoActionFunc)(struct EnToryo* this, PlayState* play);
+typedef void (*EnToryoActionFunc)(struct EnToryo* this, struct PlayState* play);
typedef struct EnToryo {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Tp/z_en_tp.c b/src/overlays/actors/ovl_En_Tp/z_en_tp.c
index a6be2f60fb..a1ce22995c 100644
--- a/src/overlays/actors/ovl_En_Tp/z_en_tp.c
+++ b/src/overlays/actors/ovl_En_Tp/z_en_tp.c
@@ -5,6 +5,23 @@
*/
#include "z_en_tp.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_tp/object_tp.h"
#define FLAGS 0
@@ -144,7 +161,7 @@ void EnTp_Init(Actor* thisx, PlayState* play2) {
now = this;
this->alpha = 255;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
if (this->actor.params <= TAILPASARAN_HEAD) {
this->actor.naviEnemyId = NAVI_ENEMY_TAILPASARAN;
@@ -153,7 +170,7 @@ void EnTp_Init(Actor* thisx, PlayState* play2) {
this->collider.elements[0].dim.modelSphere.radius = this->collider.elements[0].dim.worldSphere.radius = 8;
EnTp_Head_SetupWait(this);
this->actor.focus.pos = this->actor.world.pos;
- this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED;
Actor_SetScale(&this->actor, 1.5f);
for (i = 0; i <= 6; i++) {
@@ -170,7 +187,8 @@ void EnTp_Init(Actor* thisx, PlayState* play2) {
Actor_SetScale(&next->actor, 0.3f);
if (i == 2) {
- next->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4;
+ next->actor.flags |=
+ ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED;
next->unk_150 = 1; // Why?
}
@@ -319,7 +337,12 @@ void EnTp_Die(EnTp* this, PlayState* play) {
255, 1, 9, 1);
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x50);
} else {
- for (i = 0; i < 1; i++) {
+#if OOT_VERSION < NTSC_1_1
+ for (i = 0; i < 2; i++)
+#else
+ for (i = 0; i < 1; i++)
+#endif
+ {
now =
(EnTp*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_TP, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, TAILPASARAN_FRAGMENT);
diff --git a/src/overlays/actors/ovl_En_Tp/z_en_tp.h b/src/overlays/actors/ovl_En_Tp/z_en_tp.h
index f878ab934a..71fdca8188 100644
--- a/src/overlays/actors/ovl_En_Tp/z_en_tp.h
+++ b/src/overlays/actors/ovl_En_Tp/z_en_tp.h
@@ -2,11 +2,11 @@
#define Z_EN_TP_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnTp;
-typedef void (*EnTpActionFunc)(struct EnTp*, PlayState*);
+typedef void (*EnTpActionFunc)(struct EnTp*, struct PlayState*);
typedef struct EnTp {
/* 0x0000 */ Actor actor;
@@ -24,7 +24,7 @@ typedef struct EnTp {
/* 0x016C */ f32 horizontalVariation;
/* 0x0170 */ f32 extraHeightVariation;
/* 0x0174 */ ColliderJntSph collider;
- /* 0x0194 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0194 */ ColliderJntSphElement colliderElements[1];
/* 0x01D4 */ struct EnTp* head;
} EnTp; // size = 0x01D8
diff --git a/src/overlays/actors/ovl_En_Tr/z_en_tr.c b/src/overlays/actors/ovl_En_Tr/z_en_tr.c
index e2d612d61b..3f2672cde4 100644
--- a/src/overlays/actors/ovl_En_Tr/z_en_tr.c
+++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.c
@@ -5,9 +5,21 @@
*/
#include "z_en_tr.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_tr/object_tr.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnTr_Init(Actor* thisx, PlayState* play);
void EnTr_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Tr/z_en_tr.h b/src/overlays/actors/ovl_En_Tr/z_en_tr.h
index faf45d7400..091aa5c52f 100644
--- a/src/overlays/actors/ovl_En_Tr/z_en_tr.h
+++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.h
@@ -2,11 +2,11 @@
#define Z_EN_TR_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnTr;
-typedef void (*EnTrActionFunc)(struct EnTr*, PlayState*);
+typedef void (*EnTrActionFunc)(struct EnTr*, struct PlayState*);
typedef enum KotakeKoumeLimb {
/* 0 */ KOTAKE_KOUME_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_En_Trap/z_en_trap.c b/src/overlays/actors/ovl_En_Trap/z_en_trap.c
index 8cf807dcad..848e6701b0 100644
--- a/src/overlays/actors/ovl_En_Trap/z_en_trap.c
+++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.c
@@ -5,9 +5,15 @@
*/
#include "z_en_trap.h"
+
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_trap/object_trap.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
#define BEGIN_MOVE_OUT 65535.0f
@@ -113,7 +119,7 @@ void EnTrap_Init(Actor* thisx, PlayState* play) {
Collider_SetCylinder(play, &this->collider, thisx, &sCylinderInit);
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
thisx->attentionRangeType = ATTENTION_RANGE_3;
- thisx->colChkInfo.mass = 0xFF;
+ thisx->colChkInfo.mass = MASS_IMMOVABLE;
}
void EnTrap_Destroy(Actor* thisx, PlayState* play) {
@@ -175,7 +181,7 @@ void EnTrap_Update(Actor* thisx, PlayState* play) {
angleToKnockPlayer = thisx->yawTowardsPlayer;
}
play->damagePlayer(play, -4);
- func_8002F7A0(play, thisx, 6.0f, angleToKnockPlayer, 6.0f);
+ Actor_SetPlayerKnockbackSmallNoDamage(play, thisx, 6.0f, angleToKnockPlayer, 6.0f);
this->playerDmgTimer = 15;
}
if (thisx->params & SPIKETRAP_MODE_LINEAR) {
diff --git a/src/overlays/actors/ovl_En_Trap/z_en_trap.h b/src/overlays/actors/ovl_En_Trap/z_en_trap.h
index 6f69707aca..fcd62dd170 100644
--- a/src/overlays/actors/ovl_En_Trap/z_en_trap.h
+++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.h
@@ -2,7 +2,7 @@
#define Z_EN_TRAP_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
// Different movement modes (set in params):
#define SPIKETRAP_MODE_LINEAR 0x10
diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c
index c122d39684..31ae178197 100644
--- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c
+++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c
@@ -5,11 +5,23 @@
*/
#include "z_en_tubo_trap.h"
-#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/qrand.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnTuboTrap_Init(Actor* thisx, PlayState* play);
void EnTuboTrap_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.h b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.h
index 17dc2f2054..3abe8b625a 100644
--- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.h
+++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.h
@@ -2,11 +2,11 @@
#define Z_EN_TUBO_TRAP_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnTuboTrap;
-typedef void (*EnTuboTrapActionFunc)(struct EnTuboTrap*, PlayState*);
+typedef void (*EnTuboTrapActionFunc)(struct EnTuboTrap*, struct PlayState*);
typedef struct EnTuboTrap {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Vali/z_en_vali.c b/src/overlays/actors/ovl_En_Vali/z_en_vali.c
index be03eb1644..011b004b68 100644
--- a/src/overlays/actors/ovl_En_Vali/z_en_vali.c
+++ b/src/overlays/actors/ovl_En_Vali/z_en_vali.c
@@ -5,9 +5,23 @@
*/
#include "z_en_vali.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_vali/object_vali.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_IGNORE_QUAKE)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_IGNORE_QUAKE)
void EnVali_Init(Actor* thisx, PlayState* play);
void EnVali_Destroy(Actor* thisx, PlayState* play);
@@ -197,7 +211,7 @@ void EnVali_SetupFloatIdle(EnVali* this) {
this->leftArmCollider.dim.quad[1].y = this->rightArmCollider.dim.quad[0].y =
this->rightArmCollider.dim.quad[1].y = this->actor.world.pos.y - 10.0f;
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->bodyCollider.base.acFlags |= AC_ON;
this->slingshotReactionTimer = 0;
this->floatHomeHeight = this->actor.world.pos.y;
@@ -274,7 +288,7 @@ void EnVali_SetupFrozen(EnVali* this) {
void EnVali_SetupReturnToLurk(EnVali* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gBariLurkingAnim, 10.0f);
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->actionFunc = EnVali_ReturnToLurk;
}
diff --git a/src/overlays/actors/ovl_En_Vali/z_en_vali.h b/src/overlays/actors/ovl_En_Vali/z_en_vali.h
index c5df42825b..1a031d964b 100644
--- a/src/overlays/actors/ovl_En_Vali/z_en_vali.h
+++ b/src/overlays/actors/ovl_En_Vali/z_en_vali.h
@@ -2,11 +2,11 @@
#define Z_EN_VALI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnVali;
-typedef void (*EnValiActionFunc)(struct EnVali*, PlayState*);
+typedef void (*EnValiActionFunc)(struct EnVali*, struct PlayState*);
typedef enum EnValiLimb {
/* 0x00 */ EN_VALI_LIMB_NONE,
diff --git a/src/overlays/actors/ovl_En_Vase/z_en_vase.c b/src/overlays/actors/ovl_En_Vase/z_en_vase.c
index 065013bb52..30f8b32b18 100644
--- a/src/overlays/actors/ovl_En_Vase/z_en_vase.c
+++ b/src/overlays/actors/ovl_En_Vase/z_en_vase.c
@@ -5,9 +5,12 @@
*/
#include "z_en_vase.h"
+
+#include "z64play.h"
+
#include "assets/objects/object_vase/object_vase.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnVase_Init(Actor* thisx, PlayState* play);
void EnVase_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Vase/z_en_vase.h b/src/overlays/actors/ovl_En_Vase/z_en_vase.h
index 57ee0d5779..04a8381e29 100644
--- a/src/overlays/actors/ovl_En_Vase/z_en_vase.h
+++ b/src/overlays/actors/ovl_En_Vase/z_en_vase.h
@@ -2,7 +2,7 @@
#define Z_EN_VASE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnVase;
diff --git a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c
index 1a8f8d2275..8791409d01 100644
--- a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c
+++ b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c
@@ -5,11 +5,23 @@
*/
#include "z_en_vb_ball.h"
-#include "assets/objects/object_fd/object_fd.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_fd/object_fd.h"
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EnVbBall_Init(Actor* thisx, PlayState* play);
void EnVbBall_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h
index 8675b440c4..e81bc1ac25 100644
--- a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h
+++ b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h
@@ -2,7 +2,7 @@
#define Z_EN_VB_BALL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnVbBall;
diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c
index 0b0594ed86..165065d714 100644
--- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c
+++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c
@@ -7,6 +7,24 @@
#include "z_en_viewer.h"
#include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h"
#include "overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64save.h"
+#include "z64skin.h"
+
#include "assets/objects/object_zl4/object_zl4.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_horse_zelda/object_horse_zelda.h"
@@ -16,7 +34,7 @@
#include "assets/objects/object_ganon/object_ganon.h"
#include "assets/objects/object_opening_demo1/object_opening_demo1.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnViewer_Init(Actor* thisx, PlayState* play);
void EnViewer_Destroy(Actor* thisx, PlayState* play);
@@ -44,7 +62,7 @@ ActorProfile En_Viewer_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneScale, 300, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 300, ICHAIN_STOP),
};
static EnViewerInitData sInitData[] = {
@@ -123,7 +141,7 @@ void EnViewer_InitAnimGanondorfOrZelda(EnViewer* this, PlayState* play, void* sk
SkelAnime_Init(play, &this->skin.skelAnime, skeletonHeaderSeg, NULL, NULL, NULL, 0);
}
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
if (type == ENVIEWER_TYPE_3_GANONDORF || type == ENVIEWER_TYPE_7_GANONDORF || type == ENVIEWER_TYPE_8_GANONDORF ||
type == ENVIEWER_TYPE_9_GANONDORF) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, anim, 1.0f);
@@ -134,7 +152,7 @@ void EnViewer_InitAnimGanondorfOrZelda(EnViewer* this, PlayState* play, void* sk
void EnViewer_InitAnimImpa(EnViewer* this, PlayState* play, void* skeletonHeaderSeg, AnimationHeader* anim) {
SkelAnime_InitFlex(play, &this->skin.skelAnime, skeletonHeaderSeg, NULL, NULL, NULL, 0);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, anim, 3.0f);
}
@@ -176,7 +194,7 @@ void EnViewer_InitImpl(EnViewer* this, PlayState* play) {
if (!Object_IsLoaded(&play->objectCtx, skelObjectSlot) ||
!Object_IsLoaded(&play->objectCtx, this->animObjectSlot)) {
- this->actor.flags &= ~ACTOR_FLAG_6;
+ this->actor.flags &= ~ACTOR_FLAG_INSIDE_CULLING_VOLUME;
return;
}
@@ -209,9 +227,9 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
}
} else if (type == ENVIEWER_TYPE_7_GANONDORF) {
Actor_SetScale(&this->actor, 0.3f);
- this->actor.uncullZoneForward = 10000.0f;
- this->actor.uncullZoneScale = 10000.0f;
- this->actor.uncullZoneDownward = 10000.0f;
+ this->actor.cullingVolumeDistance = 10000.0f;
+ this->actor.cullingVolumeScale = 10000.0f;
+ this->actor.cullingVolumeDownward = 10000.0f;
} else if (type == ENVIEWER_TYPE_3_GANONDORF) {
if (gSaveContext.sceneLayer == 4) {
switch (play->csCtx.curFrame) {
@@ -487,7 +505,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) {
void EnViewer_Update(Actor* thisx, PlayState* play) {
EnViewer* this = (EnViewer*)thisx;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->animObjectSlot].segment);
this->actionFunc(this, play);
}
diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.h b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.h
index de2bf8ba27..a06435d553 100644
--- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.h
+++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.h
@@ -2,13 +2,14 @@
#define Z_EN_VIEWER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64skin.h"
struct EnViewer;
-typedef void (*EnViewerActionFunc)(struct EnViewer*, PlayState*);
-typedef void (*EnViewerDrawFunc)(struct EnViewer*, PlayState*);
-typedef void (*EnViewerInitAnimFunc)(struct EnViewer*, PlayState*, void*, AnimationHeader*);
+typedef void (*EnViewerActionFunc)(struct EnViewer*, struct PlayState*);
+typedef void (*EnViewerDrawFunc)(struct EnViewer*, struct PlayState*);
+typedef void (*EnViewerInitAnimFunc)(struct EnViewer*, struct PlayState*, void*, AnimationHeader*);
typedef enum EnViewerType {
/* 0 */ ENVIEWER_TYPE_0_HORSE_ZELDA,
diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/src/overlays/actors/ovl_En_Vm/z_en_vm.c
index 1fe315ae2f..2ee230d9bd 100644
--- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c
+++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c
@@ -5,11 +5,26 @@
*/
#include "z_en_vm.h"
-#include "assets/objects/object_vm/object_vm.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_vm/object_vm.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnVm_Init(Actor* thisx, PlayState* play);
void EnVm_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.h b/src/overlays/actors/ovl_En_Vm/z_en_vm.h
index 5b0fe1629e..7705d87032 100644
--- a/src/overlays/actors/ovl_En_Vm/z_en_vm.h
+++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.h
@@ -2,11 +2,11 @@
#define Z_EN_VM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnVm;
-typedef void (*EnVmActionFunc)(struct EnVm*, PlayState*);
+typedef void (*EnVmActionFunc)(struct EnVm*, struct PlayState*);
typedef struct EnVm {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c
index c20a257544..149eba4700 100644
--- a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c
+++ b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c
@@ -5,13 +5,22 @@
*/
#include "z_en_wall_tubo.h"
-#include "quake.h"
-#include "terminal.h"
#include "overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h"
#include "overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
-#define FLAGS ACTOR_FLAG_4
+#include "rand.h"
+#include "regs.h"
+#include "sfx.h"
+#include "printf.h"
+#include "quake.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64debug_display.h"
+#include "z64effect.h"
+#include "z64play.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnWallTubo_Init(Actor* thisx, PlayState* play);
void EnWallTubo_Destroy(Actor* thisx, PlayState* play);
@@ -147,7 +156,7 @@ void EnWallTubo_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 0, 0, 255, 255, 4, play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h
index 1e7eead00b..b2e9005372 100644
--- a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h
+++ b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.h
@@ -2,12 +2,12 @@
#define Z_EN_WALL_TUBO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
#include "overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.h"
struct EnWallTubo;
-typedef void (*EnWallTuboActionFunc)(struct EnWallTubo*, PlayState*);
+typedef void (*EnWallTuboActionFunc)(struct EnWallTubo*, struct PlayState*);
typedef struct EnWallTubo {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c
index 7346278053..abb91c80b9 100644
--- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c
+++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c
@@ -5,10 +5,24 @@
*/
#include "z_en_wallmas.h"
-#include "assets/objects/object_wallmaster/object_wallmaster.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_wallmaster/object_wallmaster.h"
+
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
#define TIMER_SCALE ((f32)OS_CLOCK_RATE / 10000000000)
@@ -151,7 +165,7 @@ void EnWallmas_TimerInit(EnWallmas* this, PlayState* play) {
Player* player = GET_PLAYER(play);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
- this->actor.flags |= ACTOR_FLAG_5;
+ this->actor.flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
this->timer = 0x82;
this->actor.velocity.y = 0.0f;
this->actor.world.pos.y = player->actor.world.pos.y;
@@ -172,7 +186,7 @@ void EnWallmas_SetupDrop(EnWallmas* this, PlayState* play) {
this->actor.world.rot.y = player->actor.shape.rot.y + 0x8000;
this->actor.floorHeight = player->actor.floorHeight;
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
- this->actor.flags &= ~ACTOR_FLAG_5;
+ this->actor.flags &= ~ACTOR_FLAG_DRAW_CULLING_DISABLED;
this->actionFunc = EnWallmas_Drop;
}
diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.h b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.h
index c82df375dc..76ee52d9e0 100644
--- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.h
+++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.h
@@ -2,7 +2,7 @@
#define Z_EN_WALLMAS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum WallmasType {
/* 0x00 */ WMT_TIMER,
@@ -12,7 +12,7 @@ typedef enum WallmasType {
struct EnWallmas;
-typedef void (*EnWallmasActionFunc)(struct EnWallmas*, PlayState*);
+typedef void (*EnWallmasActionFunc)(struct EnWallmas*, struct PlayState*);
typedef struct EnWallmas {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c
index 908a0d93d0..04082aa10f 100644
--- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c
+++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c
@@ -5,9 +5,18 @@
*/
#include "z_en_weather_tag.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "printf.h"
+#include "regs.h"
+#include "terminal.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64debug_display.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnWeatherTag_Init(Actor* thisx, PlayState* play);
void EnWeatherTag_Destroy(Actor* thisx, PlayState* play);
@@ -140,8 +149,13 @@ u8 WeatherTag_CheckEnableWeatherEffect(EnWeatherTag* this, PlayState* play, u8 s
if (play->envCtx.stormRequest == STORM_REQUEST_NONE &&
((play->envCtx.lightMode != LIGHT_MODE_TIME) ||
(play->envCtx.lightConfig != 1 && !play->envCtx.changeLightEnabled))) {
+#if OOT_VERSION >= PAL_1_0
gInterruptSongOfStorms = false;
+#endif
if (gWeatherMode != weatherMode) {
+#if OOT_VERSION < PAL_1_0
+ gInterruptSongOfStorms = false;
+#endif
gWeatherMode = weatherMode;
if (play->envCtx.stormRequest == STORM_REQUEST_NONE) {
play->envCtx.changeSkyboxState = CHANGE_SKYBOX_REQUESTED;
@@ -327,7 +341,7 @@ void EnWeatherTag_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 255, 0, 255, 255, 4, play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.h b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.h
index ccfc0e3f67..52b617a0e7 100644
--- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.h
+++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.h
@@ -2,11 +2,11 @@
#define Z_EN_WEATHER_TAG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnWeatherTag;
-typedef void (*EnWeatherTagActionFunc)(struct EnWeatherTag*, PlayState*);
+typedef void (*EnWeatherTagActionFunc)(struct EnWeatherTag*, struct PlayState*);
typedef struct EnWeatherTag {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c
index 3d3387fcd2..2e19328961 100644
--- a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c
+++ b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c
@@ -5,6 +5,18 @@
*/
#include "z_en_weiyer.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_ei/object_ei.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)
diff --git a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.h b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.h
index fbaefbd9a5..ab1b81c34f 100644
--- a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.h
+++ b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.h
@@ -2,11 +2,11 @@
#define Z_EN_WEIYER_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnWeiyer;
-typedef void (*EnWeiyerActionFunc)(struct EnWeiyer*, PlayState*);
+typedef void (*EnWeiyerActionFunc)(struct EnWeiyer*, struct PlayState*);
typedef struct EnWeiyer {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c
index 8d2e130c1c..4014597de7 100644
--- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c
+++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c
@@ -5,11 +5,30 @@
*/
#include "z_en_wf.h"
-#include "terminal.h"
#include "overlays/actors/ovl_En_Encount1/z_en_encount1.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_wf/object_wf.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnWf_Init(Actor* thisx, PlayState* play);
void EnWf_Destroy(Actor* thisx, PlayState* play);
@@ -43,7 +62,7 @@ void EnWf_SetupDie(EnWf* this);
void EnWf_Die(EnWf* this, PlayState* play);
s32 EnWf_DodgeRanged(PlayState* play, EnWf* this);
-static ColliderJntSphElementInit sJntSphItemsInit[4] = {
+static ColliderJntSphElementInit sJntSphElementsInit[4] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -99,8 +118,8 @@ static ColliderJntSphInit sJntSphInit = {
OC2_TYPE_1,
COLSHAPE_JNTSPH,
},
- ARRAY_COUNT(sJntSphItemsInit),
- sJntSphItemsInit,
+ ARRAY_COUNT(sJntSphElementsInit),
+ sJntSphElementsInit,
};
static ColliderCylinderInit sBodyCylinderInit = {
@@ -225,12 +244,12 @@ void EnWf_Init(Actor* thisx, PlayState* play) {
this->eyeIndex = 0;
this->unk_2F4 = 10.0f; // Set and not used
- Collider_InitJntSph(play, &this->colliderSpheres);
- Collider_SetJntSph(play, &this->colliderSpheres, thisx, &sJntSphInit, this->colliderSpheresElements);
- Collider_InitCylinder(play, &this->colliderCylinderBody);
- Collider_SetCylinder(play, &this->colliderCylinderBody, thisx, &sBodyCylinderInit);
- Collider_InitCylinder(play, &this->colliderCylinderTail);
- Collider_SetCylinder(play, &this->colliderCylinderTail, thisx, &sTailCylinderInit);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, thisx, &sJntSphInit, this->colliderJntSphElements);
+ Collider_InitCylinder(play, &this->bodyColliderCylinder);
+ Collider_SetCylinder(play, &this->bodyColliderCylinder, thisx, &sBodyCylinderInit);
+ Collider_InitCylinder(play, &this->tailColliderCylinder);
+ Collider_SetCylinder(play, &this->tailColliderCylinder, thisx, &sTailCylinderInit);
if (thisx->params == WOLFOS_NORMAL) {
SkelAnime_InitFlex(play, &this->skelAnime, &gWolfosNormalSkel, &gWolfosWaitingAnim, this->jointTable,
@@ -241,8 +260,8 @@ void EnWf_Init(Actor* thisx, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gWolfosWhiteSkel, &gWolfosWaitingAnim, this->jointTable,
this->morphTable, WOLFOS_LIMB_MAX);
Actor_SetScale(thisx, 0.01f);
- this->colliderSpheres.elements[0].base.atDmgInfo.damage =
- this->colliderSpheres.elements[1].base.atDmgInfo.damage = 8;
+ this->colliderJntSph.elements[0].base.atDmgInfo.damage =
+ this->colliderJntSph.elements[1].base.atDmgInfo.damage = 8;
thisx->naviEnemyId = NAVI_ENEMY_WHITE_WOLFOS;
}
@@ -256,9 +275,9 @@ void EnWf_Init(Actor* thisx, PlayState* play) {
void EnWf_Destroy(Actor* thisx, PlayState* play) {
EnWf* this = (EnWf*)thisx;
- Collider_DestroyJntSph(play, &this->colliderSpheres);
- Collider_DestroyCylinder(play, &this->colliderCylinderBody);
- Collider_DestroyCylinder(play, &this->colliderCylinderTail);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
+ Collider_DestroyCylinder(play, &this->bodyColliderCylinder);
+ Collider_DestroyCylinder(play, &this->tailColliderCylinder);
if ((this->actor.params != WOLFOS_NORMAL) && (this->switchFlag != 0xFF)) {
func_800F5B58();
@@ -716,7 +735,7 @@ void EnWf_RunAroundPlayer(EnWf* this, PlayState* play) {
void EnWf_SetupSlash(EnWf* this) {
Animation_PlayOnce(&this->skelAnime, &gWolfosSlashingAnim);
- this->colliderSpheres.base.atFlags &= ~AT_BOUNCED;
+ this->colliderJntSph.base.atFlags &= ~AT_BOUNCED;
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
this->action = WOLFOS_ACTION_SLASH;
this->unk_2FA = 0; // Set and not used
@@ -1246,28 +1265,30 @@ void func_80B36F40(EnWf* this, PlayState* play) {
}
void EnWf_UpdateDamage(EnWf* this, PlayState* play) {
- if (this->colliderSpheres.base.acFlags & AC_BOUNCED) {
- this->colliderSpheres.base.acFlags &= ~(AC_HIT | AC_BOUNCED);
- this->colliderCylinderBody.base.acFlags &= ~AC_HIT;
- this->colliderCylinderTail.base.acFlags &= ~AC_HIT;
- } else if ((this->colliderCylinderBody.base.acFlags & AC_HIT) ||
- (this->colliderCylinderTail.base.acFlags & AC_HIT)) {
+ if (this->colliderJntSph.base.acFlags & AC_BOUNCED) {
+ this->colliderJntSph.base.acFlags &= ~(AC_HIT | AC_BOUNCED);
+ this->bodyColliderCylinder.base.acFlags &= ~AC_HIT;
+ this->tailColliderCylinder.base.acFlags &= ~AC_HIT;
+ } else if ((this->bodyColliderCylinder.base.acFlags & AC_HIT) ||
+ (this->tailColliderCylinder.base.acFlags & AC_HIT)) {
if (this->action >= WOLFOS_ACTION_WAIT) {
s16 yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
- if ((!(this->colliderCylinderBody.base.acFlags & AC_HIT) &&
- (this->colliderCylinderTail.base.acFlags & AC_HIT)) ||
+ if ((!(this->bodyColliderCylinder.base.acFlags & AC_HIT) &&
+ (this->tailColliderCylinder.base.acFlags & AC_HIT)) ||
(ABS(yawDiff) > 19000)) {
this->actor.colChkInfo.damage *= 4;
}
- this->colliderCylinderBody.base.acFlags &= ~AC_HIT;
- this->colliderCylinderTail.base.acFlags &= ~AC_HIT;
+ this->bodyColliderCylinder.base.acFlags &= ~AC_HIT;
+ this->tailColliderCylinder.base.acFlags &= ~AC_HIT;
if (this->actor.colChkInfo.damageEffect != ENWF_DMGEFF_ICE_MAGIC) {
this->damageEffect = this->actor.colChkInfo.damageEffect;
- Actor_SetDropFlag(&this->actor, &this->colliderCylinderBody.elem, true);
+ Actor_SetDropFlag(&this->actor, &this->bodyColliderCylinder.elem, true);
+#if OOT_VERSION >= PAL_1_0
this->slashStatus = 0;
+#endif
if ((this->actor.colChkInfo.damageEffect == ENWF_DMGEFF_STUN) ||
(this->actor.colChkInfo.damageEffect == ENWF_DMGEFF_UNDEF)) {
@@ -1318,23 +1339,23 @@ void EnWf_Update(Actor* thisx, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.z, 0, 1, 1000, 0);
}
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSpheres.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base);
if (this->action >= WOLFOS_ACTION_WAIT) {
if ((this->actor.colorFilterTimer == 0) || !(this->actor.colorFilterParams & 0x4000)) {
- Collider_UpdateCylinder(&this->actor, &this->colliderCylinderBody);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinderTail.base);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinderBody.base);
+ Collider_UpdateCylinder(&this->actor, &this->bodyColliderCylinder);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->tailColliderCylinder.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyColliderCylinder.base);
}
}
if (this->action == WOLFOS_ACTION_BLOCKING) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSpheres.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base);
}
if (this->slashStatus > 0) {
- if (!(this->colliderSpheres.base.atFlags & AT_BOUNCED)) {
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSpheres.base);
+ if (!(this->colliderJntSph.base.atFlags & AT_BOUNCED)) {
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
} else {
EnWf_SetupRecoilFromBlockedSlash(this);
}
@@ -1368,16 +1389,16 @@ void EnWf_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
EnWf* this = (EnWf*)thisx;
s32 bodyPartIndex = -1;
- Collider_UpdateSpheres(limbIndex, &this->colliderSpheres);
+ Collider_UpdateSpheres(limbIndex, &this->colliderJntSph);
if (limbIndex == WOLFOS_LIMB_TAIL) {
Vec3f colliderPos;
bodyPartIndex = -1;
Matrix_MultVec3f(&colliderVec, &colliderPos);
- this->colliderCylinderTail.dim.pos.x = colliderPos.x;
- this->colliderCylinderTail.dim.pos.y = colliderPos.y;
- this->colliderCylinderTail.dim.pos.z = colliderPos.z;
+ this->tailColliderCylinder.dim.pos.x = colliderPos.x;
+ this->tailColliderCylinder.dim.pos.y = colliderPos.y;
+ this->tailColliderCylinder.dim.pos.z = colliderPos.z;
}
if ((this->fireTimer != 0) || ((this->actor.colorFilterTimer != 0) && (this->actor.colorFilterParams & 0x4000))) {
diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.h b/src/overlays/actors/ovl_En_Wf/z_en_wf.h
index 83e46e6d19..afc18f7d01 100644
--- a/src/overlays/actors/ovl_En_Wf/z_en_wf.h
+++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.h
@@ -2,11 +2,11 @@
#define Z_EN_WF_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnWf;
-typedef void (*EnWfActionFunc)(struct EnWf*, PlayState*);
+typedef void (*EnWfActionFunc)(struct EnWf*, struct PlayState*);
typedef enum EnWfLimb {
/* 0 */ WOLFOS_LIMB_NONE,
@@ -74,10 +74,10 @@ typedef struct EnWf {
/* 0x02FE */ s16 runAngle;
/* 0x0300 */ s16 unk_300; // Set, but ineffectual (see comment in Draw)
/* 0x0302 */ u8 eyeIndex;
- /* 0x0304 */ ColliderJntSph colliderSpheres;
- /* 0x0324 */ ColliderJntSphElement colliderSpheresElements[4];
- /* 0x0424 */ ColliderCylinder colliderCylinderBody;
- /* 0x0470 */ ColliderCylinder colliderCylinderTail;
+ /* 0x0304 */ ColliderJntSph colliderJntSph;
+ /* 0x0324 */ ColliderJntSphElement colliderJntSphElements[4];
+ /* 0x0424 */ ColliderCylinder bodyColliderCylinder;
+ /* 0x0470 */ ColliderCylinder tailColliderCylinder;
/* 0x04BC */ Vec3f unk_4BC;
/* 0x04C8 */ Vec3f unk_4C8;
/* 0x04D4 */ Vec3s unk_4D4;
diff --git a/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c b/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c
index 3b5f2384ef..a1cf8f5be6 100644
--- a/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c
+++ b/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c
@@ -5,7 +5,17 @@
*/
#include "z_en_wonder_item.h"
+
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64debug_display.h"
+#include "z64play.h"
+#include "z64player.h"
#define FLAGS 0
@@ -229,7 +239,7 @@ void EnWonderItem_MultitagFree(EnWonderItem* this, PlayState* play) {
return;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BREG(0) != 0) {
DebugDisplay_AddObject(sTagPointsFree[i].x, sTagPointsFree[i].y, sTagPointsFree[i].z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f,
@@ -306,7 +316,7 @@ void EnWonderItem_MultitagOrdered(EnWonderItem* this, PlayState* play) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BREG(0) != 0) {
DebugDisplay_AddObject(sTagPointsOrdered[i].x, sTagPointsOrdered[i].y, sTagPointsOrdered[i].z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f,
@@ -375,7 +385,7 @@ void EnWonderItem_Update(Actor* thisx, PlayState* play) {
colorIndex = 0;
}
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, debugArrowColors[colorIndex], debugArrowColors[colorIndex + 1],
diff --git a/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.h b/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.h
index 4aca3ffe0a..5b99e235c3 100644
--- a/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.h
+++ b/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.h
@@ -2,11 +2,11 @@
#define Z_EN_WONDER_ITEM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnWonderItem;
-typedef void (*EnWonderItemUpdateFunc)(struct EnWonderItem*, PlayState*);
+typedef void (*EnWonderItemUpdateFunc)(struct EnWonderItem*, struct PlayState*);
typedef struct EnWonderItem {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c
index 769947d5b5..fb455390a7 100644
--- a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c
+++ b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c
@@ -5,7 +5,13 @@
*/
#include "z_en_wonder_talk.h"
+
+#include "printf.h"
+#include "regs.h"
#include "terminal.h"
+#include "z64debug_display.h"
+#include "z64play.h"
+#include "z64save.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_LOCK_ON_DISABLED)
@@ -239,7 +245,7 @@ void EnWonderTalk_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
Actor_SetFocus(&this->actor, this->height);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
if (this->unk_15A != 0) {
if ((this->unk_15A & 1) == 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
diff --git a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.h b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.h
index ae21c5b41f..a42c3febfc 100644
--- a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.h
+++ b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.h
@@ -2,11 +2,11 @@
#define Z_EN_WONDER_TALK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnWonderTalk;
-typedef void (*EnWonderTalkFunc)(struct EnWonderTalk*, PlayState*);
+typedef void (*EnWonderTalkFunc)(struct EnWonderTalk*, struct PlayState*);
typedef struct EnWonderTalk {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c
index f3cde9606f..bb58339fc1 100644
--- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c
+++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c
@@ -5,7 +5,14 @@
*/
#include "z_en_wonder_talk2.h"
+
+#include "printf.h"
+#include "regs.h"
#include "terminal.h"
+#include "z64debug_display.h"
+#include "z64item.h"
+#include "z64play.h"
+#include "z64player.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_LOCK_ON_DISABLED)
@@ -131,7 +138,7 @@ void func_80B3A15C(EnWonderTalk2* this, PlayState* play) {
if (!((this->actor.xzDistToPlayer > 40.0f + this->triggerRange) ||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) > 100.0f) || (yawDiff >= 0x4000))) {
- if (OOT_DEBUG && this->unk_158 >= 2) {
+ if (DEBUG_FEATURES && this->unk_158 >= 2) {
PRINTF("\n\n");
// "Transparent Message Kimi Set"
PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 透明メッセージ君せっと %x\n" VT_RST, this->actor.params);
@@ -193,7 +200,7 @@ void func_80B3A3D4(EnWonderTalk2* this, PlayState* play) {
if (this->talkMode == 4) {
this->unk_15A = true;
}
- this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4);
+ this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED);
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_7);
this->unk_156 = true;
this->actionFunc = func_80B3A4F8;
@@ -220,7 +227,7 @@ void func_80B3A4F8(EnWonderTalk2* this, PlayState* play) {
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 100.0f)) &&
!Play_InCsMode(play)) {
- if (OOT_DEBUG && this->unk_158 >= 2) {
+ if (DEBUG_FEATURES && this->unk_158 >= 2) {
PRINTF("\n\n");
// "Transparent Message Kimi Seto"
PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ 透明メッセージ君せっと %x\n" VT_RST, this->actor.params);
@@ -256,7 +263,7 @@ void func_80B3A4F8(EnWonderTalk2* this, PlayState* play) {
if (!this->unk_156) {
Message_StartTextbox(play, this->actor.textId, NULL);
Player_SetCsActionWithHaltedActors(play, NULL, PLAYER_CSACTION_8);
- this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->actionFunc = func_80B3A3D4;
}
@@ -278,7 +285,7 @@ void EnWonderTalk2_Update(Actor* thisx, PlayState* play) {
Actor_SetFocus(&this->actor, this->height);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
if (this->unk_158 != 0) {
if ((this->unk_158 & 1) == 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.h b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.h
index f58775426f..0dad49d375 100644
--- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.h
+++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.h
@@ -2,11 +2,11 @@
#define Z_EN_WONDER_TALK2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnWonderTalk2;
-typedef void (*EnWonderTalk2Func)(struct EnWonderTalk2*, PlayState*);
+typedef void (*EnWonderTalk2Func)(struct EnWonderTalk2*, struct PlayState*);
typedef struct EnWonderTalk2 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c
index f893a1b06c..bf32807226 100644
--- a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c
+++ b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c
@@ -5,6 +5,21 @@
*/
#include "z_en_wood02.h"
+
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/object_wood02/object_wood02.h"
#define FLAGS 0
@@ -104,11 +119,11 @@ s32 EnWood02_SpawnZoneCheck(EnWood02* this, PlayState* play, Vec3f* pos) {
phi_f12 = ((this->actor.projectedW == 0.0f) ? 1000.0f : fabsf(1.0f / this->actor.projectedW));
- if ((-this->actor.uncullZoneScale < this->actor.projectedPos.z) &&
- (this->actor.projectedPos.z < (this->actor.uncullZoneForward + this->actor.uncullZoneScale)) &&
- (((fabsf(this->actor.projectedPos.x) - this->actor.uncullZoneScale) * phi_f12) < 1.0f) &&
- (((this->actor.projectedPos.y + this->actor.uncullZoneDownward) * phi_f12) > -1.0f) &&
- (((this->actor.projectedPos.y - this->actor.uncullZoneScale) * phi_f12) < 1.0f)) {
+ if ((-this->actor.cullingVolumeScale < this->actor.projectedPos.z) &&
+ (this->actor.projectedPos.z < (this->actor.cullingVolumeDistance + this->actor.cullingVolumeScale)) &&
+ (((fabsf(this->actor.projectedPos.x) - this->actor.cullingVolumeScale) * phi_f12) < 1.0f) &&
+ (((this->actor.projectedPos.y + this->actor.cullingVolumeDownward) * phi_f12) > -1.0f) &&
+ (((this->actor.projectedPos.y - this->actor.cullingVolumeScale) * phi_f12) < 1.0f)) {
return true;
}
return false;
@@ -200,9 +215,9 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
case WOOD_BUSH_GREEN_LARGE:
case WOOD_BUSH_BLACK_LARGE:
actorScale = 1.5f;
- this->actor.uncullZoneForward = 4000.0f;
- this->actor.uncullZoneScale = 2000.0f;
- this->actor.uncullZoneDownward = 2400.0f;
+ this->actor.cullingVolumeDistance = 4000.0f;
+ this->actor.cullingVolumeScale = 2000.0f;
+ this->actor.cullingVolumeDownward = 2400.0f;
break;
case WOOD_TREE_CONICAL_SPAWNER:
case WOOD_TREE_OVAL_YELLOW_SPAWNER:
@@ -223,15 +238,15 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
case WOOD_TREE_KAKARIKO_ADULT:
case WOOD_BUSH_GREEN_SMALL:
case WOOD_BUSH_BLACK_SMALL:
- this->actor.uncullZoneForward = 4000.0f;
- this->actor.uncullZoneScale = 800.0f;
- this->actor.uncullZoneDownward = 1800.0f;
+ this->actor.cullingVolumeDistance = 4000.0f;
+ this->actor.cullingVolumeScale = 800.0f;
+ this->actor.cullingVolumeDownward = 1800.0f;
break;
case WOOD_TREE_CONICAL_SMALL:
actorScale = 0.6f;
- this->actor.uncullZoneForward = 4000.0f;
- this->actor.uncullZoneScale = 400.0f;
- this->actor.uncullZoneDownward = 1000.0f;
+ this->actor.cullingVolumeDistance = 4000.0f;
+ this->actor.cullingVolumeScale = 400.0f;
+ this->actor.cullingVolumeDownward = 1000.0f;
break;
case WOOD_LEAF_GREEN:
case WOOD_LEAF_YELLOW:
@@ -275,7 +290,7 @@ void EnWood02_Init(Actor* thisx, PlayState* play2) {
this->actor.world.pos.x += (sSpawnSin * sSpawnDistance[5]);
this->actor.world.pos.z += (sSpawnCos * sSpawnDistance[5]);
} else {
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
// Snap to floor, or remove if over void
@@ -309,7 +324,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) {
// Despawn extra trees in a group if out of range
if ((this->spawnType == WOOD_SPAWN_SPAWNED) && (this->actor.parent != NULL)) {
- if (!(this->actor.flags & ACTOR_FLAG_6)) {
+ if (!(this->actor.flags & ACTOR_FLAG_INSIDE_CULLING_VOLUME)) {
u8 new_var = this->unk_14E[0];
u8 phi_v0 = 0;
s32 pad;
diff --git a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.h b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.h
index 14ca5b967e..89242188ae 100644
--- a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.h
+++ b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.h
@@ -2,7 +2,7 @@
#define Z_EN_WOOD02_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnWood02;
diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c
index 20d94e8237..c8b6685587 100644
--- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c
+++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c
@@ -7,16 +7,36 @@
#include "z_en_xc.h"
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/object_xc/object_xc.h"
#include "assets/scenes/overworld/spot05/spot05_scene.h"
#include "assets/scenes/overworld/spot17/spot17_scene.h"
#include "assets/scenes/indoors/tokinoma/tokinoma_scene.h"
#include "assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.h"
-#include "terminal.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:0"
+#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" \
+ "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnXc_Init(Actor* thisx, PlayState* play);
void EnXc_Destroy(Actor* thisx, PlayState* play);
@@ -228,7 +248,7 @@ void func_80B3C7D4(EnXc* this, s32 action1, s32 action2, s32 action3) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 EnXc_NoCutscenePlaying(PlayState* play) {
if (play->csCtx.state == CS_STATE_IDLE) {
return true;
@@ -253,25 +273,25 @@ void func_80B3C8CC(EnXc* this, PlayState* play) {
SkelAnime* skelAnime = &this->skelAnime;
if (skelAnime->jointTable[0].y >= skelAnime->baseTransl.y) {
- skelAnime->moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
- AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f);
+ skelAnime->movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, skelAnime, 1.0f);
}
}
void func_80B3C924(EnXc* this, PlayState* play) {
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80B3C964(EnXc* this, PlayState* play) {
this->skelAnime.baseTransl = this->skelAnime.jointTable[0];
this->skelAnime.prevTransl = this->skelAnime.jointTable[0];
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80B3C9DC(EnXc* this) {
- this->skelAnime.moveFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
+ this->skelAnime.movementFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
}
void func_80B3C9EC(EnXc* this) {
@@ -304,7 +324,7 @@ s32 EnXc_MinuetCS(EnXc* this, PlayState* play) {
if (!Play_InCsMode(play)) {
s32 pad;
- play->csCtx.script = SEGMENTED_TO_VIRTUAL(gMinuetCs);
+ play->csCtx.script = SEGMENTED_TO_VIRTUAL(gMeadowMinuetCs);
gSaveContext.cutsceneTrigger = 1;
SET_EVENTCHKINF(EVENTCHKINF_50);
Item_Give(play, ITEM_SONG_MINUET);
@@ -351,8 +371,8 @@ s32 EnXc_BoleroCS(EnXc* this, PlayState* play) {
}
void EnXc_SetupSerenadeAction(EnXc* this, PlayState* play) {
- if (!(CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON) && OOT_DEBUG) && !GET_EVENTCHKINF(EVENTCHKINF_52) &&
- LINK_IS_ADULT) {
+ if (!(CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS, EQUIP_INV_BOOTS_IRON) && DEBUG_FEATURES) &&
+ !GET_EVENTCHKINF(EVENTCHKINF_52) && LINK_IS_ADULT) {
s32 pad;
this->action = SHEIK_ACTION_SERENADE;
@@ -487,7 +507,7 @@ void EnXc_SetColossusWindSFX(PlayState* play) {
if (D_80B41D90 != 0) {
f32 speed = Math3D_Vec3f_DistXYZ(&D_80B42DB0, eye) / 7.058922f;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
static f32 sMaxSpeed = 0.0f;
sMaxSpeed = CLAMP_MIN(sMaxSpeed, speed);
@@ -1395,8 +1415,8 @@ void func_80B3F3D8(void) {
Sfx_PlaySfxCentered2(NA_SE_PL_SKIP);
}
-#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64" \
- "ntsc-1.2:128"
+#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64 ique-cn:64" \
+ "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) {
static Vec3f D_80B42DA0;
@@ -1693,7 +1713,7 @@ void EnXc_ActionFunc54(EnXc* this, PlayState* play) {
EnXc_BgCheck(this, play);
EnXc_SetEyePattern(this);
EnXc_SetupShowTriforceAction(this, play);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80B3C888(this, play);
#endif
}
@@ -1706,7 +1726,7 @@ void EnXc_ShowTriforce(EnXc* this, PlayState* play) {
EnXc_CalcTriforce(&this->actor, play);
func_80B3FAE0(this);
EnXc_SetupShowTriforceIdleAction(this, animFinished);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
func_80B3C888(this, play);
#endif
}
@@ -1848,7 +1868,7 @@ void EnXc_SetupContortions(EnXc* this, PlayState* play) {
s32 pad[2];
SkelAnime* skelAnime = &this->skelAnime;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
Animation_Change(skelAnime, &gSheikIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gSheikIdleAnim), ANIMMODE_LOOP,
0.0f);
#endif
@@ -2023,7 +2043,8 @@ s32 EnXc_SetupNocturneState(Actor* thisx, PlayState* play) {
Actor_Kill(thisx);
break;
default:
- PRINTF("En_Oa2_Stalker_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Oa2_Stalker_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Oa2_Stalker_Check_DemoMode: There is no such action!!!!!!!!\n"));
break;
}
@@ -2332,7 +2353,8 @@ void EnXc_Update(Actor* thisx, PlayState* play) {
s32 action = this->action;
if ((action < 0) || (action >= ARRAY_COUNT(sActionFuncs)) || (sActionFuncs[action] == NULL)) {
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
} else {
sActionFuncs[action](this, play);
}
@@ -2374,7 +2396,7 @@ void EnXc_Init(Actor* thisx, PlayState* play) {
case SHEIK_TYPE_9:
EnXc_InitTempleOfTime(this, play);
break;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
case SHEIK_TYPE_0:
EnXc_DoNothing(this, play);
break;
@@ -2449,8 +2471,8 @@ void EnXc_Draw(Actor* thisx, PlayState* play) {
EnXc* this = (EnXc*)thisx;
if (this->drawMode < 0 || this->drawMode > 5 || sDrawFuncs[this->drawMode] == NULL) {
- // "Draw mode is abnormal!!!!!!!!!!!!!!!!!!!!!!!!!"
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
} else {
sDrawFuncs[this->drawMode](thisx, play);
}
diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.h b/src/overlays/actors/ovl_En_Xc/z_en_xc.h
index c01b98a842..1cc56f68e6 100644
--- a/src/overlays/actors/ovl_En_Xc/z_en_xc.h
+++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.h
@@ -2,12 +2,12 @@
#define Z_EN_XC_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnXc;
-typedef void (*EnXcActionFunc)(struct EnXc*, PlayState*);
-typedef void (*EnXcDrawFunc)(struct Actor*, PlayState*);
+typedef void (*EnXcActionFunc)(struct EnXc*, struct PlayState*);
+typedef void (*EnXcDrawFunc)(struct Actor*, struct PlayState*);
typedef enum EnXcType {
/* 0 */ SHEIK_TYPE_0,
diff --git a/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c b/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c
index 83a24f5f2b..e5f75d60df 100644
--- a/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c
+++ b/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c
@@ -5,7 +5,18 @@
*/
#include "z_en_yabusame_mark.h"
+
+#include "printf.h"
+#include "regs.h"
+#include "sequence.h"
+#include "sfx.h"
#include "terminal.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64debug_display.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
#define FLAGS 0
@@ -104,7 +115,7 @@ void EnYabusameMark_Init(Actor* thisx, PlayState* play) {
Collider_InitQuad(play, &this->collider);
Collider_SetQuad(play, &this->collider, &this->actor, &sQuadInit);
this->worldPos = this->actor.world.pos;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
if (gSaveContext.sceneLayer != 4) {
Actor_Kill(&this->actor);
return;
@@ -215,7 +226,7 @@ void EnYabusameMark_Update(Actor* thisx, PlayState* play) {
Collider_SetQuadVertices(&this->collider, &this->vertexA, &this->vertexB, &this->vertexC, &this->vertexD);
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
- if (OOT_DEBUG && BREG(0) != 0) {
+ if (DEBUG_FEATURES && BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 0, 0xFF, 0, 0xFF, 4, play->state.gfxCtx);
diff --git a/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.h b/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.h
index f4ec71bec5..12cfb46cbb 100644
--- a/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.h
+++ b/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.h
@@ -2,11 +2,11 @@
#define Z_EN_YABUSAME_MARK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnYabusameMark;
-typedef void (*EnYabusameMarkActionFunc)(struct EnYabusameMark*, PlayState*);
+typedef void (*EnYabusameMarkActionFunc)(struct EnYabusameMark*, struct PlayState*);
typedef struct EnYabusameMark {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c
index 8ac0995c59..22d454fb61 100644
--- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c
+++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c
@@ -5,9 +5,20 @@
*/
#include "z_en_yukabyun.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_yukabyun/object_yukabyun.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnYukabyun_Init(Actor* thisx, PlayState* play);
void EnYukabyun_Destroy(Actor* thisx, PlayState* play);
@@ -134,7 +145,7 @@ void EnYukabyun_Update(Actor* thisx, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 20.0f, 8.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
Collider_UpdateCylinder(&this->actor, &this->collider);
- this->actor.flags |= ACTOR_FLAG_24;
+ this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.h b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.h
index 773237fbce..a695fb4c1f 100644
--- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.h
+++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.h
@@ -2,11 +2,11 @@
#define Z_EN_YUKABYUN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnYukabyun;
-typedef void (*EnYukabyunActionFunc)(struct EnYukabyun*, PlayState*);
+typedef void (*EnYukabyunActionFunc)(struct EnYukabyun*, struct PlayState*);
typedef struct EnYukabyun {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Zf/z_en_zf.c b/src/overlays/actors/ovl_En_Zf/z_en_zf.c
index 9c50186329..b49481e881 100644
--- a/src/overlays/actors/ovl_En_Zf/z_en_zf.c
+++ b/src/overlays/actors/ovl_En_Zf/z_en_zf.c
@@ -5,9 +5,27 @@
*/
#include "z_en_zf.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "regs.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_zf/object_zf.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnZf_Init(Actor* thisx, PlayState* play);
void EnZf_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_En_Zf/z_en_zf.h b/src/overlays/actors/ovl_En_Zf/z_en_zf.h
index c5ade78544..9dfb3119b9 100644
--- a/src/overlays/actors/ovl_En_Zf/z_en_zf.h
+++ b/src/overlays/actors/ovl_En_Zf/z_en_zf.h
@@ -2,11 +2,11 @@
#define Z_EN_ZF_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnZf;
-typedef void (*EnZfActionFunc)(struct EnZf*, PlayState*);
+typedef void (*EnZfActionFunc)(struct EnZf*, struct PlayState*);
typedef enum EnZfType {
/* -2 */ ENZF_TYPE_DINOLFOS = -2,
diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
index a73d1e20e8..5c60653b4e 100644
--- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
+++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
@@ -5,9 +5,23 @@
*/
#include "z_en_zl1.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "letterbox.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_zl1/object_zl1.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
void EnZl1_Init(Actor* thisx, PlayState* play);
void EnZl1_Destroy(Actor* thisx, PlayState* play);
@@ -23,7 +37,7 @@ void func_80B4BBC4(EnZl1* this, PlayState* play);
void func_80B4BC78(EnZl1* this, PlayState* play);
void func_80B4BF2C(EnZl1* this, PlayState* play);
-extern CutsceneData D_80B4C5D0[];
+extern CutsceneData gTriforceCreationStartCs[];
#include "z_en_zl1_camera_data.inc.c"
@@ -318,7 +332,7 @@ void func_80B4B240(EnZl1* this, PlayState* play) {
if (this->skelAnime.curFrame == frameCount) {
animHeaderSeg = &gChildZelda1Anim_00438;
sp3C = 1;
- play->csCtx.script = D_80B4C5D0;
+ play->csCtx.script = gTriforceCreationStartCs;
gSaveContext.cutsceneTrigger = 1;
this->actionFunc = func_80B4B8B4;
this->unk_1E2++;
@@ -345,8 +359,8 @@ void func_80B4B834(CsCmdActorCue* cue, Vec3f* dest) {
}
void func_80B4B874(EnZl1* this, PlayState* play) {
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80B4B8B4(EnZl1* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h
index 4b9f2984e0..ada1335819 100644
--- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h
+++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h
@@ -2,11 +2,11 @@
#define Z_EN_ZL1_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnZl1;
-typedef void (*EnZl1ActionFunc)(struct EnZl1*, PlayState*);
+typedef void (*EnZl1ActionFunc)(struct EnZl1*, struct PlayState*);
typedef struct EnZl1 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_camera_data.inc.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_camera_data.inc.c
index fb4776673e..f6fac8940a 100644
--- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_camera_data.inc.c
+++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_camera_data.inc.c
@@ -1,4 +1,3 @@
-#include "z_en_zl1.h"
#include "z64cutscene_commands.h"
static CutsceneCameraDirection D_80B4D5C0[] = {
diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c
index d0b011d454..4a8622cbba 100644
--- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c
+++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c
@@ -1,24 +1,25 @@
-#include "z_en_zl1.h"
+#include "sequence.h"
#include "z64cutscene_commands.h"
+#include "z64player.h"
// clang-format off
-CutsceneData D_80B4C5D0[] = {
- CS_BEGIN_CUTSCENE(28, 3000),
+CutsceneData gTriforceCreationStartCs[] = {
+ CS_HEADER(28, 3000),
CS_PLAYER_CUE_LIST(3),
CS_PLAYER_CUE(PLAYER_CUEID_5, 400, 1211, 0x0000, 0xC000, 0x0000, -422, 84, 1, -422, 84, 1, CS_FLOAT(0xF6484E4, 1.1266862e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_1, 1211, 1241, 0x0000, 0xC000, 0x0000, -422, 84, 1, -483, 84, 0, CS_FLOAT(0xF6484E4, 1.1266862e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
CS_PLAYER_CUE(PLAYER_CUEID_41, 1241, 1311, 0x0000, 0xC000, 0x0000, -483, 84, 0, -483, 84, 0, CS_FLOAT(0xF6484E4, 1.1266862e-29f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x1, 1e-45f)),
- CS_ACTOR_CUE_LIST(18, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_0_2, 1),
CS_ACTOR_CUE(0x0007, 1170, 1316, 0x7477, 0x0000, 0x0000, -485, 84, 0, -469, 85, -55, CS_FLOAT(0x3DE07038, 0.10958904f), CS_FLOAT(0x3BE07038, 0.006849315f), CS_FLOAT(0xBDE07038, -0.10958904f)),
CS_UNK_DATA_LIST(0x00000049, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFE8, 0x00000003, 0x00000000, 0xFFFFFFE8, 0x00000003, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(16, 3),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_1_1, 3),
CS_ACTOR_CUE(0x0009, 1220, 1310, 0x8000, 0x0000, 0x0000, -890, 90, 150, -890, 90, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x000A, 1310, 1449, 0x0000, 0x0000, 0x0000, -890, 90, 0, -890, 90, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_ACTOR_CUE(0x0004, 1449, 1457, 0x0000, 0x0000, 0x0000, -890, 90, 0, -890, 90, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_MISC_LIST(1),
CS_MISC(CS_MISC_STOP_CUTSCENE, 1460, 1461, 0x0000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000002, 0xFFFFFFFF, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000),
- CS_ACTOR_CUE_LIST(29, 1),
+ CS_ACTOR_CUE_LIST(CS_CMD_ACTOR_CUE_3_0, 1),
CS_ACTOR_CUE(0x0002, 330, 763, 0x0000, 0x0000, 0x0000, -1250, 150, 0, -1250, 150, 0, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 200, 231),
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 230, 271),
@@ -228,21 +229,21 @@ CutsceneData D_80B4C5D0[] = {
CS_CAM_POINT(CS_CAM_STOP, 0x00, 30, CS_FLOAT(0x412FFF56, 10.999838f), -1349, 124, -6, 0x392C),
CS_TEXT_LIST(10),
CS_TEXT_NONE(0, 50),
- CS_TEXT(0x7035, 50, 190, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x7035, 50, 190, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_TEXT_NONE(190, 300),
- CS_TEXT(0x7036, 300, 800, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x7036, 300, 800, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_TEXT_NONE(800, 970),
- CS_TEXT(0x7037, 970, 1150, 0x0000, 0xFFFF, 0x7038),
+ CS_TEXT(0x7037, 970, 1150, CS_TEXT_NORMAL, 0xFFFF, 0x7038),
CS_TEXT_NONE(1150, 1190),
- CS_TEXT(0x7005, 1190, 1200, 0x0000, 0xFFFF, 0x700B),
+ CS_TEXT(0x7005, 1190, 1200, CS_TEXT_NORMAL, 0xFFFF, 0x700B),
CS_TEXT_NONE(1200, 1340),
- CS_TEXT(0x7009, 1340, 1420, 0x0000, 0xFFFF, 0xFFFF),
+ CS_TEXT(0x7009, 1340, 1420, CS_TEXT_NORMAL, 0xFFFF, 0xFFFF),
CS_START_SEQ_LIST(1),
CS_START_SEQ(NA_BGM_HYRULE_CS, 230, 231, 0x0000, 0x00000000, 0x00000003, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000000),
CS_START_SEQ_LIST(1),
CS_START_SEQ(NA_BGM_ZELDA_THEME, 870, 871, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0xFFFFFFFD, 0xFFFFFFFE, 0x00000000, 0xFFFFFFFD),
CS_STOP_SEQ_LIST(1),
CS_STOP_SEQ(NA_BGM_GENERAL_SFX, 110, 111, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x00000001, 0xFFFFFFFE, 0x00000000, 0x00000001),
- CS_END(),
+ CS_END_OF_SCRIPT(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c
index 670568d122..c00790e02c 100644
--- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c
+++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c
@@ -5,15 +5,28 @@
*/
#include "z_en_zl2.h"
-#include "terminal.h"
-
-#include "z64frame_advance.h"
-
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
+
+#include "libc64/math64.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64frame_advance.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_zl2/object_zl2.h"
#include "assets/objects/object_zl2_anime1/object_zl2_anime1.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnZl2_Init(Actor* thisx, PlayState* play);
void EnZl2_Destroy(Actor* thisx, PlayState* play);
@@ -579,7 +592,7 @@ void EnZl2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
void func_80B4FCCC(EnZl2* this, PlayState* play) {
s32 objectSlot = this->zl2Anime1ObjectSlot;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
}
void func_80B4FD00(EnZl2* this, AnimationHeader* animation, u8 arg2, f32 morphFrames, s32 arg4) {
@@ -992,7 +1005,8 @@ void func_80B50A04(EnZl2* this, PlayState* play) {
func_80B50644(this, play);
break;
default:
- PRINTF("En_Zl2_inAgain_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Zl2_inAgain_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Zl2_inAgain_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
}
@@ -1383,7 +1397,8 @@ void func_80B51948(EnZl2* this, PlayState* play) {
func_80B513A8(this, play);
break;
default:
- PRINTF("En_Zl2_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Zl2_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Zl2_inEnding_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->cueId = nextCueId;
}
@@ -1547,7 +1562,8 @@ void func_80B51FA8(EnZl2* this, PlayState* play) {
Actor_Kill(&this->actor);
break;
default:
- PRINTF("En_Zl2_inRunning_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Zl2_inRunning_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Zl2_inRunning_Check_DemoMode: There is no such action!!!!!!!!\n"));
break;
}
this->cueId = nextCueId;
@@ -1581,7 +1597,7 @@ void func_80B52114(EnZl2* this, PlayState* play) {
case 4:
func_80B51D0C(this, play);
break;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
case 0:
func_80B4FD90(this, play);
break;
@@ -1598,7 +1614,7 @@ void func_80B521A0(EnZl2* this, PlayState* play) {
s32 objectSlot = Object_GetSlot(objectCtx, OBJECT_ZL2_ANIME1);
s32 pad2;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (objectSlot < 0) {
PRINTF(VT_FGCOL(RED) "En_Zl2_main_bankアニメーションのバンクを読めない!!!!!!!!!!!!\n" VT_RST);
return;
@@ -1617,7 +1633,8 @@ void EnZl2_Update(Actor* thisx, PlayState* play) {
EnZl2* this = (EnZl2*)thisx;
if (this->action < 0 || this->action >= 0x24 || sActionFuncs[this->action] == NULL) {
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sActionFuncs[this->action](this, play);
@@ -1713,7 +1730,8 @@ void EnZl2_Draw(Actor* thisx, PlayState* play) {
EnZl2* this = (EnZl2*)thisx;
if ((this->drawConfig < 0) || (this->drawConfig >= 3) || (sDrawFuncs[this->drawConfig] == NULL)) {
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sDrawFuncs[this->drawConfig](this, play);
diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h
index c477ea57e1..4bd0730de7 100644
--- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h
+++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h
@@ -2,12 +2,12 @@
#define Z_EN_ZL2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnZl2;
-typedef void (*EnZl2ActionFunc)(struct EnZl2*, PlayState*);
-typedef void (*EnZl2DrawFunc)(struct EnZl2*, PlayState*);
+typedef void (*EnZl2ActionFunc)(struct EnZl2*, struct PlayState*);
+typedef void (*EnZl2DrawFunc)(struct EnZl2*, struct PlayState*);
typedef struct EnZl2 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
index d6a2a02893..ca44cb5731 100644
--- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
+++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
@@ -6,16 +6,36 @@
#include "z_en_zl3.h"
+#include "libc64/math64.h"
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
-
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64audio.h"
#include "z64frame_advance.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
#include "overlays/actors/ovl_En_Encount2/z_en_encount2.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
#include "assets/objects/object_zl2/object_zl2.h"
#include "assets/objects/object_zl2_anime2/object_zl2_anime2.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void EnZl3_Init(Actor* thisx, PlayState* play);
void EnZl3_Destroy(Actor* thisx, PlayState* play);
@@ -746,7 +766,7 @@ s32 func_80B54DD4(EnZl3* this) {
void func_80B54DE0(EnZl3* this, PlayState* play) {
s32 objectSlot = this->zl2Anime2ObjectSlot;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
}
void func_80B54E14(EnZl3* this, AnimationHeader* animation, u8 arg2, f32 morphFrames, s32 arg4) {
@@ -948,7 +968,8 @@ void func_80B55444(EnZl3* this, PlayState* play) {
this->unk_328 = 1;
FALLTHROUGH;
default:
- PRINTF("En_Zl3_inFinal_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Zl3_inFinal_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Zl3_inFinal_Check_DemoMode: There is no such action!!!!!!!!\n"));
break;
}
this->unk_2F0 = temp_v0;
@@ -1364,7 +1385,8 @@ void func_80B564A8(EnZl3* this, PlayState* play) {
Actor_Kill(&this->actor);
break;
default:
- PRINTF("En_Zl3_inFinal2_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
+ PRINTF(T("En_Zl3_inFinal2_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
+ "En_Zl3_inFinal2_Check_DemoMode: There is no such action!!!!!!!!\n"));
}
this->unk_2F0 = temp_v0;
}
@@ -2070,7 +2092,7 @@ void func_80B58014(EnZl3* this, PlayState* play) {
this->action = 34;
this->unk_3D0 = 0;
func_80B57AE0(this, play);
- } else if ((invincibilityTimer > 0) || (player->fallDistance >= 0x33)) {
+ } else if ((invincibilityTimer > 0) || (player->fallDistance >= 51)) {
func_80B54E14(this, &gZelda2Anime2Anim_007664, 0, -11.0f, 0);
this->action = 30;
func_80B537E8(this);
@@ -2225,7 +2247,7 @@ s32 func_80B5899C(EnZl3* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s8 invincibilityTimer = player->invincibilityTimer;
- if ((invincibilityTimer > 0) || (player->fallDistance >= 0x33)) {
+ if ((invincibilityTimer > 0) || (player->fallDistance >= 51)) {
func_80B54E14(this, &gZelda2Anime2Anim_007664, 2, -11.0f, 0);
this->action = 35;
func_80B56DC8(this);
@@ -2646,7 +2668,7 @@ void func_80B59DB8(EnZl3* this, PlayState* play) {
s32 objectSlot = Object_GetSlot(objectCtx, OBJECT_ZL2_ANIME2);
s32 pad2;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (objectSlot < 0) {
PRINTF(VT_FGCOL(RED) "En_Zl3_main_bankアニメーションのバンクを読めない!!!!!!!!!!!!\n" VT_RST);
return;
@@ -2673,7 +2695,8 @@ void EnZl3_Update(Actor* thisx, PlayState* play) {
EnZl3* this = (EnZl3*)thisx;
if (this->action < 0 || this->action >= ARRAY_COUNT(sActionFuncs) || sActionFuncs[this->action] == NULL) {
- PRINTF(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sActionFuncs[this->action](this, play);
@@ -2782,7 +2805,8 @@ void EnZl3_Draw(Actor* thisx, PlayState* play) {
EnZl3* this = (EnZl3*)thisx;
if (this->drawConfig < 0 || this->drawConfig >= 3 || sDrawFuncs[this->drawConfig] == NULL) {
- PRINTF(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
+ PRINTF(VT_FGCOL(RED) T("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "The drawing mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!\n") VT_RST);
return;
}
sDrawFuncs[this->drawConfig](this, play);
diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.h b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.h
index 25c336f42d..695588fd52 100644
--- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.h
+++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.h
@@ -2,14 +2,15 @@
#define Z_EN_ZL3_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64scene.h"
#include "overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.h"
struct EnZl3;
-typedef void (*EnZl3ActionFunc)(struct EnZl3*, PlayState*);
-typedef void (*EnZl3DrawFunc)(struct EnZl3*, PlayState*);
+typedef void (*EnZl3ActionFunc)(struct EnZl3*, struct PlayState*);
+typedef void (*EnZl3DrawFunc)(struct EnZl3*, struct PlayState*);
typedef struct EnZl3 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
index 0a9687c3ac..a18efd4ba9 100644
--- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
+++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
@@ -5,10 +5,27 @@
*/
#include "z_en_zl4.h"
+
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "letterbox.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_zl4/object_zl4.h"
#include "assets/scenes/indoors/nakaniwa/nakaniwa_scene.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_4)
+#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED)
typedef enum EnZl4CutsceneState {
/* 0 */ ZL4_CS_WAIT,
@@ -298,8 +315,8 @@ void EnZl4_UpdateFace(EnZl4* this) {
}
void EnZl4_SetMove(EnZl4* this, PlayState* play) {
- this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
+ this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80B5BB78(EnZl4* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.h b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.h
index 8710cc9cf9..b371092e08 100644
--- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.h
+++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.h
@@ -2,12 +2,12 @@
#define Z_EN_ZL4_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnZl4;
-typedef void (*EnZl4ActionFunc)(struct EnZl4*, PlayState*);
-typedef void (*EnZl4DrawFunc)(struct EnZl4*, PlayState*);
+typedef void (*EnZl4ActionFunc)(struct EnZl4*, struct PlayState*);
+typedef void (*EnZl4DrawFunc)(struct EnZl4*, struct PlayState*);
typedef struct EnZl4 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4_cutscene_data.inc.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4_cutscene_data.inc.c
index 3ad3b996be..933f7e0aaa 100644
--- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4_cutscene_data.inc.c
+++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4_cutscene_data.inc.c
@@ -1,4 +1,4 @@
-#include "z_en_zl4.h"
+#include "z64cutscene_commands.h"
static CutsceneCameraDirection sCamDirections[] = {
{ { -490.0f, 120.0f, 0.0f }, { -440.0f, 117.0f, 0.0f }, 0, 45 },
diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/src/overlays/actors/ovl_En_Zo/z_en_zo.c
index fd78e537e2..95a9f6e07c 100644
--- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c
+++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c
@@ -5,6 +5,20 @@
*/
#include "z_en_zo.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64face_reaction.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_zo/object_zo.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -418,7 +432,7 @@ u16 EnZo_GetTextId(PlayState* play, Actor* thisx) {
return 0x402D;
}
- if (GET_EVENTCHKINF(EVENTCHKINF_33)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_GAVE_LETTER_TO_KING_ZORA)) {
return 0x4010;
}
if (GET_EVENTCHKINF(EVENTCHKINF_30)) {
@@ -612,7 +626,7 @@ void EnZo_Destroy(Actor* thisx, PlayState* play) {
void EnZo_Standing(EnZo* this, PlayState* play) {
s16 angle;
- func_80034F54(play, this->unk_656, this->unk_67E, 20);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 20);
EnZo_SetAnimation(this);
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
this->trackingMode = NPC_TRACKING_FULL_BODY;
@@ -654,7 +668,7 @@ void EnZo_Surface(EnZo* this, PlayState* play) {
}
void EnZo_TreadWater(EnZo* this, PlayState* play) {
- func_80034F54(play, this->unk_656, this->unk_67E, 20);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, 20);
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
this->canSpeak = true;
this->trackingMode = NPC_TRACKING_FULL_BODY;
@@ -770,8 +784,8 @@ s32 EnZo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
}
if ((limbIndex == 8) || (limbIndex == 9) || (limbIndex == 12)) {
- rot->y += (Math_SinS(this->unk_656[limbIndex]) * 200.0f);
- rot->z += (Math_CosS(this->unk_67E[limbIndex]) * 200.0f);
+ rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * FIDGET_AMPLITUDE;
+ rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * FIDGET_AMPLITUDE;
}
return 0;
diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.h b/src/overlays/actors/ovl_En_Zo/z_en_zo.h
index 837dd260cb..5f26a20230 100644
--- a/src/overlays/actors/ovl_En_Zo/z_en_zo.h
+++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.h
@@ -2,7 +2,7 @@
#define Z_EN_ZO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EnZo;
@@ -19,7 +19,7 @@ typedef struct EnZoEffect {
/* 0x2C */ Vec3f vec; // Usage specific
} EnZoEffect; // size = 0x38
-typedef void (*EnZoActionFunc)(struct EnZo*, PlayState*);
+typedef void (*EnZoActionFunc)(struct EnZo*, struct PlayState*);
typedef struct EnZo {
/* 0x0000 */ Actor actor;
@@ -38,8 +38,8 @@ typedef struct EnZo {
/* 0x0650 */ s16 timeToDive;
/* 0x0652 */ s16 blinkTimer;
/* 0x0654 */ s16 eyeTexture;
- /* 0x0656 */ s16 unk_656[20];
- /* 0x067E */ s16 unk_67E[20];
+ /* 0x0656 */ s16 fidgetTableY[20];
+ /* 0x067E */ s16 fidgetTableZ[20];
} EnZo; // size = 0x06A8
#endif
diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c
index f47520e573..02e24ff540 100644
--- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c
+++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c
@@ -5,12 +5,29 @@
*/
#include "z_en_fhg.h"
-#include "assets/objects/object_fhg/object_fhg.h"
#include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h"
#include "overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h"
#include "overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/qrand.h"
+#include "attributes.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "z64skin.h"
+
+#include "assets/objects/object_fhg/object_fhg.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef struct EnfHGPainting {
/* 0x00 */ Vec3f pos;
@@ -65,7 +82,7 @@ static EnfHGPainting sPaintings[] = {
static InitChainEntry sInitChain[] = {
ICHAIN_S8(naviEnemyId, NAVI_ENEMY_PHANTOM_GANON_PHASE_2, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeScale, 1200, ICHAIN_STOP),
};
void EnfHG_Init(Actor* thisx, PlayState* play2) {
@@ -128,13 +145,13 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
if ((fabsf(player->actor.world.pos.x - (GND_BOSSROOM_CENTER_X + 0.0f)) < 100.0f) &&
(fabsf(player->actor.world.pos.z - (GND_BOSSROOM_CENTER_Z + 315.0f)) < 100.0f)) {
this->cutsceneState = INTRO_START;
- if (GET_EVENTCHKINF(EVENTCHKINF_72)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE)) {
this->timers[0] = 57;
}
}
break;
case INTRO_START:
- if (GET_EVENTCHKINF(EVENTCHKINF_72)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE)) {
if (this->timers[0] == 55) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER,
GND_BOSSROOM_CENTER_X + 0.0f, GND_BOSSROOM_CENTER_Y - 97.0f,
@@ -159,7 +176,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
this->timers[0] = 60;
this->actor.world.pos.y = GND_BOSSROOM_CENTER_Y - 7.0f;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
- SET_EVENTCHKINF(EVENTCHKINF_72);
+ SET_EVENTCHKINF(EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE);
Flags_SetSwitch(play, 0x23);
FALLTHROUGH;
case INTRO_FENCE:
@@ -651,7 +668,7 @@ void EnfHG_Retreat(EnfHG* this, PlayState* play) {
BossGanondrof* bossGnd = (BossGanondrof*)this->actor.parent;
s16 paintingIdxReal;
s16 paintingIdxFake;
- Actor* child;
+ UNUSED_NDEBUG Actor* child;
if (this->actor.params != GND_REAL_BOSS) {
this->killActor = true;
diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.h b/src/overlays/actors/ovl_En_fHG/z_en_fhg.h
index 5432f82341..dca6eeb82a 100644
--- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.h
+++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.h
@@ -2,11 +2,12 @@
#define Z_EN_FHG_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64skin.h"
struct EnfHG;
-typedef void (*EnfHGActionFunc)(struct EnfHG*, PlayState*);
+typedef void (*EnfHGActionFunc)(struct EnfHG*, struct PlayState*);
typedef enum EnfHGSignal {
/* 0 */ FHG_NO_SIGNAL,
diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.c b/src/overlays/actors/ovl_End_Title/z_end_title.c
index f5c53ee0e2..3e2d26e509 100644
--- a/src/overlays/actors/ovl_End_Title/z_end_title.c
+++ b/src/overlays/actors/ovl_End_Title/z_end_title.c
@@ -6,7 +6,14 @@
#include "z_end_title.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "versions.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void EndTitle_Init(Actor* thisx, PlayState* play);
void EndTitle_Destroy(Actor* thisx, PlayState* play);
@@ -45,18 +52,16 @@ void EndTitle_Update(Actor* thisx, PlayState* play) {
// Used in the castle courtyard
void EndTitle_DrawFull(Actor* thisx, PlayState* play) {
- MtxF* mf;
+ PlayState* play2 = (PlayState*)play;
EndTitle* this = (EndTitle*)thisx;
- s32 csCurFrame = play->csCtx.curFrame;
- Player* player = GET_PLAYER(play);
-
- mf = &player->mf_9E0;
+ s32 csCurFrame = play2->csCtx.curFrame;
+ Player* player = GET_PLAYER(play2);
OPEN_DISPS(play->state.gfxCtx, "../z_end_title.c", 403);
// Draw the Triforce on Link's left hand
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- Matrix_Mult(mf, MTXMODE_NEW);
+ Matrix_Mult(&player->mf_9E0, MTXMODE_NEW);
Matrix_Translate(0.0f, 150.0f, 170.0f, MTXMODE_APPLY);
Matrix_Scale(0.13f, 0.13f, 0.13f, MTXMODE_APPLY);
Matrix_RotateX(BINANG_TO_RAD(0xBB8), MTXMODE_APPLY);
@@ -70,14 +75,14 @@ void EndTitle_DrawFull(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx, "../z_end_title.c", 419);
// Draw title cards on the screen
- if ((csCurFrame > 890) && (this->endAlpha < 200)) {
- this->endAlpha += 7;
+ if ((csCurFrame > FRAMERATE_CONST(890, 740)) && (this->endAlpha < 200)) {
+ this->endAlpha += FRAMERATE_CONST(7, 8);
}
- if ((csCurFrame > 810) && (this->tlozAlpha < 200)) {
- this->tlozAlpha += 15;
+ if ((csCurFrame > FRAMERATE_CONST(810, 675)) && (this->tlozAlpha < 200)) {
+ this->tlozAlpha += FRAMERATE_CONST(15, 18);
}
- if ((csCurFrame > 850) && (this->ootAlpha < 200)) {
- this->ootAlpha += 15;
+ if ((csCurFrame > FRAMERATE_CONST(850, 710)) && (this->ootAlpha < 200)) {
+ this->ootAlpha += FRAMERATE_CONST(15, 18);
}
OVERLAY_DISP = Gfx_SetupDL_64(OVERLAY_DISP);
@@ -114,7 +119,7 @@ void EndTitle_DrawNintendoLogo(Actor* thisx, PlayState* play) {
s32 pad;
s32 csCurFrame = play->csCtx.curFrame;
- if ((csCurFrame >= 1101) && (this->endAlpha < 255)) {
+ if ((csCurFrame > FRAMERATE_CONST(1100, 950)) && (this->endAlpha < 255)) {
this->endAlpha += 3;
}
diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.h b/src/overlays/actors/ovl_End_Title/z_end_title.h
index 9897c0fbf2..cd29ff507c 100644
--- a/src/overlays/actors/ovl_End_Title/z_end_title.h
+++ b/src/overlays/actors/ovl_End_Title/z_end_title.h
@@ -2,7 +2,7 @@
#define Z_END_TITLE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct EndTitle;
diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c
index 118db21d6e..58929bd248 100644
--- a/src/overlays/actors/ovl_Fishing/z_fishing.c
+++ b/src/overlays/actors/ovl_Fishing/z_fishing.c
@@ -5,24 +5,46 @@
*/
#include "z_fishing.h"
-#include "global.h"
#include "overlays/actors/ovl_En_Kanban/z_en_kanban.h"
#include "assets/objects/object_fish/object_fish.h"
+#include "libc64/math64.h"
+#include "attributes.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
#include "ichain.h"
+#include "letterbox.h"
+#include "printf.h"
+#include "rand.h"
+#include "regs.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
#include "terminal.h"
#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
#if PLATFORM_N64
#include "cic6105.h"
#endif
-#pragma increment_block_number "gc-eu:133 gc-eu-mq:133 gc-jp:135 gc-jp-ce:135 gc-jp-mq:135 gc-us:135 gc-us-mq:135"
+#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.0:0" \
+ "ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
#define WATER_SURFACE_Y(play) play->colCtx.colHeader->waterBoxes->ySurface
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define KREG_DEBUG(i) KREG(i)
#else
#define KREG_DEBUG(i) 0
@@ -379,7 +401,7 @@ static s16 sFishingPlayingState;
static s16 sLureTimer; // AND'd for various effects/checks
static s16 D_80B7E0B0;
static s16 D_80B7E0B2;
-static s16 sRodCastTimer; // used for the inital line casting
+static s16 sRodCastTimer; // used for the initial line casting
static u8 sLureEquipped;
static Vec3f sLurePos;
static Vec3f sLureDrawPos;
@@ -434,7 +456,6 @@ static f32 sFishGroupAngle1;
static f32 sFishGroupAngle2;
static f32 sFishGroupAngle3;
static FishingEffect sEffects[FISHING_EFFECT_COUNT];
-static Vec3f sStreamSfxProjectedPos;
void Fishing_SetColliderElement(s32 index, ColliderJntSph* collider, Vec3f* pos, f32 scale) {
collider->elements[index].dim.worldSphere.center.x = pos->x;
@@ -494,7 +515,7 @@ void Fishing_SpawnRipple(Vec3f* projectedPos, FishingEffect* effect, Vec3f* pos,
return;
}
- for (i = 0; i < countLimit; i++) {
+ for (i = 0; i < countLimit; i++, effect++) {
if (effect->type == FS_EFF_NONE) {
effect->type = FS_EFF_RIPPLE;
effect->pos = *pos;
@@ -515,8 +536,6 @@ void Fishing_SpawnRipple(Vec3f* projectedPos, FishingEffect* effect, Vec3f* pos,
}
break;
}
-
- effect++;
}
}
@@ -528,7 +547,7 @@ void Fishing_SpawnDustSplash(Vec3f* projectedPos, FishingEffect* effect, Vec3f*
return;
}
- for (i = 0; i < 100; i++) {
+ for (i = 0; i < 100; i++, effect++) {
if ((effect->type == FS_EFF_NONE) || (effect->type == FS_EFF_RAIN_DROP) ||
(effect->type == FS_EFF_RAIN_RIPPLE) || (effect->type == FS_EFF_RAIN_SPLASH)) {
effect->type = FS_EFF_DUST_SPLASH;
@@ -539,8 +558,6 @@ void Fishing_SpawnDustSplash(Vec3f* projectedPos, FishingEffect* effect, Vec3f*
effect->scale = scale;
break;
}
-
- effect++;
}
}
@@ -552,7 +569,7 @@ void Fishing_SpawnWaterDust(Vec3f* projectedPos, FishingEffect* effect, Vec3f* p
return;
}
- for (i = 0; i < 90; i++) {
+ for (i = 0; i < 90; i++, effect++) {
if (effect->type == FS_EFF_NONE) {
effect->type = FS_EFF_WATER_DUST;
effect->pos = *pos;
@@ -564,8 +581,6 @@ void Fishing_SpawnWaterDust(Vec3f* projectedPos, FishingEffect* effect, Vec3f* p
effect->rot.x = 2.0f * scale;
break;
}
-
- effect++;
}
}
@@ -577,7 +592,7 @@ void Fishing_SpawnBubble(Vec3f* projectedPos, FishingEffect* effect, Vec3f* pos,
return;
}
- for (i = 0; i < 90; i++) {
+ for (i = 0; i < 90; i++, effect++) {
if (effect->type == FS_EFF_NONE) {
effect->type = FS_EFF_BUBBLE;
effect->pos = *pos;
@@ -588,8 +603,6 @@ void Fishing_SpawnBubble(Vec3f* projectedPos, FishingEffect* effect, Vec3f* pos,
effect->state = state;
break;
}
-
- effect++;
}
}
@@ -603,7 +616,7 @@ void Fishing_SpawnRainDrop(FishingEffect* effect, Vec3f* pos, Vec3f* rot) {
effect += 30;
- for (i = 30; i < FISHING_EFFECT_COUNT; i++) {
+ for (i = 30; i < FISHING_EFFECT_COUNT; i++, effect++) {
if (effect->type == FS_EFF_NONE) {
effect->type = FS_EFF_RAIN_DROP;
effect->pos = *pos;
@@ -616,8 +629,6 @@ void Fishing_SpawnRainDrop(FishingEffect* effect, Vec3f* pos, Vec3f* rot) {
Matrix_MultVec3f(&velSrc, &effect->vel);
break;
}
-
- effect++;
}
}
@@ -772,7 +783,7 @@ void Fishing_InitPondProps(Fishing* this, PlayState* play) {
Fishing_SeedRand(1, 29100, 9786);
- for (i = 0; i < POND_PROP_COUNT; i++) {
+ for (i = 0; i < POND_PROP_COUNT; i++, prop++) {
if (sPondPropInits[i].type == FS_PROP_INIT_STOP) {
break;
}
@@ -781,8 +792,7 @@ void Fishing_InitPondProps(Fishing* this, PlayState* play) {
prop->pos.x = sPondPropInits[i].pos.x;
prop->pos.y = sPondPropInits[i].pos.y;
prop->pos.z = sPondPropInits[i].pos.z;
- prop->rotX = 0.0f;
- prop->reedAngle = 0.0f;
+ prop->rotX = prop->reedAngle = 0.0f;
prop->timer = Rand_ZeroFloat(100.0f);
prop->drawDistance = 800.0f;
@@ -816,8 +826,6 @@ void Fishing_InitPondProps(Fishing* this, PlayState* play) {
prop->drawDistance = 1000.0f;
Fishing_SetColliderElement(i, &sFishingMain->collider, &prop->pos, prop->scale);
}
-
- prop++;
}
}
@@ -844,7 +852,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) {
Actor_ProcessInitChain(thisx, sInitChain);
ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (KREG(5) != 0) {
sLinkAge = LINK_AGE_CHILD;
} else {
@@ -855,7 +863,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) {
#endif
if (thisx->params < EN_FISH_PARAM) {
- FishingGroupFish* fish;
+ s32 pad;
#if PLATFORM_N64
// Anti-piracy check, if the check fails the line can't be reeled in if
@@ -929,14 +937,14 @@ void Fishing_Init(Actor* thisx, PlayState* play2) {
sFishingFoggy = 0;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (((sFishGameNumber & 7) == 6) || (KREG(3) != 0))
#else
if ((sFishGameNumber & 7) == 6)
#endif
{
sStormChanceTimer = 100;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (KREG(3) != 0) {
KREG(3) = 0;
HIGH_SCORE(HS_FISHING) &= ~(HS_FISH_PLAYED * 255);
@@ -960,32 +968,30 @@ void Fishing_Init(Actor* thisx, PlayState* play2) {
sFishGroupAngle3 = 4.6f;
for (i = 0; i < GROUP_FISH_COUNT; i++) {
- fish = &sGroupFishes[i];
-
- fish->type = FS_GROUP_FISH_NORMAL;
+ sGroupFishes[i].type = FS_GROUP_FISH_NORMAL;
if (i <= 20) {
- fish->homePos.x = fish->pos.x = sinf(sFishGroupAngle1) * 720.0f;
- fish->homePos.z = fish->pos.z = cosf(sFishGroupAngle1) * 720.0f;
+ sGroupFishes[i].homePos.x = sGroupFishes[i].pos.x = sinf(sFishGroupAngle1) * 720.0f;
+ sGroupFishes[i].homePos.z = sGroupFishes[i].pos.z = cosf(sFishGroupAngle1) * 720.0f;
} else if (i <= 40) {
- fish->homePos.x = fish->pos.x = sinf(sFishGroupAngle2) * 720.0f;
- fish->homePos.z = fish->pos.z = cosf(sFishGroupAngle2) * 720.0f;
+ sGroupFishes[i].homePos.x = sGroupFishes[i].pos.x = sinf(sFishGroupAngle2) * 720.0f;
+ sGroupFishes[i].homePos.z = sGroupFishes[i].pos.z = cosf(sFishGroupAngle2) * 720.0f;
} else {
- fish->homePos.x = fish->pos.x = sinf(sFishGroupAngle3) * 720.0f;
- fish->homePos.z = fish->pos.z = cosf(sFishGroupAngle3) * 720.0f;
+ sGroupFishes[i].homePos.x = sGroupFishes[i].pos.x = sinf(sFishGroupAngle3) * 720.0f;
+ sGroupFishes[i].homePos.z = sGroupFishes[i].pos.z = cosf(sFishGroupAngle3) * 720.0f;
}
- fish->homePos.y = fish->pos.y = -35.0f;
+ sGroupFishes[i].homePos.y = sGroupFishes[i].pos.y = -35.0f;
- fish->timer = Rand_ZeroFloat(100.0f);
+ sGroupFishes[i].timer = Rand_ZeroFloat(100.0f);
- fish->unk_3C = 0;
- fish->unk_3E = 0;
- fish->unk_40 = 0;
+ sGroupFishes[i].unk_3C = 0;
+ sGroupFishes[i].unk_3E = 0;
+ sGroupFishes[i].unk_40 = 0;
if (sLinkAge != LINK_AGE_CHILD) {
if (((i >= 15) && (i < 20)) || ((i >= 35) && (i < 40)) || ((i >= 55) && (i < 60))) {
- fish->type = FS_GROUP_FISH_NONE;
+ sGroupFishes[i].type = FS_GROUP_FISH_NONE;
}
}
}
@@ -995,7 +1001,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) {
ENKANBAN_FISHING);
Actor_Spawn(&play->actorCtx, play, ACTOR_FISHING, 0.0f, 0.0f, 0.0f, 0, 0, 0, 200);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if ((KREG(1) == 1) || ((sFishGameNumber & 3) == 3))
#else
if ((sFishGameNumber & 3) == 3)
@@ -1033,7 +1039,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) {
Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_PROP);
thisx->attentionRangeType = ATTENTION_RANGE_0;
thisx->flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY;
- this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo);
+ this->lightNode = LightContext_InsertLight(play2, &play->lightCtx, &this->lightInfo);
} else {
this->fishState = 10;
this->fishStateNext = 10;
@@ -1049,7 +1055,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) {
this->fishLength += Rand_ZeroFloat(7.99999f);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (KREG(6) != 0) {
this->fishLength = KREG(6) + 80.0f;
}
@@ -1079,7 +1085,7 @@ void Fishing_UpdateEffects(FishingEffect* effect, PlayState* play) {
f32 rippleY;
s16 i;
- for (i = 0; i < FISHING_EFFECT_COUNT; i++) {
+ for (i = 0; i < FISHING_EFFECT_COUNT; i++, effect++) {
if (effect->type) {
effect->timer++;
effect->pos.x += effect->vel.x;
@@ -1109,8 +1115,7 @@ void Fishing_UpdateEffects(FishingEffect* effect, PlayState* play) {
effect->alpha -= 10;
if (effect->pos.y > (WATER_SURFACE_Y(play) - 5.0f)) {
- effect->accel.y = 0.0f;
- effect->vel.y = 0.0f;
+ effect->vel.y = effect->accel.y = 0.0f;
effect->alpha -= 5;
}
@@ -1216,16 +1221,14 @@ void Fishing_UpdateEffects(FishingEffect* effect, PlayState* play) {
}
}
}
-
- effect++;
}
}
-void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) {
+void Fishing_DrawEffects(FishingEffect* effect, PlayState* play2) {
u8 materialFlag = 0;
f32 rotY;
s16 i;
- s32 pad;
+ PlayState* play = (PlayState*)play2;
FishingEffect* firstEffect = effect;
OPEN_DISPS(play->state.gfxCtx, "../z_fishing.c", 2271);
@@ -1234,7 +1237,7 @@ void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) {
gDPPipeSync(POLY_XLU_DISP++);
- for (i = 0; i < 100; i++) {
+ for (i = 0; i < 100; i++, effect++) {
if (effect->type == FS_EFF_RIPPLE) {
if (materialFlag == 0) {
gSPDisplayList(POLY_XLU_DISP++, gFishingRippleMaterialDL);
@@ -1251,12 +1254,11 @@ void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) {
gSPDisplayList(POLY_XLU_DISP++, gFishingRippleModelDL);
}
- effect++;
}
- effect = firstEffect;
materialFlag = 0;
- for (i = 0; i < 100; i++) {
+ effect = firstEffect;
+ for (i = 0; i < 100; i++, effect++) {
if (effect->type == FS_EFF_DUST_SPLASH) {
if (materialFlag == 0) {
gSPDisplayList(POLY_XLU_DISP++, gFishingDustSplashMaterialDL);
@@ -1267,19 +1269,18 @@ void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 180, 180, 180, effect->alpha);
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
- Matrix_ReplaceRotation(&play->billboardMtxF);
+ Matrix_ReplaceRotation(&play2->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_fishing.c", 2346);
gSPDisplayList(POLY_XLU_DISP++, gFishingDustSplashModelDL);
}
- effect++;
}
- effect = firstEffect;
materialFlag = 0;
- for (i = 0; i < 100; i++) {
+ effect = firstEffect;
+ for (i = 0; i < 100; i++, effect++) {
if (effect->type == FS_EFF_WATER_DUST) {
if (materialFlag == 0) {
gSPDisplayList(POLY_OPA_DISP++, gFishingWaterDustMaterialDL);
@@ -1294,19 +1295,18 @@ void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) {
(effect->timer + (i * 3)) * 5, 32, 64, 1, 0, 0, 32, 32));
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
- Matrix_ReplaceRotation(&play->billboardMtxF);
+ Matrix_ReplaceRotation(&play2->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_fishing.c", 2394);
gSPDisplayList(POLY_OPA_DISP++, gFishingWaterDustModelDL);
}
- effect++;
}
- effect = firstEffect;
materialFlag = 0;
- for (i = 0; i < 100; i++) {
+ effect = firstEffect;
+ for (i = 0; i < 100; i++, effect++) {
if (effect->type == FS_EFF_BUBBLE) {
if (materialFlag == 0) {
gSPDisplayList(POLY_XLU_DISP++, gFishingBubbleMaterialDL);
@@ -1316,19 +1316,19 @@ void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) {
}
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
- Matrix_ReplaceRotation(&play->billboardMtxF);
+ Matrix_ReplaceRotation(&play2->billboardMtxF);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_fishing.c", 2423);
gSPDisplayList(POLY_XLU_DISP++, gFishingBubbleModelDL);
}
- effect++;
}
- effect = firstEffect + 30;
materialFlag = 0;
- for (i = 30; i < FISHING_EFFECT_COUNT; i++) {
+ effect = firstEffect;
+ effect += 30;
+ for (i = 30; i < FISHING_EFFECT_COUNT; i++, effect++) {
if (effect->type == FS_EFF_RAIN_DROP) {
if (materialFlag == 0) {
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_20);
@@ -1347,14 +1347,14 @@ void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) {
gSPDisplayList(POLY_XLU_DISP++, gFishingRainDropModelDL);
}
- effect++;
}
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- effect = firstEffect + 30;
materialFlag = 0;
- for (i = 30; i < FISHING_EFFECT_COUNT; i++) {
+ effect = firstEffect;
+ effect += 30;
+ for (i = 30; i < FISHING_EFFECT_COUNT; i++, effect++) {
if (effect->type == FS_EFF_RAIN_RIPPLE) {
if (materialFlag == 0) {
gSPDisplayList(POLY_XLU_DISP++, gFishingRippleMaterialDL);
@@ -1370,12 +1370,12 @@ void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) {
gSPDisplayList(POLY_XLU_DISP++, gFishingRippleModelDL);
}
- effect++;
}
- effect = firstEffect + 30;
materialFlag = 0;
- for (i = 30; i < FISHING_EFFECT_COUNT; i++) {
+ effect = firstEffect;
+ effect += 30;
+ for (i = 30; i < FISHING_EFFECT_COUNT; i++, effect++) {
if (effect->type == FS_EFF_RAIN_SPLASH) {
if (materialFlag == 0) {
gSPDisplayList(POLY_XLU_DISP++, gFishingRainSplashMaterialDL);
@@ -1390,7 +1390,7 @@ void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) {
}
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
- Matrix_ReplaceRotation(&play->billboardMtxF);
+ Matrix_ReplaceRotation(&play2->billboardMtxF);
Matrix_RotateY(rotY, MTXMODE_APPLY);
Matrix_Scale(effect->scale, effect->scale, 1.0f, MTXMODE_APPLY);
@@ -1398,7 +1398,6 @@ void Fishing_DrawEffects(FishingEffect* effect, PlayState* play) {
gSPDisplayList(POLY_XLU_DISP++, gFishingRainSplashModelDL);
}
- effect++;
}
effect = firstEffect;
@@ -1463,7 +1462,7 @@ void Fishing_UpdateLine(PlayState* play, Vec3f* basePos, Vec3f* pos, Vec3f* rot,
f32 dist;
f32 spD8;
s16 spooled;
- s32 pad;
+ f32 segDist;
f32 temp_f20;
Vec3f posSrc = { 0.0f, 0.0f, 0.0f };
Vec3f posStep;
@@ -1484,12 +1483,12 @@ void Fishing_UpdateLine(PlayState* play, Vec3f* basePos, Vec3f* pos, Vec3f* rot,
sp90 = segPos.y - tempPos.y;
sp8C = segPos.z - tempPos.z;
- temp_f20 = sqrtf(SQ(sp94) + SQ(sp90) + SQ(sp8C)) * 0.97f;
- if (temp_f20 > 1000.0f) {
- temp_f20 = 1000.0f;
+ segDist = sqrtf(SQ(sp94) + SQ(sp90) + SQ(sp8C)) * 0.97f;
+ if (segDist > 1000.0f) {
+ segDist = 1000.0f;
}
- sRodLineSpooled = 200.0f - (temp_f20 * 200.0f * 0.001f);
+ sRodLineSpooled = 200.0f - (segDist * 200.0f * 0.001f);
}
spooled = sRodLineSpooled;
@@ -1500,22 +1499,22 @@ void Fishing_UpdateLine(PlayState* play, Vec3f* basePos, Vec3f* pos, Vec3f* rot,
pos[i] = *basePos;
} else if (D_80B7A6A4 != 0) {
temp_f20 = (f32)(i - spooled) / (f32)(LINE_SEG_COUNT - spooled + 1);
- Math_ApproachF(&pos[i].x, (sp94 * temp_f20) + tempPos.x, 1.0f, 20.0f);
- Math_ApproachF(&pos[i].y, (sp90 * temp_f20) + tempPos.y, 1.0f, 20.0f);
- Math_ApproachF(&pos[i].z, (sp8C * temp_f20) + tempPos.z, 1.0f, 20.0f);
+ Math_ApproachF(&pos[i].x, tempPos.x + (sp94 * temp_f20), 1.0f, 20.0f);
+ Math_ApproachF(&pos[i].y, tempPos.y + (sp90 * temp_f20), 1.0f, 20.0f);
+ Math_ApproachF(&pos[i].z, tempPos.z + (sp8C * temp_f20), 1.0f, 20.0f);
}
}
for (i = spooled + 1, k = 0; i < LINE_SEG_COUNT; i++, k++) {
- temp_f18 = 2.0f * D_80B7E148;
-
dx = (pos + i)->x - (pos + i - 1)->x;
spD8 = (pos + i)->y;
+ temp_f18 = 2.0f * D_80B7E148;
+
sqDistXZ = SQ((pos + i)->x) + SQ((pos + i)->z);
if (sqDistXZ > SQ(920.0f)) {
- phi_f12 = ((sqrtf(sqDistXZ) - 920.0f) * 0.11f) + WATER_SURFACE_Y(play);
+ phi_f12 = WATER_SURFACE_Y(play) + ((sqrtf(sqDistXZ) - 920.0f) * 0.11f);
} else {
phi_f12 = WATER_SURFACE_Y(play);
}
@@ -1524,7 +1523,7 @@ void Fishing_UpdateLine(PlayState* play, Vec3f* basePos, Vec3f* pos, Vec3f* rot,
s32 pad;
if (spD8 < phi_f12) {
- phi_f12 = ((sqrtf(sqDistXZ) - 920.0f) * 0.147f) + WATER_SURFACE_Y(play);
+ phi_f12 = WATER_SURFACE_Y(play) + ((sqrtf(sqDistXZ) - 920.0f) * 0.147f);
if (spD8 > phi_f12) {
f32 phi_f2 = (spD8 - phi_f12) * 0.05f;
@@ -1720,8 +1719,7 @@ void Fishing_UpdateSinkingLure(PlayState* play) {
Vec3f posStep;
Vec3f sp94;
Vec3f sp88;
- f32 offsetX;
- f32 offsetZ;
+ Vec3f offset;
Player* player = GET_PLAYER(play);
Vec3f* pos;
@@ -1749,15 +1747,15 @@ void Fishing_UpdateSinkingLure(PlayState* play) {
pos = sSinkingLurePos;
if ((i < 10) && (sRodCastState == 5)) {
- offsetX = (10 - i) * sp88.x * 0.1f;
- offsetZ = (10 - i) * sp88.z * 0.1f;
+ offset.x = sp88.x * (10 - i) * 0.1f;
+ offset.z = sp88.z * (10 - i) * 0.1f;
} else {
- offsetX = offsetZ = 0.0f;
+ offset.x = offset.z = 0.0f;
}
- dx = (pos + i)->x - (pos + i - 1)->x + offsetX;
+ dx = (pos + i)->x - (pos + i - 1)->x + offset.x;
dy = (pos + i)->y - (pos + i - 1)->y + offsetY;
- dz = (pos + i)->z - (pos + i - 1)->z + offsetZ;
+ dz = (pos + i)->z - (pos + i - 1)->z + offset.z;
ry = Math_Atan2F(dz, dx);
dist = sqrtf(SQ(dx) + SQ(dz));
@@ -1778,15 +1776,15 @@ static f32 sSinkingLureSizes[] = {
0.9f, 0.85f, 0.8f, 0.7f, 0.8f, 1.0f, 1.2f, 1.1f, 1.0f, 0.8f,
};
-void Fishing_DrawSinkingLure(PlayState* play) {
+void Fishing_DrawSinkingLure(PlayState* play2) {
+ PlayState* play = (PlayState*)play2;
s16 i;
- f32 scale;
OPEN_DISPS(play->state.gfxCtx, "../z_fishing.c", 3209);
- Fishing_UpdateSinkingLure(play);
+ Fishing_UpdateSinkingLure(play2);
- if (sLurePos.y < WATER_SURFACE_Y(play)) {
+ if (sLurePos.y < WATER_SURFACE_Y(play2)) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPDisplayList(POLY_OPA_DISP++, gFishingSinkingLureSegmentMaterialDL);
@@ -1794,9 +1792,10 @@ void Fishing_DrawSinkingLure(PlayState* play) {
for (i = SINKING_LURE_SEG_COUNT - 1; i >= 0; i--) {
if ((i + sSinkingLureSegmentIndex) < SINKING_LURE_SEG_COUNT) {
Matrix_Translate(sSinkingLurePos[i].x, sSinkingLurePos[i].y, sSinkingLurePos[i].z, MTXMODE_NEW);
- scale = sSinkingLureSizes[i + sSinkingLureSegmentIndex] * 0.04f;
- Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
- Matrix_ReplaceRotation(&play->billboardMtxF);
+ Matrix_Scale(sSinkingLureSizes[i + sSinkingLureSegmentIndex] * 0.04f,
+ sSinkingLureSizes[i + sSinkingLureSegmentIndex] * 0.04f,
+ sSinkingLureSizes[i + sSinkingLureSegmentIndex] * 0.04f, MTXMODE_APPLY);
+ Matrix_ReplaceRotation(&play2->billboardMtxF);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_fishing.c", 3239);
gSPDisplayList(POLY_OPA_DISP++, gFishingSinkingLureSegmentModelDL);
@@ -1810,9 +1809,10 @@ void Fishing_DrawSinkingLure(PlayState* play) {
for (i = SINKING_LURE_SEG_COUNT - 1; i >= 0; i--) {
if ((i + sSinkingLureSegmentIndex) < SINKING_LURE_SEG_COUNT) {
Matrix_Translate(sSinkingLurePos[i].x, sSinkingLurePos[i].y, sSinkingLurePos[i].z, MTXMODE_NEW);
- scale = sSinkingLureSizes[i + sSinkingLureSegmentIndex] * 0.04f;
- Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
- Matrix_ReplaceRotation(&play->billboardMtxF);
+ Matrix_Scale(sSinkingLureSizes[i + sSinkingLureSegmentIndex] * 0.04f,
+ sSinkingLureSizes[i + sSinkingLureSegmentIndex] * 0.04f,
+ sSinkingLureSizes[i + sSinkingLureSegmentIndex] * 0.04f, MTXMODE_APPLY);
+ Matrix_ReplaceRotation(&play2->billboardMtxF);
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, play->state.gfxCtx, "../z_fishing.c", 3265);
gSPDisplayList(POLY_XLU_DISP++, gFishingSinkingLureSegmentModelDL);
@@ -1986,14 +1986,14 @@ static f32 sRodBendRatios[22] = {
static Vec3f sRodTipOffset = { 0.0f, 0.0f, 0.0f };
-void Fishing_DrawRod(PlayState* play) {
+void Fishing_DrawRod(PlayState* play2) {
s16 i;
f32 lureXZLen;
f32 spC4;
f32 spC0;
- Input* input = &play->state.input[0];
+ PlayState* play = (PlayState*)play2;
Player* player = GET_PLAYER(play);
- s32 pad;
+ Input* input = &play->state.input[0];
OPEN_DISPS(play->state.gfxCtx, "../z_fishing.c", 3600);
@@ -2088,13 +2088,13 @@ void Fishing_DrawRod(PlayState* play) {
Matrix_RotateX((D_80B7A6C0 + 20.0f) * 0.01f * M_PI, MTXMODE_APPLY);
Matrix_Scale(0.70000005f, 0.70000005f, 0.70000005f, MTXMODE_APPLY);
- spC0 = (D_80B7A6BC * (((player->unk_85C - 1.0f) * -0.25f) + 0.5f)) + (D_80B7A6AC + D_80B7A6B8);
+ spC0 = D_80B7A6AC + D_80B7A6B8 + (D_80B7A6BC * ((((*player).unk_85C - 1.0f) * -0.25f) + 0.5f));
Matrix_Translate(0.0f, 0.0f, -1300.0f, MTXMODE_APPLY);
for (i = 0; i < 22; i++) {
- Matrix_RotateY(sRodBendRatios[i] * sRodBendRotY * 0.5f, MTXMODE_APPLY);
- Matrix_RotateX(sRodBendRatios[i] * spC0 * 0.5f, MTXMODE_APPLY);
+ Matrix_RotateY(sRodBendRotY * sRodBendRatios[i] * 0.5f, MTXMODE_APPLY);
+ Matrix_RotateX(spC0 * sRodBendRatios[i] * 0.5f, MTXMODE_APPLY);
Matrix_Push();
Matrix_Scale(sRodScales[i], sRodScales[i], 0.52f, MTXMODE_APPLY);
@@ -2219,7 +2219,7 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
case 0:
sSinkingLureSegmentIndex = 0;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (KREG(14) != 0) {
KREG(14) = 0;
sLureEquipped = FS_LURE_SINKING - sLureEquipped;
@@ -2330,7 +2330,7 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
}
}
- spE4 = ((sqrtf(lureXZLen) - 920.0f) * 0.11f) + WATER_SURFACE_Y(play);
+ spE4 = WATER_SURFACE_Y(play) + ((sqrtf(lureXZLen) - 920.0f) * 0.11f);
if (sLurePos.y <= spE4) {
sLurePos.y = spE4;
sLurePosDelta.x = sLurePosDelta.y = sLurePosDelta.z = 0.0f;
@@ -2363,7 +2363,6 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
for (i = 0; i < 50; i++) {
f32 sp7C = Rand_ZeroFloat(1.5f) + 0.5f;
f32 sp78 = Rand_ZeroFloat(6.28f);
- s32 pad;
sp9C.x = sinf(sp78) * sp7C;
sp9C.z = cosf(sp78) * sp7C;
@@ -2425,8 +2424,8 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
player->unk_860 = 2;
if (sLureWigglePosY < 3.0f) {
- spD0 = sLureRotXTarget * Math_SinS(sLureTimer * 0x1060);
- Math_ApproachF(&sLureRot.x, -M_PI / 6.0f + spD0, 0.3f, sLureRotXStep);
+ lureXZLen = Math_SinS(sLureTimer * 0x1060) * sLureRotXTarget;
+ Math_ApproachF(&sLureRot.x, -M_PI / 6.0f + lureXZLen, 0.3f, sLureRotXStep);
Math_ApproachF(&sLureRotXStep, 0.5f, 1.0f, 0.02f);
Math_ApproachZeroF(&sLureRotXTarget, 1.0f, 0.02f);
} else {
@@ -2439,20 +2438,21 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
lureXZLen = SQ(sLurePos.x) + SQ(sLurePos.z);
if (lureXZLen < SQ(920.0f)) {
if (sLurePos.y <= spE4 + 4) {
+ Input* input2 = &play->state.input[0];
f32 wiggle = 0.0f;
if (D_80B7E150 == 0) {
- if (fabsf(input->rel.stick_x) > 30.0f) {
- wiggle = fabsf((input->rel.stick_x - sStickAdjXPrev) * (1.0f / 60.0f));
- } else if (fabsf(input->rel.stick_y) > 30.0f) {
- wiggle = fabsf((input->rel.stick_y - sStickAdjYPrev) * (1.0f / 60.0f));
+ if (fabsf(input2->rel.stick_x) > 30.0f) {
+ wiggle = fabsf((input2->rel.stick_x - sStickAdjXPrev) * (1.0f / 60.0f));
+ } else if (fabsf(input2->rel.stick_y) > 30.0f) {
+ wiggle = fabsf((input2->rel.stick_y - sStickAdjYPrev) * (1.0f / 60.0f));
}
}
if (wiggle > 1.0f) {
wiggle = 1.0f;
}
- if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
+ if (CHECK_BTN_ALL(input2->press.button, BTN_B)) {
wiggle = 0.5f;
}
@@ -2475,7 +2475,7 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
sp90.z = player->actor.world.pos.z - sLurePos.z;
sp90.y = Math_Atan2F(sp90.z, sp90.x);
- sLureWiggleRotYTarget = (wiggle * sLureWiggleSign) + sp90.y;
+ sLureWiggleRotYTarget = sp90.y + (wiggle * sLureWiggleSign);
sLureWiggleSign *= -1.0f;
sLureWigglePosY = fabsf(wiggle) * 6.0f;
sLureRot.x = 0.0f;
@@ -2489,7 +2489,7 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
sReelLinePos[LINE_SEG_COUNT - 1].y += sLureLineSegPosDelta.y;
sLurePos.y += sLureLineSegPosDelta.y;
}
- } else if (CHECK_BTN_ALL(input->cur.button, BTN_A)) {
+ } else if (CHECK_BTN_ALL(input2->cur.button, BTN_A)) {
spDC = 0x500;
sLureWiggleRotYTarget = sReelLineRot[LINE_SEG_COUNT - 2].y + M_PI;
sLureRot.x = 0.0f;
@@ -2508,7 +2508,7 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
}
}
} else {
- spE4 = ((sqrtf(lureXZLen) - 920.0f) * 0.11f) + WATER_SURFACE_Y(play);
+ spE4 = WATER_SURFACE_Y(play) + ((sqrtf(lureXZLen) - 920.0f) * 0.11f);
if (sLurePos.y <= spE4) {
sLurePos.y = spE4;
spDC = 0x500;
@@ -2698,9 +2698,20 @@ s32 Fishing_SplashBySize(Fishing* this, PlayState* play, u8 ignorePosCheck) {
return false;
}
- // Necessary to match
- if (this->fishLength) {}
+ if (this->fishLength >= 60.0f) {
+ // Unknown optimized-out code
+ count = 0;
+ scale = 0.0f;
+ }
+ //! @bug Probably intended to be an else-if.
+ if (this->fishLength >= 50.0f) {
+ // Unknown optimized-out code
+ count = 0;
+ scale = 0.0f;
+ }
+
+ //! @bug Probably intended to be an else-if.
if (this->fishLength >= 40.0f) {
count = 40;
scale = 1.2f;
@@ -2745,9 +2756,13 @@ void Fishing_SplashBySize2(Fishing* this, PlayState* play) {
f32 speedXZ;
f32 angle;
- // Necessary to match
- if (this->fishLength) {}
+ if (this->fishLength >= 60.0f) {
+ // Unknown optimized-out code
+ count = 0;
+ scale = 0.0f;
+ }
+ //! @bug Probably intended to be an else-if.
if (this->fishLength >= 45.0f) {
count = 30;
scale = 0.5f;
@@ -2937,13 +2952,9 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
f32 phi_f0;
f32 phi_f2;
Vec3f bubblePos;
- Vec3f spB8;
- f32 temp_f0;
- f32 temp;
- f32 rumbleStrength;
- this->actor.uncullZoneForward = 700.0f;
- this->actor.uncullZoneScale = 50.0f;
+ this->actor.cullingVolumeDistance = 700.0f;
+ this->actor.cullingVolumeScale = 50.0f;
if (this->isLoach == 0) {
playerSpeedMod = (player->actor.speed * 0.15f) + 0.25f;
@@ -3013,11 +3024,10 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
this->fishLimbRotPhase += this->fishLimbRotPhaseStep;
- temp = cosf(this->fishLimbRotPhase);
- this->fishLimb23RotYDelta = this->unk_16E + (s16)(temp * this->fishLimbRotPhaseMag);
+ this->fishLimb23RotYDelta = (s16)(cosf(this->fishLimbRotPhase) * this->fishLimbRotPhaseMag) + (*this).unk_16E;
- temp = cosf(this->fishLimbRotPhase + -1.2f);
- this->fishLimb4RotYDelta = this->unk_16E + (s16)(temp * this->fishLimbRotPhaseMag * 1.6f);
+ this->fishLimb4RotYDelta =
+ (s16)(cosf(this->fishLimbRotPhase + -1.2f) * this->fishLimbRotPhaseMag * 1.6f) + (*this).unk_16E;
} else {
Actor_SetScale(&this->actor, this->fishLength * 65.0f * 0.000001f);
@@ -3027,12 +3037,11 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
this->fishLimbRotPhase += this->fishLimbRotPhaseStep * 0.8f;
for (i = 0; i < 3; i++) {
- temp = cosf(this->fishLimbRotPhase + (i * 2.1f));
- this->loachRotYDelta[i] = this->unk_16E + (s16)(temp * this->fishLimbRotPhaseMag * 2.0f);
+ this->loachRotYDelta[i] =
+ (s16)(cosf(this->fishLimbRotPhase + (i * 2.1f)) * this->fishLimbRotPhaseMag * 2.0f) + (*this).unk_16E;
}
- temp = cosf(this->fishLimbRotPhase + 0.4f);
- this->fishLimb23RotYDelta = (this->fishLimbRotPhaseMag * temp * 2.0f) * 0.6f;
+ this->fishLimb23RotYDelta = (cosf(this->fishLimbRotPhase + 0.4f) * (*this).fishLimbRotPhaseMag * 2.0f) * 0.6f;
}
distX = this->fishTargetPos.x - this->actor.world.pos.x;
@@ -3062,8 +3071,8 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
case 100:
Fishing_HandleAquariumDialog(this, play);
- this->actor.uncullZoneForward = 500.0f;
- this->actor.uncullZoneScale = 300.0f;
+ this->actor.cullingVolumeDistance = 500.0f;
+ this->actor.cullingVolumeScale = 300.0f;
Lights_PointNoGlowSetInfo(&this->lightInfo, (s16)this->actor.world.pos.x,
(s16)this->actor.world.pos.y + 20.0f, (s16)this->actor.world.pos.z - 50.0f, 255,
@@ -3147,7 +3156,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (KREG(15) != 0) {
KREG(15) = 0;
this->fishState = 7;
@@ -3250,7 +3259,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
this->fishState = 10;
this->fishStateNext = 10;
} else if ((KREG_DEBUG(2) != 0) || (((this->unk_1A4 & 0x7FF) == 0) && (this->unk_1A4 < 15000))) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
KREG(2) = 0;
#endif
this->fishState = -2;
@@ -3279,6 +3288,8 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
Math_ApproachZeroF(&this->actor.speed, 1.0f, 0.01f);
if ((this->actor.speed == 0.0f) || (this->actor.world.pos.y > (WATER_SURFACE_Y(play) - 5.0f))) {
+ Vec3f spB8;
+
this->fishTargetPos.x = Rand_ZeroFloat(300.0f);
this->fishTargetPos.z = Rand_ZeroFloat(300.0f);
this->fishTargetPos.y = this->actor.floorHeight + 10.0f;
@@ -3335,7 +3346,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
this->fishTargetPos.z = sLurePos.z + targetPosOffset.z;
if (sLureEquipped == FS_LURE_SINKING) {
- this->fishTargetPos.y = sLurePos.y;
+ this->fishTargetPos.y = sLurePos.y + 0.0f;
} else if (this->isLoach == 0) {
this->fishTargetPos.y = sLurePos.y - 15.0f;
} else {
@@ -3346,7 +3357,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
this->fishTargetPos.y = this->actor.floorHeight + 3.0f;
}
- if ((sLureEquipped != FS_LURE_SINKING) && (this->fishTargetPos.y < this->actor.world.pos.y)) {
+ if ((sLureEquipped != FS_LURE_SINKING) && (this->actor.world.pos.y > this->fishTargetPos.y)) {
Math_ApproachF(&this->actor.world.pos.y, this->fishTargetPos.y, 0.1f,
(this->actor.world.pos.y - this->fishTargetPos.y) * 0.1f);
}
@@ -3411,7 +3422,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
chance *= 5.0f;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (((this->timerArray[0] == 1) || (Rand_ZeroOne() < chance)) &&
((Rand_ZeroOne() < (this->perception * multiplier)) || ((this->isLoach + 1) == KREG(69))))
#else
@@ -3571,8 +3582,8 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
(sqrtf(SQ(sLurePos.x) + SQ(sLurePos.z)) > 800.0f)) {
this->timerArray[0] = 0;
- this->unk_190 = 1.0f;
this->fishState = this->fishStateNext;
+ this->unk_190 = 1.0f;
this->unk_194 = 2000.0f;
} else if (distToTarget < 10.0f) {
if (sLurePos.y > (WATER_SURFACE_Y(play) - 10.0f)) {
@@ -3609,8 +3620,8 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
break;
case 5:
- this->actor.uncullZoneForward = 1200.0f;
- this->actor.uncullZoneScale = 200.0f;
+ this->actor.cullingVolumeDistance = 1200.0f;
+ this->actor.cullingVolumeScale = 200.0f;
sFishFightTime++;
PRINTF("HIT FISH %dcm\n", (u8)this->fishLength);
@@ -3628,6 +3639,10 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
if ((sLureBitTimer != 0) && (sLineHooked == 0)) { // pull the line to hook it
if (((input->rel.stick_y < -50) && (sStickAdjYPrev > -40)) ||
CHECK_BTN_ALL(input->press.button, BTN_A)) {
+ f32 temp_f0;
+ s32 pad;
+ f32 rumbleStrength;
+
if (input->rel.stick_y < -50) {
temp_f0 = 40.0f - ((this->fishLength - 30.0f) * 1.333333f);
if (temp_f0 > 0.0f) {
@@ -3898,7 +3913,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
Math_ApproachS(&this->fishLimbDRotZDelta, 11000, 2, 4000);
Math_ApproachF(&sCatchCamX, 15.0f, 0.05f, 0.75f);
- multiVecSrc.x = sCatchCamX;
+ multiVecSrc.x = sCatchCamX + 0.0f;
if (sLinkAge != LINK_AGE_CHILD) {
multiVecSrc.y = 30.0f;
multiVecSrc.z = 55.0f;
@@ -3973,7 +3988,7 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
sLureCaughtWith = sLureEquipped;
Actor_Kill(&this->actor);
} else if ((this->isLoach == 0) && (sFishOnHandIsLoach == 0) &&
- ((s16)this->fishLength < (s16)sFishOnHandLength)) {
+ ((s16)sFishOnHandLength > (s16)this->fishLength)) {
this->keepState = 1;
this->timerArray[0] = 0x3C;
@@ -4183,11 +4198,13 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
}
if ((this->actor.world.pos.y < WATER_SURFACE_Y(play)) &&
- (this->actor.world.pos.y > (WATER_SURFACE_Y(play) - 10.0f)) && ((this->stateAndTimer & 1) == 0) &&
- (this->actor.speed > 0.0f)) {
- Vec3f pos = this->actor.world.pos;
- pos.y = WATER_SURFACE_Y(play);
- Fishing_SpawnRipple(&this->actor.projectedPos, play->specialEffects, &pos, 80.0f, 500.0f, 150, 90);
+ (this->actor.world.pos.y > (WATER_SURFACE_Y(play) - 10.0f))) {
+ if (((this->stateAndTimer & 1) == 0) && (this->actor.speed > 0.0f)) {
+ Vec3f pos = this->actor.world.pos;
+
+ pos.y = WATER_SURFACE_Y(play);
+ Fishing_SpawnRipple(&this->actor.projectedPos, play->specialEffects, &pos, 80.0f, 500.0f, 150, 90);
+ }
}
if ((this->actor.speed > 0.0f) || (this->fishState == 5)) {
@@ -4240,8 +4257,8 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
if ((this->fishState == 5) && ((this->stateAndTimer & 1) == 0)) {
Vec3f pos;
- pos.x = Rand_CenteredFloat(10.0f) + this->actor.world.pos.x;
- pos.z = Rand_CenteredFloat(10.0f) + this->actor.world.pos.z;
+ pos.x = this->actor.world.pos.x + Rand_CenteredFloat(10.0f);
+ pos.z = this->actor.world.pos.z + Rand_CenteredFloat(10.0f);
pos.y = this->actor.floorHeight + 5.0f;
Fishing_SpawnWaterDust(&this->actor.projectedPos, play->specialEffects, &pos,
(this->fishLength * 0.005f) + 0.15f);
@@ -4259,9 +4276,9 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
this->bubbleTime--;
for (i = 0; i < 2; i++) {
- pos.x = Rand_CenteredFloat(range) + this->actor.world.pos.x;
- pos.y = Rand_CenteredFloat(range) + this->actor.world.pos.y;
- pos.z = Rand_CenteredFloat(range) + this->actor.world.pos.z;
+ pos.x = this->actor.world.pos.x + Rand_CenteredFloat(range);
+ pos.y = this->actor.world.pos.y + Rand_CenteredFloat(range);
+ pos.z = this->actor.world.pos.z + Rand_CenteredFloat(range);
Fishing_SpawnBubble(&this->actor.projectedPos, play->specialEffects, &pos, Rand_ZeroFloat(0.035f) + 0.04f,
0);
}
@@ -4327,9 +4344,9 @@ void Fishing_DrawFish(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
- Matrix_RotateY(BINANG_TO_RAD_ALT(this->unk_162 + this->actor.shape.rot.y), MTXMODE_APPLY);
- Matrix_RotateX(BINANG_TO_RAD_ALT(this->unk_160 + this->actor.shape.rot.x), MTXMODE_APPLY);
- Matrix_RotateZ(BINANG_TO_RAD_ALT(this->unk_164 + this->actor.shape.rot.z), MTXMODE_APPLY);
+ Matrix_RotateY(BINANG_TO_RAD_ALT(this->actor.shape.rot.y + (*this).unk_162), MTXMODE_APPLY);
+ Matrix_RotateX(BINANG_TO_RAD_ALT(this->actor.shape.rot.x + (*this).unk_160), MTXMODE_APPLY);
+ Matrix_RotateZ(BINANG_TO_RAD_ALT(this->actor.shape.rot.z + (*this).unk_164), MTXMODE_APPLY);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
if (this->isLoach == 0) {
@@ -4387,7 +4404,7 @@ void Fishing_UpdatePondProps(PlayState* play) {
Actor* actor;
s16 i;
- for (i = 0; i < POND_PROP_COUNT; i++) {
+ for (i = 0; i < POND_PROP_COUNT; i++, prop++) {
if (prop->type != FS_PROP_NONE) {
prop->shouldDraw = false;
prop->timer++;
@@ -4429,13 +4446,11 @@ void Fishing_UpdatePondProps(PlayState* play) {
Math_ApproachS(&prop->lilyPadAngle, 0, 20, 80);
prop->pos.y =
- (Math_SinS(prop->timer * 0x1000) * prop->lilyPadOffset) + (WATER_SURFACE_Y(play) + 2.0f);
+ WATER_SURFACE_Y(play) + 2.0f + (Math_SinS(prop->timer * 0x1000) * prop->lilyPadOffset);
Math_ApproachZeroF(&prop->lilyPadOffset, 0.1f, 0.02f);
}
}
}
-
- prop++;
}
if (sSubCamId == SUB_CAM_ID_DONE) {
@@ -4453,7 +4468,7 @@ void Fishing_DrawPondProps(PlayState* play) {
Matrix_Push();
- for (i = 0; i < POND_PROP_COUNT; i++) {
+ for (i = 0; i < POND_PROP_COUNT; i++, prop++) {
if (prop->type == FS_PROP_REED) {
if (materialFlag == 0) {
gSPDisplayList(POLY_XLU_DISP++, gFishingReedMaterialDL);
@@ -4471,13 +4486,11 @@ void Fishing_DrawPondProps(PlayState* play) {
gSPDisplayList(POLY_XLU_DISP++, gFishingReedModelDL);
}
}
-
- prop++;
}
- prop = &sPondProps[0];
materialFlag = 0;
- for (i = 0; i < POND_PROP_COUNT; i++) {
+ prop = &sPondProps[0];
+ for (i = 0; i < POND_PROP_COUNT; i++, prop++) {
if (prop->type == FS_PROP_WOOD_POST) {
if (materialFlag == 0) {
gSPDisplayList(POLY_OPA_DISP++, gFishingWoodPostMaterialDL);
@@ -4492,13 +4505,11 @@ void Fishing_DrawPondProps(PlayState* play) {
gSPDisplayList(POLY_OPA_DISP++, gFishingWoodPostModelDL);
}
}
-
- prop++;
}
- prop = &sPondProps[0];
materialFlag = 0;
- for (i = 0; i < POND_PROP_COUNT; i++) {
+ prop = &sPondProps[0];
+ for (i = 0; i < POND_PROP_COUNT; i++, prop++) {
if (prop->type == FS_PROP_LILY_PAD) {
if (materialFlag == 0) {
gSPDisplayList(POLY_XLU_DISP++, gFishingLilyPadMaterialDL);
@@ -4516,13 +4527,11 @@ void Fishing_DrawPondProps(PlayState* play) {
gSPDisplayList(POLY_XLU_DISP++, gFishingLilyPadModelDL);
}
}
-
- prop++;
}
- prop = &sPondProps[0];
materialFlag = 0;
- for (i = 0; i < POND_PROP_COUNT; i++) {
+ prop = &sPondProps[0];
+ for (i = 0; i < POND_PROP_COUNT; i++, prop++) {
if (prop->type == FS_PROP_ROCK) {
if (materialFlag == 0) {
gSPDisplayList(POLY_OPA_DISP++, gFishingRockMaterialDL);
@@ -4538,8 +4547,6 @@ void Fishing_DrawPondProps(PlayState* play) {
gSPDisplayList(POLY_OPA_DISP++, gFishingRockModelDL);
}
}
-
- prop++;
}
Matrix_Pop();
@@ -4579,10 +4586,10 @@ void Fishing_UpdateGroupFishes(PlayState* play) {
basePos[0].y = -35.0f;
basePos[0].z = cosf(sFishGroupAngle1) * 720.0f;
- temp1 = refPos->x - basePos[0].x;
- temp2 = refPos->z - basePos[0].z;
+ dx = refPos->x - basePos[0].x;
+ dz = refPos->z - basePos[0].z;
- if ((SQ(temp1) + SQ(temp2)) < SQ(50.0f)) {
+ if ((SQ(dx) + SQ(dz)) < SQ(50.0f)) {
sFishGroupAngle1 += 0.3f;
groupContactFlags |= 1;
} else if (sFishGroupVar != 0.0f) {
@@ -4596,10 +4603,10 @@ void Fishing_UpdateGroupFishes(PlayState* play) {
basePos[1].y = -35.0f;
basePos[1].z = cosf(sFishGroupAngle2) * 720.0f;
- temp1 = refPos->x - basePos[1].x;
- temp2 = refPos->z - basePos[1].z;
+ dx = refPos->x - basePos[1].x;
+ dz = refPos->z - basePos[1].z;
- if ((SQ(temp1) + SQ(temp2)) < SQ(50.0f)) {
+ if ((SQ(dx) + SQ(dz)) < SQ(50.0f)) {
sFishGroupAngle2 -= 0.3f;
groupContactFlags |= 2;
} else if (sFishGroupVar != 0.0f) {
@@ -4613,10 +4620,10 @@ void Fishing_UpdateGroupFishes(PlayState* play) {
basePos[2].y = -35.0f;
basePos[2].z = cosf(sFishGroupAngle3) * 720.0f;
- temp1 = refPos->x - basePos[2].x;
- temp2 = refPos->z - basePos[2].z;
+ dx = refPos->x - basePos[2].x;
+ dz = refPos->z - basePos[2].z;
- if ((SQ(temp1) + SQ(temp2)) < SQ(50.0f)) {
+ if ((SQ(dx) + SQ(dz)) < SQ(50.0f)) {
sFishGroupAngle3 -= 0.3f;
groupContactFlags |= 4;
} else if (sFishGroupVar != 0.0f) {
@@ -4632,7 +4639,7 @@ void Fishing_UpdateGroupFishes(PlayState* play) {
spD8 = 1.0f;
}
- for (i = 0; i < GROUP_FISH_COUNT; i++) {
+ for (i = 0; i < GROUP_FISH_COUNT; i++, fish++) {
if (fish->type != FS_GROUP_FISH_NONE) {
fish->timer++;
@@ -4713,7 +4720,7 @@ void Fishing_UpdateGroupFishes(PlayState* play) {
Math_ApproachF(&fish->velY, 0.75f, 1.0f, 0.05f);
temp1 = fish->velY * spD8;
- temp2 = Math_CosS(fish->unk_3C) * temp1;
+ temp2 = temp1 * Math_CosS(fish->unk_3C);
fish->pos.x += temp2 * Math_SinS(fish->unk_3E);
fish->pos.y += temp1 * Math_SinS(fish->unk_3C);
@@ -4726,8 +4733,6 @@ void Fishing_UpdateGroupFishes(PlayState* play) {
fish->scaleX = (cosf(fish->unk_30) * fish->unk_38) + offset;
}
}
-
- fish++;
}
sFishGroupVar = 0.0f;
@@ -4760,7 +4765,7 @@ void Fishing_DrawGroupFishes(PlayState* play) {
Matrix_Translate(fish->pos.x, fish->pos.y, fish->pos.z, MTXMODE_NEW);
Matrix_RotateY(BINANG_TO_RAD_ALT2((f32)fish->unk_3E), MTXMODE_APPLY);
Matrix_RotateX(BINANG_TO_RAD_ALT2(-(f32)fish->unk_3C), MTXMODE_APPLY);
- Matrix_Scale(fish->scaleX * scale, scale, scale, MTXMODE_APPLY);
+ Matrix_Scale(scale * fish->scaleX, scale, scale, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_fishing.c", 8093);
gSPDisplayList(POLY_OPA_DISP++, gFishingGroupFishModelDL);
@@ -5046,8 +5051,8 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
}
}
} else {
- getItemId = GI_RUPEE_PURPLE;
sFishOnHandLength = 0.0f; // doesn't record loach
+ getItemId = GI_RUPEE_PURPLE;
}
this->actor.parent = NULL;
@@ -5085,7 +5090,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
break;
case 22:
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (play) {}
#endif
@@ -5135,6 +5140,7 @@ static Vec3s sSinkingLureLocations[] = {
};
void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
+ static Vec3f sStreamSfxProjectedPos;
PlayState* play = play2;
Fishing* this = (Fishing*)thisx;
Vec3f multiVecSrc;
@@ -5149,14 +5155,14 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
Player* player = GET_PLAYER(play);
Input* input = &play->state.input[0];
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (0) {
// Strings existing only in rodata
- PRINTF(VT_FGCOL(GREEN));
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_GREEN();
+ PRINTF_COLOR_YELLOW();
PRINTF("plays %x\n");
PRINTF("ys %x\n");
- PRINTF(VT_RST);
+ PRINTF_RST();
}
#endif
@@ -5175,7 +5181,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
if ((sOwnerTheftTimer != 0) || (Message_GetState(&play->msgCtx) != TEXT_STATE_NONE)) {
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
} else {
- this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_5;
+ this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED;
}
if ((this->actor.xzDistToPlayer < 120.0f) || (Message_GetState(&play->msgCtx) != TEXT_STATE_NONE)) {
@@ -5214,7 +5220,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
f32 dz = sOwnerHeadPos.z - sLurePos.z;
if ((sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < 25.0f) || (KREG_DEBUG(77) > 0)) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
KREG(77) = 0;
#endif
sOwnerHair = FS_OWNER_BALD;
@@ -5230,7 +5236,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
HIGH_SCORE(HS_FISHING) &= ~HS_FISH_STOLE_HAT;
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (KREG(77) < 0) {
KREG(77) = 0;
sIsOwnersHatSunk = true;
@@ -5279,7 +5285,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 20);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (KREG(0) != 0) {
s32 pad[3];
@@ -5340,6 +5346,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
Math_ApproachF(&sSubCamAt.y, sLurePos.y, subCamAtMaxVelFrac, 50.0f * sSubCamVelFactor);
Math_ApproachF(&sSubCamAt.z, sLurePos.z, subCamAtMaxVelFrac, fabsf(lureDist.z) * sSubCamVelFactor);
+ multiVecSrc.x = -30.0f;
multiVecSrc.x = 0.0f - D_80B7FED0;
if (sLinkAge != LINK_AGE_CHILD) {
multiVecSrc.y = 80.0f;
@@ -5521,7 +5528,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
Math_ApproachF(&sCatchCamX, 15.0f, 0.1f, 0.75f);
- multiVecSrc.x = sCatchCamX - 15.0f;
+ multiVecSrc.x = sCatchCamX + 0.0f - 15.0f;
if (sLinkAge != LINK_AGE_CHILD) {
multiVecSrc.y = 60.0f;
@@ -5601,8 +5608,8 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
((play->gameplayFrames % 2) == 0)) {
Vec3f pos;
- pos.x = Rand_CenteredFloat(20.0f) + player->actor.world.pos.x;
- pos.z = Rand_CenteredFloat(20.0f) + player->actor.world.pos.z;
+ pos.x = player->actor.world.pos.x + Rand_CenteredFloat(20.0f);
+ pos.z = player->actor.world.pos.z + Rand_CenteredFloat(20.0f);
pos.y = player->actor.floorHeight + 5.0f;
Fishing_SpawnWaterDust(NULL, play->specialEffects, &pos, 0.5f);
}
@@ -5633,7 +5640,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (sREG(15) != 0) {
if (sStormStrengthTarget != (sREG(15) - 1)) {
if (sStormStrengthTarget == 0) {
@@ -5654,11 +5661,11 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
}
sREG(14) = 0;
-#endif
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("zelda_time %x\n", ((void)0, gSaveContext.save.dayTime));
- PRINTF(VT_RST);
+ PRINTF_RST();
+#endif
if (sStormChanceTimer >= 2) {
sStormChanceTimer--;
@@ -5723,9 +5730,9 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
rot.z = (Camera_GetInputDirYaw(mainCam) * -(M_PI / 0x8000)) + rot.y;
for (i = 0; i < (u8)sStormStrength; i++) {
- pos.x = Rand_CenteredFloat(700.0f) + play->view.eye.x;
+ pos.x = play->view.eye.x + Rand_CenteredFloat(700.0f);
pos.y = (Rand_ZeroFloat(100.0f) + 150.0f) - 170.0f;
- pos.z = Rand_CenteredFloat(700.0f) + play->view.eye.z;
+ pos.z = play->view.eye.z + Rand_CenteredFloat(700.0f);
if (pos.z < 1160.0f) {
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &pos, &projectedPos, &sProjectedW);
@@ -5755,14 +5762,14 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
gSaveContext.minigameScore = (SQ((f32)sFishLengthToWeigh) * 0.0036f) + 0.5f;
#endif
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (BREG(26) != 0) {
BREG(26) = 0;
Message_StartTextbox(play, 0x407B + BREG(27), NULL);
}
-#endif
PRINTF("HI_SCORE = %x\n", HIGH_SCORE(HS_FISHING));
+#endif
}
s32 Fishing_OwnerOverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
@@ -5797,7 +5804,7 @@ static void* sFishingOwnerEyeTexs[] = {
};
void Fishing_DrawOwner(Actor* thisx, PlayState* play) {
- s32 pad;
+ PlayState* play2 = (PlayState*)play;
Fishing* this = (Fishing*)thisx;
Input* input = &play->state.input[0];
@@ -5813,10 +5820,10 @@ void Fishing_DrawOwner(Actor* thisx, PlayState* play) {
Fishing_OwnerOverrideLimbDraw, Fishing_OwnerPostLimbDraw, this);
}
- Fishing_DrawPondProps(play);
- Fishing_DrawEffects(play->specialEffects, play);
- Fishing_DrawGroupFishes(play);
- Fishing_DrawStreamSplash(play);
+ Fishing_DrawPondProps(play2);
+ Fishing_DrawEffects(play2->specialEffects, play2);
+ Fishing_DrawGroupFishes(play2);
+ Fishing_DrawStreamSplash(play2);
if (sFishingMusicDelay != 0) {
sFishingMusicDelay--;
@@ -5837,10 +5844,10 @@ void Fishing_DrawOwner(Actor* thisx, PlayState* play) {
}
if ((sFishingPlayingState != 0) && sIsRodVisible) {
- Fishing_DrawRod(play);
+ Fishing_DrawRod(play2);
Fishing_UpdateLinePos(sReelLinePos);
- Fishing_UpdateLine(play, &sRodTipPos, sReelLinePos, sReelLineRot, sReelLineUnk);
- Fishing_DrawLureAndLine(play, sReelLinePos, sReelLineRot);
+ Fishing_UpdateLine(play2, &sRodTipPos, sReelLinePos, sReelLineRot, sReelLineUnk);
+ Fishing_DrawLureAndLine(play2, sReelLinePos, sReelLineRot);
sStickAdjXPrev = input->rel.stick_x;
sStickAdjYPrev = input->rel.stick_y;
@@ -5858,7 +5865,7 @@ void Fishing_DrawOwner(Actor* thisx, PlayState* play) {
gSPDisplayList(POLY_XLU_DISP++, gFishingAquariumContainerDL);
if ((sFishingPlayingState != 0) && (sLureEquipped == FS_LURE_SINKING)) {
- Fishing_DrawSinkingLure(play);
+ Fishing_DrawSinkingLure(play2);
}
CLOSE_DISPS(play->state.gfxCtx, "../z_fishing.c", 9305);
diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.h b/src/overlays/actors/ovl_Fishing/z_fishing.h
index 3524c88a74..6836ce79f8 100644
--- a/src/overlays/actors/ovl_Fishing/z_fishing.h
+++ b/src/overlays/actors/ovl_Fishing/z_fishing.h
@@ -20,12 +20,12 @@ typedef struct Fishing {
/* 0x015A */ s16 fishStateNext;
/* 0x015C */ s16 stateAndTimer; // fish use as timer that's AND'd, owner as talking state
/* 0x015E */ s16 unk_15E;
- /* 0x0160 */ s16 unk_160; // fish use as rotateX, owner as index of eye texture
- /* 0x0162 */ s16 unk_162; // fish use as rotateY, owner as index of eye texture
- /* 0x0164 */ s16 unk_164; // fish use as rotateZ, owner as rotation of head
+ /* 0x0160 */ s16 unk_160; // fish use as rotateX, owner as index of eye texture (TODO: probably part of a "work" array)
+ /* 0x0162 */ s16 unk_162; // fish use as rotateY, owner as index of eye texture (TODO: probably part of a "work" array)
+ /* 0x0164 */ s16 unk_164; // fish use as rotateZ, owner as rotation of head (TODO: probably part of a "work" array)
/* 0x0166 */ Vec3s rotationTarget;
/* 0x016C */ s16 fishLimb23RotYDelta;
- /* 0x016E */ s16 unk_16E;
+ /* 0x016E */ s16 unk_16E; // (TODO: probably part of a "work" array)
/* 0x0170 */ s16 fishLimbDRotZDelta;
/* 0x0172 */ s16 fishLimbEFRotYDelta;
/* 0x0174 */ s16 fishLimb89RotYDelta;
@@ -38,7 +38,7 @@ typedef struct Fishing {
/* 0x0190 */ f32 unk_190; // fishLimbRotPhaseStep target
/* 0x0194 */ f32 unk_194; // fishLimbRotPhaseMag target
/* 0x0198 */ f32 fishLimbRotPhaseStep;
- /* 0x019C */ f32 fishLimbRotPhaseMag;
+ /* 0x019C */ f32 fishLimbRotPhaseMag; // (TODO: probably part of an "fwork" array)
/* 0x01A0 */ s16 bumpTimer; // set when hitting a wall.
/* 0x01A2 */ s16 unk_1A2; // "scared" timer?
/* 0x01A4 */ s16 unk_1A4; // "scared" timer? set at same time as above
diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c
index bd581b2aa1..a690bfa73f 100644
--- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c
+++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c
@@ -5,6 +5,15 @@
*/
#include "z_item_b_heart.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64item.h"
+#include "z64play.h"
+
#include "assets/objects/object_gi_hearts/object_gi_hearts.h"
#define FLAGS 0
@@ -30,9 +39,9 @@ ActorProfile Item_B_Heart_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 0, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 800, ICHAIN_STOP),
};
void ItemBHeart_Init(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h
index 432a7ef499..ef92f86b86 100644
--- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h
+++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h
@@ -2,7 +2,7 @@
#define Z_ITEM_B_HEART_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ItemBHeart;
diff --git a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c
index 83f282da0d..3909fb72f9 100644
--- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c
+++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c
@@ -6,7 +6,16 @@
#include "z_item_etcetera.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/qrand.h"
+#include "libu64/debug.h"
+#include "printf.h"
+#include "rand.h"
+#include "z64draw.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void ItemEtcetera_Init(Actor* thisx, PlayState* play);
void ItemEtcetera_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.h b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.h
index c5054884bd..e938c81267 100644
--- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.h
+++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.h
@@ -2,11 +2,11 @@
#define Z_ITEM_ETC_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ItemEtcetera;
-typedef void (*ItemEtceteraActionFunc)(struct ItemEtcetera*, PlayState*);
+typedef void (*ItemEtceteraActionFunc)(struct ItemEtcetera*, struct PlayState*);
typedef struct ItemEtcetera {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c
index e1b21b2a85..40594c86f6 100644
--- a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c
+++ b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c
@@ -5,6 +5,8 @@
*/
#include "z_item_inbox.h"
+#include "z64draw.h"
+#include "z64play.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
diff --git a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.h b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.h
index 3bf3cf1570..d13bad0053 100644
--- a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.h
+++ b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.h
@@ -2,11 +2,11 @@
#define Z_ITEM_INBOX_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ItemInbox;
-typedef void (*ItemInboxActionFunc)(struct ItemInbox*, PlayState*);
+typedef void (*ItemInboxActionFunc)(struct ItemInbox*, struct PlayState*);
typedef struct ItemInbox {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c
index 00d7eab43e..fa4f500c87 100644
--- a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c
+++ b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c
@@ -5,9 +5,18 @@
*/
#include "z_item_ocarina.h"
+
+#include "libu64/debug.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "z64draw.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/scenes/overworld/spot00/spot00_scene.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void ItemOcarina_Init(Actor* thisx, PlayState* play);
void ItemOcarina_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.h b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.h
index 9a02b99ed0..3ae598e7d1 100644
--- a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.h
+++ b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.h
@@ -2,11 +2,11 @@
#define Z_ITEM_OCARINA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ItemOcarina;
-typedef void (*ItemOcarinaActionFunc)(struct ItemOcarina*, PlayState*);
+typedef void (*ItemOcarinaActionFunc)(struct ItemOcarina*, struct PlayState*);
typedef struct ItemOcarina {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c
index bebe954983..2f281a17d2 100644
--- a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c
+++ b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c
@@ -4,11 +4,25 @@
* Description: Deku Shield
*/
-#include "terminal.h"
#include "z_item_shield.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64item.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_link_child/object_link_child.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void ItemShield_Init(Actor* thisx, PlayState* play);
void ItemShield_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Item_Shield/z_item_shield.h b/src/overlays/actors/ovl_Item_Shield/z_item_shield.h
index c7984f4a4d..564170e465 100644
--- a/src/overlays/actors/ovl_Item_Shield/z_item_shield.h
+++ b/src/overlays/actors/ovl_Item_Shield/z_item_shield.h
@@ -2,11 +2,11 @@
#define Z_ITEM_SHIELD_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ItemShield;
-typedef void (*ItemShieldActionFunc)(struct ItemShield*, PlayState*);
+typedef void (*ItemShieldActionFunc)(struct ItemShield*, struct PlayState*);
typedef struct ItemShield {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c
index e47a059953..d2912c7ea5 100644
--- a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c
+++ b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c
@@ -5,9 +5,20 @@
*/
#include "z_magic_dark.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void MagicDark_Init(Actor* thisx, PlayState* play);
void MagicDark_Destroy(Actor* thisx, PlayState* play);
@@ -144,7 +155,7 @@ void MagicDark_DimLighting(PlayState* play, f32 intensity) {
f32 colorScale;
f32 fogScale;
- if (play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_5) {
+ if (play->roomCtx.curRoom.type != ROOM_TYPE_BOSS) {
intensity = CLAMP_MIN(intensity, 0.0f);
intensity = CLAMP_MAX(intensity, 1.0f);
fogScale = intensity - 0.2f;
diff --git a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.h b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.h
index 3d7ef82298..59344baff1 100644
--- a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.h
+++ b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.h
@@ -2,7 +2,7 @@
#define Z_MAGIC_DARK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct MagicDark;
diff --git a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c
index 3895bac8be..e60e524b84 100644
--- a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c
+++ b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c
@@ -6,7 +6,16 @@
#include "z_magic_fire.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void MagicFire_Init(Actor* thisx, PlayState* play);
void MagicFire_Destroy(Actor* thisx, PlayState* play);
@@ -232,7 +241,7 @@ void MagicFire_Draw(Actor* thisx, PlayState* play) {
(u8)(s32)(120 * this->screenTintIntensity));
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
- gDPFillRectangle(POLY_XLU_DISP++, 0, 0, 319, 239);
+ gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, 255, 200, 0, (u8)(this->alphaMultiplier * 255));
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, (u8)(this->alphaMultiplier * 255));
diff --git a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.h b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.h
index 4a9cb5188c..ae953c0d3c 100644
--- a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.h
+++ b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.h
@@ -2,7 +2,7 @@
#define Z_MAGIC_FIRE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct MagicFire;
diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c
index f8a9e829e2..2dca261b93 100644
--- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c
+++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c
@@ -6,7 +6,18 @@
#include "z_magic_wind.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "libu64/debug.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z64curve.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void MagicWind_Init(Actor* thisx, PlayState* play);
void MagicWind_Destroy(Actor* thisx, PlayState* play);
@@ -46,8 +57,7 @@ void MagicWind_Init(Actor* thisx, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!SkelCurve_Init(play, &this->skelCurve, &sSkel, &sAnim)) {
- // "Magic_Wind_Actor_ct (): Construct failed"
- PRINTF("Magic_Wind_Actor_ct():コンストラクト失敗\n");
+ PRINTF(T("Magic_Wind_Actor_ct():コンストラクト失敗\n", "Magic_Wind_Actor_ct(): Construct failed\n"));
}
this->actor.room = -1;
switch (this->actor.params) {
diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.h b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.h
index e9521f7002..b7ba93c264 100644
--- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.h
+++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.h
@@ -2,11 +2,12 @@
#define Z_MAGIC_WIND_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64curve.h"
struct MagicWind;
-typedef void (*MagicWindFunc)(struct MagicWind* this, PlayState* play);
+typedef void (*MagicWindFunc)(struct MagicWind* this, struct PlayState* play);
typedef struct MagicWind {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c
index 4bb8ce0cf6..b89838083f 100644
--- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c
+++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c
@@ -5,9 +5,24 @@
*/
#include "z_mir_ray.h"
+
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64light.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/object_mir_ray/object_mir_ray.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)
void MirRay_Init(Actor* thisx, PlayState* play);
void MirRay_Destroy(Actor* thisx, PlayState* play);
@@ -106,9 +121,9 @@ static MirRayDataEntry sMirRayData[] = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 0, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void MirRay_SetupCollider(MirRay* this) {
@@ -118,10 +133,11 @@ void MirRay_SetupCollider(MirRay* this) {
colliderOffset.x = (this->poolPt.x - this->sourcePt.x) * dataEntry->unk_10;
colliderOffset.y = (this->poolPt.y - this->sourcePt.y) * dataEntry->unk_10;
colliderOffset.z = (this->poolPt.z - this->sourcePt.z) * dataEntry->unk_10;
- this->colliderSph.elements[0].dim.worldSphere.center.x = colliderOffset.x + this->sourcePt.x;
- this->colliderSph.elements[0].dim.worldSphere.center.y = colliderOffset.y + this->sourcePt.y;
- this->colliderSph.elements[0].dim.worldSphere.center.z = colliderOffset.z + this->sourcePt.z;
- this->colliderSph.elements[0].dim.worldSphere.radius = dataEntry->unk_14 * this->colliderSph.elements->dim.scale;
+ this->colliderJntSph.elements[0].dim.worldSphere.center.x = colliderOffset.x + this->sourcePt.x;
+ this->colliderJntSph.elements[0].dim.worldSphere.center.y = colliderOffset.y + this->sourcePt.y;
+ this->colliderJntSph.elements[0].dim.worldSphere.center.z = colliderOffset.z + this->sourcePt.z;
+ this->colliderJntSph.elements[0].dim.worldSphere.radius =
+ dataEntry->unk_14 * this->colliderJntSph.elements->dim.scale;
}
// Set up a light point between source point and reflection point. Reflection point is the pool point (for windows) or
@@ -165,8 +181,8 @@ void MirRay_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f);
- // "Generation of reflectable light!"
- PRINTF("反射用 光の発生!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
+ PRINTF(T("反射用 光の発生!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n",
+ "Generation of reflectable light!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"));
LOG_NUM("this->actor.arg_data", this->actor.params, "../z_mir_ray.c", 518);
if (this->actor.params >= 0xA) {
@@ -208,8 +224,8 @@ void MirRay_Init(Actor* thisx, PlayState* play) {
this->shieldCorners[5].y = -800.0f;
if (PARAMS_GET_NOSHIFT(dataEntry->params, 1, 1)) {
- Collider_InitJntSph(play, &this->colliderSph);
- Collider_SetJntSph(play, &this->colliderSph, &this->actor, &sJntSphInit, &this->colliderSphItem);
+ Collider_InitJntSph(play, &this->colliderJntSph);
+ Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements);
if (!PARAMS_GET_NOSHIFT(dataEntry->params, 2, 1)) { // Beams not from mirrors
MirRay_SetupCollider(this);
}
@@ -230,7 +246,7 @@ void MirRay_Destroy(Actor* thisx, PlayState* play) {
LightContext_RemoveLight(play, &play->lightCtx, this->lightNode);
if (sMirRayData[this->actor.params].params & 2) {
- Collider_DestroyJntSph(play, &this->colliderSph);
+ Collider_DestroyJntSph(play, &this->colliderJntSph);
}
Collider_DestroyQuad(play, &this->shieldRay);
@@ -248,7 +264,7 @@ void MirRay_Update(Actor* thisx, PlayState* play) {
if (sMirRayData[this->actor.params].params & 4) { // Beams from mirrors
MirRay_SetupCollider(this);
}
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base);
}
if (this->reflectIntensity > 0.0f) {
CollisionCheck_SetAT(play, &play->colChkCtx, &this->shieldRay.base);
diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.h b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.h
index 4e93149075..245cf1007b 100644
--- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.h
+++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.h
@@ -2,7 +2,8 @@
#define Z_MIR_RAY_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct MirRay;
@@ -22,14 +23,14 @@ typedef struct MirRayDataEntry {
typedef struct MirRayShieldReflection {
/* 0x00 */ Vec3f pos;
/* 0x0C */ MtxF mtx;
- /* 0x4C */ CollisionPoly* reflectionPoly;
+ /* 0x4C */ struct CollisionPoly* reflectionPoly;
/* 0x50 */ u8 opacity;
} MirRayShieldReflection; // size = 0x54
typedef struct MirRay {
/* 0x0000 */ Actor actor;
- /* 0x014C */ ColliderJntSph colliderSph;
- /* 0x016C */ ColliderJntSphElement colliderSphItem;
+ /* 0x014C */ ColliderJntSph colliderJntSph;
+ /* 0x016C */ ColliderJntSphElement colliderJntSphElements[1];
/* 0x01AC */ ColliderQuad shieldRay;
/* 0x022C */ f32 reflectIntensity; // Reflection occurs if it is positive, brightness depends on it
/* 0x0230 */ Vec3f shieldCorners[6];
diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c
index a9cded5748..88638e1ed8 100644
--- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c
+++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c
@@ -5,9 +5,27 @@
*/
#include "z_obj_bean.h"
-#include "assets/objects/object_mamenoki/object_mamenoki.h"
-#include "assets/objects/gameplay_keep/gameplay_keep.h"
+
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64cutscene_flags.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64save.h"
+
+#include "assets/objects/gameplay_keep/gameplay_keep.h"
+#include "assets/objects/object_mamenoki/object_mamenoki.h"
#define FLAGS ACTOR_FLAG_IGNORE_POINT_LIGHTS
@@ -120,9 +138,9 @@ static Gfx* sBreakDlists[] = { gCuttableShrubStalkDL, gCuttableShrubTipDL };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1600, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1600, ICHAIN_STOP),
};
void ObjBean_InitCollider(Actor* thisx, PlayState* play) {
@@ -141,12 +159,13 @@ void ObjBean_InitDynaPoly(ObjBean* this, PlayState* play, CollisionHeader* colli
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_bean.c", 374,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_obj_bean.c", 374, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -469,21 +488,22 @@ void ObjBean_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
- if (Flags_GetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 0, 6)) || (OOT_DEBUG && mREG(1) == 1)) {
+ if (Flags_GetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 0, 6)) || (DEBUG_FEATURES && mREG(1) == 1)) {
path = PARAMS_GET_U(this->dyna.actor.params, 8, 5);
if (path == 0x1F) {
- PRINTF(VT_COL(RED, WHITE));
- // "No path data?"
- PRINTF("パスデータが無い?(%s %d)(arg_data %xH)\n", "../z_obj_bean.c", 909, this->dyna.actor.params);
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("パスデータが無い?(%s %d)(arg_data %xH)\n", "No path data? (%s %d)(arg_data %xH)\n"),
+ "../z_obj_bean.c", 909, this->dyna.actor.params);
+ PRINTF_RST();
Actor_Kill(&this->dyna.actor);
return;
}
if (play->pathList[path].count < 3) {
- PRINTF(VT_COL(RED, WHITE));
- // "Incorrect number of path data"
- PRINTF("パスデータ数が不正(%s %d)(arg_data %xH)\n", "../z_obj_bean.c", 921, this->dyna.actor.params);
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("パスデータ数が不正(%s %d)(arg_data %xH)\n",
+ "Path data count is invalid (%s %d)(arg_data %xH)\n"),
+ "../z_obj_bean.c", 921, this->dyna.actor.params);
+ PRINTF_RST();
Actor_Kill(&this->dyna.actor);
return;
}
@@ -505,14 +525,14 @@ void ObjBean_Init(Actor* thisx, PlayState* play) {
return;
}
} else if ((Flags_GetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 0, 6)) != 0) ||
- (OOT_DEBUG && mREG(1) == 1)) {
+ (DEBUG_FEATURES && mREG(1) == 1)) {
ObjBean_SetupWaitForWater(this);
} else {
ObjBean_SetupWaitForBean(this);
}
this->dyna.actor.world.rot.z = this->dyna.actor.home.rot.z = this->dyna.actor.shape.rot.z = 0;
- // "Magic bean tree lift"
- PRINTF("(魔法の豆の木リフト)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF(T("(魔法の豆の木リフト)(arg_data 0x%04x)\n", "(Magic beanstalk lift)(arg_data 0x%04x)\n"),
+ this->dyna.actor.params);
}
void ObjBean_Destroy(Actor* thisx, PlayState* play) {
@@ -537,7 +557,7 @@ void ObjBean_SetupWaitForBean(ObjBean* this) {
void ObjBean_WaitForBean(ObjBean* this, PlayState* play) {
if (Actor_TalkOfferAccepted(&this->dyna.actor, play)) {
- if (func_8002F368(play) == EXCH_ITEM_MAGIC_BEAN) {
+ if (Actor_GetPlayerExchangeItemId(play) == EXCH_ITEM_MAGIC_BEAN) {
func_80B8FE00(this);
Flags_SetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 0, 6));
}
@@ -636,7 +656,7 @@ void ObjBean_WaitForWater(ObjBean* this, PlayState* play) {
ObjBean_SetupGrowWaterPhase1(this);
D_80B90E30 = this;
OnePointCutscene_Init(play, 2210, -99, &this->dyna.actor, CAM_ID_MAIN);
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
return;
}
@@ -739,7 +759,7 @@ void ObjBean_GrowWaterPhase5(ObjBean* this, PlayState* play) {
this->transformFunc(this);
if (this->timer <= 0) {
func_80B8FF50(this);
- this->dyna.actor.flags &= ~ACTOR_FLAG_4;
+ this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
}
@@ -764,7 +784,7 @@ void ObjBean_SetupFly(ObjBean* this) {
this->actionFunc = ObjBean_Fly;
ObjBean_SetDrawMode(this, BEAN_STATE_DRAW_PLANT);
this->dyna.actor.speed = 0.0f;
- this->dyna.actor.flags |= ACTOR_FLAG_4; // Never stop updating
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED; // Never stop updating
}
void ObjBean_Fly(ObjBean* this, PlayState* play) {
@@ -776,7 +796,7 @@ void ObjBean_Fly(ObjBean* this, PlayState* play) {
ObjBean_SetupPath(this, play);
ObjBean_SetupWaitForStepOff(this);
- this->dyna.actor.flags &= ~ACTOR_FLAG_4; // Never stop updating (disable)
+ this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED; // Never stop updating (disable)
mainCam = play->cameraPtrs[CAM_ID_MAIN];
if ((mainCam->setting == CAM_SET_BEAN_LOST_WOODS) || (mainCam->setting == CAM_SET_BEAN_GENERIC)) {
@@ -888,10 +908,9 @@ void ObjBean_Update(Actor* thisx, PlayState* play) {
this->dyna.actor.shape.shadowScale = this->dyna.actor.scale.x * 88.0f;
if (ObjBean_CheckForHorseTrample(this, play)) {
- PRINTF(VT_FGCOL(CYAN));
- // "Horse and bean tree lift collision"
- PRINTF("馬と豆の木リフト衝突!!!\n");
- PRINTF(VT_RST);
+ PRINTF_COLOR_CYAN();
+ PRINTF(T("馬と豆の木リフト衝突!!!\n", "Horse and beanstalk lift collide!!!\n"));
+ PRINTF_RST();
ObjBean_Break(this, play);
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
func_80B908EC(this);
diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.h b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.h
index 317db48216..42ba39261c 100644
--- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.h
+++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.h
@@ -2,11 +2,11 @@
#define Z_OBJ_BEAN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjBean;
-typedef void (*ObjBeanActionFunc)(struct ObjBean*, PlayState*);
+typedef void (*ObjBeanActionFunc)(struct ObjBean*, struct PlayState*);
typedef void (*ObjBeanTransformFunc)(struct ObjBean*);
typedef struct ObjBean {
diff --git a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c
index cb7cba62c0..8f24b7e647 100644
--- a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c
+++ b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c
@@ -7,6 +7,10 @@
#include "z_obj_blockstop.h"
#include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#define FLAGS 0
void ObjBlockstop_Init(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.h b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.h
index f6ff149e9d..e0159e0f97 100644
--- a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.h
+++ b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.h
@@ -2,7 +2,7 @@
#define Z_OBJ_BLOCKSTOP_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjBlockstop;
diff --git a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c
index bf6a5ebf4f..c6d7b1da3f 100644
--- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c
+++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c
@@ -6,6 +6,16 @@
#include "z_obj_bombiwa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_bombiwa/object_bombiwa.h"
#define FLAGS 0
@@ -54,9 +64,9 @@ static CollisionCheckInfoInit sColChkInfoInit = { 0, 12, 60, MASS_IMMOVABLE };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 350, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 350, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
static s16 sEffectScales[] = {
diff --git a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.h b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.h
index 33597276b0..9c5c38d127 100644
--- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.h
+++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.h
@@ -2,7 +2,7 @@
#define Z_OBJ_BOMBIWA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjBombiwa;
diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c
index 0198ddfc8f..d3affc90a9 100644
--- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c
+++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c
@@ -6,6 +6,17 @@
#include "z_obj_comb.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "sys_matrix.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0
@@ -61,9 +72,9 @@ static ColliderJntSphInit sJntSphInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 900, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1100, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 100, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 900, ICHAIN_STOP),
};
void ObjComb_Break(ObjComb* this, PlayState* play) {
@@ -151,7 +162,7 @@ void ObjComb_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
ObjComb_SetupWait(this);
}
diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h
index 3a6ce86413..acda97f16d 100644
--- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h
+++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h
@@ -2,17 +2,17 @@
#define Z_OBJ_COMB_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjComb;
-typedef void (*ObjCombActionFunc)(struct ObjComb*, PlayState*);
+typedef void (*ObjCombActionFunc)(struct ObjComb*, struct PlayState*);
typedef struct ObjComb {
/* 0x0000 */ Actor actor;
/* 0x014C */ ObjCombActionFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
- /* 0x0170 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0170 */ ColliderJntSphElement colliderElements[1];
/* 0x01B0 */ s16 unk_1B0;
/* 0x01B2 */ s16 unk_1B2;
} ObjComb; // size = 0x01B4
diff --git a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c
index 3a0d603aae..2c77570a41 100644
--- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c
+++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c
@@ -5,6 +5,14 @@
*/
#include "z_obj_dekujr.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/object_dekujr/object_dekujr.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
diff --git a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.h b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.h
index 88818776a2..68b483f8dc 100644
--- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.h
+++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.h
@@ -2,7 +2,7 @@
#define Z_OBJ_DEKUJR_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjDekujr;
diff --git a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c
index 4377ac6e26..2163114cd2 100644
--- a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c
+++ b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c
@@ -5,6 +5,14 @@
*/
#include "z_obj_elevator.h"
+
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_d_elevator/object_d_elevator.h"
#define FLAGS 0
@@ -32,9 +40,9 @@ ActorProfile Obj_Elevator_Profile = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 600, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 2000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 600, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 2000, ICHAIN_STOP),
};
static f32 sScales[] = { 0.1f, 0.05f };
@@ -51,12 +59,13 @@ void func_80B92B08(ObjElevator* this, PlayState* play, CollisionHeader* collisio
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_elevator.c", 136,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_obj_elevator.c", 136, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
diff --git a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.h b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.h
index e77d04a9ae..e6b8d4b6d8 100644
--- a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.h
+++ b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.h
@@ -2,11 +2,11 @@
#define Z_OBJ_ELEVATOR_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjElevator;
-typedef void (*ObjElevatorActionFunc)(struct ObjElevator*, PlayState*);
+typedef void (*ObjElevatorActionFunc)(struct ObjElevator*, struct PlayState*);
typedef struct ObjElevator {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c
index ba43d40a46..39d6de7d65 100644
--- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c
+++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c
@@ -5,6 +5,19 @@
*/
#include "z_obj_hamishi.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "rand.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0
@@ -54,9 +67,9 @@ static s16 sEffectScales[] = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 250, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 250, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 500, ICHAIN_STOP),
};
void ObjHamishi_InitCollision(Actor* thisx, PlayState* play) {
@@ -140,7 +153,7 @@ void ObjHamishi_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
if (play->csCtx.state != CS_STATE_IDLE) {
- this->actor.uncullZoneForward += 1000.0f;
+ this->actor.cullingVolumeDistance += 1000.0f;
}
if (this->actor.shape.rot.y == 0) {
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.home.rot.y = Rand_ZeroFloat(65536.0f);
diff --git a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.h b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.h
index a897177f64..8a2256bf04 100644
--- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.h
+++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.h
@@ -2,7 +2,7 @@
#define Z_OBJ_HAMISHI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjHamishi;
diff --git a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c
index 11b671c4b4..f1f8000063 100644
--- a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c
+++ b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c
@@ -5,6 +5,11 @@
*/
#include "z_obj_hana.h"
+
+#include "ichain.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0
@@ -64,9 +69,9 @@ static HanaParams sHanaParams[] = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 900, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 60, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 900, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 60, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 800, ICHAIN_STOP),
};
void ObjHana_Init(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.h b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.h
index 7fdd3bfa89..69c08b4cb6 100644
--- a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.h
+++ b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.h
@@ -2,7 +2,7 @@
#define Z_OBJ_HANA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjHana;
diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c
index 04f29dff57..c057c6b875 100644
--- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c
+++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c
@@ -5,6 +5,17 @@
*/
#include "z_obj_hsblock.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "regs.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/object_d_hsblock/object_d_hsblock.h"
#define FLAGS 0
@@ -37,9 +48,9 @@ static f32 D_80B940C0[] = { 85.0f, 85.0f, 0.0f };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 2000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 2000, ICHAIN_STOP),
};
static CollisionHeader* sCollisionHeaders[] = { &gHookshotPostCol, &gHookshotPostCol, &gHookshotTargetCol };
@@ -52,20 +63,21 @@ void ObjHsblock_SetupAction(ObjHsblock* this, ObjHsblockActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
-void func_80B93B68(ObjHsblock* this, PlayState* play, CollisionHeader* collision, s32 moveFlags) {
+void func_80B93B68(ObjHsblock* this, PlayState* play, CollisionHeader* collision, s32 transformFlags) {
s32 pad;
CollisionHeader* colHeader = NULL;
- DynaPolyActor_Init(&this->dyna, moveFlags);
+ DynaPolyActor_Init(&this->dyna, transformFlags);
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_hsblock.c", 163,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_obj_hsblock.c", 163, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -98,7 +110,7 @@ void ObjHsblock_Init(Actor* thisx, PlayState* play) {
}
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
mREG(13) = 255;
mREG(14) = 255;
mREG(15) = 255;
@@ -116,7 +128,7 @@ void func_80B93D90(ObjHsblock* this) {
}
void func_80B93DB0(ObjHsblock* this) {
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 105.0f;
ObjHsblock_SetupAction(this, func_80B93DF4);
}
@@ -137,7 +149,7 @@ void func_80B93E5C(ObjHsblock* this, PlayState* play) {
this->dyna.actor.velocity.y, 0.3f)) < 0.001f) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y;
func_80B93D90(this);
- this->dyna.actor.flags &= ~ACTOR_FLAG_4;
+ this->dyna.actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
}
@@ -163,7 +175,7 @@ void ObjHsblock_Draw(Actor* thisx, PlayState* play) {
if (play->sceneId == SCENE_FIRE_TEMPLE) {
color = &sFireTempleColor;
} else {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
defaultColor.r = mREG(13);
defaultColor.g = mREG(14);
defaultColor.b = mREG(15);
diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h
index 6548ca9b97..299ba7d3d6 100644
--- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h
+++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h
@@ -2,11 +2,11 @@
#define Z_OBJ_HSBLOCK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjHsblock;
-typedef void (*ObjHsblockActionFunc)(struct ObjHsblock*, PlayState*);
+typedef void (*ObjHsblockActionFunc)(struct ObjHsblock*, struct PlayState*);
typedef struct ObjHsblock {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c
index 18b90b5584..71ff43d277 100644
--- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c
+++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c
@@ -5,9 +5,20 @@
*/
#include "z_obj_ice_poly.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void ObjIcePoly_Init(Actor* thisx, PlayState* play);
void ObjIcePoly_Destroy(Actor* thisx, PlayState* play);
@@ -85,18 +96,18 @@ void ObjIcePoly_Init(Actor* thisx, PlayState* play) {
}
Actor_SetScale(thisx, sScale[thisx->params]);
thisx->world.pos.y = sOffsetY[thisx->params] + thisx->home.pos.y;
- Collider_InitCylinder(play, &this->colliderIce);
- Collider_SetCylinder(play, &this->colliderIce, thisx, &sCylinderInitIce);
- Collider_InitCylinder(play, &this->colliderHard);
- Collider_SetCylinder(play, &this->colliderHard, thisx, &sCylinderInitHard);
- Collider_UpdateCylinder(thisx, &this->colliderIce);
- Collider_UpdateCylinder(thisx, &this->colliderHard);
+ Collider_InitCylinder(play, &this->iceCollider);
+ Collider_SetCylinder(play, &this->iceCollider, thisx, &sCylinderInitIce);
+ Collider_InitCylinder(play, &this->hardCollider);
+ Collider_SetCylinder(play, &this->hardCollider, thisx, &sCylinderInitHard);
+ Collider_UpdateCylinder(thisx, &this->iceCollider);
+ Collider_UpdateCylinder(thisx, &this->hardCollider);
thisx->colChkInfo.mass = MASS_IMMOVABLE;
this->alpha = 255;
- this->colliderIce.dim.radius *= thisx->scale.x;
- this->colliderIce.dim.height *= thisx->scale.y;
- this->colliderHard.dim.radius *= thisx->scale.x;
- this->colliderHard.dim.height *= thisx->scale.y;
+ this->iceCollider.dim.radius *= thisx->scale.x;
+ this->iceCollider.dim.height *= thisx->scale.y;
+ this->hardCollider.dim.radius *= thisx->scale.x;
+ this->hardCollider.dim.height *= thisx->scale.y;
Actor_SetFocus(thisx, thisx->scale.y * 30.0f);
this->actionFunc = ObjIcePoly_Idle;
}
@@ -106,8 +117,8 @@ void ObjIcePoly_Destroy(Actor* thisx, PlayState* play) {
ObjIcePoly* this = (ObjIcePoly*)thisx;
if ((this->actor.params >= 0) && (this->actor.params < 3)) {
- Collider_DestroyCylinder(play, &this->colliderIce);
- Collider_DestroyCylinder(play, &this->colliderHard);
+ Collider_DestroyCylinder(play, &this->iceCollider);
+ Collider_DestroyCylinder(play, &this->hardCollider);
}
}
@@ -116,17 +127,17 @@ void ObjIcePoly_Idle(ObjIcePoly* this, PlayState* play) {
s32 pad;
Vec3f pos;
- if (this->colliderIce.base.acFlags & AC_HIT) {
- this->meltTimer = -this->colliderIce.elem.acHitElem->atDmgInfo.damage;
+ if (this->iceCollider.base.acFlags & AC_HIT) {
+ this->meltTimer = -this->iceCollider.elem.acHitElem->atDmgInfo.damage;
this->actor.focus.rot.y = this->actor.yawTowardsPlayer;
OnePointCutscene_Init(play, 5120, 40, &this->actor, CAM_ID_MAIN);
this->actionFunc = ObjIcePoly_Melt;
} else if (this->actor.parent != NULL) {
this->actor.parent->freezeTimer = 40;
- CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderIce.base);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderIce.base);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderIce.base);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderHard.base);
+ CollisionCheck_SetAT(play, &play->colChkCtx, &this->iceCollider.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->iceCollider.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->iceCollider.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->hardCollider.base);
} else {
Actor_Kill(&this->actor);
}
diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h
index 8ebbe8d128..c6a56d16f1 100644
--- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h
+++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h
@@ -2,11 +2,11 @@
#define Z_OBJ_ICE_POLY_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjIcePoly;
-typedef void (*ObjIcePolyActionFunc)(struct ObjIcePoly*, PlayState*);
+typedef void (*ObjIcePolyActionFunc)(struct ObjIcePoly*, struct PlayState*);
typedef struct ObjIcePoly {
/* 0x0000 */ Actor actor;
@@ -14,8 +14,8 @@ typedef struct ObjIcePoly {
/* 0x0150 */ u8 alpha;
/* 0x0151 */ u8 unk_151; // Unused. Probably intended to be a switch flag.
/* 0x0152 */ s16 meltTimer;
- /* 0x0154 */ ColliderCylinder colliderIce;
- /* 0x01A0 */ ColliderCylinder colliderHard;
+ /* 0x0154 */ ColliderCylinder iceCollider;
+ /* 0x01A0 */ ColliderCylinder hardCollider;
} ObjIcePoly; // size = 0x01EC
#endif
diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
index f3b101e48e..8501c29f5b 100644
--- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
+++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
@@ -5,10 +5,22 @@
*/
#include "z_obj_kibako.h"
-#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_26)
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_CAN_PRESS_SWITCHES)
void ObjKibako_Init(Actor* thisx, PlayState* play);
void ObjKibako_Destroy(Actor* thisx, PlayState* play2);
@@ -58,9 +70,9 @@ static CollisionCheckInfoInit sCCInfoInit = { 0, 12, 60, MASS_HEAVY };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 60, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 60, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void ObjKibako_SpawnCollectible(ObjKibako* this, PlayState* play) {
@@ -97,8 +109,8 @@ void ObjKibako_Init(Actor* thisx, PlayState* play) {
ObjKibako_InitCollider(&this->actor, play);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sCCInfoInit);
ObjKibako_SetupIdle(this);
- // "wooden box"
- PRINTF("(dungeon keep 木箱)(arg_data 0x%04x)\n", this->actor.params);
+ PRINTF(T("(dungeon keep 木箱)(arg_data 0x%04x)\n", "(dungeon keep wooden box)(arg_data 0x%04x)\n"),
+ this->actor.params);
}
void ObjKibako_Destroy(Actor* thisx, PlayState* play2) {
diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.h b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.h
index 9378a51ce7..7538b53705 100644
--- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.h
+++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.h
@@ -2,11 +2,11 @@
#define Z_OBJ_KIBAKO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjKibako;
-typedef void (*ObjKibakoActionFunc)(struct ObjKibako*, PlayState*);
+typedef void (*ObjKibakoActionFunc)(struct ObjKibako*, struct PlayState*);
typedef struct ObjKibako {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c
index 58e578c059..9233f00c7a 100644
--- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c
+++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c
@@ -5,9 +5,20 @@
*/
#include "z_obj_kibako2.h"
-#include "assets/objects/object_kibako2/object_kibako2.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
+#include "assets/objects/object_kibako2/object_kibako2.h"
+
#define FLAGS 0
void ObjKibako2_Init(Actor* thisx, PlayState* play);
@@ -51,9 +62,9 @@ static ColliderCylinderInit sCylinderInit = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 3000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 3000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void ObjKibako2_InitCollider(Actor* thisx, PlayState* play) {
@@ -130,9 +141,8 @@ void ObjKibako2_Init(Actor* thisx, PlayState* play) {
this->actionFunc = ObjKibako2_Idle;
this->dyna.actor.home.rot.z = this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z =
this->dyna.actor.world.rot.x = this->dyna.actor.shape.rot.x = 0;
- // "Wooden box (stationary)"
- PRINTF("木箱(据置)(arg %04xH)(item %04xH %d)\n", this->dyna.actor.params, this->collectibleFlag,
- this->dyna.actor.home.rot.x);
+ PRINTF(T("木箱(据置)(arg %04xH)(item %04xH %d)\n", "Wooden box (stationary)(arg %04xH)(item %04xH %d)\n"),
+ this->dyna.actor.params, this->collectibleFlag, this->dyna.actor.home.rot.x);
}
void ObjKibako2_Destroy(Actor* thisx, PlayState* play) {
@@ -147,7 +157,7 @@ void ObjKibako2_Idle(ObjKibako2* this, PlayState* play) {
func_80033684(play, &this->dyna.actor) != NULL) {
ObjKibako2_Break(this, play);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK);
- this->dyna.actor.flags |= ACTOR_FLAG_4;
+ this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
this->dyna.actor.draw = NULL;
this->actionFunc = ObjKibako2_Kill;
diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.h b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.h
index 73f0e90b67..177ef0b04c 100644
--- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.h
+++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.h
@@ -2,11 +2,11 @@
#define Z_OBJ_KIBAKO2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjKibako2;
-typedef void (*ObjKibako2ActionFunc)(struct ObjKibako2*, PlayState*);
+typedef void (*ObjKibako2ActionFunc)(struct ObjKibako2*, struct PlayState*);
typedef struct ObjKibako2 {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c
index 23d798d6fe..0a5866d1d1 100644
--- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c
+++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c
@@ -5,11 +5,22 @@
*/
#include "z_obj_lift.h"
-#include "assets/objects/object_d_lift/object_d_lift.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
-#include "quake.h"
-#define FLAGS ACTOR_FLAG_4
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "ichain.h"
+#include "printf.h"
+#include "quake.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
+#include "assets/objects/object_d_lift/object_d_lift.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void ObjLift_Init(Actor* thisx, PlayState* play);
void ObjLift_Destroy(Actor* thisx, PlayState* play);
@@ -49,9 +60,9 @@ static ObjLiftFramgentScale sFragmentScales[] = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32_DIV1000(gravity, -600, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(minVelocityY, -15000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 2000, ICHAIN_STOP),
+ ICHAIN_F32_DIV1000(gravity, -600, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(minVelocityY, -15000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE), ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 2000, ICHAIN_STOP),
};
static f32 sScales[] = { 0.1f, 0.05f };
@@ -69,12 +80,13 @@ void ObjLift_InitDynaPoly(ObjLift* this, PlayState* play, CollisionHeader* colli
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_lift.c", 188,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_obj_lift.c", 188, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h
index 6ca27dddac..e3f217b930 100644
--- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h
+++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h
@@ -2,11 +2,11 @@
#define Z_OBJ_LIFT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjLift;
-typedef void (*ObjLiftActionFunc)(struct ObjLift*, PlayState*);
+typedef void (*ObjLiftActionFunc)(struct ObjLift*, struct PlayState*);
typedef struct ObjLift {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
index 6f723d292a..05fe7a206f 100644
--- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
+++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
@@ -5,11 +5,26 @@
*/
#include "z_obj_lightswitch.h"
-#include "terminal.h"
#include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_lightswitch/object_lightswitch.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
typedef enum FaceTextureIndex {
/* 0x00 */ FACE_EYES_CLOSED,
@@ -47,7 +62,7 @@ ActorProfile Obj_Lightswitch_Profile = {
/**/ ObjLightswitch_Draw,
};
-static ColliderJntSphElementInit sColliderJntSphElementInit[] = {
+static ColliderJntSphElementInit sColliderJntSphElementsInit[] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -70,7 +85,7 @@ static ColliderJntSphInit sColliderJntSphInit = {
COLSHAPE_JNTSPH,
},
1,
- sColliderJntSphElementInit,
+ sColliderJntSphElementsInit,
};
static CollisionCheckInfoInit sColChkInfoInit = { 0, 12, 60, MASS_IMMOVABLE };
@@ -83,16 +98,16 @@ static Vec3f D_80B97F74 = { 0.0f, 0.0f, 0.0f };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1000, ICHAIN_STOP),
};
void ObjLightswitch_InitCollider(ObjLightswitch* this, PlayState* play) {
s32 pad;
Collider_InitJntSph(play, &this->collider);
- Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderItems);
+ Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderElements);
Matrix_SetTranslateRotateYXZ(this->actor.world.pos.x,
this->actor.world.pos.y + (this->actor.shape.yOffset * this->actor.scale.y),
this->actor.world.pos.z, &this->actor.shape.rot);
@@ -184,14 +199,15 @@ void ObjLightswitch_Init(Actor* thisx, PlayState* play) {
this->actor.shape.rot.z = 0;
this->actor.world.rot.x = this->actor.home.rot.x = this->actor.shape.rot.x;
this->actor.world.rot.z = this->actor.home.rot.z = this->actor.shape.rot.z;
- this->actor.flags |= ACTOR_FLAG_5;
+ this->actor.flags |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_OBJ_OSHIHIKI, this->actor.home.pos.x,
this->actor.home.pos.y, this->actor.home.pos.z, 0, this->actor.home.rot.y, 0,
(0xFF << 8) | PUSHBLOCK_SMALL_START_ON) == NULL) {
- PRINTF(VT_COL(RED, WHITE));
- // "Push-pull block occurrence failure"
- PRINTF("押引ブロック発生失敗(%s %d)(arg_data 0x%04x)\n", "../z_obj_lightswitch.c", 452, this->actor.params);
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("押引ブロック発生失敗(%s %d)(arg_data 0x%04x)\n",
+ "Push/pull block failure(%s %d)(arg_data 0x%04x)\n"),
+ "../z_obj_lightswitch.c", 452, this->actor.params);
+ PRINTF_RST();
removeSelf = true;
}
}
@@ -200,8 +216,7 @@ void ObjLightswitch_Init(Actor* thisx, PlayState* play) {
if (removeSelf) {
Actor_Kill(&this->actor);
}
- // "Light switch"
- PRINTF("(光スイッチ)(arg_data 0x%04x)\n", this->actor.params);
+ PRINTF(T("(光スイッチ)(arg_data 0x%04x)\n", "(Light switch)(arg_data 0x%04x)\n"), this->actor.params);
}
void ObjLightswitch_Destroy(Actor* thisx, PlayState* play2) {
diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h
index 78af71ed99..7f0834a240 100644
--- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h
+++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h
@@ -2,11 +2,11 @@
#define Z_OBJ_LIGHTSWITCH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjLightswitch;
-typedef void (*ObjLightswitchActionFunc)(struct ObjLightswitch*, PlayState*);
+typedef void (*ObjLightswitchActionFunc)(struct ObjLightswitch*, struct PlayState*);
typedef enum ObjLightswitch_Type {
/* 0 */ OBJLIGHTSWITCH_TYPE_STAY_ON, // doesn't turn off unless the switch flag is cleared some other way
@@ -19,7 +19,7 @@ typedef struct ObjLightswitch {
/* 0x0000 */ Actor actor;
/* 0x014C */ ObjLightswitchActionFunc actionFunc;
/* 0x0150 */ ColliderJntSph collider;
- /* 0x0170 */ ColliderJntSphElement colliderItems[1];
+ /* 0x0170 */ ColliderJntSphElement colliderElements[1];
/* 0x01B0 */ s16 timer; // collision-related threshold and controls animation/logic when turning on/off
/* 0x01B2 */ s16 toggleDelay; // timer ticking down used for delaying tuning on/off or disappearing, can be bypassed
/* 0x01B4 */ s16 faceTextureIndex; // texture used by the center part of the sun
diff --git a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c
index 86db9ebfe6..cc7651b6b4 100644
--- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c
+++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c
@@ -5,9 +5,14 @@
*/
#include "z_obj_makekinsuta.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "printf.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void ObjMakekinsuta_Init(Actor* thisx, PlayState* play);
void ObjMakekinsuta_Update(Actor* thisx, PlayState* play);
@@ -31,15 +36,14 @@ void ObjMakekinsuta_Init(Actor* thisx, PlayState* play) {
ObjMakekinsuta* this = (ObjMakekinsuta*)thisx;
if (PARAMS_GET_NOSHIFT(this->actor.params, 13, 2) == 0x4000) {
- PRINTF(VT_FGCOL(BLUE));
- // "Gold Star Enemy(arg_data %x)"
- PRINTF("金スタ発生敵(arg_data %x)\n", this->actor.params);
- PRINTF(VT_RST);
+ PRINTF_COLOR_BLUE();
+ PRINTF(T("金スタ発生敵(arg_data %x)\n", "Gold Star Enemy(arg_data %x)\n"), this->actor.params);
+ PRINTF_RST();
} else {
- PRINTF(VT_COL(YELLOW, BLACK));
- // "Invalid Argument (arg_data %x)(%s %d)"
- PRINTF("引数不正 (arg_data %x)(%s %d)\n", this->actor.params, "../z_obj_makekinsuta.c", 119);
- PRINTF(VT_RST);
+ PRINTF_COLOR_WARNING();
+ PRINTF(T("引数不正 (arg_data %x)(%s %d)\n", "Invalid Argument (arg_data %x)(%s %d)\n"), this->actor.params,
+ "../z_obj_makekinsuta.c", 119);
+ PRINTF_RST();
}
this->actionFunc = func_80B98320;
}
diff --git a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h
index 5cd76798c1..0ac9b7ab84 100644
--- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h
+++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h
@@ -2,11 +2,11 @@
#define Z_OBJ_MAKEKINSUTA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjMakekinsuta;
-typedef void (*ObjMakekinsutaActionFunc)(struct ObjMakekinsuta*, PlayState*);
+typedef void (*ObjMakekinsutaActionFunc)(struct ObjMakekinsuta*, struct PlayState*);
typedef struct ObjMakekinsuta {
/* 0x000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c
index eeaf2bdd60..ee2e8801c5 100644
--- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c
+++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c
@@ -6,9 +6,17 @@
#include "z_obj_makeoshihiki.h"
#include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_5
+#include "printf.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
+#define FLAGS ACTOR_FLAG_DRAW_CULLING_DISABLED
void ObjMakeoshihiki_Init(Actor* thisx, PlayState* play);
void ObjMakeoshihiki_Draw(Actor* thisx, PlayState* play);
@@ -71,10 +79,10 @@ void ObjMakeoshihiki_Init(Actor* thisx, PlayState* play) {
if (Actor_SpawnAsChild(&play->actorCtx, thisx, play, ACTOR_OBJ_OSHIHIKI, spawnPos->x, spawnPos->y, spawnPos->z, 0,
block->rotY, 0, ((block->color << 6) & 0xC0) | (block->type & 0xF) | 0xFF00) == NULL) {
- // "Push-pull block failure"
- PRINTF(VT_COL(RED, WHITE));
- PRINTF("Error : 押し引きブロック発生失敗(%s %d)\n", "../z_obj_makeoshihiki.c", 194);
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("Error : 押し引きブロック発生失敗(%s %d)\n", "Error : Push/pull block failure (%s %d)\n"),
+ "../z_obj_makeoshihiki.c", 194);
+ PRINTF_RST();
Actor_Kill(thisx);
return;
}
diff --git a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.h b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.h
index 16dc3ba470..84938f578a 100644
--- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.h
+++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.h
@@ -2,7 +2,7 @@
#define Z_OBJ_MAKEOSHIHIKI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjMakeoshihiki;
diff --git a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c
index d41108174a..126e2c42ec 100644
--- a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c
+++ b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c
@@ -7,6 +7,12 @@
#include "z_obj_mure.h"
#include "overlays/actors/ovl_En_Insect/z_en_insect.h"
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "printf.h"
+#include "translation.h"
+#include "z64play.h"
+
#define FLAGS 0
void ObjMure_Init(Actor* thisx, PlayState* play);
@@ -54,9 +60,9 @@ static s16 sSpawnActorIds[] = { ACTOR_EN_KUSA, 0, ACTOR_EN_FISH, ACTOR_EN_INSECT
static s16 sSpawnParams[] = { 0, 2, -1, INSECT_TYPE_PERMANENT, -1 };
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 200, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 200, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1200, ICHAIN_STOP),
};
s32 ObjMure_SetCullingImpl(Actor* thisx, PlayState* play) {
@@ -71,9 +77,9 @@ s32 ObjMure_SetCullingImpl(Actor* thisx, PlayState* play) {
result = true;
break;
default:
- // "Error : Culling is not set.(%s %d)(arg_data 0x%04x)"
- PRINTF("Error : カリングの設定がされていません。(%s %d)(arg_data 0x%04x)\n", "../z_obj_mure.c", 204,
- this->actor.params);
+ PRINTF(T("Error : カリングの設定がされていません。(%s %d)(arg_data 0x%04x)\n",
+ "Error : Culling is not set. (%s %d)(arg_data 0x%04x)\n"),
+ "../z_obj_mure.c", 204, this->actor.params);
return false;
}
return result;
@@ -95,11 +101,13 @@ void ObjMure_Init(Actor* thisx, PlayState* play) {
this->type = PARAMS_GET_U(thisx->params, 0, 5);
if (this->ptn >= 4) {
- PRINTF("Error 群れな敵 (%s %d)(arg_data 0x%04x)\n", "../z_obj_mure.c", 237, thisx->params);
+ PRINTF(T("Error 群れな敵 (%s %d)(arg_data 0x%04x)\n", "Error Swarm of enemies (%s %d)(arg_data 0x%04x)\n"),
+ "../z_obj_mure.c", 237, thisx->params);
Actor_Kill(&this->actor);
return;
} else if (this->type >= 5) {
- PRINTF("Error 群れな敵 (%s %d)(arg_data 0x%04x)\n", "../z_obj_mure.c", 245, thisx->params);
+ PRINTF(T("Error 群れな敵 (%s %d)(arg_data 0x%04x)\n", "Error Swarm of enemies (%s %d)(arg_data 0x%04x)\n"),
+ "../z_obj_mure.c", 245, thisx->params);
Actor_Kill(&this->actor);
return;
} else if (!ObjMure_SetCulling(thisx, play)) {
@@ -107,12 +115,15 @@ void ObjMure_Init(Actor* thisx, PlayState* play) {
return;
}
this->actionFunc = ObjMure_InitialAction;
- PRINTF("群れな敵 (arg_data 0x%04x)(chNum(%d) ptn(%d) svNum(%d) type(%d))\n", thisx->params, this->chNum, this->ptn,
- this->svNum, this->type);
+ PRINTF(T("群れな敵 (arg_data 0x%04x)(chNum(%d) ptn(%d) svNum(%d) type(%d))\n",
+ "Swarm of enemies (arg_data 0x%04x)(chNum(%d) ptn(%d) svNum(%d) type(%d))\n"),
+ thisx->params, this->chNum, this->ptn, this->svNum, this->type);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (ObjMure_GetMaxChildSpawns(this) <= 0) {
- PRINTF("Warning : 個体数が設定されていません(%s %d)(arg_data 0x%04x)\n", "../z_obj_mure.c", 268, thisx->params);
+ PRINTF(T("Warning : 個体数が設定されていません(%s %d)(arg_data 0x%04x)\n",
+ "Warning : The number of individuals is not set(%s %d)(arg_data 0x%04x)\n"),
+ "../z_obj_mure.c", 268, thisx->params);
}
#endif
}
@@ -128,9 +139,9 @@ s32 ObjMure_GetMaxChildSpawns(ObjMure* this) {
}
void ObjMure_GetSpawnPos(Vec3f* outPos, Vec3f* inPos, s32 ptn, s32 idx) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (ptn >= 4) {
- PRINTF("おかしなの (%s %d)\n", "../z_obj_mure.c", 307);
+ PRINTF(T("おかしなの (%s %d)\n", "That's strange (%s %d)\n"), "../z_obj_mure.c", 307);
}
#endif
@@ -145,10 +156,11 @@ void ObjMure_SpawnActors0(ObjMure* this, PlayState* play) {
s32 maxChildren = ObjMure_GetMaxChildSpawns(this);
for (i = 0; i < maxChildren; i++) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->children[i] != NULL) {
- // "Error: I already have a child(%s %d)(arg_data 0x%04x)"
- PRINTF("Error : 既に子供がいる(%s %d)(arg_data 0x%04x)\n", "../z_obj_mure.c", 333, actor->params);
+ PRINTF(T("Error : 既に子供がいる(%s %d)(arg_data 0x%04x)\n",
+ "Error : I already have a child (%s %d)(arg_data 0x%04x)\n"),
+ "../z_obj_mure.c", 333, actor->params);
}
#endif
@@ -161,10 +173,11 @@ void ObjMure_SpawnActors0(ObjMure* this, PlayState* play) {
Actor_Spawn(&play->actorCtx, play, sSpawnActorIds[this->type], pos.x, pos.y, pos.z,
actor->world.rot.x, actor->world.rot.y, actor->world.rot.z, sSpawnParams[this->type]);
if (this->children[i] != NULL) {
- this->children[i]->flags |= ACTOR_FLAG_ENKUSA_CUT;
+ this->children[i]->flags |= ACTOR_FLAG_GRASS_DESTROYED;
this->children[i]->room = actor->room;
} else {
- PRINTF("warning 発生失敗 (%s %d)\n", "../z_obj_mure.c", 359);
+ PRINTF(T("warning 発生失敗 (%s %d)\n", "warning failed to occur (%s %d)\n"), "../z_obj_mure.c",
+ 359);
}
break;
default:
@@ -175,7 +188,8 @@ void ObjMure_SpawnActors0(ObjMure* this, PlayState* play) {
if (this->children[i] != NULL) {
this->children[i]->room = actor->room;
} else {
- PRINTF("warning 発生失敗 (%s %d)\n", "../z_obj_mure.c", 382);
+ PRINTF(T("warning 発生失敗 (%s %d)\n", "warning failed to occur (%s %d)\n"), "../z_obj_mure.c",
+ 382);
}
break;
}
@@ -190,9 +204,11 @@ void ObjMure_SpawnActors1(ObjMure* this, PlayState* play2) {
s32 i;
for (i = 0; i < maxChildren; i++) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->children[i] != NULL) {
- PRINTF("Error : 既に子供がいる(%s %d)(arg_data 0x%04x)\n", "../z_obj_mure.c", 407, actor->params);
+ PRINTF(T("Error : 既に子供がいる(%s %d)(arg_data 0x%04x)\n",
+ "Error : I already have a child (%s %d)(arg_data 0x%04x)\n"),
+ "../z_obj_mure.c", 407, actor->params);
}
#endif
@@ -205,7 +221,7 @@ void ObjMure_SpawnActors1(ObjMure* this, PlayState* play2) {
this->children[i]->room = actor->room;
} else {
this->childrenStates[i] = OBJMURE_CHILD_STATE_1;
- PRINTF("warning 発生失敗 (%s %d)\n", "../z_obj_mure.c", 438);
+ PRINTF(T("warning 発生失敗 (%s %d)\n", "warning failed to occur (%s %d)\n"), "../z_obj_mure.c", 438);
}
}
}
@@ -262,7 +278,7 @@ void ObjMure_CheckChildren(ObjMure* this, PlayState* play) {
if (this->children[i] != NULL) {
if (this->childrenStates[i] == OBJMURE_CHILD_STATE_0) {
if (this->children[i]->update != NULL) {
- if (this->children[i]->flags & ACTOR_FLAG_ENKUSA_CUT) {
+ if (this->children[i]->flags & ACTOR_FLAG_GRASS_DESTROYED) {
this->childrenStates[i] = OBJMURE_CHILD_STATE_2;
}
} else {
@@ -284,7 +300,7 @@ void ObjMure_InitialAction(ObjMure* this, PlayState* play) {
void ObjMure_CulledState(ObjMure* this, PlayState* play) {
if (fabsf(this->actor.projectedPos.z) < sZClip[this->type]) {
this->actionFunc = ObjMure_ActiveState;
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
ObjMure_SpawnActors(this, play);
}
}
@@ -407,7 +423,7 @@ void ObjMure_ActiveState(ObjMure* this, PlayState* play) {
ObjMure_CheckChildren(this, play);
if (sZClip[this->type] + 40.0f <= fabsf(this->actor.projectedPos.z)) {
this->actionFunc = ObjMure_CulledState;
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
ObjMure_KillActors(this, play);
} else if (sTypeGroupBehaviorFunc[this->type] != NULL) {
sTypeGroupBehaviorFunc[this->type](this, play);
diff --git a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.h b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.h
index 386c6ed0d8..20cf667daa 100644
--- a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.h
+++ b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.h
@@ -2,11 +2,11 @@
#define Z_OBJ_MURE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjMure;
-typedef void (*ObjMureActionFunc)(struct ObjMure*, PlayState*);
+typedef void (*ObjMureActionFunc)(struct ObjMure*, struct PlayState*);
#define OBJMURE_MAX_SPAWNS 15
diff --git a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c
index 7539520b3d..eca8b0d933 100644
--- a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c
+++ b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c
@@ -6,6 +6,13 @@
#include "z_obj_mure2.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sys_math3d.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#define FLAGS 0
typedef void (*ObjMure2SetPosFunc)(Vec3f* vec, ObjMure2* this);
@@ -111,8 +118,9 @@ void ObjMure2_SpawnActors(ObjMure2* this, PlayState* play) {
for (i = 0; i < D_80B9A818[actorNum]; i++) {
if (this->actorSpawnPtrList[i] != NULL) {
- // "Warning : I already have a child (%s %d)(arg_data 0x%04x)"
- PRINTF("Warning : 既に子供がいる(%s %d)(arg_data 0x%04x)\n", "../z_obj_mure2.c", 269, this->actor.params);
+ PRINTF(T("Warning : 既に子供がいる(%s %d)(arg_data 0x%04x)\n",
+ "Warning : I already have a child (%s %d)(arg_data 0x%04x)\n"),
+ "../z_obj_mure2.c", 269, this->actor.params);
continue;
}
@@ -159,9 +167,9 @@ void func_80B9A534(ObjMure2* this) {
}
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 2100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 100, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 2100, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 100, ICHAIN_STOP),
};
void ObjMure2_Init(Actor* thisx, PlayState* play) {
@@ -169,7 +177,7 @@ void ObjMure2_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
if (play->csCtx.state != CS_STATE_IDLE) {
- this->actor.uncullZoneForward += 1200.0f;
+ this->actor.cullingVolumeDistance += 1200.0f;
}
ObjMure2_SetupWait(this);
}
@@ -189,7 +197,7 @@ void func_80B9A658(ObjMure2* this) {
void func_80B9A668(ObjMure2* this, PlayState* play) {
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) <
(sDistSquared1[PARAMS_GET_U(this->actor.params, 0, 2)] * this->unk_184)) {
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
ObjMure2_SpawnActors(this, play);
func_80B9A6E8(this);
}
@@ -203,7 +211,7 @@ void func_80B9A6F8(ObjMure2* this, PlayState* play) {
func_80B9A534(this);
if ((sDistSquared2[PARAMS_GET_U(this->actor.params, 0, 2)] * this->unk_184) <=
Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z)) {
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
ObjMure2_CleanupAndDie(this, play);
func_80B9A658(this);
}
diff --git a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.h b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.h
index a197e9f7b0..8643d477e1 100644
--- a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.h
+++ b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.h
@@ -2,11 +2,11 @@
#define Z_OBJ_MURE2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjMure2;
-typedef void (*ObjMure2ActionFunc)(struct ObjMure2*, PlayState*);
+typedef void (*ObjMure2ActionFunc)(struct ObjMure2*, struct PlayState*);
typedef struct ObjMure2 {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c
index 1ed11535ca..51035c0678 100644
--- a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c
+++ b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c
@@ -6,6 +6,12 @@
#include "z_obj_mure3.h"
+#include "ichain.h"
+#include "sys_math3d.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#define FLAGS 0
void ObjMure3_Init(Actor* thisx, PlayState* play);
@@ -34,9 +40,9 @@ ActorProfile Obj_Mure3_Profile = {
static s16 sRupeeCounts[] = { 5, 5, 7, 0 };
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 1800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 100, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 1800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 100, ICHAIN_STOP),
};
void func_80B9A9D0(ObjMure3* this, PlayState* play) {
@@ -172,7 +178,7 @@ void func_80B9AF64(ObjMure3* this, PlayState* play) {
static ObjMure3SpawnFunc spawnFuncs[] = { func_80B9A9D0, func_80B9AA90, func_80B9ABA0 };
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) < SQ(1150.0f)) {
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
spawnFuncs[PARAMS_GET_U(this->actor.params, 13, 3)](this, play);
func_80B9AFEC(this);
}
@@ -185,7 +191,7 @@ void func_80B9AFEC(ObjMure3* this) {
void func_80B9AFFC(ObjMure3* this, PlayState* play) {
func_80B9ADCC(this, play);
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) >= SQ(1450.0f)) {
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
func_80B9ACE4(this, play);
func_80B9AF54(this);
}
diff --git a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.h b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.h
index 415babc61b..fc9a3e83aa 100644
--- a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.h
+++ b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.h
@@ -2,17 +2,17 @@
#define Z_OBJ_MURE3_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjMure3;
-typedef void (*ObjMure3ActionFunc)(struct ObjMure3*, PlayState*);
-typedef void (*ObjMure3SpawnFunc)(struct ObjMure3*, PlayState*);
+typedef void (*ObjMure3ActionFunc)(struct ObjMure3*, struct PlayState*);
+typedef void (*ObjMure3SpawnFunc)(struct ObjMure3*, struct PlayState*);
typedef struct ObjMure3 {
/* 0x0000 */ Actor actor;
/* 0x014C */ ObjMure3ActionFunc actionFunc;
- /* 0x0150 */ EnItem00* unk_150[7];
+ /* 0x0150 */ struct EnItem00* unk_150[7];
/* 0x016C */ u16 unk_16C;
} ObjMure3; // size = 0x0170
diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c
index 45c60f74fb..efa0fe3f46 100644
--- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c
+++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c
@@ -6,9 +6,24 @@
#include "z_obj_oshihiki.h"
#include "overlays/actors/ovl_Obj_Switch/z_obj_switch.h"
+
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
-#define FLAGS ACTOR_FLAG_4
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void ObjOshihiki_Init(Actor* thisx, PlayState* play2);
void ObjOshihiki_Destroy(Actor* thisx, PlayState* play);
@@ -59,9 +74,9 @@ static s16 sSceneIds[] = {
};
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 1800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 500, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1500, ICHAIN_STOP),
};
// The vertices and center of the bottom face
@@ -92,13 +107,13 @@ void ObjOshihiki_InitDynapoly(ObjOshihiki* this, PlayState* play, CollisionHeade
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- // "Warning : move BG registration failure"
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_oshihiki.c", 280,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_obj_oshihiki.c", 280, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
@@ -215,9 +230,9 @@ void ObjOshihiki_CheckType(ObjOshihiki* this, PlayState* play) {
ObjOshihiki_InitDynapoly(this, play, &gPushBlockCol, 1);
break;
default:
- // "Error : type cannot be determined"
- PRINTF("Error : タイプが判別できない(%s %d)(arg_data 0x%04x)\n", "../z_obj_oshihiki.c", 444,
- this->dyna.actor.params);
+ PRINTF(T("Error : タイプが判別できない(%s %d)(arg_data 0x%04x)\n",
+ "Error : type cannot be determined (%s %d)(arg_data 0x%04x)\n"),
+ "../z_obj_oshihiki.c", 444, this->dyna.actor.params);
break;
}
}
@@ -259,8 +274,9 @@ void ObjOshihiki_SetColor(ObjOshihiki* this, PlayState* play2) {
}
if (i >= ARRAY_COUNT(sColors)) {
- // "Error : scene_data_ID cannot be determined"
- PRINTF("Error : scene_data_ID が判別できない。(%s %d)\n", "../z_obj_oshihiki.c", 579);
+ PRINTF(T("Error : scene_data_ID が判別できない。(%s %d)\n",
+ "Error : scene_data_ID cannot be determined. (%s %d)\n"),
+ "../z_obj_oshihiki.c", 579);
color->r = color->g = color->b = 255;
} else {
src = &sColors[i][paramsColorIdx];
@@ -305,8 +321,8 @@ void ObjOshihiki_Init(Actor* thisx, PlayState* play2) {
ObjOshihiki_SetColor(this, play);
ObjOshihiki_ResetFloors(this);
ObjOshihiki_SetupOnActor(this, play);
- // "(dungeon keep push-pull block)"
- PRINTF("(dungeon keep 押し引きブロック)(arg_data 0x%04x)\n", this->dyna.actor.params);
+ PRINTF(T("(dungeon keep 押し引きブロック)(arg_data 0x%04x)\n", "(dungeon keep push/pull block)(arg_data 0x%04x)\n"),
+ this->dyna.actor.params);
}
void ObjOshihiki_Destroy(Actor* thisx, PlayState* play) {
@@ -372,9 +388,9 @@ s32 ObjOshihiki_CheckFloor(ObjOshihiki* this, PlayState* play) {
s32 ObjOshihiki_CheckGround(ObjOshihiki* this, PlayState* play) {
if (this->dyna.actor.world.pos.y <= BGCHECK_Y_MIN + 10.0f) {
- // "Warning : Push-pull block fell too much"
- PRINTF("Warning : 押し引きブロック落ちすぎた(%s %d)(arg_data 0x%04x)\n", "../z_obj_oshihiki.c", 809,
- this->dyna.actor.params);
+ PRINTF(T("Warning : 押し引きブロック落ちすぎた(%s %d)(arg_data 0x%04x)\n",
+ "Warning : Push/pull block fell too much (%s %d)(arg_data 0x%04x)\n"),
+ "../z_obj_oshihiki.c", 809, this->dyna.actor.params);
Actor_Kill(&this->dyna.actor);
return 0;
}
@@ -491,7 +507,7 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) {
dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId);
if (dynaPolyActor != NULL) {
DynaPolyActor_SetActorOnTop(dynaPolyActor);
- func_80043538(dynaPolyActor);
+ DynaPolyActor_SetSwitchPressed(dynaPolyActor);
if ((this->timer <= 0) && (fabsf(this->dyna.unk_150) > 0.001f)) {
if (ObjOshihiki_StrongEnough(this) && ObjOshihiki_NoSwitchPress(this, dynaPolyActor, play) &&
@@ -520,7 +536,7 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) {
if ((dynaPolyActor != NULL) && (dynaPolyActor->transformFlags & DYNA_TRANSFORM_POS)) {
DynaPolyActor_SetActorOnTop(dynaPolyActor);
- func_80043538(dynaPolyActor);
+ DynaPolyActor_SetSwitchPressed(dynaPolyActor);
this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight;
} else {
ObjOshihiki_SetupFall(this, play);
@@ -646,7 +662,7 @@ void ObjOshihiki_Draw(Actor* thisx, PlayState* play) {
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, play->state.gfxCtx, "../z_obj_oshihiki.c", 1308);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
switch (play->sceneId) {
case SCENE_DEKU_TREE:
case SCENE_DODONGOS_CAVERN:
diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h
index 90dce5ca45..265ba4691c 100644
--- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h
+++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h
@@ -2,7 +2,7 @@
#define Z_OBJ_OSHIHIKI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjOshihiki;
@@ -27,7 +27,7 @@ typedef enum PushBlockType {
#define PUSHBLOCK_SETUP_FALL (1 << 7)
#define PUSHBLOCK_MOVE_UNDER (1 << 8)
-typedef void (*ObjOshihikiActionFunc)(struct ObjOshihiki*, PlayState*);
+typedef void (*ObjOshihikiActionFunc)(struct ObjOshihiki*, struct PlayState*);
typedef struct ObjOshihiki {
/* 0x0000 */ DynaPolyActor dyna;
@@ -40,7 +40,7 @@ typedef struct ObjOshihiki {
/* 0x0178 */ f32 pushDist;
/* 0x017C */ f32 direction;
/* 0x0180 */ s32 floorBgIds[5];
- /* 0x0194 */ CollisionPoly* floorPolys[5];
+ /* 0x0194 */ struct CollisionPoly* floorPolys[5];
/* 0x01A8 */ f32 floorHeights[5];
/* 0x01BC */ s16 highestFloor;
/* 0x01BE */ u8 cantMove;
diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c
index 5648c809ca..6eca379686 100644
--- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c
+++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c
@@ -6,7 +6,12 @@
#include "z_obj_roomtimer.h"
-#define FLAGS ACTOR_FLAG_4
+#include "sfx.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64save.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
void ObjRoomtimer_Init(Actor* thisx, PlayState* play);
void ObjRoomtimer_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.h b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.h
index 2f1b08d9c9..ee8e74eaa2 100644
--- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.h
+++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.h
@@ -2,12 +2,11 @@
#define Z_OBJ_ROOMTIMER_H
#include "ultra64.h"
-#include "global.h"
-#include "z64.h"
+#include "z64actor.h"
struct ObjRoomtimer;
-typedef void (*ObjRoomtimerActionFunc)(struct ObjRoomtimer*, PlayState*);
+typedef void (*ObjRoomtimerActionFunc)(struct ObjRoomtimer*, struct PlayState*);
typedef struct ObjRoomtimer {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c
index 1d4dc9ae00..2ad4bbf09a 100644
--- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c
+++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c
@@ -5,10 +5,26 @@
*/
#include "z_obj_switch.h"
-#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
-#include "terminal.h"
-#define FLAGS ACTOR_FLAG_4
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "rumble.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
+
+#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
#define OBJSWITCH_TYPE(thisx) PARAMS_GET_U((thisx)->params, 0, 3)
#define OBJSWITCH_SUBTYPE(thisx) PARAMS_GET_U((thisx)->params, 4, 3)
@@ -147,7 +163,7 @@ static ColliderTrisInit sEyeTrisInit = {
sEyeTrisElementsInit,
};
-static ColliderJntSphElementInit sCrystalJntSphElementInit[1] = {
+static ColliderJntSphElementInit sCrystalJntSphElementsInit[1] = {
{
{
ELEM_MATERIAL_UNK0,
@@ -170,15 +186,15 @@ static ColliderJntSphInit sCrystalJntSphInit = {
OC2_TYPE_2,
COLSHAPE_JNTSPH,
},
- ARRAY_COUNT(sCrystalJntSphElementInit),
- sCrystalJntSphElementInit,
+ ARRAY_COUNT(sCrystalJntSphElementsInit),
+ sCrystalJntSphElementsInit,
};
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 2000, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 2000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 400, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 2000, ICHAIN_STOP),
};
void ObjSwitch_RotateY(Vec3f* dest, Vec3f* src, s16 rotY) {
@@ -198,22 +214,22 @@ void ObjSwitch_InitDynaPoly(ObjSwitch* this, PlayState* play, CollisionHeader* c
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->dyna.bgId == BG_ACTOR_MAX) {
s32 pad2;
- // "Warning : move BG registration failure"
- PRINTF("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_obj_switch.c", 531,
- this->dyna.actor.id, this->dyna.actor.params);
+ PRINTF(T("Warning : move BG 登録失敗",
+ "Warning : move BG registration failed") "(%s %d)(name %d)(arg_data 0x%04x)\n",
+ "../z_obj_switch.c", 531, this->dyna.actor.id, this->dyna.actor.params);
}
#endif
}
void ObjSwitch_InitJntSphCollider(ObjSwitch* this, PlayState* play, ColliderJntSphInit* colliderJntSphInit) {
- ColliderJntSph* colliderJntSph = &this->jntSph.col;
+ ColliderJntSph* colliderJntSph = &this->jntSph.collider;
Collider_InitJntSph(play, colliderJntSph);
- Collider_SetJntSph(play, colliderJntSph, &this->dyna.actor, colliderJntSphInit, this->jntSph.items);
+ Collider_SetJntSph(play, colliderJntSph, &this->dyna.actor, colliderJntSphInit, this->jntSph.colliderElements);
Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x,
this->dyna.actor.world.pos.y +
this->dyna.actor.shape.yOffset * this->dyna.actor.scale.y,
@@ -223,13 +239,13 @@ void ObjSwitch_InitJntSphCollider(ObjSwitch* this, PlayState* play, ColliderJntS
}
void ObjSwitch_InitTrisCollider(ObjSwitch* this, PlayState* play, ColliderTrisInit* colliderTrisInit) {
- ColliderTris* colliderTris = &this->tris.col;
+ ColliderTris* colliderTris = &this->tris.collider;
s32 i;
s32 j;
Vec3f pos[3];
Collider_InitTris(play, colliderTris);
- Collider_SetTris(play, colliderTris, &this->dyna.actor, colliderTrisInit, this->tris.items);
+ Collider_SetTris(play, colliderTris, &this->dyna.actor, colliderTrisInit, this->tris.colliderElements);
for (i = 0; i < 2; i++) {
for (j = 0; j < 3; j++) {
@@ -322,9 +338,9 @@ void ObjSwitch_Init(Actor* thisx, PlayState* play) {
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
if (OBJSWITCH_FROZEN(&this->dyna.actor) && (ObjSwitch_SpawnIce(this, play) == NULL)) {
- PRINTF(VT_FGCOL(RED));
- PRINTF("Error : 氷発生失敗 (%s %d)\n", "../z_obj_switch.c", 732);
- PRINTF(VT_RST);
+ PRINTF_COLOR_RED();
+ PRINTF(T("Error : 氷発生失敗 (%s %d)\n", "Error : Ice generation failure (%s %d)\n"), "../z_obj_switch.c", 732);
+ PRINTF_RST();
this->dyna.actor.params &= ~OBJSWITCH_FROZEN_FLAG;
}
@@ -368,12 +384,12 @@ void ObjSwitch_Destroy(Actor* thisx, PlayState* play) {
switch (OBJSWITCH_TYPE(&this->dyna.actor)) {
case OBJSWITCH_TYPE_FLOOR_RUSTY:
case OBJSWITCH_TYPE_EYE:
- Collider_DestroyTris(play, &this->tris.col);
+ Collider_DestroyTris(play, &this->tris.collider);
break;
case OBJSWITCH_TYPE_CRYSTAL:
case OBJSWITCH_TYPE_CRYSTAL_TARGETABLE:
- Collider_DestroyJntSph(play, &this->jntSph.col);
+ Collider_DestroyJntSph(play, &this->jntSph.collider);
break;
}
}
@@ -385,12 +401,12 @@ void ObjSwitch_FloorUpInit(ObjSwitch* this) {
void ObjSwitch_FloorUp(ObjSwitch* this, PlayState* play) {
if (OBJSWITCH_TYPE(&this->dyna.actor) == OBJSWITCH_TYPE_FLOOR_RUSTY) {
- if (this->tris.col.base.acFlags & AC_HIT) {
+ if (this->tris.collider.base.acFlags & AC_HIT) {
ObjSwitch_FloorPressInit(this);
ObjSwitch_SetOn(this, play);
- this->tris.col.base.acFlags &= ~AC_HIT;
+ this->tris.collider.base.acFlags &= ~AC_HIT;
} else {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->tris.col.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->tris.collider.base);
}
} else {
switch (OBJSWITCH_SUBTYPE(&this->dyna.actor)) {
@@ -410,14 +426,14 @@ void ObjSwitch_FloorUp(ObjSwitch* this, PlayState* play) {
break;
case OBJSWITCH_SUBTYPE_HOLD:
- if (func_800435B4(&this->dyna)) {
+ if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
ObjSwitch_FloorPressInit(this);
ObjSwitch_SetOn(this, play);
}
break;
case OBJSWITCH_SUBTYPE_HOLD_INVERTED:
- if (func_800435B4(&this->dyna)) {
+ if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
ObjSwitch_FloorPressInit(this);
ObjSwitch_SetOff(this, play);
}
@@ -467,7 +483,7 @@ void ObjSwitch_FloorDown(ObjSwitch* this, PlayState* play) {
case OBJSWITCH_SUBTYPE_HOLD:
case OBJSWITCH_SUBTYPE_HOLD_INVERTED:
- if (!func_800435B4(&this->dyna) && !Player_InCsMode(play)) {
+ if (!DynaPolyActor_IsSwitchPressed(&this->dyna) && !Player_InCsMode(play)) {
if (this->releaseTimer <= 0) {
ObjSwitch_FloorReleaseInit(this);
if (OBJSWITCH_SUBTYPE(&this->dyna.actor) == OBJSWITCH_SUBTYPE_HOLD) {
@@ -509,8 +525,8 @@ s32 ObjSwitch_EyeIsHit(ObjSwitch* this) {
Actor* collidingActor;
s16 yawDiff;
- if ((this->tris.col.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT)) {
- collidingActor = this->tris.col.base.ac;
+ if ((this->tris.collider.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT)) {
+ collidingActor = this->tris.collider.base.ac;
if (collidingActor != NULL) {
yawDiff = collidingActor->world.rot.y - this->dyna.actor.shape.rot.y;
if (ABS(yawDiff) > 0x5000) {
@@ -613,7 +629,7 @@ void ObjSwitch_CrystalOffInit(ObjSwitch* this) {
void ObjSwitch_CrystalOff(ObjSwitch* this, PlayState* play) {
switch (OBJSWITCH_SUBTYPE(&this->dyna.actor)) {
case OBJSWITCH_SUBTYPE_ONCE:
- if ((this->jntSph.col.base.acFlags & AC_HIT) && this->disableAcTimer <= 0) {
+ if ((this->jntSph.collider.base.acFlags & AC_HIT) && this->disableAcTimer <= 0) {
this->disableAcTimer = 10;
ObjSwitch_SetOn(this, play);
ObjSwitch_CrystalTurnOnInit(this);
@@ -621,7 +637,7 @@ void ObjSwitch_CrystalOff(ObjSwitch* this, PlayState* play) {
break;
case OBJSWITCH_SUBTYPE_SYNC:
- if (((this->jntSph.col.base.acFlags & AC_HIT) && this->disableAcTimer <= 0) ||
+ if (((this->jntSph.collider.base.acFlags & AC_HIT) && this->disableAcTimer <= 0) ||
Flags_GetSwitch(play, OBJSWITCH_SWITCH_FLAG(&this->dyna.actor))) {
this->disableAcTimer = 10;
@@ -631,7 +647,7 @@ void ObjSwitch_CrystalOff(ObjSwitch* this, PlayState* play) {
break;
case OBJSWITCH_SUBTYPE_TOGGLE:
- if ((this->jntSph.col.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT) &&
+ if ((this->jntSph.collider.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT) &&
this->disableAcTimer <= 0) {
this->disableAcTimer = 10;
ObjSwitch_SetOn(this, play);
@@ -675,7 +691,7 @@ void ObjSwitch_CrystalOn(ObjSwitch* this, PlayState* play) {
break;
case OBJSWITCH_SUBTYPE_TOGGLE:
- if ((this->jntSph.col.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT) &&
+ if ((this->jntSph.collider.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT) &&
this->disableAcTimer <= 0) {
this->disableAcTimer = 10;
ObjSwitch_CrystalTurnOffInit(this);
@@ -719,9 +735,9 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) {
break;
case OBJSWITCH_TYPE_EYE:
- this->prevColFlags = this->tris.col.base.acFlags;
- this->tris.col.base.acFlags &= ~AC_HIT;
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->tris.col.base);
+ this->prevColFlags = this->tris.collider.base.acFlags;
+ this->tris.collider.base.acFlags &= ~AC_HIT;
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->tris.collider.base);
break;
case OBJSWITCH_TYPE_CRYSTAL:
@@ -729,12 +745,12 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) {
if (!Player_InCsMode(play) && this->disableAcTimer > 0) {
this->disableAcTimer--;
}
- this->prevColFlags = this->jntSph.col.base.acFlags;
- this->jntSph.col.base.acFlags &= ~AC_HIT;
+ this->prevColFlags = this->jntSph.collider.base.acFlags;
+ this->jntSph.collider.base.acFlags &= ~AC_HIT;
if (this->disableAcTimer <= 0) {
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->jntSph.col.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->jntSph.collider.base);
}
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->jntSph.col.base);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->jntSph.collider.base);
break;
}
}
diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h
index b6fb243f70..b4d3ae8b20 100644
--- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h
+++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h
@@ -2,12 +2,12 @@
#define Z_OBJ_SWITCH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjSwitch;
-typedef void (*ObjSwitchActionFunc)(struct ObjSwitch*, PlayState*);
-typedef void (*ObjSwitchDrawFunc)(Actor*, PlayState*);
+typedef void (*ObjSwitchActionFunc)(struct ObjSwitch*, struct PlayState*);
+typedef void (*ObjSwitchDrawFunc)(Actor*, struct PlayState*);
typedef enum ObjSwitchType {
/* 0 */ OBJSWITCH_TYPE_FLOOR,
@@ -26,13 +26,13 @@ typedef enum ObjSwitchSubType {
} ObjSwitchSubType;
typedef struct ObjSwitchJntSph {
- /* 0x00 */ ColliderJntSph col;
- /* 0x20 */ ColliderJntSphElement items[1];
+ /* 0x00 */ ColliderJntSph collider;
+ /* 0x20 */ ColliderJntSphElement colliderElements[1];
} ObjSwitchJntSph;
typedef struct ObjSwitchTris {
- /* 0x00 */ ColliderTris col;
- /* 0x20 */ ColliderTrisElement items[2];
+ /* 0x00 */ ColliderTris collider;
+ /* 0x20 */ ColliderTrisElement colliderElements[2];
} ObjSwitchTris;
typedef struct ObjSwitch {
diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c
index c6ff95c34c..a189fe4345 100644
--- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c
+++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c
@@ -6,10 +6,21 @@
#include "z_obj_syokudai.h"
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_syokudai/object_syokudai.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_10)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)
void ObjSyokudai_Init(Actor* thisx, PlayState* play);
void ObjSyokudai_Destroy(Actor* thisx, PlayState* play);
@@ -70,9 +81,9 @@ static ColliderCylinderInit sCylInitFlame = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 4000, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 800, ICHAIN_STOP),
};
static s32 sLitTorchCount;
@@ -86,12 +97,12 @@ void ObjSyokudai_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f);
- Collider_InitCylinder(play, &this->colliderStand);
- Collider_SetCylinder(play, &this->colliderStand, &this->actor, &sCylInitStand);
- this->colliderStand.base.colMaterial = sColMaterialsStand[PARAMS_GET_NOMASK(this->actor.params, 12)];
+ Collider_InitCylinder(play, &this->standCollider);
+ Collider_SetCylinder(play, &this->standCollider, &this->actor, &sCylInitStand);
+ this->standCollider.base.colMaterial = sColMaterialsStand[PARAMS_GET_NOMASK(this->actor.params, 12)];
- Collider_InitCylinder(play, &this->colliderFlame);
- Collider_SetCylinder(play, &this->colliderFlame, &this->actor, &sCylInitFlame);
+ Collider_InitCylinder(play, &this->flameCollider);
+ Collider_SetCylinder(play, &this->flameCollider, &this->actor, &sCylInitFlame);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
@@ -113,8 +124,8 @@ void ObjSyokudai_Destroy(Actor* thisx, PlayState* play) {
s32 pad;
ObjSyokudai* this = (ObjSyokudai*)thisx;
- Collider_DestroyCylinder(play, &this->colliderStand);
- Collider_DestroyCylinder(play, &this->colliderFlame);
+ Collider_DestroyCylinder(play, &this->standCollider);
+ Collider_DestroyCylinder(play, &this->flameCollider);
LightContext_RemoveLight(play, &play->lightCtx, this->lightNode);
}
@@ -171,8 +182,8 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
this->litTimer = 20;
}
}
- if (this->colliderFlame.base.acFlags & AC_HIT) {
- dmgFlags = this->colliderFlame.elem.acHitElem->atDmgInfo.dmgFlags;
+ if (this->flameCollider.base.acFlags & AC_HIT) {
+ dmgFlags = this->flameCollider.elem.acHitElem->atDmgInfo.dmgFlags;
if (dmgFlags & (DMG_FIRE | DMG_ARROW_NORMAL)) {
interactionType = 1;
}
@@ -195,7 +206,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
player->unk_860 = 200;
}
} else if (dmgFlags & DMG_ARROW_NORMAL) {
- arrow = (EnArrow*)this->colliderFlame.base.ac;
+ arrow = (EnArrow*)this->flameCollider.base.ac;
if ((arrow->actor.update != NULL) && (arrow->actor.id == ACTOR_EN_ARROW)) {
arrow->actor.params = 0;
arrow->collider.elem.atDmgInfo.dmgFlags = DMG_ARROW_FIRE;
@@ -232,12 +243,12 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
}
}
- Collider_UpdateCylinder(&this->actor, &this->colliderStand);
- CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderStand.base);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderStand.base);
+ Collider_UpdateCylinder(&this->actor, &this->standCollider);
+ CollisionCheck_SetOC(play, &play->colChkCtx, &this->standCollider.base);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->standCollider.base);
- Collider_UpdateCylinder(&this->actor, &this->colliderFlame);
- CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderFlame.base);
+ Collider_UpdateCylinder(&this->actor, &this->flameCollider);
+ CollisionCheck_SetAC(play, &play->colChkCtx, &this->flameCollider.base);
if (this->litTimer > 0) {
this->litTimer--;
diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h
index 8c4e1b7d16..4dee2ba671 100644
--- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h
+++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h
@@ -2,14 +2,15 @@
#define Z_OBJ_SYOKUDAI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct ObjSyokudai;
typedef struct ObjSyokudai {
/* 0x0000 */ Actor actor;
- /* 0x014C */ ColliderCylinder colliderStand;
- /* 0x0198 */ ColliderCylinder colliderFlame;
+ /* 0x014C */ ColliderCylinder standCollider;
+ /* 0x0198 */ ColliderCylinder flameCollider;
/* 0x01E4 */ s16 litTimer;
/* 0x01E6 */ u8 flameTexScroll;
/* 0x01E8 */ LightNode* lightNode;
diff --git a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c
index c29b73daa2..b3dc890ca8 100644
--- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c
+++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c
@@ -5,9 +5,26 @@
*/
#include "z_obj_timeblock.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_timeblock/object_timeblock.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4 | ACTOR_FLAG_25 | ACTOR_FLAG_LOCK_ON_DISABLED)
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA | \
+ ACTOR_FLAG_LOCK_ON_DISABLED)
void ObjTimeblock_Init(Actor* thisx, PlayState* play);
void ObjTimeblock_Destroy(Actor* thisx, PlayState* play);
@@ -52,9 +69,9 @@ static f32 sRanges[] = { 60.0, 100.0, 140.0, 180.0, 220.0, 260.0, 300.0, 300.0 }
static InitChainEntry sInitChain[] = {
ICHAIN_U8(attentionRangeType, ATTENTION_RANGE_2, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 300, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 300, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1500, ICHAIN_STOP),
};
static Color_RGB8 sPrimColors[] = {
@@ -133,10 +150,10 @@ void ObjTimeblock_Init(Actor* thisx, PlayState* play) {
ObjTimeblock_SetupAltBehaviourNotVisible(this);
}
- // "Block of time"
- PRINTF("時のブロック ( %04xH save:%d color:%d range:%d move:%d)\n", (u16)this->dyna.actor.params,
- this->unk_177, this->dyna.actor.home.rot.z & 7, PARAMS_GET_U(this->dyna.actor.params, 11, 3),
- PARAMS_GET_U(this->dyna.actor.params, 10, 1));
+ PRINTF(T("時のブロック ( %04xH save:%d color:%d range:%d move:%d)\n",
+ "Time Block ( %04xH save:%d color:%d range:%d move:%d)\n"),
+ (u16)this->dyna.actor.params, this->unk_177, this->dyna.actor.home.rot.z & 7,
+ PARAMS_GET_U(this->dyna.actor.params, 11, 3), PARAMS_GET_U(this->dyna.actor.params, 10, 1));
}
void ObjTimeblock_Destroy(Actor* thisx, PlayState* play) {
@@ -217,8 +234,9 @@ void ObjTimeblock_Normal(ObjTimeblock* this, PlayState* play) {
// Possibly points the camera to this actor
OnePointCutscene_Attention(play, &this->dyna.actor);
- // "◯◯◯◯ Time Block Attention Camera (frame counter %d)\n"
- PRINTF("◯◯◯◯ Time Block 注目カメラ (frame counter %d)\n", play->state.frames);
+ PRINTF(T("◯◯◯◯ Time Block 注目カメラ (frame counter %d)\n",
+ "◯◯◯◯ Time Block Attention Camera (frame counter %d)\n"),
+ play->state.frames);
this->demoEffectFirstPartTimer = 12;
@@ -275,8 +293,9 @@ void ObjTimeblock_AltBehaviorVisible(ObjTimeblock* this, PlayState* play) {
ObjTimeblock_SpawnDemoEffect(this, play);
this->demoEffectTimer = 160;
OnePointCutscene_Attention(play, &this->dyna.actor);
- // "Time Block Attention Camera (frame counter)"
- PRINTF("◯◯◯◯ Time Block 注目カメラ (frame counter %d)\n", play->state.frames);
+ PRINTF(T("◯◯◯◯ Time Block 注目カメラ (frame counter %d)\n",
+ "◯◯◯◯ Time Block Attention Camera (frame counter %d)\n"),
+ play->state.frames);
ObjTimeblock_ToggleSwitchFlag(play, PARAMS_GET_U(this->dyna.actor.params, 0, 6));
}
diff --git a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h
index 9bd393b194..966f474496 100644
--- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h
+++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h
@@ -2,12 +2,12 @@
#define Z_OBJ_TIMEBLOCK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjTimeblock;
-typedef s32 (*ObjTimeblockSongObserverFunc)(struct ObjTimeblock*, PlayState*);
-typedef void (*ObjTimeblockActionFunc)(struct ObjTimeblock*, PlayState*);
+typedef s32 (*ObjTimeblockSongObserverFunc)(struct ObjTimeblock*, struct PlayState*);
+typedef void (*ObjTimeblockActionFunc)(struct ObjTimeblock*, struct PlayState*);
typedef struct ObjTimeblock {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c
index 9747279d79..9afd53ae53 100644
--- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c
+++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c
@@ -6,10 +6,23 @@
#include "z_obj_tsubo.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+
+#include "libc64/qrand.h"
+#include "ichain.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64item.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "assets/objects/object_tsubo/object_tsubo.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_23)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_THROW_ONLY)
void ObjTsubo_Init(Actor* thisx, PlayState* play);
void ObjTsubo_Destroy(Actor* thisx, PlayState* play2);
@@ -77,9 +90,9 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit sColChkInfoInit[] = { 0, 12, 60, MASS_IMMOVABLE };
static InitChainEntry sInitChain[] = {
- ICHAIN_F32_DIV1000(gravity, -1200, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(minVelocityY, -20000, ICHAIN_CONTINUE),
- ICHAIN_VEC3F_DIV1000(scale, 150, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneForward, 900, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP),
+ ICHAIN_F32_DIV1000(gravity, -1200, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(minVelocityY, -20000, ICHAIN_CONTINUE),
+ ICHAIN_VEC3F_DIV1000(scale, 150, ICHAIN_CONTINUE), ICHAIN_F32(cullingVolumeDistance, 900, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 100, ICHAIN_CONTINUE), ICHAIN_F32(cullingVolumeDownward, 800, ICHAIN_STOP),
};
void ObjTsubo_SpawnCollectible(ObjTsubo* this, PlayState* play) {
@@ -112,7 +125,7 @@ s32 ObjTsubo_SnapToFloor(ObjTsubo* this, PlayState* play) {
Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos);
return true;
} else {
- PRINTF("地面に付着失敗\n");
+ PRINTF(T("地面に付着失敗\n", "Failed to attach to ground\n"));
return false;
}
}
@@ -137,11 +150,12 @@ void ObjTsubo_Init(Actor* thisx, PlayState* play) {
}
this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, sObjectIds[PARAMS_GET_U(this->actor.params, 8, 1)]);
if (this->requiredObjectSlot < 0) {
- PRINTF("Error : バンク危険! (arg_data 0x%04x)(%s %d)\n", this->actor.params, "../z_obj_tsubo.c", 410);
+ PRINTF(T("Error : バンク危険! (arg_data 0x%04x)(%s %d)\n", "Error : Bank danger! (arg_data 0x%04x)(%s %d)\n"),
+ this->actor.params, "../z_obj_tsubo.c", 410);
Actor_Kill(&this->actor);
} else {
ObjTsubo_SetupWaitForObject(this);
- PRINTF("(dungeon keep 壷)(arg_data 0x%04x)\n", this->actor.params);
+ PRINTF(T("(dungeon keep 壷)(arg_data 0x%04x)\n", "(dungeon keep pot)(arg_data 0x%04x)\n"), this->actor.params);
}
}
@@ -227,7 +241,7 @@ void ObjTsubo_WaitForObject(ObjTsubo* this, PlayState* play) {
this->actor.draw = ObjTsubo_Draw;
this->actor.objectSlot = this->requiredObjectSlot;
ObjTsubo_SetupIdle(this);
- this->actor.flags &= ~ACTOR_FLAG_4;
+ this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
}
@@ -279,7 +293,7 @@ void ObjTsubo_SetupLiftedUp(ObjTsubo* this) {
this->actor.room = -1;
//! @bug: This is an unsafe cast, although the sound effect will still play
Player_PlaySfx((Player*)&this->actor, NA_SE_PL_PULL_UP_POT);
- this->actor.flags |= ACTOR_FLAG_4;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}
void ObjTsubo_LiftedUp(ObjTsubo* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.h b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.h
index aa30398c78..8e27cc8310 100644
--- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.h
+++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.h
@@ -2,11 +2,11 @@
#define Z_OBJ_TSUBO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjTsubo;
-typedef void (*ObjTsuboActionFunc)(struct ObjTsubo*, PlayState*);
+typedef void (*ObjTsuboActionFunc)(struct ObjTsubo*, struct PlayState*);
typedef struct ObjTsubo {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c
index dcb3428672..55023cccc1 100644
--- a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c
+++ b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c
@@ -5,10 +5,27 @@
*/
#include "z_obj_warp2block.h"
-#include "assets/objects/object_timeblock/object_timeblock.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4 | ACTOR_FLAG_25 | ACTOR_FLAG_LOCK_ON_DISABLED)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+
+#include "assets/objects/object_timeblock/object_timeblock.h"
+
+#define FLAGS \
+ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA | \
+ ACTOR_FLAG_LOCK_ON_DISABLED)
void ObjWarp2block_Init(Actor* thisx, PlayState* play2);
void ObjWarp2block_Destroy(Actor* thisx, PlayState* play);
@@ -54,9 +71,9 @@ static Warp2BlockSpawnData sSpawnData[] = {
static f32 sDistances[] = { 60.0f, 100.0f, 140.0f, 180.0f, 220.0f, 260.0f, 300.0f, 300.0f };
static InitChainEntry sInitChain[] = {
- ICHAIN_F32(uncullZoneForward, 1800, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneScale, 300, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1800, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeScale, 300, ICHAIN_CONTINUE),
+ ICHAIN_F32(cullingVolumeDownward, 1500, ICHAIN_STOP),
};
static Color_RGB8 sColors[] = {
@@ -218,7 +235,8 @@ void ObjWarp2block_Init(Actor* thisx, PlayState* play2) {
ObjWarp2block_SetInactive(this);
}
- PRINTF("時のブロック(ワープ2) ( %04xH color:%d range:%d)\n",
+ PRINTF(T("時のブロック(ワープ2) ( %04xH color:%d range:%d)\n",
+ "Time Block (Warp 2) ( %04xH color:%d range:%d)\n"),
PARAMS_GET_U(this->dyna.actor.params, 0, 16), this->dyna.actor.home.rot.z & 7,
PARAMS_GET_U(this->dyna.actor.params, 11, 3));
}
@@ -262,9 +280,11 @@ void func_80BA24F8(ObjWarp2block* this, PlayState* play) {
this->unk_174++;
if (this->unk_174 > 60) {
- PRINTF(VT_COL(RED, WHITE));
- PRINTF("Error : 時のブロック(ワープ2)が対でセットされていません(%s %d)\n", "../z_obj_warp2block.c", 505);
- PRINTF(VT_RST);
+ PRINTF_COLOR_ERROR();
+ PRINTF(T("Error : 時のブロック(ワープ2)が対でセットされていません(%s %d)\n",
+ "Error : Time Blocks (Warp 2) are not set in pairs (%s %d)\n"),
+ "../z_obj_warp2block.c", 505);
+ PRINTF_RST();
Actor_Kill(&this->dyna.actor);
}
}
diff --git a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.h b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.h
index 3e09d976c2..8f22398db7 100644
--- a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.h
+++ b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.h
@@ -2,12 +2,12 @@
#define Z_OBJ_WARP2BLOCK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjWarp2block;
-typedef void (*ObjWarp2blockActionFunc)(struct ObjWarp2block*, PlayState*);
-typedef s32 (*ObjWarp2blockFunc168)(struct ObjWarp2block*, PlayState*);
+typedef void (*ObjWarp2blockActionFunc)(struct ObjWarp2block*, struct PlayState*);
+typedef s32 (*ObjWarp2blockFunc168)(struct ObjWarp2block*, struct PlayState*);
typedef struct ObjWarp2block {
/* 0x0000 */ DynaPolyActor dyna;
diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
index ca6b10c04a..c170279758 100644
--- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
+++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
@@ -5,11 +5,27 @@
*/
#include "z_object_kankyo.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_demo_kekkai/object_demo_kekkai.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_spot02_objects/object_spot02_objects.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25)
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void ObjectKankyo_Init(Actor* thisx, PlayState* play);
void ObjectKankyo_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h
index 4449fa013c..40307f5e91 100644
--- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h
+++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h
@@ -2,11 +2,11 @@
#define Z_OBJECT_KANKYO_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ObjectKankyo;
-typedef void (*ObjectKankyoActionFunc)(struct ObjectKankyo*, PlayState*);
+typedef void (*ObjectKankyoActionFunc)(struct ObjectKankyo*, struct PlayState*);
typedef struct ObjectKankyoEffect {
/* 0x00 */ u8 state;
diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c
index dd421a8128..ab09e7420b 100644
--- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c
+++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c
@@ -5,9 +5,23 @@
*/
#include "z_oceff_spot.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "printf.h"
+#include "regs.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64light.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void OceffSpot_Init(Actor* thisx, PlayState* play);
void OceffSpot_Destroy(Actor* thisx, PlayState* play);
@@ -32,7 +46,7 @@ ActorProfile Oceff_Spot_Profile = {
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 0, ICHAIN_CONTINUE),
- ICHAIN_F32(uncullZoneForward, 1500, ICHAIN_STOP),
+ ICHAIN_F32(cullingVolumeDistance, 1500, ICHAIN_STOP),
};
void OceffSpot_SetupAction(OceffSpot* this, OceffSpotActionFunc actionFunc) {
@@ -81,21 +95,19 @@ void OceffSpot_End(OceffSpot* this, PlayState* play) {
} else {
Actor_Kill(&this->actor);
if (gTimeSpeed != 400 && !play->msgCtx.disableSunsSong &&
- GET_EVENTINF_HORSES_STATE() != EVENTINF_HORSES_STATE_1) {
+ GET_EVENTINF_INGO_RACE_STATE() != INGO_RACE_STATE_HORSE_RENTAL_PERIOD) {
if (play->msgCtx.ocarinaAction != OCARINA_ACTION_CHECK_NOWARP_DONE ||
play->msgCtx.ocarinaMode != OCARINA_MODE_08) {
gSaveContext.sunsSongState = SUNSSONG_START;
- PRINTF(VT_FGCOL(YELLOW));
- // "Sun's Song Flag"
- PRINTF("z_oceff_spot 太陽の歌フラグ\n");
- PRINTF(VT_RST);
+ PRINTF_COLOR_YELLOW();
+ PRINTF(T("z_oceff_spot 太陽の歌フラグ\n", "z_oceff_spot Sun's Song Flag\n"));
+ PRINTF_RST();
}
} else {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
- PRINTF(VT_FGCOL(YELLOW));
- // "Ocarina End"
- PRINTF("z_oceff_spot オカリナ終了\n");
- PRINTF(VT_RST);
+ PRINTF_COLOR_YELLOW();
+ PRINTF(T("z_oceff_spot オカリナ終了\n", "z_oceff_spot Ocarina finished\n"));
+ PRINTF_RST();
}
}
}
diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h
index a96f1878af..222c977fc2 100644
--- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h
+++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h
@@ -2,11 +2,12 @@
#define Z_OCEFF_SPOT_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
+#include "z64light.h"
struct OceffSpot;
-typedef void (*OceffSpotActionFunc)(struct OceffSpot*, PlayState*);
+typedef void (*OceffSpotActionFunc)(struct OceffSpot*, struct PlayState*);
typedef struct OceffSpot {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c
index 931b67930f..5e236c86f4 100644
--- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c
+++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c
@@ -6,7 +6,14 @@
#include "z_oceff_storm.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void OceffStorm_Init(Actor* thisx, PlayState* play);
void OceffStorm_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.h b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.h
index e4b831a208..aebc002780 100644
--- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.h
+++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.h
@@ -2,11 +2,11 @@
#define Z_OCEFF_STORM_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct OceffStorm;
-typedef void (*OceffStormActionFunc)(struct OceffStorm*, PlayState*);
+typedef void (*OceffStormActionFunc)(struct OceffStorm*, struct PlayState*);
typedef struct OceffStorm {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c
index 986abc8b17..36177c0729 100644
--- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c
+++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c
@@ -5,9 +5,18 @@
*/
#include "z_oceff_wipe.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void OceffWipe_Init(Actor* thisx, PlayState* play);
void OceffWipe_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h
index 9e5131737c..65a18468a3 100644
--- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h
+++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h
@@ -2,7 +2,7 @@
#define Z_OCEFF_WIPE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum OceffWipeType {
/* 0x00 */ OCEFF_WIPE_ZL,
diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c
index 1c07cdbf1f..db8171b362 100644
--- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c
+++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c
@@ -5,9 +5,18 @@
*/
#include "z_oceff_wipe2.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void OceffWipe2_Init(Actor* thisx, PlayState* play);
void OceffWipe2_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.h b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.h
index c7f9c7b870..6276bb33c4 100644
--- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.h
+++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.h
@@ -2,7 +2,7 @@
#define Z_OCEFF_WIPE2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct OceffWipe2;
diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c
index 5473c3da47..7aec9136f2 100644
--- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c
+++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c
@@ -5,9 +5,18 @@
*/
#include "z_oceff_wipe3.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void OceffWipe3_Init(Actor* thisx, PlayState* play);
void OceffWipe3_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.h b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.h
index a5bc2bbe4c..5e6abb0456 100644
--- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.h
+++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.h
@@ -2,7 +2,7 @@
#define Z_OCEFF_WIPE3_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct OceffWipe3;
diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c
index 445e395ff0..0828ba289f 100644
--- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c
+++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c
@@ -5,9 +5,16 @@
*/
#include "z_oceff_wipe4.h"
-#include "terminal.h"
-#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25)
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "z_lib.h"
+#include "z64play.h"
+
+#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA)
void OceffWipe4_Init(Actor* thisx, PlayState* play);
void OceffWipe4_Destroy(Actor* thisx, PlayState* play);
diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h
index 3986c1fce5..bd82ddc7c4 100644
--- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h
+++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h
@@ -2,7 +2,7 @@
#define Z_OCEFF_WIPE4_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
typedef enum OceffWipe4Type {
/* 0x00 */ OCEFF_WIPE4_SCARECROWS,
diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
index 3b8f64972f..e069f1730a 100644
--- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
+++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
@@ -7,8 +7,23 @@
#include "z_shot_sun.h"
#include "overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
-#include "assets/scenes/overworld/spot06/spot06_scene.h"
+
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "sys_math3d.h"
#include "terminal.h"
+#include "translation.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "z64environment.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
+#include "assets/scenes/overworld/spot06/spot06_scene.h"
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY)
@@ -63,13 +78,13 @@ void ShotSun_Init(Actor* thisx, PlayState* play) {
ShotSun* this = (ShotSun*)thisx;
s32 params;
- // "Ocarina secret occurrence"
- PRINTF("%d ---- オカリナの秘密発生!!!!!!!!!!!!!\n", this->actor.params);
+ PRINTF(T("%d ---- オカリナの秘密発生!!!!!!!!!!!!!\n", "%d ---- Ocarina secret occurrence!!!!!!!!!!!!!\n"),
+ this->actor.params);
params = PARAMS_GET_U(this->actor.params, 0, 8);
if (params == 0x40 || params == 0x41) {
this->fairySpawnerState = SPAWNER_OUT_OF_RANGE;
- this->actor.flags |= ACTOR_FLAG_4;
- this->actor.flags |= ACTOR_FLAG_25;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
+ this->actor.flags |= ACTOR_FLAG_UPDATE_DURING_OCARINA;
this->actionFunc = ShotSun_UpdateFairySpawner;
this->actor.flags |= ACTOR_FLAG_LOCK_ON_DISABLED;
} else {
diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.h b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.h
index 9687e5940e..4415e6e98f 100644
--- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.h
+++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.h
@@ -2,11 +2,11 @@
#define Z_SHOT_SUN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64actor.h"
struct ShotSun;
-typedef void (*ShotSunActionFunc)(struct ShotSun*, PlayState*);
+typedef void (*ShotSunActionFunc)(struct ShotSun*, struct PlayState*);
typedef struct ShotSun {
/* 0x0000 */ Actor actor;
diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c
index cad6d8a8b4..8032614078 100644
--- a/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/src/overlays/actors/ovl_player_actor/z_player.c
@@ -4,13 +4,8 @@
* Description: Link
*/
-#include "ultra64.h"
-#include "global.h"
-#include "quake.h"
-
#include "overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.h"
#include "overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h"
-#include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h"
#include "overlays/actors/ovl_En_Boom/z_en_boom.h"
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
#include "overlays/actors/ovl_En_Box/z_en_box.h"
@@ -20,6 +15,42 @@
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
#include "overlays/actors/ovl_En_Insect/z_en_insect.h"
#include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h"
+
+#include "libc64/qrand.h"
+#include "libu64/debug.h"
+#include "array_count.h"
+#include "avoid_ub.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "ichain.h"
+#include "letterbox.h"
+#include "map.h"
+#include "one_point_cutscene.h"
+#include "printf.h"
+#include "quake.h"
+#include "rand.h"
+#include "regs.h"
+#include "rumble.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_math.h"
+#include "sys_math3d.h"
+#include "sys_matrix.h"
+#include "ultra64.h"
+#include "versions.h"
+#include "z_en_item00.h"
+#include "z_lib.h"
+#include "zelda_arena.h"
+#include "z64audio.h"
+#include "z64debug.h"
+#include "z64effect.h"
+#include "z64lifemeter.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64save.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_link_child/object_link_child.h"
@@ -49,13 +80,6 @@ typedef struct ExplosiveInfo {
/* 0x02 */ s16 actorId;
} ExplosiveInfo; // size = 0x04
-typedef struct BottleCatchInfo {
- /* 0x00 */ s16 actorId;
- /* 0x02 */ u8 itemId;
- /* 0x03 */ u8 itemAction;
- /* 0x04 */ u8 textId;
-} BottleCatchInfo; // size = 0x06
-
typedef struct BottleDropInfo {
/* 0x00 */ s16 actorId;
/* 0x02 */ s16 actorParams;
@@ -108,13 +132,6 @@ typedef struct ItemChangeInfo {
/* 0x04 */ u8 changeFrame;
} ItemChangeInfo; // size = 0x08
-typedef struct struct_80854554 {
- /* 0x00 */ LinkAnimationHeader* unk_00;
- /* 0x04 */ LinkAnimationHeader* unk_04;
- /* 0x08 */ u8 unk_08;
- /* 0x09 */ u8 unk_09;
-} struct_80854554; // size = 0x0C
-
typedef struct struct_80854190 {
/* 0x00 */ LinkAnimationHeader* unk_00;
/* 0x04 */ LinkAnimationHeader* unk_04;
@@ -167,17 +184,6 @@ s32 func_80835C08(Player* this, PlayState* play);
void Player_UseItem(PlayState* play, Player* this, s32 item);
void func_80839F90(Player* this, PlayState* play);
s32 func_8083C61C(PlayState* play, Player* this);
-void func_8083CA20(PlayState* play, Player* this);
-void func_8083CA54(PlayState* play, Player* this);
-void func_8083CA9C(PlayState* play, Player* this);
-void func_80846648(PlayState* play, Player* this);
-void func_80846660(PlayState* play, Player* this);
-void func_808467D4(PlayState* play, Player* this);
-void func_808468A8(PlayState* play, Player* this);
-void func_808468E8(PlayState* play, Player* this);
-void func_80846978(PlayState* play, Player* this);
-void func_808469BC(PlayState* play, Player* this);
-void func_80846A68(PlayState* play, Player* this);
void Player_UpdateCommon(Player* this, PlayState* play, Input* input);
void func_8084FF7C(Player* this);
void Player_UpdateBunnyEars(Player* this);
@@ -234,7 +240,9 @@ void func_808521F4(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_80852234(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_8085225C(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_80852280(PlayState* play, Player* this, CsCmdActorCue* cue);
+#if OOT_VERSION >= PAL_1_0
void func_80852358(PlayState* play, Player* this, CsCmdActorCue* cue);
+#endif
void func_80852388(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_80852298(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_80852328(PlayState* play, Player* this, CsCmdActorCue* cue);
@@ -261,17 +269,17 @@ s32 func_80852F38(PlayState* play, Player* this);
s32 Player_TryCsAction(PlayState* play, Actor* actor, s32 csAction);
void func_80853080(Player* this, PlayState* play);
s32 Player_InflictDamage(PlayState* play, s32 damage);
-void func_80853148(PlayState* play, Actor* actor);
+void Player_StartTalking(PlayState* play, Actor* actor);
void Player_Action_80840450(Player* this, PlayState* play);
void Player_Action_808407CC(Player* this, PlayState* play);
-void Player_Action_80840BC8(Player* this, PlayState* play);
+void Player_Action_Idle(Player* this, PlayState* play);
void Player_Action_80840DE4(Player* this, PlayState* play);
void Player_Action_808414F8(Player* this, PlayState* play);
void Player_Action_8084170C(Player* this, PlayState* play);
void Player_Action_808417FC(Player* this, PlayState* play);
void Player_Action_8084193C(Player* this, PlayState* play);
-void Player_Action_80841BA8(Player* this, PlayState* play);
+void Player_Action_TurnInPlace(Player* this, PlayState* play);
void Player_Action_80842180(Player* this, PlayState* play);
void Player_Action_8084227C(Player* this, PlayState* play);
void Player_Action_8084279C(Player* this, PlayState* play);
@@ -285,7 +293,7 @@ void Player_Action_80843954(Player* this, PlayState* play);
void Player_Action_80843A38(Player* this, PlayState* play);
void Player_Action_80843CEC(Player* this, PlayState* play);
void Player_Action_8084411C(Player* this, PlayState* play);
-void Player_Action_80844708(Player* this, PlayState* play);
+void Player_Action_Roll(Player* this, PlayState* play);
void Player_Action_80844A44(Player* this, PlayState* play);
void Player_Action_80844AF4(Player* this, PlayState* play);
void Player_Action_80844E68(Player* this, PlayState* play);
@@ -303,7 +311,7 @@ void Player_Action_80846408(Player* this, PlayState* play);
void Player_Action_808464B0(Player* this, PlayState* play);
void Player_Action_80846578(Player* this, PlayState* play);
void Player_Action_8084B1D8(Player* this, PlayState* play);
-void Player_Action_8084B530(Player* this, PlayState* play);
+void Player_Action_Talk(Player* this, PlayState* play);
void Player_Action_8084B78C(Player* this, PlayState* play);
void Player_Action_8084B898(Player* this, PlayState* play);
void Player_Action_8084B9E4(Player* this, PlayState* play);
@@ -326,50 +334,50 @@ void Player_Action_8084E368(Player* this, PlayState* play);
void Player_Action_8084E3C4(Player* this, PlayState* play);
void Player_Action_8084E604(Player* this, PlayState* play);
void Player_Action_8084E6D4(Player* this, PlayState* play);
-void Player_Action_8084E9AC(Player* this, PlayState* play);
+void Player_Action_TimeTravelEnd(Player* this, PlayState* play);
void Player_Action_8084EAC0(Player* this, PlayState* play);
-void Player_Action_8084ECA4(Player* this, PlayState* play);
+void Player_Action_SwingBottle(Player* this, PlayState* play);
void Player_Action_8084EED8(Player* this, PlayState* play);
void Player_Action_8084EFC0(Player* this, PlayState* play);
-void Player_Action_8084F104(Player* this, PlayState* play);
-void Player_Action_8084F390(Player* this, PlayState* play);
-void Player_Action_8084F608(Player* this, PlayState* play);
-void Player_Action_8084F698(Player* this, PlayState* play);
-void Player_Action_8084F710(Player* this, PlayState* play);
+void Player_Action_ExchangeItem(Player* this, PlayState* play);
+void Player_Action_SlideOnSlope(Player* this, PlayState* play);
+void Player_Action_WaitForCutscene(Player* this, PlayState* play);
+void Player_Action_StartWarpSongArrive(Player* this, PlayState* play);
+void Player_Action_BlueWarpArrive(Player* this, PlayState* play);
void Player_Action_8084F88C(Player* this, PlayState* play);
-void Player_Action_8084F9A0(Player* this, PlayState* play);
-void Player_Action_8084F9C0(Player* this, PlayState* play);
+void Player_Action_TryOpeningDoor(Player* this, PlayState* play);
+void Player_Action_ExitGrotto(Player* this, PlayState* play);
void Player_Action_8084FA54(Player* this, PlayState* play);
void Player_Action_8084FB10(Player* this, PlayState* play);
void Player_Action_8084FBF4(Player* this, PlayState* play);
void Player_Action_808502D0(Player* this, PlayState* play);
void Player_Action_808505DC(Player* this, PlayState* play);
void Player_Action_8085063C(Player* this, PlayState* play);
-void Player_Action_8085076C(Player* this, PlayState* play);
+void Player_Action_FaroresWindArrive(Player* this, PlayState* play);
void Player_Action_808507F4(Player* this, PlayState* play);
-void Player_Action_80850AEC(Player* this, PlayState* play);
+void Player_Action_HookshotFly(Player* this, PlayState* play);
void Player_Action_80850C68(Player* this, PlayState* play);
void Player_Action_80850E84(Player* this, PlayState* play);
void Player_Action_CsAction(Player* this, PlayState* play);
// .bss part 1
-#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"
+#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 ique-cn:0" \
+ "ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
static s32 D_80858AA0;
// TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving
// data around. It would be easier if we had more options for controlling BSS ordering in debug.
-#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
- "ntsc-1.2:192"
+#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
+ "ique-cn:192 ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
-static s32 D_80858AA4;
+static s32 sSavedCurrentMask;
static Vec3f sInteractWallCheckResult;
static Input* sControlInput;
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
- "ntsc-1.2:128"
+ "ique-cn:192 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
// .data
@@ -441,8 +449,8 @@ static PlayerAgeProperties sAgeProperties[] = {
0, // unk_92
0x80, // unk_94
&gPlayerAnim_link_demo_Tbox_open, // unk_98
- &gPlayerAnim_link_demo_back_to_past, // unk_9C
- &gPlayerAnim_link_demo_return_to_past, // unk_A0
+ &gPlayerAnim_link_demo_back_to_past, // timeTravelStartAnim
+ &gPlayerAnim_link_demo_return_to_past, // timeTravelEndAnim
&gPlayerAnim_link_normal_climb_startA, // unk_A4
&gPlayerAnim_link_normal_climb_startB, // unk_A8
{ &gPlayerAnim_link_normal_climb_upL, &gPlayerAnim_link_normal_climb_upR, &gPlayerAnim_link_normal_Fclimb_upL,
@@ -493,8 +501,8 @@ static PlayerAgeProperties sAgeProperties[] = {
0x20, // unk_92
0, // unk_94
&gPlayerAnim_clink_demo_Tbox_open, // unk_98
- &gPlayerAnim_clink_demo_goto_future, // unk_9C
- &gPlayerAnim_clink_demo_return_to_future, // unk_A0
+ &gPlayerAnim_clink_demo_goto_future, // timeTravelStartAnim
+ &gPlayerAnim_clink_demo_return_to_future, // timeTravelEndAnim
&gPlayerAnim_clink_normal_climb_startA, // unk_A4
&gPlayerAnim_clink_normal_climb_startB, // unk_A8
{ &gPlayerAnim_clink_normal_climb_upL, &gPlayerAnim_clink_normal_climb_upR, &gPlayerAnim_link_normal_Fclimb_upL,
@@ -511,8 +519,8 @@ static s16 sControlStickAngle = 0;
static s16 sControlStickWorldYaw = 0;
static s32 sUpperBodyIsBusy = false; // see `Player_UpdateUpperBody`
static s32 sFloorType = FLOOR_TYPE_0;
-static f32 D_808535E8 = 1.0f;
-static f32 D_808535EC = 1.0f;
+static f32 sWaterSpeedFactor = 1.0f; // Set to 0.5f in water, 1.0f otherwise. Influences different speed values.
+static f32 sInvWaterSpeedFactor = 1.0f; // Inverse of `sWaterSpeedFactor` (1.0f / sWaterSpeedFactor)
static u32 sTouchedWallFlags = 0;
static u32 sConveyorSpeed = CONVEYOR_SPEED_DISABLED;
static s16 sIsFloorConveyor = false;
@@ -1116,40 +1124,84 @@ static LinkAnimationHeader* D_80853D4C[][3] = {
&gPlayerAnim_link_fighter_Rside_jump_endR },
};
-static LinkAnimationHeader* D_80853D7C[][2] = {
+typedef enum FidgetType {
+ /* 0x00 */ FIDGET_LOOK_AROUND, // ROOM_ENV_DEFAULT
+ /* 0x01 */ FIDGET_COLD, // ROOM_ENV_COLD
+ /* 0x02 */ FIDGET_WARM, // ROOM_ENV_WARM
+ /* 0x03 */ FIDGET_HOT, // ROOM_ENV_HOT (same animations as FIDGET_WARM)
+ /* 0x04 */ FIDGET_STRETCH_1, // ROOM_ENV_UNK_STRETCH_1
+ /* 0x05 */ FIDGET_STRETCH_2, // ROOM_ENV_UNK_STRETCH_1 (same animations as FIDGET_STRETCH_1)
+ /* 0x06 */ FIDGET_STRETCH_3, // ROOM_ENV_UNK_STRETCH_1 (same animations as FIDGET_STRETCH_1)
+ /* 0x07 */ FIDGET_CRIT_HEALTH_START,
+ /* 0x08 */ FIDGET_CRIT_HEALTH_LOOP,
+ /* 0x09 */ FIDGET_SWORD_SWING,
+ /* 0x0A */ FIDGET_ADJUST_TUNIC,
+ /* 0x0B */ FIDGET_TAP_FEET,
+ /* 0x0C */ FIDGET_ADJUST_SHIELD,
+ /* 0x0D */ FIDGET_SWORD_SWING_TWO_HAND
+} FidgetType;
+
+static LinkAnimationHeader* sFidgetAnimations[][2] = {
+ // FIDGET_LOOK_AROUND
{ &gPlayerAnim_link_normal_wait_typeA_20f, &gPlayerAnim_link_normal_waitF_typeA_20f },
+
+ // FIDGET_COLD
{ &gPlayerAnim_link_normal_wait_typeC_20f, &gPlayerAnim_link_normal_waitF_typeC_20f },
+
+ // FIDGET_WARM
{ &gPlayerAnim_link_normal_wait_typeB_20f, &gPlayerAnim_link_normal_waitF_typeB_20f },
+
+ // FIDGET_HOT
{ &gPlayerAnim_link_normal_wait_typeB_20f, &gPlayerAnim_link_normal_waitF_typeB_20f },
+
+ // FIDGET_STRETCH_1
{ &gPlayerAnim_link_wait_typeD_20f, &gPlayerAnim_link_waitF_typeD_20f },
+
+ // FIDGET_STRETCH_2
{ &gPlayerAnim_link_wait_typeD_20f, &gPlayerAnim_link_waitF_typeD_20f },
+
+ // FIDGET_STRETCH_3
{ &gPlayerAnim_link_wait_typeD_20f, &gPlayerAnim_link_waitF_typeD_20f },
+
+ // FIDGET_CRIT_HEALTH_START
{ &gPlayerAnim_link_wait_heat1_20f, &gPlayerAnim_link_waitF_heat1_20f },
+
+ // FIDGET_CRIT_HEALTH_LOOP
{ &gPlayerAnim_link_wait_heat2_20f, &gPlayerAnim_link_waitF_heat2_20f },
+
+ // FIDGET_SWORD_SWING
{ &gPlayerAnim_link_wait_itemD1_20f, &gPlayerAnim_link_wait_itemD1_20f },
+
+ // FIDGET_ADJUST_TUNIC
{ &gPlayerAnim_link_wait_itemA_20f, &gPlayerAnim_link_waitF_itemA_20f },
+
+ // FIDGET_TAP_FEET
{ &gPlayerAnim_link_wait_itemB_20f, &gPlayerAnim_link_waitF_itemB_20f },
+
+ // FIDGET_ADJUST_SHIELD
{ &gPlayerAnim_link_wait_itemC_20f, &gPlayerAnim_link_wait_itemC_20f },
+
+ // FIDGET_SWORD_SWING_TWO_HAND
{ &gPlayerAnim_link_wait_itemD2_20f, &gPlayerAnim_link_wait_itemD2_20f }
};
-static AnimSfxEntry D_80853DEC[] = {
+static AnimSfxEntry sFidgetAnimSfxSneeze[] = {
{ NA_SE_VO_LI_SNEEZE, -ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 8) },
};
-static AnimSfxEntry D_80853DF0[] = {
+static AnimSfxEntry sFidgetAnimSfxSweat[] = {
{ NA_SE_VO_LI_SWEAT, -ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 18) },
};
-static AnimSfxEntry D_80853DF4[] = {
+static AnimSfxEntry sFidgetAnimSfxCritHealthStart[] = {
{ NA_SE_VO_LI_BREATH_REST, -ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 13) },
};
-static AnimSfxEntry D_80853DF8[] = {
+static AnimSfxEntry sFidgetAnimSfxCritHealthLoop[] = {
{ NA_SE_VO_LI_BREATH_REST, -ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 10) },
};
-static AnimSfxEntry D_80853DFC[] = {
+static AnimSfxEntry sFidgetAnimSfxTunic[] = {
{ NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 44) },
{ NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 48) },
{ NA_SE_PL_CALM_HIT, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 52) },
@@ -1157,41 +1209,96 @@ static AnimSfxEntry D_80853DFC[] = {
{ NA_SE_PL_CALM_HIT, -ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 60) },
};
-static AnimSfxEntry D_80853E10[] = {
+static AnimSfxEntry sFidgetAnimSfxTapFeet[] = {
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 25) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 30) },
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 44) }, { 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 48) },
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 52) }, { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 56) },
};
-static AnimSfxEntry D_80853E28[] = {
+static AnimSfxEntry sFidgetAnimSfxShield[] = {
{ NA_SE_IT_SHIELD_POSTURE, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 16) },
{ NA_SE_IT_SHIELD_POSTURE, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 20) },
{ NA_SE_IT_SHIELD_POSTURE, -ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 70) },
};
-static AnimSfxEntry D_80853E34[] = {
+static AnimSfxEntry sFidgetAnimSfxSword[] = {
{ NA_SE_IT_HAMMER_SWING, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 10) },
{ NA_SE_VO_LI_AUTO_JUMP, ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 10) },
{ NA_SE_IT_SWORD_SWING, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 22) },
{ NA_SE_VO_LI_SWORD_N, -ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 22) },
};
-static AnimSfxEntry D_80853E44[] = {
+static AnimSfxEntry sFidgetAnimSfxSwordTwoHand[] = {
{ NA_SE_IT_SWORD_SWING, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 39) },
{ NA_SE_VO_LI_SWORD_N, -ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 39) },
};
-static AnimSfxEntry D_80853E4C[] = {
+static AnimSfxEntry sFidgetAnimSfxStretch[] = {
{ NA_SE_VO_LI_RELAX, -ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 20) },
};
-static AnimSfxEntry* D_80853E50[] = {
- D_80853DEC, D_80853DF0, D_80853DF4, D_80853DF8, D_80853DFC, D_80853E10,
- D_80853E28, D_80853E34, D_80853E44, D_80853E4C, NULL,
+typedef enum FidgetAnimSfxType {
+ /* 0x0 */ FIDGET_ANIMSFX_NONE,
+ /* 0x1 */ FIDGET_ANIMSFX_SNEEZE,
+ /* 0x2 */ FIDGET_ANIMSFX_SWEAT,
+ /* 0x3 */ FIDGET_ANIMSFX_CRIT_HEALTH_START,
+ /* 0x4 */ FIDGET_ANIMSFX_CRIT_HEALTH_LOOP,
+ /* 0x5 */ FIDGET_ANIMSFX_TUNIC,
+ /* 0x6 */ FIDGET_ANIMSFX_TAP_FEET,
+ /* 0x7 */ FIDGET_ANIMSFX_SHIELD,
+ /* 0x8 */ FIDGET_ANIMSFX_SWORD,
+ /* 0x9 */ FIDGET_ANIMSFX_SWORD_TWO_HAND,
+ /* 0xA */ FIDGET_ANIMSFX_STRETCH
+} FidgetAnimSfxType;
+
+static AnimSfxEntry* sFidgetAnimSfxLists[] = {
+ sFidgetAnimSfxSneeze, // FIDGET_ANIMSFX_SNEEZE
+ sFidgetAnimSfxSweat, // FIDGET_ANIMSFX_SWEAT
+ sFidgetAnimSfxCritHealthStart, // FIDGET_ANIMSFX_CRIT_HEALTH_START
+ sFidgetAnimSfxCritHealthLoop, // FIDGET_ANIMSFX_CRIT_HEALTH_LOOP
+ sFidgetAnimSfxTunic, // FIDGET_ANIMSFX_TUNIC
+ sFidgetAnimSfxTapFeet, // FIDGET_ANIMSFX_TAP_FEET
+ sFidgetAnimSfxShield, // FIDGET_ANIMSFX_SHIELD
+ sFidgetAnimSfxSword, // FIDGET_ANIMSFX_SWORD
+ sFidgetAnimSfxSwordTwoHand, // FIDGET_ANIMSFX_SWORD_TWO_HAND
+ sFidgetAnimSfxStretch, // FIDGET_ANIMSFX_STRETCH
+ NULL, // unused entry
};
-static u8 D_80853E7C[] = {
- 0, 0, 1, 1, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 3, 3, 4, 4, 8, 8, 5, 5, 6, 6, 7, 7, 9, 9, 0,
+/**
+ * The indices in this array correspond 1 to 1 with the entries of sFidgetAnimations.
+ * There is also an extra FIDGET_ANIMSFX_NONE at the end that doesn't correspond to any animation.
+ */
+static u8 sFidgetAnimSfxTypes[] = {
+ FIDGET_ANIMSFX_NONE, // FIDGET_LOOK_AROUND
+ FIDGET_ANIMSFX_NONE, // FIDGET_LOOK_AROUND (sword/shield in hand)
+ FIDGET_ANIMSFX_SNEEZE, // FIDGET_COLD
+ FIDGET_ANIMSFX_SNEEZE, // FIDGET_COLD (sword/shield in hand)
+ FIDGET_ANIMSFX_SWEAT, // FIDGET_WARM
+ FIDGET_ANIMSFX_SWEAT, // FIDGET_WARM (sword/shield in hand)
+ FIDGET_ANIMSFX_SWEAT, // FIDGET_HOT
+ FIDGET_ANIMSFX_SWEAT, // FIDGET_HOT (sword/shield in hand)
+ FIDGET_ANIMSFX_STRETCH, // FIDGET_STRETCH_1
+ FIDGET_ANIMSFX_STRETCH, // FIDGET_STRETCH_1 (sword/shield in hand)
+ FIDGET_ANIMSFX_STRETCH, // FIDGET_STRETCH_2
+ FIDGET_ANIMSFX_STRETCH, // FIDGET_STRETCH_2 (sword/shield in hand)
+ FIDGET_ANIMSFX_STRETCH, // FIDGET_STRETCH_3
+ FIDGET_ANIMSFX_STRETCH, // FIDGET_STRETCH_3 (sword/shield in hand)
+ FIDGET_ANIMSFX_CRIT_HEALTH_START, // FIDGET_CRIT_HEALTH_START
+ FIDGET_ANIMSFX_CRIT_HEALTH_START, // FIDGET_CRIT_HEALTH_START (sword/shield in hand)
+ FIDGET_ANIMSFX_CRIT_HEALTH_LOOP, // FIDGET_CRIT_HEALTH_LOOP
+ FIDGET_ANIMSFX_CRIT_HEALTH_LOOP, // FIDGET_CRIT_HEALTH_LOOP (sword/shield in hand)
+ FIDGET_ANIMSFX_SWORD, // FIDGET_SWORD_SWING
+ FIDGET_ANIMSFX_SWORD, // FIDGET_SWORD_SWING (sword/shield in hand)
+ FIDGET_ANIMSFX_TUNIC, // FIDGET_ADJUST_TUNIC
+ FIDGET_ANIMSFX_TUNIC, // FIDGET_ADJUST_TUNIC (sword/shield in hand)
+ FIDGET_ANIMSFX_TAP_FEET, // FIDGET_TAP_FEET
+ FIDGET_ANIMSFX_TAP_FEET, // FIDGET_TAP_FEET (sword/shield in hand)
+ FIDGET_ANIMSFX_SHIELD, // FIDGET_ADJUST_SHIELD
+ FIDGET_ANIMSFX_SHIELD, // FIDGET_ADJUST_SHIELD (sword/shield in hand)
+ FIDGET_ANIMSFX_SWORD_TWO_HAND, // FIDGET_SWORD_SWING_TWO_HAND
+ FIDGET_ANIMSFX_SWORD_TWO_HAND, // FIDGET_SWORD_SWING_TWO_HAND (sword/shield in hand)
+ FIDGET_ANIMSFX_NONE, // unused, doesnt correspond to any animation
};
// Used to map item IDs to item actions
@@ -1624,16 +1731,15 @@ BAD_RETURN(s32) Player_ZeroSpeedXZ(Player* this) {
this->speedXZ = 0.0f;
}
-// return type can't be void due to regalloc in func_8083F72C
BAD_RETURN(s32) func_80832224(Player* this) {
Player_ZeroSpeedXZ(this);
this->unk_6AD = 0;
}
-s32 func_8083224C(PlayState* play) {
+s32 Player_IsTalking(PlayState* play) {
Player* this = GET_PLAYER(play);
- return CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_TALK);
+ return ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_TALK);
}
void Player_AnimPlayOnce(PlayState* play, Player* this, LinkAnimationHeader* anim) {
@@ -1652,7 +1758,7 @@ void Player_AnimPlayOnceAdjusted(PlayState* play, Player* this, LinkAnimationHea
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, anim, PLAYER_ANIM_ADJUSTED_SPEED);
}
-void func_808322FC(Player* this) {
+void Player_ApplyYawFromAnim(Player* this) {
this->actor.shape.rot.y += this->skelAnime.jointTable[1].y;
this->skelAnime.jointTable[1].y = 0;
}
@@ -1685,24 +1791,32 @@ void Player_DetachHeldActor(PlayState* play, Player* this) {
this->heldActor = NULL;
this->interactRangeActor = NULL;
heldActor->parent = NULL;
- this->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ this->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
+#if OOT_VERSION < NTSC_1_1
+ if (Player_GetExplosiveHeld(this) >= 0) {
+ Player_InitItemAction(play, this, PLAYER_IA_NONE);
+ this->heldItemId = ITEM_NONE_FE;
+ }
+#endif
}
+#if OOT_VERSION >= NTSC_1_1
if (Player_GetExplosiveHeld(this) >= 0) {
Player_InitItemAction(play, this, PLAYER_IA_NONE);
this->heldItemId = ITEM_NONE_FE;
}
+#endif
}
void func_80832440(PlayState* play, Player* this) {
- if ((this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) && (this->heldActor == NULL)) {
+ if ((this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (this->heldActor == NULL)) {
if (this->interactRangeActor != NULL) {
if (this->getItemId == GI_NONE) {
- this->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ this->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
this->interactRangeActor = NULL;
}
} else {
- this->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ this->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
}
}
@@ -1876,10 +1990,13 @@ void Player_ProcessAnimSfxList(Player* this, AnimSfxEntry* entry) {
Player_PlayJumpingSfx(this);
} else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_WALKING)) {
Player_PlaySteppingSfx(this, 0.0f);
- } else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_UNKNOWN)) {
+ }
+#if OOT_VERSION >= PAL_1_0
+ else if (type == ANIMSFX_SHIFT_TYPE(ANIMSFX_TYPE_UNKNOWN)) {
func_800F4010(&this->actor.projectedPos,
NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_WOOD + this->ageProperties->unk_94, 0.0f);
}
+#endif
}
cont = (entry->data >= 0); // stop processing if `data` is negative
@@ -1917,13 +2034,14 @@ s32 func_80832CB0(PlayState* play, Player* this, LinkAnimationHeader* anim) {
}
}
-void Player_SkelAnimeResetPrevTranslRot(Player* this) {
+void Player_ResetAnimMovement(Player* this) {
this->skelAnime.prevTransl = this->skelAnime.baseTransl;
this->skelAnime.prevRot = this->actor.shape.rot.y;
}
-void Player_SkelAnimeResetPrevTranslRotAgeScale(Player* this) {
- Player_SkelAnimeResetPrevTranslRot(this);
+void Player_ResetAnimMovementScaledByAge(Player* this) {
+ Player_ResetAnimMovement(this);
+
this->skelAnime.prevTransl.x *= this->ageProperties->unk_08;
this->skelAnime.prevTransl.y *= this->ageProperties->unk_08;
this->skelAnime.prevTransl.z *= this->ageProperties->unk_08;
@@ -1933,71 +2051,115 @@ void Player_ZeroRootLimbYaw(Player* this) {
this->skelAnime.jointTable[1].y = 0;
}
-void func_80832DBC(Player* this) {
- if (this->skelAnime.moveFlags != 0) {
- func_808322FC(this);
+/**
+ * Finishes "AnimMovement" by resetting various aspects of Player's SkelAnime structure.
+ *
+ * This function is called in Player_SetupAction so it will run on every action change, but
+ * it can also be called within action functions to change animations in the middle of an action.
+ */
+void Player_FinishAnimMovement(Player* this) {
+ if (this->skelAnime.movementFlags != 0) {
+ Player_ApplyYawFromAnim(this);
+
this->skelAnime.jointTable[0].x = this->skelAnime.baseTransl.x;
this->skelAnime.jointTable[0].z = this->skelAnime.baseTransl.z;
- if (this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_SETMOVE) {
- if (this->skelAnime.moveFlags & ANIM_FLAG_UPDATE_Y) {
+
+ if (this->skelAnime.movementFlags & ANIM_FLAG_ENABLE_MOVEMENT) {
+ if (this->skelAnime.movementFlags & ANIM_FLAG_UPDATE_Y) {
this->skelAnime.jointTable[0].y = this->skelAnime.prevTransl.y;
}
} else {
this->skelAnime.jointTable[0].y = this->skelAnime.baseTransl.y;
}
- Player_SkelAnimeResetPrevTranslRot(this);
- this->skelAnime.moveFlags = 0;
+
+ Player_ResetAnimMovement(this);
+
+ this->skelAnime.movementFlags = 0;
}
}
-void func_80832E48(Player* this, s32 flags) {
- Vec3f pos;
+/**
+ * This is a reimplementation of `AnimTask_ActorMovement`.
+ *
+ * This achieves the same goal as `AnimTask_ActorMovement`but it adds
+ * the ability to scale the resulting movement according to age.
+ *
+ * When using the AnimTask variant, age specific scaling can only be applied visually
+ * to the root bone position and does not affect world position.
+ */
+void Player_ApplyAnimMovementScaledByAge(Player* this, s32 movementFlags) {
+ Vec3f diff;
- this->skelAnime.moveFlags = flags;
+ this->skelAnime.movementFlags = movementFlags;
this->skelAnime.prevTransl = this->skelAnime.baseTransl;
- SkelAnime_UpdateTranslation(&this->skelAnime, &pos, this->actor.shape.rot.y);
- if (flags & 1) {
+ SkelAnime_UpdateTranslation(&this->skelAnime, &diff, this->actor.shape.rot.y);
+
+ if (movementFlags & ANIM_FLAG_UPDATE_XZ) {
if (!LINK_IS_ADULT) {
- pos.x *= 0.64f;
- pos.z *= 0.64f;
+ diff.x *= 0.64f;
+ diff.z *= 0.64f;
}
- this->actor.world.pos.x += pos.x * this->actor.scale.x;
- this->actor.world.pos.z += pos.z * this->actor.scale.z;
+
+ this->actor.world.pos.x += diff.x * this->actor.scale.x;
+ this->actor.world.pos.z += diff.z * this->actor.scale.z;
}
- if (flags & 2) {
- if (!(flags & 4)) {
- pos.y *= this->ageProperties->unk_08;
+ if (movementFlags & ANIM_FLAG_UPDATE_Y) {
+ if (!(movementFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT)) {
+ diff.y *= this->ageProperties->unk_08;
}
- this->actor.world.pos.y += pos.y * this->actor.scale.y;
+
+ this->actor.world.pos.y += diff.y * this->actor.scale.y;
}
- func_808322FC(this);
+ Player_ApplyYawFromAnim(this);
}
-#define ANIM_REPLACE_APPLY_FLAG_8 (1 << 8)
-#define ANIM_REPLACE_APPLY_FLAG_9 (1 << 9)
+#define PLAYER_ANIM_MOVEMENT_RESET (1 << 8)
+#define PLAYER_ANIM_MOVEMENT_RESET_BY_AGE (1 << 9)
-void Player_AnimReplaceApplyFlags(PlayState* play, Player* this, s32 flags) {
- if (flags & ANIM_REPLACE_APPLY_FLAG_9) {
- Player_SkelAnimeResetPrevTranslRotAgeScale(this);
- } else if ((flags & ANIM_REPLACE_APPLY_FLAG_8) || (this->skelAnime.moveFlags != 0)) {
- Player_SkelAnimeResetPrevTranslRot(this);
+/**
+ * Starts "AnimMovement" so that Player will move according to the translation and rotation specified
+ * by the animation that is playing.
+ *
+ * The `flags` field can be any of the SkelAnime system's `ANIM_FLAG_` flags, as well as Player-specific
+ * `PLAYER_ANIM_MOVEMENT_` flags.
+ *
+ * For AnimMovement features to be enabled, it is usually required to pass `ANIM_FLAG_ENABLE_MOVEMENT`
+ * as one of the flags, but there are a few niche cases where it can be desirable to omit it
+ * (for example to use `ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT` without any actual AnimMovement).
+ *
+ * Note: AnimMovement is always disabled during every action change.
+ * This means the order that functions are called matters.
+ * `Player_StartAnimMovement` must be called *after* a call to `Player_SetupAction`.
+ */
+void Player_StartAnimMovement(PlayState* play, Player* this, s32 flags) {
+ if (flags & PLAYER_ANIM_MOVEMENT_RESET_BY_AGE) {
+ Player_ResetAnimMovementScaledByAge(this);
+ } else if ((flags & PLAYER_ANIM_MOVEMENT_RESET) || (this->skelAnime.movementFlags != 0)) {
+ // If AnimMovement is already in use when this function is called and
+ // `PLAYER_ANIM_MOVEMENT_RESET_BY_AGE` is not set, then this case will be used.
+ Player_ResetAnimMovement(this);
} else {
+ // Default case used when AnimMovement was not enabled previously.
+ // This sets prevTransl and prevRot to Players current translation and yaw.
this->skelAnime.prevTransl = this->skelAnime.jointTable[0];
this->skelAnime.prevRot = this->actor.shape.rot.y;
}
- this->skelAnime.moveFlags = flags & 0xFF;
+ // Remove Player specific flags by masking the lower byte before setting to `skelAnime.movementFlags`
+ this->skelAnime.movementFlags = flags & 0xFF;
+
Player_ZeroSpeedXZ(this);
AnimTaskQueue_DisableTransformTasksForGroup(play);
}
+// TODO: Change all of these wrapper functions below to use "AnimMovement" instead of "AnimReplace"
void Player_AnimReplacePlayOnceSetSpeed(PlayState* play, Player* this, LinkAnimationHeader* anim, s32 flags,
f32 playbackSpeed) {
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, anim, playbackSpeed);
- Player_AnimReplaceApplyFlags(play, this, flags);
+ Player_StartAnimMovement(play, this, flags);
}
void Player_AnimReplacePlayOnce(PlayState* play, Player* this, LinkAnimationHeader* anim, s32 flags) {
@@ -2010,14 +2172,14 @@ void Player_AnimReplacePlayOnceAdjusted(PlayState* play, Player* this, LinkAnima
void Player_AnimReplaceNormalPlayOnceAdjusted(PlayState* play, Player* this, LinkAnimationHeader* anim) {
Player_AnimReplacePlayOnceAdjusted(play, this, anim,
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS);
}
void Player_AnimReplacePlayLoopSetSpeed(PlayState* play, Player* this, LinkAnimationHeader* anim, s32 flags,
f32 playbackSpeed) {
LinkAnimation_PlayLoopSetSpeed(play, &this->skelAnime, anim, playbackSpeed);
- Player_AnimReplaceApplyFlags(play, this, flags);
+ Player_StartAnimMovement(play, this, flags);
}
void Player_AnimReplacePlayLoop(PlayState* play, Player* this, LinkAnimationHeader* anim, s32 flags) {
@@ -2030,7 +2192,7 @@ void Player_AnimReplacePlayLoopAdjusted(PlayState* play, Player* this, LinkAnima
void Player_AnimReplaceNormalPlayLoopAdjusted(PlayState* play, Player* this, LinkAnimationHeader* anim) {
Player_AnimReplacePlayLoopAdjusted(play, this, anim,
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS);
}
@@ -2060,7 +2222,7 @@ void Player_ProcessControlStick(PlayState* play, Player* this) {
}
void func_8083328C(PlayState* play, Player* this, LinkAnimationHeader* linkAnim) {
- LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, linkAnim, D_808535E8);
+ LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, linkAnim, sWaterSpeedFactor);
}
int func_808332B8(Player* this) {
@@ -2077,29 +2239,51 @@ void func_808332F4(Player* this, PlayState* play) {
this->unk_862 = ABS(giEntry->gi);
}
-LinkAnimationHeader* func_80833338(Player* this) {
+/**
+ * Get the appropriate Idle animation based on current `modelAnimType`.
+ * This is the default idle animation.
+ *
+ * For fidget idle animations (which can for example, change based on environment)
+ * see `sFidgetAnimations`.
+ */
+LinkAnimationHeader* Player_GetIdleAnim(Player* this) {
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait, this->modelAnimType);
}
-s32 func_80833350(Player* this) {
- if (func_80833338(this) != this->skelAnime.animation) {
- LinkAnimationHeader** entry;
+/**
+ * Return values for `Player_CheckForIdleAnim`
+ */
+#define IDLE_ANIM_DEFAULT -1
+#define IDLE_ANIM_NONE 0
+// Fidget idle anims are returned by index. See `sFidgetAnimations` and `FidgetType`.
+
+/**
+ * Checks if the current animation is an idle animation.
+ * If the current animation is a fidget animation, the index into
+ * `sFidgetAnimations` is returned (plus one).
+ * If the current animation is a default idle animation, -1 is returned.
+ * Lastly if the current animation is neither of these, 0 is returned.
+ */
+s32 Player_CheckForIdleAnim(Player* this) {
+ if (Player_GetIdleAnim(this) != this->skelAnime.animation) {
+ LinkAnimationHeader** fidgetAnim;
s32 i;
- for (i = 0, entry = &D_80853D7C[0][0]; i < 28; i++, entry++) {
- if (this->skelAnime.animation == *entry) {
+ for (i = 0, fidgetAnim = &sFidgetAnimations[0][0]; i < ARRAY_COUNT_2D(sFidgetAnimations); i++, fidgetAnim++) {
+ if (this->skelAnime.animation == *fidgetAnim) {
return i + 1;
}
}
- return 0;
+
+ return IDLE_ANIM_NONE;
}
- return -1;
+ return IDLE_ANIM_DEFAULT;
}
-void func_808333FC(Player* this, s32 arg1) {
- if (D_80853E7C[arg1] != 0) {
- Player_ProcessAnimSfxList(this, D_80853E50[D_80853E7C[arg1] - 1]);
+void Player_ProcessFidgetAnimSfxList(Player* this, s32 fidgetAnimIndex) {
+ if (sFidgetAnimSfxTypes[fidgetAnimIndex] != FIDGET_ANIMSFX_NONE) {
+ Player_ProcessAnimSfxList(this, sFidgetAnimSfxLists[sFidgetAnimSfxTypes[fidgetAnimIndex] - 1]);
}
}
@@ -2165,6 +2349,14 @@ void Player_SetUpperActionFunc(Player* this, UpperActionFunc upperActionFunc) {
func_808326F0(this);
}
+#if OOT_VERSION < NTSC_1_1
+s32 Player_GetMeleeWeaponHeld2(Player* this) {
+ return Player_GetMeleeWeaponHeld(this);
+}
+#else
+#define Player_GetMeleeWeaponHeld2 Player_GetMeleeWeaponHeld
+#endif
+
void Player_InitItemActionWithAnim(PlayState* play, Player* this, s8 itemAction) {
LinkAnimationHeader* current = this->skelAnime.animation;
LinkAnimationHeader** iter = D_80853914 + this->modelAnimType;
@@ -2203,6 +2395,14 @@ s8 Player_ItemToItemAction(s32 item) {
void Player_InitDefaultIA(PlayState* play, Player* this) {
}
+#if OOT_VERSION < NTSC_1_1
+s32 Player_HoldsTwoHandedWeapon2(Player* this) {
+ return Player_HoldsTwoHandedWeapon(this);
+}
+#else
+#define Player_HoldsTwoHandedWeapon2 Player_HoldsTwoHandedWeapon
+#endif
+
void Player_InitDekuStickIA(PlayState* play, Player* this) {
this->unk_85C = 1.0f;
}
@@ -2225,7 +2425,7 @@ void Player_InitExplosiveIA(PlayState* play, Player* this) {
ExplosiveInfo* explosiveInfo;
Actor* spawnedActor;
- if (this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) {
+ if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
Player_PutAwayHeldItem(play, this);
return;
}
@@ -2250,7 +2450,7 @@ void Player_InitExplosiveIA(PlayState* play, Player* this) {
this->heldActor = spawnedActor;
this->getItemId = GI_NONE;
this->unk_3BC.y = spawnedActor->shape.rot.y - this->actor.shape.rot.y;
- this->stateFlags1 |= PLAYER_STATE1_ACTOR_CARRY;
+ this->stateFlags1 |= PLAYER_STATE1_CARRYING_ACTOR;
}
}
@@ -2275,7 +2475,9 @@ void Player_InitItemAction(PlayState* play, Player* this, s8 itemAction) {
this->heldItemAction = this->itemAction = itemAction;
this->modelGroup = this->nextModelGroup;
+#if OOT_VERSION >= NTSC_1_1
this->stateFlags1 &= ~(PLAYER_STATE1_3 | PLAYER_STATE1_USING_BOOMERANG);
+#endif
sItemActionInitFuncs[itemAction](play, this);
@@ -2328,7 +2530,7 @@ void func_80833A20(Player* this, s32 newMeleeWeaponState) {
* This is why the function name states `FriendlyLockOn` instead of `FriendlyActorFocus`.
*
* There is a special case that allows hostile actors to be treated as "friendly" if Player is carrying another actor
- * See relevant code in `func_80836BEC` for more details.
+ * See relevant code in `Player_UpdateZTargeting` for more details.
*
* Additionally, `PLAYER_STATE1_LOCK_ON_FORCED_TO_RELEASE` will be set very briefly in some conditions when
* a lock-on is forced to release. In these niche cases, this function will apply to both friendly and hostile actors.
@@ -2356,7 +2558,7 @@ s32 Player_FriendlyLockOnOrParallel(Player* this) {
*/
s32 Player_UpdateHostileLockOn(Player* this) {
if ((this->focusActor != NULL) &&
- CHECK_FLAG_ALL(this->focusActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) {
+ ACTOR_FLAGS_CHECK_ALL(this->focusActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) {
this->stateFlags1 |= PLAYER_STATE1_HOSTILE_LOCK_ON;
return true;
@@ -2456,7 +2658,7 @@ void Player_ProcessItemButtons(Player* this, PlayState* play) {
}
}
- if (!(this->stateFlags1 & (PLAYER_STATE1_ACTOR_CARRY | PLAYER_STATE1_29)) && !func_8008F128(this)) {
+ if (!(this->stateFlags1 & (PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_29)) && !func_8008F128(this)) {
if (this->itemAction >= PLAYER_IA_FISHING_POLE) {
if (!Player_ItemIsInUse(this, B_BTN_ITEM) && !Player_ItemIsInUse(this, C_BTN_ITEM(0)) &&
!Player_ItemIsInUse(this, C_BTN_ITEM(1)) && !Player_ItemIsInUse(this, C_BTN_ITEM(2))) {
@@ -2544,8 +2746,11 @@ void Player_StartChangingHeldItem(Player* this, PlayState* play) {
}
void Player_UpdateItems(Player* this, PlayState* play) {
- if ((this->actor.category == ACTORCAT_PLAYER) && !(this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) &&
- ((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_22)) &&
+ if ((this->actor.category == ACTORCAT_PLAYER) &&
+#if OOT_VERSION >= NTSC_1_1
+ !(this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) &&
+#endif
+ ((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_SHIELDING)) &&
(gSaveContext.save.info.playerData.health != 0) && (play->csCtx.state == CS_STATE_IDLE) &&
(this->csAction == PLAYER_CSACTION_NONE) && (play->shootingGalleryStatus == 0) &&
(play->activeCamId == CAM_ID_MAIN) && (play->transitionTrigger != TRANS_TRIGGER_START) &&
@@ -2644,7 +2849,7 @@ void func_80834644(PlayState* play, Player* this) {
Player_SetUpperActionFunc(this, sItemActionUpdateFuncs[this->heldItemAction]);
this->unk_834 = 0;
- this->unk_6AC = 0;
+ this->idleType = PLAYER_IDLE_DEFAULT;
Player_DetachHeldActor(play, this);
this->stateFlags1 &= ~PLAYER_STATE1_START_CHANGING_HELD_ITEM;
}
@@ -2664,7 +2869,7 @@ s32 func_80834758(PlayState* play, Player* this) {
LinkAnimationHeader* anim;
f32 frame;
- if (!(this->stateFlags1 & (PLAYER_STATE1_22 | PLAYER_STATE1_23 | PLAYER_STATE1_29)) &&
+ if (!(this->stateFlags1 & (PLAYER_STATE1_SHIELDING | PLAYER_STATE1_23 | PLAYER_STATE1_29)) &&
(play->shootingGalleryStatus == 0) && (this->heldItemAction == this->itemAction) &&
(this->currentShield != PLAYER_SHIELD_NONE) && !Player_IsChildWithHylianShield(this) &&
Player_IsZTargeting(this) && CHECK_BTN_ALL(sControlInput->cur.button, BTN_R)) {
@@ -2724,7 +2929,7 @@ s32 func_8083499C(Player* this, PlayState* play) {
}
/**
- * The actual sword weapon is not handled here. See `Player_ActionChange_7` for melee weapon usage.
+ * The actual sword weapon is not handled here. See `Player_ActionHandler_7` for melee weapon usage.
* This upper body action allows for shielding or changing held items while a sword is in hand.
*/
s32 Player_UpperAction_Sword(Player* this, PlayState* play) {
@@ -2742,16 +2947,16 @@ s32 Player_UpperAction_ChangeHeldItem(Player* this, PlayState* play) {
(sUseHeldItem || ((this->modelAnimType != PLAYER_ANIMTYPE_3) && (play->shootingGalleryStatus == 0)))))) {
Player_SetUpperActionFunc(this, sItemActionUpdateFuncs[this->heldItemAction]);
this->unk_834 = 0;
- this->unk_6AC = 0;
+ this->idleType = PLAYER_IDLE_DEFAULT;
sHeldItemButtonIsHeldDown = sUseHeldItem;
return this->upperActionFunc(this, play);
}
- if (func_80833350(this) != 0) {
+ if (Player_CheckForIdleAnim(this) != IDLE_ANIM_NONE) {
Player_WaitToFinishItemChange(play, this);
- Player_AnimPlayOnce(play, this, func_80833338(this));
- this->unk_6AC = 0;
+ Player_AnimPlayOnce(play, this, Player_GetIdleAnim(this));
+ this->idleType = PLAYER_IDLE_DEFAULT;
} else {
Player_WaitToFinishItemChange(play, this);
}
@@ -2766,7 +2971,7 @@ s32 func_80834B5C(Player* this, PlayState* play) {
func_80834894(this);
return true;
} else {
- this->stateFlags1 |= PLAYER_STATE1_22;
+ this->stateFlags1 |= PLAYER_STATE1_SHIELDING;
Player_SetModelsForHoldingShield(this);
return true;
}
@@ -2782,7 +2987,7 @@ s32 func_80834BD4(Player* this, PlayState* play) {
LinkAnimation_Change(play, &this->upperSkelAnime, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f);
}
- this->stateFlags1 |= PLAYER_STATE1_22;
+ this->stateFlags1 |= PLAYER_STATE1_SHIELDING;
Player_SetModelsForHoldingShield(this);
return true;
@@ -2795,7 +3000,7 @@ s32 func_80834C74(Player* this, PlayState* play) {
Player_SetUpperActionFunc(this, sItemActionUpdateFuncs[this->heldItemAction]);
LinkAnimation_PlayLoop(play, &this->upperSkelAnime,
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait, this->modelAnimType));
- this->unk_6AC = 0;
+ this->idleType = PLAYER_IDLE_DEFAULT;
this->upperActionFunc(this, play);
return false;
@@ -2941,10 +3146,10 @@ s32 func_808351D4(Player* this, PlayState* play) {
sp2C = 1;
}
- Math_ScaledStepToS(&this->unk_6C0, 1200, 400);
- this->unk_6AE |= 0x100;
+ Math_ScaledStepToS(&this->upperLimbRot.z, 1200, 400);
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_UPPER_Z;
- if ((this->unk_836 == 0) && (func_80833350(this) == 0) &&
+ if ((this->unk_836 == 0) && (Player_CheckForIdleAnim(this) == IDLE_ANIM_NONE) &&
(this->skelAnime.animation == &gPlayerAnim_link_bow_side_walk)) {
LinkAnimation_PlayOnce(play, &this->upperSkelAnime, D_808543CC[sp2C]);
this->unk_836 = -1;
@@ -3036,7 +3241,7 @@ s32 func_80835588(Player* this, PlayState* play) {
void Player_SetParallel(Player* this) {
this->stateFlags1 |= PLAYER_STATE1_PARALLEL;
- if (!(this->skelAnime.moveFlags & ANIM_FLAG_OVERRIDE_MOVEMENT) &&
+ if (!(this->skelAnime.movementFlags & ANIM_FLAG_OVERRIDE_MOVEMENT) &&
(this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) && (sShapeYawToTouchedWall < 0x2000)) {
// snap to the wall
this->yaw = this->actor.shape.rot.y = this->actor.wallYaw + 0x8000;
@@ -3063,21 +3268,35 @@ void func_80835688(Player* this, PlayState* play) {
}
s32 Player_UpperAction_CarryActor(Player* this, PlayState* play) {
+#if OOT_VERSION >= NTSC_1_1
Actor* heldActor = this->heldActor;
if (heldActor == NULL) {
func_80834644(play, this);
}
+#endif
if (func_80834758(play, this)) {
return true;
}
- if (this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) {
+ if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
+#if OOT_VERSION < NTSC_1_1
+ Actor* heldActor;
+#endif
+
if (LinkAnimation_Update(play, &this->upperSkelAnime)) {
LinkAnimation_PlayLoop(play, &this->upperSkelAnime, &gPlayerAnim_link_normal_carryB_wait);
}
+#if OOT_VERSION < NTSC_1_1
+ heldActor = this->heldActor;
+ if (heldActor == NULL) {
+ func_80834644(play, this);
+ return true;
+ }
+#endif
+
if ((heldActor->id == ACTOR_EN_NIW) && (this->actor.velocity.y <= 0.0f)) {
this->actor.minVelocityY = -2.0f;
this->actor.gravity = -0.5f;
@@ -3213,49 +3432,68 @@ s32 Player_SetupAction(PlayState* play, Player* this, PlayerActionFunc actionFun
this->actionFunc = actionFunc;
- if ((this->itemAction != this->heldItemAction) && (!(flags & 1) || !(this->stateFlags1 & PLAYER_STATE1_22))) {
+ if ((this->itemAction != this->heldItemAction) &&
+ (!(flags & 1) || !(this->stateFlags1 & PLAYER_STATE1_SHIELDING))) {
func_8008EC70(this);
}
- if (!(flags & 1) && !(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY)) {
+ if (!(flags & 1) && !(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) {
func_80834644(play, this);
- this->stateFlags1 &= ~PLAYER_STATE1_22;
+ this->stateFlags1 &= ~PLAYER_STATE1_SHIELDING;
}
- func_80832DBC(this);
+ Player_FinishAnimMovement(this);
- this->stateFlags1 &= ~(PLAYER_STATE1_2 | PLAYER_STATE1_6 | PLAYER_STATE1_26 | PLAYER_STATE1_28 | PLAYER_STATE1_29 |
- PLAYER_STATE1_31);
- this->stateFlags2 &= ~(PLAYER_STATE2_19 | PLAYER_STATE2_27 | PLAYER_STATE2_28);
+ this->stateFlags1 &= ~(PLAYER_STATE1_2 | PLAYER_STATE1_TALKING | PLAYER_STATE1_26 | PLAYER_STATE1_28 |
+ PLAYER_STATE1_29 | PLAYER_STATE1_31);
+ this->stateFlags2 &= ~(PLAYER_STATE2_19 | PLAYER_STATE2_USING_OCARINA | PLAYER_STATE2_IDLE_FIDGET);
this->stateFlags3 &= ~(PLAYER_STATE3_1 | PLAYER_STATE3_3 | PLAYER_STATE3_FLYING_WITH_HOOKSHOT);
this->av1.actionVar1 = 0;
this->av2.actionVar2 = 0;
- this->unk_6AC = 0;
+ this->idleType = PLAYER_IDLE_DEFAULT;
func_808326F0(this);
return 1;
}
-void func_80835DAC(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 flags) {
- s32 temp;
+/**
+ * Calls `Player_SetupAction` to setup a new action, but takes extra measures to
+ * preserve AnimMovement while doing so.
+ */
+void Player_SetupActionPreserveAnimMovement(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 flags) {
+ s32 savedMovementFlags;
+
+ savedMovementFlags = this->skelAnime.movementFlags;
+
+ // Setting `skelAnime.movementFlags` to 0 will prevent `Player_FinishAnimMovement` from ending
+ // AnimMovement when `Player_SetupAction` is called.
+ this->skelAnime.movementFlags = 0;
- temp = this->skelAnime.moveFlags;
- this->skelAnime.moveFlags = 0;
Player_SetupAction(play, this, actionFunc, flags);
- this->skelAnime.moveFlags = temp;
+ this->skelAnime.movementFlags = savedMovementFlags;
}
-void func_80835DE4(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 flags) {
- s32 temp;
+/**
+ * Calls `Player_SetupAction` to setup a new action, but takes extra measures to
+ * preserve the current itemAction while doing so.
+ *
+ * Note that `itemAction` must be PLAYER_IA_NONE or higher for the action change to take place.
+ */
+void Player_SetupActionPreserveItemAction(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 flags) {
+ s32 savedItemAction;
- if (this->itemAction >= 0) {
- temp = this->itemAction;
+ if (this->itemAction >= PLAYER_IA_NONE) {
+ savedItemAction = this->itemAction;
+
+ // Setting `itemAction` to `heldItemAction` will prevent `func_8008EC70` from running when
+ // `Player_SetupAction` is called.
this->itemAction = this->heldItemAction;
+
Player_SetupAction(play, this, actionFunc, flags);
- this->itemAction = temp;
+ this->itemAction = savedItemAction;
Player_SetModels(this, Player_ActionToModelGroup(this, this->itemAction));
}
}
@@ -3295,7 +3533,7 @@ void Player_UseItem(PlayState* play, Player* this, s32 item) {
itemAction = Player_ItemToItemAction(item);
if (((this->heldItemAction == this->itemAction) &&
- (!(this->stateFlags1 & PLAYER_STATE1_22) || (Player_ActionToMeleeWeapon(itemAction) != 0) ||
+ (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) || (Player_ActionToMeleeWeapon(itemAction) != 0) ||
(itemAction == PLAYER_IA_NONE))) ||
((this->itemAction < 0) && ((Player_ActionToMeleeWeapon(itemAction) != 0) || (itemAction == PLAYER_IA_NONE)))) {
@@ -3451,17 +3689,17 @@ int Player_CanUpdateItems(Player* this) {
*/
s32 Player_UpdateUpperBody(Player* this, PlayState* play) {
if (!(this->stateFlags1 & PLAYER_STATE1_23) && (this->actor.parent != NULL) && Player_HoldsHookshot(this)) {
- Player_SetupAction(play, this, Player_Action_80850AEC, 1);
+ Player_SetupAction(play, this, Player_Action_HookshotFly, 1);
this->stateFlags3 |= PLAYER_STATE3_FLYING_WITH_HOOKSHOT;
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_hook_fly_start);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE |
- ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT |
+ ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
func_80832224(this);
this->yaw = this->actor.shape.rot.y;
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND;
this->hoverBootsTimer = 0;
- this->unk_6AE |= 0x43;
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_FOCUS_X | UNK6AE_ROT_FOCUS_Y | UNK6AE_ROT_UPPER_X;
Player_PlayVoiceSfx(this, NA_SE_VO_LI_LASH);
return true;
}
@@ -3480,14 +3718,14 @@ s32 Player_UpdateUpperBody(Player* this, PlayState* play) {
if (this->upperAnimInterpWeight != 0.0f) {
// The functionality contained within this block of code is never used in practice
// because `upperAnimInterpWeight` is always 0.
- if ((func_80833350(this) == 0) || (this->speedXZ != 0.0f)) {
+ if ((Player_CheckForIdleAnim(this) == IDLE_ANIM_NONE) || (this->speedXZ != 0.0f)) {
AnimTaskQueue_AddCopyUsingMapInverted(play, this->skelAnime.limbCount, this->upperSkelAnime.jointTable,
this->skelAnime.jointTable, sUpperBodyLimbCopyMap);
}
Math_StepToF(&this->upperAnimInterpWeight, 0.0f, 0.25f);
AnimTaskQueue_AddInterp(play, this->skelAnime.limbCount, this->skelAnime.jointTable,
this->upperSkelAnime.jointTable, 1.0f - this->upperAnimInterpWeight);
- } else if ((func_80833350(this) == 0) || (this->speedXZ != 0.0f)) {
+ } else if ((Player_CheckForIdleAnim(this) == IDLE_ANIM_NONE) || (this->speedXZ != 0.0f)) {
// Only copy the upper body animation to the upper body limbs in the main skeleton.
// Doing so allows the main skeleton to play its own animation for the lower body limbs.
AnimTaskQueue_AddCopyUsingMap(play, this->skelAnime.limbCount, this->skelAnime.jointTable,
@@ -3549,52 +3787,94 @@ void Player_UpdateShapeYaw(Player* this, PlayState* play) {
this->unk_87C = this->actor.shape.rot.y - previousYaw;
}
-s32 func_808369C8(s16* pValue, s16 arg1, s16 arg2, s16 arg3, s16 arg4, s16 arg5) {
- s16 temp1;
- s16 temp2;
- s16 temp3;
+/**
+ * Step a value by `step` to a `target` value.
+ * Constrains the value to be no further than `constraintRange` from `constraintMid` (accounting for wrapping).
+ * Constrains the value to be no further than `overflowRange` from 0.
+ * If this second constraint is enforced, return how much the value was past by the range, or return 0.
+ *
+ * @return The amount by which the value overflowed the absolute range defined by `overflowRange`
+ */
+s32 Player_ScaledStepBinangClamped(s16* pValue, s16 target, s16 step, s16 overflowRange, s16 constraintMid,
+ s16 constraintRange) {
+ s16 diff;
+ s16 clampedDiff;
+ s16 valueBeforeOverflowClamp;
- temp1 = temp2 = arg4 - *pValue;
- temp2 = CLAMP(temp2, -arg5, arg5);
- *pValue += (s16)(temp1 - temp2);
+ // Clamp value to [constraintMid - constraintRange , constraintMid + constraintRange]
+ // This is more involved than a simple `CLAMP`, to account for binang wrapping
+ diff = clampedDiff = constraintMid - *pValue;
+ clampedDiff = CLAMP(clampedDiff, -constraintRange, constraintRange);
+ *pValue += (s16)(diff - clampedDiff);
- Math_ScaledStepToS(pValue, arg1, arg2);
+ Math_ScaledStepToS(pValue, target, step);
- temp3 = *pValue;
- if (*pValue < -arg3) {
- *pValue = -arg3;
- } else if (*pValue > arg3) {
- *pValue = arg3;
+ valueBeforeOverflowClamp = *pValue;
+ if (*pValue < -overflowRange) {
+ *pValue = -overflowRange;
+ } else if (*pValue > overflowRange) {
+ *pValue = overflowRange;
}
- return temp3 - *pValue;
+ return valueBeforeOverflowClamp - *pValue;
}
s32 func_80836AB8(Player* this, s32 arg1) {
- s16 sp36;
- s16 var;
+ s16 targetUpperBodyYaw;
+ s16 yaw;
- var = this->actor.shape.rot.y;
- if (arg1 != 0) {
- var = this->actor.focus.rot.y;
- this->unk_6BC = this->actor.focus.rot.x;
- this->unk_6AE |= 0x41;
+ yaw = this->actor.shape.rot.y;
+ if (arg1) {
+ yaw = this->actor.focus.rot.y;
+ this->upperLimbRot.x = this->actor.focus.rot.x;
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_FOCUS_X | UNK6AE_ROT_UPPER_X;
} else {
- func_808369C8(&this->unk_6BC,
- func_808369C8(&this->unk_6B6, this->actor.focus.rot.x, 600, 10000, this->actor.focus.rot.x, 0),
- 200, 4000, this->unk_6B6, 10000);
- sp36 = this->actor.focus.rot.y - var;
- func_808369C8(&sp36, 0, 200, 24000, this->unk_6BE, 8000);
- var = this->actor.focus.rot.y - sp36;
- func_808369C8(&this->unk_6B8, sp36 - this->unk_6BE, 200, 8000, sp36, 8000);
- func_808369C8(&this->unk_6BE, sp36, 200, 8000, this->unk_6B8, 8000);
- this->unk_6AE |= 0xD9;
+ // Step the head pitch to the focus pitch.
+ // If the head cannot be pitched enough, pitch the upper body.
+ Player_ScaledStepBinangClamped(&this->upperLimbRot.x,
+ Player_ScaledStepBinangClamped(&this->headLimbRot.x, this->actor.focus.rot.x,
+ 600, 10000, this->actor.focus.rot.x, 0),
+ 200, 4000, this->headLimbRot.x, 10000);
+
+ // Step the upper body and head yaw to the focus yaw.
+ // Eventually prefers turning the upper body rather than the head.
+ targetUpperBodyYaw = this->actor.focus.rot.y - yaw;
+ Player_ScaledStepBinangClamped(&targetUpperBodyYaw, 0, 200, 24000, this->upperLimbRot.y, 8000);
+ yaw = this->actor.focus.rot.y - targetUpperBodyYaw;
+ Player_ScaledStepBinangClamped(&this->headLimbRot.y, targetUpperBodyYaw - this->upperLimbRot.y, 200, 8000,
+ targetUpperBodyYaw, 8000);
+ Player_ScaledStepBinangClamped(&this->upperLimbRot.y, targetUpperBodyYaw, 200, 8000, this->headLimbRot.y, 8000);
+
+ this->unk_6AE_rotFlags |=
+ UNK6AE_ROT_FOCUS_X | UNK6AE_ROT_HEAD_X | UNK6AE_ROT_HEAD_Y | UNK6AE_ROT_UPPER_X | UNK6AE_ROT_UPPER_Y;
}
- return var;
+ return yaw;
}
-// Player_UpdateZTargeting
-void func_80836BEC(Player* this, PlayState* play) {
+/**
+ * Updates state related to Z-Targeting.
+ *
+ * Z-Targeting is an umbrella term for two main states:
+ * - Actor Lock-on: Player has locked onto an actor, a reticle appears, both Player and the camera focus on the actor.
+ * - Parallel: Player and the camera keep facing the same angle from when Z was pressed. Can snap to walls.
+ * This state occurs when there are no actors available to lock onto.
+ *
+ * First this function updates `zTargetActiveTimer`. For most Z-Target related states to update, this
+ * timer has to have a non-zero value. Additionally, the timer must have a value of 5 or greater
+ * for the Attention system to recognize that an actor lock-on is active.
+ *
+ * Following this, a next lock-on actor is chosen. If there is currently no actor lock-on active, the actor
+ * Navi is hovering over will be chosen. If there is an active lock-on, the next available
+ * lock-on will be the actor with an arrow hovering above it.
+ *
+ * If the above regarding actor lock-on does not occur, then Z-Parallel can begin.
+ *
+ * Lastly, the function handles updating general "actor focus" state. This applies to non Z-Target states
+ * like talking to an actor. If the current focus actor is not considered "hostile", then
+ * `PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS` can be set. This flag being set will trigger `Player_UpdateCamAndSeqModes`
+ * to make the camera focus on the current focus actor.
+ */
+void Player_UpdateZTargeting(Player* this, PlayState* play) {
s32 ignoreLeash = false;
s32 zButtonHeld = CHECK_BTN_ALL(sControlInput->cur.button, BTN_Z);
Actor* nextLockOnActor;
@@ -3611,7 +3891,8 @@ void func_80836BEC(Player* this, PlayState* play) {
(this->stateFlags3 & PLAYER_STATE3_FLYING_WITH_HOOKSHOT)) {
// Don't allow Z-Targeting in various states
this->zTargetActiveTimer = 0;
- } else if (zButtonHeld || (this->stateFlags2 & PLAYER_STATE2_LOCK_ON_WITH_SWITCH) || (this->unk_684 != NULL)) {
+ } else if (zButtonHeld || (this->stateFlags2 & PLAYER_STATE2_LOCK_ON_WITH_SWITCH) ||
+ (this->autoLockOnActor != NULL)) {
// While a lock-on is active, decrement the timer and hold it at 5.
// Values under 5 indicate a lock-on has ended and will make the reticle release.
// See usage toward the end of `Actor_UpdateAll`.
@@ -3639,7 +3920,7 @@ void func_80836BEC(Player* this, PlayState* play) {
ignoreLeash = true;
}
- isTalking = func_8083224C(play);
+ isTalking = Player_IsTalking(play);
if (isTalking || (this->zTargetActiveTimer != 0) ||
(this->stateFlags1 & (PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_BOOMERANG_THROWN))) {
@@ -3680,10 +3961,10 @@ void func_80836BEC(Player* this, PlayState* play) {
this->focusActor = nextLockOnActor;
this->zTargetActiveTimer = 15;
- this->stateFlags2 &= ~(PLAYER_STATE2_1 | PLAYER_STATE2_21);
+ this->stateFlags2 &= ~(PLAYER_STATE2_CAN_ACCEPT_TALK_OFFER | PLAYER_STATE2_21);
} else {
if (!usingHoldTargeting) {
- func_8008EDF0(this);
+ Player_ReleaseLockOn(this);
}
}
@@ -3697,15 +3978,19 @@ void func_80836BEC(Player* this, PlayState* play) {
}
if (this->focusActor != NULL) {
- if ((this->actor.category == ACTORCAT_PLAYER) && (this->focusActor != this->unk_684) &&
+ if ((this->actor.category == ACTORCAT_PLAYER) && (this->focusActor != this->autoLockOnActor) &&
Attention_ShouldReleaseLockOn(this->focusActor, this, ignoreLeash)) {
- func_8008EDF0(this);
+ Player_ReleaseLockOn(this);
this->stateFlags1 |= PLAYER_STATE1_LOCK_ON_FORCED_TO_RELEASE;
} else if (this->focusActor != NULL) {
this->focusActor->attentionPriority = 40;
}
- } else if (this->unk_684 != NULL) {
- this->focusActor = this->unk_684;
+ } else if (this->autoLockOnActor != NULL) {
+ // Because of the previous if condition above, `autoLockOnActor` does not take precedence
+ // over `focusActor` if it already exists.
+ // However, `autoLockOnActor` is expected to be set with `Player_SetAutoLockOnActor`
+ // which will release any existing lock-on before setting the new one.
+ this->focusActor = this->autoLockOnActor;
}
}
@@ -3717,19 +4002,19 @@ void func_80836BEC(Player* this, PlayState* play) {
// When carrying another actor, `PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS` will be set even if the actor
// is hostile. This is a special case to allow Player to have more freedom of movement and be able
// to throw a carried actor at the lock-on actor, even if it is hostile.
- if ((this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) ||
- !CHECK_FLAG_ALL(this->focusActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) {
+ if ((this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) ||
+ !ACTOR_FLAGS_CHECK_ALL(this->focusActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) {
this->stateFlags1 |= PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS;
}
} else {
if (this->stateFlags1 & PLAYER_STATE1_PARALLEL) {
this->stateFlags2 &= ~PLAYER_STATE2_LOCK_ON_WITH_SWITCH;
} else {
- func_8008EE08(this);
+ Player_ClearZTargeting(this);
}
}
} else {
- func_8008EE08(this);
+ Player_ClearZTargeting(this);
}
}
@@ -3816,8 +4101,14 @@ s32 Player_CalcSpeedAndYawFromControlStick(PlayState* play, Player* this, f32* o
return false;
}
-s32 func_8083721C(Player* this) {
- return Math_StepToF(&this->speedXZ, 0.0f, REG(43) / 100.0f);
+/**
+ * Steps speed toward zero to at a rate defined by current boot data.
+ * After zero is reached, speed will be held at zero.
+ *
+ * @return true if speed is 0, false otherwise
+ */
+s32 Player_DecelerateToZero(Player* this) {
+ return Math_StepToF(&this->speedXZ, 0.0f, R_DECELERATE_RATE / 100.0f);
}
/**
@@ -3854,134 +4145,140 @@ s32 Player_GetMovementSpeedAndYaw(Player* this, f32* outSpeedTarget, s16* outYaw
}
}
-typedef enum ActionChangeIndex {
- /* 0 */ PLAYER_ACTION_CHG_0,
- /* 1 */ PLAYER_ACTION_CHG_1,
- /* 2 */ PLAYER_ACTION_CHG_2,
- /* 3 */ PLAYER_ACTION_CHG_3,
- /* 4 */ PLAYER_ACTION_CHG_4,
- /* 5 */ PLAYER_ACTION_CHG_5,
- /* 6 */ PLAYER_ACTION_CHG_6,
- /* 7 */ PLAYER_ACTION_CHG_7,
- /* 8 */ PLAYER_ACTION_CHG_8,
- /* 9 */ PLAYER_ACTION_CHG_9,
- /* 10 */ PLAYER_ACTION_CHG_10,
- /* 11 */ PLAYER_ACTION_CHG_11,
- /* 12 */ PLAYER_ACTION_CHG_12,
- /* 13 */ PLAYER_ACTION_CHG_13
-} ActionChangeIndex;
+typedef enum ActionHandlerIndex {
+ /* 0 */ PLAYER_ACTION_HANDLER_0,
+ /* 1 */ PLAYER_ACTION_HANDLER_1,
+ /* 2 */ PLAYER_ACTION_HANDLER_2,
+ /* 3 */ PLAYER_ACTION_HANDLER_3,
+ /* 4 */ PLAYER_ACTION_HANDLER_TALK,
+ /* 5 */ PLAYER_ACTION_HANDLER_5,
+ /* 6 */ PLAYER_ACTION_HANDLER_ROLL,
+ /* 7 */ PLAYER_ACTION_HANDLER_7,
+ /* 8 */ PLAYER_ACTION_HANDLER_8,
+ /* 9 */ PLAYER_ACTION_HANDLER_9,
+ /* 10 */ PLAYER_ACTION_HANDLER_10,
+ /* 11 */ PLAYER_ACTION_HANDLER_11,
+ /* 12 */ PLAYER_ACTION_HANDLER_12,
+ /* 13 */ PLAYER_ACTION_HANDLER_13
+} ActionHandlerIndex;
-static s8 sActionChangeList1[] = {
- PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9,
- PLAYER_ACTION_CHG_10, PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_8, -PLAYER_ACTION_CHG_7,
+static s8 sActionHandlerList1[] = {
+ PLAYER_ACTION_HANDLER_13, PLAYER_ACTION_HANDLER_2, PLAYER_ACTION_HANDLER_TALK, PLAYER_ACTION_HANDLER_9,
+ PLAYER_ACTION_HANDLER_10, PLAYER_ACTION_HANDLER_11, PLAYER_ACTION_HANDLER_8, -PLAYER_ACTION_HANDLER_7,
};
-static s8 sActionChangeList2[] = {
- PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_1, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_5,
- PLAYER_ACTION_CHG_3, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, PLAYER_ACTION_CHG_10,
- PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_7, PLAYER_ACTION_CHG_8, -PLAYER_ACTION_CHG_6,
+static s8 sActionHandlerList2[] = {
+ PLAYER_ACTION_HANDLER_13, PLAYER_ACTION_HANDLER_1, PLAYER_ACTION_HANDLER_2, PLAYER_ACTION_HANDLER_5,
+ PLAYER_ACTION_HANDLER_3, PLAYER_ACTION_HANDLER_TALK, PLAYER_ACTION_HANDLER_9, PLAYER_ACTION_HANDLER_10,
+ PLAYER_ACTION_HANDLER_11, PLAYER_ACTION_HANDLER_7, PLAYER_ACTION_HANDLER_8, -PLAYER_ACTION_HANDLER_ROLL,
};
-static s8 sActionChangeList3[] = {
- PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_1, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_3,
- PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, PLAYER_ACTION_CHG_10, PLAYER_ACTION_CHG_11,
- PLAYER_ACTION_CHG_8, PLAYER_ACTION_CHG_7, -PLAYER_ACTION_CHG_6,
+static s8 sActionHandlerList3[] = {
+ PLAYER_ACTION_HANDLER_13, PLAYER_ACTION_HANDLER_1, PLAYER_ACTION_HANDLER_2, PLAYER_ACTION_HANDLER_3,
+ PLAYER_ACTION_HANDLER_TALK, PLAYER_ACTION_HANDLER_9, PLAYER_ACTION_HANDLER_10, PLAYER_ACTION_HANDLER_11,
+ PLAYER_ACTION_HANDLER_8, PLAYER_ACTION_HANDLER_7, -PLAYER_ACTION_HANDLER_ROLL,
};
-static s8 sActionChangeList4[] = {
- PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9,
- PLAYER_ACTION_CHG_10, PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_8, -PLAYER_ACTION_CHG_7,
+static s8 sActionHandlerList4[] = {
+ PLAYER_ACTION_HANDLER_13, PLAYER_ACTION_HANDLER_2, PLAYER_ACTION_HANDLER_TALK, PLAYER_ACTION_HANDLER_9,
+ PLAYER_ACTION_HANDLER_10, PLAYER_ACTION_HANDLER_11, PLAYER_ACTION_HANDLER_8, -PLAYER_ACTION_HANDLER_7,
};
-static s8 sActionChangeList5[] = {
- PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, PLAYER_ACTION_CHG_10,
- PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_12, PLAYER_ACTION_CHG_8, -PLAYER_ACTION_CHG_7,
+static s8 sActionHandlerList5[] = {
+ PLAYER_ACTION_HANDLER_13, PLAYER_ACTION_HANDLER_2, PLAYER_ACTION_HANDLER_TALK,
+ PLAYER_ACTION_HANDLER_9, PLAYER_ACTION_HANDLER_10, PLAYER_ACTION_HANDLER_11,
+ PLAYER_ACTION_HANDLER_12, PLAYER_ACTION_HANDLER_8, -PLAYER_ACTION_HANDLER_7,
};
-static s8 sActionChangeList6[] = {
- -PLAYER_ACTION_CHG_7,
+static s8 sActionHandlerListTurnInPlace[] = {
+ -PLAYER_ACTION_HANDLER_7,
};
-static s8 sActionChangeList7[] = {
- PLAYER_ACTION_CHG_0, PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_1, PLAYER_ACTION_CHG_2,
- PLAYER_ACTION_CHG_3, PLAYER_ACTION_CHG_5, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9,
- PLAYER_ACTION_CHG_8, PLAYER_ACTION_CHG_7, -PLAYER_ACTION_CHG_6,
+static s8 sActionHandlerListIdle[] = {
+ PLAYER_ACTION_HANDLER_0, PLAYER_ACTION_HANDLER_11, PLAYER_ACTION_HANDLER_1, PLAYER_ACTION_HANDLER_2,
+ PLAYER_ACTION_HANDLER_3, PLAYER_ACTION_HANDLER_5, PLAYER_ACTION_HANDLER_TALK, PLAYER_ACTION_HANDLER_9,
+ PLAYER_ACTION_HANDLER_8, PLAYER_ACTION_HANDLER_7, -PLAYER_ACTION_HANDLER_ROLL,
};
-static s8 sActionChangeList8[] = {
- PLAYER_ACTION_CHG_0, PLAYER_ACTION_CHG_11, PLAYER_ACTION_CHG_1, PLAYER_ACTION_CHG_2,
- PLAYER_ACTION_CHG_3, PLAYER_ACTION_CHG_12, PLAYER_ACTION_CHG_5, PLAYER_ACTION_CHG_4,
- PLAYER_ACTION_CHG_9, PLAYER_ACTION_CHG_8, PLAYER_ACTION_CHG_7, -PLAYER_ACTION_CHG_6,
+static s8 sActionHandlerList8[] = {
+ PLAYER_ACTION_HANDLER_0, PLAYER_ACTION_HANDLER_11, PLAYER_ACTION_HANDLER_1, PLAYER_ACTION_HANDLER_2,
+ PLAYER_ACTION_HANDLER_3, PLAYER_ACTION_HANDLER_12, PLAYER_ACTION_HANDLER_5, PLAYER_ACTION_HANDLER_TALK,
+ PLAYER_ACTION_HANDLER_9, PLAYER_ACTION_HANDLER_8, PLAYER_ACTION_HANDLER_7, -PLAYER_ACTION_HANDLER_ROLL,
};
-static s8 sActionChangeList9[] = {
- PLAYER_ACTION_CHG_13, PLAYER_ACTION_CHG_1, PLAYER_ACTION_CHG_2, PLAYER_ACTION_CHG_3, PLAYER_ACTION_CHG_12,
- PLAYER_ACTION_CHG_5, PLAYER_ACTION_CHG_4, PLAYER_ACTION_CHG_9, PLAYER_ACTION_CHG_10, PLAYER_ACTION_CHG_11,
- PLAYER_ACTION_CHG_8, PLAYER_ACTION_CHG_7, -PLAYER_ACTION_CHG_6,
+static s8 sActionHandlerList9[] = {
+ PLAYER_ACTION_HANDLER_13, PLAYER_ACTION_HANDLER_1, PLAYER_ACTION_HANDLER_2, PLAYER_ACTION_HANDLER_3,
+ PLAYER_ACTION_HANDLER_12, PLAYER_ACTION_HANDLER_5, PLAYER_ACTION_HANDLER_TALK, PLAYER_ACTION_HANDLER_9,
+ PLAYER_ACTION_HANDLER_10, PLAYER_ACTION_HANDLER_11, PLAYER_ACTION_HANDLER_8, PLAYER_ACTION_HANDLER_7,
+ -PLAYER_ACTION_HANDLER_ROLL,
};
-static s8 sActionChangeList10[] = {
- PLAYER_ACTION_CHG_10,
- PLAYER_ACTION_CHG_8,
- -PLAYER_ACTION_CHG_7,
+static s8 sActionHandlerList10[] = {
+ PLAYER_ACTION_HANDLER_10,
+ PLAYER_ACTION_HANDLER_8,
+ -PLAYER_ACTION_HANDLER_7,
};
-static s8 sActionChangeList11[] = {
- PLAYER_ACTION_CHG_0,
- PLAYER_ACTION_CHG_12,
- PLAYER_ACTION_CHG_5,
- -PLAYER_ACTION_CHG_4,
+static s8 sActionHandlerList11[] = {
+ PLAYER_ACTION_HANDLER_0,
+ PLAYER_ACTION_HANDLER_12,
+ PLAYER_ACTION_HANDLER_5,
+ -PLAYER_ACTION_HANDLER_TALK,
};
-s32 Player_ActionChange_0(Player* this, PlayState* play);
-s32 Player_ActionChange_1(Player* this, PlayState* play);
-s32 Player_ActionChange_2(Player* this, PlayState* play);
-s32 Player_ActionChange_3(Player* this, PlayState* play);
-s32 Player_ActionChange_4(Player* this, PlayState* play);
-s32 Player_ActionChange_5(Player* this, PlayState* play);
-s32 Player_ActionChange_6(Player* this, PlayState* play);
-s32 Player_ActionChange_7(Player* this, PlayState* play);
-s32 Player_ActionChange_8(Player* this, PlayState* play);
-s32 Player_ActionChange_9(Player* this, PlayState* play);
-s32 Player_ActionChange_10(Player* this, PlayState* play);
-s32 Player_ActionChange_11(Player* this, PlayState* play);
-s32 Player_ActionChange_12(Player* this, PlayState* play);
-s32 Player_ActionChange_13(Player* this, PlayState* play);
+s32 Player_ActionHandler_0(Player* this, PlayState* play);
+s32 Player_ActionHandler_1(Player* this, PlayState* play);
+s32 Player_ActionHandler_2(Player* this, PlayState* play);
+s32 Player_ActionHandler_3(Player* this, PlayState* play);
+s32 Player_ActionHandler_Talk(Player* this, PlayState* play);
+s32 Player_ActionHandler_5(Player* this, PlayState* play);
+s32 Player_ActionHandler_Roll(Player* this, PlayState* play);
+s32 Player_ActionHandler_7(Player* this, PlayState* play);
+s32 Player_ActionHandler_8(Player* this, PlayState* play);
+s32 Player_ActionHandler_9(Player* this, PlayState* play);
+s32 Player_ActionHandler_10(Player* this, PlayState* play);
+s32 Player_ActionHandler_11(Player* this, PlayState* play);
+s32 Player_ActionHandler_12(Player* this, PlayState* play);
+s32 Player_ActionHandler_13(Player* this, PlayState* play);
-static s32 (*sActionChangeFuncs[])(Player* this, PlayState* play) = {
- /* PLAYER_ACTION_CHG_0 */ Player_ActionChange_0,
- /* PLAYER_ACTION_CHG_1 */ Player_ActionChange_1,
- /* PLAYER_ACTION_CHG_2 */ Player_ActionChange_2,
- /* PLAYER_ACTION_CHG_3 */ Player_ActionChange_3,
- /* PLAYER_ACTION_CHG_4 */ Player_ActionChange_4,
- /* PLAYER_ACTION_CHG_5 */ Player_ActionChange_5,
- /* PLAYER_ACTION_CHG_6 */ Player_ActionChange_6,
- /* PLAYER_ACTION_CHG_7 */ Player_ActionChange_7,
- /* PLAYER_ACTION_CHG_8 */ Player_ActionChange_8,
- /* PLAYER_ACTION_CHG_9 */ Player_ActionChange_9,
- /* PLAYER_ACTION_CHG_10 */ Player_ActionChange_10,
- /* PLAYER_ACTION_CHG_11 */ Player_ActionChange_11,
- /* PLAYER_ACTION_CHG_12 */ Player_ActionChange_12,
- /* PLAYER_ACTION_CHG_13 */ Player_ActionChange_13,
+static s32 (*sActionHandlerFuncs[])(Player* this, PlayState* play) = {
+ Player_ActionHandler_0, // PLAYER_ACTION_HANDLER_0
+ Player_ActionHandler_1, // PLAYER_ACTION_HANDLER_1
+ Player_ActionHandler_2, // PLAYER_ACTION_HANDLER_2
+ Player_ActionHandler_3, // PLAYER_ACTION_HANDLER_3
+ Player_ActionHandler_Talk, // PLAYER_ACTION_HANDLER_TALK
+ Player_ActionHandler_5, // PLAYER_ACTION_HANDLER_5
+ Player_ActionHandler_Roll, // PLAYER_ACTION_HANDLER_ROLL
+ Player_ActionHandler_7, // PLAYER_ACTION_HANDLER_7
+ Player_ActionHandler_8, // PLAYER_ACTION_HANDLER_8
+ Player_ActionHandler_9, // PLAYER_ACTION_HANDLER_9
+ Player_ActionHandler_10, // PLAYER_ACTION_HANDLER_10
+ Player_ActionHandler_11, // PLAYER_ACTION_HANDLER_11
+ Player_ActionHandler_12, // PLAYER_ACTION_HANDLER_12
+ Player_ActionHandler_13, // PLAYER_ACTION_HANDLER_13
};
/**
- * This function processes "Action Change Lists", which run various functions that
- * check if it is appropriate to change to a new action.
+ * This function processes "Action Handler Lists".
*
- * Action Change Lists are a list of indices for the `sActionChangeFuncs` array.
- * The functions are ran in order until one of them returns true, or the end of the list is reached.
- * An Action Change index having a negative value indicates that it is the last member in the list.
+ * An Action Handler is a function that "listens" for certain conditions or the right time
+ * to change to a certain action. These can include actions triggered manually by the player
+ * or actions that happen automatically, given some other condition(s).
*
- * Because these lists are processed sequentially, the order of the indices in the list determines its priority.
+ * Action Handler Lists are a list of indices for the `sActionHandlerFuncs` array.
+ * The Action Handlers are ran in order until one of them returns true, or the end of the list is reached.
+ * An Action Handler index having a negative value indicates that it is the last member in the list.
*
- * If the `updateUpperBody` argument is true, Player's upper body will update before the Action Change List
- * is processed. This allows for Item Action functions to run.
+ * Because these lists are processed sequentially, the order of the indices in the list
+ * determines an Action Handler's priority.
+ *
+ * If the `updateUpperBody` argument is true, Player's upper body will update before the Action Handler List
+ * is processed. This allows for Item Action functions to run, for example.
*
* @return true if a new action has been chosen
*
*/
-s32 Player_TryActionChangeList(PlayState* play, Player* this, s8* actionChangeList, s32 updateUpperBody) {
+s32 Player_TryActionHandlerList(PlayState* play, Player* this, s8* actionHandlerList, s32 updateUpperBody) {
s32 i;
if (!(this->stateFlags1 & (PLAYER_STATE1_0 | PLAYER_STATE1_DEAD | PLAYER_STATE1_29))) {
@@ -3994,22 +4291,22 @@ s32 Player_TryActionChangeList(PlayState* play, Player* this, s8* actionChangeLi
}
if (func_8008F128(this)) {
- this->unk_6AE |= 0x41;
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_FOCUS_X | UNK6AE_ROT_UPPER_X;
return true;
}
if (!(this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) &&
(Player_UpperAction_ChangeHeldItem != this->upperActionFunc)) {
- // Process all entries in the Action Change List with a positive index
- while (*actionChangeList >= 0) {
- if (sActionChangeFuncs[*actionChangeList](this, play)) {
+ // Process all entries in the Action Handler List with a positive index
+ while (*actionHandlerList >= 0) {
+ if (sActionHandlerFuncs[*actionHandlerList](this, play)) {
return true;
}
- actionChangeList++;
+ actionHandlerList++;
}
// Try the last entry in the list. Negate the index to make it positive again.
- if (sActionChangeFuncs[-(*actionChangeList)](this, play)) {
+ if (sActionHandlerFuncs[-(*actionHandlerList)](this, play)) {
return true;
}
}
@@ -4027,14 +4324,14 @@ typedef enum PlayerActionInterruptResult {
/**
* An Action Interrupt allows for ending an action early, toward the end of an animation.
*
- * First, `sActionChangeList7` will be checked to see if any of those actions should be used.
- * It should be noted that the `updateUpperBody` argument passed to `Player_TryActionChangeList`
+ * First, `sActionHandlerListIdle` will be checked to see if any of those actions should be used.
+ * It should be noted that the `updateUpperBody` argument passed to `Player_TryActionHandlerList`
* is `true`. This means that an item can be used during the interrupt window.
*
- * If no actions from the Action Change List are used, then the control stick is checked to see if
+ * If no actions from the Action Handler List are used, then the control stick is checked to see if
* any movement should occur.
*
- * Note that while this function can set up a new action with `sActionChangeList7`, this function
+ * Note that while this function can set up a new action with `sActionHandlerListIdle`, this function
* will not set up an appropriate action for moving.
* It is the callers responsibility to react accordingly to `PLAYER_INTERRUPT_MOVE`.
*
@@ -4046,7 +4343,7 @@ s32 Player_TryActionInterrupt(PlayState* play, Player* this, SkelAnime* skelAnim
s16 yawTarget;
if ((skelAnime->endFrame - frameRange) <= skelAnime->curFrame) {
- if (Player_TryActionChangeList(play, this, sActionChangeList7, true)) {
+ if (Player_TryActionHandlerList(play, this, sActionHandlerListIdle, true)) {
return PLAYER_INTERRUPT_NEW_ACTION;
}
@@ -4235,8 +4532,8 @@ void func_80837948(PlayState* play, Player* this, s32 arg2) {
Player_AnimPlayOnceAdjusted(play, this, D_80854190[arg2].unk_00);
if ((arg2 != PLAYER_MWA_FLIPSLASH_START) && (arg2 != PLAYER_MWA_JUMPSLASH_START)) {
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_PLAYER_SETMOVE);
+ Player_StartAnimMovement(play, this,
+ PLAYER_ANIM_MOVEMENT_RESET_BY_AGE | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_ENABLE_MOVEMENT);
}
this->yaw = this->actor.shape.rot.y;
@@ -4257,23 +4554,46 @@ void func_80837948(PlayState* play, Player* this, s32 arg2) {
func_80837918(this, 1, dmgFlags);
}
-void func_80837AE0(Player* this, s32 timer) {
+/**
+ * Gives the player intangibility frames. Used for when the player takes damage.
+ *
+ * If the player is already intangible, it will be overridden by the new intangibility duration.
+ * If the player is already invunerable, no intangibility will be applied.
+ *
+ * @param timer must be a positive value representing the number of intangibility frames.
+ * @note Intangibility prevents taking damage and responses to damage like knockback, while invulnerability only
+ * prevents taking damage.
+ */
+void Player_SetIntangibility(Player* this, s32 timer) {
if (this->invincibilityTimer >= 0) {
this->invincibilityTimer = timer;
- this->unk_88F = 0;
+ this->damageFlickerAnimCounter = 0;
}
}
-void func_80837AFC(Player* this, s32 timer) {
+/**
+ * Gives the player invulnerability frames. Used for when the player performs a dodging maneuver like a roll.
+ *
+ * If the player is already intangible, they will become invulnerable instead.
+ * If the player is already invulnerable, the longer of the two invulnerability periods is kept.
+ *
+ * @param timer must be a negative value representing the number of invulnerability frames.
+ * @note Intangibility prevents taking damage and responses to damage like knockback, while invulnerability only
+ * prevents taking damage.
+ */
+void Player_SetInvulnerability(Player* this, s32 timer) {
if (this->invincibilityTimer > timer) {
this->invincibilityTimer = timer;
}
- this->unk_88F = 0;
+ this->damageFlickerAnimCounter = 0;
}
+/**
+ * @return false if player is out of health
+ */
s32 func_80837B18(PlayState* play, Player* this, s32 damage) {
if ((this->invincibilityTimer != 0) || (this->actor.category != ACTORCAT_PLAYER)) {
- return 1;
+ return true;
}
return Health_ChangeBy(play, damage);
@@ -4281,7 +4601,7 @@ s32 func_80837B18(PlayState* play, Player* this, s32 damage) {
void func_80837B60(Player* this) {
this->skelAnime.prevTransl = this->skelAnime.jointTable[0];
- func_80832E48(this, ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
+ Player_ApplyAnimMovementScaledByAge(this, ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
}
void func_80837B9C(Player* this, PlayState* play) {
@@ -4299,7 +4619,8 @@ static LinkAnimationHeader* D_808544B0[] = {
&gPlayerAnim_link_normal_back_hit, &gPlayerAnim_link_anchor_back_hitR,
};
-void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, s16 arg5, s32 arg6) {
+void func_80837C0C(PlayState* play, Player* this, s32 damageResponseType, f32 speed, f32 yVelocity, s16 yRot,
+ s32 invincibilityTimer) {
LinkAnimationHeader* anim = NULL;
LinkAnimationHeader** sp28;
@@ -4319,9 +4640,9 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4,
return;
}
- func_80837AE0(this, arg6);
+ Player_SetIntangibility(this, invincibilityTimer);
- if (arg2 == 3) {
+ if (damageResponseType == PLAYER_HIT_RESPONSE_ICE_TRAP) {
Player_SetupAction(play, this, Player_Action_8084FB10, 0);
anim = &gPlayerAnim_link_normal_ice_down;
@@ -4331,7 +4652,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4,
Player_PlaySfx(this, NA_SE_PL_FREEZE_S);
Player_PlayVoiceSfx(this, NA_SE_VO_LI_FREEZE);
- } else if (arg2 == 4) {
+ } else if (damageResponseType == PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK) {
Player_SetupAction(play, this, Player_Action_8084FBF4, 0);
Player_RequestRumble(this, 255, 80, 150, 0);
@@ -4341,7 +4662,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4,
this->av2.actionVar2 = 20;
} else {
- arg5 -= this->actor.shape.rot.y;
+ yRot -= this->actor.shape.rot.y;
if (this->stateFlags1 & PLAYER_STATE1_27) {
Player_SetupAction(play, this, Player_Action_8084E30C, 0);
Player_RequestRumble(this, 180, 20, 50, 0);
@@ -4352,7 +4673,9 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4,
anim = &gPlayerAnim_link_swimer_swim_hit;
Player_PlayVoiceSfx(this, NA_SE_VO_LI_DAMAGE_S);
- } else if ((arg2 == 1) || (arg2 == 2) || !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
+ } else if ((damageResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE) ||
+ (damageResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL) ||
+ !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
(this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21))) {
Player_SetupAction(play, this, Player_Action_8084377C, 0);
@@ -4361,7 +4684,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4,
Player_RequestRumble(this, 255, 20, 150, 0);
func_80832224(this);
- if (arg2 == 2) {
+ if (damageResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL) {
this->av2.actionVar2 = 4;
this->actor.speed = 3.0f;
@@ -4371,11 +4694,11 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4,
Player_AnimChangeFreeze(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_damage_run, this->modelAnimType));
Player_PlayVoiceSfx(this, NA_SE_VO_LI_DAMAGE_S);
} else {
- this->actor.speed = arg3;
- this->speedXZ = arg3;
- this->actor.velocity.y = arg4;
+ this->actor.speed = speed;
+ this->speedXZ = speed;
+ this->actor.velocity.y = yVelocity;
- if (ABS(arg5) > 0x4000) {
+ if (ABS(yRot) > 0x4000) {
anim = &gPlayerAnim_link_normal_front_downA;
} else {
anim = &gPlayerAnim_link_normal_back_downA;
@@ -4411,7 +4734,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4,
sp28 += 4;
}
- if (ABS(arg5) <= 0x4000) {
+ if (ABS(yRot) <= 0x4000) {
sp28 += 2;
}
@@ -4424,10 +4747,10 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4,
Player_PlayVoiceSfx(this, NA_SE_VO_LI_DAMAGE_S);
}
- this->actor.shape.rot.y += arg5;
+ this->actor.shape.rot.y += yRot;
this->yaw = this->actor.shape.rot.y;
this->actor.world.rot.y = this->actor.shape.rot.y;
- if (ABS(arg5) > 0x4000) {
+ if (ABS(yRot) > 0x4000) {
this->actor.shape.rot.y += 0x8000;
}
}
@@ -4522,7 +4845,8 @@ s32 func_808382DC(Player* this, PlayState* play) {
respawnInfo = &fallingSpikeTrapRespawn;
}
- Play_SetupRespawnPoint(play, RESPAWN_MODE_DOWN, 0xDFF);
+ Play_SetupRespawnPoint(play, RESPAWN_MODE_DOWN,
+ PLAYER_PARAMS(PLAYER_START_MODE_IDLE, PLAYER_START_BG_CAM_DEFAULT));
gSaveContext.respawn[RESPAWN_MODE_DOWN].pos = respawnInfo->pos;
gSaveContext.respawn[RESPAWN_MODE_DOWN].yaw = respawnInfo->yaw;
}
@@ -4533,17 +4857,23 @@ s32 func_808382DC(Player* this, PlayState* play) {
Player_PlayVoiceSfx(this, NA_SE_VO_LI_TAKEN_AWAY);
play->haltAllActors = true;
Sfx_PlaySfxCentered(NA_SE_OC_ABYSS);
- } else if ((this->unk_8A1 != 0) && ((this->unk_8A1 >= 2) || (this->invincibilityTimer == 0))) {
- u8 sp5C[] = { 2, 1, 1 };
+ } else if ((this->knockbackType != PLAYER_KNOCKBACK_NONE) &&
+ ((this->knockbackType >= PLAYER_KNOCKBACK_LARGE) || (this->invincibilityTimer == 0))) {
+ u8 knockbackResponse[] = {
+ PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL,
+ PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE,
+ PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE,
+ };
func_80838280(this);
- if (this->unk_8A1 == 3) {
+ if (this->knockbackType == PLAYER_KNOCKBACK_LARGE_SHOCK) {
this->bodyShockTimer = 40;
}
- this->actor.colChkInfo.damage += this->unk_8A0;
- func_80837C0C(play, this, sp5C[this->unk_8A1 - 1], this->unk_8A4, this->unk_8A8, this->unk_8A2, 20);
+ this->actor.colChkInfo.damage += this->knockbackDamage;
+ func_80837C0C(play, this, knockbackResponse[this->knockbackType - 1], this->knockbackSpeed,
+ this->knockbackYVelocity, this->knockbackRot, 20);
} else {
sp64 = (this->shieldQuad.base.acFlags & AC_BOUNCED) != 0;
@@ -4602,21 +4932,21 @@ s32 func_808382DC(Player* this, PlayState* play) {
Actor* ac = this->cylinder.base.ac;
s32 sp4C;
- if (ac->flags & ACTOR_FLAG_24) {
+ if (ac->flags & ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT) {
Player_PlaySfx(this, NA_SE_PL_BODY_HIT);
}
if (this->stateFlags1 & PLAYER_STATE1_27) {
- sp4C = 0;
+ sp4C = PLAYER_HIT_RESPONSE_NONE;
} else if (this->actor.colChkInfo.acHitEffect == 2) {
- sp4C = 3;
+ sp4C = PLAYER_HIT_RESPONSE_ICE_TRAP;
} else if (this->actor.colChkInfo.acHitEffect == 3) {
- sp4C = 4;
+ sp4C = PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK;
} else if (this->actor.colChkInfo.acHitEffect == 4) {
- sp4C = 1;
+ sp4C = PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE;
} else {
func_80838280(this);
- sp4C = 0;
+ sp4C = PLAYER_HIT_RESPONSE_NONE;
}
func_80837C0C(play, this, sp4C, 4.0f, 5.0f, Actor_WorldYawTowardActor(ac, &this->actor), 20);
@@ -4634,7 +4964,7 @@ s32 func_808382DC(Player* this, PlayState* play) {
((this->currentTunic != PLAYER_TUNIC_GORON) || (this->floorTypeTimer >= D_808544F4[sp48])))) {
this->floorTypeTimer = 0;
this->actor.colChkInfo.damage = 4;
- func_80837C0C(play, this, 0, 4.0f, 5.0f, this->actor.shape.rot.y, 20);
+ func_80837C0C(play, this, PLAYER_HIT_RESPONSE_NONE, 4.0f, 5.0f, this->actor.shape.rot.y, 20);
} else {
return 0;
}
@@ -4652,7 +4982,7 @@ void func_80838940(Player* this, LinkAnimationHeader* anim, f32 arg2, PlayState*
Player_AnimPlayOnceAdjusted(play, this, anim);
}
- this->actor.velocity.y = arg2 * D_808535E8;
+ this->actor.velocity.y = arg2 * sWaterSpeedFactor;
this->hoverBootsTimer = 0;
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND;
@@ -4666,13 +4996,13 @@ void func_808389E8(Player* this, LinkAnimationHeader* anim, f32 arg2, PlayState*
func_80838940(this, anim, arg2, play, NA_SE_VO_LI_SWORD_N);
}
-s32 Player_ActionChange_12(Player* this, PlayState* play) {
+s32 Player_ActionHandler_12(Player* this, PlayState* play) {
s32 sp3C;
LinkAnimationHeader* anim;
f32 sp34;
f32 temp;
- if (!(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) && (this->ledgeClimbType >= PLAYER_LEDGE_CLIMB_2) &&
+ if (!(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (this->ledgeClimbType >= PLAYER_LEDGE_CLIMB_2) &&
(!(this->stateFlags1 & PLAYER_STATE1_27) || (this->ageProperties->unk_14 > this->yDistToLedge))) {
sp3C = 0;
@@ -4770,7 +5100,7 @@ void func_80838E70(PlayState* play, Player* this, f32 arg2, s16 arg3) {
this->unk_450.x = (Math_SinS(arg3) * arg2) + this->actor.world.pos.x;
this->unk_450.z = (Math_CosS(arg3) * arg2) + this->actor.world.pos.z;
- Player_AnimPlayOnce(play, this, func_80833338(this));
+ Player_AnimPlayOnce(play, this, Player_GetIdleAnim(this));
}
void func_80838F18(PlayState* play, Player* this) {
@@ -5035,7 +5365,7 @@ s32 Player_PosVsWallLineTest(PlayState* play, Player* this, Vec3f* offset, Colli
return BgCheck_EntityLineTest1(&play->colCtx, &posA, &posB, posResult, wallPoly, true, false, false, true, bgId);
}
-s32 Player_ActionChange_1(Player* this, PlayState* play) {
+s32 Player_ActionHandler_1(Player* this, PlayState* play) {
Actor* attachedActor;
s32 pad3;
s32 doorDirection;
@@ -5046,14 +5376,14 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) {
s32 frontRoom;
if ((this->doorType != PLAYER_DOORTYPE_NONE) &&
- (!(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) ||
+ (!(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) ||
((this->heldActor != NULL) && (this->heldActor->id == ACTOR_EN_RU1)))) {
- if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (Player_Action_8084F9A0 == this->actionFunc)) {
+ if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (Player_Action_TryOpeningDoor == this->actionFunc)) {
doorActor = this->doorActor;
if (this->doorType <= PLAYER_DOORTYPE_AJAR) {
doorActor->textId = 0xD0;
- func_80853148(play, doorActor);
+ Player_StartTalking(play, doorActor);
return 0;
}
@@ -5090,7 +5420,7 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) {
if (this->doorTimer != 0) {
this->av2.actionVar2 = 0;
- Player_AnimChangeOnceMorph(play, this, func_80833338(this));
+ Player_AnimChangeOnceMorph(play, this, Player_GetIdleAnim(this));
this->skelAnime.endFrame = 0.0f;
} else {
this->speedXZ = 0.1f;
@@ -5145,10 +5475,10 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) {
}
func_80832224(this);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
- ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ PLAYER_ANIM_MOVEMENT_RESET_BY_AGE | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
+ ANIM_FLAG_OVERRIDE_MOVEMENT);
// If this door is the second half of a double door (spawned as child)
if (doorActor->parent != NULL) {
@@ -5184,7 +5514,8 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) {
play->transitionActors.list[GET_TRANSITION_ACTOR_INDEX(doorActor)]
.sides[(doorDirection > 0) ? 0 : 1]
.bgCamIndex,
- 0, 38.0f * D_808535EC, 26.0f * D_808535EC, 10.0f * D_808535EC);
+ 0, 38.0f * sInvWaterSpeedFactor, 26.0f * sInvWaterSpeedFactor,
+ 10.0f * sInvWaterSpeedFactor);
}
}
}
@@ -5232,7 +5563,7 @@ void func_80839E88(Player* this, PlayState* play) {
void func_80839F30(Player* this, PlayState* play) {
Player_SetupAction(play, this, Player_Action_808407CC, 1);
- Player_AnimChangeOnceMorph(play, this, func_80833338(this));
+ Player_AnimChangeOnceMorph(play, this, Player_GetIdleAnim(this));
this->yaw = this->actor.shape.rot.y;
}
@@ -5254,7 +5585,7 @@ void func_80839FFC(Player* this, PlayState* play) {
} else if (Player_FriendlyLockOnOrParallel(this)) {
actionFunc = Player_Action_808407CC;
} else {
- actionFunc = Player_Action_80840BC8;
+ actionFunc = Player_Action_Idle;
}
Player_SetupAction(play, this, actionFunc, 1);
@@ -5262,6 +5593,7 @@ void func_80839FFC(Player* this, PlayState* play) {
void func_8083A060(Player* this, PlayState* play) {
func_80839FFC(this, play);
+
if (Player_CheckHostileLockOn(this)) {
this->av2.actionVar2 = 1;
}
@@ -5283,7 +5615,7 @@ void func_8083A0F4(PlayState* play, Player* this) {
if (interactActorId == ACTOR_BG_TOKI_SWD) {
this->interactRangeActor->parent = &this->actor;
- Player_SetupAction(play, this, Player_Action_8084F608, 0);
+ Player_SetupAction(play, this, Player_Action_WaitForCutscene, 0);
this->stateFlags1 |= PLAYER_STATE1_29;
} else {
LinkAnimationHeader* anim;
@@ -5313,14 +5645,14 @@ void func_8083A0F4(PlayState* play, Player* this) {
}
} else {
func_80839F90(this, play);
- this->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ this->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
}
}
-void func_8083A2F8(PlayState* play, Player* this) {
- func_80835DAC(play, this, Player_Action_8084B530, 0);
+void Player_SetupTalk(PlayState* play, Player* this) {
+ Player_SetupActionPreserveAnimMovement(play, this, Player_Action_Talk, 0);
- this->stateFlags1 |= PLAYER_STATE1_6 | PLAYER_STATE1_29;
+ this->stateFlags1 |= PLAYER_STATE1_TALKING | PLAYER_STATE1_29;
if (this->actor.textId != 0) {
Message_StartTextbox(play, this->actor.textId, this->talkActor);
@@ -5329,7 +5661,7 @@ void func_8083A2F8(PlayState* play, Player* this) {
}
void func_8083A360(PlayState* play, Player* this) {
- func_80835DAC(play, this, Player_Action_8084CC98, 0);
+ Player_SetupActionPreserveAnimMovement(play, this, Player_Action_8084CC98, 0);
}
void func_8083A388(PlayState* play, Player* this) {
@@ -5340,7 +5672,7 @@ void func_8083A3B0(PlayState* play, Player* this) {
s32 sp1C = this->av2.actionVar2;
s32 sp18 = this->av1.actionVar1;
- func_80835DAC(play, this, Player_Action_8084BF1C, 0);
+ Player_SetupActionPreserveAnimMovement(play, this, Player_Action_8084BF1C, 0);
this->actor.velocity.y = 0.0f;
this->av2.actionVar2 = sp1C;
@@ -5348,11 +5680,11 @@ void func_8083A3B0(PlayState* play, Player* this) {
}
void func_8083A40C(PlayState* play, Player* this) {
- func_80835DAC(play, this, Player_Action_8084C760, 0);
+ Player_SetupActionPreserveAnimMovement(play, this, Player_Action_8084C760, 0);
}
void func_8083A434(PlayState* play, Player* this) {
- func_80835DAC(play, this, Player_Action_8084E6D4, 0);
+ Player_SetupActionPreserveAnimMovement(play, this, Player_Action_8084E6D4, 0);
this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_29;
@@ -5403,7 +5735,7 @@ void func_8083A5C4(PlayState* play, Player* this, CollisionPoly* arg2, f32 arg3,
this->actor.shape.rot.y = this->yaw = Math_Atan2S(nz, nx);
func_80832224(this);
- Player_SkelAnimeResetPrevTranslRot(this);
+ Player_ResetAnimMovement(this);
}
s32 func_8083A6AC(Player* this, PlayState* play) {
@@ -5457,10 +5789,10 @@ s32 func_8083A6AC(Player* this, PlayState* play) {
this->actor.shape.rot.y = this->yaw;
this->stateFlags1 |= PLAYER_STATE1_21;
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
- ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
+ ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
this->av2.actionVar2 = -1;
this->av1.actionVar1 = sp50;
@@ -5505,7 +5837,8 @@ void func_8083AA10(Player* this, PlayState* play) {
return;
}
- if (!(this->stateFlags3 & PLAYER_STATE3_1) && !(this->skelAnime.moveFlags & ANIM_FLAG_OVERRIDE_MOVEMENT) &&
+ if (!(this->stateFlags3 & PLAYER_STATE3_1) &&
+ !(this->skelAnime.movementFlags & ANIM_FLAG_OVERRIDE_MOVEMENT) &&
(Player_Action_8084411C != this->actionFunc) && (Player_Action_80844A44 != this->actionFunc)) {
if ((sPrevFloorProperty == FLOOR_PROPERTY_7) || (this->meleeWeaponState != 0)) {
@@ -5532,7 +5865,8 @@ void func_8083AA10(Player* this, PlayState* play) {
(sYDistToFloor > 20.0f) && (this->meleeWeaponState == 0) && (ABS(sp5C) < 0x2000) &&
(this->speedXZ > 3.0f)) {
- if ((sPrevFloorProperty == FLOOR_PROPERTY_11) && !(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY)) {
+ if ((sPrevFloorProperty == FLOOR_PROPERTY_11) &&
+ !(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) {
sp40 = func_808396F4(play, this, &D_8085451C, &sp44, &sp58, &sp54);
sp3C = this->actor.world.pos.y;
@@ -5621,7 +5955,7 @@ void func_8083AE40(Player* this, s16 objectId) {
}
void func_8083AF44(PlayState* play, Player* this, s32 magicSpell) {
- func_80835DE4(play, this, Player_Action_808507F4, 0);
+ Player_SetupActionPreserveItemAction(play, this, Player_Action_808507F4, 0);
this->av1.actionVar1 = magicSpell - 3;
@@ -5644,8 +5978,8 @@ void func_8083AF44(PlayState* play, Player* this, s32 magicSpell) {
}
void func_8083B010(Player* this) {
- this->actor.focus.rot.x = this->actor.focus.rot.z = this->unk_6B6 = this->unk_6B8 = this->unk_6BA = this->unk_6BC =
- this->unk_6BE = this->unk_6C0 = 0;
+ this->actor.focus.rot.x = this->actor.focus.rot.z = this->headLimbRot.x = this->headLimbRot.y =
+ this->headLimbRot.z = this->upperLimbRot.x = this->upperLimbRot.y = this->upperLimbRot.z = 0;
this->actor.focus.rot.y = this->actor.shape.rot.y;
}
@@ -5688,7 +6022,7 @@ static LinkAnimationHeader* D_80854548[] = {
&gPlayerAnim_link_normal_take_out,
};
-s32 Player_ActionChange_13(Player* this, PlayState* play) {
+s32 Player_ActionHandler_13(Player* this, PlayState* play) {
s32 sp2C;
s32 sp28;
GetItemEntry* giEntry;
@@ -5706,7 +6040,7 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) {
} else {
Player_SetupAction(play, this, Player_Action_8085063C, 1);
this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29;
- Player_AnimPlayOnce(play, this, func_80833338(this));
+ Player_AnimPlayOnce(play, this, Player_GetIdleAnim(this));
func_80835EA4(play, 4);
}
@@ -5724,14 +6058,14 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) {
(this->exchangeItemId == EXCH_ITEM_BOTTLE_BLUE_FIRE))))))) {
if ((play->actorCtx.titleCtx.delayTimer == 0) && (play->actorCtx.titleCtx.alpha == 0)) {
- func_80835DE4(play, this, Player_Action_8084F104, 0);
+ Player_SetupActionPreserveItemAction(play, this, Player_Action_ExchangeItem, 0);
if (sp2C >= 0) {
giEntry = &sGetItemTable[D_80854528[sp2C] - 1];
func_8083AE40(this, giEntry->objectId);
}
- this->stateFlags1 |= PLAYER_STATE1_6 | PLAYER_STATE1_28 | PLAYER_STATE1_29;
+ this->stateFlags1 |= PLAYER_STATE1_TALKING | PLAYER_STATE1_28 | PLAYER_STATE1_29;
if (sp2C >= 0) {
sp2C = sp2C + 1;
@@ -5751,7 +6085,7 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) {
(this->itemAction == PLAYER_IA_MAGIC_BEAN))) {
if (this->exchangeItemId == EXCH_ITEM_MAGIC_BEAN) {
Inventory_ChangeAmmo(ITEM_MAGIC_BEAN, -1);
- func_80835DE4(play, this, Player_Action_8084279C, 0);
+ Player_SetupActionPreserveItemAction(play, this, Player_Action_8084279C, 0);
this->stateFlags1 |= PLAYER_STATE1_29;
this->av2.actionVar2 = 0x50;
this->av1.actionVar1 = -1;
@@ -5786,22 +6120,22 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) {
sp2C = Player_ActionToBottle(this, this->itemAction);
if (sp2C >= 0) {
if (sp2C == 0xC) {
- func_80835DE4(play, this, Player_Action_8084EED8, 0);
+ Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EED8, 0);
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_bottle_bug_out);
func_80835EA4(play, 3);
} else if ((sp2C > 0) && (sp2C < 4)) {
- func_80835DE4(play, this, Player_Action_8084EFC0, 0);
+ Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EFC0, 0);
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_bottle_fish_out);
func_80835EA4(play, (sp2C == 1) ? 1 : 5);
} else {
- func_80835DE4(play, this, Player_Action_8084EAC0, 0);
+ Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EAC0, 0);
Player_AnimChangeOnceMorphAdjusted(play, this, &gPlayerAnim_link_bottle_drink_demo_start);
func_80835EA4(play, 2);
}
} else {
- func_80835DE4(play, this, Player_Action_8084E3C4, 0);
+ Player_SetupActionPreserveItemAction(play, this, Player_Action_8084E3C4, 0);
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_normal_okarina_start);
- this->stateFlags2 |= PLAYER_STATE2_27;
+ this->stateFlags2 |= PLAYER_STATE2_USING_OCARINA;
func_80835EA4(play, (this->unk_6A8 != NULL) ? 0x5B : 0x5A);
if (this->unk_6A8 != NULL) {
this->stateFlags2 |= PLAYER_STATE2_25;
@@ -5834,80 +6168,112 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) {
return 0;
}
-s32 Player_ActionChange_4(Player* this, PlayState* play) {
- Actor* sp34 = this->talkActor;
- Actor* sp30 = this->focusActor;
- Actor* sp2C = NULL;
- s32 sp28 = 0;
- s32 sp24;
+s32 Player_ActionHandler_Talk(Player* this, PlayState* play) {
+ Actor* talkOfferActor = this->talkActor;
+ Actor* lockOnActor = this->focusActor;
+ Actor* cUpTalkActor = NULL;
+ s32 forceTalkToNavi = false;
+ s32 canTalkToLockOnWithCUp;
- sp24 = (sp30 != NULL) && (CHECK_FLAG_ALL(sp30->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_18) ||
- (sp30->naviEnemyId != NAVI_ENEMY_NONE));
+ canTalkToLockOnWithCUp =
+ (lockOnActor != NULL) &&
+ (ACTOR_FLAGS_CHECK_ALL(lockOnActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP) ||
+ (lockOnActor->naviEnemyId != NAVI_ENEMY_NONE));
- if (sp24 || (this->naviTextId != 0)) {
- sp28 = (this->naviTextId < 0) && ((ABS(this->naviTextId) & 0xFF00) != 0x200);
- if (sp28 || !sp24) {
- sp2C = this->naviActor;
- if (sp28) {
- sp30 = NULL;
- sp34 = NULL;
+ if (canTalkToLockOnWithCUp || (this->naviTextId != 0)) {
+ // If `naviTextId` is negative and outside the 0x2XX range, talk to Navi instantly
+ forceTalkToNavi = (this->naviTextId < 0) && ((ABS(this->naviTextId) & 0xFF00) != 0x200);
+
+ if (forceTalkToNavi || !canTalkToLockOnWithCUp) {
+ // If `lockOnActor` can't be talked to with c-up, the only option left is Navi
+ cUpTalkActor = this->naviActor;
+
+ if (forceTalkToNavi) {
+ // Clearing these pointers guarantees that `cUpTalkActor` will take priority
+ lockOnActor = NULL;
+ talkOfferActor = NULL;
}
} else {
- sp2C = sp30;
+ // Navi is not the talk actor, so the only option left for talking with c-up is `lockOnActor`
+ // (though, `lockOnActor` may be NULL at this point).
+ cUpTalkActor = lockOnActor;
}
}
- if ((sp34 != NULL) || (sp2C != NULL)) {
- if ((sp30 == NULL) || (sp30 == sp34) || (sp30 == sp2C)) {
- if (!(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) ||
- ((this->heldActor != NULL) && (sp28 || (sp34 == this->heldActor) || (sp2C == this->heldActor) ||
- ((sp34 != NULL) && (sp34->flags & ACTOR_FLAG_16))))) {
- if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->stateFlags1 & PLAYER_STATE1_23) ||
- (func_808332B8(this) && !(this->stateFlags2 & PLAYER_STATE2_10))) {
+ if ((talkOfferActor != NULL) || (cUpTalkActor != NULL)) {
+ if ((lockOnActor != NULL) && (lockOnActor != talkOfferActor) && (lockOnActor != cUpTalkActor)) {
+ goto dont_talk;
+ }
- if (sp34 != NULL) {
- this->stateFlags2 |= PLAYER_STATE2_1;
- if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (sp34->flags & ACTOR_FLAG_16)) {
- sp2C = NULL;
- } else if (sp2C == NULL) {
- return 0;
- }
- }
-
- if (sp2C != NULL) {
- if (!sp28) {
- this->stateFlags2 |= PLAYER_STATE2_21;
- }
-
- if (!CHECK_BTN_ALL(sControlInput->press.button, BTN_CUP) && !sp28) {
- return 0;
- }
-
- sp34 = sp2C;
- this->talkActor = NULL;
-
- if (sp28 || !sp24) {
- sp2C->textId = ABS(this->naviTextId);
- } else {
- if (sp2C->naviEnemyId != NAVI_ENEMY_NONE) {
- sp2C->textId = sp2C->naviEnemyId + 0x600;
- }
- }
- }
-
- this->currentMask = D_80858AA4;
- func_80853148(play, sp34);
- return 1;
- }
+ if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
+ if ((this->heldActor == NULL) ||
+ (!forceTalkToNavi && (talkOfferActor != this->heldActor) && (cUpTalkActor != this->heldActor) &&
+ ((talkOfferActor == NULL) || !(talkOfferActor->flags & ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED)))) {
+ goto dont_talk;
}
}
+
+ if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
+ if (!(this->stateFlags1 & PLAYER_STATE1_23) &&
+ !(func_808332B8(this) && !(this->stateFlags2 & PLAYER_STATE2_10))) {
+ goto dont_talk;
+ }
+ }
+
+ if (talkOfferActor != NULL) {
+ // At this point the talk offer can be accepted.
+ // "Speak" or "Check" will appear on the A button in the HUD.
+ this->stateFlags2 |= PLAYER_STATE2_CAN_ACCEPT_TALK_OFFER;
+
+ if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) ||
+ (talkOfferActor->flags & ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED)) {
+ // Talk Offer has been accepted.
+ // Clearing `cUpTalkActor` guarantees that `talkOfferActor` is the actor that will be spoken to
+ cUpTalkActor = NULL;
+ } else if (cUpTalkActor == NULL) {
+ return false;
+ }
+ }
+
+ if (cUpTalkActor != NULL) {
+ if (!forceTalkToNavi) {
+ this->stateFlags2 |= PLAYER_STATE2_21;
+ }
+
+ if (!CHECK_BTN_ALL(sControlInput->press.button, BTN_CUP) && !forceTalkToNavi) {
+ return false;
+ }
+
+ talkOfferActor = cUpTalkActor;
+ this->talkActor = NULL;
+
+ if (forceTalkToNavi || !canTalkToLockOnWithCUp) {
+ cUpTalkActor->textId = ABS(this->naviTextId);
+ } else if (cUpTalkActor->naviEnemyId != NAVI_ENEMY_NONE) {
+ cUpTalkActor->textId = cUpTalkActor->naviEnemyId + 0x600;
+ }
+ }
+
+ // `sSavedCurrentMask` saves the current mask just before the current action runs on this frame.
+ // This saved mask value is then restored just before starting a conversation.
+ //
+ // This handles an edge case where a conversation is started on the same frame that a mask was taken on or off.
+ // Because Player updates early before most actors, the text ID being offered comes from the previous frame.
+ // If a mask was taken on or off the same frame this function runs, the wrong text will be used.
+ // This is especially important to prevent unwanted behavior with regards to mask trading.
+ this->currentMask = sSavedCurrentMask;
+
+ Player_StartTalking(play, talkOfferActor);
+
+ return true;
}
- return 0;
+dont_talk:
+ return false;
}
s32 func_8083B8F4(Player* this, PlayState* play) {
- if (!(this->stateFlags1 & (PLAYER_STATE1_ACTOR_CARRY | PLAYER_STATE1_23)) &&
+ if (!(this->stateFlags1 & (PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_23)) &&
Camera_CheckValidMode(Play_GetCamera(play, CAM_ID_MAIN), CAM_MODE_FIRST_PERSON)) {
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
(func_808332B8(this) && (this->actor.depthInWater < this->ageProperties->unk_2C))) {
@@ -5919,14 +6285,14 @@ s32 func_8083B8F4(Player* this, PlayState* play) {
return 0;
}
-s32 Player_ActionChange_0(Player* this, PlayState* play) {
+s32 Player_ActionHandler_0(Player* this, PlayState* play) {
if (this->unk_6AD != 0) {
- Player_ActionChange_13(this, play);
+ Player_ActionHandler_13(this, play);
return 1;
}
if ((this->focusActor != NULL) &&
- (CHECK_FLAG_ALL(this->focusActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_18) ||
+ (ACTOR_FLAGS_CHECK_ALL(this->focusActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP) ||
(this->focusActor->naviEnemyId != NAVI_ENEMY_NONE))) {
this->stateFlags2 |= PLAYER_STATE2_21;
} else if ((this->naviTextId == 0) && !Player_CheckHostileLockOn(this) &&
@@ -5957,7 +6323,7 @@ void func_8083BA90(PlayState* play, Player* this, s32 arg2, f32 xzSpeed, f32 yVe
}
s32 func_8083BB20(Player* this) {
- if (!(this->stateFlags1 & PLAYER_STATE1_22) && (Player_GetMeleeWeaponHeld(this) != 0)) {
+ if (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) && (Player_GetMeleeWeaponHeld(this) != 0)) {
if (sUseHeldItem ||
((this->actor.category != ACTORCAT_PLAYER) && CHECK_BTN_ALL(sControlInput->press.button, BTN_B))) {
return 1;
@@ -5976,22 +6342,22 @@ s32 func_8083BBA0(Player* this, PlayState* play) {
return 0;
}
-void func_8083BC04(Player* this, PlayState* play) {
- Player_SetupAction(play, this, Player_Action_80844708, 0);
+void Player_SetupRoll(Player* this, PlayState* play) {
+ Player_SetupAction(play, this, Player_Action_Roll, 0);
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime,
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_landing_roll, this->modelAnimType),
- 1.25f * D_808535E8);
+ FRAMERATE_CONST(1.25f, 1.5f) * sWaterSpeedFactor);
}
-s32 func_8083BC7C(Player* this, PlayState* play) {
+s32 Player_TryRoll(Player* this, PlayState* play) {
if ((this->controlStickDirections[this->controlStickDataIndex] == PLAYER_STICK_DIR_FORWARD) &&
(sFloorType != FLOOR_TYPE_7)) {
- func_8083BC04(this, play);
+ Player_SetupRoll(this, play);
- return 1;
+ return true;
}
- return 0;
+ return false;
}
void func_8083BCD0(Player* this, PlayState* play, s32 controlStickDirection) {
@@ -6011,11 +6377,11 @@ void func_8083BCD0(Player* this, PlayState* play, s32 controlStickDirection) {
Player_PlaySfx(this, ((controlStickDirection << 0xE) == 0x8000) ? NA_SE_PL_ROLL : NA_SE_PL_SKIP);
}
-s32 Player_ActionChange_10(Player* this, PlayState* play) {
+s32 Player_ActionHandler_10(Player* this, PlayState* play) {
s32 controlStickDirection;
- if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) &&
- (play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) && (sFloorType != FLOOR_TYPE_7) &&
+ if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) && (play->roomCtx.curRoom.type != ROOM_TYPE_INDOORS) &&
+ (sFloorType != FLOOR_TYPE_7) &&
(SurfaceType_GetFloorEffect(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) != FLOOR_EFFECT_1)) {
controlStickDirection = this->controlStickDirections[this->controlStickDataIndex];
@@ -6025,13 +6391,13 @@ s32 Player_ActionChange_10(Player* this, PlayState* play) {
if (controlStickDirection <= PLAYER_STICK_DIR_NONE) {
func_808389E8(this, &gPlayerAnim_link_normal_jump, REG(69) / 100.0f, play);
} else {
- func_8083BC04(this, play);
+ Player_SetupRoll(this, play);
}
} else {
if ((Player_GetMeleeWeaponHeld(this) != 0) && Player_CanUpdateItems(this)) {
func_8083BA90(play, this, PLAYER_MWA_JUMPSLASH_START, 5.0f, 5.0f);
} else {
- func_8083BC04(this, play);
+ Player_SetupRoll(this, play);
}
}
@@ -6083,8 +6449,8 @@ void func_8083C0B8(Player* this, PlayState* play) {
}
void func_8083C0E8(Player* this, PlayState* play) {
- Player_SetupAction(play, this, Player_Action_80840BC8, 1);
- Player_AnimPlayOnce(play, this, func_80833338(this));
+ Player_SetupAction(play, this, Player_Action_Idle, 1);
+ Player_AnimPlayOnce(play, this, Player_GetIdleAnim(this));
this->yaw = this->actor.shape.rot.y;
}
@@ -6104,23 +6470,33 @@ void func_8083C148(Player* this, PlayState* play) {
this->stateFlags1 &= ~(PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_20);
}
-s32 Player_ActionChange_6(Player* this, PlayState* play) {
+/**
+ * Handles setting up a roll if it is appropriate.
+ *
+ * If a roll is not applicable, there are two extra behaviors that could occur:
+ * - If an item is currently held in hand, it can be put away.
+ * - Navi can be toggled on and off.
+ * She will either appear and fly around Link's head, or disappear by flying back into his hat
+ *
+ * These extra behaviors are not new actions themselves, so they will result in `false` being returned
+ * even if they occur.
+ */
+s32 Player_ActionHandler_Roll(Player* this, PlayState* play) {
if (!Player_UpdateHostileLockOn(this) && !sUpperBodyIsBusy && !(this->stateFlags1 & PLAYER_STATE1_23) &&
CHECK_BTN_ALL(sControlInput->press.button, BTN_A)) {
- if (func_8083BC7C(this, play)) {
- return 1;
- }
- if ((this->unk_837 == 0) && (this->heldItemAction >= PLAYER_IA_SWORD_MASTER)) {
+ if (Player_TryRoll(this, play)) {
+ return true;
+ } else if ((this->putAwayCooldownTimer == 0) && (this->heldItemAction >= PLAYER_IA_SWORD_MASTER)) {
Player_UseItem(play, this, ITEM_NONE);
} else {
- this->stateFlags2 ^= PLAYER_STATE2_20;
+ this->stateFlags2 ^= PLAYER_STATE2_NAVI_ACTIVE;
}
}
- return 0;
+ return false;
}
-s32 Player_ActionChange_11(Player* this, PlayState* play) {
+s32 Player_ActionHandler_11(Player* this, PlayState* play) {
LinkAnimationHeader* anim;
f32 frame;
@@ -6133,7 +6509,7 @@ s32 Player_ActionChange_11(Player* this, PlayState* play) {
Player_DetachHeldActor(play, this);
if (Player_SetupAction(play, this, Player_Action_80843188, 0)) {
- this->stateFlags1 |= PLAYER_STATE1_22;
+ this->stateFlags1 |= PLAYER_STATE1_SHIELDING;
if (!Player_IsChildWithHylianShield(this)) {
Player_SetModelsForHoldingShield(this);
@@ -6149,14 +6525,14 @@ s32 Player_ActionChange_11(Player* this, PlayState* play) {
this->unk_86C = 0.0f;
func_80833C3C(this);
}
- this->unk_6BC = this->unk_6BE = this->unk_6C0 = 0;
+ this->upperLimbRot.x = this->upperLimbRot.y = this->upperLimbRot.z = 0;
}
frame = Animation_GetLastFrame(anim);
LinkAnimation_Change(play, &this->skelAnime, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f);
if (Player_IsChildWithHylianShield(this)) {
- Player_AnimReplaceApplyFlags(play, this, ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT);
+ Player_StartAnimMovement(play, this, ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT);
}
Player_PlaySfx(this, NA_SE_IT_SHIELD_POSTURE);
@@ -6172,7 +6548,7 @@ s32 func_8083C484(Player* this, f32* arg1, s16* arg2) {
s16 yaw = this->yaw - *arg2;
if (ABS(yaw) > 0x6000) {
- if (func_8083721C(this)) {
+ if (Player_DecelerateToZero(this)) {
*arg1 = 0.0f;
*arg2 = this->yaw;
} else {
@@ -6189,10 +6565,10 @@ void func_8083C50C(Player* this) {
}
}
-s32 Player_ActionChange_8(Player* this, PlayState* play) {
+s32 Player_ActionHandler_8(Player* this, PlayState* play) {
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) {
- if (!(this->stateFlags1 & PLAYER_STATE1_22) && (Player_GetMeleeWeaponHeld(this) != 0) && (this->unk_844 == 1) &&
- (this->heldItemAction != PLAYER_IA_DEKU_STICK)) {
+ if (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) && (Player_GetMeleeWeaponHeld2(this) != 0) &&
+ (this->unk_844 == 1) && (this->heldItemAction != PLAYER_IA_DEKU_STICK)) {
if ((this->heldItemAction != PLAYER_IA_SWORD_BIGGORON) ||
(gSaveContext.save.info.playerData.swordHealth > 0.0f)) {
func_808377DC(play, this);
@@ -6207,8 +6583,8 @@ s32 Player_ActionChange_8(Player* this, PlayState* play) {
}
s32 func_8083C61C(PlayState* play, Player* this) {
- if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) &&
- (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (AMMO(ITEM_DEKU_NUT) != 0)) {
+ if ((play->roomCtx.curRoom.type != ROOM_TYPE_INDOORS) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
+ (AMMO(ITEM_DEKU_NUT) != 0)) {
Player_SetupAction(play, this, Player_Action_8084E604, 0);
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_normal_light_bom);
this->unk_6AD = 0;
@@ -6218,21 +6594,28 @@ s32 func_8083C61C(PlayState* play, Player* this) {
return 0;
}
-static struct_80854554 D_80854554[] = {
- { &gPlayerAnim_link_bottle_bug_miss, &gPlayerAnim_link_bottle_bug_in, 2, 3 },
- { &gPlayerAnim_link_bottle_fish_miss, &gPlayerAnim_link_bottle_fish_in, 5, 3 },
+typedef struct BottleSwingInfo {
+ /* 0x00 */ LinkAnimationHeader* missAnimation;
+ /* 0x04 */ LinkAnimationHeader* catchAnimation;
+ /* 0x08 */ u8 firstActiveFrame;
+ /* 0x09 */ u8 numActiveFrames;
+} BottleSwingInfo; // size = 0x0C
+
+static BottleSwingInfo sBottleSwingInfo[] = {
+ { &gPlayerAnim_link_bottle_bug_miss, &gPlayerAnim_link_bottle_bug_in, 2, 3 }, // on land
+ { &gPlayerAnim_link_bottle_fish_miss, &gPlayerAnim_link_bottle_fish_in, 5, 3 }, // in water
};
s32 func_8083C6B8(PlayState* play, Player* this) {
if (sUseHeldItem) {
if (Player_GetBottleHeld(this) >= 0) {
- Player_SetupAction(play, this, Player_Action_8084ECA4, 0);
+ Player_SetupAction(play, this, Player_Action_SwingBottle, 0);
if (this->actor.depthInWater > 12.0f) {
- this->av2.actionVar2 = 1;
+ this->av2.inWater = true;
}
- Player_AnimPlayOnceAdjusted(play, this, D_80854554[this->av2.actionVar2].unk_00);
+ Player_AnimPlayOnceAdjusted(play, this, sBottleSwingInfo[this->av2.inWater].missAnimation);
Player_PlaySfx(this, NA_SE_IT_SWORD_SWING);
Player_PlayVoiceSfx(this, NA_SE_VO_LI_AUTO_JUMP);
@@ -6244,15 +6627,26 @@ s32 func_8083C6B8(PlayState* play, Player* this) {
rodCheckPos.y += 50.0f;
+#if OOT_VERSION < NTSC_1_1
+ if (BgCheck_SphVsFirstPoly(&play->colCtx, &rodCheckPos, 20.0f))
+#else
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.world.pos.z > 1300.0f) ||
- BgCheck_SphVsFirstPoly(&play->colCtx, &rodCheckPos, 20.0f)) {
+ BgCheck_SphVsFirstPoly(&play->colCtx, &rodCheckPos, 20.0f))
+#endif
+ {
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
return 0;
}
+#if OOT_VERSION < NTSC_1_1
+ this->unk_860 = 1;
+ Player_SetupAction(play, this, Player_Action_80850C68, 0);
+#else
Player_SetupAction(play, this, Player_Action_80850C68, 0);
this->unk_860 = 1;
Player_ZeroSpeedXZ(this);
+#endif
+
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_fishing_throw);
return 1;
} else {
@@ -6284,7 +6678,7 @@ void func_8083C8DC(Player* this, PlayState* play, s16 arg2) {
func_8083C858(this, play);
}
-s32 func_8083C910(PlayState* play, Player* this, f32 arg2) {
+s32 Player_SetStartingMovement(PlayState* play, Player* this, f32 arg2) {
WaterBox* sp2C;
f32 sp28;
@@ -6308,29 +6702,31 @@ s32 func_8083C910(PlayState* play, Player* this, f32 arg2) {
return 1;
}
-void func_8083CA20(PlayState* play, Player* this) {
- if (func_8083C910(play, this, 180.0f)) {
+void Player_StartMode_Idle(PlayState* play, Player* this) {
+ if (Player_SetStartingMovement(play, this, 180.0f)) {
this->av2.actionVar2 = -20;
}
}
-void func_8083CA54(PlayState* play, Player* this) {
+void Player_StartMode_MoveForwardSlow(PlayState* play, Player* this) {
this->speedXZ = 2.0f;
gSaveContext.entranceSpeed = 2.0f;
- if (func_8083C910(play, this, 120.0f)) {
+
+ if (Player_SetStartingMovement(play, this, 120.0f)) {
this->av2.actionVar2 = -15;
}
}
-void func_8083CA9C(PlayState* play, Player* this) {
+void Player_StartMode_MoveForward(PlayState* play, Player* this) {
if (gSaveContext.entranceSpeed < 0.1f) {
gSaveContext.entranceSpeed = 0.1f;
}
this->speedXZ = gSaveContext.entranceSpeed;
- if (func_8083C910(play, this, 800.0f)) {
+ if (Player_SetStartingMovement(play, this, 800.0f)) {
this->av2.actionVar2 = -80 / this->speedXZ;
+
if (this->av2.actionVar2 < -20) {
this->av2.actionVar2 = -20;
}
@@ -6368,11 +6764,14 @@ void func_8083CD00(Player* this, PlayState* play) {
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, &gPlayerAnim_link_anchor_back_brake, 2.0f);
}
-void func_8083CD54(PlayState* play, Player* this, s16 yaw) {
+void Player_SetupTurnInPlace(PlayState* play, Player* this, s16 yaw) {
this->yaw = yaw;
- Player_SetupAction(play, this, Player_Action_80841BA8, 1);
- this->unk_87E = 1200;
- this->unk_87E *= D_808535E8;
+
+ Player_SetupAction(play, this, Player_Action_TurnInPlace, 1);
+
+ this->turnRate = 1200;
+ this->turnRate *= sWaterSpeedFactor; // slow turn rate by half when in water
+
LinkAnimation_Change(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_45_turn, this->modelAnimType), 1.0f,
0.0f, 0.0f, ANIMMODE_LOOP, -6.0f);
}
@@ -6380,7 +6779,7 @@ void func_8083CD54(PlayState* play, Player* this, s16 yaw) {
void func_8083CE0C(Player* this, PlayState* play) {
LinkAnimationHeader* anim;
- Player_SetupAction(play, this, Player_Action_80840BC8, 1);
+ Player_SetupAction(play, this, Player_Action_Idle, 1);
if (this->unk_870 < 0.5f) {
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_waitR2wait, this->modelAnimType);
@@ -6426,7 +6825,12 @@ s32 func_8083CFA8(PlayState* play, Player* this, f32 arg2, s32 splashScale) {
splashPos.z = this->bodyPartsPos[PLAYER_BODYPART_WAIST].z;
sp34 = this->actor.world.pos.y;
if (WaterBox_GetSurface1(play, &play->colCtx, splashPos.x, splashPos.z, &sp34, &sp38)) {
- if ((sp34 - this->actor.world.pos.y) < 100.0f) {
+#if OOT_VERSION < PAL_1_0
+ if ((sp34 - this->actor.world.pos.y) < 80.0f)
+#else
+ if ((sp34 - this->actor.world.pos.y) < 100.0f)
+#endif
+ {
splashType = (sp3C <= 10.0f) ? 0 : 1;
splashPos.y = sp34;
EffectSsGSplash_Spawn(play, &splashPos, NULL, NULL, splashType, splashScale);
@@ -6481,7 +6885,7 @@ s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) {
Player_SetupAction(play, this, Player_Action_8084E1EC, 1);
if (this->stateFlags1 & PLAYER_STATE1_10) {
- this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_ACTOR_CARRY | PLAYER_STATE1_29;
+ this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_29;
}
this->av2.actionVar2 = 2;
@@ -6489,7 +6893,7 @@ s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) {
func_80832340(play, this);
Player_AnimChangeOnceMorph(play, this,
- (this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY)
+ (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)
? &gPlayerAnim_link_swimer_swim_get
: &gPlayerAnim_link_swimer_swim_deep_end);
@@ -6572,8 +6976,8 @@ void func_8083D53C(PlayState* play, Player* this) {
return;
}
} else if ((this->stateFlags1 & PLAYER_STATE1_27) && (this->actor.depthInWater < this->ageProperties->unk_24)) {
- if ((this->skelAnime.moveFlags == 0) && (this->currentBoots != PLAYER_BOOTS_IRON)) {
- func_8083CD54(play, this, this->actor.shape.rot.y);
+ if ((this->skelAnime.movementFlags == 0) && (this->currentBoots != PLAYER_BOOTS_IRON)) {
+ Player_SetupTurnInPlace(play, this, this->actor.shape.rot.y);
}
func_8083D0A8(play, this, this->actor.velocity.y);
}
@@ -6583,7 +6987,7 @@ void func_8083D53C(PlayState* play, Player* this) {
void func_8083D6EC(PlayState* play, Player* this) {
Vec3f ripplePos;
- this->actor.minVelocityY = -20.0f;
+ this->actor.minVelocityY = FRAMERATE_CONST(-20.0f, -24.0f);
this->actor.gravity = REG(68) / 100.0f;
if (func_8083816C(sFloorType)) {
@@ -6680,18 +7084,21 @@ void func_8083D6EC(PlayState* play, Player* this) {
s32 func_8083DB98(Player* this, s32 arg1) {
Actor* focusActor = this->focusActor;
- Vec3f sp30;
- s16 sp2E;
- s16 sp2C;
+ Vec3f playerHeadPos;
+ s16 targetFocusRotX;
+ s16 targetFocusRotY;
- sp30.x = this->actor.world.pos.x;
- sp30.y = this->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
- sp30.z = this->actor.world.pos.z;
- sp2E = Math_Vec3f_Pitch(&sp30, &focusActor->focus.pos);
- sp2C = Math_Vec3f_Yaw(&sp30, &focusActor->focus.pos);
- Math_SmoothStepToS(&this->actor.focus.rot.y, sp2C, 4, 10000, 0);
- Math_SmoothStepToS(&this->actor.focus.rot.x, sp2E, 4, 10000, 0);
- this->unk_6AE |= 2;
+ playerHeadPos.x = this->actor.world.pos.x;
+ playerHeadPos.y = this->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
+ playerHeadPos.z = this->actor.world.pos.z;
+
+ targetFocusRotX = Math_Vec3f_Pitch(&playerHeadPos, &focusActor->focus.pos);
+ targetFocusRotY = Math_Vec3f_Yaw(&playerHeadPos, &focusActor->focus.pos);
+
+ Math_SmoothStepToS(&this->actor.focus.rot.y, targetFocusRotY, 4, 10000, 0);
+ Math_SmoothStepToS(&this->actor.focus.rot.x, targetFocusRotX, 4, 10000, 0);
+
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_FOCUS_Y;
return func_80836AB8(this, arg1);
}
@@ -6706,9 +7113,9 @@ void func_8083DC54(Player* this, PlayState* play) {
if (this->focusActor != NULL) {
if (func_8002DD78(this) || func_808334B4(this)) {
- func_8083DB98(this, 1);
+ func_8083DB98(this, true);
} else {
- func_8083DB98(this, 0);
+ func_8083DB98(this, false);
}
return;
}
@@ -6731,22 +7138,22 @@ void func_8083DC54(Player* this, PlayState* play) {
void func_8083DDC8(Player* this, PlayState* play) {
if (!func_8002DD78(this) && !func_808334B4(this) && (this->speedXZ > 5.0f)) {
- s16 temp1;
- s16 temp2;
+ s16 targetPitch;
+ s16 targetRoll;
- temp1 = this->speedXZ * 200.0f;
- temp2 = (s16)(this->yaw - this->actor.shape.rot.y) * this->speedXZ * 0.1f;
+ targetPitch = this->speedXZ * 200.0f;
+ targetRoll = (s16)(this->yaw - this->actor.shape.rot.y) * this->speedXZ * 0.1f;
- temp1 = CLAMP(temp1, -4000, 4000);
- temp2 = CLAMP(-temp2, -4000, 4000);
+ targetPitch = CLAMP(targetPitch, -4000, 4000);
+ targetRoll = CLAMP(-targetRoll, -4000, 4000);
- Math_ScaledStepToS(&this->unk_6BC, temp1, 900);
- this->unk_6B6 = -(f32)this->unk_6BC * 0.5f;
+ Math_ScaledStepToS(&this->upperLimbRot.x, targetPitch, 900);
+ this->headLimbRot.x = -(f32)this->upperLimbRot.x * 0.5f;
- Math_ScaledStepToS(&this->unk_6BA, temp2, 300);
- Math_ScaledStepToS(&this->unk_6C0, temp2, 200);
+ Math_ScaledStepToS(&this->headLimbRot.z, targetRoll, 300);
+ Math_ScaledStepToS(&this->upperLimbRot.z, targetRoll, 200);
- this->unk_6AE |= 0x168;
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_HEAD_X | UNK6AE_ROT_HEAD_Z | UNK6AE_ROT_UPPER_X | UNK6AE_ROT_UPPER_Z;
} else {
func_8083DC54(this, play);
}
@@ -6779,7 +7186,7 @@ static struct_80854578 D_80854578[] = {
{ &gPlayerAnim_link_uma_right_up, -34.16f, 7.91f },
};
-s32 Player_ActionChange_3(Player* this, PlayState* play) {
+s32 Player_ActionHandler_3(Player* this, PlayState* play) {
EnHorse* rideActor = (EnHorse*)this->rideActor;
if ((rideActor != NULL) && CHECK_BTN_ALL(sControlInput->press.button, BTN_A)) {
@@ -6816,9 +7223,9 @@ s32 Player_ActionChange_3(Player* this, PlayState* play) {
Actor_MountHorse(play, this, &rideActor->actor);
Player_AnimPlayOnce(play, this, D_80854578[temp].anim);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE |
- ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT |
+ ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
this->actor.parent = this->rideActor;
func_80832224(this);
@@ -6839,7 +7246,7 @@ void Player_GetSlopeDirection(CollisionPoly* floorPoly, Vec3f* slopeNormal, s16*
}
s32 Player_HandleSlopes(PlayState* play, Player* this, CollisionPoly* floorPoly) {
- static LinkAnimationHeader* sSlopeSlipAnims[] = {
+ static LinkAnimationHeader* sSlopeSlideAnims[] = {
&gPlayerAnim_link_normal_down_slope_slip,
&gPlayerAnim_link_normal_up_slope_slip,
};
@@ -6851,7 +7258,7 @@ s32 Player_HandleSlopes(PlayState* play, Player* this, CollisionPoly* floorPoly)
f32 slopeSlowdownSpeedStep;
s16 velYawToDownwardSlope;
- if (!Player_InBlockingCsMode(play, this) && (Player_Action_8084F390 != this->actionFunc) &&
+ if (!Player_InBlockingCsMode(play, this) && (Player_Action_SlideOnSlope != this->actionFunc) &&
(SurfaceType_GetFloorEffect(&play->colCtx, floorPoly, this->actor.floorBgId) == FLOOR_EFFECT_1)) {
// Get direction of movement relative to the downward direction of the slope
playerVelYaw = Math_Atan2S(this->actor.velocity.z, this->actor.velocity.x);
@@ -6871,14 +7278,14 @@ s32 Player_HandleSlopes(PlayState* play, Player* this, CollisionPoly* floorPoly)
this->pushedYaw = downwardSlopeYaw;
Math_StepToF(&this->pushedSpeed, slopeSlowdownSpeed, slopeSlowdownSpeedStep);
} else {
- // moving downward on the slope, causing player to slip
- Player_SetupAction(play, this, Player_Action_8084F390, 0);
+ // moving downward on the slope, causing player to slip and then slide down
+ Player_SetupAction(play, this, Player_Action_SlideOnSlope, 0);
func_80832564(play, this);
if (sFloorShapePitch >= 0) {
- this->av1.actionVar1 = 1;
+ this->av1.facingUpSlope = true;
}
- Player_AnimChangeLoopMorph(play, this, sSlopeSlipAnims[this->av1.actionVar1]);
+ Player_AnimChangeLoopMorph(play, this, sSlopeSlideAnims[this->av1.facingUpSlope]);
this->speedXZ = sqrtf(SQ(this->actor.velocity.x) + SQ(this->actor.velocity.z));
this->yaw = playerVelYaw;
return true;
@@ -6910,13 +7317,13 @@ void func_8083E4C4(PlayState* play, Player* this, GetItemEntry* giEntry) {
Sfx_PlaySfxCentered((this->getItemId < 0) ? NA_SE_SY_GET_BOXITEM : NA_SE_SY_GET_ITEM);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
#define DEBUG_iREG_67 iREG(67)
#else
#define DEBUG_iREG_67 0
#endif
-s32 Player_ActionChange_2(Player* this, PlayState* play) {
+s32 Player_ActionHandler_2(Player* this, PlayState* play) {
Actor* interactedActor;
if (DEBUG_iREG_67 ||
@@ -6929,7 +7336,7 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) {
if (this->getItemId < GI_MAX) {
GetItemEntry* giEntry = &sGetItemTable[this->getItemId - 1];
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if ((interactedActor != &this->actor) && !iREG(67)) {
interactedActor->parent = &this->actor;
}
@@ -6949,7 +7356,7 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) {
func_80835EA4(play, 9);
}
- this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_ACTOR_CARRY | PLAYER_STATE1_29;
+ this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_29;
func_80832224(this);
return 1;
}
@@ -6958,7 +7365,7 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) {
this->getItemId = GI_NONE;
}
} else if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) &&
- !(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) && !(this->stateFlags2 & PLAYER_STATE2_10)) {
+ !(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && !(this->stateFlags2 & PLAYER_STATE2_10)) {
if (this->getItemId != GI_NONE) {
GetItemEntry* giEntry = &sGetItemTable[-this->getItemId - 1];
EnBox* chest = (EnBox*)interactedActor;
@@ -6972,7 +7379,7 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) {
}
Player_SetupWaitForPutAway(play, this, func_8083A434);
- this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_ACTOR_CARRY | PLAYER_STATE1_29;
+ this->stateFlags1 |= PLAYER_STATE1_10 | PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_29;
func_8083AE40(this, giEntry->objectId);
this->actor.world.pos.x =
chest->dyna.actor.world.pos.x - (Math_SinS(chest->dyna.actor.shape.rot.y) * 29.4343f);
@@ -6984,10 +7391,10 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) {
if ((giEntry->itemId != ITEM_NONE) && (giEntry->gi >= 0) &&
(Item_CheckObtainability(giEntry->itemId) == ITEM_NONE)) {
Player_AnimPlayOnceAdjusted(play, this, this->ageProperties->unk_98);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
- ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ PLAYER_ANIM_MOVEMENT_RESET_BY_AGE | ANIM_FLAG_UPDATE_XZ |
+ ANIM_FLAG_UPDATE_Y | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
+ ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_OVERRIDE_MOVEMENT);
chest->unk_1F4 = 1;
Camera_RequestSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_SLOW_CHEST_CS);
} else {
@@ -7025,7 +7432,7 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) {
}
func_80832224(this);
- this->stateFlags1 |= PLAYER_STATE1_ACTOR_CARRY;
+ this->stateFlags1 |= PLAYER_STATE1_CARRYING_ACTOR;
return 1;
}
}
@@ -7039,20 +7446,29 @@ void func_8083EA94(Player* this, PlayState* play) {
Player_AnimPlayOnce(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_throw, this->modelAnimType));
}
-s32 func_8083EAF0(Player* this, Actor* actor) {
- if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_23) &&
+/**
+ * Checks if an actor can be thrown or dropped.
+ * It is assumed that the `actor` argument is the actor currently being carried.
+ *
+ * @return true if it can be thrown, false if it can be dropped.
+ */
+s32 Player_CanThrowCarriedActor(Player* this, Actor* actor) {
+ // If the actor arg is null, true will be returned.
+ // It doesn't make sense for a non-existent actor to be thrown or dropped, so
+ // the safety check should happen before this function is even called.
+ if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_THROW_ONLY) &&
((this->speedXZ < 1.1f) || (actor->id == ACTOR_EN_BOM_CHU))) {
- return 0;
+ return false;
}
- return 1;
+ return true;
}
-s32 Player_ActionChange_9(Player* this, PlayState* play) {
- if ((this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) && (this->heldActor != NULL) &&
+s32 Player_ActionHandler_9(Player* this, PlayState* play) {
+ if ((this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (this->heldActor != NULL) &&
CHECK_BTN_ANY(sControlInput->press.button, BTN_A | BTN_B | BTN_CLEFT | BTN_CDOWN | BTN_CRIGHT)) {
if (!func_80835644(play, this, this->heldActor)) {
- if (!func_8083EAF0(this, this->heldActor)) {
+ if (!Player_CanThrowCarriedActor(this, this->heldActor)) {
Player_SetupAction(play, this, Player_Action_808464B0, 1);
Player_AnimPlayOnce(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_put, this->modelAnimType));
} else {
@@ -7163,10 +7579,10 @@ s32 func_8083EC18(Player* this, PlayState* play, u32 wallFlags) {
func_80832224(this);
Math_Vec3f_Copy(&this->actor.prevPos, &this->actor.world.pos);
Player_AnimPlayOnce(play, this, anim);
- Player_AnimReplaceApplyFlags(
- play, this,
- ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
- ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
+ ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
return true;
}
@@ -7178,7 +7594,7 @@ s32 func_8083EC18(Player* this, PlayState* play, u32 wallFlags) {
}
void func_8083F070(Player* this, LinkAnimationHeader* anim, PlayState* play) {
- func_80835DAC(play, this, Player_Action_8084C5F8, 0);
+ Player_SetupActionPreserveAnimMovement(play, this, Player_Action_8084C5F8, 0);
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, anim, (4.0f / 3.0f));
}
@@ -7245,10 +7661,10 @@ s32 Player_TryEnteringCrawlspace(Player* this, PlayState* play, u32 interactWall
func_80832224(this);
this->actor.prevPos = this->actor.world.pos;
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_child_tunnel_start);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
- ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS |
- ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
+ ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS |
+ ANIM_FLAG_OVERRIDE_MOVEMENT);
return true;
}
@@ -7311,7 +7727,7 @@ s32 func_8083F524(PlayState* play, Player* this) {
/**
* Two exit walls are placed at each end of the crawlspace, separate to the two entrance walls used to enter the
- * crawlspace. These front and back exit walls are futher into the crawlspace than the front and
+ * crawlspace. These front and back exit walls are further into the crawlspace than the front and
* back entrance walls. When player interacts with either of these two interior exit walls, start the leaving-crawlspace
* cutscene and return true. Else, return false
*/
@@ -7336,10 +7752,10 @@ s32 Player_TryLeavingCrawlspace(Player* this, PlayState* play) {
// Leaving a crawlspace forwards
this->actor.shape.rot.y = this->actor.wallYaw + 0x8000;
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_child_tunnel_end);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
- ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS |
- ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
+ ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS |
+ ANIM_FLAG_OVERRIDE_MOVEMENT);
OnePointCutscene_Init(play, 9601, 999, NULL, CAM_ID_MAIN);
} else {
// Leaving a crawlspace backwards
@@ -7347,10 +7763,10 @@ s32 Player_TryLeavingCrawlspace(Player* this, PlayState* play) {
LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_child_tunnel_start, -1.0f,
Animation_GetLastFrame(&gPlayerAnim_link_child_tunnel_start), 0.0f, ANIMMODE_ONCE,
0.0f);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
- ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS |
- ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
+ ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS |
+ ANIM_FLAG_OVERRIDE_MOVEMENT);
OnePointCutscene_Init(play, 9602, 999, NULL, CAM_ID_MAIN);
}
@@ -7375,10 +7791,10 @@ void func_8083F72C(Player* this, LinkAnimationHeader* anim, PlayState* play) {
this->actor.shape.rot.y = this->yaw = this->actor.wallYaw + 0x8000;
}
-s32 Player_ActionChange_5(Player* this, PlayState* play) {
+s32 Player_ActionHandler_5(Player* this, PlayState* play) {
DynaPolyActor* wallPolyActor;
- if (!(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) &&
+ if (!(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) &&
(this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) && (sShapeYawToTouchedWall < 0x3000)) {
if (((this->speedXZ > 0.0f) && func_8083EC18(this, play, sTouchedWallFlags)) ||
@@ -7403,7 +7819,7 @@ s32 Player_ActionChange_5(Player* this, PlayState* play) {
}
Player_SetupWaitForPutAway(play, this, func_8083A0F4);
- this->stateFlags1 |= PLAYER_STATE1_ACTOR_CARRY;
+ this->stateFlags1 |= PLAYER_STATE1_CARRYING_ACTOR;
this->interactRangeActor = &wallPolyActor->actor;
this->getItemId = GI_NONE;
this->yaw = this->actor.wallYaw + 0x8000;
@@ -7515,10 +7931,10 @@ s32 func_8083FD78(Player* this, f32* arg1, s16* arg2, PlayState* play) {
}
if (this->focusActor != NULL) {
- func_8083DB98(this, 1);
+ func_8083DB98(this, true);
} else {
Math_SmoothStepToS(&this->actor.focus.rot.x, sControlInput->rel.stick_y * 240.0f, 14, 4000, 30);
- func_80836AB8(this, 1);
+ func_80836AB8(this, true);
}
} else {
if (this->focusActor != NULL) {
@@ -7655,7 +8071,7 @@ void Player_Action_80840450(Player* this, PlayState* play) {
if (this->av2.actionVar2 != 0) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
- func_80832DBC(this);
+ Player_FinishAnimMovement(this);
Player_AnimPlayLoop(play, this, func_808334E4(this));
this->av2.actionVar2 = 0;
this->stateFlags3 &= ~PLAYER_STATE3_3;
@@ -7665,9 +8081,9 @@ void Player_Action_80840450(Player* this, PlayState* play) {
func_808401B0(play, this);
}
- func_8083721C(this);
+ Player_DecelerateToZero(this);
- if (!Player_TryActionChangeList(play, this, sActionChangeList1, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList1, true)) {
if (!Player_UpdateHostileLockOn(this) &&
(!Player_FriendlyLockOnOrParallel(this) || (func_80834B5C != this->upperActionFunc))) {
func_8083CF10(this, play);
@@ -7728,20 +8144,20 @@ void Player_Action_808407CC(Player* this, PlayState* play) {
s32 temp3;
if (LinkAnimation_Update(play, &this->skelAnime)) {
- func_80832DBC(this);
- Player_AnimPlayOnce(play, this, func_80833338(this));
+ Player_FinishAnimMovement(this);
+ Player_AnimPlayOnce(play, this, Player_GetIdleAnim(this));
}
- func_8083721C(this);
+ Player_DecelerateToZero(this);
- if (!Player_TryActionChangeList(play, this, sActionChangeList2, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList2, true)) {
if (Player_UpdateHostileLockOn(this)) {
func_8083CEAC(this, play);
return;
}
if (!Player_FriendlyLockOnOrParallel(this)) {
- func_80835DAC(play, this, Player_Action_80840BC8, 1);
+ Player_SetupActionPreserveAnimMovement(play, this, Player_Action_Idle, 1);
this->yaw = this->actor.shape.rot.y;
return;
}
@@ -7779,90 +8195,128 @@ void Player_Action_808407CC(Player* this, PlayState* play) {
temp3 = ABS(temp2);
if (temp3 > 800) {
- func_8083CD54(play, this, yawTarget);
+ Player_SetupTurnInPlace(play, this, yawTarget);
}
}
}
-void func_808409CC(PlayState* play, Player* this) {
+void Player_ChooseNextIdleAnim(PlayState* play, Player* this) {
LinkAnimationHeader* anim;
- LinkAnimationHeader** animPtr;
+ LinkAnimationHeader** fidgetAnimPtr;
s32 heathIsCritical;
- s32 sp38;
- s32 sp34;
+ s32 fidgetType;
+ s32 commonType;
if ((this->focusActor != NULL) ||
- (!(heathIsCritical = Health_IsCritical()) && ((this->unk_6AC = (this->unk_6AC + 1) & 1) != 0))) {
- this->stateFlags2 &= ~PLAYER_STATE2_28;
- anim = func_80833338(this);
+ (!(heathIsCritical = Health_IsCritical()) && ((this->idleType = (this->idleType + 1) & 1) != 0))) {
+ this->stateFlags2 &= ~PLAYER_STATE2_IDLE_FIDGET;
+ anim = Player_GetIdleAnim(this);
} else {
- this->stateFlags2 |= PLAYER_STATE2_28;
- if (this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) {
- anim = func_80833338(this);
+ this->stateFlags2 |= PLAYER_STATE2_IDLE_FIDGET;
+
+ if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
+ // Default idle animation will play if carrying an actor.
+ // Note that in this case, `PLAYER_STATE2_IDLE_FIDGET` is still set even though the
+ // animation that plays isn't a fidget animation.
+ anim = Player_GetIdleAnim(this);
} else {
- sp38 = play->roomCtx.curRoom.behaviorType2;
+ // Pick fidget type based on room behavior.
+ // This may be changed below.
+ fidgetType = play->roomCtx.curRoom.environmentType;
+
if (heathIsCritical) {
- if (this->unk_6AC >= 0) {
- sp38 = 7;
- this->unk_6AC = -1;
+ if (this->idleType >= PLAYER_IDLE_DEFAULT) {
+ fidgetType = FIDGET_CRIT_HEALTH_START;
+
+ // When health is critical, `idleType` will not be updated.
+ // It will stay as `PLAYER_IDLE_CRIT_HEALTH` until health is no longer critical.
+ this->idleType = PLAYER_IDLE_CRIT_HEALTH;
} else {
- sp38 = 8;
+ // Keep looping the critical health animation until critical health ends
+ fidgetType = FIDGET_CRIT_HEALTH_LOOP;
}
} else {
- sp34 = Rand_ZeroOne() * 5.0f;
- if (sp34 < 4) {
- if (((sp34 != 0) && (sp34 != 3)) || ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) &&
- ((sp34 == 3) || (Player_GetMeleeWeaponHeld(this) != 0)))) {
- if ((sp34 == 0) && Player_HoldsTwoHandedWeapon(this)) {
- sp34 = 4;
+ commonType = Rand_ZeroOne() * 5;
+
+ // There is a 4/5 chance that a common fidget type will be considered.
+ // However it may get rejected by the conditions below.
+ // The type determined by `curRoom.environmentType` will be used if a common type is
+ // rejected.
+ if (commonType < 4) {
+ // `FIDGET_ADJUST_TUNIC` and `FIDGET_TAP_FEET` are accepted unconditionally.
+ // The sword and shield related common types have extra restrictions.
+ //
+ // Note that `FIDGET_SWORD_SWING` is the first common fidget type, which is why
+ // all operations are done relative to this type.
+ if (((commonType + FIDGET_SWORD_SWING != FIDGET_SWORD_SWING) &&
+ (commonType + FIDGET_SWORD_SWING != FIDGET_ADJUST_SHIELD)) ||
+ ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) &&
+ ((commonType + FIDGET_SWORD_SWING == FIDGET_ADJUST_SHIELD) ||
+ (Player_GetMeleeWeaponHeld2(this) != 0)))) {
+ //! @bug It is possible for `FIDGET_ADJUST_SHIELD` to be used even if
+ //! a shield is not currently equipped. This is because of how being shieldless
+ //! is implemented. There is no sword-only model type, only
+ //! `PLAYER_MODELGROUP_SWORD_AND_SHIELD` exists. Therefore, the right hand type will be
+ //! `PLAYER_MODELTYPE_RH_SHIELD` if sword is in hand, even if no shield is equipped.
+ if ((commonType + FIDGET_SWORD_SWING == FIDGET_SWORD_SWING) &&
+ Player_HoldsTwoHandedWeapon(this)) {
+ //! @bug This code is unreachable.
+ //! The check above groups the `Player_GetMeleeWeaponHeld2` check and
+ //! `PLAYER_MODELTYPE_RH_SHIELD` conditions together, meaning sword and shield must be
+ //! in hand. However shield is not in hand when using a two handed melee weapon.
+ commonType = FIDGET_SWORD_SWING_TWO_HAND - FIDGET_SWORD_SWING;
}
- sp38 = sp34 + 9;
+
+ fidgetType = FIDGET_SWORD_SWING + commonType;
}
}
}
- animPtr = &D_80853D7C[sp38][0];
+
+ fidgetAnimPtr = &sFidgetAnimations[fidgetType][0];
+
if (this->modelAnimType != PLAYER_ANIMTYPE_1) {
- animPtr = &D_80853D7C[sp38][1];
+ fidgetAnimPtr = &sFidgetAnimations[fidgetType][1];
}
- anim = *animPtr;
+
+ anim = *fidgetAnimPtr;
}
}
- LinkAnimation_Change(play, &this->skelAnime, anim, (2.0f / 3.0f) * D_808535E8, 0.0f, Animation_GetLastFrame(anim),
- ANIMMODE_ONCE, -6.0f);
+ LinkAnimation_Change(play, &this->skelAnime, anim, (2.0f / 3.0f) * sWaterSpeedFactor, 0.0f,
+ Animation_GetLastFrame(anim), ANIMMODE_ONCE, -6.0f);
}
-void Player_Action_80840BC8(Player* this, PlayState* play) {
- s32 sp44;
- s32 sp40;
+void Player_Action_Idle(Player* this, PlayState* play) {
+ s32 idleAnimResult = Player_CheckForIdleAnim(this);
+ s32 animDone = LinkAnimation_Update(play, &this->skelAnime);
f32 speedTarget;
s16 yawTarget;
- s16 temp;
+ s16 yawDiff;
- sp44 = func_80833350(this);
- sp40 = LinkAnimation_Update(play, &this->skelAnime);
-
- if (sp44 > 0) {
- func_808333FC(this, sp44 - 1);
+ if (idleAnimResult > IDLE_ANIM_NONE) {
+ Player_ProcessFidgetAnimSfxList(this, idleAnimResult - 1);
}
- if (sp40 != 0) {
- if (this->av2.actionVar2 != 0) {
- if (DECR(this->av2.actionVar2) == 0) {
+ if (animDone) {
+ if (this->av2.fallDamageStunTimer != 0) {
+ if (DECR(this->av2.fallDamageStunTimer) == 0) {
this->skelAnime.endFrame = this->skelAnime.animLength - 1.0f;
}
+
+ // Offset model y position.
+ // Depending on if the timer is even or odd, the offset will be 40 or -40 model space units.
this->skelAnime.jointTable[0].y =
- (this->skelAnime.jointTable[0].y + ((this->av2.actionVar2 & 1) * 0x50)) - 0x28;
+ (this->skelAnime.jointTable[0].y + ((this->av2.fallDamageStunTimer & 1) * 80)) - 40;
} else {
- func_80832DBC(this);
- func_808409CC(play, this);
+ Player_FinishAnimMovement(this);
+ Player_ChooseNextIdleAnim(play, this);
}
}
- func_8083721C(this);
+ Player_DecelerateToZero(this);
- if (this->av2.actionVar2 == 0) {
- if (!Player_TryActionChangeList(play, this, sActionChangeList7, true)) {
+ if (this->av2.fallDamageStunTimer == 0) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerListIdle, true)) {
if (Player_UpdateHostileLockOn(this)) {
func_8083CEAC(this, play);
return;
@@ -7880,15 +8334,17 @@ void Player_Action_80840BC8(Player* this, PlayState* play) {
return;
}
- temp = yawTarget - this->actor.shape.rot.y;
- if (ABS(temp) > 800) {
- func_8083CD54(play, this, yawTarget);
+ yawDiff = yawTarget - this->actor.shape.rot.y;
+
+ if (ABS(yawDiff) > 800) {
+ Player_SetupTurnInPlace(play, this, yawTarget);
return;
}
Math_ScaledStepToS(&this->actor.shape.rot.y, yawTarget, 1200);
this->yaw = this->actor.shape.rot.y;
- if (func_80833338(this) == this->skelAnime.animation) {
+
+ if (Player_GetIdleAnim(this) == this->skelAnime.animation) {
func_8083DC54(this, play);
}
}
@@ -7935,7 +8391,7 @@ void Player_Action_80840DE4(Player* this, PlayState* play) {
Player_PlaySteppingSfx(this, this->speedXZ);
}
- if (!Player_TryActionChangeList(play, this, sActionChangeList3, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList3, true)) {
if (Player_UpdateHostileLockOn(this)) {
func_8083CEAC(this, play);
return;
@@ -8040,7 +8496,7 @@ s32 func_80841458(Player* this, f32* arg1, s16* arg2, PlayState* play) {
}
if (*arg1 != 0.0f) {
- if (func_8083721C(this)) {
+ if (Player_DecelerateToZero(this)) {
*arg1 = 0.0f;
*arg2 = this->yaw;
} else {
@@ -8058,7 +8514,7 @@ void Player_Action_808414F8(Player* this, PlayState* play) {
func_80841138(this, play);
- if (!Player_TryActionChangeList(play, this, sActionChangeList4, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList4, true)) {
if (!Player_IsZTargetingWithHostileUpdate(this)) {
func_8083C8DC(this, play, this->yaw);
return;
@@ -8101,9 +8557,9 @@ void Player_Action_8084170C(Player* this, PlayState* play) {
s16 yawTarget;
sp34 = LinkAnimation_Update(play, &this->skelAnime);
- func_8083721C(this);
+ Player_DecelerateToZero(this);
- if (!Player_TryActionChangeList(play, this, sActionChangeList4, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList4, true)) {
Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play);
if (this->speedXZ == 0.0f) {
@@ -8123,7 +8579,7 @@ void Player_Action_808417FC(Player* this, PlayState* play) {
sp1C = LinkAnimation_Update(play, &this->skelAnime);
- if (!Player_TryActionChangeList(play, this, sActionChangeList4, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList4, true)) {
if (sp1C != 0) {
func_80839F30(this, play);
}
@@ -8150,7 +8606,7 @@ void Player_Action_8084193C(Player* this, PlayState* play) {
func_80841860(play, this);
- if (!Player_TryActionChangeList(play, this, sActionChangeList5, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList5, true)) {
if (!Player_IsZTargetingWithHostileUpdate(this)) {
func_8083C858(this, play);
return;
@@ -8200,14 +8656,21 @@ void Player_Action_8084193C(Player* this, PlayState* play) {
}
}
-void Player_Action_80841BA8(Player* this, PlayState* play) {
+/**
+ * Turn in place until the angle pointed to by the control stick is reached.
+ *
+ * This is the state that the speedrunning community refers to as "ESS" or "ESS Position".
+ * See the bug comment below and https://www.zeldaspeedruns.com/oot/tech/extended-superslide
+ * for more information.
+ */
+void Player_Action_TurnInPlace(Player* this, PlayState* play) {
f32 speedTarget;
s16 yawTarget;
LinkAnimation_Update(play, &this->skelAnime);
- if (Player_HoldsTwoHandedWeapon(this)) {
- AnimTaskQueue_AddLoadPlayerFrame(play, func_80833338(this), 0, this->skelAnime.limbCount,
+ if (Player_HoldsTwoHandedWeapon2(this)) {
+ AnimTaskQueue_AddLoadPlayerFrame(play, Player_GetIdleAnim(this), 0, this->skelAnime.limbCount,
this->skelAnime.morphTable);
AnimTaskQueue_AddCopyUsingMap(play, this->skelAnime.limbCount, this->skelAnime.jointTable,
this->skelAnime.morphTable, sUpperBodyLimbCopyMap);
@@ -8215,11 +8678,19 @@ void Player_Action_80841BA8(Player* this, PlayState* play) {
Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_CURVED, play);
- if (!Player_TryActionChangeList(play, this, sActionChangeList6, true)) {
+ //! @bug This action does not handle xzSpeed in any capacity.
+ //! Player's current speed value will be maintained the entire time this action is running.
+ //! This is the core bug that allows many different glitches to manifest.
+ //!
+ //! One possible fix is to kill all speed instantly in `Player_SetupTurnInPlace`.
+ //! Another possible fix is to gradually kill speed by calling `Player_DecelerateToZero`
+ //! here, which plenty of other "standing" actions do.
+
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerListTurnInPlace, true)) {
if (speedTarget != 0.0f) {
this->actor.shape.rot.y = yawTarget;
func_8083C858(this, play);
- } else if (Math_ScaledStepToS(&this->actor.shape.rot.y, yawTarget, this->unk_87E)) {
+ } else if (Math_ScaledStepToS(&this->actor.shape.rot.y, yawTarget, this->turnRate)) {
func_8083C0E8(this, play);
}
@@ -8333,7 +8804,7 @@ void Player_Action_80842180(Player* this, PlayState* play) {
this->stateFlags2 |= PLAYER_STATE2_5;
func_80841EE4(this, play);
- if (!Player_TryActionChangeList(play, this, sActionChangeList8, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList8, true)) {
if (Player_IsZTargetingWithHostileUpdate(this)) {
func_8083C858(this, play);
return;
@@ -8359,7 +8830,7 @@ void Player_Action_8084227C(Player* this, PlayState* play) {
this->stateFlags2 |= PLAYER_STATE2_5;
func_80841EE4(this, play);
- if (!Player_TryActionChangeList(play, this, sActionChangeList9, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList9, true)) {
if (!Player_IsZTargetingWithHostileUpdate(this)) {
func_8083C858(this, play);
return;
@@ -8392,7 +8863,7 @@ void Player_Action_808423EC(Player* this, PlayState* play) {
sp34 = LinkAnimation_Update(play, &this->skelAnime);
- if (!Player_TryActionChangeList(play, this, sActionChangeList5, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList5, true)) {
if (!Player_IsZTargetingWithHostileUpdate(this)) {
func_8083C858(this, play);
return;
@@ -8401,7 +8872,7 @@ void Player_Action_808423EC(Player* this, PlayState* play) {
Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play);
if ((this->skelAnime.morphWeight == 0.0f) && (this->skelAnime.curFrame > 5.0f)) {
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if ((this->skelAnime.curFrame > 10.0f) && (func_8083FC68(this, speedTarget, yawTarget) < 0)) {
func_8083CBF0(this, yawTarget, play);
@@ -8422,9 +8893,9 @@ void Player_Action_8084251C(Player* this, PlayState* play) {
sp34 = LinkAnimation_Update(play, &this->skelAnime);
- func_8083721C(this);
+ Player_DecelerateToZero(this);
- if (!Player_TryActionChangeList(play, this, sActionChangeList10, true)) {
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList10, true)) {
Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play);
if (this->speedXZ == 0.0f) {
@@ -8471,7 +8942,7 @@ void Player_Action_8084279C(Player* this, PlayState* play) {
func_80832CB0(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check_wait, this->modelAnimType));
if (DECR(this->av2.actionVar2) == 0) {
- if (!Player_ActionChange_13(this, play)) {
+ if (!Player_ActionHandler_13(this, play)) {
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check_end, this->modelAnimType), play);
}
@@ -8491,11 +8962,11 @@ s32 func_8084285C(Player* this, f32 arg1, f32 arg2, f32 arg3) {
}
s32 func_808428D8(Player* this, PlayState* play) {
- if (!Player_IsChildWithHylianShield(this) && (Player_GetMeleeWeaponHeld(this) != 0) && sUseHeldItem) {
+ if (!Player_IsChildWithHylianShield(this) && (Player_GetMeleeWeaponHeld2(this) != 0) && sUseHeldItem) {
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_normal_defense_kiru);
this->av1.actionVar1 = 1;
this->meleeWeaponAnimation = PLAYER_MWA_STAB_1H;
- this->yaw = this->actor.shape.rot.y + this->unk_6BE;
+ this->yaw = this->actor.shape.rot.y + this->upperLimbRot.y;
return 1;
}
@@ -8503,7 +8974,8 @@ s32 func_808428D8(Player* this, PlayState* play) {
}
int func_80842964(Player* this, PlayState* play) {
- return Player_ActionChange_13(this, play) || Player_ActionChange_4(this, play) || Player_ActionChange_2(this, play);
+ return Player_ActionHandler_13(this, play) || Player_ActionHandler_Talk(this, play) ||
+ Player_ActionHandler_2(this, play);
}
void Player_RequestQuake(PlayState* play, s32 speed, s32 y, s32 duration) {
@@ -8674,7 +9146,8 @@ s32 func_80842DF4(PlayState* play, Player* this) {
if (this->actor.colChkInfo.atHitEffect == 1) {
this->actor.colChkInfo.damage = 8;
- func_80837C0C(play, this, 4, 0.0f, 0.0f, this->actor.shape.rot.y, 20);
+ func_80837C0C(play, this, PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK, 0.0f, 0.0f, this->actor.shape.rot.y,
+ 20);
return 1;
}
}
@@ -8694,12 +9167,12 @@ void Player_Action_80843188(Player* this, PlayState* play) {
}
if (!Player_IsChildWithHylianShield(this)) {
- this->stateFlags1 |= PLAYER_STATE1_22;
+ this->stateFlags1 |= PLAYER_STATE1_SHIELDING;
Player_UpdateUpperBody(this, play);
- this->stateFlags1 &= ~PLAYER_STATE1_22;
+ this->stateFlags1 &= ~PLAYER_STATE1_SHIELDING;
}
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (this->av2.actionVar2 != 0) {
f32 sp54;
@@ -8729,14 +9202,14 @@ void Player_Action_80843188(Player* this, PlayState* play) {
sp48 = 100;
}
- sp46 = ABS(sp4A - this->unk_6BE) * 0.25f;
+ sp46 = ABS(sp4A - this->upperLimbRot.y) * 0.25f;
if (sp46 < 50) {
sp46 = 50;
}
Math_ScaledStepToS(&this->actor.focus.rot.x, sp4C, sp48);
- this->unk_6BC = this->actor.focus.rot.x;
- Math_ScaledStepToS(&this->unk_6BE, sp4A, sp46);
+ this->upperLimbRot.x = this->actor.focus.rot.x;
+ Math_ScaledStepToS(&this->upperLimbRot.y, sp4A, sp46);
if (this->av1.actionVar1 != 0) {
if (!func_80842DF4(play, this)) {
@@ -8748,10 +9221,10 @@ void Player_Action_80843188(Player* this, PlayState* play) {
this->av1.actionVar1 = 0;
}
} else if (!func_80842964(this, play)) {
- if (Player_ActionChange_11(this, play)) {
+ if (Player_ActionHandler_11(this, play)) {
func_808428D8(this, play);
} else {
- this->stateFlags1 &= ~PLAYER_STATE1_22;
+ this->stateFlags1 &= ~PLAYER_STATE1_SHIELDING;
func_80832318(this);
if (Player_IsChildWithHylianShield(this)) {
@@ -8759,7 +9232,7 @@ void Player_Action_80843188(Player* this, PlayState* play) {
LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_clink_normal_defense_ALL, 1.0f,
Animation_GetLastFrame(&gPlayerAnim_clink_normal_defense_ALL), 0.0f,
ANIMMODE_ONCE, 0.0f);
- Player_AnimReplaceApplyFlags(play, this, ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT);
+ Player_StartAnimMovement(play, this, ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT);
} else {
if (this->itemAction < 0) {
func_8008EC70(this);
@@ -8775,10 +9248,10 @@ void Player_Action_80843188(Player* this, PlayState* play) {
}
}
- this->stateFlags1 |= PLAYER_STATE1_22;
+ this->stateFlags1 |= PLAYER_STATE1_SHIELDING;
Player_SetModelsForHoldingShield(this);
- this->unk_6AE |= 0xC1;
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_FOCUS_X | UNK6AE_ROT_UPPER_X | UNK6AE_ROT_UPPER_Y;
}
void Player_Action_808435C4(Player* this, PlayState* play) {
@@ -8786,7 +9259,7 @@ void Player_Action_808435C4(Player* this, PlayState* play) {
LinkAnimationHeader* anim;
f32 frames;
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (this->av1.actionVar1 == 0) {
sUpperBodyIsBusy = Player_UpdateUpperBody(this, play);
@@ -8801,7 +9274,7 @@ void Player_Action_808435C4(Player* this, PlayState* play) {
if ((interruptResult != PLAYER_INTERRUPT_NEW_ACTION) &&
((interruptResult >= PLAYER_INTERRUPT_MOVE) || LinkAnimation_Update(play, &this->skelAnime))) {
Player_SetupAction(play, this, Player_Action_80843188, 1);
- this->stateFlags1 |= PLAYER_STATE1_22;
+ this->stateFlags1 |= PLAYER_STATE1_SHIELDING;
Player_SetModelsForHoldingShield(this);
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_defense, this->modelAnimType);
frames = Animation_GetLastFrame(anim);
@@ -8813,7 +9286,7 @@ void Player_Action_808435C4(Player* this, PlayState* play) {
void Player_Action_8084370C(Player* this, PlayState* play) {
s32 interruptResult;
- func_8083721C(this);
+ Player_DecelerateToZero(this);
interruptResult = Player_TryActionInterrupt(play, this, &this->skelAnime, 16.0f);
@@ -8828,14 +9301,15 @@ void Player_Action_8084377C(Player* this, PlayState* play) {
func_808382BC(this);
- if (!(this->stateFlags1 & PLAYER_STATE1_29) && (this->av2.actionVar2 == 0) && (this->unk_8A1 != 0)) {
- s16 temp = this->actor.shape.rot.y - this->unk_8A2;
+ if (!(this->stateFlags1 & PLAYER_STATE1_29) && (this->av2.actionVar2 == 0) &&
+ (this->knockbackType != PLAYER_KNOCKBACK_NONE)) {
+ s16 temp = this->actor.shape.rot.y - this->knockbackRot;
- this->yaw = this->actor.shape.rot.y = this->unk_8A2;
- this->speedXZ = this->unk_8A4;
+ this->yaw = this->actor.shape.rot.y = this->knockbackRot;
+ this->speedXZ = this->knockbackSpeed;
if (ABS(temp) > 0x4000) {
- this->actor.shape.rot.y = this->unk_8A2 + 0x8000;
+ this->actor.shape.rot.y = this->knockbackRot + 0x8000;
}
if (this->actor.velocity.y < 0.0f) {
@@ -8851,7 +9325,7 @@ void Player_Action_8084377C(Player* this, PlayState* play) {
func_80853080(this, play);
}
} else if ((this->stateFlags1 & PLAYER_STATE1_29) ||
- (!(this->cylinder.base.acFlags & AC_HIT) && (this->unk_8A1 == 0))) {
+ (!(this->cylinder.base.acFlags & AC_HIT) && (this->knockbackType == PLAYER_KNOCKBACK_NONE))) {
if (this->stateFlags1 & PLAYER_STATE1_29) {
this->av2.actionVar2++;
} else {
@@ -8875,7 +9349,7 @@ void Player_Action_80843954(Player* this, PlayState* play) {
this->stateFlags2 |= PLAYER_STATE2_5 | PLAYER_STATE2_6;
func_808382BC(this);
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (LinkAnimation_Update(play, &this->skelAnime) && (this->speedXZ == 0.0f)) {
if (this->stateFlags1 & PLAYER_STATE1_29) {
@@ -8892,10 +9366,12 @@ void Player_Action_80843954(Player* this, PlayState* play) {
}
}
+#if OOT_VERSION >= PAL_1_0
static AnimSfxEntry D_808545DC[] = {
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 20) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 30) },
};
+#endif
void Player_Action_80843A38(Player* this, PlayState* play) {
s32 interruptResult;
@@ -8914,7 +9390,9 @@ void Player_Action_80843A38(Player* this, PlayState* play) {
}
}
+#if OOT_VERSION >= PAL_1_0
Player_ProcessAnimSfxList(this, D_808545DC);
+#endif
}
static Vec3f D_808545E4 = { 0.0f, 0.0f, 5.0f };
@@ -8943,7 +9421,7 @@ void func_80843AE8(PlayState* play, Player* this) {
func_80853080(this, play);
}
this->unk_A87 = 20;
- func_80837AFC(this, -20);
+ Player_SetInvulnerability(this, -20);
Audio_SetBgmVolumeOnDuringFanfare();
}
} else if (this->av1.actionVar1 != 0) {
@@ -8965,14 +9443,14 @@ static AnimSfxEntry D_808545F0[] = {
void Player_Action_80843CEC(Player* this, PlayState* play) {
if (this->currentTunic != PLAYER_TUNIC_GORON) {
- if ((play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_3) || (sFloorType == FLOOR_TYPE_9) ||
+ if ((play->roomCtx.curRoom.environmentType == ROOM_ENV_HOT) || (sFloorType == FLOOR_TYPE_9) ||
((func_80838144(sFloorType) >= 0) &&
!func_80042108(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId))) {
func_8083821C(this);
}
}
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (LinkAnimation_Update(play, &this->skelAnime)) {
if (this->actor.category == ACTORCAT_PLAYER) {
@@ -8983,11 +9461,14 @@ void Player_Action_80843CEC(Player* this, PlayState* play) {
if (this->skelAnime.animation == &gPlayerAnim_link_derth_rebirth) {
Player_ProcessAnimSfxList(this, D_808545F0);
- } else if (this->skelAnime.animation == &gPlayerAnim_link_normal_electric_shock_end) {
+ }
+#if OOT_VERSION >= PAL_1_0
+ else if (this->skelAnime.animation == &gPlayerAnim_link_normal_electric_shock_end) {
if (LinkAnimation_OnFrame(&this->skelAnime, 88.0f)) {
Player_PlayFloorSfx(this, NA_SE_PL_BOUND);
}
}
+#endif
}
void func_80843E14(Player* this, u16 sfxId) {
@@ -9004,19 +9485,19 @@ static FallImpactInfo D_80854600[] = {
};
s32 func_80843E64(PlayState* play, Player* this) {
- s32 sp34;
+ s32 fallDistance;
if ((sFloorType == FLOOR_TYPE_6) || (sFloorType == FLOOR_TYPE_9)) {
- sp34 = 0;
+ fallDistance = 0;
} else {
- sp34 = this->fallDistance;
+ fallDistance = this->fallDistance;
}
Math_StepToF(&this->speedXZ, 0.0f, 1.0f);
this->stateFlags1 &= ~(PLAYER_STATE1_18 | PLAYER_STATE1_19);
- if (sp34 >= 400) {
+ if (fallDistance >= 400) {
s32 impactIndex;
FallImpactInfo* impactInfo;
@@ -9032,7 +9513,7 @@ s32 func_80843E64(PlayState* play, Player* this) {
return -1;
}
- func_80837AE0(this, 40);
+ Player_SetIntangibility(this, 40);
Player_RequestQuake(play, 32967, 2, 30);
Player_RequestRumble(this, impactInfo->rumbleStrength, impactInfo->rumbleDuration,
impactInfo->rumbleDecreaseRate, 0);
@@ -9042,14 +9523,14 @@ s32 func_80843E64(PlayState* play, Player* this) {
return impactIndex + 1;
}
- if (sp34 > 200) {
- sp34 *= 2;
+ if (fallDistance > 200) {
+ fallDistance *= 2;
- if (sp34 > 255) {
- sp34 = 255;
+ if (fallDistance > 255) {
+ fallDistance = 255;
}
- Player_RequestRumble(this, (u8)sp34, (u8)(sp34 * 0.1f), (u8)sp34, 0);
+ Player_RequestRumble(this, (u8)fallDistance, (u8)(fallDistance * 0.1f), (u8)fallDistance, 0);
if (sFloorType == FLOOR_TYPE_6) {
Player_PlayVoiceSfx(this, NA_SE_VO_LI_CLIMB_END);
@@ -9089,7 +9570,7 @@ void Player_Action_8084411C(Player* this, PlayState* play) {
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
Actor* heldActor;
- if (this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) {
+ if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
heldActor = this->heldActor;
if (!func_80835644(play, this, heldActor) && (heldActor->id == ACTOR_EN_NIW) &&
@@ -9128,7 +9609,7 @@ void Player_Action_8084411C(Player* this, PlayState* play) {
if ((this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) &&
!(this->stateFlags2 & PLAYER_STATE2_19) &&
- !(this->stateFlags1 & (PLAYER_STATE1_ACTOR_CARRY | PLAYER_STATE1_27)) &&
+ !(this->stateFlags1 & (PLAYER_STATE1_CARRYING_ACTOR | PLAYER_STATE1_27)) &&
(this->speedXZ > 0.0f)) {
if ((this->yDistToLedge >= 150.0f) &&
(this->controlStickDirections[this->controlStickDataIndex] == PLAYER_STICK_DIR_FORWARD)) {
@@ -9171,8 +9652,8 @@ void Player_Action_8084411C(Player* this, PlayState* play) {
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_short_landing, this->modelAnimType);
} else if ((this->fallDistance < 800) &&
(this->controlStickDirections[this->controlStickDataIndex] == PLAYER_STICK_DIR_FORWARD) &&
- !(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY)) {
- func_8083BC04(this, play);
+ !(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) {
+ Player_SetupRoll(this, play);
return;
}
@@ -9181,10 +9662,15 @@ void Player_Action_8084411C(Player* this, PlayState* play) {
if (sp3C > 0) {
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_landing, this->modelAnimType), play);
this->skelAnime.endFrame = 8.0f;
+
+ // `func_8083A098` above can choose from a few different "idle" action variants.
+ // However `fallDamageStunTimer` is only processed by `Player_Action_Idle`.
+ // This means it is possible for the stun to not take effect
+ // (for example, by holding Z when landing).
if (sp3C == 1) {
- this->av2.actionVar2 = 10;
+ this->av2.fallDamageStunTimer = 10;
} else {
- this->av2.actionVar2 = 20;
+ this->av2.fallDamageStunTimer = 20;
}
} else if (sp3C == 0) {
func_8083A098(this, anim, play);
@@ -9192,17 +9678,17 @@ void Player_Action_8084411C(Player* this, PlayState* play) {
}
}
-static AnimSfxEntry D_8085460C[] = {
+static AnimSfxEntry sRollAnimSfxList[] = {
{ NA_SE_VO_LI_SWORD_N, ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 1) },
{ NA_SE_PL_WALK_GROUND, ANIMSFX_DATA(ANIMSFX_TYPE_FLOOR_BY_AGE, 6) },
{ NA_SE_PL_ROLL, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 6) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_LANDING, 18) },
};
-void Player_Action_80844708(Player* this, PlayState* play) {
- Actor* cylinderOc;
+void Player_Action_Roll(Player* this, PlayState* play) {
+ Actor* ocCollidedActor;
s32 interruptResult;
- s32 sp44;
+ s32 animDone;
DynaPolyActor* wallPolyActor;
s32 pad;
f32 speedTarget;
@@ -9210,37 +9696,42 @@ void Player_Action_80844708(Player* this, PlayState* play) {
this->stateFlags2 |= PLAYER_STATE2_5;
- cylinderOc = NULL;
- sp44 = LinkAnimation_Update(play, &this->skelAnime);
+ ocCollidedActor = NULL;
+ animDone = LinkAnimation_Update(play, &this->skelAnime);
if (LinkAnimation_OnFrame(&this->skelAnime, 8.0f)) {
- func_80837AFC(this, -10);
+ Player_SetInvulnerability(this, FRAMERATE_CONST(-10, -8));
}
- if (func_80842964(this, play) == 0) {
- if (this->av2.actionVar2 != 0) {
+ if (!func_80842964(this, play)) {
+ if (this->av2.bonked) {
Math_StepToF(&this->speedXZ, 0.0f, 2.0f);
interruptResult = Player_TryActionInterrupt(play, this, &this->skelAnime, 5.0f);
if ((interruptResult != PLAYER_INTERRUPT_NEW_ACTION) &&
- ((interruptResult >= PLAYER_INTERRUPT_MOVE) || sp44)) {
+ ((interruptResult >= PLAYER_INTERRUPT_MOVE) || animDone)) {
func_8083A060(this, play);
}
} else {
+ // Must have a speed of 7 or above to be able to bonk into something
if (this->speedXZ >= 7.0f) {
if (((this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) &&
(sWorldYawToTouchedWall < 0x2000)) ||
((this->cylinder.base.ocFlags1 & OC1_HIT) &&
- (cylinderOc = this->cylinder.base.oc,
- ((cylinderOc->id == ACTOR_EN_WOOD02) &&
- (ABS((s16)(this->actor.world.rot.y - cylinderOc->yawTowardsPlayer)) > 0x6000))))) {
-
- if (cylinderOc != NULL) {
- cylinderOc->home.rot.y = 1;
+ (ocCollidedActor = this->cylinder.base.oc,
+ ((ocCollidedActor->id == ACTOR_EN_WOOD02) &&
+ (ABS((s16)(this->actor.world.rot.y - ocCollidedActor->yawTowardsPlayer)) > 0x6000))))) {
+ if (ocCollidedActor != NULL) {
+ // The EN_WOOD02 actor uses home y rotation as a flag to signal that it has been
+ // bonked into and should try to spawn a drop.
+ ocCollidedActor->home.rot.y = 1;
} else if (this->actor.wallBgId != BGCHECK_SCENE) {
wallPolyActor = DynaPoly_GetActor(&play->colCtx, this->actor.wallBgId);
+
if ((wallPolyActor != NULL) && (wallPolyActor->actor.id == ACTOR_OBJ_KIBAKO2)) {
+ // The OBJ_KIBAKO2 actor uses home z rotation as a flag to signal that it has been
+ // bonked into and should break.
wallPolyActor->actor.home.rot.z = 1;
}
}
@@ -9251,20 +9742,26 @@ void Player_Action_80844708(Player* this, PlayState* play) {
Player_RequestRumble(this, 255, 20, 150, 0);
Player_PlaySfx(this, NA_SE_PL_BODY_HIT);
Player_PlayVoiceSfx(this, NA_SE_VO_LI_CLIMB_END);
- this->av2.actionVar2 = 1;
+ this->av2.bonked = true;
+
return;
}
}
- if ((this->skelAnime.curFrame < 15.0f) || !Player_ActionChange_7(this, play)) {
+ if ((this->skelAnime.curFrame < 15.0f) || !Player_ActionHandler_7(this, play)) {
if (this->skelAnime.curFrame >= 20.0f) {
func_8083A060(this, play);
+
return;
}
Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_CURVED, play);
+ // `speedTarget` at this point is the speed that would be used for regular walking.
+ // Rolling speed is 1.5 times faster than what the walking speed would be for the current control stick
+ // input.
speedTarget *= 1.5f;
+
if ((speedTarget < 3.0f) ||
(this->controlStickDirections[this->controlStickDataIndex] != PLAYER_STICK_DIR_FORWARD)) {
speedTarget = 3.0f;
@@ -9276,7 +9773,7 @@ void Player_Action_80844708(Player* this, PlayState* play) {
Actor_PlaySfx_Flagged2(&this->actor, NA_SE_PL_ROLL_DUST - SFX_FLAG);
}
- Player_ProcessAnimSfxList(this, D_8085460C);
+ Player_ProcessAnimSfxList(this, sRollAnimSfxList);
}
}
}
@@ -9293,7 +9790,7 @@ void Player_Action_80844A44(Player* this, PlayState* play) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
this->actor.colChkInfo.damage = 0x10;
- func_80837C0C(play, this, 1, 4.0f, 5.0f, this->actor.shape.rot.y, 20);
+ func_80837C0C(play, this, PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE, 4.0f, 5.0f, this->actor.shape.rot.y, 20);
}
}
@@ -9338,7 +9835,7 @@ s32 func_80844BE4(Player* this, PlayState* play) {
}
func_80837948(play, this, temp);
- func_80837AFC(this, -8);
+ Player_SetInvulnerability(this, -8);
this->stateFlags2 |= PLAYER_STATE2_17;
if (this->controlStickDirections[this->controlStickDataIndex] == PLAYER_STICK_DIR_FORWARD) {
@@ -9386,14 +9883,14 @@ void Player_Action_80844E68(Player* this, PlayState* play) {
this->stateFlags1 |= PLAYER_STATE1_CHARGING_SPIN_ATTACK;
if (LinkAnimation_Update(play, &this->skelAnime)) {
- func_80832DBC(this);
+ Player_FinishAnimMovement(this);
Player_SetParallel(this);
this->stateFlags1 &= ~PLAYER_STATE1_PARALLEL;
Player_AnimPlayLoop(play, this, D_80854360[Player_HoldsTwoHandedWeapon(this)]);
this->av2.actionVar2 = -1;
}
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (!func_80842964(this, play) && (this->av2.actionVar2 != 0)) {
func_80844E3C(this);
@@ -9605,7 +10102,11 @@ void Player_Action_80845668(Player* this, PlayState* play) {
if (LinkAnimation_OnFrame(&this->skelAnime, 30.0f)) {
func_8083D0A8(play, this, 10.0f);
}
+#if OOT_VERSION < PAL_1_0
+ temp3 = 68.0f;
+#else
temp3 = 50.0f;
+#endif
} else if (this->skelAnime.animation == &gPlayerAnim_link_normal_150step_up) {
temp3 = 30.0f;
} else if (this->skelAnime.animation == &gPlayerAnim_link_normal_100step_up) {
@@ -9648,7 +10149,7 @@ void Player_Action_WaitForPutAway(Player* this, PlayState* play) {
// The other conditions listed will force the put away delay function to run instantly if carrying an actor.
// This is necessary because the UpperAction for carrying actors will always return true while holding
// the actor, so `!Player_UpdateUpperBody` could never pass.
- if (((this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) && (this->heldActor != NULL) &&
+ if (((this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (this->heldActor != NULL) &&
(this->getItemId == GI_NONE)) ||
!Player_UpdateUpperBody(this, play)) {
this->afterPutAwayFunc(play, this);
@@ -9716,14 +10217,15 @@ s32 func_80845BA0(PlayState* play, Player* this, f32* arg2, s32 arg3) {
s32 func_80845C68(PlayState* play, s32 arg1) {
if (arg1 == 0) {
- Play_SetupRespawnPoint(play, RESPAWN_MODE_DOWN, 0xDFF);
+ Play_SetupRespawnPoint(play, RESPAWN_MODE_DOWN,
+ PLAYER_PARAMS(PLAYER_START_MODE_IDLE, PLAYER_START_BG_CAM_DEFAULT));
}
gSaveContext.respawn[RESPAWN_MODE_DOWN].data = 0;
return arg1;
}
void Player_Action_80845CA4(Player* this, PlayState* play) {
- if (!Player_ActionChange_13(this, play)) {
+ if (!Player_ActionHandler_13(this, play)) {
if (this->av2.actionVar2 == 0) {
LinkAnimation_Update(play, &this->skelAnime);
@@ -9732,7 +10234,7 @@ void Player_Action_80845CA4(Player* this, PlayState* play) {
this->av2.actionVar2 = 1;
}
} else if (this->av1.actionVar1 == 0) {
- f32 sp3C = 5.0f * D_808535E8;
+ f32 sp3C = 5.0f * sWaterSpeedFactor;
s32 temp = func_80845BA0(play, this, &sp3C, -1);
if (temp < 30) {
@@ -9770,14 +10272,14 @@ void Player_Action_80845CA4(Player* this, PlayState* play) {
Camera_SetFinishedFlag(Play_GetCamera(play, CAM_ID_MAIN));
func_80845C68(play, gSaveContext.respawn[RESPAWN_MODE_DOWN].data);
- if (!Player_ActionChange_4(this, play)) {
+ if (!Player_ActionHandler_Talk(this, play)) {
func_8083CF5C(this, play);
}
}
}
}
- if (this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) {
+ if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
Player_UpdateUpperBody(this, play);
}
}
@@ -9802,7 +10304,8 @@ void Player_Action_80845EF8(Player* this, PlayState* play) {
Room_FinishRoomChange(play, &play->roomCtx);
}
Camera_SetFinishedFlag(Play_GetCamera(play, CAM_ID_MAIN));
- Play_SetupRespawnPoint(play, RESPAWN_MODE_DOWN, 0xDFF);
+ Play_SetupRespawnPoint(play, RESPAWN_MODE_DOWN,
+ PLAYER_PARAMS(PLAYER_START_MODE_IDLE, PLAYER_START_BG_CAM_DEFAULT));
}
return;
}
@@ -9813,7 +10316,7 @@ void Player_Action_80845EF8(Player* this, PlayState* play) {
}
void Player_Action_80846050(Player* this, PlayState* play) {
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (LinkAnimation_Update(play, &this->skelAnime)) {
func_80839F90(this, play);
@@ -9842,7 +10345,7 @@ static AnimSfxEntry D_8085461C[] = {
void Player_Action_80846120(Player* this, PlayState* play) {
if (LinkAnimation_Update(play, &this->skelAnime) && (this->av2.actionVar2++ > 20)) {
- if (!Player_ActionChange_13(this, play)) {
+ if (!Player_ActionHandler_13(this, play)) {
func_8083A098(this, &gPlayerAnim_link_normal_heavy_carry_end, play);
}
} else if (LinkAnimation_OnFrame(&this->skelAnime, 41.0f)) {
@@ -9866,7 +10369,7 @@ void Player_Action_80846120(Player* this, PlayState* play) {
}
void Player_Action_80846260(Player* this, PlayState* play) {
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (LinkAnimation_Update(play, &this->skelAnime)) {
Player_AnimPlayLoop(play, this, &gPlayerAnim_link_silver_wait);
@@ -9916,14 +10419,14 @@ void Player_Action_80846408(Player* this, PlayState* play) {
this->av2.actionVar2--;
if (this->av2.actionVar2 == 0) {
func_8083A098(this, &gPlayerAnim_link_normal_nocarry_free_end, play);
- this->stateFlags1 &= ~PLAYER_STATE1_ACTOR_CARRY;
+ this->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
Player_PlayVoiceSfx(this, NA_SE_VO_LI_DAMAGE_S);
}
}
}
void Player_Action_808464B0(Player* this, PlayState* play) {
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (LinkAnimation_Update(play, &this->skelAnime)) {
func_80839F90(this, play);
@@ -9948,7 +10451,7 @@ void Player_Action_80846578(Player* this, PlayState* play) {
f32 speedTarget;
s16 yawTarget;
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (LinkAnimation_Update(play, &this->skelAnime) ||
((this->skelAnime.curFrame >= 8.0f) &&
@@ -10022,86 +10525,103 @@ static ColliderQuadInit D_808546A0 = {
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
-void func_8084663C(Actor* thisx, PlayState* play) {
+void Player_DoNothing(Actor* thisx, PlayState* play) {
}
-void func_80846648(PlayState* play, Player* this) {
- this->actor.update = func_8084663C;
+void Player_StartMode_Nothing(PlayState* play, Player* this) {
+ this->actor.update = Player_DoNothing;
this->actor.draw = NULL;
}
-void func_80846660(PlayState* play, Player* this) {
- Player_SetupAction(play, this, Player_Action_8084F710, 0);
+void Player_StartMode_BlueWarp(PlayState* play, Player* this) {
+ Player_SetupAction(play, this, Player_Action_BlueWarpArrive, 0);
+
if ((play->sceneId == SCENE_LAKE_HYLIA) && IS_CUTSCENE_LAYER) {
- this->av1.actionVar1 = 1;
+ this->av1.isLakeHyliaCs = true;
}
+
this->stateFlags1 |= PLAYER_STATE1_29;
LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_okarina_warp_goal, 2.0f / 3.0f, 0.0f, 24.0f,
ANIMMODE_ONCE, 0.0f);
+
+ // Start high up in the air
this->actor.world.pos.y += 800.0f;
}
-static u8 D_808546F0[] = { ITEM_SWORD_MASTER, ITEM_SWORD_KOKIRI };
-
-void func_80846720(PlayState* play, Player* this, s32 arg2) {
- s32 item = D_808546F0[(void)0, gSaveContext.save.linkAge];
- s32 itemAction = sItemActions[item];
+/**
+ * Put the sword item in hand. If `playSfx` is true, the sword unsheathing sound will play.
+ * Kokiri Sword or Master Sword is used depending on age.
+ *
+ * Note: This will not play an animation, the sword instantly appears in hand.
+ * It is expected that this function is called while an appropriate animation
+ * is already playing, for example in a cutscene.
+ */
+void Player_PutSwordInHand(PlayState* play, Player* this, s32 playSfx) {
+ static u8 sSwordItemIds[] = { ITEM_SWORD_MASTER, ITEM_SWORD_KOKIRI };
+ s32 swordItemId = sSwordItemIds[(void)0, gSaveContext.save.linkAge];
+ s32 swordItemAction = sItemActions[swordItemId];
Player_DestroyHookshot(this);
Player_DetachHeldActor(play, this);
- this->heldItemId = item;
- this->nextModelGroup = Player_ActionToModelGroup(this, itemAction);
+ this->heldItemId = swordItemId;
+ this->nextModelGroup = Player_ActionToModelGroup(this, swordItemAction);
- Player_InitItemAction(play, this, itemAction);
+ Player_InitItemAction(play, this, swordItemAction);
func_80834644(play, this);
- if (arg2 != 0) {
+ if (playSfx) {
Player_PlaySfx(this, NA_SE_IT_SWORD_PICKOUT);
}
}
-static Vec3f D_808546F4 = { -1.0f, 69.0f, 20.0f };
+void Player_StartMode_TimeTravel(PlayState* play, Player* this) {
+ static Vec3f sPedestalPos = { -1.0f, 69.0f, 20.0f };
-void func_808467D4(PlayState* play, Player* this) {
- Player_SetupAction(play, this, Player_Action_8084E9AC, 0);
+ Player_SetupAction(play, this, Player_Action_TimeTravelEnd, 0);
this->stateFlags1 |= PLAYER_STATE1_29;
- Math_Vec3f_Copy(&this->actor.world.pos, &D_808546F4);
+
+ Math_Vec3f_Copy(&this->actor.world.pos, &sPedestalPos);
this->yaw = this->actor.shape.rot.y = -0x8000;
- LinkAnimation_Change(play, &this->skelAnime, this->ageProperties->unk_A0, 2.0f / 3.0f, 0.0f, 0.0f, ANIMMODE_ONCE,
- 0.0f);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
- ANIM_FLAG_OVERRIDE_MOVEMENT);
+
+ // The start frame and end frame are both set to 0 so that that the animation is frozen.
+ // `Player_Action_TimeTravelEnd` will play the animation after `animDelayTimer` completes.
+ LinkAnimation_Change(play, &this->skelAnime, this->ageProperties->timeTravelEndAnim, 2.0f / 3.0f, 0.0f, 0.0f,
+ ANIMMODE_ONCE, 0.0f);
+ Player_StartAnimMovement(play, this,
+ PLAYER_ANIM_MOVEMENT_RESET_BY_AGE | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
+ ANIM_FLAG_OVERRIDE_MOVEMENT);
+
if (LINK_IS_ADULT) {
- func_80846720(play, this, 0);
+ Player_PutSwordInHand(play, this, false);
}
- this->av2.actionVar2 = 20;
+
+ this->av2.animDelayTimer = 20;
}
-void func_808468A8(PlayState* play, Player* this) {
- Player_SetupAction(play, this, Player_Action_8084F9A0, 0);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE |
- ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
+void Player_StartMode_Door(PlayState* play, Player* this) {
+ Player_SetupAction(play, this, Player_Action_TryOpeningDoor, 0);
+ Player_StartAnimMovement(play, this,
+ ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT |
+ ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
}
-void func_808468E8(PlayState* play, Player* this) {
+void Player_StartMode_Grotto(PlayState* play, Player* this) {
func_808389E8(this, &gPlayerAnim_link_normal_jump, 12.0f, play);
- Player_SetupAction(play, this, Player_Action_8084F9C0, 0);
+ Player_SetupAction(play, this, Player_Action_ExitGrotto, 0);
this->stateFlags1 |= PLAYER_STATE1_29;
this->fallStartHeight = this->actor.world.pos.y;
OnePointCutscene_Init(play, 5110, 40, &this->actor, CAM_ID_MAIN);
}
-void func_80846978(PlayState* play, Player* this) {
- func_80837C0C(play, this, 1, 2.0f, 2.0f, this->actor.shape.rot.y + 0x8000, 0);
+void Player_StartMode_KnockedOver(PlayState* play, Player* this) {
+ func_80837C0C(play, this, PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE, 2.0f, 2.0f, this->actor.shape.rot.y + 0x8000, 0);
}
-void func_808469BC(PlayState* play, Player* this) {
- Player_SetupAction(play, this, Player_Action_8084F698, 0);
- this->actor.draw = NULL;
+void Player_StartMode_WarpSong(PlayState* play, Player* this) {
+ Player_SetupAction(play, this, Player_Action_StartWarpSongArrive, 0);
+ this->actor.draw = NULL; // Start invisible
this->stateFlags1 |= PLAYER_STATE1_29;
}
@@ -10112,9 +10632,9 @@ Actor* Player_SpawnMagicSpell(PlayState* play, Player* this, s32 spell) {
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0);
}
-void func_80846A68(PlayState* play, Player* this) {
- this->actor.draw = NULL;
- Player_SetupAction(play, this, Player_Action_8085076C, 0);
+void Player_StartMode_FaroresWind(PlayState* play, Player* this) {
+ this->actor.draw = NULL; // Start invisible
+ Player_SetupAction(play, this, Player_Action_FaroresWindArrive, 0);
this->stateFlags1 |= PLAYER_STATE1_29;
}
@@ -10139,7 +10659,7 @@ void Player_InitCommon(Player* this, PlayState* play, FlexSkeletonHeader* skelHe
SkelAnime_InitLink(play, &this->skelAnime, skelHeader, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait, this->modelAnimType),
9, this->jointTable, this->morphTable, PLAYER_LIMB_MAX);
this->skelAnime.baseTransl = sSkeletonBaseTransl;
- SkelAnime_InitLink(play, &this->upperSkelAnime, skelHeader, func_80833338(this), 9, this->upperJointTable,
+ SkelAnime_InitLink(play, &this->upperSkelAnime, skelHeader, Player_GetIdleAnim(this), 9, this->upperJointTable,
this->upperMorphTable, PLAYER_LIMB_MAX);
this->upperSkelAnime.baseTransl = sSkeletonBaseTransl;
@@ -10157,33 +10677,31 @@ void Player_InitCommon(Player* this, PlayState* play, FlexSkeletonHeader* skelHe
Collider_SetQuad(play, &this->shieldQuad, &this->actor, &D_808546A0);
}
-static void (*D_80854738[])(PlayState* play, Player* this) = {
- /* 0x0 */ func_80846648,
- /* 0x1 */ func_808467D4, // From time travel
- /* 0x2 */ func_80846660,
- /* 0x3 */ func_808468A8,
- /* 0x4 */ func_808468E8,
- /* 0x5 */ func_808469BC,
- /* 0x6 */ func_80846A68,
- /* 0x7 */ func_80846978,
- /* 0x8 */ func_8083CA54,
- /* 0x9 */ func_8083CA54,
- /* 0xA */ func_8083CA54,
- /* 0xB */ func_8083CA54,
- /* 0xC */ func_8083CA54,
- /* 0xD */ func_8083CA20,
- /* 0xE */ func_8083CA54,
- /* 0xF */ func_8083CA9C,
+static void (*sStartModeFuncs[PLAYER_START_MODE_MAX])(PlayState* play, Player* this) = {
+ Player_StartMode_Nothing, // PLAYER_START_MODE_NOTHING
+ Player_StartMode_TimeTravel, // PLAYER_START_MODE_TIME_TRAVEL
+ Player_StartMode_BlueWarp, // PLAYER_START_MODE_BLUE_WARP
+ Player_StartMode_Door, // PLAYER_START_MODE_DOOR
+ Player_StartMode_Grotto, // PLAYER_START_MODE_GROTTO
+ Player_StartMode_WarpSong, // PLAYER_START_MODE_WARP_SONG
+ Player_StartMode_FaroresWind, // PLAYER_START_MODE_FARORES_WIND
+ Player_StartMode_KnockedOver, // PLAYER_START_MODE_KNOCKED_OVER
+ Player_StartMode_MoveForwardSlow, // PLAYER_START_MODE_UNUSED_8
+ Player_StartMode_MoveForwardSlow, // PLAYER_START_MODE_UNUSED_9
+ Player_StartMode_MoveForwardSlow, // PLAYER_START_MODE_UNUSED_10
+ Player_StartMode_MoveForwardSlow, // PLAYER_START_MODE_UNUSED_11
+ Player_StartMode_MoveForwardSlow, // PLAYER_START_MODE_UNUSED_12
+ Player_StartMode_Idle, // PLAYER_START_MODE_IDLE
+ Player_StartMode_MoveForwardSlow, // PLAYER_START_MODE_MOVE_FORWARD_SLOW
+ Player_StartMode_MoveForward, // PLAYER_START_MODE_MOVE_FORWARD
};
-static Vec3f D_80854778 = { 0.0f, 50.0f, 0.0f };
-
void Player_Init(Actor* thisx, PlayState* play2) {
Player* this = (Player*)thisx;
PlayState* play = play2;
SceneTableEntry* scene = play->loadedScene;
u32 titleFileSize;
- s32 initMode;
+ s32 startMode;
s32 respawnFlag;
s32 respawnMode;
@@ -10197,7 +10715,7 @@ void Player_Init(Actor* thisx, PlayState* play2) {
play->tryPlayerCsAction = Player_TryCsAction;
play->func_11D54 = func_80853080;
play->damagePlayer = Player_InflictDamage;
- play->talkWithPlayer = func_80853148;
+ play->talkWithPlayer = Player_StartTalking;
thisx->room = -1;
this->ageProperties = &sAgeProperties[gSaveContext.save.linkAge];
@@ -10205,9 +10723,12 @@ void Player_Init(Actor* thisx, PlayState* play2) {
this->heldItemId = ITEM_NONE;
Player_UseItem(play, this, ITEM_NONE);
+
Player_SetEquipmentData(play, this);
this->prevBoots = this->currentBoots;
+
Player_InitCommon(this, play, gPlayerSkelHeaders[((void)0, gSaveContext.save.linkAge)]);
+
// `giObjectSegment` is used for both "get item" objects and title cards. The maximum size for
// get item objects is 0x2000 (see the assert in func_8083AE40), and the maximum size for
// title cards is 0x1000 * LANGUAGE_MAX since each title card image includes all languages.
@@ -10243,40 +10764,52 @@ void Player_Init(Actor* thisx, PlayState* play2) {
if ((respawnFlag == 0) || (respawnFlag < -1)) {
titleFileSize = scene->titleFile.vromEnd - scene->titleFile.vromStart;
+
if ((titleFileSize != 0) && gSaveContext.showTitleCard) {
if (!IS_CUTSCENE_LAYER &&
(gEntranceTable[((void)0, gSaveContext.save.entranceIndex) + ((void)0, gSaveContext.sceneLayer)].field &
ENTRANCE_INFO_DISPLAY_TITLE_CARD_FLAG) &&
((play->sceneId != SCENE_DODONGOS_CAVERN) || GET_EVENTCHKINF(EVENTCHKINF_B0)) &&
- ((play->sceneId != SCENE_BOMBCHU_SHOP) || GET_EVENTCHKINF(EVENTCHKINF_25))) {
+#if OOT_VERSION < PAL_1_0
+ ((play->sceneId != SCENE_BOMBCHU_BOWLING_ALLEY) || GET_EVENTCHKINF(EVENTCHKINF_25))
+#else
+ ((play->sceneId != SCENE_BOMBCHU_SHOP) || GET_EVENTCHKINF(EVENTCHKINF_25))
+#endif
+ ) {
TitleCard_InitPlaceName(play, &play->actorCtx.titleCtx, this->giObjectSegment, 160, 120, 144, 24, 20);
}
}
+
gSaveContext.showTitleCard = true;
}
if (func_80845C68(play, (respawnFlag == 2) ? 1 : 0) == 0) {
- gSaveContext.respawn[RESPAWN_MODE_DOWN].playerParams = PARAMS_GET_S(thisx->params, 0, 8) | 0xD00;
+ gSaveContext.respawn[RESPAWN_MODE_DOWN].playerParams =
+ PLAYER_PARAMS(PLAYER_START_MODE_IDLE, PLAYER_GET_START_BG_CAM_INDEX(thisx));
}
gSaveContext.respawn[RESPAWN_MODE_DOWN].data = 1;
if (play->sceneId <= SCENE_INSIDE_GANONS_CASTLE_COLLAPSE) {
- gSaveContext.save.info.infTable[INFTABLE_1AX_INDEX] |= gBitFlags[play->sceneId];
+ gSaveContext.save.info.infTable[INFTABLE_INDEX_1AX] |= gBitFlags[play->sceneId];
}
- initMode = PARAMS_GET_S(thisx->params, 8, 4);
- if ((initMode == 5) || (initMode == 6)) {
+ startMode = PLAYER_GET_START_MODE(thisx);
+
+ if ((startMode == PLAYER_START_MODE_WARP_SONG) || (startMode == PLAYER_START_MODE_FARORES_WIND)) {
if (gSaveContext.save.cutsceneIndex >= 0xFFF0) {
- initMode = 13;
+ startMode = PLAYER_START_MODE_IDLE;
}
}
- D_80854738[initMode](play, this);
+ sStartModeFuncs[startMode](play, this);
- if (initMode != 0) {
+ if (startMode != PLAYER_START_MODE_NOTHING) {
if ((gSaveContext.gameMode == GAMEMODE_NORMAL) || (gSaveContext.gameMode == GAMEMODE_END_CREDITS)) {
- this->naviActor = Player_SpawnFairy(play, this, &thisx->world.pos, &D_80854778, FAIRY_NAVI);
+ static Vec3f sNaviSpawnPosOffset = { 0.0f, 50.0f, 0.0f };
+
+ this->naviActor = Player_SpawnFairy(play, this, &thisx->world.pos, &sNaviSpawnPosOffset, FAIRY_NAVI);
+
if (gSaveContext.dogParams != 0) {
gSaveContext.dogParams |= 0x8000;
}
@@ -10298,60 +10831,60 @@ void Player_Init(Actor* thisx, PlayState* play2) {
MREG(64) = 0;
}
-void func_808471F4(s16* pValue) {
+void Player_ApproachZeroBinang(s16* pValue) {
s16 step;
- step = (ABS(*pValue) * 100.0f) / 1000.0f;
+ step = ABS(*pValue) * 100.0f / 1000.0f;
step = CLAMP(step, 400, 4000);
Math_ScaledStepToS(pValue, 0, step);
}
void func_80847298(Player* this) {
- if (!(this->unk_6AE & 2)) {
- s16 sp26 = this->actor.focus.rot.y - this->actor.shape.rot.y;
+ if (!(this->unk_6AE_rotFlags & UNK6AE_ROT_FOCUS_Y)) {
+ s16 diff = this->actor.focus.rot.y - this->actor.shape.rot.y;
- func_808471F4(&sp26);
- this->actor.focus.rot.y = this->actor.shape.rot.y + sp26;
+ Player_ApproachZeroBinang(&diff);
+ this->actor.focus.rot.y = this->actor.shape.rot.y + diff;
}
- if (!(this->unk_6AE & 1)) {
- func_808471F4(&this->actor.focus.rot.x);
+ if (!(this->unk_6AE_rotFlags & UNK6AE_ROT_FOCUS_X)) {
+ Player_ApproachZeroBinang(&this->actor.focus.rot.x);
}
- if (!(this->unk_6AE & 8)) {
- func_808471F4(&this->unk_6B6);
+ if (!(this->unk_6AE_rotFlags & UNK6AE_ROT_HEAD_X)) {
+ Player_ApproachZeroBinang(&this->headLimbRot.x);
}
- if (!(this->unk_6AE & 0x40)) {
- func_808471F4(&this->unk_6BC);
+ if (!(this->unk_6AE_rotFlags & UNK6AE_ROT_UPPER_X)) {
+ Player_ApproachZeroBinang(&this->upperLimbRot.x);
}
- if (!(this->unk_6AE & 4)) {
- func_808471F4(&this->actor.focus.rot.z);
+ if (!(this->unk_6AE_rotFlags & UNK6AE_ROT_FOCUS_Z)) {
+ Player_ApproachZeroBinang(&this->actor.focus.rot.z);
}
- if (!(this->unk_6AE & 0x10)) {
- func_808471F4(&this->unk_6B8);
+ if (!(this->unk_6AE_rotFlags & UNK6AE_ROT_HEAD_Y)) {
+ Player_ApproachZeroBinang(&this->headLimbRot.y);
}
- if (!(this->unk_6AE & 0x20)) {
- func_808471F4(&this->unk_6BA);
+ if (!(this->unk_6AE_rotFlags & UNK6AE_ROT_HEAD_Z)) {
+ Player_ApproachZeroBinang(&this->headLimbRot.z);
}
- if (!(this->unk_6AE & 0x80)) {
- if (this->unk_6B0 != 0) {
- func_808471F4(&this->unk_6B0);
+ if (!(this->unk_6AE_rotFlags & UNK6AE_ROT_UPPER_Y)) {
+ if (this->upperLimbYawSecondary != 0) {
+ Player_ApproachZeroBinang(&this->upperLimbYawSecondary);
} else {
- func_808471F4(&this->unk_6BE);
+ Player_ApproachZeroBinang(&this->upperLimbRot.y);
}
}
- if (!(this->unk_6AE & 0x100)) {
- func_808471F4(&this->unk_6C0);
+ if (!(this->unk_6AE_rotFlags & UNK6AE_ROT_UPPER_Z)) {
+ Player_ApproachZeroBinang(&this->upperLimbRot.z);
}
- this->unk_6AE = 0;
+ this->unk_6AE_rotFlags = 0;
}
static f32 D_80854784[] = { 120.0f, 240.0f, 360.0f };
@@ -10379,10 +10912,10 @@ void Player_UpdateInterface(PlayState* play, Player* this) {
}
} else if ((Player_Action_8084E3C4 != this->actionFunc) && !(this->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
if ((this->doorType != PLAYER_DOORTYPE_NONE) &&
- (!(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) ||
+ (!(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) ||
((heldActor != NULL) && (heldActor->id == ACTOR_EN_RU1)))) {
doAction = DO_ACTION_OPEN;
- } else if ((!(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) || (heldActor == NULL)) &&
+ } else if ((!(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) || (heldActor == NULL)) &&
(interactRangeActor != NULL) &&
((!sp1C && (this->getItemId == GI_NONE)) ||
((this->getItemId < 0) && !(this->stateFlags1 & PLAYER_STATE1_27)))) {
@@ -10400,7 +10933,7 @@ void Player_UpdateInterface(PlayState* play, Player* this) {
doAction = DO_ACTION_CLIMB;
} else if ((this->stateFlags1 & PLAYER_STATE1_23) && !EN_HORSE_CHECK_4((EnHorse*)this->rideActor) &&
(Player_Action_8084D3E4 != this->actionFunc)) {
- if ((this->stateFlags2 & PLAYER_STATE2_1) && (this->talkActor != NULL)) {
+ if ((this->stateFlags2 & PLAYER_STATE2_CAN_ACCEPT_TALK_OFFER) && (this->talkActor != NULL)) {
if (this->talkActor->category == ACTORCAT_NPC) {
doAction = DO_ACTION_SPEAK;
} else {
@@ -10409,7 +10942,7 @@ void Player_UpdateInterface(PlayState* play, Player* this) {
} else if (!func_8002DD78(this) && !(this->stateFlags1 & PLAYER_STATE1_20)) {
doAction = DO_ACTION_FASTER;
}
- } else if ((this->stateFlags2 & PLAYER_STATE2_1) && (this->talkActor != NULL)) {
+ } else if ((this->stateFlags2 & PLAYER_STATE2_CAN_ACCEPT_TALK_OFFER) && (this->talkActor != NULL)) {
if (this->talkActor->category == ACTORCAT_NPC) {
doAction = DO_ACTION_SPEAK;
} else {
@@ -10420,10 +10953,10 @@ void Player_UpdateInterface(PlayState* play, Player* this) {
doAction = DO_ACTION_DOWN;
} else if (this->stateFlags2 & PLAYER_STATE2_DO_ACTION_ENTER) {
doAction = DO_ACTION_ENTER;
- } else if ((this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) && (this->getItemId == GI_NONE) &&
+ } else if ((this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (this->getItemId == GI_NONE) &&
(heldActor != NULL)) {
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (heldActor->id == ACTOR_EN_NIW)) {
- if (func_8083EAF0(this, heldActor) == 0) {
+ if (!Player_CanThrowCarriedActor(this, heldActor)) {
doAction = DO_ACTION_DROP;
} else {
doAction = DO_ACTION_THROW;
@@ -10441,22 +10974,21 @@ void Player_UpdateInterface(PlayState* play, Player* this) {
doAction = sDiveNumberDoActions[sp24];
} else if (sp1C && !(this->stateFlags2 & PLAYER_STATE2_10)) {
doAction = DO_ACTION_DIVE;
- } else if (!sp1C && (!(this->stateFlags1 & PLAYER_STATE1_22) || Player_IsZTargeting(this) ||
+ } else if (!sp1C && (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) || Player_IsZTargeting(this) ||
!Player_IsChildWithHylianShield(this))) {
if ((!(this->stateFlags1 & PLAYER_STATE1_14) &&
(controlStickDirection <= PLAYER_STICK_DIR_FORWARD) &&
(Player_CheckHostileLockOn(this) ||
- ((sFloorType != FLOOR_TYPE_7) &&
- (Player_FriendlyLockOnOrParallel(this) ||
- ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) &&
- !(this->stateFlags1 & PLAYER_STATE1_22) &&
- (controlStickDirection == PLAYER_STICK_DIR_FORWARD))))))) {
+ ((sFloorType != FLOOR_TYPE_7) && (Player_FriendlyLockOnOrParallel(this) ||
+ ((play->roomCtx.curRoom.type != ROOM_TYPE_INDOORS) &&
+ !(this->stateFlags1 & PLAYER_STATE1_SHIELDING) &&
+ (controlStickDirection == PLAYER_STICK_DIR_FORWARD))))))) {
doAction = DO_ACTION_ATTACK;
- } else if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) &&
- Player_IsZTargeting(this) && (controlStickDirection >= PLAYER_STICK_DIR_LEFT)) {
+ } else if ((play->roomCtx.curRoom.type != ROOM_TYPE_INDOORS) && Player_IsZTargeting(this) &&
+ (controlStickDirection >= PLAYER_STICK_DIR_LEFT)) {
doAction = DO_ACTION_JUMP;
} else if ((this->heldItemAction >= PLAYER_IA_SWORD_MASTER) ||
- ((this->stateFlags2 & PLAYER_STATE2_20) &&
+ ((this->stateFlags2 & PLAYER_STATE2_NAVI_ACTIVE) &&
(play->actorCtx.attention.naviHoverActor == NULL))) {
doAction = DO_ACTION_PUTAWAY;
}
@@ -10465,10 +10997,12 @@ void Player_UpdateInterface(PlayState* play, Player* this) {
}
if (doAction != DO_ACTION_PUTAWAY) {
- this->unk_837 = 20;
- } else if (this->unk_837 != 0) {
+ this->putAwayCooldownTimer = 20;
+ } else if (this->putAwayCooldownTimer != 0) {
+ // Replace the "Put Away" Do Action label with a blank label while
+ // the cooldown timer is counting down
doAction = DO_ACTION_NONE;
- this->unk_837--;
+ this->putAwayCooldownTimer--;
}
Interface_SetDoAction(play, doAction);
@@ -10528,7 +11062,7 @@ s32 Player_UpdateHoverBoots(Player* this) {
}
/**
- * Peforms various tasks related to scene collision.
+ * Performs various tasks related to scene collision.
*
* This includes:
* - Update BgCheckInfo, parameters adjusted due to various state flags
@@ -10844,7 +11378,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) {
} else if (this->stateFlags2 & PLAYER_STATE2_8) {
camMode = CAM_MODE_PUSH_PULL;
} else if ((focusActor = this->focusActor) != NULL) {
- if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_TALK)) {
+ if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_TALK)) {
camMode = CAM_MODE_TALK;
} else if (this->stateFlags1 & PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS) {
if (this->stateFlags1 & PLAYER_STATE1_BOOMERANG_THROWN) {
@@ -11165,8 +11699,8 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
this->unk_A73--;
}
- if (this->unk_88E != 0) {
- this->unk_88E--;
+ if (this->textboxBtnCooldownTimer != 0) {
+ this->textboxBtnCooldownTimer--;
}
if (this->unk_A87 != 0) {
@@ -11184,7 +11718,8 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
}
Player_UpdateInterface(play, this);
- func_80836BEC(this, play);
+
+ Player_UpdateZTargeting(this, play);
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_860 != 0)) {
Player_UpdateBurningDekuStick(play, this);
@@ -11243,9 +11778,9 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
func_8083A360(play, this);
this->stateFlags1 |= PLAYER_STATE1_23;
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_uma_wait_1);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE |
- ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT |
+ ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
this->av2.actionVar2 = 99;
}
@@ -11270,7 +11805,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
func_8084FF7C(this);
}
- if (!(this->skelAnime.moveFlags & ANIM_FLAG_OVERRIDE_MOVEMENT)) {
+ if (!(this->skelAnime.movementFlags & ANIM_FLAG_OVERRIDE_MOVEMENT)) {
if (((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (sFloorType == FLOOR_TYPE_5) &&
(this->currentBoots != PLAYER_BOOTS_IRON)) ||
((this->currentBoots == PLAYER_BOOTS_HOVER) &&
@@ -11338,7 +11873,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
if (DREG(25) != 0) {
DREG(25) = 0;
} else {
- AREG(6) = 1;
+ R_EXITED_SCENE_RIDING_HORSE = true;
}
}
}
@@ -11426,11 +11961,11 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
func_8083D6EC(play, this);
if ((this->focusActor == NULL) && (this->naviTextId == 0)) {
- this->stateFlags2 &= ~(PLAYER_STATE2_1 | PLAYER_STATE2_21);
+ this->stateFlags2 &= ~(PLAYER_STATE2_CAN_ACCEPT_TALK_OFFER | PLAYER_STATE2_21);
}
- this->stateFlags1 &=
- ~(PLAYER_STATE1_SWINGING_BOTTLE | PLAYER_STATE1_9 | PLAYER_STATE1_CHARGING_SPIN_ATTACK | PLAYER_STATE1_22);
+ this->stateFlags1 &= ~(PLAYER_STATE1_SWINGING_BOTTLE | PLAYER_STATE1_9 | PLAYER_STATE1_CHARGING_SPIN_ATTACK |
+ PLAYER_STATE1_SHIELDING);
this->stateFlags2 &= ~(PLAYER_STATE2_0 | PLAYER_STATE2_2 | PLAYER_STATE2_3 | PLAYER_STATE2_5 | PLAYER_STATE2_6 |
PLAYER_STATE2_8 | PLAYER_STATE2_FORCE_SAND_FLOOR_SOUND | PLAYER_STATE2_12 |
PLAYER_STATE2_14 | PLAYER_STATE2_DO_ACTION_ENTER | PLAYER_STATE2_22 | PLAYER_STATE2_26);
@@ -11440,14 +11975,15 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
Player_ProcessControlStick(play, this);
if (this->stateFlags1 & PLAYER_STATE1_27) {
- D_808535E8 = 0.5f;
+ sWaterSpeedFactor = 0.5f;
} else {
- D_808535E8 = 1.0f;
+ sWaterSpeedFactor = 1.0f;
}
- D_808535EC = 1.0f / D_808535E8;
+ sInvWaterSpeedFactor = 1.0f / sWaterSpeedFactor;
+
sUseHeldItem = sHeldItemButtonIsHeldDown = false;
- D_80858AA4 = this->currentMask;
+ sSavedCurrentMask = this->currentMask;
if (!(this->stateFlags3 & PLAYER_STATE3_2)) {
this->actionFunc(this, play);
@@ -11455,16 +11991,16 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
Player_UpdateCamAndSeqModes(play, this);
- if (this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_SETMOVE) {
- AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime,
- (this->skelAnime.moveFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT)
- ? 1.0f
- : this->ageProperties->unk_08);
+ if (this->skelAnime.movementFlags & ANIM_FLAG_ENABLE_MOVEMENT) {
+ AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime,
+ (this->skelAnime.movementFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT)
+ ? 1.0f
+ : this->ageProperties->unk_08);
}
Player_UpdateShapeYaw(this, play);
- if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_TALK)) {
+ if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_TALK)) {
this->talkActorDistance = 0.0f;
} else {
this->talkActor = NULL;
@@ -11472,7 +12008,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
this->exchangeItemId = EXCH_ITEM_NONE;
}
- if (!(this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY)) {
+ if (!(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) {
this->interactRangeActor = NULL;
this->getItemDirection = 0x6000;
}
@@ -11493,8 +12029,8 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
temp_f0 = this->actor.world.pos.y - this->actor.prevPos.y;
this->doorType = PLAYER_DOORTYPE_NONE;
- this->unk_8A1 = 0;
- this->unk_684 = NULL;
+ this->knockbackType = PLAYER_KNOCKBACK_NONE;
+ this->autoLockOnActor = NULL;
phi_f12 =
((this->bodyPartsPos[PLAYER_BODYPART_L_FOOT].y + this->bodyPartsPos[PLAYER_BODYPART_R_FOOT].y) * 0.5f) +
@@ -11510,7 +12046,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
this->cylinder.dim.yShift = phi_f12 - this->actor.world.pos.y;
- if (this->stateFlags1 & PLAYER_STATE1_22) {
+ if (this->stateFlags1 & PLAYER_STATE1_SHIELDING) {
this->cylinder.dim.height *= 0.8f;
}
@@ -11555,7 +12091,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
Collider_ResetQuadAT(play, &this->shieldQuad.base);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
s32 Player_UpdateNoclip(Player* this, PlayState* play);
#endif
@@ -11565,7 +12101,7 @@ void Player_Update(Actor* thisx, PlayState* play) {
s32 pad;
Input input;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (!Player_UpdateNoclip(this, play)) {
goto skip_update;
}
@@ -11605,7 +12141,9 @@ void Player_Update(Actor* thisx, PlayState* play) {
} else {
input = play->state.input[0];
- if (this->unk_88E != 0) {
+ if (this->textboxBtnCooldownTimer != 0) {
+ // Prevent the usage of A/B/C-up.
+ // Helps avoid accidental inputs when mashing to close the final textbox.
input.cur.button &= ~(BTN_A | BTN_B | BTN_CUP);
input.press.button &= ~(BTN_A | BTN_B | BTN_CUP);
}
@@ -11613,7 +12151,9 @@ void Player_Update(Actor* thisx, PlayState* play) {
Player_UpdateCommon(this, play, &input);
+#if DEBUG_FEATURES
skip_update:;
+#endif
{
s32 pad;
@@ -11734,9 +12274,9 @@ void Player_Draw(Actor* thisx, PlayState* play2) {
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
if (this->invincibilityTimer > 0) {
- this->unk_88F += CLAMP(50 - this->invincibilityTimer, 8, 40);
- POLY_OPA_DISP =
- Gfx_SetFog2(POLY_OPA_DISP, 255, 0, 0, 0, 0, 4000 - (s32)(Math_CosS(this->unk_88F * 256) * 2000.0f));
+ this->damageFlickerAnimCounter += CLAMP(50 - this->invincibilityTimer, 8, 40);
+ POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP, 255, 0, 0, 0, 0,
+ 4000 - (s32)(Math_CosS(this->damageFlickerAnimCounter * 256) * 2000.0f));
}
func_8002EBCC(&this->actor, play, 0);
@@ -11828,7 +12368,7 @@ s16 func_8084ABD8(PlayState* play, Player* this, s32 arg2, s16 arg3) {
s16 temp2;
s16 temp3;
- if (!func_8002DD78(this) && !func_808334B4(this) && (arg2 == 0)) {
+ if (!func_8002DD78(this) && !func_808334B4(this) && !arg2) {
temp2 = sControlInput->rel.stick_y * 240.0f;
Math_SmoothStepToS(&this->actor.focus.rot.x, temp2, 14, 4000, 30);
@@ -11850,7 +12390,7 @@ s16 func_8084ABD8(PlayState* play, Player* this, s32 arg2, s16 arg3) {
this->actor.focus.rot.y = CLAMP(temp2, -temp1, temp1) + this->actor.shape.rot.y;
}
- this->unk_6AE |= 2;
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_FOCUS_Y;
return func_80836AB8(this, (play->shootingGalleryStatus != 0) || func_8002DD78(this) || func_808334B4(this)) - arg3;
}
@@ -11882,7 +12422,7 @@ void func_8084B000(Player* this) {
f32 phi_f14;
f32 depthInWater;
- phi_f14 = -5.0f;
+ phi_f14 = FRAMERATE_CONST(-5.0f, -6.0f);
phi_f16 = this->ageProperties->unk_28;
if (this->actor.velocity.y < 0.0f) {
@@ -11898,10 +12438,10 @@ void func_8084B000(Player* this) {
phi_f18 = -0.1f - phi_f16;
} else {
if (!(this->stateFlags1 & PLAYER_STATE1_DEAD) && (this->currentBoots == PLAYER_BOOTS_IRON) &&
- (this->actor.velocity.y >= -3.0f)) {
+ (this->actor.velocity.y >= FRAMERATE_CONST(-3.0f, -3.6f))) {
phi_f18 = -0.2f;
} else {
- phi_f14 = 2.0f;
+ phi_f14 = FRAMERATE_CONST(2.0f, 2.4f);
if (this->actor.velocity.y >= 0.0f) {
phi_f16 = 0.0f;
} else {
@@ -11927,17 +12467,19 @@ void func_8084B000(Player* this) {
void func_8084B158(PlayState* play, Player* this, Input* input, f32 arg3) {
f32 temp;
+ f32 limit;
if ((input != NULL) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_B)) {
- temp = 1.0f;
+ temp = limit = FRAMERATE_CONST(1.0f, 1.2f);
} else {
- temp = 0.5f;
+ temp = FRAMERATE_CONST(0.5f, 0.6f);
+ limit = FRAMERATE_CONST(1.0f, 1.2f);
}
temp *= arg3;
- if (temp < 1.0f) {
- temp = 1.0f;
+ if (temp < limit) {
+ temp = limit;
}
this->skelAnime.playSpeed = temp;
@@ -11949,7 +12491,7 @@ void Player_Action_8084B1D8(Player* this, PlayState* play) {
func_8084B000(this);
func_8084AEEC(this, &this->speedXZ, 0, this->actor.shape.rot.y);
} else {
- func_8083721C(this);
+ Player_DecelerateToZero(this);
}
if ((this->unk_6AD == 2) && (func_8002DD6C(this) || func_808332E4(this))) {
@@ -11969,9 +12511,9 @@ void Player_Action_8084B1D8(Player* this, PlayState* play) {
Sfx_PlaySfxCentered(NA_SE_SY_CAMERA_ZOOM_UP);
} else if ((DECR(this->av2.actionVar2) == 0) || (this->unk_6AD != 2)) {
if (func_8008F128(this)) {
- this->unk_6AE |= 0x43;
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_FOCUS_X | UNK6AE_ROT_FOCUS_Y | UNK6AE_ROT_UPPER_X;
} else {
- this->actor.shape.rot.y = func_8084ABD8(play, this, 0, 0);
+ this->actor.shape.rot.y = func_8084ABD8(play, this, false, 0);
}
}
@@ -11988,7 +12530,7 @@ s32 func_8084B3CC(PlayState* play, Player* this) {
}
this->stateFlags1 |= PLAYER_STATE1_20;
- Player_AnimPlayOnce(play, this, func_80833338(this));
+ Player_AnimPlayOnce(play, this, Player_GetIdleAnim(this));
Player_ZeroSpeedXZ(this);
func_8083B010(this);
return 1;
@@ -12007,28 +12549,29 @@ s32 func_8084B4D4(PlayState* play, Player* this) {
this->stateFlags3 &= ~PLAYER_STATE3_5;
func_8084B498(this);
this->unk_6AD = 4;
- Player_ActionChange_13(this, play);
+ Player_ActionHandler_13(this, play);
return 1;
}
return 0;
}
-void Player_Action_8084B530(Player* this, PlayState* play) {
+void Player_Action_Talk(Player* this, PlayState* play) {
this->stateFlags2 |= PLAYER_STATE2_5;
+
Player_UpdateUpperBody(this, play);
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
this->actor.flags &= ~ACTOR_FLAG_TALK;
- if (!CHECK_FLAG_ALL(this->talkActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) {
+ if (!ACTOR_FLAGS_CHECK_ALL(this->talkActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) {
this->stateFlags2 &= ~PLAYER_STATE2_LOCK_ON_WITH_SWITCH;
}
Camera_SetFinishedFlag(Play_GetCamera(play, CAM_ID_MAIN));
if (!func_8084B4D4(play, this) && !func_8084B3CC(play, this) && !Player_StartCsAction(play, this)) {
- if ((this->talkActor != this->interactRangeActor) || !Player_ActionChange_2(this, play)) {
+ if ((this->talkActor != this->interactRangeActor) || !Player_ActionHandler_2(this, play)) {
if (this->stateFlags1 & PLAYER_STATE1_23) {
s32 sp24 = this->av2.actionVar2;
func_8083A360(play, this);
@@ -12041,7 +12584,7 @@ void Player_Action_8084B530(Player* this, PlayState* play) {
}
}
- this->unk_88E = 10;
+ this->textboxBtnCooldownTimer = 10;
return;
}
@@ -12050,12 +12593,13 @@ void Player_Action_8084B530(Player* this, PlayState* play) {
} else if (func_808332B8(this)) {
Player_Action_8084D610(this, play);
} else if (!Player_CheckHostileLockOn(this) && LinkAnimation_Update(play, &this->skelAnime)) {
- if (this->skelAnime.moveFlags != 0) {
- func_80832DBC(this);
+ if (this->skelAnime.movementFlags != 0) {
+ Player_FinishAnimMovement(this);
+
if ((this->talkActor->category == ACTORCAT_NPC) && (this->heldItemAction != PLAYER_IA_FISHING_POLE)) {
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_normal_talk_free);
} else {
- Player_AnimPlayLoop(play, this, func_80833338(this));
+ Player_AnimPlayLoop(play, this, Player_GetIdleAnim(this));
}
} else {
Player_AnimPlayLoopAdjusted(play, this, &gPlayerAnim_link_normal_talk_free_wait);
@@ -12063,7 +12607,7 @@ void Player_Action_8084B530(Player* this, PlayState* play) {
}
if (this->focusActor != NULL) {
- this->yaw = this->actor.shape.rot.y = func_8083DB98(this, 0);
+ this->yaw = this->actor.shape.rot.y = func_8083DB98(this, false);
}
}
@@ -12158,7 +12702,7 @@ void Player_Action_8084B9E4(Player* this, PlayState* play) {
if (LinkAnimation_OnFrame(&this->skelAnime, 11.0f)) {
Player_PlayVoiceSfx(this, NA_SE_VO_LI_PUSH);
}
- if (!OOT_DEBUG) {}
+ if (!DEBUG_FEATURES) {}
} else {
Player_ProcessAnimSfxList(this, D_80854878);
}
@@ -12264,7 +12808,7 @@ void Player_Action_8084BDFC(Player* this, PlayState* play) {
this->stateFlags2 |= PLAYER_STATE2_6;
if (LinkAnimation_Update(play, &this->skelAnime)) {
- func_80832E48(this, ANIM_FLAG_UPDATE_XZ);
+ Player_ApplyAnimMovementScaledByAge(this, ANIM_FLAG_UPDATE_XZ);
func_8083C0E8(this, play);
return;
}
@@ -12498,8 +13042,8 @@ void Player_Action_8084C760(Player* this, PlayState* play) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
if (!(this->stateFlags1 & PLAYER_STATE1_0)) {
// While inside a crawlspace, player's skeleton does not move
- if (this->skelAnime.moveFlags != 0) {
- this->skelAnime.moveFlags = 0;
+ if (this->skelAnime.movementFlags != 0) {
+ this->skelAnime.movementFlags = 0;
return;
}
@@ -12599,7 +13143,7 @@ s32 func_8084C9BC(Player* this, PlayState* play) {
if (EN_HORSE_CHECK_1(rideActor) ||
(EN_HORSE_CHECK_4(rideActor) && CHECK_BTN_ALL(sControlInput->press.button, BTN_A))) {
rideActor->actor.child = NULL;
- func_80835DAC(play, this, Player_Action_8084D3E4, 0);
+ Player_SetupActionPreserveAnimMovement(play, this, Player_Action_8084D3E4, 0);
this->unk_878 = sp34 - rideActor->actor.world.pos.y;
Player_AnimPlayOnce(play, this,
(this->mountSide < 0) ? &gPlayerAnim_link_uma_left_down
@@ -12703,7 +13247,7 @@ void Player_Action_8084CC98(Player* this, PlayState* play) {
}
if (LinkAnimation_OnFrame(&this->skelAnime, arr[1])) {
- func_8002DE74(play, this);
+ Actor_RequestHorseCameraSetting(play, this);
Player_PlaySfx(this, NA_SE_PL_SIT_ON_HORSE);
return;
}
@@ -12711,7 +13255,7 @@ void Player_Action_8084CC98(Player* this, PlayState* play) {
return;
}
- func_8002DE74(play, this);
+ Actor_RequestHorseCameraSetting(play, this);
this->skelAnime.prevTransl = D_8085499C;
if ((rideActor->animationIdx != this->av2.actionVar2) &&
@@ -12739,7 +13283,7 @@ void Player_Action_8084CC98(Player* this, PlayState* play) {
}
if (this->av2.actionVar2 == 1) {
- if (sUpperBodyIsBusy || func_8083224C(play)) {
+ if (sUpperBodyIsBusy || Player_IsTalking(play)) {
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_uma_wait_3);
} else if (LinkAnimation_Update(play, &this->skelAnime)) {
this->av2.actionVar2 = 99;
@@ -12774,8 +13318,8 @@ void Player_Action_8084CC98(Player* this, PlayState* play) {
this->yaw = this->actor.shape.rot.y = rideActor->actor.shape.rot.y;
if ((this->csAction != PLAYER_CSACTION_NONE) ||
- (!func_8083224C(play) && ((rideActor->actor.speed != 0.0f) || !Player_ActionChange_4(this, play)) &&
- !Player_ActionChange_6(this, play))) {
+ (!Player_IsTalking(play) && ((rideActor->actor.speed != 0.0f) || !Player_ActionHandler_Talk(this, play)) &&
+ !Player_ActionHandler_Roll(this, play))) {
if (!sUpperBodyIsBusy) {
if (this->av1.actionVar1 != 0) {
if (LinkAnimation_Update(play, &this->upperSkelAnime)) {
@@ -12824,30 +13368,30 @@ void Player_Action_8084CC98(Player* this, PlayState* play) {
this->unk_6AD = 0;
this->stateFlags1 &= ~PLAYER_STATE1_20;
} else {
- this->unk_6BE = func_8084ABD8(play, this, 1, -5000) - this->actor.shape.rot.y;
- this->unk_6BE += 5000;
- this->unk_6B0 = -5000;
+ this->upperLimbRot.y = func_8084ABD8(play, this, true, -5000) - this->actor.shape.rot.y;
+ this->upperLimbRot.y += 5000;
+ this->upperLimbYawSecondary = -5000;
}
return;
}
if ((this->csAction != PLAYER_CSACTION_NONE) ||
- (!func_8084C9BC(this, play) && !Player_ActionChange_13(this, play))) {
+ (!func_8084C9BC(this, play) && !Player_ActionHandler_13(this, play))) {
if (this->focusActor != NULL) {
- if (func_8002DD78(this) != 0) {
- this->unk_6BE = func_8083DB98(this, 1) - this->actor.shape.rot.y;
- this->unk_6BE = CLAMP(this->unk_6BE, -0x4AAA, 0x4AAA);
- this->actor.focus.rot.y = this->actor.shape.rot.y + this->unk_6BE;
- this->unk_6BE += 5000;
- this->unk_6AE |= 0x80;
+ if (func_8002DD78(this)) {
+ this->upperLimbRot.y = func_8083DB98(this, true) - this->actor.shape.rot.y;
+ this->upperLimbRot.y = CLAMP(this->upperLimbRot.y, -0x4AAA, 0x4AAA);
+ this->actor.focus.rot.y = this->actor.shape.rot.y + this->upperLimbRot.y;
+ this->upperLimbRot.y += 5000;
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_UPPER_Y;
} else {
- func_8083DB98(this, 0);
+ func_8083DB98(this, false);
}
} else {
- if (func_8002DD78(this) != 0) {
- this->unk_6BE = func_8084ABD8(play, this, 1, -5000) - this->actor.shape.rot.y;
- this->unk_6BE += 5000;
- this->unk_6B0 = -5000;
+ if (func_8002DD78(this)) {
+ this->upperLimbRot.y = func_8084ABD8(play, this, true, -5000) - this->actor.shape.rot.y;
+ this->upperLimbRot.y += 5000;
+ this->upperLimbYawSecondary = -5000;
}
}
}
@@ -12870,9 +13414,9 @@ void Player_Action_8084D3E4(Player* this, PlayState* play) {
func_8083C0E8(this, play);
this->stateFlags1 &= ~PLAYER_STATE1_23;
this->actor.parent = NULL;
- AREG(6) = 0;
+ R_EXITED_SCENE_RIDING_HORSE = false;
- if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0)) {
+ if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED) {
gSaveContext.save.info.horseData.pos.x = rideActor->actor.world.pos.x;
gSaveContext.save.info.horseData.pos.y = rideActor->actor.world.pos.y;
gSaveContext.save.info.horseData.pos.z = rideActor->actor.world.pos.z;
@@ -12914,7 +13458,7 @@ void Player_Action_8084D610(Player* this, PlayState* play) {
func_80832CB0(play, this, &gPlayerAnim_link_swimer_swim_wait);
func_8084B000(this);
- if (!func_8083224C(play) && !Player_TryActionChangeList(play, this, sActionChangeList11, true) &&
+ if (!Player_IsTalking(play) && !Player_TryActionHandlerList(play, this, sActionHandlerList11, true) &&
!func_8083D12C(play, this, sControlInput)) {
f32 speedTarget;
s16 yawTarget;
@@ -12954,7 +13498,7 @@ void Player_Action_8084D610(Player* this, PlayState* play) {
}
void Player_Action_8084D7C4(Player* this, PlayState* play) {
- if (!Player_ActionChange_13(this, play)) {
+ if (!Player_ActionHandler_13(this, play)) {
this->stateFlags2 |= PLAYER_STATE2_5;
func_8084B158(play, this, NULL, this->speedXZ);
@@ -12976,7 +13520,7 @@ void Player_Action_8084D84C(Player* this, PlayState* play) {
func_8084B158(play, this, sControlInput, this->speedXZ);
func_8084B000(this);
- if (!Player_TryActionChangeList(play, this, sActionChangeList11, true) &&
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList11, true) &&
!func_8083D12C(play, this, sControlInput)) {
Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play);
@@ -13036,7 +13580,7 @@ void Player_Action_8084DAB4(Player* this, PlayState* play) {
func_8084B158(play, this, sControlInput, this->speedXZ);
func_8084B000(this);
- if (!Player_TryActionChangeList(play, this, sActionChangeList11, true) &&
+ if (!Player_TryActionHandlerList(play, this, sActionHandlerList11, true) &&
!func_8083D12C(play, this, sControlInput)) {
Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play);
@@ -13068,7 +13612,7 @@ void Player_Action_8084DC48(Player* this, PlayState* play) {
this->actor.gravity = 0.0f;
Player_UpdateUpperBody(this, play);
- if (!Player_ActionChange_13(this, play)) {
+ if (!Player_ActionHandler_13(this, play)) {
if (this->currentBoots == PLAYER_BOOTS_IRON) {
func_80838F18(play, this);
return;
@@ -13083,14 +13627,14 @@ void Player_Action_8084DC48(Player* this, PlayState* play) {
this->actor.velocity.y = -2.0f;
}
- func_8083721C(this);
+ Player_DecelerateToZero(this);
return;
}
func_8084B158(play, this, sControlInput, this->actor.velocity.y);
this->unk_6C2 = 16000;
- if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_A) && !Player_ActionChange_2(this, play) &&
+ if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_A) && !Player_ActionHandler_2(this, play) &&
!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
(this->actor.depthInWater < D_80854784[CUR_UPG_VALUE(UPG_SCALE)])) {
func_8084DBC4(play, this, -2.0f);
@@ -13110,7 +13654,7 @@ void Player_Action_8084DC48(Player* this, PlayState* play) {
} else if (!func_8083D12C(play, this, sControlInput)) {
sp2C = (this->av2.actionVar2 * 0.018f) + 4.0f;
- if (this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY) {
+ if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) {
sControlInput = NULL;
}
@@ -13128,14 +13672,14 @@ void Player_Action_8084DC48(Player* this, PlayState* play) {
void func_8084DF6C(PlayState* play, Player* this) {
this->unk_862 = 0;
- this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_ACTOR_CARRY);
+ this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_CARRYING_ACTOR);
this->getItemId = GI_NONE;
Camera_SetFinishedFlag(Play_GetCamera(play, CAM_ID_MAIN));
}
void func_8084DFAC(PlayState* play, Player* this) {
func_8084DF6C(play, this);
- func_808322FC(this);
+ Player_ApplyYawFromAnim(this);
func_8083C0E8(this, play);
this->yaw = this->actor.shape.rot.y;
}
@@ -13261,12 +13805,12 @@ void Player_Action_8084E3C4(Player* this, PlayState* play) {
Camera_SetFinishedFlag(Play_GetCamera(play, CAM_ID_MAIN));
if ((this->talkActor != NULL) && (this->talkActor == this->unk_6A8)) {
- func_80853148(play, this->talkActor);
+ Player_StartTalking(play, this->talkActor);
} else if (this->naviTextId < 0) {
this->talkActor = this->naviActor;
this->naviActor->textId = -this->naviTextId;
- func_80853148(play, this->talkActor);
- } else if (!Player_ActionChange_13(this, play)) {
+ Player_StartTalking(play, this->talkActor);
+ } else if (!Player_ActionHandler_13(this, play)) {
func_8083A098(this, &gPlayerAnim_link_normal_okarina_end, play);
}
@@ -13276,7 +13820,8 @@ void Player_Action_8084E3C4(Player* this, PlayState* play) {
s32 pad;
gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex = sWarpSongEntrances[play->msgCtx.lastPlayedSong];
- gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams = 0x5FF;
+ gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams =
+ PLAYER_PARAMS(PLAYER_START_MODE_WARP_SONG, PLAYER_START_BG_CAM_DEFAULT);
gSaveContext.respawn[RESPAWN_MODE_RETURN].data = play->msgCtx.lastPlayedSong;
this->csAction = PLAYER_CSACTION_NONE;
@@ -13285,8 +13830,10 @@ void Player_Action_8084E3C4(Player* this, PlayState* play) {
Player_TryCsAction(play, NULL, PLAYER_CSACTION_8);
play->mainCamera.stateFlags &= ~CAM_STATE_EXTERNAL_FINISHED;
+ // Setting these flags again is necessary because `Player_TryCsAction` calls
+ // `Player_SetupAction` which unsets the flags.
this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29;
- this->stateFlags2 |= PLAYER_STATE2_27;
+ this->stateFlags2 |= PLAYER_STATE2_USING_OCARINA;
if (Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, DEMOKANKYO_WARP_OUT) ==
NULL) {
@@ -13309,7 +13856,7 @@ void Player_Action_8084E604(Player* this, PlayState* play) {
Player_PlayVoiceSfx(this, NA_SE_VO_LI_SWORD_N);
}
- func_8083721C(this);
+ Player_DecelerateToZero(this);
}
static AnimSfxEntry D_808549E0[] = {
@@ -13338,7 +13885,7 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) {
this->exchangeItemId = EXCH_ITEM_NONE;
if (func_8084B4D4(play, this) == 0) {
- func_80853148(play, this->talkActor);
+ Player_StartTalking(play, this->talkActor);
}
} else {
func_8084DFAC(play, this);
@@ -13346,10 +13893,10 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) {
}
}
} else {
- func_80832DBC(this);
+ Player_FinishAnimMovement(this);
if (this->getItemId == GI_ICE_TRAP) {
- this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_ACTOR_CARRY);
+ this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_CARRYING_ACTOR);
if (this->getItemId != GI_ICE_TRAP) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x,
@@ -13357,7 +13904,7 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) {
func_8083C0E8(this, play);
} else {
this->actor.colChkInfo.damage = 0;
- func_80837C0C(play, this, 3, 0.0f, 0.0f, 0, 20);
+ func_80837C0C(play, this, PLAYER_HIT_RESPONSE_ICE_TRAP, 0.0f, 0.0f, 0, 20);
}
return;
}
@@ -13389,24 +13936,22 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) {
}
}
-static AnimSfxEntry D_808549F0[] = {
- { NA_SE_IT_MASTER_SWORD_SWING, -ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 60) },
-};
-
void func_8084E988(Player* this) {
+ static AnimSfxEntry D_808549F0[] = {
+ { NA_SE_IT_MASTER_SWORD_SWING, -ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 60) },
+ };
+
Player_ProcessAnimSfxList(this, D_808549F0);
}
-static AnimSfxEntry D_808549F4[] = {
- { NA_SE_VO_LI_AUTO_JUMP, ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 5) },
- { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_LANDING, 15) },
-};
-
-void Player_Action_8084E9AC(Player* this, PlayState* play) {
+void Player_Action_TimeTravelEnd(Player* this, PlayState* play) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
- if (this->av1.actionVar1 == 0) {
- if (DECR(this->av2.actionVar2) == 0) {
- this->av1.actionVar1 = 1;
+ if (!this->av1.startedAnim) {
+ if (DECR(this->av2.animDelayTimer) == 0) {
+ this->av1.startedAnim = true;
+
+ // endFrame was previously set to 0 to freeze the animation.
+ // Set it properly to allow the animation to play.
this->skelAnime.endFrame = this->skelAnime.animLength - 1.0f;
}
} else {
@@ -13418,11 +13963,26 @@ void Player_Action_8084E9AC(Player* this, PlayState* play) {
return;
}
+#if OOT_VERSION < PAL_1_0
+ if (!LINK_IS_ADULT && LinkAnimation_OnFrame(&this->skelAnime, 5.0f)) {
+ // There is a jump sound when leaving the pedestal, but no landing sound when hitting the floor.
+ // This is fixed in PAL 1.0 and above.
+ Player_PlayVoiceSfx(this, NA_SE_VO_LI_AUTO_JUMP);
+ } else if (LINK_IS_ADULT) {
+ func_8084E988(this);
+ }
+#else
if (!LINK_IS_ADULT) {
- Player_ProcessAnimSfxList(this, D_808549F4);
+ static AnimSfxEntry sJumpOffPedestalAnimSfxList[] = {
+ { NA_SE_VO_LI_AUTO_JUMP, ANIMSFX_DATA(ANIMSFX_TYPE_VOICE, 5) },
+ { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_LANDING, 15) },
+ };
+
+ Player_ProcessAnimSfxList(this, sJumpOffPedestalAnimSfxList);
} else {
func_8084E988(this);
}
+#endif
}
}
@@ -13483,65 +14043,82 @@ void Player_Action_8084EAC0(Player* this, PlayState* play) {
}
}
-static BottleCatchInfo sBottleCatchInfos[] = {
- { ACTOR_EN_ELF, ITEM_BOTTLE_FAIRY, PLAYER_IA_BOTTLE_FAIRY, 0x46 },
- { ACTOR_EN_FISH, ITEM_BOTTLE_FISH, PLAYER_IA_BOTTLE_FISH, 0x47 },
- { ACTOR_EN_ICE_HONO, ITEM_BOTTLE_BLUE_FIRE, PLAYER_IA_BOTTLE_FIRE, 0x5D },
- { ACTOR_EN_INSECT, ITEM_BOTTLE_BUG, PLAYER_IA_BOTTLE_BUG, 0x7A },
+typedef enum BottleCatchType {
+ BOTTLE_CATCH_NONE, // This type does not have an associated entry in `sBottleCatchInfo`
+ BOTTLE_CATCH_FAIRY,
+ BOTTLE_CATCH_FISH,
+ BOTTLE_CATCH_BLUE_FIRE,
+ BOTTLE_CATCH_BUGS
+} BottleCatchType;
+
+typedef struct BottleCatchInfo {
+ /* 0x00 */ s16 actorId;
+ /* 0x02 */ u8 itemId;
+ /* 0x03 */ u8 itemAction;
+ /* 0x04 */ u8 textId;
+} BottleCatchInfo; // size = 0x06
+
+static BottleCatchInfo sBottleCatchInfo[] = {
+ { ACTOR_EN_ELF, ITEM_BOTTLE_FAIRY, PLAYER_IA_BOTTLE_FAIRY, 0x46 }, // BOTTLE_CATCH_FAIRY
+ { ACTOR_EN_FISH, ITEM_BOTTLE_FISH, PLAYER_IA_BOTTLE_FISH, 0x47 }, // BOTTLE_CATCH_FISH
+ { ACTOR_EN_ICE_HONO, ITEM_BOTTLE_BLUE_FIRE, PLAYER_IA_BOTTLE_FIRE, 0x5D }, // BOTTLE_CATCH_BLUE_FIRE
+ { ACTOR_EN_INSECT, ITEM_BOTTLE_BUG, PLAYER_IA_BOTTLE_BUG, 0x7A }, // BOTTLE_CATCH_BUGS
};
-void Player_Action_8084ECA4(Player* this, PlayState* play) {
- struct_80854554* sp24;
- BottleCatchInfo* catchInfo;
- s32 temp;
- s32 i;
+void Player_Action_SwingBottle(Player* this, PlayState* play) {
+ // Action Variable 2 has two separate uses within the same action.
+ // After it is used as `inWater` here, it will be used for `startedTextbox` below.
+ // The two usages will never overlap, so this won't cause any issues.
+ BottleSwingInfo* swingEntry = &sBottleSwingInfo[this->av2.inWater];
- sp24 = &D_80854554[this->av2.actionVar2];
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (LinkAnimation_Update(play, &this->skelAnime)) {
- if (this->av1.actionVar1 != 0) {
- if (this->av2.actionVar2 == 0) {
- Message_StartTextbox(play, sBottleCatchInfos[this->av1.actionVar1 - 1].textId, &this->actor);
+ if (this->av1.bottleCatchType != BOTTLE_CATCH_NONE) {
+ if (!this->av2.startedTextbox) {
+ // 1 is subtracted because `sBottleCatchInfo` does not have an entry for `BOTTLE_CATCH_NONE`
+ Message_StartTextbox(play, sBottleCatchInfo[this->av1.bottleCatchType - 1].textId, &this->actor);
Audio_PlayFanfare(NA_BGM_ITEM_GET | 0x900);
- this->av2.actionVar2 = 1;
+ this->av2.startedTextbox = true;
} else if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
- this->av1.actionVar1 = 0;
+ this->av1.bottleCatchType = BOTTLE_CATCH_NONE;
Camera_SetFinishedFlag(Play_GetCamera(play, CAM_ID_MAIN));
}
} else {
func_8083C0E8(this, play);
}
- } else {
- if (this->av1.actionVar1 == 0) {
- temp = this->skelAnime.curFrame - sp24->unk_08;
+ } else if (this->av1.bottleCatchType == BOTTLE_CATCH_NONE) {
+ s32 activeFrame = this->skelAnime.curFrame - swingEntry->firstActiveFrame;
- if (temp >= 0) {
- if (sp24->unk_09 >= temp) {
- if (this->av2.actionVar2 != 0) {
- if (temp == 0) {
- Player_PlaySfx(this, NA_SE_IT_SCOOP_UP_WATER);
- }
+ if (activeFrame >= 0 && activeFrame <= swingEntry->numActiveFrames) {
+ if (this->av2.inWater && activeFrame == 0) {
+ // Play water scoop sound on the first active frame, if applicable
+ Player_PlaySfx(this, NA_SE_IT_SCOOP_UP_WATER);
+ }
+
+ // `interactRangeActor` will be set by the Get Item system. See `Actor_OfferGetItem`.
+ if (this->interactRangeActor != NULL) {
+ BottleCatchInfo* catchInfo = &sBottleCatchInfo[0];
+ s32 i;
+
+ // Try to find an `interactRangeActor` with the same ID as an entry in `sBottleCatchInfo`
+ for (i = 0; i < ARRAY_COUNT(sBottleCatchInfo); i++, catchInfo++) {
+ if (this->interactRangeActor->id == catchInfo->actorId) {
+ break;
}
+ }
- if (this->interactRangeActor != NULL) {
- catchInfo = &sBottleCatchInfos[0];
- for (i = 0; i < ARRAY_COUNT(sBottleCatchInfos); i++, catchInfo++) {
- if (this->interactRangeActor->id == catchInfo->actorId) {
- break;
- }
- }
+ if (i < ARRAY_COUNT(sBottleCatchInfo)) {
+ // 1 is added because `sBottleCatchInfo` does not have an entry for `BOTTLE_CATCH_NONE`
+ this->av1.bottleCatchType = i + 1;
- if (i < ARRAY_COUNT(sBottleCatchInfos)) {
- this->av1.actionVar1 = i + 1;
- this->av2.actionVar2 = 0;
- this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29;
- this->interactRangeActor->parent = &this->actor;
- Player_UpdateBottleHeld(play, this, catchInfo->itemId, ABS(catchInfo->itemAction));
- Player_AnimPlayOnceAdjusted(play, this, sp24->unk_04);
- func_80835EA4(play, 4);
- }
- }
+ this->av2.startedTextbox = false;
+ this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29;
+ this->interactRangeActor->parent = &this->actor;
+
+ Player_UpdateBottleHeld(play, this, catchInfo->itemId, ABS(catchInfo->itemAction));
+ Player_AnimPlayOnceAdjusted(play, this, swingEntry->catchAnimation);
+ func_80835EA4(play, 4);
}
}
}
@@ -13586,7 +14163,7 @@ static AnimSfxEntry D_80854A34[] = {
};
void Player_Action_8084EFC0(Player* this, PlayState* play) {
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (LinkAnimation_Update(play, &this->skelAnime)) {
func_8083C0E8(this, play);
@@ -13609,7 +14186,7 @@ static AnimSfxEntry D_80854A3C[] = {
{ NA_SE_PL_PUT_OUT_ITEM, -ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 30) },
};
-void Player_Action_8084F104(Player* this, PlayState* play) {
+void Player_Action_ExchangeItem(Player* this, PlayState* play) {
this->stateFlags2 |= PLAYER_STATE2_5;
if (LinkAnimation_Update(play, &this->skelAnime)) {
@@ -13623,7 +14200,7 @@ void Player_Action_8084F104(Player* this, PlayState* play) {
this->actor.flags |= ACTOR_FLAG_TALK;
}
- func_80853148(play, talkActor);
+ Player_StartTalking(play, talkActor);
} else {
GetItemEntry* giEntry = &sGetItemTable[D_80854528[this->exchangeItemId - 1] - 1];
@@ -13660,7 +14237,7 @@ void Player_Action_8084F104(Player* this, PlayState* play) {
}
if ((this->av1.actionVar1 == 0) && (this->focusActor != NULL)) {
- this->yaw = this->actor.shape.rot.y = func_8083DB98(this, 0);
+ this->yaw = this->actor.shape.rot.y = func_8083DB98(this, false);
}
}
@@ -13677,22 +14254,20 @@ void Player_Action_8084F308(Player* this, PlayState* play) {
}
}
-void Player_Action_8084F390(Player* this, PlayState* play) {
- CollisionPoly* floorPoly;
- f32 sp50;
- f32 sp4C;
- f32 sp48;
- s16 downwardSlopeYaw;
- s16 sp44;
- Vec3f slopeNormal;
-
+void Player_Action_SlideOnSlope(Player* this, PlayState* play) {
this->stateFlags2 |= PLAYER_STATE2_5 | PLAYER_STATE2_6;
LinkAnimation_Update(play, &this->skelAnime);
func_8084269C(play, this);
func_800F4138(&this->actor.projectedPos, NA_SE_PL_SLIP_LEVEL - SFX_FLAG, this->actor.speed);
- if (Player_ActionChange_13(this, play) == 0) {
- floorPoly = this->actor.floorPoly;
+ if (Player_ActionHandler_13(this, play) == 0) {
+ CollisionPoly* floorPoly = this->actor.floorPoly;
+ f32 xzSpeedTarget;
+ f32 xzSpeedIncrStep;
+ f32 xzSpeedDecrStep;
+ s16 downwardSlopeYaw;
+ s16 shapeYawTarget;
+ Vec3f slopeNormal;
if (floorPoly == NULL) {
func_80837B9C(this, play);
@@ -13701,80 +14276,94 @@ void Player_Action_8084F390(Player* this, PlayState* play) {
Player_GetSlopeDirection(floorPoly, &slopeNormal, &downwardSlopeYaw);
- sp44 = downwardSlopeYaw;
- if (this->av1.actionVar1 != 0) {
- sp44 = downwardSlopeYaw + 0x8000;
+ shapeYawTarget = downwardSlopeYaw;
+ if (this->av1.facingUpSlope) {
+ shapeYawTarget = downwardSlopeYaw + 0x8000;
}
- if (this->speedXZ < 0) {
+ if (this->speedXZ < 0.0f) {
downwardSlopeYaw += 0x8000;
}
- sp50 = (1.0f - slopeNormal.y) * 40.0f;
- sp50 = CLAMP(sp50, 0, 10.0f);
- sp4C = (sp50 * sp50) * 0.015f;
- sp48 = slopeNormal.y * 0.01f;
+ xzSpeedTarget = (1.0f - slopeNormal.y) * 40.0f;
+ xzSpeedTarget = CLAMP(xzSpeedTarget, 0.0f, 10.0f);
+ xzSpeedIncrStep = SQ(xzSpeedTarget) * 0.015f;
+ xzSpeedDecrStep = slopeNormal.y * 0.01f;
if (SurfaceType_GetFloorEffect(&play->colCtx, floorPoly, this->actor.floorBgId) != FLOOR_EFFECT_1) {
- sp50 = 0;
- sp48 = slopeNormal.y * 10.0f;
+ xzSpeedTarget = 0.0f;
+ xzSpeedDecrStep = slopeNormal.y * 10.0f;
}
- if (sp4C < 1.0f) {
- sp4C = 1.0f;
+ if (xzSpeedIncrStep < 1.0f) {
+ xzSpeedIncrStep = 1.0f;
}
- if (Math_AsymStepToF(&this->speedXZ, sp50, sp4C, sp48) && (sp50 == 0)) {
- LinkAnimationHeader* anim;
+ if (Math_AsymStepToF(&this->speedXZ, xzSpeedTarget, xzSpeedIncrStep, xzSpeedDecrStep) &&
+ (xzSpeedTarget == 0.0f)) {
+ LinkAnimationHeader* slideAnimation;
- if (this->av1.actionVar1 == 0) {
- anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_down_slope_slip_end, this->modelAnimType);
+ if (!this->av1.facingUpSlope) {
+ slideAnimation = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_down_slope_slip_end, this->modelAnimType);
} else {
- anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_up_slope_slip_end, this->modelAnimType);
+ slideAnimation = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_up_slope_slip_end, this->modelAnimType);
}
- func_8083A098(this, anim, play);
+ func_8083A098(this, slideAnimation, play);
}
Math_SmoothStepToS(&this->yaw, downwardSlopeYaw, 10, 4000, 800);
- Math_ScaledStepToS(&this->actor.shape.rot.y, sp44, 2000);
+ Math_ScaledStepToS(&this->actor.shape.rot.y, shapeYawTarget, 2000);
}
}
-void Player_Action_8084F608(Player* this, PlayState* play) {
- if ((DECR(this->av2.actionVar2) == 0) && Player_StartCsAction(play, this)) {
+/**
+ * Waits to start processing a Cutscene Action.
+ * First, the timer `csDelayTimer` much reach 0.
+ * Then, there must be a CS action available to start processing.
+ *
+ * When starting the cutscene action, `draw` will be set to make
+ * Player appear, if he was invisible.
+ */
+void Player_Action_WaitForCutscene(Player* this, PlayState* play) {
+ if ((DECR(this->av2.csDelayTimer) == 0) && Player_StartCsAction(play, this)) {
func_80852280(play, this, NULL);
Player_SetupAction(play, this, Player_Action_CsAction, 0);
Player_Action_CsAction(this, play);
}
}
-void Player_Action_8084F698(Player* this, PlayState* play) {
- Player_SetupAction(play, this, Player_Action_8084F608, 0);
- this->av2.actionVar2 = 40;
+void Player_Action_StartWarpSongArrive(Player* this, PlayState* play) {
+ Player_SetupAction(play, this, Player_Action_WaitForCutscene, 0);
+ this->av2.csDelayTimer = 40;
+
+ // Note: The warp song sparkles actor is responsible for starting the warp-in cutscene script
Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, DEMOKANKYO_WARP_IN);
}
-void Player_Action_8084F710(Player* this, PlayState* play) {
+void Player_Action_BlueWarpArrive(Player* this, PlayState* play) {
s32 pad;
- if ((this->av1.actionVar1 != 0) && (play->csCtx.curFrame < 305)) {
+ if ((this->av1.isLakeHyliaCs) && (play->csCtx.curFrame < 305)) {
+ // Delay falling down until frame 306 of the Lake Hylia cutscene after completing Water Temple
this->actor.gravity = 0.0f;
this->actor.velocity.y = 0.0f;
} else if (sYDistToFloor < 150.0f) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
- if (this->av2.actionVar2 == 0) {
+ if (!this->av2.playedLandingSfx) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
this->skelAnime.endFrame = this->skelAnime.animLength - 1.0f;
Player_PlayLandingSfx(this);
- this->av2.actionVar2 = 1;
+ this->av2.playedLandingSfx = true;
}
} else {
if ((play->sceneId == SCENE_KOKIRI_FOREST) && Player_StartCsAction(play, this)) {
return;
}
+
func_80853080(this, play);
}
}
+
Math_SmoothStepToF(&this->actor.velocity.y, 2.0f, 0.3f, 8.0f, 0.5f);
}
@@ -13783,9 +14372,10 @@ void Player_Action_8084F710(Player* this, PlayState* play) {
}
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.playerCue != NULL)) {
- f32 sp28 = this->actor.world.pos.y;
+ f32 savedYPos = this->actor.world.pos.y;
+
func_808529D0(play, this, play->csCtx.playerCue);
- this->actor.world.pos.y = sp28;
+ this->actor.world.pos.y = savedYPos;
}
}
@@ -13817,11 +14407,15 @@ void Player_Action_8084F88C(Player* this, PlayState* play) {
}
}
-void Player_Action_8084F9A0(Player* this, PlayState* play) {
- Player_ActionChange_1(this, play);
+/**
+ * Automatically open a door (no need for the A button).
+ * Note: If no door is in useable range, a softlock will occur.
+ */
+void Player_Action_TryOpeningDoor(Player* this, PlayState* play) {
+ Player_ActionHandler_1(this, play);
}
-void Player_Action_8084F9C0(Player* this, PlayState* play) {
+void Player_Action_ExitGrotto(Player* this, PlayState* play) {
this->actor.gravity = -1.0f;
LinkAnimation_Update(play, &this->skelAnime);
@@ -13840,8 +14434,8 @@ void Player_Action_8084FA54(Player* this, PlayState* play) {
LinkAnimation_Update(play, &this->skelAnime);
Player_UpdateUpperBody(this, play);
- this->unk_6BE = func_8084ABD8(play, this, 1, 0) - this->actor.shape.rot.y;
- this->unk_6AE |= 0x80;
+ this->upperLimbRot.y = func_8084ABD8(play, this, true, 0) - this->actor.shape.rot.y;
+ this->unk_6AE_rotFlags |= UNK6AE_ROT_UPPER_Y;
if (play->shootingGalleryStatus < 0) {
play->shootingGalleryStatus++;
@@ -13871,7 +14465,7 @@ void Player_Action_8084FB10(Player* this, PlayState* play) {
} else {
if (LinkAnimation_Update(play, &this->skelAnime)) {
func_80839F90(this, play);
- func_80837AFC(this, -20);
+ Player_SetInvulnerability(this, -20);
}
}
}
@@ -13890,7 +14484,7 @@ void Player_Action_8084FBF4(Player* this, PlayState* play) {
Actor_PlaySfx_Flagged2(&this->actor, NA_SE_VO_LI_TAKEN_AWAY - SFX_FLAG + this->ageProperties->unk_92);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
/**
* Updates the "Noclip" debug feature, which allows the player to fly around anywhere
* in the world and clip through any collision.
@@ -14040,7 +14634,7 @@ void Player_UpdateBunnyEars(Player* this) {
}
}
-s32 Player_ActionChange_7(Player* this, PlayState* play) {
+s32 Player_ActionHandler_7(Player* this, PlayState* play) {
if (func_8083C6B8(play, this) == 0) {
if (func_8083BB20(this) != 0) {
s32 sp24 = func_80837818(this);
@@ -14084,8 +14678,8 @@ void Player_Action_808502D0(Player* this, PlayState* play) {
func_8083C50C(this);
if (LinkAnimation_Update(play, &this->skelAnime)) {
- if (!Player_ActionChange_7(this, play)) {
- u8 sp43 = this->skelAnime.moveFlags;
+ if (!Player_ActionHandler_7(this, play)) {
+ u8 sp43 = this->skelAnime.movementFlags;
LinkAnimationHeader* sp3C;
if (Player_CheckHostileLockOn(this)) {
@@ -14095,7 +14689,7 @@ void Player_Action_808502D0(Player* this, PlayState* play) {
}
func_80832318(this);
- this->skelAnime.moveFlags = 0;
+ this->skelAnime.movementFlags = 0;
if ((sp3C == &gPlayerAnim_link_fighter_Lpower_jump_kiru_end) &&
(this->modelAnimType != PLAYER_ANIMTYPE_3)) {
@@ -14104,7 +14698,7 @@ void Player_Action_808502D0(Player* this, PlayState* play) {
func_8083A098(this, sp3C, play);
- this->skelAnime.moveFlags = sp43;
+ this->skelAnime.movementFlags = sp43;
this->stateFlags3 |= PLAYER_STATE3_3;
}
} else if (this->heldItemAction == PLAYER_IA_HAMMER) {
@@ -14118,7 +14712,7 @@ void Player_Action_808502D0(Player* this, PlayState* play) {
sp2C = this->actor.world.pos.y - shockwavePos.y;
Math_ScaledStepToS(&this->actor.focus.rot.x, Math_Atan2S(45.0f, sp2C), 800);
- func_80836AB8(this, 1);
+ func_80836AB8(this, true);
if ((((this->meleeWeaponAnimation == PLAYER_MWA_HAMMER_FORWARD) &&
LinkAnimation_OnFrame(&this->skelAnime, 7.0f)) ||
@@ -14135,7 +14729,7 @@ void Player_Action_808502D0(Player* this, PlayState* play) {
void Player_Action_808505DC(Player* this, PlayState* play) {
LinkAnimation_Update(play, &this->skelAnime);
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (this->skelAnime.curFrame >= 6.0f) {
func_80839FFC(this, play);
@@ -14177,17 +14771,17 @@ void Player_Action_8085063C(Player* this, PlayState* play) {
}
}
-void Player_Action_8085076C(Player* this, PlayState* play) {
+void Player_Action_FaroresWindArrive(Player* this, PlayState* play) {
s32 respawnData = gSaveContext.respawn[RESPAWN_MODE_TOP].data;
- if (this->av2.actionVar2 > 20) {
+ if (this->av2.appearTimer > 20) {
this->actor.draw = Player_Draw;
this->actor.world.pos.y += 60.0f;
func_80837B9C(this, play);
return;
}
- if (this->av2.actionVar2++ == 20) {
+ if (this->av2.appearTimer++ == 20) {
gSaveContext.respawn[RESPAWN_MODE_TOP].data = respawnData + 1;
Sfx_PlaySfxAtPos(&gSaveContext.respawn[RESPAWN_MODE_TOP].pos, NA_SE_PL_MAGIC_WIND_WARP);
}
@@ -14248,13 +14842,15 @@ void Player_Action_808507F4(Player* this, PlayState* play) {
if (this->av2.actionVar2 == 0) {
gSaveContext.respawn[RESPAWN_MODE_TOP].data = 1;
- Play_SetupRespawnPoint(play, RESPAWN_MODE_TOP, 0x6FF);
+ Play_SetupRespawnPoint(play, RESPAWN_MODE_TOP,
+ PLAYER_PARAMS(PLAYER_START_MODE_FARORES_WIND, PLAYER_START_BG_CAM_DEFAULT));
gSaveContext.save.info.fw.set = 1;
gSaveContext.save.info.fw.pos.x = gSaveContext.respawn[RESPAWN_MODE_DOWN].pos.x;
gSaveContext.save.info.fw.pos.y = gSaveContext.respawn[RESPAWN_MODE_DOWN].pos.y;
gSaveContext.save.info.fw.pos.z = gSaveContext.respawn[RESPAWN_MODE_DOWN].pos.z;
gSaveContext.save.info.fw.yaw = gSaveContext.respawn[RESPAWN_MODE_DOWN].yaw;
- gSaveContext.save.info.fw.playerParams = 0x6FF;
+ gSaveContext.save.info.fw.playerParams =
+ PLAYER_PARAMS(PLAYER_START_MODE_FARORES_WIND, PLAYER_START_BG_CAM_DEFAULT);
gSaveContext.save.info.fw.entranceIndex = gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex;
gSaveContext.save.info.fw.roomIndex = gSaveContext.respawn[RESPAWN_MODE_DOWN].roomIndex;
gSaveContext.save.info.fw.tempSwchFlags = gSaveContext.respawn[RESPAWN_MODE_DOWN].tempSwchFlags;
@@ -14298,10 +14894,10 @@ void Player_Action_808507F4(Player* this, PlayState* play) {
}
}
- func_8083721C(this);
+ Player_DecelerateToZero(this);
}
-void Player_Action_80850AEC(Player* this, PlayState* play) {
+void Player_Action_HookshotFly(Player* this, PlayState* play) {
this->stateFlags2 |= PLAYER_STATE2_5;
if (LinkAnimation_Update(play, &this->skelAnime)) {
@@ -14364,7 +14960,7 @@ void Player_Action_80850C68(Player* this, PlayState* play) {
this->av2.actionVar2 = 1;
}
- func_8083721C(this);
+ Player_DecelerateToZero(this);
if (this->unk_860 == 0) {
func_80853080(this, play);
@@ -14570,51 +15166,55 @@ static struct_80854B18 D_80854E50[PLAYER_CSACTION_MAX] = {
{ 11, NULL }, // PLAYER_CSACTION_55
{ 11, NULL }, // PLAYER_CSACTION_56
{ 12, &gPlayerAnim_clink_demo_mimawasi_wait }, // PLAYER_CSACTION_57
- { -1, func_80852358 }, // PLAYER_CSACTION_58
- { 11, NULL }, // PLAYER_CSACTION_59
- { 18, D_80854B14 }, // PLAYER_CSACTION_60
- { 11, NULL }, // PLAYER_CSACTION_61
- { 11, NULL }, // PLAYER_CSACTION_62
- { 11, NULL }, // PLAYER_CSACTION_63
- { 11, NULL }, // PLAYER_CSACTION_64
- { -1, func_80852388 }, // PLAYER_CSACTION_65
- { 17, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_66
- { 12, &gPlayerAnim_d_link_orowait }, // PLAYER_CSACTION_67
- { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_68
- { 11, NULL }, // PLAYER_CSACTION_69
- { -1, func_808526EC }, // PLAYER_CSACTION_70
- { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSACTION_71
- { -1, func_808526EC }, // PLAYER_CSACTION_72
- { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSACTION_73
- { 12, &gPlayerAnim_link_demo_gurad_wait }, // PLAYER_CSACTION_74
- { 12, &gPlayerAnim_link_demo_look_hand_wait }, // PLAYER_CSACTION_75
- { 11, NULL }, // PLAYER_CSACTION_76
- { 12, &gPlayerAnim_link_demo_ue_wait }, // PLAYER_CSACTION_77
- { 12, &gPlayerAnim_Link_m_wait }, // PLAYER_CSACTION_78
- { 13, &gPlayerAnim_Link_ue_wait }, // PLAYER_CSACTION_79
- { 12, &gPlayerAnim_Link_otituku_w }, // PLAYER_CSACTION_80
- { 12, &gPlayerAnim_L_kw }, // PLAYER_CSACTION_81
- { 11, NULL }, // PLAYER_CSACTION_82
- { 11, NULL }, // PLAYER_CSACTION_83
- { 11, NULL }, // PLAYER_CSACTION_84
- { 11, NULL }, // PLAYER_CSACTION_85
- { -1, func_80852648 }, // PLAYER_CSACTION_86
- { 11, NULL }, // PLAYER_CSACTION_87
- { 12, &gPlayerAnim_L_kennasi_w }, // PLAYER_CSACTION_88
- { -1, func_808524D0 }, // PLAYER_CSACTION_89
- { -1, func_80852514 }, // PLAYER_CSACTION_90
- { -1, func_80852554 }, // PLAYER_CSACTION_91
- { -1, func_808525C0 }, // PLAYER_CSACTION_92
- { 11, NULL }, // PLAYER_CSACTION_93
- { 11, NULL }, // PLAYER_CSACTION_94
- { 11, NULL }, // PLAYER_CSACTION_95
- { -1, func_8085283C }, // PLAYER_CSACTION_96
- { -1, func_808528C8 }, // PLAYER_CSACTION_97
- { -1, func_808528C8 }, // PLAYER_CSACTION_98
- { 12, &gPlayerAnim_link_demo_zeldamiru_wait }, // PLAYER_CSACTION_99
- { 12, &gPlayerAnim_link_demo_kenmiru1_wait }, // PLAYER_CSACTION_100
- { 12, &gPlayerAnim_link_demo_kenmiru2_wait }, // PLAYER_CSACTION_101
- { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_102
+#if OOT_VERSION < PAL_1_0
+ { 12, &gPlayerAnim_link_demo_nozokikomi_wait }, // PLAYER_CSACTION_58
+#else
+ { -1, func_80852358 }, // PLAYER_CSACTION_58
+#endif
+ { 11, NULL }, // PLAYER_CSACTION_59
+ { 18, D_80854B14 }, // PLAYER_CSACTION_60
+ { 11, NULL }, // PLAYER_CSACTION_61
+ { 11, NULL }, // PLAYER_CSACTION_62
+ { 11, NULL }, // PLAYER_CSACTION_63
+ { 11, NULL }, // PLAYER_CSACTION_64
+ { -1, func_80852388 }, // PLAYER_CSACTION_65
+ { 17, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_66
+ { 12, &gPlayerAnim_d_link_orowait }, // PLAYER_CSACTION_67
+ { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_68
+ { 11, NULL }, // PLAYER_CSACTION_69
+ { -1, func_808526EC }, // PLAYER_CSACTION_70
+ { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSACTION_71
+ { -1, func_808526EC }, // PLAYER_CSACTION_72
+ { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSACTION_73
+ { 12, &gPlayerAnim_link_demo_gurad_wait }, // PLAYER_CSACTION_74
+ { 12, &gPlayerAnim_link_demo_look_hand_wait }, // PLAYER_CSACTION_75
+ { 11, NULL }, // PLAYER_CSACTION_76
+ { 12, &gPlayerAnim_link_demo_ue_wait }, // PLAYER_CSACTION_77
+ { 12, &gPlayerAnim_Link_m_wait }, // PLAYER_CSACTION_78
+ { 13, &gPlayerAnim_Link_ue_wait }, // PLAYER_CSACTION_79
+ { 12, &gPlayerAnim_Link_otituku_w }, // PLAYER_CSACTION_80
+ { 12, &gPlayerAnim_L_kw }, // PLAYER_CSACTION_81
+ { 11, NULL }, // PLAYER_CSACTION_82
+ { 11, NULL }, // PLAYER_CSACTION_83
+ { 11, NULL }, // PLAYER_CSACTION_84
+ { 11, NULL }, // PLAYER_CSACTION_85
+ { -1, func_80852648 }, // PLAYER_CSACTION_86
+ { 11, NULL }, // PLAYER_CSACTION_87
+ { 12, &gPlayerAnim_L_kennasi_w }, // PLAYER_CSACTION_88
+ { -1, func_808524D0 }, // PLAYER_CSACTION_89
+ { -1, func_80852514 }, // PLAYER_CSACTION_90
+ { -1, func_80852554 }, // PLAYER_CSACTION_91
+ { -1, func_808525C0 }, // PLAYER_CSACTION_92
+ { 11, NULL }, // PLAYER_CSACTION_93
+ { 11, NULL }, // PLAYER_CSACTION_94
+ { 11, NULL }, // PLAYER_CSACTION_95
+ { -1, func_8085283C }, // PLAYER_CSACTION_96
+ { -1, func_808528C8 }, // PLAYER_CSACTION_97
+ { -1, func_808528C8 }, // PLAYER_CSACTION_98
+ { 12, &gPlayerAnim_link_demo_zeldamiru_wait }, // PLAYER_CSACTION_99
+ { 12, &gPlayerAnim_link_demo_kenmiru1_wait }, // PLAYER_CSACTION_100
+ { 12, &gPlayerAnim_link_demo_kenmiru2_wait }, // PLAYER_CSACTION_101
+ { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSACTION_102
};
void Player_AnimChangeOnceMorphZeroRootYawSpeed(PlayState* play, Player* this, LinkAnimationHeader* anim) {
@@ -14664,7 +15264,7 @@ void func_808510D4(PlayState* play, Player* this, void* anim) {
void func_808510F4(PlayState* play, Player* this, void* anim) {
Player_AnimReplacePlayOnce(play, this, anim,
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
}
@@ -14674,7 +15274,7 @@ void func_80851114(PlayState* play, Player* this, void* anim) {
void func_80851134(PlayState* play, Player* this, void* anim) {
Player_AnimReplacePlayLoop(play, this, anim,
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
}
@@ -14707,7 +15307,7 @@ void func_808511FC(PlayState* play, Player* this, void* anim) {
void func_80851248(PlayState* play, Player* this, void* anim) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
- func_80832DBC(this);
+ Player_FinishAnimMovement(this);
Player_AnimPlayLoopAdjusted(play, this, anim);
}
}
@@ -14732,7 +15332,7 @@ void func_80851314(Player* this) {
this->focusActor = this->csActor;
if (this->focusActor != NULL) {
- this->actor.shape.rot.y = func_8083DB98(this, 0);
+ this->actor.shape.rot.y = func_8083DB98(this, false);
}
}
@@ -14780,13 +15380,13 @@ void func_808514C0(PlayState* play, Player* this, CsCmdActorCue* cue) {
LinkAnimation_Update(play, &this->skelAnime);
- if (func_8008F128(this) || (this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY)) {
+ if (func_8008F128(this) || (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) {
Player_UpdateUpperBody(this, play);
return;
}
if ((this->interactRangeActor != NULL) && (this->interactRangeActor->textId == 0xFFFF)) {
- Player_ActionChange_2(this, play);
+ Player_ActionHandler_2(this, play);
}
}
@@ -14829,7 +15429,7 @@ void func_80851688(PlayState* play, Player* this, CsCmdActorCue* cue) {
LinkAnimation_Update(play, &this->skelAnime);
- if (func_8008F128(this) || (this->stateFlags1 & PLAYER_STATE1_ACTOR_CARRY)) {
+ if (func_8008F128(this) || (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) {
Player_UpdateUpperBody(this, play);
}
}
@@ -14914,16 +15514,16 @@ static LinkAnimationHeader* D_80855190[] = {
&gPlayerAnim_clink_demo_goto_future,
};
-static Vec3f D_80855198 = { -1.0f, 70.0f, 20.0f };
-
void func_808519EC(PlayState* play, Player* this, CsCmdActorCue* cue) {
- Math_Vec3f_Copy(&this->actor.world.pos, &D_80855198);
+ static Vec3f sPedestalPos = { -1.0f, 70.0f, 20.0f };
+
+ Math_Vec3f_Copy(&this->actor.world.pos, &sPedestalPos);
this->actor.shape.rot.y = -0x8000;
- Player_AnimPlayOnceAdjusted(play, this, this->ageProperties->unk_9C);
- Player_AnimReplaceApplyFlags(play, this,
- ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
- ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_AnimPlayOnceAdjusted(play, this, this->ageProperties->timeTravelStartAnim);
+ Player_StartAnimMovement(play, this,
+ PLAYER_ANIM_MOVEMENT_RESET_BY_AGE | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
+ ANIM_FLAG_OVERRIDE_MOVEMENT);
}
static struct_808551A4 D_808551A4[] = {
@@ -14931,10 +15531,12 @@ static struct_808551A4 D_808551A4[] = {
{ NA_SE_IT_SWORD_STICK_STN, NA_SE_VO_LI_SWORD_N },
};
+#if OOT_VERSION >= PAL_1_0
static AnimSfxEntry D_808551AC[] = {
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 29) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 39) },
};
+#endif
void func_80851A50(PlayState* play, Player* this, CsCmdActorCue* cue) {
struct_808551A4* sp2C;
@@ -14963,7 +15565,9 @@ void func_80851A50(PlayState* play, Player* this, CsCmdActorCue* cue) {
Player_PlayVoiceSfx(this, NA_SE_VO_LI_SWORD_L);
}
} else {
+#if OOT_VERSION >= PAL_1_0
Player_ProcessAnimSfxList(this, D_808551AC);
+#endif
}
}
@@ -14998,7 +15602,7 @@ void func_80851CA4(PlayState* play, Player* this, CsCmdActorCue* cue) {
}
if (this->av2.actionVar2 != 0) {
- func_8083721C(this);
+ Player_DecelerateToZero(this);
}
}
@@ -15016,7 +15620,7 @@ void func_80851D80(PlayState* play, Player* this, CsCmdActorCue* cue) {
LinkAnimation_Update(play, &this->skelAnime);
if (LinkAnimation_OnFrame(&this->skelAnime, 6.0f)) {
- func_80846720(play, this, 0);
+ Player_PutSwordInHand(play, this, false);
} else {
Player_ProcessAnimSfxList(this, D_808551B8);
}
@@ -15034,13 +15638,13 @@ void func_80851E28(PlayState* play, Player* this, CsCmdActorCue* cue) {
void func_80851E64(PlayState* play, Player* this, CsCmdActorCue* cue) {
Player_AnimReplacePlayOnceAdjusted(play, this, &gPlayerAnim_link_swimer_swim_get,
- ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS |
+ ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_OVERRIDE_MOVEMENT);
}
void func_80851E90(PlayState* play, Player* this, CsCmdActorCue* cue) {
Player_AnimReplacePlayOnce(play, this, &gPlayerAnim_clink_op3_negaeri,
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
Player_PlayVoiceSfx(this, NA_SE_VO_LI_GROAN);
}
@@ -15048,7 +15652,7 @@ void func_80851E90(PlayState* play, Player* this, CsCmdActorCue* cue) {
void func_80851ECC(PlayState* play, Player* this, CsCmdActorCue* cue) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
Player_AnimReplacePlayLoop(play, this, &gPlayerAnim_clink_op3_wait2,
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
}
}
@@ -15076,7 +15680,7 @@ static AnimSfxEntry D_808551BC[] = {
void func_80851FB0(PlayState* play, Player* this, CsCmdActorCue* cue) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
Player_AnimReplacePlayLoop(play, this, &gPlayerAnim_clink_op3_wait3,
- ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
+ ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
this->av2.actionVar2 = 1;
} else if (this->av2.actionVar2 == 0) {
@@ -15088,10 +15692,17 @@ void func_80851FB0(PlayState* play, Player* this, CsCmdActorCue* cue) {
}
static AnimSfxEntry D_808551C8[] = {
+#if OOT_VERSION < PAL_1_0
+ { NA_SE_PL_LAND, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 67) },
+ { 0, ANIMSFX_DATA(ANIMSFX_TYPE_RUNNING, 84) },
+ { 0, ANIMSFX_DATA(ANIMSFX_TYPE_RUNNING, 90) },
+ { 0, -ANIMSFX_DATA(ANIMSFX_TYPE_RUNNING, 96) },
+#else
{ NA_SE_PL_LAND + SURFACE_SFX_OFFSET_WOOD, ANIMSFX_DATA(ANIMSFX_TYPE_GENERAL, 67) },
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_UNKNOWN, 84) },
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_UNKNOWN, 90) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_UNKNOWN, 96) },
+#endif
};
void func_80852048(PlayState* play, Player* this, CsCmdActorCue* cue) {
@@ -15102,7 +15713,7 @@ void func_80852048(PlayState* play, Player* this, CsCmdActorCue* cue) {
void func_80852080(PlayState* play, Player* this, CsCmdActorCue* cue) {
Player_AnimReplacePlayOnceAdjusted(play, this, &gPlayerAnim_clink_demo_futtobi,
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
- ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS |
+ ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_OVERRIDE_MOVEMENT);
Player_PlayVoiceSfx(this, NA_SE_VO_LI_FALL_L);
}
@@ -15151,8 +15762,8 @@ void func_80852234(PlayState* play, Player* this, CsCmdActorCue* cue) {
}
void func_8085225C(PlayState* play, Player* this, CsCmdActorCue* cue) {
- Player_AnimReplaceApplyFlags(
- play, this, ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
+ Player_StartAnimMovement(play, this,
+ ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
}
void func_80852280(PlayState* play, Player* this, CsCmdActorCue* cue) {
@@ -15165,7 +15776,7 @@ void func_80852298(PlayState* play, Player* this, CsCmdActorCue* cue) {
this->av2.actionVar2 = 1;
} else if (this->av2.actionVar2 == 0) {
if (LinkAnimation_OnFrame(&this->skelAnime, 10.0f)) {
- func_80846720(play, this, 1);
+ Player_PutSwordInHand(play, this, true);
}
}
}
@@ -15179,6 +15790,7 @@ void func_80852328(PlayState* play, Player* this, CsCmdActorCue* cue) {
func_80851F14(play, this, &gPlayerAnim_link_demo_furimuki2_wait, D_808551E0);
}
+#if OOT_VERSION >= PAL_1_0
static AnimSfxEntry D_808551E8[] = {
{ 0, ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 15) },
{ 0, -ANIMSFX_DATA(ANIMSFX_TYPE_WALKING, 35) },
@@ -15187,6 +15799,7 @@ static AnimSfxEntry D_808551E8[] = {
void func_80852358(PlayState* play, Player* this, CsCmdActorCue* cue) {
func_80851F14(play, this, &gPlayerAnim_link_demo_nozokikomi_wait, D_808551E8);
}
+#endif
void func_80852388(PlayState* play, Player* this, CsCmdActorCue* cue) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
@@ -15265,7 +15878,7 @@ void func_808525C0(PlayState* play, Player* this, CsCmdActorCue* cue) {
}
void func_80852608(PlayState* play, Player* this, CsCmdActorCue* cue) {
- func_80846720(play, this, 0);
+ Player_PutSwordInHand(play, this, false);
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_demo_return_to_past);
}
@@ -15325,7 +15938,7 @@ void func_8085283C(PlayState* play, Player* this, CsCmdActorCue* cue) {
func_80852944(play, this, cue);
} else if (this->av2.actionVar2 == 0) {
Item_Give(play, ITEM_SWORD_MASTER);
- func_80846720(play, this, 0);
+ Player_PutSwordInHand(play, this, false);
} else {
func_8084E988(this);
}
@@ -15337,7 +15950,7 @@ void func_808528C8(PlayState* play, Player* this, CsCmdActorCue* cue) {
}
if (this->heldItemAction != PLAYER_IA_SWORD_MASTER) {
- func_80846720(play, this, 1);
+ Player_PutSwordInHand(play, this, true);
}
}
@@ -15347,8 +15960,8 @@ void func_80852944(PlayState* play, Player* this, CsCmdActorCue* cue) {
func_80832340(play, this);
} else {
func_8083C148(this, play);
- if (!Player_ActionChange_4(this, play)) {
- Player_ActionChange_2(this, play);
+ if (!Player_ActionHandler_Talk(this, play)) {
+ Player_ActionHandler_2(this, play);
}
}
@@ -15379,7 +15992,7 @@ void func_80852A54(PlayState* play, Player* this, CsCmdActorCue* cue) {
func_808529D0(play, this, cue);
}
- this->skelAnime.moveFlags = 0;
+ this->skelAnime.movementFlags = 0;
Player_ZeroRootLimbYaw(this);
}
@@ -15391,7 +16004,7 @@ void func_80852B4C(PlayState* play, Player* this, CsCmdActorCue* cue, struct_808
}
if ((D_80858AA0 & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT) &&
- !(this->skelAnime.moveFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT)) {
+ !(this->skelAnime.movementFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT)) {
this->skelAnime.morphTable[0].y /= this->ageProperties->unk_08;
D_80858AA0 = 0;
}
@@ -15416,7 +16029,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) {
}
if (cue == NULL) {
- this->actor.flags &= ~ACTOR_FLAG_6;
+ this->actor.flags &= ~ACTOR_FLAG_INSIDE_CULLING_VOLUME;
} else {
s32 csAction;
@@ -15431,9 +16044,9 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) {
}
}
- D_80858AA0 = this->skelAnime.moveFlags;
+ D_80858AA0 = this->skelAnime.movementFlags;
- func_80832DBC(this);
+ Player_FinishAnimMovement(this);
PRINTF("TOOL MODE=%d\n", csAction);
func_80852C0C(play, this, ABS(csAction));
func_80852B4C(play, this, cue, &D_80854B18[ABS(csAction)]);
@@ -15450,9 +16063,9 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) {
void Player_Action_CsAction(Player* this, PlayState* play) {
if (this->csAction != this->prevCsAction) {
- D_80858AA0 = this->skelAnime.moveFlags;
+ D_80858AA0 = this->skelAnime.movementFlags;
- func_80832DBC(this);
+ Player_FinishAnimMovement(this);
this->prevCsAction = this->csAction;
PRINTF("DEMO MODE=%d\n", this->csAction);
func_80852C0C(play, this, this->csAction);
@@ -15515,8 +16128,8 @@ s32 Player_TryCsAction(PlayState* play, Actor* actor, s32 csAction) {
}
void func_80853080(Player* this, PlayState* play) {
- Player_SetupAction(play, this, Player_Action_80840BC8, 1);
- Player_AnimChangeOnceMorph(play, this, func_80833338(this));
+ Player_SetupAction(play, this, Player_Action_Idle, 1);
+ Player_AnimChangeOnceMorph(play, this, Player_GetIdleAnim(this));
this->yaw = this->actor.shape.rot.y;
}
@@ -15531,13 +16144,18 @@ s32 Player_InflictDamage(PlayState* play, s32 damage) {
return 0;
}
-// Start talking with the given actor
-void func_80853148(PlayState* play, Actor* actor) {
+/**
+ * Start talking to the specified actor.
+ *
+ * This function does not concern trading exchange items.
+ * For item exchanges see relevant code in `Player_ActionChange_13` and `Player_Action_ExchangeItem`.
+ */
+void Player_StartTalking(PlayState* play, Actor* actor) {
Player* this = GET_PLAYER(play);
s32 pad;
if ((this->talkActor != NULL) || (actor == this->naviActor) ||
- CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_18)) {
+ ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP)) {
actor->flags |= ACTOR_FLAG_TALK;
}
@@ -15545,6 +16163,8 @@ void func_80853148(PlayState* play, Actor* actor) {
this->exchangeItemId = EXCH_ITEM_NONE;
if (actor->textId == 0xFFFF) {
+ // Player will stand and look at the actor with no text appearing.
+ // This can be used to delay text from appearing, for example.
Player_SetCsActionWithHaltedActors(play, actor, PLAYER_CSACTION_1);
actor->flags |= ACTOR_FLAG_TALK;
Player_PutAwayHeldItem(play, this);
@@ -15560,39 +16180,39 @@ void func_80853148(PlayState* play, Actor* actor) {
s32 sp24 = this->av2.actionVar2;
Player_PutAwayHeldItem(play, this);
- func_8083A2F8(play, this);
+ Player_SetupTalk(play, this);
this->av2.actionVar2 = sp24;
} else {
if (func_808332B8(this)) {
- Player_SetupWaitForPutAway(play, this, func_8083A2F8);
+ Player_SetupWaitForPutAway(play, this, Player_SetupTalk);
Player_AnimChangeLoopSlowMorph(play, this, &gPlayerAnim_link_swimer_swim_wait);
} else if ((actor->category != ACTORCAT_NPC) || (this->heldItemAction == PLAYER_IA_FISHING_POLE)) {
- func_8083A2F8(play, this);
+ Player_SetupTalk(play, this);
if (!Player_CheckHostileLockOn(this)) {
if ((actor != this->naviActor) && (actor->xzDistToPlayer < 40.0f)) {
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_normal_backspace);
} else {
- Player_AnimPlayLoop(play, this, func_80833338(this));
+ Player_AnimPlayLoop(play, this, Player_GetIdleAnim(this));
}
}
} else {
- Player_SetupWaitForPutAway(play, this, func_8083A2F8);
+ Player_SetupWaitForPutAway(play, this, Player_SetupTalk);
Player_AnimPlayOnceAdjusted(play, this,
(actor->xzDistToPlayer < 40.0f) ? &gPlayerAnim_link_normal_backspace
: &gPlayerAnim_link_normal_talk_free);
}
if (this->skelAnime.animation == &gPlayerAnim_link_normal_backspace) {
- Player_AnimReplaceApplyFlags(
- play, this, ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS);
+ Player_StartAnimMovement(
+ play, this, ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS);
}
func_80832224(this);
}
- this->stateFlags1 |= PLAYER_STATE1_6 | PLAYER_STATE1_29;
+ this->stateFlags1 |= PLAYER_STATE1_TALKING | PLAYER_STATE1_29;
}
if ((this->naviActor == this->talkActor) && ((this->talkActor->textId & 0xFF00) != 0x200)) {
diff --git a/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c b/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c
index f107473306..9ff1bd5a96 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.c
@@ -5,6 +5,15 @@
*/
#include "z_eff_ss_blast.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rInnerColorR regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.h b/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.h
index b38f343e8e..bfceec5856 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.h
@@ -2,7 +2,8 @@
#define Z_EFF_SS_BLAST_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsBlastParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c b/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c
index 4fd99e3626..2ab88a16b1 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.c
@@ -5,6 +5,18 @@
*/
#include "z_eff_ss_bomb.h"
+
+#include "libc64/qrand.h"
+#include "array_count.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define EFFSSBOMB_LIFESPAN 20
@@ -67,7 +79,7 @@ void EffectSsBomb_Draw(PlayState* play, u32 index, EffectSs* this) {
SkinMatrix_MtxFMtxFMult(&mfTrans, &play->billboardMtxF, &mfTransBillboard);
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfScale, &mfResult);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.h b/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.h
index 5d42b118c8..923739819b 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_BOMB_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsBombInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c
index e848dd47b8..4ec61bc8ea 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.c
@@ -5,6 +5,16 @@
*/
#include "z_eff_ss_bomb2.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.h b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.h
index 249a2a6507..8aea4d3cc5 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_BOMB2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsBomb2InitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.c b/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.c
index be7d160712..f23d0a9aab 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.c
@@ -5,6 +5,16 @@
*/
#include "z_eff_ss_bubble.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.h b/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.h
index 3c3c8f80df..7701365bdc 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_BUBBLE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsBubbleInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.c b/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.c
index 5b178002d1..c32349e1fa 100644
--- a/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.c
+++ b/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.c
@@ -5,6 +5,14 @@
*/
#include "z_eff_ss_d_fire.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/object_dodongo/object_dodongo.h"
#define rScale regs[0]
@@ -79,7 +87,7 @@ void EffectSsDFire_Draw(PlayState* play, u32 index, EffectSs* this) {
OPEN_DISPS(gfxCtx, "../z_eff_ss_d_fire.c", 276);
if (Object_GetSlot(&play->objectCtx, OBJECT_DODONGO) >= 0) {
- gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
+ gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
scale = this->rScale / 100.0f;
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
@@ -95,7 +103,7 @@ void EffectSsDFire_Draw(PlayState* play, u32 index, EffectSs* this) {
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB,
this->rPrimColorA);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
+ gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIndex]));
gSPDisplayList(POLY_XLU_DISP++, this->gfx);
}
diff --git a/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.h b/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.h
index c59c9add92..fbaa8aa28c 100644
--- a/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.h
+++ b/src/overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_D_FIRE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsDFireInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c b/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c
index 56b7b4db36..e8b904a4b6 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.c
@@ -5,6 +5,15 @@
*/
#include "z_eff_ss_dead_db.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sfx.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.h b/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.h
index 0ea6bd0fda..fb7fc84af1 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.h
@@ -2,7 +2,8 @@
#define Z_EFF_SS_DEAD_DB_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsDeadDbInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c b/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c
index ac0df1b437..cb6d76eeb3 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c
@@ -5,6 +5,16 @@
*/
#include "z_eff_ss_dead_dd.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "translation.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
@@ -83,7 +93,7 @@ u32 EffectSsDeadDd_Init(PlayState* play, u32 index, EffectSs* this, void* initPa
this->accel.z = this->velocity.z = (Rand_ZeroOne() - 0.5f) * 2.0f;
}
} else {
- PRINTF("Effect_SS_Dd_disp_mode():mode_swが変です。\n");
+ PRINTF(T("Effect_SS_Dd_disp_mode():mode_swが変です。\n", "Effect_SS_Dd_disp_mode():mode_sw is strange.\n"));
return 0;
}
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.h b/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.h
index 80d46899e7..c9c91ec609 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.h
@@ -2,7 +2,8 @@
#define Z_EFF_SS_DEAD_DD_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsDeadDdInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.c b/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.c
index 9d9c695d88..4d649d4be4 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.c
@@ -5,6 +5,13 @@
*/
#include "z_eff_ss_dead_ds.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.h b/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.h
index 3714bf41ba..7a7d57363a 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_DEAD_DS_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsDeadDsInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.c b/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.c
index b1c92ec972..58daefa387 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.c
@@ -5,6 +5,11 @@
*/
#include "z_eff_ss_dead_sound.h"
+#include "printf.h"
+#include "sfx.h"
+#include "translation.h"
+#include "z64effect.h"
+#include "z64play.h"
#define rSfxId regs[10]
#define rRepeatMode regs[11] // sound is replayed every update. unused in the original game
@@ -29,7 +34,7 @@ u32 EffectSsDeadSound_Init(PlayState* play, u32 index, EffectSs* this, void* ini
this->update = EffectSsDeadSound_Update;
this->rRepeatMode = initParams->repeatMode;
this->rSfxId = initParams->sfxId;
- PRINTF("コンストラクター3\n"); // "constructor 3"
+ PRINTF(T("コンストラクター3\n", "Constructor 3\n"));
return 1;
}
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h b/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h
index cdb20f640b..1f8ca9304c 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_DEAD_SOUND_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsDeadSoundInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.c b/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.c
index 07335e2488..2f5901ca2e 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.c
@@ -5,6 +5,16 @@
*/
#include "z_eff_ss_dt_bubble.h"
+
+#include "libc64/qrand.h"
+#include "color.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.h b/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.h
index cac4c1a08c..6138c86046 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.h
@@ -2,7 +2,8 @@
#define Z_EFF_SS_DT_BUBBLE_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsDtBubbleInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c b/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c
index cdb56fc74e..899e9f2a2d 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.c
@@ -5,6 +5,17 @@
*/
#include "z_eff_ss_dust.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
@@ -96,7 +107,7 @@ void EffectSsDust_Draw(PlayState* play, u32 index, EffectSs* this) {
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
SkinMatrix_MtxFMtxFMult(&mfTrans, &play->billboardMtxF, &mfTransBillboard);
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfScale, &mfResult);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.h b/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.h
index 5cb686ae94..958bde91f8 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.h
@@ -2,7 +2,8 @@
#define Z_EFF_SS_DUST_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsDustInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c b/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c
index 73795ab2d4..56dc375337 100644
--- a/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c
+++ b/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c
@@ -5,6 +5,15 @@
*/
#include "z_eff_ss_en_fire.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rScaleMax regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.h b/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.h
index c511827ecf..14acb95e40 100644
--- a/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.h
+++ b/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.h
@@ -2,10 +2,10 @@
#define Z_EFF_SS_EN_FIRE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsEnFireInitParams {
- /* 0x00 */ Actor* actor;
+ /* 0x00 */ struct Actor* actor;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s16 scale;
/* 0x12 */ s16 unk_12;
diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c
index 5351e864ab..e1ed9e924f 100644
--- a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c
+++ b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c
@@ -5,6 +5,19 @@
*/
#include "z_eff_ss_en_ice.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rLifespan regs[0]
@@ -78,7 +91,8 @@ u32 EffectSsEnIce_Init(PlayState* play, u32 index, EffectSs* this, void* initPar
this->rEnvColorB = initParams->envColor.b;
this->rAlphaMode = 0;
} else {
- PRINTF("Effect_Ss_En_Ice_ct():pid->mode_swがエラーです。\n");
+ PRINTF(T("Effect_Ss_En_Ice_ct():pid->mode_swがエラーです。\n",
+ "Effect_Ss_En_Ice_ct():pid->mode_sw is an error.\n"));
return 0;
}
@@ -133,9 +147,9 @@ void EffectSsEnIce_Draw(PlayState* play, u32 index, EffectSs* this) {
}
void EffectSsEnIce_UpdateFlying(PlayState* play, u32 index, EffectSs* this) {
- s16 rand;
-
+#if OOT_VERSION >= NTSC_1_1
if ((this->actor != NULL) && (this->actor->update != NULL)) {
+#endif
if ((this->life >= 9) && (this->actor->colorFilterTimer != 0) && !(this->actor->colorFilterParams & 0xC000)) {
this->pos.x = this->actor->world.pos.x + this->vec.x;
this->pos.y = this->actor->world.pos.y + this->vec.y;
@@ -147,9 +161,11 @@ void EffectSsEnIce_UpdateFlying(PlayState* play, u32 index, EffectSs* this) {
this->accel.y = -1.5f;
this->velocity.y = 5.0f;
}
+#if OOT_VERSION >= NTSC_1_1
} else {
if (this->life >= 9) {
- rand = Rand_CenteredFloat(65535.0f);
+ s16 rand = Rand_CenteredFloat(65535.0f);
+
this->accel.x = Math_SinS(rand) * (Rand_ZeroOne() + 1.0f);
this->accel.z = Math_CosS(rand) * (Rand_ZeroOne() + 1.0f);
this->life = 8;
@@ -157,6 +173,7 @@ void EffectSsEnIce_UpdateFlying(PlayState* play, u32 index, EffectSs* this) {
this->velocity.y = 5.0f;
}
}
+#endif
}
void EffectSsEnIce_Update(PlayState* play, u32 index, EffectSs* this) {
diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.h b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.h
index 22929d39dd..238b005bcc 100644
--- a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.h
+++ b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.h
@@ -2,10 +2,11 @@
#define Z_EFF_SS_EN_ICE_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsEnIceInitParams {
- /* 0x00 */ Actor* actor;
+ /* 0x00 */ struct Actor* actor;
/* 0x04 */ Vec3f pos;
/* 0x10 */ f32 scale;
/* 0x14 */ Vec3f velocity;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c b/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c
index e3506295da..c5cee8db21 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c
@@ -5,6 +5,14 @@
*/
#include "z_eff_ss_extra.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_yabusame_point/object_yabusame_point.h"
#define rObjectSlot regs[0]
@@ -31,7 +39,7 @@ u32 EffectSsExtra_Init(PlayState* play, u32 index, EffectSs* this, void* initPar
if ((objectSlot >= 0) && Object_IsLoaded(&play->objectCtx, objectSlot)) {
uintptr_t oldSeg6 = gSegments[6];
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
this->pos = initParams->pos;
this->velocity = initParams->velocity;
this->accel = initParams->accel;
@@ -63,7 +71,7 @@ void EffectSsExtra_Draw(PlayState* play, u32 index, EffectSs* this) {
OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_extra.c", 168);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
+ gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h b/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h
index c8047d21fa..1bf5a5d30c 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_EXTRA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsExtraInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c b/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c
index 6b07df0582..9f00f52e30 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c
@@ -5,6 +5,14 @@
*/
#include "z_eff_ss_fcircle.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rUnused regs[3] // probably supposed to be an alpha
diff --git a/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.h b/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.h
index 2e3eb74184..fc2a4ec2de 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.h
@@ -2,10 +2,10 @@
#define Z_EFF_SS_FCIRCLE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsFcircleInitParams {
- /* 0x00 */ Actor* actor;
+ /* 0x00 */ struct Actor* actor;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s16 radius;
/* 0x12 */ s16 height;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c b/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c
index c4ab534692..a5b8a24d1b 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c
@@ -6,6 +6,20 @@
#include "z_eff_ss_fhg_flash.h"
#include "overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64skin.h"
+
#include "assets/objects/object_fhg/object_fhg.h"
#define rAlpha regs[0]
@@ -42,7 +56,7 @@ u32 EffectSsFhgFlash_Init(PlayState* play, u32 index, EffectSs* this, void* init
if ((objectSlot >= 0) && Object_IsLoaded(&play->objectCtx, objectSlot)) {
prevSeg6 = gSegments[6];
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
this->rObjectSlot = objectSlot;
this->pos = initParams->pos;
this->velocity = initParams->velocity;
@@ -56,7 +70,7 @@ u32 EffectSsFhgFlash_Init(PlayState* play, u32 index, EffectSs* this, void* init
this->gfx = SEGMENTED_TO_VIRTUAL(gPhantomEnergyBallDL);
gSegments[6] = prevSeg6;
} else {
- PRINTF("Effect_Ss_Fhg_Flash_ct():pffd->modeエラー\n");
+ PRINTF(T("Effect_Ss_Fhg_Flash_ct():pffd->modeエラー\n", "Effect_Ss_Fhg_Flash_ct():pffd->mode error\n"));
return 0;
}
} else {
@@ -98,7 +112,7 @@ void EffectSsFhgFlash_DrawLightBall(PlayState* play, u32 index, EffectSs* this)
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
+ gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, this->rAlpha);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h b/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h
index be8d70bccd..f3c1ea6168 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h
@@ -2,7 +2,9 @@
#define Z_EFF_SS_FHGFLASH_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
+
+struct Actor;
typedef struct EffectSsFhgFlashInitParams {
/* 0x00 */ Vec3f pos;
@@ -10,7 +12,7 @@ typedef struct EffectSsFhgFlashInitParams {
/* 0x18 */ Vec3f accel;
/* 0x24 */ s16 scale;
/* 0x26 */ u8 param;
- /* 0x28 */ Actor* actor;
+ /* 0x28 */ struct Actor* actor;
/* 0x2C */ u8 type;
} EffectSsFhgFlashInitParams; // size = 0x30
diff --git a/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c b/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c
index 089c7f73eb..de4ae887bb 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c
@@ -5,6 +5,15 @@
*/
#include "z_eff_ss_fire_tail.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.h b/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.h
index 70f5df7e19..ebe8a7203d 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.h
@@ -2,10 +2,11 @@
#define Z_EFF_SS_FIRE_TAIL_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsFireTailInitParams {
- /* 0x00 */ Actor* actor;
+ /* 0x00 */ struct Actor* actor;
/* 0x04 */ Vec3f pos;
/* 0x10 */ f32 scale;
/* 0x14 */ Vec3f unk_14;
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.c b/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.c
index 351fadab7c..05e4a3d8bf 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.c
@@ -5,6 +5,11 @@
*/
#include "z_eff_ss_g_fire.h"
+
+#include "segmented_address.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
u32 EffectSsGFire_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.h b/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.h
index cfb5dcfafb..52312527d9 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.h
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_G_FIRE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsGFireInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.c b/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.c
index f93bb0e7d6..9610917043 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.c
@@ -5,6 +5,12 @@
*/
#include "z_eff_ss_g_magma.h"
+
+#include "libc64/qrand.h"
+#include "segmented_address.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
u32 EffectSsGMagma_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.h b/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.h
index ab1b97a1de..55215239d2 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.h
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_G_MAGMA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsGMagmaInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.c b/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.c
index 11fc08606b..316f65258a 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.c
@@ -5,6 +5,14 @@
*/
#include "z_eff_ss_g_magma2.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_kingdodongo/object_kingdodongo.h"
#define rPrimColorR regs[0]
@@ -45,7 +53,7 @@ u32 EffectSsGMagma2_Init(PlayState* play, u32 index, EffectSs* this, void* initP
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
EffectSsGMagma2InitParams* initParams = (EffectSsGMagma2InitParams*)initParamsx;
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
this->rObjectSlot = objectSlot;
this->pos = initParams->pos;
this->velocity = zeroVec;
@@ -84,7 +92,7 @@ void EffectSsGMagma2_Draw(PlayState* play, u32 index, EffectSs* this) {
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
+ gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
MATRIX_FINALIZE_AND_LOAD(POLY_XLU_DISP++, gfxCtx, "../z_eff_ss_g_magma2.c", 282);
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.h b/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.h
index 715e01e7db..2ddc9f4ce7 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.h
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.h
@@ -2,7 +2,8 @@
#define Z_EFF_SS_G_MAGMA2_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsGMagma2InitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c b/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c
index 48a2eec4f0..2c83108d35 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.c
@@ -5,6 +5,15 @@
*/
#include "z_eff_ss_g_ripple.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rWaterBoxNum regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.h b/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.h
index 63487ee0ca..86a7d8378e 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.h
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_G_RIPPLE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsGRippleInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c
index f43f4f3a52..a5472c29fa 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c
@@ -5,6 +5,16 @@
*/
#include "z_eff_ss_g_spk.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.h b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.h
index 8627bc0528..0d94bd7e0a 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.h
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.h
@@ -2,10 +2,11 @@
#define Z_EFF_SS_G_SPK_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsGSpkInitParams {
- /* 0x00 */ Actor* actor;
+ /* 0x00 */ struct Actor* actor;
/* 0x04 */ Vec3f pos;
/* 0x10 */ Vec3f velocity;
/* 0x1C */ Vec3f accel;
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.c b/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.c
index 4e7c26308c..3baab32db9 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.c
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.c
@@ -5,6 +5,11 @@
*/
#include "z_eff_ss_g_splash.h"
+
+#include "segmented_address.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
//! @bug the reuse of regs[11] means that EffectSs_DrawGEffect will treat the type as an object slot (`rgObjectSlot`)
diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.h b/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.h
index c13e19cd1c..fa1907f667 100644
--- a/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.h
+++ b/src/overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.h
@@ -2,7 +2,8 @@
#define Z_EFF_SS_G_SPLASH_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsGSplashInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c
index 9b27081773..e084b5f1f6 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c
@@ -5,6 +5,16 @@
*/
#include "z_eff_ss_hahen.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rPitch regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h
index 1385bee8c8..d598cebf5d 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_HAHEN_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsHahenInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c b/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c
index 8a67d26faf..9be42db8d9 100644
--- a/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c
+++ b/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c
@@ -5,6 +5,15 @@
*/
#include "z_eff_ss_hitmark.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rTexIndex regs[0]
@@ -86,7 +95,7 @@ void EffectSsHitMark_Draw(PlayState* play, u32 index, EffectSs* this) {
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
SkinMatrix_MtxFMtxFMult(&mfTrans, &play->billboardMtxF, &mfTransBillboard);
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfScale, &mfResult);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
diff --git a/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h b/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h
index 6859910455..591ba5a7d0 100644
--- a/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h
+++ b/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_HITMARK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsHitMarkInitParams {
/* 0x00 */ s32 type;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c b/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c
index 7f0fc02fa1..9ce9885de3 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c
@@ -5,6 +5,15 @@
*/
#include "z_eff_ss_ice_piece.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "sys_math.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rLifespan regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.h b/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.h
index f7b376a7ad..afb96c213c 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_ICE_PIECE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsIcePieceInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c b/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c
index 9997240be7..9e2757049d 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.c
@@ -5,6 +5,17 @@
*/
#include "z_eff_ss_ice_smoke.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/object_fz/object_fz.h"
#define rObjectSlot regs[0]
@@ -30,7 +41,7 @@ u32 EffectSsIceSmoke_Init(PlayState* play, u32 index, EffectSs* this, void* init
if ((objectSlot >= 0) && Object_IsLoaded(&play->objectCtx, objectSlot)) {
uintptr_t prevSeg6 = gSegments[6];
- gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
+ gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
Math_Vec3f_Copy(&this->pos, &initParams->pos);
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
Math_Vec3f_Copy(&this->accel, &initParams->accel);
@@ -45,7 +56,8 @@ u32 EffectSsIceSmoke_Init(PlayState* play, u32 index, EffectSs* this, void* init
return 1;
}
- PRINTF("Effect_SS_Ice_Smoke_ct():バンク Object_Bank_Fzが有りません。\n");
+ PRINTF(T("Effect_SS_Ice_Smoke_ct():バンク Object_Bank_Fzが有りません。\n",
+ "Effect_SS_Ice_Smoke_ct(): Bank Object_Bank_Fz does not exist.\n"));
return 0;
}
@@ -66,7 +78,7 @@ void EffectSsIceSmoke_Draw(PlayState* play, u32 index, EffectSs* this) {
if ((objectSlot >= 0) && Object_IsLoaded(&play2->objectCtx, objectSlot)) {
gDPPipeSync(POLY_XLU_DISP++);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- gSegments[6] = VIRTUAL_TO_PHYSICAL(objectPtr);
+ gSegments[6] = OS_K0_TO_PHYSICAL(objectPtr);
gSPSegment(POLY_XLU_DISP++, 0x06, objectPtr);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gFreezardSteamStartDL));
gDPPipeSync(POLY_XLU_DISP++);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.h b/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.h
index 64833be518..24c27f1cf6 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_ICE_SMOKE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsIceSmokeInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c b/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c
index 10a3b668ab..12d9c5a5eb 100644
--- a/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c
+++ b/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.c
@@ -5,6 +5,14 @@
*/
#include "z_eff_ss_k_fire.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rAlpha regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.h b/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.h
index 1896b47a73..eb8e8764d7 100644
--- a/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.h
+++ b/src/overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_K_FIRE_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsKFireInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c b/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c
index 27d536e1d0..b0ba95adae 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c
@@ -6,6 +6,19 @@
#include "z_eff_ss_kakera.h"
+#include "libc64/qrand.h"
+#include "libu64/debug.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "line_numbers.h"
+#include "printf.h"
+#include "sys_matrix.h"
+#include "translation.h"
+#include "versions.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#define rReg0 regs[0]
#define rGravity regs[1]
#define rPitch regs[2]
@@ -53,8 +66,8 @@ u32 EffectSsKakera_Init(PlayState* play, u32 index, EffectSs* this, void* initPa
}
} else {
- PRINTF("shape_modelがNULL\n");
- LogUtils_HungupThread("../z_eff_kakera.c", 178);
+ PRINTF(T("shape_modelがNULL\n", "shape_model is NULL\n"));
+ LogUtils_HungupThread("../z_eff_kakera.c", LN1(175, 178));
}
this->draw = EffectSsKakera_Draw;
@@ -78,9 +91,10 @@ u32 EffectSsKakera_Init(PlayState* play, u32 index, EffectSs* this, void* initPa
f32 func_809A9818(f32 arg0, f32 arg1) {
f32 temp_f2;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (arg1 < 0.0f) {
- PRINTF("範囲がマイナス!!(randomD_sectionUniformity)\n");
+ PRINTF(T("範囲がマイナス!!(randomD_sectionUniformity)\n",
+ "The range is negative!! (randomD_sectionUniformity)\n"));
}
#endif
diff --git a/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h b/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h
index bd55d5c3c5..90f3a8cdab 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_KAKERA_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsKakeraInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.c b/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.c
index 5973ca9e1e..f7c22aaa19 100644
--- a/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.c
+++ b/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.c
@@ -5,6 +5,18 @@
*/
#include "z_eff_ss_kirakira.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "rand.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rRotSpeed regs[0]
@@ -97,7 +109,7 @@ void EffectSsKiraKira_Draw(PlayState* play, u32 index, EffectSs* this) {
SkinMatrix_MtxFMtxFMult(&mfTrans, &play->billboardMtxF, &mfTransBillboard);
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfRotY, &mfTransBillboardRotY);
SkinMatrix_MtxFMtxFMult(&mfTransBillboardRotY, &mfScale, &mfResult);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
diff --git a/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.h b/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.h
index 7f8c18da3e..0c128ff7ab 100644
--- a/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.h
+++ b/src/overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.h
@@ -2,7 +2,8 @@
#define Z_EFF_SS_KIRAKIRA_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsKiraKiraInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c b/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c
index 0e2560e34f..f44ac38496 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.c
@@ -5,6 +5,17 @@
*/
#include "z_eff_ss_lightning.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
@@ -100,7 +111,7 @@ void EffectSsLightning_Draw(PlayState* play, u32 index, EffectSs* this) {
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfRotate, &mfTransBillboardRotate);
SkinMatrix_MtxFMtxFMult(&mfTransBillboardRotate, &mfScale, &mfResult);
- gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.h b/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.h
index ad352e9013..39f5d51841 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.h
@@ -2,7 +2,8 @@
#define Z_EFF_SS_LIGHTNING_H
#include "ultra64.h"
-#include "global.h"
+#include "color.h"
+#include "z64math.h"
typedef struct EffectSsLightningInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.c b/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.c
index f707251cba..1dadd7f069 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.c
@@ -5,6 +5,18 @@
*/
#include "z_eff_ss_sibuki.h"
+
+#include "libc64/qrand.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.h b/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.h
index 18aaf0d200..e45c2c6f2a 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_SIBUKI_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsSibukiInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c b/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c
index e85a53e890..8566be1623 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.c
@@ -5,6 +5,14 @@
*/
#include "z_eff_ss_sibuki2.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.h b/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.h
index 7fb20d8b33..37a9425dc7 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_SIBUKI2_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsSibuki2InitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.c b/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.c
index ed1d5edccf..2277a71d85 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.c
@@ -6,6 +6,11 @@
#include "z_eff_ss_solder_srch_ball.h"
+#include "z64bgcheck.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+
#define rUnused regs[1]
u32 EffectSsSolderSrchBall_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.h b/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.h
index 70aa558b65..b105f063d5 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_SOLDERSRCHBALL_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsSolderSrchBallInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.c b/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.c
index ba327e465a..520f8af02a 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.c
@@ -5,6 +5,16 @@
*/
#include "z_eff_ss_stick.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "sys_matrix.h"
+#include "z_lib.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/objects/object_link_boy/object_link_boy.h"
#include "assets/objects/object_link_child/object_link_child.h"
diff --git a/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.h b/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.h
index 8e01aeb003..4b5ccda965 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_STICK_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsStickInitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c b/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c
index e1083373b8..5ecd83add1 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.c
@@ -5,6 +5,17 @@
*/
#include "z_eff_ss_stone1.h"
+
+#include "color.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "regs.h"
+#include "segmented_address.h"
+#include "sys_matrix.h"
+#include "z64effect.h"
+#include "z64play.h"
+#include "z64skin_matrix.h"
+
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#define rReg0 regs[0]
diff --git a/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h b/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h
index d329161277..efb8df225d 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h
@@ -2,7 +2,7 @@
#define Z_EFF_SS_STONE1_H
#include "ultra64.h"
-#include "global.h"
+#include "z64math.h"
typedef struct EffectSsStone1InitParams {
/* 0x00 */ Vec3f pos;
diff --git a/src/overlays/gamestates/ovl_file_choose/file_select.h b/src/overlays/gamestates/ovl_file_choose/file_select.h
index 1bf1d79fb0..69d71f71d5 100644
--- a/src/overlays/gamestates/ovl_file_choose/file_select.h
+++ b/src/overlays/gamestates/ovl_file_choose/file_select.h
@@ -1,9 +1,11 @@
#ifndef FILE_SELECT_H
#define FILE_SELECT_H
-#include "libc/stddef.h"
+#include "stddef.h"
#include "ultra64.h"
-#include "global.h"
+#include "gfx.h"
+#include "versions.h"
+#include "z64game.h"
#define GET_NEWF(sramCtx, slotNum, index) (sramCtx->readBuff[gSramSlotOffsets[slotNum] + offsetof(SaveContext, save.info.playerData.newf[index])])
@@ -16,7 +18,7 @@
(GET_NEWF(sramCtx, slotNum, 4) == 'A') || \
(GET_NEWF(sramCtx, slotNum, 5) == 'Z'))
-// Init mode: Initial setup as the file select is starting up, fades and slides in various menu elements
+// Init mode: Loads saves from SRAM, handles initial language selection in PAL N64 versions
// Config mode: Handles the bulk of the file select, various configuration tasks like picking a file, copy/erase, and the options menu
// Select mode: Displays the selected file with various details about it, and allows the player to confirm and open it
typedef enum MenuMode {
@@ -139,21 +141,20 @@ typedef enum ConfirmButtonIndex {
typedef enum ActionButtonIndex {
/* 0 */ FS_BTN_ACTION_COPY,
- /* 1 */ FS_BTN_ACTION_ERASE
+ /* 1 */ FS_BTN_ACTION_ERASE,
+ /* 2 */ FS_BTN_ACTION_YES,
+ /* 3 */ FS_BTN_ACTION_QUIT
} ActionButtonIndex;
typedef enum SettingIndex {
/* 0 */ FS_SETTING_AUDIO,
- /* 1 */ FS_SETTING_TARGET
+ /* 1 */ FS_SETTING_TARGET,
+#if OOT_PAL_N64
+ /* 2 */ FS_SETTING_LANGUAGE,
+#endif
+ /* */ FS_SETTING_MAX
} SettingIndex;
-typedef enum AudioOption {
- /* 0 */ FS_AUDIO_STEREO,
- /* 1 */ FS_AUDIO_MONO,
- /* 2 */ FS_AUDIO_HEADSET,
- /* 3 */ FS_AUDIO_SURROUND
-} AudioOption;
-
typedef enum CharPage {
/* 0 */ FS_CHAR_PAGE_HIRA,
/* 1 */ FS_CHAR_PAGE_KATA,
@@ -220,4 +221,8 @@ void FileSelect_DrawOptions(GameState* thisx);
void FileSelect_DrawNameEntry(GameState* thisx);
void FileSelect_DrawCharacter(GraphicsContext* gfxCtx, void* texture, s16 vtx);
+#if OOT_VERSION == PAL_1_1
+extern s16 D_808124C0[];
+#endif
+
#endif
diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c
index ac727a2970..e8934c3731 100644
--- a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c
+++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c
@@ -1,11 +1,82 @@
#include "file_select.h"
-#include "terminal.h"
-#include "versions.h"
-#include "assets/textures/title_static/title_static.h"
-#include "assets/textures/parameter_static/parameter_static.h"
+#include "file_select_state.h"
+
+#include "attributes.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "language_array.h"
+#include "letterbox.h"
+#include "main.h"
+#include "map_select_state.h"
+#include "memory_utils.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "printf.h"
+#include "regs.h"
+#include "rumble.h"
+#include "segment_symbols.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "versions.h"
+#include "z_lib.h"
+#include "z64audio.h"
+#include "z64environment.h"
+#include "z64play.h"
+#include "z64save.h"
+#include "z64skybox.h"
+#include "z64sram.h"
+#include "z64ss_sram.h"
+#include "z64view.h"
+
+#if OOT_PAL_N64
+#include "assets/objects/object_mag/object_mag.h"
+#endif
+#include "assets/textures/title_static/title_static.h"
+#include "assets/textures/parameter_static/parameter_static.h"
+
+#if OOT_PAL_N64
+static s32 sInitialLanguageAlphaAsInt = 100;
+static f32 sInitialLanguageAlphaStep = 8.0f;
+static f32 sInitialLanguageAlpha = 100.0f;
+
+static s16 sInitialLanguageStickAdjX;
+static s16 sInitialLanguageStickXDir;
+static s16 sInitialLanguageInputTimerX;
+
+typedef struct InitialLanguageTextureInfo {
+ /* 0x00 */ void* texture;
+ /* 0x04 */ u16 width;
+ /* 0x06 */ u16 height;
+ /* 0x08 */ u32 x1;
+ /* 0x0C */ u32 y1;
+ /* 0x10 */ u32 x2;
+ /* 0x14 */ u32 y2;
+} InitialLanguageTextureInfo; // size = 0x18
+
+static InitialLanguageTextureInfo sInitialLanguageTextures[] = {
+ { gFileSelInitialLanguageChoiceENGTex, 80, 32, 40, 70, 120, 102 },
+ { gFileSelInitialLanguageChoiceGERTex, 80, 32, 120, 70, 200, 102 },
+ { gFileSelInitialLanguageChoiceFRATex, 80, 32, 200, 70, 280, 102 },
+};
+
+typedef struct InitialLanguageCursorInfo {
+ /* 0x00 */ u32 x1;
+ /* 0x04 */ u32 y1;
+ /* 0x08 */ u32 x2;
+ /* 0x0C */ u32 y2;
+} InitialLanguageCursorInfo; // size = 0x10
+
+static InitialLanguageCursorInfo sInitialLanguageCursors[] = {
+ { 48, 52, 120, 124 },
+ { 128, 52, 200, 124 },
+ { 208, 52, 280, 124 },
+};
+#endif
static s16 sUnused = 106;
@@ -29,6 +100,233 @@ static s16 sWindowContentColors[2][3] = {
{ 100, 100, 100 }, // gray
};
+#if OOT_PAL_N64
+void FileSelect_UpdateInitialLanguageMenu(FileSelectState* this) {
+ SramContext* sramCtx = &this->sramCtx;
+ Input* input = &this->state.input[0];
+
+ if (gSaveContext.language >= LANGUAGE_MAX) {
+ gSaveContext.language = 0;
+ }
+
+ sInitialLanguageAlpha += sInitialLanguageAlphaStep;
+ if (sInitialLanguageAlphaStep < 0.0f) {
+ if (sInitialLanguageAlpha < 100.0f) {
+ sInitialLanguageAlpha = 100.0f;
+ sInitialLanguageAlphaStep *= -1.0f;
+ }
+ } else if (sInitialLanguageAlphaStep > 0.0f) {
+ if (sInitialLanguageAlpha > 255.0f) {
+ sInitialLanguageAlpha = 255.0f;
+ sInitialLanguageAlphaStep *= -1.0f;
+ }
+ }
+
+ sInitialLanguageAlphaAsInt = (s32)sInitialLanguageAlpha;
+ sInitialLanguageStickAdjX = (s16)input->rel.stick_x;
+ if (sInitialLanguageStickAdjX < -30) {
+ if (sInitialLanguageStickXDir == -1) {
+ sInitialLanguageInputTimerX -= 1;
+ if (sInitialLanguageInputTimerX < 0) {
+ sInitialLanguageInputTimerX = 2;
+ } else {
+ sInitialLanguageStickAdjX = 0;
+ }
+ } else {
+ sInitialLanguageInputTimerX = 10;
+ sInitialLanguageStickXDir = -1;
+ }
+ } else if (sInitialLanguageStickAdjX > 30) {
+ if (sInitialLanguageStickXDir == 1) {
+ sInitialLanguageInputTimerX -= 1;
+ if (sInitialLanguageInputTimerX < 0) {
+ sInitialLanguageInputTimerX = 2;
+ } else {
+ sInitialLanguageStickAdjX = 0;
+ }
+ } else {
+ sInitialLanguageInputTimerX = 10;
+ sInitialLanguageStickXDir = 1;
+ }
+ } else {
+ sInitialLanguageStickXDir = 0;
+ }
+
+ if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B) ||
+ CHECK_BTN_ALL(input->press.button, BTN_START)) {
+ Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
+ &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+ Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
+ &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+ sramCtx->readBuff[2] = gSaveContext.language;
+ Sram_WriteSramHeader(sramCtx);
+ this->configMode++;
+ return;
+ }
+
+ if (sInitialLanguageStickAdjX < -30) {
+ Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
+ &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+ gSaveContext.language--;
+ if (gSaveContext.language >= LANGUAGE_MAX) {
+ gSaveContext.language = LANGUAGE_MAX - 1;
+ }
+ } else if (sInitialLanguageStickAdjX > 30) {
+ Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
+ &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+ gSaveContext.language++;
+ if (gSaveContext.language >= LANGUAGE_MAX) {
+ gSaveContext.language = 0;
+ }
+ }
+}
+
+void FileSelect_DrawImageRGBA32(GraphicsContext* gfxCtx, s16 centerX, s16 centerY, u8* source, u32 width, u32 height) {
+ u8* curTexture;
+ s32 textureCount;
+ s32 rectLeft;
+ s32 rectTop;
+ u32 textureHeight;
+ s32 remainingSize;
+ s32 textureSize;
+ s32 pad;
+ s32 i;
+
+ OPEN_DISPS(gfxCtx, "../z_file_choose.c", UNK_LINE);
+
+ Gfx_SetupDL_56Opa(gfxCtx);
+
+ curTexture = source;
+ rectLeft = centerX - (width / 2);
+ rectTop = centerY - (height / 2);
+ remainingSize = (width * height) << 2;
+ textureHeight = 4096 / (width << 2);
+ textureSize = (width * textureHeight) << 2;
+ textureCount = remainingSize / textureSize;
+ if ((remainingSize % textureSize) != 0) {
+ textureCount++;
+ }
+
+ gDPSetTileCustom(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0, width - 1, textureHeight - 1, 0,
+ G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
+ G_TX_NOLOD);
+
+ remainingSize -= textureSize;
+
+ for (i = 0; i < textureCount; i++) {
+ gDPSetTextureImage(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, curTexture);
+
+ gDPLoadSync(POLY_OPA_DISP++);
+ gDPLoadTile(POLY_OPA_DISP++, G_TX_LOADTILE, 0, 0, (width - 1) << 2, (textureHeight - 1) << 2);
+
+ gSPTextureRectangle(POLY_OPA_DISP++, rectLeft << 2, rectTop << 2, (rectLeft + (s32)width) << 2,
+ (rectTop + textureHeight) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+
+ curTexture += textureSize;
+ rectTop += textureHeight;
+
+ if ((remainingSize - textureSize) < 0) {
+ if (remainingSize > 0) {
+ textureHeight = remainingSize / (s32)(width << 2);
+ remainingSize -= textureSize;
+
+ gDPSetTileCustom(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_32b, 0, 0, width - 1, textureHeight - 1, 0,
+ G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
+ G_TX_NOLOD, G_TX_NOLOD);
+ }
+ } else {
+ remainingSize -= textureSize;
+ }
+ }
+
+ CLOSE_DISPS(gfxCtx, "../z_file_choose.c", UNK_LINE);
+}
+
+void FileSelect_DrawInitialLanguageMenu(FileSelectState* this) {
+ u8* source;
+ s32 i;
+ s32 y1;
+ s32 y2;
+
+ OPEN_DISPS(this->state.gfxCtx, "../z_file_choose.c", UNK_LINE);
+
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 70 + WREG(0));
+ FileSelect_DrawImageRGBA32(this->state.gfxCtx, 160, 85 + WREG(1), (u8*)gTitleZeldaShieldLogoTex, 160, 160);
+
+ Gfx_SetupDL_39Opa(this->state.gfxCtx);
+
+ gDPSetAlphaCompare(POLY_OPA_DISP++, G_AC_NONE);
+ gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255);
+
+ gDPLoadTextureBlock(POLY_OPA_DISP++, gTitleCopyright1998Tex, G_IM_FMT_IA, G_IM_SIZ_8b, 128, 16, 0,
+ G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
+ G_TX_NOLOD);
+
+ gSPTextureRectangle(POLY_OPA_DISP++, 94 << 2, 198 << 2, 222 << 2, 214 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
+ 1 << 10);
+
+ Gfx_SetupDL_39Opa(this->state.gfxCtx);
+
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 100, 100, 255, sInitialLanguageAlphaAsInt);
+
+ gDPLoadTextureBlock_4b(POLY_OPA_DISP++, gFileSelInitialLanguageCursorTex, G_IM_FMT_I, 48, 48, 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);
+
+ gSPTextureRectangle(POLY_OPA_DISP++, (sInitialLanguageCursors[gSaveContext.language].x1 + GREG(1)) << 2,
+ (sInitialLanguageCursors[gSaveContext.language].y1 + GREG(2)) << 2,
+ (sInitialLanguageCursors[gSaveContext.language].x2 + GREG(1)) << 2,
+ (sInitialLanguageCursors[gSaveContext.language].y2 + GREG(2)) << 2, G_TX_RENDERTILE, 0, 0,
+ 3 << 8, 3 << 8);
+
+ gDPPipeSync(POLY_OPA_DISP++);
+ gDPSetRenderMode(POLY_OPA_DISP++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
+ gDPSetCombineMode(POLY_OPA_DISP++, G_CC_BLENDPEDECALA, G_CC_BLENDPEDECALA);
+ gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 50, 255);
+
+ for (i = 0; i < LANGUAGE_MAX; i++) {
+ gDPPipeSync(POLY_OPA_DISP++);
+
+ if (i == gSaveContext.language) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255);
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 50, 50, 100, 255);
+ }
+
+ gDPLoadTextureBlock(POLY_OPA_DISP++, sInitialLanguageTextures[i].texture, G_IM_FMT_IA, G_IM_SIZ_8b,
+ sInitialLanguageTextures[i].width, sInitialLanguageTextures[i].height, 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);
+
+ gSPTextureRectangle(POLY_OPA_DISP++, (sInitialLanguageTextures[i].x1 + GREG(1)) << 2,
+ (sInitialLanguageTextures[i].y1 + GREG(2)) << 2,
+ (sInitialLanguageTextures[i].x2 + GREG(1)) << 2,
+ (sInitialLanguageTextures[i].y2 + GREG(2)) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+ }
+
+ gDPPipeSync(POLY_OPA_DISP++);
+
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 220, 180, 30, 255);
+ gDPSetEnvColor(POLY_OPA_DISP++, 60, 20, 0, 255);
+
+ source = (u8*)gFileSelSelectYourLanguageTex;
+ y1 = 120 + GREG(3);
+ for (i = 0; i < 8; i++, source += 0x500) {
+ y2 = y1 + 8;
+ gDPLoadTextureBlock(POLY_OPA_DISP++, source, G_IM_FMT_IA, G_IM_SIZ_8b, 160, 8, 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);
+
+ gSPTextureRectangle(POLY_OPA_DISP++, (80 + GREG(4)) << 2, y1 << 2, (240 + GREG(4)) << 2, y2 << 2,
+ G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+
+ y1 = y2;
+ }
+
+ CLOSE_DISPS(this->state.gfxCtx, "../z_file_choose.c", UNK_LINE);
+}
+#endif
+
void FileSelect_SetView(FileSelectState* this, f32 eyeX, f32 eyeY, f32 eyeZ) {
Vec3f eye;
Vec3f lookAt;
@@ -58,18 +356,57 @@ Gfx* FileSelect_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, s
void FileSelect_InitModeUpdate(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
+ SramContext* sramCtx = &this->sramCtx;
+#if !OOT_PAL_N64
if (this->menuMode == FS_MENU_MODE_INIT) {
this->menuMode = FS_MENU_MODE_CONFIG;
this->configMode = CM_FADE_IN_START;
this->nextTitleLabel = FS_TITLE_OPEN_FILE;
PRINTF("Sram Start─Load 》》》》》 ");
- Sram_VerifyAndLoadAllSaves(this, &this->sramCtx);
+ Sram_VerifyAndLoadAllSaves(this, sramCtx);
PRINTF("終了!!!\n");
}
+#else
+ if (this->configMode == CM_FADE_IN_START) {
+ Sram_VerifyAndLoadAllSaves(this, sramCtx);
+
+ if (!SLOT_OCCUPIED(sramCtx, 0) && !SLOT_OCCUPIED(sramCtx, 1) && !SLOT_OCCUPIED(sramCtx, 2)) {
+ this->configMode++; // = CM_FADE_IN_END
+ } else {
+ this->menuMode = FS_MENU_MODE_CONFIG;
+ this->configMode = CM_FADE_IN_START;
+ this->nextTitleLabel = FS_TITLE_OPEN_FILE;
+ }
+ }
+
+ if (this->configMode == CM_FADE_IN_END) {
+ sScreenFillAlpha -= 40;
+ if (sScreenFillAlpha <= 0) {
+ sScreenFillAlpha = 0;
+ this->configMode++; // = CM_MAIN_MENU
+ }
+ } else if (this->configMode == CM_MAIN_MENU) {
+ FileSelect_UpdateInitialLanguageMenu(this);
+ } else {
+ sScreenFillAlpha += 40;
+ if (sScreenFillAlpha >= 255) {
+ sScreenFillAlpha = 255;
+ this->menuMode = FS_MENU_MODE_CONFIG;
+ this->configMode = CM_FADE_IN_START;
+ this->nextTitleLabel = FS_TITLE_OPEN_FILE;
+ }
+ }
+#endif
}
void FileSelect_InitModeDraw(GameState* thisx) {
+#if OOT_PAL_N64
+ FileSelectState* this = (FileSelectState*)thisx;
+
+ Gfx_SetupDL_39Opa(this->state.gfxCtx);
+ FileSelect_DrawInitialLanguageMenu(this);
+#endif
}
/**
@@ -406,19 +743,19 @@ void FileSelect_PulsateCursor(GameState* thisx) {
SramContext* sramCtx = &this->sramCtx;
Input* debugInput = &this->state.input[2];
-#if OOT_DEBUG
+#if OOT_PAL && DEBUG_FEATURES
if (CHECK_BTN_ALL(debugInput->press.button, BTN_DLEFT)) {
sramCtx->readBuff[SRAM_HEADER_LANGUAGE] = gSaveContext.language = LANGUAGE_ENG;
*((u8*)0x80000002) = LANGUAGE_ENG;
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, 3, OS_WRITE);
PRINTF("1:read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND],
- sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
+ sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
sramCtx->readBuff[SRAM_HEADER_MAGIC]);
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_READ);
PRINTF("read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND],
- sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
+ sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
sramCtx->readBuff[SRAM_HEADER_MAGIC]);
} else if (CHECK_BTN_ALL(debugInput->press.button, BTN_DUP)) {
sramCtx->readBuff[SRAM_HEADER_LANGUAGE] = gSaveContext.language = LANGUAGE_GER;
@@ -426,11 +763,11 @@ void FileSelect_PulsateCursor(GameState* thisx) {
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, 3, OS_WRITE);
PRINTF("1:read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND],
- sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
+ sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
sramCtx->readBuff[SRAM_HEADER_MAGIC]);
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_READ);
PRINTF("read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND],
- sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
+ sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
sramCtx->readBuff[SRAM_HEADER_MAGIC]);
} else if (CHECK_BTN_ALL(debugInput->press.button, BTN_DRIGHT)) {
sramCtx->readBuff[SRAM_HEADER_LANGUAGE] = gSaveContext.language = LANGUAGE_FRA;
@@ -438,12 +775,12 @@ void FileSelect_PulsateCursor(GameState* thisx) {
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, 3, OS_WRITE);
PRINTF("1:read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND],
- sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
+ sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
sramCtx->readBuff[SRAM_HEADER_MAGIC]);
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_READ);
PRINTF("read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND],
- sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
+ sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE],
sramCtx->readBuff[SRAM_HEADER_MAGIC]);
}
#endif
@@ -530,13 +867,16 @@ static s16 D_80812848[] = { 0x0274, 0x0278 };
void FileSelect_SetWindowContentVtx(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
+ SramContext* sramCtx = &this->sramCtx;
s16 phi_t2;
s16 phi_t0;
s16 phi_t5;
s16 phi_a1;
s16 phi_ra;
s16 temp_t1;
- SramContext* sramCtx = &this->sramCtx;
+#if OOT_PAL_N64
+ u8 fileNameChar;
+#endif
this->windowContentVtx = GRAPH_ALLOC(this->state.gfxCtx, 0x288 * sizeof(Vtx));
@@ -689,8 +1029,14 @@ void FileSelect_SetWindowContentVtx(GameState* thisx) {
temp_t1 += 2;
for (phi_a1 = 0; phi_a1 < 8; phi_a1++, phi_t2 += 4, phi_t0 += WREG(40)) {
+#if OOT_VERSION == PAL_1_1
+ fileNameChar = this->fileNames[phi_t5][phi_a1];
this->windowContentVtx[phi_t2].v.ob[0] = this->windowContentVtx[phi_t2 + 2].v.ob[0] =
- WREG(41) + phi_t0 + 0x40;
+ phi_t0 + 0x40 + WREG(41) + D_808124C0[fileNameChar];
+#else
+ this->windowContentVtx[phi_t2].v.ob[0] = this->windowContentVtx[phi_t2 + 2].v.ob[0] =
+ phi_t0 + 0x40 + WREG(41);
+#endif
this->windowContentVtx[phi_t2 + 1].v.ob[0] = this->windowContentVtx[phi_t2 + 3].v.ob[0] =
this->windowContentVtx[phi_t2].v.ob[0] + WREG(42);
this->windowContentVtx[phi_t2].v.ob[1] = this->windowContentVtx[phi_t2 + 1].v.ob[1] = temp_t1 - 3;
@@ -818,25 +1164,43 @@ static void* sQuestItemTextures[] = {
static s16 sQuestItemRed[] = { 255, 255, 255, 0, 255, 0, 255, 200, 200 };
static s16 sQuestItemGreen[] = { 255, 255, 255, 255, 60, 100, 130, 50, 200 };
static s16 sQuestItemBlue[] = { 255, 255, 255, 0, 0, 255, 0, 255, 0 };
-static s16 sQuestItemFlags[] = { 0x0012, 0x0013, 0x0014, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005 };
+static s16 sQuestItemFlags[] = {
+ QUEST_KOKIRI_EMERALD, QUEST_GORON_RUBY, QUEST_ZORA_SAPPHIRE, QUEST_MEDALLION_FOREST, QUEST_MEDALLION_FIRE,
+ QUEST_MEDALLION_WATER, QUEST_MEDALLION_SPIRIT, QUEST_MEDALLION_SHADOW, QUEST_MEDALLION_LIGHT,
+};
-#if OOT_NTSC && OOT_VERSION < GC_JP_CE
+#if (OOT_NTSC && OOT_VERSION < GC_JP_CE) || PLATFORM_IQUE
static void* sSaveXTextures[] = { gFileSelSaveXJPNTex, gFileSelSaveXENGTex };
#endif
static s16 sNamePrimColors[2][3] = { { 255, 255, 255 }, { 100, 100, 100 } };
+
+#if !OOT_PAL_N64
static void* sHeartTextures[] = { gHeartFullTex, gDefenseHeartFullTex };
+#else
+static void* sHeartTextures[][5] = {
+ { gHeartEmptyTex, gHeartQuarterTex, gHeartHalfTex, gHeartThreeQuarterTex, gHeartFullTex },
+ { gDefenseHeartEmptyTex, gDefenseHeartQuarterTex, gDefenseHeartHalfTex, gDefenseHeartThreeQuarterTex,
+ gDefenseHeartFullTex },
+};
+static u8 sHeartTextureIndices[16] = { 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3 };
+#endif
+
static s16 sHeartPrimColors[2][3] = { { 255, 70, 50 }, { 200, 0, 0 } };
static s16 sHeartEnvColors[2][3] = { { 50, 40, 60 }, { 255, 255, 255 } };
void FileSelect_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
FileSelectState* this = (FileSelectState*)thisx;
Font* sp54 = &this->font;
- s16 heartType;
- s16 vtxOffset;
s16 i;
s16 j;
s16 k;
+#if OOT_PAL_N64
+ s16 health;
+ s16 heartTextureIndex;
+#endif
+ s16 heartType;
+ s16 vtxOffset;
s16 deathCountSplit[3];
OPEN_DISPS(this->state.gfxCtx, "../z_file_choose.c", 1709);
@@ -886,12 +1250,37 @@ void FileSelect_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
k = this->healthCapacities[fileIndex] / 0x10;
+#if !OOT_PAL_N64
// draw hearts
for (vtxOffset = 0, j = 0; j < k; j++, vtxOffset += 4) {
gSPVertex(POLY_OPA_DISP++, &this->windowContentVtx[D_8081284C[fileIndex] + vtxOffset] + 0x30, 4, 0);
-
POLY_OPA_DISP = FileSelect_QuadTextureIA8(POLY_OPA_DISP, sHeartTextures[heartType], 0x10, 0x10, 0);
}
+#else
+ health = this->health[fileIndex];
+ if (health <= 48) { // 3 hearts
+ health = 48;
+ }
+ heartTextureIndex = 4;
+
+ // draw hearts
+ for (vtxOffset = 0, j = 0; j < k; j++, vtxOffset += 4) {
+ if (health < 16) {
+ if (health != 0) {
+ heartTextureIndex = sHeartTextureIndices[health];
+ health = 0;
+ } else {
+ heartTextureIndex = 0;
+ }
+ } else {
+ health -= 16;
+ }
+
+ gSPVertex(POLY_OPA_DISP++, &this->windowContentVtx[D_8081284C[fileIndex] + vtxOffset] + 0x30, 4, 0);
+ POLY_OPA_DISP =
+ FileSelect_QuadTextureIA8(POLY_OPA_DISP, sHeartTextures[heartType][heartTextureIndex], 0x10, 0x10, 0);
+ }
+#endif
gDPPipeSync(POLY_OPA_DISP++);
@@ -1115,7 +1504,7 @@ void FileSelect_DrawWindowContents(GameState* thisx) {
temp = this->confirmButtonTexIndices[i];
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
- this->confirmButtonAlpha[i]);
+ this->actionButtonAlpha[i + 2]);
gDPLoadTextureBlock(POLY_OPA_DISP++, sActionButtonTextures[gSaveContext.language][temp], G_IM_FMT_IA,
G_IM_SIZ_16b, 64, 16, 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);
@@ -1357,7 +1746,7 @@ void FileSelect_FadeInFileInfo(GameState* thisx) {
this->selectMode++;
}
- this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] = this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] =
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] = this->actionButtonAlpha[FS_BTN_ACTION_QUIT] =
this->fileInfoAlpha[this->buttonIndex];
}
@@ -1412,7 +1801,8 @@ void FileSelect_FadeOutFileInfo(GameState* thisx) {
this->selectMode++;
}
- this->confirmButtonAlpha[0] = this->confirmButtonAlpha[1] = this->fileInfoAlpha[this->buttonIndex];
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] = this->actionButtonAlpha[FS_BTN_ACTION_QUIT] =
+ this->fileInfoAlpha[this->buttonIndex];
}
/**
@@ -1489,7 +1879,7 @@ void FileSelect_FadeOut(GameState* thisx) {
void FileSelect_LoadGame(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (this->buttonIndex == FS_BTN_SELECT_FILE_1) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -1548,10 +1938,10 @@ void FileSelect_LoadGame(GameState* thisx) {
// capacity and `magicFillTarget`
gSaveContext.save.info.playerData.magicLevel = gSaveContext.save.info.playerData.magic = 0;
- PRINTF(VT_FGCOL(GREEN));
+ PRINTF_COLOR_GREEN();
PRINTF("Z_MAGIC_NOW_NOW=%d MAGIC_NOW=%d\n", ((void)0, gSaveContext.magicFillTarget),
gSaveContext.save.info.playerData.magic);
- PRINTF(VT_RST);
+ PRINTF_RST();
gSaveContext.save.info.playerData.naviTimer = 0;
@@ -1565,7 +1955,16 @@ void FileSelect_LoadGame(GameState* thisx) {
swordEquipValue =
(gEquipMasks[EQUIP_TYPE_SWORD] & gSaveContext.save.info.equips.equipment) >> (EQUIP_TYPE_SWORD * 4);
gSaveContext.save.info.equips.equipment &= gEquipNegMasks[EQUIP_TYPE_SWORD];
+#ifndef AVOID_UB
+ //! @bug swordEquipValue can be 0 (EQUIP_VALUE_SWORD_NONE) here (typically, when first starting the game).
+ //! This leads to reading gBitFlags[-1] (out of bounds).
+ // gBitFlags[-1] turns out to be 0 in matching versions so this is inconsequential.
gSaveContext.save.info.inventory.equipment ^= OWNED_EQUIP_FLAG(EQUIP_TYPE_SWORD, swordEquipValue - 1);
+#else
+ if (swordEquipValue != EQUIP_VALUE_SWORD_NONE) {
+ gSaveContext.save.info.inventory.equipment ^= OWNED_EQUIP_FLAG(EQUIP_TYPE_SWORD, swordEquipValue - 1);
+ }
+#endif
}
#if PLATFORM_N64
@@ -1672,6 +2071,9 @@ void FileSelect_Main(GameState* thisx) {
gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
gSPSegment(POLY_OPA_DISP++, 0x01, this->staticSegment);
gSPSegment(POLY_OPA_DISP++, 0x02, this->parameterSegment);
+#if OOT_PAL_N64
+ gSPSegment(POLY_OPA_DISP++, 0x06, this->objectMagSegment);
+#endif
Gfx_SetupFrame(this->state.gfxCtx, 0, 0, 0);
@@ -1766,7 +2168,7 @@ void FileSelect_Main(GameState* thisx) {
void FileSelect_InitContext(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
EnvironmentContext* envCtx = &this->envCtx;
-#if OOT_PAL
+#if PLATFORM_GC && OOT_PAL
SramContext* sramCtx = &this->sramCtx;
#endif
@@ -1876,8 +2278,8 @@ void FileSelect_InitContext(GameState* thisx) {
this->nameBoxAlpha[2] = this->nameAlpha[0] = this->nameAlpha[1] = this->nameAlpha[2] =
this->connectorAlpha[0] = this->connectorAlpha[1] = this->connectorAlpha[2] = this->fileInfoAlpha[0] =
this->fileInfoAlpha[1] = this->fileInfoAlpha[2] = this->actionButtonAlpha[FS_BTN_ACTION_COPY] =
- this->actionButtonAlpha[FS_BTN_ACTION_ERASE] = this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] =
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] = this->optionButtonAlpha =
+ this->actionButtonAlpha[FS_BTN_ACTION_ERASE] = this->actionButtonAlpha[FS_BTN_ACTION_YES] =
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] = this->optionButtonAlpha =
this->nameEntryBoxAlpha = this->controlsAlpha = this->emptyFileTextAlpha = 0;
this->windowPosX = 6;
@@ -1927,7 +2329,7 @@ void FileSelect_InitContext(GameState* thisx) {
this->n64ddFlags[0] = this->n64ddFlags[1] = this->n64ddFlags[2] = this->defense[0] = this->defense[1] =
this->defense[2] = 0;
-#if OOT_PAL
+#if PLATFORM_GC && OOT_PAL
SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_READ);
gSaveContext.language = sramCtx->readBuff[SRAM_HEADER_LANGUAGE];
@@ -1943,8 +2345,8 @@ void FileSelect_Destroy(GameState* thisx) {
void FileSelect_Init(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
- u32 size = (uintptr_t)_title_staticSegmentRomEnd - (uintptr_t)_title_staticSegmentRomStart;
s32 pad;
+ u32 size = (uintptr_t)_title_staticSegmentRomEnd - (uintptr_t)_title_staticSegmentRomStart;
#if PLATFORM_N64
if (D_80121212 != 0) {
@@ -1952,7 +2354,11 @@ void FileSelect_Init(GameState* thisx) {
}
#endif
+#if !OOT_PAL_N64
SREG(30) = 1;
+#else
+ SREG(30) = 2;
+#endif
PRINTF("SIZE=%x\n", size);
this->staticSegment = GAME_STATE_ALLOC(&this->state, size, "../z_file_choose.c", 3392);
@@ -1965,6 +2371,12 @@ void FileSelect_Init(GameState* thisx) {
DMA_REQUEST_SYNC(this->parameterSegment, (uintptr_t)_parameter_staticSegmentRomStart, size, "../z_file_choose.c",
3400);
+#if OOT_PAL_N64
+ size = gObjectTable[OBJECT_MAG].vromEnd - gObjectTable[OBJECT_MAG].vromStart;
+ this->objectMagSegment = GAME_STATE_ALLOC(&this->state, size, "../z_file_choose.c", UNK_LINE);
+ DMA_REQUEST_SYNC(this->objectMagSegment, gObjectTable[OBJECT_MAG].vromStart, size, "../z_file_choose.c", UNK_LINE);
+#endif
+
Matrix_Init(&this->state);
View_Init(&this->view, this->state.gfxCtx);
this->state.main = FileSelect_Main;
diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c b/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c
index 827aca8a1c..03fb5d0f12 100644
--- a/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c
+++ b/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c
@@ -1,4 +1,16 @@
#include "file_select.h"
+#include "file_select_state.h"
+
+#include "controller.h"
+#include "printf.h"
+#include "regs.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "z64save.h"
+#include "z64sram.h"
+
+// In iQue versions, this file contains many workarounds for EGCS internal
+// compiler errors (see docs/compilers.md)
// when choosing a file to copy or erase, the 6 main menu buttons are placed at these offsets
static s16 sChooseFileYOffsets[] = { -48, -48, -48, -24, -24, 0 };
@@ -19,7 +31,11 @@ void FileSelect_SetupCopySource(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 yStep;
s16 i;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 5; i++) {
yStep = (ABS(this->buttonYOffsets[i] - sChooseFileYOffsets[i])) / this->actionTimer;
@@ -29,11 +45,23 @@ void FileSelect_SetupCopySource(GameState* thisx) {
this->buttonYOffsets[i] += yStep;
}
}
+#else
+ array = this->buttonYOffsets;
+ for (i = 0; i < 5; i++) {
+ yStep = (ABS(array[i] - sChooseFileYOffsets[i])) / this->actionTimer;
+
+ if (array[i] >= sChooseFileYOffsets[i]) {
+ array[i] -= yStep;
+ } else {
+ array[i] += yStep;
+ }
+ }
+#endif
this->actionButtonAlpha[FS_BTN_ACTION_COPY] -= 25;
this->actionButtonAlpha[FS_BTN_ACTION_ERASE] -= 25;
this->optionButtonAlpha -= 25;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] += 25;
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] += 25;
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->actionTimer--;
@@ -44,7 +72,7 @@ void FileSelect_SetupCopySource(GameState* thisx) {
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->optionButtonAlpha = 0;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] = 200;
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] = 200;
this->titleLabel = this->nextTitleLabel;
this->titleAlpha[0] = 255;
@@ -124,27 +152,65 @@ void FileSelect_SetupCopyDest1(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 yStep;
s16 i;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 3; i++) {
yStep = ABS(this->buttonYOffsets[i] - D_8081248C[this->buttonIndex][i]) / this->actionTimer;
- if (D_8081248C[this->buttonIndex][i] >= this->buttonYOffsets[i]) {
+ if (this->buttonYOffsets[i] <= D_8081248C[this->buttonIndex][i]) {
this->buttonYOffsets[i] += yStep;
} else {
this->buttonYOffsets[i] -= yStep;
}
}
+#else
+ array = this->buttonYOffsets;
+ for (i = 0; i < 3; i++) {
+ yStep = ABS(array[i] - D_8081248C[this->buttonIndex][i]) / this->actionTimer;
+ if (array[i] <= D_8081248C[this->buttonIndex][i]) {
+ array[i] += yStep;
+ } else {
+ array[i] -= yStep;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->nameBoxAlpha[this->buttonIndex] -= 25;
+#else
+ array = this->titleAlpha;
+ array[0] -= 31;
+ array[1] += 31;
+ array = this->nameBoxAlpha;
+ array[this->buttonIndex] -= 25;
+#endif
this->actionTimer--;
if (this->actionTimer == 0) {
+#if !PLATFORM_IQUE
this->buttonYOffsets[this->buttonIndex] = D_8081248C[this->buttonIndex][this->buttonIndex];
+#else
+ array = this->buttonYOffsets;
+ array[this->buttonIndex] = D_8081248C[this->buttonIndex][this->buttonIndex];
+#endif
+
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
this->actionTimer = 8;
this->configMode++;
}
@@ -156,14 +222,33 @@ void FileSelect_SetupCopyDest1(GameState* thisx) {
*/
void FileSelect_SetupCopyDest2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
this->nameBoxAlpha[this->buttonIndex] -= 25;
this->fileInfoAlpha[this->buttonIndex] += 25;
+#else
+ array = this->nameBoxAlpha;
+ array[this->buttonIndex] -= 25;
+ array = this->fileInfoAlpha;
+ array[this->buttonIndex] += 25;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
+#if !PLATFORM_IQUE
this->nameBoxAlpha[this->buttonIndex] = 0;
this->fileInfoAlpha[this->buttonIndex] = 200;
+#else
+ array = this->nameBoxAlpha;
+ array[this->buttonIndex] = 0;
+ array = this->fileInfoAlpha;
+ array[this->buttonIndex] = 200;
+#endif
+
this->buttonIndex = FS_BTN_COPY_QUIT;
this->actionTimer = 8;
this->configMode = CM_SELECT_COPY_DEST;
@@ -250,15 +335,35 @@ void FileSelect_SelectCopyDest(GameState* thisx) {
*/
void FileSelect_ExitToCopySource1(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
this->fileInfoAlpha[this->buttonIndex] -= 25;
this->nameBoxAlpha[this->buttonIndex] += 25;
+#else
+ array = this->fileInfoAlpha;
+ array[this->buttonIndex] -= 25;
+ array = this->nameBoxAlpha;
+ array[this->buttonIndex] += 25;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
this->nextTitleLabel = FS_TITLE_COPY_FROM;
+
+#if !PLATFORM_IQUE
this->nameBoxAlpha[this->buttonIndex] = 200;
this->fileInfoAlpha[this->buttonIndex] = 0;
+#else
+ array = this->nameBoxAlpha;
+ array[this->buttonIndex] = 200;
+ array = this->fileInfoAlpha;
+ array[this->buttonIndex] = 0;
+#endif
+
this->actionTimer = 8;
this->configMode++;
}
@@ -273,7 +378,11 @@ void FileSelect_ExitToCopySource2(GameState* thisx) {
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 3; i++) {
yStep = ABS(this->buttonYOffsets[i] - sChooseFileYOffsets[i]) / this->actionTimer;
@@ -283,16 +392,43 @@ void FileSelect_ExitToCopySource2(GameState* thisx) {
this->buttonYOffsets[i] += yStep;
}
}
+#else
+ array = this->buttonYOffsets;
+ for (i = 0; i < 3; i++) {
+ yStep = ABS(array[i] - sChooseFileYOffsets[i]) / this->actionTimer;
+ if (array[i] >= sChooseFileYOffsets[i]) {
+ array[i] -= yStep;
+ } else {
+ array[i] += yStep;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
+#else
+ array = this->titleAlpha;
+ array[0] -= 31;
+ array[1] += 31;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
- this->buttonIndex = 3;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
+ this->buttonIndex = FS_BTN_COPY_QUIT;
this->configMode = CM_SELECT_COPY_SOURCE;
}
}
@@ -307,36 +443,79 @@ void FileSelect_SetupCopyConfirm1(GameState* thisx) {
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
+#else
+ array = this->titleAlpha;
+ array[0] -= 31;
+ array[1] += 31;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 3; i++) {
if ((i != this->copyDestFileIndex) && (i != this->selectedFileIndex)) {
this->fileButtonAlpha[i] -= 25;
if (SLOT_OCCUPIED(sramCtx, i)) {
- this->connectorAlpha[i] -= 31;
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
+ this->connectorAlpha[i] -= 31;
}
- } else {
- if (this->copyDestFileIndex == i) {
- yStep = ABS(this->buttonYOffsets[i] - D_808124A4[i]) / this->actionTimer;
- this->buttonYOffsets[i] += yStep;
+ } else if (i == this->copyDestFileIndex) {
+ yStep = ABS(this->buttonYOffsets[i] - D_808124A4[i]) / this->actionTimer;
+ this->buttonYOffsets[i] += yStep;
- if (this->buttonYOffsets[i] >= D_808124A4[i]) {
- this->buttonYOffsets[i] = D_808124A4[i];
- }
+ if (this->buttonYOffsets[i] >= D_808124A4[i]) {
+ this->buttonYOffsets[i] = D_808124A4[i];
}
}
}
+#else
+ for (i = 0; i < 3; i++) {
+ if ((i != this->copyDestFileIndex) && (i != this->selectedFileIndex)) {
+ array = this->fileButtonAlpha;
+ array[i] -= 25;
+
+ if (SLOT_OCCUPIED(sramCtx, i)) {
+ s16* nameBoxAlpha = this->nameBoxAlpha;
+ s16* nameAlpha = this->nameAlpha;
+ s16* fileButtonAlpha = this->fileButtonAlpha;
+
+ nameBoxAlpha[i] = nameAlpha[i] = fileButtonAlpha[i];
+
+ array = this->connectorAlpha;
+ array[i] -= 31;
+ }
+ } else if (i == this->copyDestFileIndex) {
+ array = this->buttonYOffsets;
+ yStep = ABS(array[i] - D_808124A4[i]) / this->actionTimer;
+ array[i] += yStep;
+
+ if (array[i] >= D_808124A4[i]) {
+ array[i] = D_808124A4[i];
+ }
+ }
+ }
+#endif
this->actionTimer--;
if (this->actionTimer == 0) {
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
this->actionTimer = 8;
this->configMode++;
}
@@ -349,7 +528,7 @@ void FileSelect_SetupCopyConfirm1(GameState* thisx) {
void FileSelect_SetupCopyConfirm2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] += 25;
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] += 25;
this->actionTimer--;
if (this->actionTimer == 0) {
@@ -403,11 +582,23 @@ void FileSelect_ReturnToCopyDest(GameState* thisx) {
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] -= 25;
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] -= 25;
+#else
+ array = this->titleAlpha;
+ array[0] -= 31;
+ array[1] += 31;
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_YES] -= 25;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 3; i++) {
if ((i != this->copyDestFileIndex) && (i != this->selectedFileIndex)) {
this->fileButtonAlpha[i] += 25;
@@ -420,19 +611,55 @@ void FileSelect_ReturnToCopyDest(GameState* thisx) {
yStep = ABS(this->buttonYOffsets[i] - D_8081248C[this->selectedFileIndex][i]) / this->actionTimer;
- if (D_8081248C[this->selectedFileIndex][i] >= this->buttonYOffsets[i]) {
+ if (this->buttonYOffsets[i] <= D_8081248C[this->selectedFileIndex][i]) {
this->buttonYOffsets[i] += yStep;
} else {
this->buttonYOffsets[i] -= yStep;
}
}
+#else
+ for (i = 0; i < 3; i++) {
+ if ((i != this->copyDestFileIndex) && (i != this->selectedFileIndex)) {
+ array = this->fileButtonAlpha;
+ array[i] += 25;
+
+ if (SLOT_OCCUPIED(sramCtx, i)) {
+ s16* nameBoxAlpha = this->nameBoxAlpha;
+ s16* nameAlpha = this->nameAlpha;
+ s16* fileButtonAlpha = this->fileButtonAlpha;
+
+ nameBoxAlpha[i] = nameAlpha[i] = fileButtonAlpha[i];
+
+ array = this->connectorAlpha;
+ array[i] += 31;
+ }
+ }
+
+ array = this->buttonYOffsets;
+ yStep = ABS(array[i] - D_8081248C[this->selectedFileIndex][i]) / this->actionTimer;
+
+ if (array[i] <= D_8081248C[this->selectedFileIndex][i]) {
+ array[i] += yStep;
+ } else {
+ array[i] -= yStep;
+ }
+ }
+#endif
this->actionTimer--;
if (this->actionTimer == 0) {
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
this->actionTimer = 8;
this->buttonIndex = FS_BTN_COPY_QUIT;
this->configMode = CM_SELECT_COPY_DEST;
@@ -447,8 +674,8 @@ void FileSelect_CopyAnim1(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
this->titleAlpha[0] -= 31;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] -= 25;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] -= 25;
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] -= 25;
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] -= 25;
this->actionTimer--;
if (this->actionTimer == 0) {
@@ -467,24 +694,55 @@ void FileSelect_CopyAnim1(GameState* thisx) {
void FileSelect_CopyAnim2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
this->fileInfoAlpha[this->copyDestFileIndex] += 25;
this->nameAlpha[this->copyDestFileIndex] += 25;
this->titleAlpha[1] += 31;
- yStep = ABS(this->fileNamesY[this->copyDestFileIndex] + 56) / this->actionTimer;
+#else
+ array = this->fileInfoAlpha;
+ array[this->copyDestFileIndex] += 25;
+ array = this->nameAlpha;
+ array[this->copyDestFileIndex] += 25;
+ array = this->titleAlpha;
+ array[1] += 31;
+#endif
+
+#if !PLATFORM_IQUE
+ yStep = ABS(this->fileNamesY[this->copyDestFileIndex] - -56) / this->actionTimer;
this->fileNamesY[this->copyDestFileIndex] -= yStep;
if (this->fileNamesY[this->copyDestFileIndex] <= -56) {
this->fileNamesY[this->copyDestFileIndex] = -56;
}
+#else
+ array = this->fileNamesY;
+ yStep = ABS(array[this->copyDestFileIndex] - -56) / this->actionTimer;
+ array[this->copyDestFileIndex] -= yStep;
+
+ if (array[this->copyDestFileIndex] <= -56) {
+ array[this->copyDestFileIndex] = -56;
+ }
+#endif
this->actionTimer--;
if (this->actionTimer == 0) {
this->actionTimer = 90;
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
this->configMode++;
}
}
@@ -523,16 +781,36 @@ void FileSelect_CopyAnim3(GameState* thisx) {
*/
void FileSelect_CopyAnim4(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
+ s16* array;
+#if !PLATFORM_IQUE
this->fileInfoAlpha[this->selectedFileIndex] -= 25;
this->fileInfoAlpha[this->copyDestFileIndex] -= 25;
this->nameBoxAlpha[this->selectedFileIndex] += 25;
this->nameBoxAlpha[this->copyDestFileIndex] += 25;
this->titleAlpha[0] -= 31;
+#else
+ array = this->fileInfoAlpha;
+ array[this->selectedFileIndex] -= 25;
+ array[this->copyDestFileIndex] -= 25;
+ array = this->nameBoxAlpha;
+ array[this->selectedFileIndex] += 25;
+ array[this->copyDestFileIndex] += 25;
+ array = this->titleAlpha;
+ array[0] -= 31;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
+#if !PLATFORM_IQUE
this->fileNamesY[this->copyDestFileIndex] = this->buttonYOffsets[3] = 0;
+#else
+ array = this->fileNamesY;
+ array[this->copyDestFileIndex] = 0;
+ this->buttonYOffsets[3] = 0;
+#endif
+
this->actionTimer = 8;
this->titleAlpha[0] = 0;
this->configMode++;
@@ -548,7 +826,11 @@ void FileSelect_CopyAnim5(GameState* thisx) {
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 5; i++) {
yStep = ABS(this->buttonYOffsets[i]) / this->actionTimer;
@@ -558,7 +840,20 @@ void FileSelect_CopyAnim5(GameState* thisx) {
this->buttonYOffsets[i] += yStep;
}
}
+#else
+ array = this->buttonYOffsets;
+ for (i = 0; i < 5; i++) {
+ yStep = ABS(array[i]) / this->actionTimer;
+ if (array[i] >= 0) {
+ array[i] -= yStep;
+ } else {
+ array[i] += yStep;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
for (i = 0; i < 3; i++) {
if (i != this->buttonIndex) {
this->fileButtonAlpha[i] += 25;
@@ -569,32 +864,98 @@ void FileSelect_CopyAnim5(GameState* thisx) {
}
}
}
+#else
+ for (i = 0; i < 3; i++) {
+ if (i != this->buttonIndex) {
+ array = this->fileButtonAlpha;
+ array[i] += 25;
+ if (SLOT_OCCUPIED(sramCtx, i)) {
+ s16* nameBoxAlpha = this->nameBoxAlpha;
+ s16* nameAlpha = this->nameAlpha;
+ s16* fileButtonAlpha = this->fileButtonAlpha;
+
+ nameBoxAlpha[i] = nameAlpha[i] = fileButtonAlpha[i];
+
+ array = this->connectorAlpha;
+ array[i] += 31;
+ }
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->actionButtonAlpha[FS_BTN_ACTION_COPY] += 25;
this->actionButtonAlpha[FS_BTN_ACTION_ERASE] += 25;
this->optionButtonAlpha += 25;
this->titleAlpha[1] += 31;
+#else
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_COPY] += 25;
+ array[FS_BTN_ACTION_ERASE] += 25;
+ this->optionButtonAlpha += 25;
+ array = this->titleAlpha;
+ array[1] += 31;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
+#if !PLATFORM_IQUE
for (i = 0; i < 3; i++) {
- this->connectorAlpha[i] = 0;
this->fileButtonAlpha[i] = 200;
- this->nameBoxAlpha[i] = this->nameAlpha[i] = this->connectorAlpha[i];
+ this->nameBoxAlpha[i] = this->nameAlpha[i] = this->connectorAlpha[i] = 0;
if (SLOT_OCCUPIED(sramCtx, i)) {
- this->connectorAlpha[i] = 255;
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
+ this->connectorAlpha[i] = 255;
}
}
+#else
+ for (i = 0; i < 3; i++) {
+ array = this->fileButtonAlpha;
+ array[i] = 200;
+ array = this->nameBoxAlpha;
+ array[i] = 0;
+ array = this->nameAlpha;
+ array[i] = 0;
+ array = this->connectorAlpha;
+ array[i] = 0;
+ if (SLOT_OCCUPIED(sramCtx, i)) {
+ s16* nameBoxAlpha = this->nameBoxAlpha;
+ s16* nameAlpha = this->nameAlpha;
+ s16* fileButtonAlpha = this->fileButtonAlpha;
+
+ nameBoxAlpha[i] = nameAlpha[i] = fileButtonAlpha[i];
+
+ array = this->connectorAlpha;
+ array[i] = 255;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->fileNamesY[this->selectedFileIndex] = 0;
+#else
+ array = this->fileNamesY;
+ array[this->selectedFileIndex] = 0;
+#endif
+
this->highlightColor[3] = 70;
this->highlightPulseDir = 1;
XREG(35) = XREG(36);
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
this->configMode = CM_MAIN_MENU;
}
}
@@ -607,7 +968,11 @@ void FileSelect_ExitCopyToMain(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 i;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 5; i++) {
yStep = ABS(this->buttonYOffsets[i]) / this->actionTimer;
@@ -617,24 +982,66 @@ void FileSelect_ExitCopyToMain(GameState* thisx) {
this->buttonYOffsets[i] += yStep;
}
}
+#else
+ array = this->buttonYOffsets;
+ for (i = 0; i < 5; i++) {
+ yStep = ABS(array[i]) / this->actionTimer;
+ if (array[i] >= 0) {
+ array[i] -= yStep;
+ } else {
+ array[i] += yStep;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->actionButtonAlpha[FS_BTN_ACTION_COPY] += 25;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] -= 25;
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] -= 25;
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
+#else
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_COPY] += 25;
+ array[FS_BTN_ACTION_QUIT] -= 25;
+ array = this->titleAlpha;
+ array[0] -= 31;
+ array[1] += 31;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
+#if !PLATFORM_IQUE
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = 200;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] = 0;
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] = 0;
+#else
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_COPY] = 200;
+ array[FS_BTN_ACTION_QUIT] = 0;
+#endif
+
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
this->configMode = CM_MAIN_MENU;
}
+#if !PLATFORM_IQUE
this->optionButtonAlpha = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->actionButtonAlpha[FS_BTN_ACTION_COPY];
+#else
+ array = this->actionButtonAlpha;
+ this->optionButtonAlpha = array[FS_BTN_ACTION_ERASE] = array[FS_BTN_ACTION_COPY];
+#endif
}
/**
@@ -645,7 +1052,11 @@ void FileSelect_SetupEraseSelect(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 i;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 5; i++) {
yStep = ABS(this->buttonYOffsets[i] - sChooseFileYOffsets[i]) / this->actionTimer;
@@ -655,19 +1066,46 @@ void FileSelect_SetupEraseSelect(GameState* thisx) {
this->buttonYOffsets[i] += yStep;
}
}
+#else
+ array = this->buttonYOffsets;
+ for (i = 0; i < 5; i++) {
+ yStep = ABS(array[i] - sChooseFileYOffsets[i]) / this->actionTimer;
+ if (array[i] >= sChooseFileYOffsets[i]) {
+ array[i] -= yStep;
+ } else {
+ array[i] += yStep;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->actionButtonAlpha[FS_BTN_ACTION_COPY] -= 50;
this->actionButtonAlpha[FS_BTN_ACTION_ERASE] -= 50;
this->optionButtonAlpha -= 50;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] += 25;
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] += 25;
+#else
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_COPY] -= 50;
+ array[FS_BTN_ACTION_ERASE] -= 50;
+ this->optionButtonAlpha -= 50;
+ array[FS_BTN_ACTION_QUIT] += 25;
+#endif
if (this->actionButtonAlpha[FS_BTN_ACTION_COPY] <= 0) {
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->optionButtonAlpha = 0;
}
+#if !PLATFORM_IQUE
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
+#else
+ array = this->titleAlpha;
+ array[0] -= 31;
+ array[1] += 31;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
@@ -676,10 +1114,25 @@ void FileSelect_SetupEraseSelect(GameState* thisx) {
XREG(35) = XREG(36);
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->optionButtonAlpha = 0;
- this->confirmButtonAlpha[1] = 200;
+
+#if !PLATFORM_IQUE
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] = 200;
+#else
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_QUIT] = 200;
+#endif
+
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
this->buttonIndex = FS_BTN_ERASE_QUIT;
this->configMode++;
}
@@ -757,22 +1210,56 @@ void FileSelect_SetupEraseConfirm1(GameState* thisx) {
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 3; i++) {
if (i != this->buttonIndex) {
this->fileButtonAlpha[i] -= 25;
if (SLOT_OCCUPIED(sramCtx, i)) {
- this->connectorAlpha[i] -= 31;
this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
+ this->connectorAlpha[i] -= 31;
}
} else {
this->nameBoxAlpha[i] -= 25;
}
}
+#else
+ for (i = 0; i < 3; i++) {
+ if (i != this->buttonIndex) {
+ array = this->fileButtonAlpha;
+ array[i] -= 25;
+
+ if (SLOT_OCCUPIED(sramCtx, i)) {
+ s16* nameBoxAlpha = this->nameBoxAlpha;
+ s16* nameAlpha = this->nameAlpha;
+ s16* fileButtonAlpha = this->fileButtonAlpha;
+
+ nameBoxAlpha[i] = nameAlpha[i] = fileButtonAlpha[i];
+
+ array = this->connectorAlpha;
+ array[i] -= 31;
+ }
+ } else {
+ array = this->nameBoxAlpha;
+ array[i] -= 25;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] -= 15;
this->titleAlpha[1] += 15;
+#else
+ array = this->titleAlpha;
+ array[0] -= 15;
+ array[1] += 15;
+#endif
+#if !PLATFORM_IQUE
yStep = ABS(this->buttonYOffsets[this->buttonIndex] - D_808124AC[this->buttonIndex]) / this->actionTimer;
if (this->buttonYOffsets[this->buttonIndex] >= D_808124AC[this->buttonIndex]) {
@@ -780,24 +1267,63 @@ void FileSelect_SetupEraseConfirm1(GameState* thisx) {
} else {
this->buttonYOffsets[this->buttonIndex] += yStep;
}
+#else
+ array = this->buttonYOffsets;
+ yStep = ABS(array[this->buttonIndex] - D_808124AC[this->buttonIndex]) / this->actionTimer;
+
+ if (array[this->buttonIndex] >= D_808124AC[this->buttonIndex]) {
+ array[this->buttonIndex] -= yStep;
+ } else {
+ array[this->buttonIndex] += yStep;
+ }
+#endif
this->actionTimer--;
if (this->actionTimer == 0) {
+#if !PLATFORM_IQUE
for (i = 0; i < 3; i++) {
if (i != this->buttonIndex) {
this->fileButtonAlpha[i] = 0;
if (SLOT_OCCUPIED(sramCtx, i)) {
+ this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i];
this->connectorAlpha[i] = 0;
- this->nameBoxAlpha[i] = this->nameAlpha[i] = this->fileButtonAlpha[i] = 0;
}
} else {
this->nameBoxAlpha[i] = 0;
}
}
+#else
+ for (i = 0; i < 3; i++) {
+ if (i != this->buttonIndex) {
+ array = this->fileButtonAlpha;
+ array[i] = 0;
+ if (SLOT_OCCUPIED(sramCtx, i)) {
+ s16* nameBoxAlpha = this->nameBoxAlpha;
+ s16* nameAlpha = this->nameAlpha;
+ s16* fileButtonAlpha = this->fileButtonAlpha;
+
+ nameBoxAlpha[i] = nameAlpha[i] = fileButtonAlpha[i];
+
+ array = this->connectorAlpha;
+ array[i] = 0;
+ }
+ } else {
+ array = this->nameBoxAlpha;
+ array[i] = 0;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->buttonYOffsets[this->buttonIndex] = D_808124AC[this->buttonIndex];
+#else
+ array = this->buttonYOffsets;
+ array[this->buttonIndex] = D_808124AC[this->buttonIndex];
+#endif
+
this->actionTimer = 8;
this->configMode++;
}
@@ -809,20 +1335,44 @@ void FileSelect_SetupEraseConfirm1(GameState* thisx) {
*/
void FileSelect_SetupEraseConfirm2(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
- this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] += 25;
+#if !PLATFORM_IQUE
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] += 25;
this->titleAlpha[0] -= 15;
this->titleAlpha[1] += 15;
this->fileInfoAlpha[this->buttonIndex] += 25;
+#else
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_YES] += 25;
+ array = this->titleAlpha;
+ array[0] -= 15;
+ array[1] += 15;
+ array = this->fileInfoAlpha;
+ array[this->buttonIndex] += 25;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
this->actionTimer = 8;
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->fileInfoAlpha[this->buttonIndex] = this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] = 200;
- this->buttonIndex = FS_BTN_ERASE_FILE_2;
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] = 200;
+#else
+ array = this->titleAlpha;
+ this->fileInfoAlpha[this->buttonIndex] = array[0] = 255;
+ array[1] = 0;
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_YES] = 200;
+#endif
+
+ this->buttonIndex = FS_BTN_CONFIRM_QUIT;
this->configMode = CM_ERASE_CONFIRM;
}
}
@@ -865,15 +1415,35 @@ void FileSelect_EraseConfirm(GameState* thisx) {
*/
void FileSelect_ExitToEraseSelect1(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
this->fileInfoAlpha[this->buttonIndex] -= 25;
this->nameBoxAlpha[this->buttonIndex] += 25;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] -= 25;
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] -= 25;
+#else
+ array = this->fileInfoAlpha;
+ array[this->buttonIndex] -= 25;
+ array = this->nameBoxAlpha;
+ array[this->buttonIndex] += 25;
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_YES] -= 25;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
this->actionTimer = 8;
+
+#if !PLATFORM_IQUE
this->fileInfoAlpha[this->buttonIndex] = 0;
+#else
+ array = this->fileInfoAlpha;
+ array[this->buttonIndex] = 0;
+#endif
+
this->configMode++;
}
}
@@ -887,7 +1457,11 @@ void FileSelect_ExitToEraseSelect2(GameState* thisx) {
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
yStep = ABS(this->buttonYOffsets[this->buttonIndex] - sChooseFileYOffsets[this->buttonIndex]) / this->actionTimer;
if (this->buttonYOffsets[this->buttonIndex] >= sChooseFileYOffsets[this->buttonIndex]) {
@@ -895,7 +1469,18 @@ void FileSelect_ExitToEraseSelect2(GameState* thisx) {
} else {
this->buttonYOffsets[this->buttonIndex] += yStep;
}
+#else
+ array = this->buttonYOffsets;
+ yStep = ABS(array[this->buttonIndex] - sChooseFileYOffsets[this->buttonIndex]) / this->actionTimer;
+ if (array[this->buttonIndex] >= sChooseFileYOffsets[this->buttonIndex]) {
+ array[this->buttonIndex] -= yStep;
+ } else {
+ array[this->buttonIndex] += yStep;
+ }
+#endif
+
+#if !PLATFORM_IQUE
for (i = 0; i < 3; i++) {
if (i != this->buttonIndex) {
this->fileButtonAlpha[i] += 25;
@@ -906,18 +1491,58 @@ void FileSelect_ExitToEraseSelect2(GameState* thisx) {
}
}
}
+#else
+ for (i = 0; i < 3; i++) {
+ if (i != this->buttonIndex) {
+ array = this->fileButtonAlpha;
+ array[i] += 25;
+ if (SLOT_OCCUPIED(sramCtx, i)) {
+ s16* nameBoxAlpha = this->nameBoxAlpha;
+ s16* nameAlpha = this->nameAlpha;
+ s16* fileButtonAlpha = this->fileButtonAlpha;
+
+ nameBoxAlpha[i] = nameAlpha[i] = fileButtonAlpha[i];
+
+ array = this->connectorAlpha;
+ array[i] += 31;
+ }
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
+#else
+ array = this->titleAlpha;
+ array[0] -= 31;
+ array[1] += 31;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
+#if !PLATFORM_IQUE
this->buttonYOffsets[this->buttonIndex] = sChooseFileYOffsets[this->buttonIndex];
+#else
+ array = this->buttonYOffsets;
+ array[this->buttonIndex] = sChooseFileYOffsets[this->buttonIndex];
+#endif
+
this->actionTimer = 8;
this->buttonIndex = FS_BTN_ERASE_QUIT;
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
this->configMode = CM_ERASE_SELECT;
}
}
@@ -931,6 +1556,9 @@ void FileSelect_EraseAnim1(GameState* thisx) {
static s16 D_80813800;
FileSelectState* this = (FileSelectState*)thisx;
SramContext* sramCtx = &this->sramCtx;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
if (sEraseDelayTimer == 0) {
if (this->actionTimer == 8) {
@@ -938,28 +1566,54 @@ void FileSelect_EraseAnim1(GameState* thisx) {
}
if (this->actionTimer != 0) {
+#if !PLATFORM_IQUE
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
this->fileInfoAlpha[this->selectedFileIndex] -= 25;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] -= 25;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] -= 25;
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] -= 25;
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] -= 25;
+#else
+ array = this->titleAlpha;
+ array[0] -= 31;
+ array[1] += 31;
+ array = this->fileInfoAlpha;
+ array[this->selectedFileIndex] -= 25;
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_YES] -= 25;
+ array[FS_BTN_ACTION_QUIT] -= 25;
+#endif
}
+#if !PLATFORM_IQUE
this->fileNamesY[this->selectedFileIndex] -= D_80813800;
- this->actionTimer--;
+#else
+ array = this->fileNamesY;
+ array[this->selectedFileIndex] -= D_80813800;
+#endif
+
D_80813800 += 2;
+ this->actionTimer--;
if (this->actionTimer == 0) {
Sram_EraseSave(this, sramCtx);
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = this->connectorAlpha[this->selectedFileIndex] = 0;
-
- // probably a fake match, there should be a better chained assignment
- this->confirmButtonAlpha[0] = this->confirmButtonAlpha[1] = 0;
- if (1) {}
this->fileInfoAlpha[this->selectedFileIndex] = this->nameBoxAlpha[this->selectedFileIndex] =
- this->confirmButtonAlpha[1];
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] = this->actionButtonAlpha[FS_BTN_ACTION_QUIT] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = this->connectorAlpha[this->selectedFileIndex] = 0;
+ array = this->fileInfoAlpha;
+ array[this->selectedFileIndex] = 0;
+ array = this->nameBoxAlpha;
+ array[this->selectedFileIndex] = 0;
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_YES] = array[FS_BTN_ACTION_QUIT] = 0;
+#endif
this->configMode++;
this->actionTimer = 90;
@@ -1001,7 +1655,11 @@ void FileSelect_EraseAnim3(GameState* thisx) {
SramContext* sramCtx = &this->sramCtx;
s16 i;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 5; i++) {
yStep = ABS(this->buttonYOffsets[i]) / this->actionTimer;
@@ -1011,7 +1669,20 @@ void FileSelect_EraseAnim3(GameState* thisx) {
this->buttonYOffsets[i] += yStep;
}
}
+#else
+ array = this->buttonYOffsets;
+ for (i = 0; i < 5; i++) {
+ yStep = ABS(array[i]) / this->actionTimer;
+ if (array[i] >= 0) {
+ array[i] -= yStep;
+ } else {
+ array[i] += yStep;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
for (i = 0; i < 3; i++) {
this->fileButtonAlpha[i] += 25;
@@ -1020,30 +1691,88 @@ void FileSelect_EraseAnim3(GameState* thisx) {
this->connectorAlpha[i] += 31;
}
}
+#else
+ for (i = 0; i < 3; i++) {
+ array = this->fileButtonAlpha;
+ array[i] += 25;
+ if (SLOT_OCCUPIED(sramCtx, i)) {
+ s16* nameBoxAlpha = this->nameBoxAlpha;
+ s16* nameAlpha = this->nameAlpha;
+ s16* fileButtonAlpha = this->fileButtonAlpha;
+
+ nameBoxAlpha[i] = nameAlpha[i] = fileButtonAlpha[i];
+
+ array = this->connectorAlpha;
+ array[i] += 31;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
if (this->fileButtonAlpha[this->selectedFileIndex] >= 200) {
this->fileButtonAlpha[this->selectedFileIndex] = 200;
}
+#else
+ array = this->fileButtonAlpha;
+ if (array[this->selectedFileIndex] >= 200) {
+ array[this->selectedFileIndex] = 200;
+ }
+#endif
+#if !PLATFORM_IQUE
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
+#else
+ array = this->titleAlpha;
+ array[0] -= 31;
+ array[1] += 31;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
+#if !PLATFORM_IQUE
this->fileNamesY[this->selectedFileIndex] = 0;
+#else
+ array = this->fileNamesY;
+ array[this->selectedFileIndex] = 0;
+#endif
+
this->highlightColor[3] = 70;
this->highlightPulseDir = 1;
XREG(35) = XREG(36);
+
+#if !PLATFORM_IQUE
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = 200;
- this->confirmButtonAlpha[0] = this->confirmButtonAlpha[1] = 0;
+ this->actionButtonAlpha[FS_BTN_ACTION_YES] = this->actionButtonAlpha[FS_BTN_ACTION_QUIT] = 0;
+#else
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_COPY] = 200;
+ array[FS_BTN_ACTION_YES] = array[FS_BTN_ACTION_QUIT] = 0;
+#endif
+
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
this->configMode = CM_MAIN_MENU;
}
+#if !PLATFORM_IQUE
this->optionButtonAlpha = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->actionButtonAlpha[FS_BTN_ACTION_COPY];
+#else
+ array = this->actionButtonAlpha;
+ this->optionButtonAlpha = array[FS_BTN_ACTION_ERASE] = array[FS_BTN_ACTION_COPY];
+#endif
}
/**
@@ -1054,7 +1783,11 @@ void FileSelect_ExitEraseToMain(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 i;
s16 yStep;
+#if PLATFORM_IQUE
+ s16* array;
+#endif
+#if !PLATFORM_IQUE
for (i = 0; i < 5; i++) {
yStep = ABS(this->buttonYOffsets[i]) / this->actionTimer;
@@ -1064,32 +1797,84 @@ void FileSelect_ExitEraseToMain(GameState* thisx) {
this->buttonYOffsets[i] += yStep;
}
}
+#else
+ array = this->buttonYOffsets;
+ for (i = 0; i < 5; i++) {
+ yStep = ABS(array[i]) / this->actionTimer;
+ if (array[i] >= 0) {
+ array[i] -= yStep;
+ } else {
+ array[i] += yStep;
+ }
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->actionButtonAlpha[FS_BTN_ACTION_COPY] += 25;
this->actionButtonAlpha[FS_BTN_ACTION_ERASE] += 25;
this->optionButtonAlpha += 25;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] -= 50;
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] -= 50;
- if (this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] <= 0) {
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] = 0;
+ if (this->actionButtonAlpha[FS_BTN_ACTION_QUIT] <= 0) {
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] = 0;
}
+#else
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_COPY] += 25;
+ array[FS_BTN_ACTION_ERASE] += 25;
+ this->optionButtonAlpha += 25;
+ array[FS_BTN_ACTION_QUIT] -= 50;
+ if (array[FS_BTN_ACTION_QUIT] <= 0) {
+ array[FS_BTN_ACTION_QUIT] = 0;
+ }
+#endif
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] -= 31;
this->titleAlpha[1] += 31;
+#else
+ array = this->titleAlpha;
+ array[0] -= 31;
+ array[1] += 31;
+#endif
+
this->actionTimer--;
if (this->actionTimer == 0) {
this->highlightColor[3] = 70;
this->highlightPulseDir = 1;
XREG(35) = XREG(36);
+
+#if !PLATFORM_IQUE
this->actionButtonAlpha[FS_BTN_ACTION_COPY] = 200;
- this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] = 0;
+ this->actionButtonAlpha[FS_BTN_ACTION_QUIT] = 0;
+#else
+ array = this->actionButtonAlpha;
+ array[FS_BTN_ACTION_COPY] = 200;
+ array[FS_BTN_ACTION_QUIT] = 0;
+#endif
+
this->titleLabel = this->nextTitleLabel;
+
+#if !PLATFORM_IQUE
this->titleAlpha[0] = 255;
this->titleAlpha[1] = 0;
+#else
+ array = this->titleAlpha;
+ array[0] = 255;
+ array[1] = 0;
+#endif
+
this->configMode = CM_MAIN_MENU;
}
+#if !PLATFORM_IQUE
this->optionButtonAlpha = this->actionButtonAlpha[FS_BTN_ACTION_ERASE] =
this->actionButtonAlpha[FS_BTN_ACTION_COPY];
+#else
+ array = this->actionButtonAlpha;
+ this->optionButtonAlpha = array[FS_BTN_ACTION_ERASE] = array[FS_BTN_ACTION_COPY];
+#endif
}
diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c b/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c
index 35f7684a1e..bc7ae7edc1 100644
--- a/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c
+++ b/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c
@@ -1,6 +1,21 @@
#include "file_select.h"
+#include "file_select_state.h"
+
+#include "array_count.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "language_array.h"
+#include "printf.h"
+#include "regs.h"
+#include "rumble.h"
+#include "sfx.h"
+#include "sys_matrix.h"
#include "terminal.h"
#include "versions.h"
+#include "z64audio.h"
+#include "z64save.h"
+
#include "assets/textures/title_static/title_static.h"
#include "assets/overlays/ovl_file_choose/ovl_file_choose.h"
@@ -16,7 +31,7 @@ void FileSelect_DrawCharacter(GraphicsContext* gfxCtx, void* texture, s16 vtx) {
#if OOT_NTSC
void FileSelect_DrawCharacterTransition(GraphicsContext* gfxCtx, void* texture1, void* texture2, s16 vtx) {
- OPEN_DISPS(gfxCtx, "", 0);
+ OPEN_DISPS(gfxCtx, "../z_file_nameset_PAL.c", UNK_LINE);
gDPLoadTextureBlock_4b(POLY_OPA_DISP++, texture1, G_IM_FMT_I, 16, 16, 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);
@@ -24,26 +39,30 @@ void FileSelect_DrawCharacterTransition(GraphicsContext* gfxCtx, void* texture1,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
- CLOSE_DISPS(gfxCtx, "", 0);
+ CLOSE_DISPS(gfxCtx, "../z_file_nameset_PAL.c", UNK_LINE);
}
#endif
#if OOT_PAL
-static s16 D_808124C0[] = {
- 0x0002, 0x0003, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0001, 0x0002, 0x0000, 0x0001,
- 0x0001, 0x0002, 0x0001, 0x0001, 0x0004, 0x0002, 0x0002, 0x0002, 0x0001, 0x0001, 0x0000, 0x0002, 0x0000, 0x0001,
- 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0001, 0x0001, 0x0001, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0003,
- 0x0002, 0x0002, 0x0004, 0x0003, 0x0002, 0x0004, 0x0001, 0x0002, 0x0002, 0x0001, 0x0001, 0x0002, 0x0002, 0x0003,
- 0x0002, 0x0002, 0x0000, 0x0002, 0x0002, 0x0002, 0x0000, 0x0003, 0x0001, 0x0000,
+
+#if OOT_VERSION >= PAL_1_1
+s16 D_808124C0[] = {
+ 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 0, 1, 1, 2, 1, 1, 4, 2, 2, 2, 1, 1, 0, 2, 0, 1, 1, 1, 1, 1, 0,
+ 1, 1, 1, 2, 2, 2, 2, 2, 3, 2, 2, 4, 3, 2, 4, 1, 2, 2, 1, 1, 2, 2, 3, 2, 2, 0, 2, 2, 2, 0, 3, 1, 0,
+};
+#endif
+
+s16 D_80812544[] = {
+#if OOT_VERSION < PAL_1_1
+ 1, 2, 0, 1, 1, 2, 1, 2, 4, 2, 2, 2, 1, 1, 0, 2, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 2, 2, 3,
+ 2, 2, 4, 3, 2, 4, 1, 2, 2, 1, 1, 2, 2, 3, 2, 2, 0, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3,
+#else
+ // Differs only at index 7
+ 1, 2, 0, 1, 1, 2, 1, 1, 4, 2, 2, 2, 1, 1, 0, 2, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 2, 2, 3,
+ 2, 2, 4, 3, 2, 4, 1, 2, 2, 1, 1, 2, 2, 3, 2, 2, 0, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3,
+#endif
};
-static s16 D_80812544[] = {
- 0x0001, 0x0002, 0x0000, 0x0001, 0x0001, 0x0002, 0x0001, 0x0001, 0x0004, 0x0002, 0x0002, 0x0002, 0x0001,
- 0x0001, 0x0000, 0x0002, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0001, 0x0001, 0x0001,
- 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0003, 0x0002, 0x0002, 0x0004, 0x0003, 0x0002, 0x0004, 0x0001,
- 0x0002, 0x0002, 0x0001, 0x0001, 0x0002, 0x0002, 0x0003, 0x0002, 0x0002, 0x0000, 0x0002, 0x0002, 0x0002,
- 0x0003, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0001, 0x0003,
-};
#endif
void FileSelect_SetKeyboardVtx(GameState* thisx) {
@@ -60,7 +79,7 @@ void FileSelect_SetKeyboardVtx(GameState* thisx) {
phi_s1 = 0x26;
#if OOT_NTSC
- for (phi_t2 = 0, phi_s2 = 0, phi_t3 = 0; phi_s2 < 5; phi_s2++) {
+ for (phi_s2 = 0, phi_t3 = 0; phi_s2 < 5; phi_s2++) {
for (phi_t0 = -0x60, phi_t1 = 0; phi_t1 < 13; phi_t1++, phi_t3 += 4) {
this->keyboardVtx[phi_t3].v.ob[0] = this->keyboardVtx[phi_t3 + 2].v.ob[0] = phi_t0;
this->keyboardVtx[phi_t3 + 1].v.ob[0] = this->keyboardVtx[phi_t3 + 3].v.ob[0] = phi_t0 + 12;
@@ -245,10 +264,15 @@ void FileSelect_SetNameEntryVtx(GameState* thisx) {
this->nameEntryVtx[phi_t1].v.ob[0] + 0xA;
#else
if ((phi_s0 > 0) && (phi_s0 < 9)) {
+#if OOT_VERSION >= PAL_1_1
temp = this->fileNames[this->buttonIndex][phi_s0 - 1];
this->nameEntryVtx[phi_t1].v.ob[0] = this->nameEntryVtx[phi_t1 + 2].v.ob[0] =
D_808125EC[phi_s0] + this->nameEntryBoxPosX + D_808124C0[temp];
+#else
+ this->nameEntryVtx[phi_t1].v.ob[0] = this->nameEntryVtx[phi_t1 + 2].v.ob[0] =
+ D_808125EC[phi_s0] + this->nameEntryBoxPosX;
+#endif
this->nameEntryVtx[phi_t1 + 1].v.ob[0] = this->nameEntryVtx[phi_t1 + 3].v.ob[0] =
this->nameEntryVtx[phi_t1].v.ob[0] + 0xA;
@@ -985,11 +1009,12 @@ void FileSelect_StartNameEntry(GameState* thisx) {
void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
s16 prevKbdX;
-
-#if OOT_NTSC
+#if !(PLATFORM_GC && OOT_PAL)
Input* input = &this->state.input[0];
s32 pad;
+#endif
+#if OOT_NTSC
if (this->charPage <= FS_CHAR_PAGE_ENG) {
if (CHECK_BTN_ALL(input->press.button, BTN_R)) {
if (gSaveContext.language == LANGUAGE_JPN) {
@@ -1330,18 +1355,21 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
this->configMode = CM_OPTIONS_TO_MAIN;
- sramCtx->readBuff[0] = gSaveContext.audioSetting;
+ sramCtx->readBuff[0] = gSaveContext.soundSetting;
sramCtx->readBuff[1] = gSaveContext.zTargetSetting;
+#if OOT_PAL_N64
+ sramCtx->readBuff[2] = gSaveContext.language;
+#endif
PRINTF("SAVE");
Sram_WriteSramHeader(sramCtx);
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("sram->read_buff[2] = J_N = %x\n", sramCtx->readBuff[2]);
PRINTF("sram->read_buff[2] = J_N = %x\n", &sramCtx->readBuff[2]);
- PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting);
- PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting);
- PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting);
- PRINTF(VT_RST);
- func_800F6700(gSaveContext.audioSetting);
+ PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting);
+ PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting);
+ PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting);
+ PRINTF_RST();
+ Audio_SetSoundOutputMode(gSaveContext.soundSetting);
PRINTF("終了\n");
return;
}
@@ -1351,30 +1379,53 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sSelectedSetting == FS_SETTING_AUDIO) {
- gSaveContext.audioSetting--;
+ gSaveContext.soundSetting--;
// because audio setting is unsigned, can't check for < 0
- if (gSaveContext.audioSetting > 0xF0) {
- gSaveContext.audioSetting = FS_AUDIO_SURROUND;
+ if (gSaveContext.soundSetting > 0xF0) {
+ gSaveContext.soundSetting = SOUND_SETTING_SURROUND;
}
} else {
+#if !OOT_PAL_N64
gSaveContext.zTargetSetting ^= 1;
+#else
+ if (sSelectedSetting == FS_SETTING_TARGET) {
+ gSaveContext.zTargetSetting ^= 1;
+ } else {
+ gSaveContext.language--;
+ if (gSaveContext.language >= LANGUAGE_MAX) {
+ gSaveContext.language = LANGUAGE_MAX - 1;
+ }
+ }
+#endif
}
} else if (this->stickAdjX > 30) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
if (sSelectedSetting == FS_SETTING_AUDIO) {
- gSaveContext.audioSetting++;
+ gSaveContext.soundSetting++;
- if (gSaveContext.audioSetting > FS_AUDIO_SURROUND) {
- gSaveContext.audioSetting = FS_AUDIO_STEREO;
+ if (gSaveContext.soundSetting > SOUND_SETTING_SURROUND) {
+ gSaveContext.soundSetting = SOUND_SETTING_STEREO;
}
} else {
+#if !OOT_PAL_N64
gSaveContext.zTargetSetting ^= 1;
+#else
+ if (sSelectedSetting == FS_SETTING_TARGET) {
+ gSaveContext.zTargetSetting ^= 1;
+ } else {
+ gSaveContext.language++;
+ if (gSaveContext.language >= LANGUAGE_MAX) {
+ gSaveContext.language = 0;
+ }
+ }
+#endif
}
}
+#if !OOT_PAL_N64
if ((this->stickAdjY < -30) || (this->stickAdjY > 30)) {
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -1384,19 +1435,108 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
sSelectedSetting ^= 1;
}
+#else
+ if (this->stickAdjY < -30) {
+ Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
+ &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+ sSelectedSetting++;
+ if (sSelectedSetting >= FS_SETTING_MAX) {
+ sSelectedSetting = 0;
+ }
+ } else if (this->stickAdjY > 30) {
+ Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
+ &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+ sSelectedSetting--;
+ if (sSelectedSetting >= FS_SETTING_MAX) {
+ sSelectedSetting = FS_SETTING_MAX - 1;
+ }
+ } else if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
+ Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
+ &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+ sSelectedSetting++;
+ if (sSelectedSetting >= FS_SETTING_MAX) {
+ sSelectedSetting = 0;
+ }
+ }
+#endif
}
#if OOT_NTSC
+
typedef struct OptionsMenuTextureInfo {
/* 0x00 */ void* texture[2];
/* 0x08 */ u16 width;
/* 0x0A */ u16 height;
} OptionsMenuTextureInfo; // size = 0x0C
-#define OPTIONS_MENU_TEXTURE_WIDTHS(jpn, eng, ger, fra) jpn
#define OPTIONS_MENU_TEXTURE_WIDTH(info) info.width
#define OPTIONS_MENU_TEXTURE_HEIGHT(info) info.height
+
+static OptionsMenuTextureInfo sOptionsMenuHeaders[] = {
+ { { gFileSelOptionsJPNTex, gFileSelOptionsENGTex }, 128, 16 },
+ { { gFileSelSOUNDENGTex, gFileSelSOUNDENGTex }, 64, 16 },
+ { { gFileSelZTargetingJPNTex, gFileSelZTargetingENGTex }, 64, 16 },
+ { { gFileSelCheckBrightnessJPNTex, gFileSelCheckBrightnessENGTex }, 96, 16 },
+};
+
+static OptionsMenuTextureInfo sOptionsMenuSettings[] = {
+ { { gFileSelStereoJPNTex, gFileSelStereoENGTex }, 48, 16 },
+ { { gFileSelMonoJPNTex, gFileSelMonoENGTex }, 48, 16 },
+ { { gFileSelHeadsetJPNTex, gFileSelHeadsetENGTex }, 48, 16 },
+ { { gFileSelSurroundJPNTex, gFileSelSurroundENGTex }, 48, 16 },
+ { { gFileSelSwitchJPNTex, gFileSelSwitchENGTex }, 48, 16 },
+ { { gFileSelHoldJPNTex, gFileSelHoldENGTex }, 48, 16 },
+};
+
+#elif OOT_PAL_N64
+
+static u16 sZTargetSettingWidths[2][3] = {
+ { 48, 80, 48 },
+ { 48, 80, 48 },
+};
+
+typedef struct LanguageChoiceTextureInfo {
+ /* 0x00 */ void* texture;
+ /* 0x04 */ u16 width;
+ /* 0x06 */ u16 height;
+} LanguageChoiceTextureInfo; // size = 0x10
+
+static LanguageChoiceTextureInfo sLanguageChoices[] = {
+ { gFileSelLanguageChoiceENGTex, 48, 16 },
+ { gFileSelLanguageChoiceGERTex, 48, 16 },
+ { gFileSelLanguageChoiceFRATex, 48, 16 },
+};
+
+typedef struct OptionsMenuTextureInfo {
+ /* 0x00 */ void* texture[3];
+ /* 0x0C */ u16 width;
+ /* 0x0E */ u16 height;
+} OptionsMenuTextureInfo; // size = 0x10
+
+#define OPTIONS_MENU_TEXTURE_WIDTH(info) info.width
+#define OPTIONS_MENU_TEXTURE_HEIGHT(info) info.height
+
+static OptionsMenuTextureInfo sOptionsMenuHeaders[] = {
+ { { gFileSelOptionsENGTex, gFileSelOptionsGERTex, gFileSelOptionsENGTex }, 128, 16 },
+ { { gFileSelSOUNDENGTex, gFileSelSOUNDENGTex, gFileSelSOUNDFRATex }, 64, 16 },
+ { { gFileSelZTargetingENGTex, gFileSelZTargetingGERTex, gFileSelZTargetingFRATex }, 64, 16 },
+ { { gFileSelCheckBrightnessENGTex, gFileSelCheckBrightnessGERTex, gFileSelCheckBrightnessFRATex }, 128, 16 },
+ { { gFileSelLanguageENGTex, gFileSelLanguageGERTex, gFileSelLanguageFRATex }, 64, 16 },
+};
+
+static OptionsMenuTextureInfo sOptionsMenuSettings[] = {
+ { { gFileSelStereoENGTex, gFileSelStereoENGTex, gFileSelStereoFRATex }, 48, 16 },
+ { { gFileSelMonoENGTex, gFileSelMonoENGTex, gFileSelMonoENGTex }, 48, 16 },
+ { { gFileSelHeadsetENGTex, gFileSelHeadsetGERTex, gFileSelHeadsetFRATex }, 48, 16 },
+ { { gFileSelSurroundENGTex, gFileSelSurroundENGTex, gFileSelSurroundENGTex }, 48, 16 },
+ { { gFileSelSwitchENGTex, gFileSelSwitchGERTex, gFileSelSwitchFRATex }, 48, 16 },
+ { { gFileSelHoldENGTex, gFileSelHoldGERTex, gFileSelHoldFRATex }, 48, 16 },
+ { { gFileSelSwitchENGTex, gFileSelSwitchGERTex, gFileSelSwitchFRATex }, 48, 16 },
+ { { gFileSelHoldENGTex, gFileSelHoldGERTex, gFileSelHoldFRATex }, 48, 16 },
+};
+
#else
+
typedef struct OptionsMenuTextureInfo {
/* 0x00 */ void* texture[3];
/* 0x0C */ u16 width[3];
@@ -1407,66 +1547,27 @@ typedef struct OptionsMenuTextureInfo {
{ eng, ger, fra }
#define OPTIONS_MENU_TEXTURE_WIDTH(info) info.width[gSaveContext.language]
#define OPTIONS_MENU_TEXTURE_HEIGHT(info) info.height
-#endif
static OptionsMenuTextureInfo sOptionsMenuHeaders[] = {
- {
- LANGUAGE_ARRAY(gFileSelOptionsJPNTex, gFileSelOptionsENGTex, gFileSelOptionsGERTex, gFileSelOptionsENGTex),
- OPTIONS_MENU_TEXTURE_WIDTHS(128, 128, 128, 128),
- 16,
- },
- {
- LANGUAGE_ARRAY(gFileSelSOUNDENGTex, gFileSelSOUNDENGTex, gFileSelSOUNDENGTex, gFileSelSOUNDFRATex),
- OPTIONS_MENU_TEXTURE_WIDTHS(64, 64, 64, 64),
- 16,
- },
- {
- LANGUAGE_ARRAY(gFileSelZTargetingJPNTex, gFileSelZTargetingENGTex, gFileSelZTargetingGERTex,
- gFileSelZTargetingFRATex),
- OPTIONS_MENU_TEXTURE_WIDTHS(64, 64, 144, 64),
- 16,
- },
- {
- LANGUAGE_ARRAY(gFileSelCheckBrightnessJPNTex, gFileSelCheckBrightnessENGTex, gFileSelCheckBrightnessGERTex,
- gFileSelCheckBrightnessFRATex),
- OPTIONS_MENU_TEXTURE_WIDTHS(96, 128, 128, 128),
- 16,
- },
+ { { gFileSelOptionsENGTex, gFileSelOptionsGERTex, gFileSelOptionsENGTex }, { 128, 128, 128 }, 16 },
+ { { gFileSelSOUNDENGTex, gFileSelSOUNDENGTex, gFileSelSOUNDFRATex }, { 64, 64, 64 }, 16 },
+ { { gFileSelZTargetingENGTex, gFileSelZTargetingGERTex, gFileSelZTargetingFRATex }, { 64, 144, 64 }, 16 },
+ { { gFileSelCheckBrightnessENGTex, gFileSelCheckBrightnessGERTex, gFileSelCheckBrightnessFRATex },
+ { 128, 128, 128 },
+ 16 },
};
static OptionsMenuTextureInfo sOptionsMenuSettings[] = {
- {
- LANGUAGE_ARRAY(gFileSelStereoJPNTex, gFileSelStereoENGTex, gFileSelStereoENGTex, gFileSelStereoFRATex),
- OPTIONS_MENU_TEXTURE_WIDTHS(48, 48, 48, 48),
- 16,
- },
- {
- LANGUAGE_ARRAY(gFileSelMonoJPNTex, gFileSelMonoENGTex, gFileSelMonoENGTex, gFileSelMonoENGTex),
- OPTIONS_MENU_TEXTURE_WIDTHS(48, 48, 48, 48),
- 16,
- },
- {
- LANGUAGE_ARRAY(gFileSelHeadsetJPNTex, gFileSelHeadsetENGTex, gFileSelHeadsetGERTex, gFileSelHeadsetFRATex),
- OPTIONS_MENU_TEXTURE_WIDTHS(48, 48, 48, 48),
- 16,
- },
- {
- LANGUAGE_ARRAY(gFileSelSurroundJPNTex, gFileSelSurroundENGTex, gFileSelSurroundENGTex, gFileSelSurroundENGTex),
- OPTIONS_MENU_TEXTURE_WIDTHS(48, 48, 48, 48),
- 16,
- },
- {
- LANGUAGE_ARRAY(gFileSelSwitchJPNTex, gFileSelSwitchENGTex, gFileSelSwitchGERTex, gFileSelSwitchFRATex),
- OPTIONS_MENU_TEXTURE_WIDTHS(48, 48, 80, 48),
- 16,
- },
- {
- LANGUAGE_ARRAY(gFileSelHoldJPNTex, gFileSelHoldENGTex, gFileSelHoldGERTex, gFileSelHoldFRATex),
- OPTIONS_MENU_TEXTURE_WIDTHS(48, 48, 80, 48),
- 16,
- },
+ { { gFileSelStereoENGTex, gFileSelStereoENGTex, gFileSelStereoFRATex }, { 48, 48, 48 }, 16 },
+ { { gFileSelMonoENGTex, gFileSelMonoENGTex, gFileSelMonoENGTex }, { 48, 48, 48 }, 16 },
+ { { gFileSelHeadsetENGTex, gFileSelHeadsetGERTex, gFileSelHeadsetFRATex }, { 48, 48, 48 }, 16 },
+ { { gFileSelSurroundENGTex, gFileSelSurroundENGTex, gFileSelSurroundENGTex }, { 48, 48, 48 }, 16 },
+ { { gFileSelSwitchENGTex, gFileSelSwitchGERTex, gFileSelSwitchFRATex }, { 48, 80, 48 }, 16 },
+ { { gFileSelHoldENGTex, gFileSelHoldGERTex, gFileSelHoldFRATex }, { 48, 80, 48 }, 16 },
};
+#endif
+
void FileSelect_DrawOptionsImpl(GameState* thisx) {
static s16 cursorPrimRed = 255;
static s16 cursorPrimGreen = 255;
@@ -1488,9 +1589,17 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
s16 cursorRed;
s16 cursorGreen;
s16 cursorBlue;
+#if !OOT_PAL_N64
s16 i;
s16 j;
s16 vtx;
+#else
+ s16 startIndex;
+ s32 endIndex;
+ s32 i;
+ s32 vtx;
+ s32 pad;
+#endif
OPEN_DISPS(this->state.gfxCtx, "../z_file_nameset_PAL.c", 848);
@@ -1556,6 +1665,8 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
#if OOT_NTSC
gSPVertex(POLY_OPA_DISP++, gOptionsMenuHeadersVtx, 32, 0);
+#elif OOT_PAL_N64
+ gSPVertex(POLY_OPA_DISP++, gOptionsMenuHeadersVtx, 24, 0);
#else
if (gSaveContext.language == LANGUAGE_GER) {
gSPVertex(POLY_OPA_DISP++, gOptionsMenuHeadersGERVtx, 32, 0);
@@ -1570,6 +1681,7 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->titleAlpha[0]);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
+#if !OOT_PAL_N64
for (i = 0, vtx = 0; i < 4; i++, vtx += 4) {
gDPLoadTextureBlock(POLY_OPA_DISP++, sOptionsMenuHeaders[i].texture[gSaveContext.language], G_IM_FMT_IA,
G_IM_SIZ_8b, OPTIONS_MENU_TEXTURE_WIDTH(sOptionsMenuHeaders[i]),
@@ -1577,9 +1689,28 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
}
+#else
+ for (i = 0, vtx = 0; i < 5; i++, vtx += 4) {
+ if (i == 2 && gSaveContext.language == LANGUAGE_GER) {
+ gDPLoadTextureBlock(POLY_OPA_DISP++, sOptionsMenuHeaders[i].texture[gSaveContext.language], G_IM_FMT_IA,
+ G_IM_SIZ_8b, 144, OPTIONS_MENU_TEXTURE_HEIGHT(sOptionsMenuHeaders[i]), 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);
+ gSP1Quadrangle(POLY_OPA_DISP++, vtx + 12, vtx + 14, vtx + 15, vtx + 13, 0);
+ } else {
+ gDPLoadTextureBlock(POLY_OPA_DISP++, sOptionsMenuHeaders[i].texture[gSaveContext.language], G_IM_FMT_IA,
+ G_IM_SIZ_8b, OPTIONS_MENU_TEXTURE_WIDTH(sOptionsMenuHeaders[i]),
+ OPTIONS_MENU_TEXTURE_HEIGHT(sOptionsMenuHeaders[i]), 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);
+ gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
+ }
+ }
+#endif
#if OOT_NTSC
gSPVertex(POLY_OPA_DISP++, gOptionsMenuSettingsVtx, 32, 0);
+#elif OOT_PAL_N64
+ gSPVertex(POLY_OPA_DISP++, gOptionsMenuSettingsVtx, 32, 0);
#else
if (gSaveContext.language == LANGUAGE_GER) {
gSPVertex(POLY_OPA_DISP++, gOptionsMenuSettingsGERVtx, 32, 0);
@@ -1590,7 +1721,7 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
for (i = 0, vtx = 0; i < 4; i++, vtx += 4) {
gDPPipeSync(POLY_OPA_DISP++);
- if (i == gSaveContext.audioSetting) {
+ if (i == gSaveContext.soundSetting) {
if (sSelectedSetting == FS_SETTING_AUDIO) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, cursorPrimRed, cursorPrimGreen, cursorPrimBlue,
this->titleAlpha[0]);
@@ -1613,6 +1744,7 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
}
+#if !OOT_PAL_N64
for (; i < 6; i++, vtx += 4) {
gDPPipeSync(POLY_OPA_DISP++);
@@ -1630,15 +1762,74 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
}
+#ifndef AVOID_UB
//! @bug Mistakenly using sOptionsMenuHeaders instead of sOptionsMenuSettings for the height.
//! This is also an OOB read that happens to access the height of the first two elements in
//! sOptionsMenuSettings, and since all heights are 16, it works out anyway.
+#define sOptionsMenuSettingsBug sOptionsMenuHeaders
+#else
+ // Avoid UB: Use the correct array for the heights to avoid reading out of bounds memory that may not
+ // happen to work out nicely.
+#define sOptionsMenuSettingsBug sOptionsMenuSettings
+#endif
gDPLoadTextureBlock(POLY_OPA_DISP++, sOptionsMenuSettings[i].texture[gSaveContext.language], G_IM_FMT_IA,
G_IM_SIZ_8b, OPTIONS_MENU_TEXTURE_WIDTH(sOptionsMenuSettings[i]),
- OPTIONS_MENU_TEXTURE_HEIGHT(sOptionsMenuHeaders[i]), 0, G_TX_NOMIRROR | G_TX_WRAP,
+ OPTIONS_MENU_TEXTURE_HEIGHT(sOptionsMenuSettingsBug[i]), 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);
+#undef sOptionsMenuSettingsBug
gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
}
+#else
+ if (gSaveContext.language == LANGUAGE_GER) {
+ endIndex = 8;
+ startIndex = 6;
+ i += 2;
+ vtx += 8;
+ } else {
+ endIndex = 6;
+ startIndex = 4;
+ }
+
+ for (; i < endIndex; i++, vtx += 4) {
+ s32 j = i - startIndex;
+
+ gDPPipeSync(POLY_OPA_DISP++);
+
+ if (j == gSaveContext.zTargetSetting) {
+ if (sSelectedSetting == FS_SETTING_TARGET) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, cursorPrimRed, cursorPrimGreen, cursorPrimBlue,
+ this->titleAlpha[0]);
+ gDPSetEnvColor(POLY_OPA_DISP++, cursorEnvRed, cursorEnvGreen, cursorEnvBlue, 0xFF);
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->titleAlpha[0]);
+ gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
+ }
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 120, 120, 120, this->titleAlpha[0]);
+ gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
+ }
+
+#ifndef AVOID_UB
+ //! @bug Mistakenly using sOptionsMenuHeaders instead of sOptionsMenuSettings for the height.
+ //! This is also an OOB read that happens to access the height of up to the first three elements
+ //! in sOptionsMenuSettings, and since all heights are 16, it works out anyway.
+#define sOptionsMenuSettingsBug sOptionsMenuHeaders
+#else
+ // Avoid UB: Use the correct array for the heights to avoid reading out of bounds memory that may not
+ // happen to work out nicely.
+#define sOptionsMenuSettingsBug sOptionsMenuSettings
+#endif
+ gDPLoadTextureBlock(POLY_OPA_DISP++, sOptionsMenuSettings[i].texture[gSaveContext.language], G_IM_FMT_IA,
+ G_IM_SIZ_8b, sZTargetSettingWidths[j][gSaveContext.language],
+ OPTIONS_MENU_TEXTURE_HEIGHT(sOptionsMenuSettingsBug[i]), 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);
+#undef sOptionsMenuSettingsBug
+ gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
+ }
+
+ gSPVertex(POLY_OPA_DISP++, gOptionsMenuBrightnessVtx, 8, 0);
+ vtx = 0;
+#endif
gDPPipeSync(POLY_OPA_DISP++);
@@ -1659,6 +1850,33 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
vtx += 4;
+#if OOT_PAL_N64
+ gSPVertex(POLY_OPA_DISP++, gOptionsMenuLanguageVtx, 12, 0);
+
+ for (i = 0, vtx = 0; i != LANGUAGE_MAX; i++, vtx += 4) {
+ gDPPipeSync(POLY_OPA_DISP++);
+
+ if (i == gSaveContext.language) {
+ if (sSelectedSetting == FS_SETTING_LANGUAGE) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, cursorPrimRed, cursorPrimGreen, cursorPrimBlue,
+ this->titleAlpha[0]);
+ gDPSetEnvColor(POLY_OPA_DISP++, cursorEnvRed, cursorEnvGreen, cursorEnvBlue, 0xFF);
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->titleAlpha[0]);
+ gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
+ }
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 120, 120, 120, this->titleAlpha[0]);
+ gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
+ }
+
+ gDPLoadTextureBlock(POLY_OPA_DISP++, sLanguageChoices[i].texture, G_IM_FMT_IA, G_IM_SIZ_8b,
+ sLanguageChoices[i].width, sLanguageChoices[i].height, 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);
+ gSP1Quadrangle(POLY_OPA_DISP++, vtx, vtx + 2, vtx + 3, vtx + 1, 0);
+ }
+#endif
+
// blue divider lines
gDPPipeSync(POLY_OPA_DISP++);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 255, 255, this->titleAlpha[0]);
@@ -1690,6 +1908,15 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
Matrix_Pop();
+#if OOT_PAL_N64
+ Matrix_Push();
+ Matrix_Translate(0.0f, 0.8f, 0.0f, MTXMODE_APPLY);
+ MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, this->state.gfxCtx, "../z_file_nameset_PAL.c", UNK_LINE);
+ gSPVertex(POLY_OPA_DISP++, gOptionsDividerLanguageVtx, 4, 0);
+ gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
+ Matrix_Pop();
+#endif
+
CLOSE_DISPS(this->state.gfxCtx, "../z_file_nameset_PAL.c", 1040);
}
diff --git a/src/overlays/gamestates/ovl_opening/z_opening.c b/src/overlays/gamestates/ovl_opening/z_opening.c
index 7b24564cfc..ad36b6e205 100644
--- a/src/overlays/gamestates/ovl_opening/z_opening.c
+++ b/src/overlays/gamestates/ovl_opening/z_opening.c
@@ -4,7 +4,15 @@
* Description: Initializes the game into the title screen
*/
-#include "global.h"
+#include "gfx.h"
+#include "regs.h"
+#include "sys_matrix.h"
+#include "title_setup_state.h"
+#include "z64game.h"
+#include "z64play.h"
+#include "z64save.h"
+#include "z64sram.h"
+#include "z64view.h"
void TitleSetup_SetupTitleScreen(TitleSetupState* this) {
gSaveContext.gameMode = GAMEMODE_TITLE_SCREEN;
diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c
index 6ccf547b91..84b1cb69ae 100644
--- a/src/overlays/gamestates/ovl_select/z_select.c
+++ b/src/overlays/gamestates/ovl_select/z_select.c
@@ -4,15 +4,30 @@
* Description: Debug Scene Select Menu
*/
-#include "ultra64.h"
-#include "global.h"
-#include "terminal.h"
+#include "libc64/qrand.h"
+#include "libu64/gfxprint.h"
#include "alloca.h"
-#include "z64.h"
-
+#include "array_count.h"
+#include "console_logo_state.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "map_select_state.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "printf.h"
+#include "regs.h"
+#include "segment_symbols.h"
+#include "seqcmd.h"
+#include "sequence.h"
+#include "sfx.h"
+#include "terminal.h"
+#include "translation.h"
+#include "ultra64.h"
+#include "z64play.h"
+#include "z64save.h"
+#include "z64sram.h"
void MapSelect_LoadTitle(MapSelectState* this) {
this->state.running = false;
@@ -20,9 +35,9 @@ void MapSelect_LoadTitle(MapSelectState* this) {
}
void MapSelect_LoadGame(MapSelectState* this, s32 entranceIndex) {
- PRINTF(VT_FGCOL(BLUE));
+ PRINTF_COLOR_BLUE();
PRINTF("\n\n\nFILE_NO=%x\n\n\n", gSaveContext.fileNum);
- PRINTF(VT_RST);
+ PRINTF_RST();
if (gSaveContext.fileNum == 0xFF) {
Sram_InitDebugSave();
// Set the fill target to be the saved magic amount
@@ -63,8 +78,7 @@ void func_80800B08_unknown(MapSelectState* this, s32 arg1) {
}
#endif
-// "Translation" (Actual name)
-static SceneSelectEntry sScenes[] = {
+static MapSelectEntry sMapSelectEntries[] = {
{ " 1:SPOT00", MapSelect_LoadGame, ENTR_HYRULE_FIELD_0 },
{ " 2:SPOT01", MapSelect_LoadGame, ENTR_KAKARIKO_VILLAGE_0 },
{ " 3:SPOT02", MapSelect_LoadGame, ENTR_GRAVEYARD_0 },
@@ -84,228 +98,189 @@ static SceneSelectEntry sScenes[] = {
{ "17:SPOT17", MapSelect_LoadGame, ENTR_DEATH_MOUNTAIN_CRATER_0 },
{ "18:SPOT18", MapSelect_LoadGame, ENTR_GORON_CITY_0 },
{ "19:SPOT20", MapSelect_LoadGame, ENTR_LON_LON_RANCH_0 },
- // "20: Chamber of Time"
- { "20:" GFXP_HIRAGANA "トキノマ", MapSelect_LoadGame, ENTR_TEMPLE_OF_TIME_0 },
- // "21: Chamber of the Sages"
- { "21:" GFXP_HIRAGANA "ケンジャノマ", MapSelect_LoadGame, ENTR_CHAMBER_OF_THE_SAGES_0 },
- // "22: Target Range"
- { "22:" GFXP_HIRAGANA "シャテキジョウ", MapSelect_LoadGame, ENTR_SHOOTING_GALLERY_0 },
- // "23: Hyrule Garden Game"
- { "23:" GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ニワ" GFXP_KATAKANA "ゲーム", MapSelect_LoadGame,
+ { "20:" T(GFXP_HIRAGANA "トキノマ", "Chamber of Time"), MapSelect_LoadGame, ENTR_TEMPLE_OF_TIME_0 },
+ { "21:" T(GFXP_HIRAGANA "ケンジャノマ", "Chamber of the Sages"), MapSelect_LoadGame, ENTR_CHAMBER_OF_THE_SAGES_0 },
+ { "22:" T(GFXP_HIRAGANA "シャテキジョウ", "Target Range"), MapSelect_LoadGame, ENTR_SHOOTING_GALLERY_0 },
+ { "23:" T(GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ニワ" GFXP_KATAKANA "ゲーム", "Hyrule Garden Game"), MapSelect_LoadGame,
ENTR_CASTLE_COURTYARD_GUARDS_DAY_0 },
- // "24: Grave Dive Hole"
- { "24:" GFXP_HIRAGANA "ハカシタトビコミアナ", MapSelect_LoadGame, ENTR_REDEAD_GRAVE_0 },
- // "25: Grave Dive Hole 2"
- { "25:" GFXP_HIRAGANA "ハカシタトビコミアナ 2", MapSelect_LoadGame, ENTR_GRAVE_WITH_FAIRYS_FOUNTAIN_0 },
- // "26: Royal Family's Grave"
- { "26:" GFXP_HIRAGANA "オウケ ノ ハカアナ", MapSelect_LoadGame, ENTR_ROYAL_FAMILYS_TOMB_0 },
- // "27: Great Fairy's Fountain"
- { "27:" GFXP_HIRAGANA "ダイヨウセイノイズミ", MapSelect_LoadGame, ENTR_GREAT_FAIRYS_FOUNTAIN_MAGIC_0 },
- // "28: Fairy Dive Hole"
- { "28:" GFXP_HIRAGANA "トビコミ ヨウセイ アナ", MapSelect_LoadGame, ENTR_FAIRYS_FOUNTAIN_0 },
- // "29: Magic Stone Fairy's Fountain"
- { "29:" GFXP_HIRAGANA "マホウセキ ヨウセイノイズミ", MapSelect_LoadGame, ENTR_GREAT_FAIRYS_FOUNTAIN_SPELLS_0 },
- // "30: Final Battle With Ganon"
- { "30:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "サイシュウセン", MapSelect_LoadGame, ENTR_GANONS_TOWER_COLLAPSE_EXTERIOR_0 },
- // "31: Hyrule Inner Garden"
- { "31:" GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ナカニワ", MapSelect_LoadGame, ENTR_CASTLE_COURTYARD_ZELDA_0 },
- // "32: Fishing"
- { "32:" GFXP_HIRAGANA "ツリボリ", MapSelect_LoadGame, ENTR_FISHING_POND_0 },
- // "33: Bombchu Bowling"
- { "33:" GFXP_KATAKANA "ボムチュウボーリング", MapSelect_LoadGame, ENTR_BOMBCHU_BOWLING_ALLEY_0 },
- // "34: Lon Lon Ranch - Storehouse 1" (Talon's House)
- { "34:" GFXP_KATAKANA "ロンロン" GFXP_HIRAGANA "ボクジョウ ソウコ 1", MapSelect_LoadGame, ENTR_LON_LON_BUILDINGS_0 },
- // "35: Lon Lon Ranch - Storehouse 2" (Ranch Silo)
- { "35:" GFXP_KATAKANA "ロンロン" GFXP_HIRAGANA "ボクジョウ ソウコ 2", MapSelect_LoadGame, ENTR_LON_LON_BUILDINGS_1 },
- // "36: Lookout Hut"
- { "36:" GFXP_HIRAGANA "ミハリ ゴヤ", MapSelect_LoadGame, ENTR_MARKET_GUARD_HOUSE_0 },
- // "37: Magic Potion Shop"
- { "37:" GFXP_HIRAGANA "マホウ ノ クスリヤ", MapSelect_LoadGame, ENTR_POTION_SHOP_GRANNY_0 },
- // "38: Treasure Chest Shop"
- { "38:" GFXP_HIRAGANA "タカラバコヤ", MapSelect_LoadGame, ENTR_TREASURE_BOX_SHOP_0 },
- // "39: Gold Skulltula House"
- { "39:" GFXP_HIRAGANA "キン " GFXP_KATAKANA "スタルチュラ ハウス", MapSelect_LoadGame, ENTR_HOUSE_OF_SKULLTULA_0 },
- // "40: Castle Town - Entrance" (Market Entrance)
- { "40:" GFXP_HIRAGANA "ジョウカマチ イリグチ", MapSelect_LoadGame, ENTR_MARKET_ENTRANCE_DAY_0 },
- // "41: Castle Town" (Market)
- { "41:" GFXP_HIRAGANA "ジョウカマチ", MapSelect_LoadGame, ENTR_MARKET_DAY_0 },
- // "42: Back Alley" (Back Alley)
- { "42:" GFXP_HIRAGANA "ウラロジ", MapSelect_LoadGame, ENTR_BACK_ALLEY_DAY_0 },
- // "43: In Front of the Temple of Time" (Temple of Time Exterior)
- { "43:" GFXP_HIRAGANA "トキノシンデン マエ", MapSelect_LoadGame, ENTR_TEMPLE_OF_TIME_EXTERIOR_DAY_0 },
- // "44: Link's House"
- { "44:" GFXP_HIRAGANA "リンクノイエ", MapSelect_LoadGame, ENTR_LINKS_HOUSE_0 },
- // "45: Kakariko Village Row House"
- { "45:" GFXP_KATAKANA "カカリコ" GFXP_HIRAGANA "ムラノナガヤ", MapSelect_LoadGame, ENTR_KAKARIKO_CENTER_GUEST_HOUSE_0 },
- // "46: Back Alley House"
- { "46:" GFXP_HIRAGANA "ウラロジノ イエ", MapSelect_LoadGame, ENTR_BACK_ALLEY_HOUSE_0 },
- // "47: Kokiri Village - Know-It-All Brothers' House"
- { "47:" GFXP_HIRAGANA "コキリノムラ モノシリキョウダイノイエ", MapSelect_LoadGame, ENTR_KNOW_IT_ALL_BROS_HOUSE_0 },
- // "48: Kokiri Village - Twins' House"
- { "48:" GFXP_HIRAGANA "コキリノムラ フタゴノイエ", MapSelect_LoadGame, ENTR_TWINS_HOUSE_0 },
- // "49: Kokiri Village - Mido's House"
- { "49:" GFXP_HIRAGANA "コキリノムラ " GFXP_KATAKANA "ミド" GFXP_HIRAGANA "ノイエ", MapSelect_LoadGame, ENTR_MIDOS_HOUSE_0 },
- // "50: Kokiri Village - Saria's House"
- { "50:" GFXP_HIRAGANA "コキリノムラ " GFXP_KATAKANA "サリア" GFXP_HIRAGANA "ノイエ", MapSelect_LoadGame, ENTR_SARIAS_HOUSE_0 },
- // "51: Stable"
- { "51:" GFXP_HIRAGANA "ウマゴヤ", MapSelect_LoadGame, ENTR_STABLE_0 },
- // "52: Grave Keeper's House"
- { "52:" GFXP_HIRAGANA "ハカモリノイエ", MapSelect_LoadGame, ENTR_GRAVEKEEPERS_HUT_0 },
- // "53: Back Alley - Dog Lady's House"
- { "53:" GFXP_HIRAGANA "ウラロジ イヌオバサンノイエ", MapSelect_LoadGame, ENTR_DOG_LADY_HOUSE_0 },
- // "54: Kakariko Village - Impa's House"
- { "54:" GFXP_HIRAGANA "カカリコムラ " GFXP_KATAKANA "インパ" GFXP_HIRAGANA "ノイエ", MapSelect_LoadGame, ENTR_IMPAS_HOUSE_0 },
- // "55: Hylia Laboratory"
- { "55:" GFXP_KATAKANA "ハイリア" GFXP_HIRAGANA " ケンキュウジョ", MapSelect_LoadGame, ENTR_LAKESIDE_LABORATORY_0 },
- // "56: Tent"
- { "56:" GFXP_KATAKANA "テント", MapSelect_LoadGame, ENTR_CARPENTERS_TENT_0 },
- // "57: Shield Shop"
- { "57:" GFXP_HIRAGANA "タテノミセ", MapSelect_LoadGame, ENTR_BAZAAR_0 },
- // "58: Kokiri Shop"
- { "58:" GFXP_HIRAGANA "コキリゾクノミセ", MapSelect_LoadGame, ENTR_KOKIRI_SHOP_0 },
- // "59: Goron Shop"
- { "59:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA "ノミセ", MapSelect_LoadGame, ENTR_GORON_SHOP_0 },
- // "60: Zora Shop"
- { "60:" GFXP_KATAKANA "ゾーラ" GFXP_HIRAGANA "ノミセ", MapSelect_LoadGame, ENTR_ZORA_SHOP_0 },
- // "61: Kakariko Village - Potion Shop"
- { "61:" GFXP_KATAKANA "カカリコ" GFXP_HIRAGANA "ムラ クスリヤ", MapSelect_LoadGame, ENTR_POTION_SHOP_KAKARIKO_0 },
- // "62: Castle Town - Potion Shop"
- { "62:" GFXP_HIRAGANA "ジョウカマチ クスリヤ", MapSelect_LoadGame, ENTR_POTION_SHOP_MARKET_0 },
- // "63: Back Alley - Night Shop"
- { "63:" GFXP_HIRAGANA "ウラロジ ヨルノミセ", MapSelect_LoadGame, ENTR_BOMBCHU_SHOP_0 },
- // "64: Mask Shop"
- { "64:" GFXP_HIRAGANA "オメンヤ", MapSelect_LoadGame, ENTR_HAPPY_MASK_SHOP_0 },
- // "65: Gerudo Training Area"
- { "65:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ノシュウレンジョウ", MapSelect_LoadGame, ENTR_GERUDO_TRAINING_GROUND_0 },
- // "66: Fairy Tree Dungeon"
- { "66:" GFXP_HIRAGANA "ヨウセイノキノ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_DEKU_TREE_0 },
- // "67: Fairy Tree Dungeon - Boss"
- { "67:" GFXP_HIRAGANA "ヨウセイノキノ " GFXP_KATAKANA "ダンジョン ボス", MapSelect_LoadGame, ENTR_DEKU_TREE_BOSS_0 },
- // "68: Dondogo Dungeon"
- { "68:" GFXP_KATAKANA "ドドンゴ ダンジョン", MapSelect_LoadGame, ENTR_DODONGOS_CAVERN_0 },
- // "69: Dondogo Dungeon - Boss"
- { "69:" GFXP_KATAKANA "ドドンゴ ダンジョン ボス", MapSelect_LoadGame, ENTR_DODONGOS_CAVERN_BOSS_0 },
- // "70: Giant Fish Dungeon"
- { "70:" GFXP_HIRAGANA "キョダイギョ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_JABU_JABU_0 },
- // "71: Giant Fish Dungeon - Boss"
- { "71:" GFXP_HIRAGANA "キョダイギョ " GFXP_KATAKANA "ダンジョン ボス", MapSelect_LoadGame, ENTR_JABU_JABU_BOSS_0 },
- // "72: Forest Temple"
- { "72:" GFXP_HIRAGANA "モリノシンデン", MapSelect_LoadGame, ENTR_FOREST_TEMPLE_0 },
- // "73: Forest Temple - Boss"
- { "73:" GFXP_HIRAGANA "モリノシンデン " GFXP_KATAKANA "ボス", MapSelect_LoadGame, ENTR_FOREST_TEMPLE_BOSS_0 },
- // "74: Dungeon Below the Well"
- { "74:" GFXP_HIRAGANA "イドシタ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_BOTTOM_OF_THE_WELL_0 },
- // "75: Dungeon Beneath the Graves"
- { "75:" GFXP_HIRAGANA "ハカシタ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_SHADOW_TEMPLE_0 },
- // "76: Dungeon Beneath the Graves - Boss"
- { "76:" GFXP_HIRAGANA "ハカシタ " GFXP_KATAKANA "ダンジョン ボス", MapSelect_LoadGame, ENTR_SHADOW_TEMPLE_BOSS_0 },
- // "77: Fire Temple"
- { "77:" GFXP_HIRAGANA "ヒノシンデン", MapSelect_LoadGame, ENTR_FIRE_TEMPLE_0 },
- // "78: Fire Temple - Boss"
- { "78:" GFXP_HIRAGANA "ヒノシンデン " GFXP_KATAKANA "ボス", MapSelect_LoadGame, ENTR_FIRE_TEMPLE_BOSS_0 },
- // "79: Water Temple"
- { "79:" GFXP_HIRAGANA "ミズノシンデン", MapSelect_LoadGame, ENTR_WATER_TEMPLE_0 },
- // "80: Water Temple - Boss"
- { "80:" GFXP_HIRAGANA "ミズノシンデン " GFXP_KATAKANA "ボス", MapSelect_LoadGame, ENTR_WATER_TEMPLE_BOSS_0 },
- // "81: Evil Goddess Statue Dungeon"
- { "81:" GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame, ENTR_SPIRIT_TEMPLE_0 },
- // "82: Evil Goddess Statue Dungeon - Iron Knuckle" (Iron Knuckle's Lair)
- { "82:" GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン アイアンナック", MapSelect_LoadGame, ENTR_SPIRIT_TEMPLE_BOSS_0 },
- // "83: Evil Goddess Statue Dungeon - Boss" (Twinrova's Lair)
- { "83:" GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン ボス", MapSelect_LoadGame, ENTR_SPIRIT_TEMPLE_BOSS_2 },
- // "84: Ganon's Tower"
- { "84:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ", MapSelect_LoadGame, ENTR_GANONS_TOWER_0 },
- // "85: Ganon's Tower - Boss"
- { "85:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ" GFXP_KATAKANA "ボス", MapSelect_LoadGame, ENTR_GANONDORF_BOSS_0 },
- // "86: Ice Cavern"
- { "86:" GFXP_HIRAGANA "コオリノドウクツ", MapSelect_LoadGame, ENTR_ICE_CAVERN_0 },
- // "87: Relay Beneath the Graves" (Dampé's Grave)
- { "87:" GFXP_HIRAGANA "ハカシタ" GFXP_KATAKANA "リレー", MapSelect_LoadGame, ENTR_WINDMILL_AND_DAMPES_GRAVE_0 },
- // "88: Ganon's Basement Dungeon"
- { "88:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "チカ " GFXP_KATAKANA "ダンジョン", MapSelect_LoadGame,
- ENTR_INSIDE_GANONS_CASTLE_0 },
- // "89: Final Battle With Ganon - Cutscene & Battle"
- { "89:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "サイシュウセン " GFXP_KATAKANA "デモ & バトル", MapSelect_LoadGame,
- ENTR_GANON_BOSS_0 },
- // "90: Ganon's Tower Aftermath 1" (Escaping Ganon's Tower 1)
- { "90:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 1", MapSelect_LoadGame,
+ { "24:" T(GFXP_HIRAGANA "ハカシタトビコミアナ", "Grave Dive Hole"), MapSelect_LoadGame, ENTR_REDEAD_GRAVE_0 },
+ { "25:" T(GFXP_HIRAGANA "ハカシタトビコミアナ 2", "Grave Dive Hole 2"), MapSelect_LoadGame,
+ ENTR_GRAVE_WITH_FAIRYS_FOUNTAIN_0 },
+ { "26:" T(GFXP_HIRAGANA "オウケ ノ ハカアナ", "Royal Family's Grave"), MapSelect_LoadGame, ENTR_ROYAL_FAMILYS_TOMB_0 },
+ { "27:" T(GFXP_HIRAGANA "ダイヨウセイノイズミ", "Great Fairy's Fountain"), MapSelect_LoadGame,
+ ENTR_GREAT_FAIRYS_FOUNTAIN_MAGIC_0 },
+ { "28:" T(GFXP_HIRAGANA "トビコミ ヨウセイ アナ", "Fairy Dive Hole"), MapSelect_LoadGame, ENTR_FAIRYS_FOUNTAIN_0 },
+ { "29:" T(GFXP_HIRAGANA "マホウセキ ヨウセイノイズミ", "Magic Stone Fairy's Fountain"), MapSelect_LoadGame,
+ ENTR_GREAT_FAIRYS_FOUNTAIN_SPELLS_0 },
+ { "30:" T(GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "サイシュウセン", "Final Battle With Ganon"), MapSelect_LoadGame,
+ ENTR_GANONS_TOWER_COLLAPSE_EXTERIOR_0 },
+ { "31:" T(GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ナカニワ", "Hyrule Inner Garden"), MapSelect_LoadGame,
+ ENTR_CASTLE_COURTYARD_ZELDA_0 },
+ { "32:" T(GFXP_HIRAGANA "ツリボリ", "Fishing"), MapSelect_LoadGame, ENTR_FISHING_POND_0 },
+ { "33:" T(GFXP_KATAKANA "ボムチュウボーリング", "Bombchu Bowling"), MapSelect_LoadGame, ENTR_BOMBCHU_BOWLING_ALLEY_0 },
+ // Talon's House
+ { "34:" T(GFXP_KATAKANA "ロンロン" GFXP_HIRAGANA "ボクジョウ ソウコ 1", "Lon Lon Ranch - Storehouse 1"), MapSelect_LoadGame,
+ ENTR_LON_LON_BUILDINGS_0 },
+ // Ranch Silo
+ { "35:" T(GFXP_KATAKANA "ロンロン" GFXP_HIRAGANA "ボクジョウ ソウコ 2", "Lon Lon Ranch - Storehouse 2"), MapSelect_LoadGame,
+ ENTR_LON_LON_BUILDINGS_1 },
+ { "36:" T(GFXP_HIRAGANA "ミハリ ゴヤ", "Lookout Hut"), MapSelect_LoadGame, ENTR_MARKET_GUARD_HOUSE_0 },
+ { "37:" T(GFXP_HIRAGANA "マホウ ノ クスリヤ", "Magic Potion Shop"), MapSelect_LoadGame, ENTR_POTION_SHOP_GRANNY_0 },
+ { "38:" T(GFXP_HIRAGANA "タカラバコヤ", "Treasure Chest Shop"), MapSelect_LoadGame, ENTR_TREASURE_BOX_SHOP_0 },
+ { "39:" T(GFXP_HIRAGANA "キン " GFXP_KATAKANA "スタルチュラ ハウス", "Gold Skulltula House"), MapSelect_LoadGame,
+ ENTR_HOUSE_OF_SKULLTULA_0 },
+ { "40:" T(GFXP_HIRAGANA "ジョウカマチ イリグチ", "Castle Town - Entrance"), MapSelect_LoadGame,
+ ENTR_MARKET_ENTRANCE_DAY_0 },
+ { "41:" T(GFXP_HIRAGANA "ジョウカマチ", "Castle Town"), MapSelect_LoadGame, ENTR_MARKET_DAY_0 },
+ { "42:" T(GFXP_HIRAGANA "ウラロジ", "Back Alley"), MapSelect_LoadGame, ENTR_BACK_ALLEY_DAY_0 },
+ { "43:" T(GFXP_HIRAGANA "トキノシンデン マエ", "In Front of the Temple of Time"), MapSelect_LoadGame,
+ ENTR_TEMPLE_OF_TIME_EXTERIOR_DAY_0 },
+ { "44:" T(GFXP_HIRAGANA "リンクノイエ", "Link's House"), MapSelect_LoadGame, ENTR_LINKS_HOUSE_0 },
+ { "45:" T(GFXP_KATAKANA "カカリコ" GFXP_HIRAGANA "ムラノナガヤ", "Kakariko Village Row House"), MapSelect_LoadGame,
+ ENTR_KAKARIKO_CENTER_GUEST_HOUSE_0 },
+ { "46:" T(GFXP_HIRAGANA "ウラロジノ イエ", "Back Alley House"), MapSelect_LoadGame, ENTR_BACK_ALLEY_HOUSE_0 },
+ { "47:" T(GFXP_HIRAGANA "コキリノムラ モノシリキョウダイノイエ", "Kokiri Village - Know-It-All Brothers' House"), MapSelect_LoadGame,
+ ENTR_KNOW_IT_ALL_BROS_HOUSE_0 },
+ { "48:" T(GFXP_HIRAGANA "コキリノムラ フタゴノイエ", "Kokiri Village - Twins' House"), MapSelect_LoadGame,
+ ENTR_TWINS_HOUSE_0 },
+ { "49:" T(GFXP_HIRAGANA "コキリノムラ " GFXP_KATAKANA "ミド" GFXP_HIRAGANA "ノイエ", "Kokiri Village - Mido's House"),
+ MapSelect_LoadGame, ENTR_MIDOS_HOUSE_0 },
+ { "50:" T(GFXP_HIRAGANA "コキリノムラ " GFXP_KATAKANA "サリア" GFXP_HIRAGANA "ノイエ", "Kokiri Village - Saria's House"),
+ MapSelect_LoadGame, ENTR_SARIAS_HOUSE_0 },
+ { "51:" T(GFXP_HIRAGANA "ウマゴヤ", "Stable"), MapSelect_LoadGame, ENTR_STABLE_0 },
+ { "52:" T(GFXP_HIRAGANA "ハカモリノイエ", "Grave Keeper's House"), MapSelect_LoadGame, ENTR_GRAVEKEEPERS_HUT_0 },
+ { "53:" T(GFXP_HIRAGANA "ウラロジ イヌオバサンノイエ", "Back Alley - Dog Lady's House"), MapSelect_LoadGame,
+ ENTR_DOG_LADY_HOUSE_0 },
+ { "54:" T(GFXP_HIRAGANA "カカリコムラ " GFXP_KATAKANA "インパ" GFXP_HIRAGANA "ノイエ", "Kakariko Village - Impa's House"),
+ MapSelect_LoadGame, ENTR_IMPAS_HOUSE_0 },
+ { "55:" T(GFXP_KATAKANA "ハイリア" GFXP_HIRAGANA " ケンキュウジョ", "Hylia Laboratory"), MapSelect_LoadGame,
+ ENTR_LAKESIDE_LABORATORY_0 },
+ { "56:" T(GFXP_KATAKANA "テント", "Tent"), MapSelect_LoadGame, ENTR_CARPENTERS_TENT_0 },
+ { "57:" T(GFXP_HIRAGANA "タテノミセ", "Shield Shop"), MapSelect_LoadGame, ENTR_BAZAAR_0 },
+ { "58:" T(GFXP_HIRAGANA "コキリゾクノミセ", "Kokiri Shop"), MapSelect_LoadGame, ENTR_KOKIRI_SHOP_0 },
+ { "59:" T(GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA "ノミセ", "Goron Shop"), MapSelect_LoadGame, ENTR_GORON_SHOP_0 },
+ { "60:" T(GFXP_KATAKANA "ゾーラ" GFXP_HIRAGANA "ノミセ", "Zora Shop"), MapSelect_LoadGame, ENTR_ZORA_SHOP_0 },
+ { "61:" T(GFXP_KATAKANA "カカリコ" GFXP_HIRAGANA "ムラ クスリヤ", "Kakariko Village - Potion Shop"), MapSelect_LoadGame,
+ ENTR_POTION_SHOP_KAKARIKO_0 },
+ { "62:" T(GFXP_HIRAGANA "ジョウカマチ クスリヤ", "Castle Town - Potion Shop"), MapSelect_LoadGame,
+ ENTR_POTION_SHOP_MARKET_0 },
+ { "63:" T(GFXP_HIRAGANA "ウラロジ ヨルノミセ", "Back Alley - Night Shop"), MapSelect_LoadGame, ENTR_BOMBCHU_SHOP_0 },
+ { "64:" T(GFXP_HIRAGANA "オメンヤ", "Mask Shop"), MapSelect_LoadGame, ENTR_HAPPY_MASK_SHOP_0 },
+ { "65:" T(GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ノシュウレンジョウ", "Gerudo Training Area"), MapSelect_LoadGame,
+ ENTR_GERUDO_TRAINING_GROUND_0 },
+ { "66:" T(GFXP_HIRAGANA "ヨウセイノキノ " GFXP_KATAKANA "ダンジョン", "Fairy Tree Dungeon"), MapSelect_LoadGame,
+ ENTR_DEKU_TREE_0 },
+ { "67:" T(GFXP_HIRAGANA "ヨウセイノキノ " GFXP_KATAKANA "ダンジョン ボス", "Fairy Tree Dungeon - Boss"), MapSelect_LoadGame,
+ ENTR_DEKU_TREE_BOSS_0 },
+ { "68:" T(GFXP_KATAKANA "ドドンゴ ダンジョン", "Dondogo Dungeon"), MapSelect_LoadGame, ENTR_DODONGOS_CAVERN_0 },
+ { "69:" T(GFXP_KATAKANA "ドドンゴ ダンジョン ボス", "Dondogo Dungeon - Boss"), MapSelect_LoadGame,
+ ENTR_DODONGOS_CAVERN_BOSS_0 },
+ { "70:" T(GFXP_HIRAGANA "キョダイギョ " GFXP_KATAKANA "ダンジョン", "Giant Fish Dungeon"), MapSelect_LoadGame,
+ ENTR_JABU_JABU_0 },
+ { "71:" T(GFXP_HIRAGANA "キョダイギョ " GFXP_KATAKANA "ダンジョン ボス", "Giant Fish Dungeon - Boss"), MapSelect_LoadGame,
+ ENTR_JABU_JABU_BOSS_0 },
+ { "72:" T(GFXP_HIRAGANA "モリノシンデン", "Forest Temple"), MapSelect_LoadGame, ENTR_FOREST_TEMPLE_0 },
+ { "73:" T(GFXP_HIRAGANA "モリノシンデン " GFXP_KATAKANA "ボス", "Forest Temple - Boss"), MapSelect_LoadGame,
+ ENTR_FOREST_TEMPLE_BOSS_0 },
+ { "74:" T(GFXP_HIRAGANA "イドシタ " GFXP_KATAKANA "ダンジョン", "Dungeon Below the Well"), MapSelect_LoadGame,
+ ENTR_BOTTOM_OF_THE_WELL_0 },
+ { "75:" T(GFXP_HIRAGANA "ハカシタ " GFXP_KATAKANA "ダンジョン", "Dungeon Beneath the Graves"), MapSelect_LoadGame,
+ ENTR_SHADOW_TEMPLE_0 },
+ { "76:" T(GFXP_HIRAGANA "ハカシタ " GFXP_KATAKANA "ダンジョン ボス", "Dungeon Beneath the Graves - Boss"),
+ MapSelect_LoadGame, ENTR_SHADOW_TEMPLE_BOSS_0 },
+ { "77:" T(GFXP_HIRAGANA "ヒノシンデン", "Fire Temple"), MapSelect_LoadGame, ENTR_FIRE_TEMPLE_0 },
+ { "78:" T(GFXP_HIRAGANA "ヒノシンデン " GFXP_KATAKANA "ボス", "Fire Temple - Boss"), MapSelect_LoadGame,
+ ENTR_FIRE_TEMPLE_BOSS_0 },
+ { "79:" T(GFXP_HIRAGANA "ミズノシンデン", "Water Temple"), MapSelect_LoadGame, ENTR_WATER_TEMPLE_0 },
+ { "80:" T(GFXP_HIRAGANA "ミズノシンデン " GFXP_KATAKANA "ボス", "Water Temple - Boss"), MapSelect_LoadGame,
+ ENTR_WATER_TEMPLE_BOSS_0 },
+ { "81:" T(GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン", "Evil Goddess Statue Dungeon"), MapSelect_LoadGame,
+ ENTR_SPIRIT_TEMPLE_0 },
+ // Iron Knuckle's Lair
+ { "82:" T(GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン アイアンナック", "Evil Goddess Statue Dungeon - Iron Knuckle"),
+ MapSelect_LoadGame, ENTR_SPIRIT_TEMPLE_BOSS_0 },
+ // Twinrova's Lair
+ { "83:" T(GFXP_HIRAGANA "ジャシンゾウ " GFXP_KATAKANA "ダンジョン ボス", "Evil Goddess Statue Dungeon - Boss"),
+ MapSelect_LoadGame, ENTR_SPIRIT_TEMPLE_BOSS_2 },
+ { "84:" T(GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ", "Ganon's Tower"), MapSelect_LoadGame, ENTR_GANONS_TOWER_0 },
+ { "85:" T(GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ" GFXP_KATAKANA "ボス", "Ganon's Tower - Boss"), MapSelect_LoadGame,
+ ENTR_GANONDORF_BOSS_0 },
+ { "86:" T(GFXP_HIRAGANA "コオリノドウクツ", "Ice Cavern"), MapSelect_LoadGame, ENTR_ICE_CAVERN_0 },
+ // Dampé's Grave
+ { "87:" T(GFXP_HIRAGANA "ハカシタ" GFXP_KATAKANA "リレー", "Relay Beneath the Graves"), MapSelect_LoadGame,
+ ENTR_WINDMILL_AND_DAMPES_GRAVE_0 },
+ { "88:" T(GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "チカ " GFXP_KATAKANA "ダンジョン", "Ganon's Basement Dungeon"),
+ MapSelect_LoadGame, ENTR_INSIDE_GANONS_CASTLE_0 },
+ { "89:" T(GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "サイシュウセン " GFXP_KATAKANA "デモ & バトル",
+ "Final Battle With Ganon - Cutscene & Battle"),
+ MapSelect_LoadGame, ENTR_GANON_BOSS_0 },
+ { "90:" T(GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 1", "Ganon's Tower Aftermath 1"), MapSelect_LoadGame,
ENTR_GANONS_TOWER_COLLAPSE_INTERIOR_0 },
- // "91: Ganon's Tower Aftermath 2" (Escaping Ganon's Tower 2)
- { "91:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 2", MapSelect_LoadGame,
+ { "91:" T(GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 2", "Ganon's Tower Aftermath 2"), MapSelect_LoadGame,
ENTR_GANONS_TOWER_COLLAPSE_INTERIOR_2 },
- // "92: Ganon's Tower Aftermath 3" (Escaping Ganon's Tower 3)
- { "92:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 3", MapSelect_LoadGame,
+ { "92:" T(GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 3", "Ganon's Tower Aftermath 3"), MapSelect_LoadGame,
ENTR_GANONS_TOWER_COLLAPSE_INTERIOR_4 },
- // "93: Ganon's Tower Aftermath 4" (Escaping Ganon's Tower 4)
- { "93:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 4", MapSelect_LoadGame,
+ { "93:" T(GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "ノトウ ソノゴ 4", "Ganon's Tower Aftermath 4"), MapSelect_LoadGame,
ENTR_GANONS_TOWER_COLLAPSE_INTERIOR_6 },
- // "94: Ganon's Basement Aftermath"
- { "94:" GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "チカ ソノゴ", MapSelect_LoadGame, ENTR_INSIDE_GANONS_CASTLE_COLLAPSE_0 },
- // "95: Gerudo Passage 1-2" (Thieves' Hideout 1)
- { "95:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 1-2", MapSelect_LoadGame, ENTR_THIEVES_HIDEOUT_0 },
- // "96: Gerudo Passage 3-4 9-10" (Thieves' Hideout 2)
- { "96:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 3-4 9-10", MapSelect_LoadGame, ENTR_THIEVES_HIDEOUT_2 },
- // "97: Gerudo Passage 5-6" (Thieves' Hideout 3)
- { "97:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 5-6", MapSelect_LoadGame, ENTR_THIEVES_HIDEOUT_4 },
- // "98: Gerudo Passage 7-8" (Thieves' Hideout 4)
- { "98:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 7-8", MapSelect_LoadGame, ENTR_THIEVES_HIDEOUT_6 },
- // "99: Gerudo Passage 11-12" (Thieves' Hideout 5)
- { "99:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 11-12", MapSelect_LoadGame, ENTR_THIEVES_HIDEOUT_10 },
- // "100: Gerudo Passage 13" (Thieves' Hideout 6)
- { "100:" GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 13", MapSelect_LoadGame, ENTR_THIEVES_HIDEOUT_12 },
- // "101: Hidden Dive Hole 0" (Grotto 0 - Gossip Stone & Chest)
- { "101:" GFXP_HIRAGANA "カクシトビコミアナ 0", MapSelect_LoadGame, ENTR_GROTTOS_0 },
- // "102: Hidden Dive Hole 1" (Grotto 1 - Skulltula & Gold Skulltula)
- { "102:" GFXP_HIRAGANA "カクシトビコミアナ 1", MapSelect_LoadGame, ENTR_GROTTOS_1 },
- // "103: Hidden Dive Hole 2" (Grotto 2 - Business Scrub & Heart Piece)
- { "103:" GFXP_HIRAGANA "カクシトビコミアナ 2", MapSelect_LoadGame, ENTR_GROTTOS_2 },
- // "104: Hidden Dive Hole 3" (Grotto 3 - Redeads)
- { "104:" GFXP_HIRAGANA "カクシトビコミアナ 3", MapSelect_LoadGame, ENTR_GROTTOS_3 },
- // "105: Hidden Dive Hole 4" (Grotto 4 - 3 Business Scrubs)
- { "105:" GFXP_HIRAGANA "カクシトビコミアナ 4", MapSelect_LoadGame, ENTR_GROTTOS_4 },
- // "106: Hidden Dive Hole 5" (Grotto 5 - Gossip Stone, Skulltula, Cow)
- { "106:" GFXP_HIRAGANA "カクシトビコミアナ 5", MapSelect_LoadGame, ENTR_GROTTOS_5 },
- // "107: Hidden Dive Hole 6" (Grotto 6 - Octorok)
- { "107:" GFXP_HIRAGANA "カクシトビコミアナ 6", MapSelect_LoadGame, ENTR_GROTTOS_6 },
- // "108: Hidden Dive Hole 7" (Grotto 7 - Business Scrub & Deku Nut Upgrade)
- { "108:" GFXP_HIRAGANA "カクシトビコミアナ 7", MapSelect_LoadGame, ENTR_GROTTOS_7 },
- // "109: Hidden Dive Hole 8" (Grotto 8 - 2 Wolfos)
- { "109:" GFXP_HIRAGANA "カクシトビコミアナ 8", MapSelect_LoadGame, ENTR_GROTTOS_8 },
- // "110: Hidden Dive Hole 9" (Grotto 9 - Bombable Walls)
- { "110:" GFXP_HIRAGANA "カクシトビコミアナ 9", MapSelect_LoadGame, ENTR_GROTTOS_9 },
- // "111: Hidden Dive Hole 10" (Grotto 10 - 2 Business Scrubs)
- { "111:" GFXP_HIRAGANA "カクシトビコミアナ 10", MapSelect_LoadGame, ENTR_GROTTOS_10 },
- // "112: Hidden Dive Hole 11" (Grotto 11 - Tektite & Heart Piece)
- { "112:" GFXP_HIRAGANA "カクシトビコミアナ 11", MapSelect_LoadGame, ENTR_GROTTOS_11 },
- // "113: Hidden Dive Hole 12" (Grotto 12 - Deku Stage)
- { "113:" GFXP_HIRAGANA "カクシトビコミアナ 12", MapSelect_LoadGame, ENTR_GROTTOS_12 },
- // "114: Hidden Dive Hole 13" (Grotto 13 - Rupees & Cow)
- { "114:" GFXP_HIRAGANA "カクシトビコミアナ 13", MapSelect_LoadGame, ENTR_GROTTOS_13 },
- // "115: Hyrule Cutscenes"
- { "115:" GFXP_KATAKANA "ハイラル デモ", MapSelect_LoadGame, ENTR_CUTSCENE_MAP_0 },
-#if OOT_DEBUG
- // "116: Special Room (Treasure Chest Warp)" (Ganondorf Test Room)
- { "116:" GFXP_HIRAGANA "ベッシツ (タカラバコ" GFXP_KATAKANA "ワープ)", MapSelect_LoadGame, ENTR_BESITU_0 },
- // "117: Sasaki Test" (Sasa Test)
- { "117:" GFXP_HIRAGANA "ササ" GFXP_KATAKANA "テスト", MapSelect_LoadGame, ENTR_SASATEST_0 },
- // "118: Test Map" (Jungle Gym)
- { "118:" GFXP_KATAKANA "テストマップ", MapSelect_LoadGame, ENTR_TEST01_0 },
- // "119: Test Room" (Treasure Chest Room)
- { "119:" GFXP_KATAKANA "テストルーム", MapSelect_LoadGame, ENTR_TESTROOM_0 },
- // "120: Stalfos Miniboss Room" (Stalfos Miniboss Room)
- { "120:" GFXP_HIRAGANA "チュウ" GFXP_KATAKANA "スタロフォス" GFXP_HIRAGANA "ベヤ", MapSelect_LoadGame, ENTR_SYOTES_0 },
- // "121: Boss Stalfos Room" (Stalfos Boss Room)
- { "121:" GFXP_KATAKANA "ボススタロフォス" GFXP_HIRAGANA "ベヤ", MapSelect_LoadGame, ENTR_SYOTES2_0 },
- // "122: Stal" (Sutaru)
- { "122:Sutaru", MapSelect_LoadGame, ENTR_SUTARU_0 },
- // "123: Test Area"
- { "123:jikkenjyou", MapSelect_LoadGame, ENTR_TEST_SHOOTING_GALLERY_0 },
- // "124: Depth Test" (Depth Test)
- { "124:depth" GFXP_KATAKANA "テスト", MapSelect_LoadGame, ENTR_DEPTH_TEST_0 },
- // "125: Hyrule Garden Game 2" (Early Hyrule Garden Game)
- { "125:" GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ニワ" GFXP_KATAKANA "ゲーム2", MapSelect_LoadGame, ENTR_HAIRAL_NIWA2_0 },
+ { "94:" T(GFXP_KATAKANA "ガノン" GFXP_HIRAGANA "チカ ソノゴ", "Ganon's Basement Aftermath"), MapSelect_LoadGame,
+ ENTR_INSIDE_GANONS_CASTLE_COLLAPSE_0 },
+ { "95:" T(GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 1-2", "Gerudo Passage 1-2"), MapSelect_LoadGame,
+ ENTR_THIEVES_HIDEOUT_0 },
+ { "96:" T(GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 3-4 9-10", "Gerudo Passage 3-4 9-10"), MapSelect_LoadGame,
+ ENTR_THIEVES_HIDEOUT_2 },
+ { "97:" T(GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 5-6", "Gerudo Passage 5-6"), MapSelect_LoadGame,
+ ENTR_THIEVES_HIDEOUT_4 },
+ { "98:" T(GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 7-8", "Gerudo Passage 7-8"), MapSelect_LoadGame,
+ ENTR_THIEVES_HIDEOUT_6 },
+ { "99:" T(GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 11-12", "Gerudo Passage 11-12"), MapSelect_LoadGame,
+ ENTR_THIEVES_HIDEOUT_10 },
+ { "100:" T(GFXP_KATAKANA "ゲルド" GFXP_HIRAGANA "ツウロ 13", "Gerudo Passage 13"), MapSelect_LoadGame,
+ ENTR_THIEVES_HIDEOUT_12 },
+ // Gossip Stone & Chest Grotto
+ { "101:" T(GFXP_HIRAGANA "カクシトビコミアナ 0", "Hidden Dive Hole 0"), MapSelect_LoadGame, ENTR_GROTTOS_0 },
+ // Skulltula & Gold Skulltula Grotto
+ { "102:" T(GFXP_HIRAGANA "カクシトビコミアナ 1", "Hidden Dive Hole 1"), MapSelect_LoadGame, ENTR_GROTTOS_1 },
+ // Business Scrub & Heart Piece Grotto
+ { "103:" T(GFXP_HIRAGANA "カクシトビコミアナ 2", "Hidden Dive Hole 2"), MapSelect_LoadGame, ENTR_GROTTOS_2 },
+ // Redeads Grotto
+ { "104:" T(GFXP_HIRAGANA "カクシトビコミアナ 3", "Hidden Dive Hole 3"), MapSelect_LoadGame, ENTR_GROTTOS_3 },
+ // 3 Business Scrubs Grotto
+ { "105:" T(GFXP_HIRAGANA "カクシトビコミアナ 4", "Hidden Dive Hole 4"), MapSelect_LoadGame, ENTR_GROTTOS_4 },
+ // Gossip Stone, Skulltula & Cow Grotto
+ { "106:" T(GFXP_HIRAGANA "カクシトビコミアナ 5", "Hidden Dive Hole 5"), MapSelect_LoadGame, ENTR_GROTTOS_5 },
+ // Octorok Grotto
+ { "107:" T(GFXP_HIRAGANA "カクシトビコミアナ 6", "Hidden Dive Hole 6"), MapSelect_LoadGame, ENTR_GROTTOS_6 },
+ // Business Scrub & Deku Nut Upgrade Grotto
+ { "108:" T(GFXP_HIRAGANA "カクシトビコミアナ 7", "Hidden Dive Hole 7"), MapSelect_LoadGame, ENTR_GROTTOS_7 },
+ // 2 Wolfos Grotto
+ { "109:" T(GFXP_HIRAGANA "カクシトビコミアナ 8", "Hidden Dive Hole 8"), MapSelect_LoadGame, ENTR_GROTTOS_8 },
+ // Bombable Walls Grotto
+ { "110:" T(GFXP_HIRAGANA "カクシトビコミアナ 9", "Hidden Dive Hole 9"), MapSelect_LoadGame, ENTR_GROTTOS_9 },
+ // 2 Business Scrubs Grotto
+ { "111:" T(GFXP_HIRAGANA "カクシトビコミアナ 10", "Hidden Dive Hole 10"), MapSelect_LoadGame, ENTR_GROTTOS_10 },
+ // Tektite & Heart Piece Grotto
+ { "112:" T(GFXP_HIRAGANA "カクシトビコミアナ 11", "Hidden Dive Hole 11"), MapSelect_LoadGame, ENTR_GROTTOS_11 },
+ // Deku Stage Grotto
+ { "113:" T(GFXP_HIRAGANA "カクシトビコミアナ 12", "Hidden Dive Hole 12"), MapSelect_LoadGame, ENTR_GROTTOS_12 },
+ // Rupees & Cow Grotto
+ { "114:" T(GFXP_HIRAGANA "カクシトビコミアナ 13", "Hidden Dive Hole 13"), MapSelect_LoadGame, ENTR_GROTTOS_13 },
+ { "115:" T(GFXP_KATAKANA "ハイラル デモ", "Hyrule Cutscenes"), MapSelect_LoadGame, ENTR_CUTSCENE_MAP_0 },
+#if DEBUG_FEATURES
+ { "116:" T(GFXP_HIRAGANA "ベッシツ (タカラバコ" GFXP_KATAKANA "ワープ)", "Special Room (Treasure Chest Warp)"),
+ MapSelect_LoadGame, ENTR_BESITU_0 },
+ { "117:" T(GFXP_HIRAGANA "ササ" GFXP_KATAKANA "テスト", "Sasaki Test"), MapSelect_LoadGame, ENTR_SASATEST_0 },
+ { "118:" T(GFXP_KATAKANA "テストマップ", "Test Map"), MapSelect_LoadGame, ENTR_TEST01_0 },
+ { "119:" T(GFXP_KATAKANA "テストルーム", "Test Room"), MapSelect_LoadGame, ENTR_TESTROOM_0 },
+ { "120:" T(GFXP_HIRAGANA "チュウ" GFXP_KATAKANA "スタロフォス" GFXP_HIRAGANA "ベヤ", "Stalfos Miniboss Room"),
+ MapSelect_LoadGame, ENTR_SYOTES_0 },
+ { "121:" T(GFXP_KATAKANA "ボススタロフォス" GFXP_HIRAGANA "ベヤ", "Boss Stalfos Room"), MapSelect_LoadGame,
+ ENTR_SYOTES2_0 },
+ { "122:" T("Sutaru", "Stal"), MapSelect_LoadGame, ENTR_SUTARU_0 },
+ { "123:" T("jikkenjyou", "Test Area"), MapSelect_LoadGame, ENTR_TEST_SHOOTING_GALLERY_0 },
+ { "124:depth" T(GFXP_KATAKANA "テスト", "Test"), MapSelect_LoadGame, ENTR_DEPTH_TEST_0 },
+ { "125:" T(GFXP_KATAKANA "ハイラル" GFXP_HIRAGANA "ニワ" GFXP_KATAKANA "ゲーム2", "Hyrule Garden Game 2"),
+ MapSelect_LoadGame, ENTR_HAIRAL_NIWA2_0 },
#endif
- // "title" (Title Screen)
{ "title", (void*)MapSelect_LoadTitle, 0 },
#if PLATFORM_N64
{ "64DD TEST n64dd_SetDiskVersion(1)", (void*)func_80800AD0_unknown, 0 },
@@ -316,13 +291,13 @@ static SceneSelectEntry sScenes[] = {
void MapSelect_UpdateMenu(MapSelectState* this) {
Input* input = &this->state.input[0];
s32 pad;
- SceneSelectEntry* selectedScene;
+ MapSelectEntry* selectedEntry;
if (this->verticalInputAccumulator == 0) {
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START)) {
- selectedScene = &this->scenes[this->currentScene];
- if (selectedScene->loadFunc != NULL) {
- selectedScene->loadFunc(this, selectedScene->entranceIndex);
+ selectedEntry = &this->entries[this->currentEntry];
+ if (selectedEntry->loadFunc != NULL) {
+ selectedEntry->loadFunc(this, selectedEntry->entranceIndex);
}
}
@@ -460,7 +435,7 @@ void MapSelect_UpdateMenu(MapSelectState* this) {
this->pageDownIndex++;
this->pageDownIndex =
(this->pageDownIndex + ARRAY_COUNT(this->pageDownStops)) % ARRAY_COUNT(this->pageDownStops);
- this->currentScene = this->topDisplayedScene = this->pageDownStops[this->pageDownIndex];
+ this->currentEntry = this->topDisplayedEntry = this->pageDownStops[this->pageDownIndex];
}
this->verticalInputAccumulator += this->verticalInput;
@@ -469,12 +444,12 @@ void MapSelect_UpdateMenu(MapSelectState* this) {
this->verticalInput = 0;
this->verticalInputAccumulator = 0;
- this->currentScene++;
- this->currentScene = (this->currentScene + this->count) % this->count;
+ this->currentEntry++;
+ this->currentEntry = (this->currentEntry + this->count) % this->count;
- if (this->currentScene == ((this->topDisplayedScene + this->count + 19) % this->count)) {
- this->topDisplayedScene++;
- this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count;
+ if (this->currentEntry == ((this->topDisplayedEntry + this->count + 19) % this->count)) {
+ this->topDisplayedEntry++;
+ this->topDisplayedEntry = (this->topDisplayedEntry + this->count) % this->count;
}
}
@@ -482,25 +457,25 @@ void MapSelect_UpdateMenu(MapSelectState* this) {
this->verticalInput = 0;
this->verticalInputAccumulator = 0;
- if (this->currentScene == this->topDisplayedScene) {
- this->topDisplayedScene -= 2;
- this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count;
+ if (this->currentEntry == this->topDisplayedEntry) {
+ this->topDisplayedEntry -= 2;
+ this->topDisplayedEntry = (this->topDisplayedEntry + this->count) % this->count;
}
- this->currentScene--;
- this->currentScene = (this->currentScene + this->count) % this->count;
+ this->currentEntry--;
+ this->currentEntry = (this->currentEntry + this->count) % this->count;
- if (this->currentScene == ((this->topDisplayedScene + this->count) % this->count)) {
- this->topDisplayedScene--;
- this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count;
+ if (this->currentEntry == ((this->topDisplayedEntry + this->count) % this->count)) {
+ this->topDisplayedEntry--;
+ this->topDisplayedEntry = (this->topDisplayedEntry + this->count) % this->count;
}
}
- this->currentScene = (this->currentScene + this->count) % this->count;
- this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count;
+ this->currentEntry = (this->currentEntry + this->count) % this->count;
+ this->topDisplayedEntry = (this->topDisplayedEntry + this->count) % this->count;
- dREG(80) = this->currentScene;
- dREG(81) = this->topDisplayedScene;
+ dREG(80) = this->currentEntry;
+ dREG(81) = this->topDisplayedEntry;
dREG(82) = this->pageDownIndex;
if (this->timerUp != 0) {
@@ -533,14 +508,14 @@ void MapSelect_PrintMenu(MapSelectState* this, GfxPrint* printer) {
for (i = 0; i < 20; i++) {
GfxPrint_SetPos(printer, 9, i + 4);
- scene = (this->topDisplayedScene + i + this->count) % this->count;
- if (scene == this->currentScene) {
+ scene = (this->topDisplayedEntry + i + this->count) % this->count;
+ if (scene == this->currentEntry) {
GfxPrint_SetColor(printer, 255, 20, 20, 255);
} else {
GfxPrint_SetColor(printer, 200, 200, 55, 255);
}
- name = this->scenes[scene].name;
+ name = this->entries[scene].name;
if (name == NULL) {
name = "**Null**";
}
@@ -554,30 +529,19 @@ void MapSelect_PrintMenu(MapSelectState* this, GfxPrint* printer) {
}
static const char* sLoadingMessages[] = {
- // "Please wait a minute"
- GFXP_HIRAGANA "シバラクオマチクダサイ",
- // "Hold on a sec"
- GFXP_HIRAGANA "チョット マッテネ",
- // "Wait a moment"
- GFXP_KATAKANA "ウェイト ア モーメント",
- // "Loading"
- GFXP_KATAKANA "ロード" GFXP_HIRAGANA "チュウ",
- // "Now working"
- GFXP_HIRAGANA "ナウ ワーキング",
- // "Now creating"
- GFXP_HIRAGANA "イマ ツクッテマス",
- // "It's not broken"
- GFXP_HIRAGANA "コショウジャナイヨ",
- // "Coffee Break"
- GFXP_KATAKANA "コーヒー ブレイク",
- // "Please set B side"
- GFXP_KATAKANA "Bメンヲセットシテクダサイ",
- // "Be patient, now"
- GFXP_HIRAGANA "ジット" GFXP_KATAKANA "ガマン" GFXP_HIRAGANA "ノ" GFXP_KATAKANA "コ" GFXP_HIRAGANA "デアッタ",
- // "Please wait just a minute"
- GFXP_HIRAGANA "イマシバラクオマチクダサイ",
- // "Don't worry, don't worry. Take a break, take a break."
- GFXP_HIRAGANA "アワテナイアワテナイ。ヒトヤスミヒトヤスミ。",
+ T(GFXP_HIRAGANA "シバラクオマチクダサイ", "Please wait a minute"),
+ T(GFXP_HIRAGANA "チョット マッテネ", "Hold on a sec"),
+ T(GFXP_KATAKANA "ウェイト ア モーメント", "Wait a moment"),
+ T(GFXP_KATAKANA "ロード" GFXP_HIRAGANA "チュウ", "Loading"),
+ T(GFXP_HIRAGANA "ナウ ワーキング", "Now working"),
+ T(GFXP_HIRAGANA "イマ ツクッテマス", "Now creating"),
+ T(GFXP_HIRAGANA "コショウジャナイヨ", "It's not broken"),
+ T(GFXP_KATAKANA "コーヒー ブレイク", "Coffee Break"),
+ T(GFXP_KATAKANA "Bメンヲセットシテクダサイ", "Please set B side"),
+ T(GFXP_HIRAGANA "ジット" GFXP_KATAKANA "ガマン" GFXP_HIRAGANA "ノ" GFXP_KATAKANA "コ" GFXP_HIRAGANA "デアッタ",
+ "Be patient, now"),
+ T(GFXP_HIRAGANA "イマシバラクオマチクダサイ", "Please wait just a minute"),
+ T(GFXP_HIRAGANA "アワテナイアワテナイ。ヒトヤスミヒトヤスミ。", "Don't worry, don't worry. Take a break, take a break."),
};
void MapSelect_PrintLoadingMessage(MapSelectState* this, GfxPrint* printer) {
@@ -590,8 +554,8 @@ void MapSelect_PrintLoadingMessage(MapSelectState* this, GfxPrint* printer) {
}
static const char* sAgeLabels[] = {
- GFXP_HIRAGANA "17(ワカモノ)", // "17(young)"
- GFXP_HIRAGANA "5(ワカスギ)", // "5(very young)"
+ T(GFXP_HIRAGANA "17(ワカモノ)", "17(young)"),
+ T(GFXP_HIRAGANA "5(ワカスギ)", "5(very young)"),
};
void MapSelect_PrintAgeSetting(MapSelectState* this, GfxPrint* printer, s32 age) {
@@ -608,48 +572,48 @@ void MapSelect_PrintCutsceneSetting(MapSelectState* this, GfxPrint* printer, u16
switch (csIndex) {
case 0:
- label = GFXP_HIRAGANA " ヨル " GFXP_KATAKANA "ゴロン";
+ label = T(GFXP_HIRAGANA " ヨル " GFXP_KATAKANA "ゴロン", "Night");
gSaveContext.save.dayTime = CLOCK_TIME(0, 0);
break;
case 0x8000:
// clang-format off
- gSaveContext.save.dayTime = CLOCK_TIME(12, 0); label = GFXP_HIRAGANA "オヒル " GFXP_KATAKANA "ジャラ";
+ gSaveContext.save.dayTime = CLOCK_TIME(12, 0); label = T(GFXP_HIRAGANA "オヒル " GFXP_KATAKANA "ジャラ", "Day");
// clang-format on
break;
case 0xFFF0:
// clang-format off
- gSaveContext.save.dayTime = CLOCK_TIME(12, 0); label = "デモ00";
+ gSaveContext.save.dayTime = CLOCK_TIME(12, 0); label = T("デモ00", "Demo 00");
// clang-format on
break;
case 0xFFF1:
- label = "デモ01";
+ label = T("デモ01", "Demo 01");
break;
case 0xFFF2:
- label = "デモ02";
+ label = T("デモ02", "Demo 02");
break;
case 0xFFF3:
- label = "デモ03";
+ label = T("デモ03", "Demo 03");
break;
case 0xFFF4:
- label = "デモ04";
+ label = T("デモ04", "Demo 04");
break;
case 0xFFF5:
- label = "デモ05";
+ label = T("デモ05", "Demo 05");
break;
case 0xFFF6:
- label = "デモ06";
+ label = T("デモ06", "Demo 06");
break;
case 0xFFF7:
- label = "デモ07";
+ label = T("デモ07", "Demo 07");
break;
case 0xFFF8:
- label = "デモ08";
+ label = T("デモ08", "Demo 08");
break;
case 0xFFF9:
- label = "デモ09";
+ label = T("デモ09", "Demo 09");
break;
case 0xFFFA:
- label = "デモ0A";
+ label = T("デモ0A", "Demo 0A");
break;
};
@@ -731,8 +695,8 @@ void MapSelect_Main(GameState* thisx) {
void MapSelect_Destroy(GameState* thisx) {
PRINTF("%c", BEL);
- // "view_cleanup will hang, so it won't be called"
- PRINTF("*** view_cleanupはハングアップするので、呼ばない ***\n");
+ PRINTF(T("*** view_cleanupはハングアップするので、呼ばない ***\n",
+ "*** view_cleanup will hang, so it won't be called ***\n"));
}
void MapSelect_Init(GameState* thisx) {
@@ -740,9 +704,9 @@ void MapSelect_Init(GameState* thisx) {
this->state.main = MapSelect_Main;
this->state.destroy = MapSelect_Destroy;
- this->scenes = sScenes;
- this->topDisplayedScene = 0;
- this->currentScene = 0;
+ this->entries = sMapSelectEntries;
+ this->topDisplayedEntry = 0;
+ this->currentEntry = 0;
this->pageDownStops[0] = 0; // Hyrule Field
this->pageDownStops[1] = 19; // Temple Of Time
this->pageDownStops[2] = 37; // Treasure Chest Game
@@ -752,7 +716,7 @@ void MapSelect_Init(GameState* thisx) {
this->pageDownStops[6] = 91; // Escaping Ganon's Tower 3
this->pageDownIndex = 0;
this->opt = 0;
- this->count = ARRAY_COUNT(sScenes);
+ this->count = ARRAY_COUNT(sMapSelectEntries);
View_Init(&this->view, this->state.gfxCtx);
this->view.flags = (VIEW_PROJECTION_ORTHO | VIEW_VIEWPORT);
this->verticalInputAccumulator = 0;
@@ -764,8 +728,8 @@ void MapSelect_Init(GameState* thisx) {
this->unk_234 = 0;
if ((dREG(80) >= 0) && (dREG(80) < this->count)) {
- this->currentScene = dREG(80);
- this->topDisplayedScene = dREG(81);
+ this->currentEntry = dREG(80);
+ this->topDisplayedEntry = dREG(81);
this->pageDownIndex = dREG(82);
}
diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c
index 6814e24da8..588588b243 100644
--- a/src/overlays/gamestates/ovl_title/z_title.c
+++ b/src/overlays/gamestates/ovl_title/z_title.c
@@ -4,18 +4,34 @@
* Description: Displays the Nintendo Logo
*/
-#include "global.h"
-#include "alloca.h"
-#include "versions.h"
-
+#include "libu64/gfxprint.h"
#if PLATFORM_N64
#include "cic6105.h"
#include "n64dd.h"
#endif
+#include "alloca.h"
+#include "build.h"
+#include "console_logo_state.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "padmgr.h"
+#include "printf.h"
+#include "regs.h"
+#include "segment_symbols.h"
+#include "sequence.h"
+#include "sys_matrix.h"
+#include "sys_debug_controller.h"
+#include "sys_freeze.h"
+#include "title_setup_state.h"
+#include "versions.h"
+#include "z64actor.h"
+#include "z64environment.h"
+#include "z64save.h"
+
#include "assets/textures/nintendo_rogo_static/nintendo_rogo_static.h"
-#if OOT_DEBUG
+#if DEBUG_FEATURES
void ConsoleLogo_PrintBuildInfo(Gfx** gfxP) {
Gfx* gfx;
GfxPrint* printer;
@@ -40,7 +56,7 @@ void ConsoleLogo_PrintBuildInfo(Gfx** gfxP) {
#endif
void ConsoleLogo_Calc(ConsoleLogoState* this) {
-#if PLATFORM_N64
+#if !PLATFORM_GC
if ((this->coverAlpha == 0) && (this->visibleDuration != 0)) {
this->unk_1D4--;
this->visibleDuration--;
@@ -74,8 +90,8 @@ void ConsoleLogo_SetupView(ConsoleLogoState* this, f32 x, f32 y, f32 z) {
eye.y = y;
eye.z = z;
up.x = up.z = 0.0f;
- lookAt.x = lookAt.y = lookAt.z = 0.0f;
up.y = 1.0f;
+ lookAt.x = lookAt.y = lookAt.z = 0.0f;
View_SetPerspective(view, 30.0f, 10.0f, 12800.0f);
View_LookAt(view, &eye, &lookAt, &up);
@@ -92,7 +108,8 @@ void ConsoleLogo_Draw(ConsoleLogoState* this) {
Vec3f v3;
Vec3f v1;
Vec3f v2;
- s32 pad2[2];
+ s32 pad2;
+ s32 pad3;
OPEN_DISPS(this->state.gfxCtx, "../z_title.c", 395);
@@ -156,7 +173,7 @@ void ConsoleLogo_Main(GameState* thisx) {
ConsoleLogo_Calc(this);
ConsoleLogo_Draw(this);
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (gIsCtrlr2Valid) {
Gfx* gfx = POLY_OPA_DISP;
@@ -165,6 +182,10 @@ void ConsoleLogo_Main(GameState* thisx) {
}
#endif
+#if PLATFORM_IQUE
+ this->exit = true;
+#endif
+
if (this->exit) {
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.natureAmbienceId = 0xFF;
@@ -221,7 +242,7 @@ void ConsoleLogo_Init(GameState* thisx) {
this->state.destroy = ConsoleLogo_Destroy;
this->exit = false;
-#if OOT_VERSION < GC_US
+#if OOT_VERSION < GC_US || PLATFORM_IQUE
if (!(gPadMgr.validCtrlrsMask & 1)) {
gSaveContext.fileNum = 0xFEDC;
} else {
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c
index 7856b520b0..eede783f5c 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c
@@ -1,45 +1,74 @@
#include "z_kaleido_scope.h"
+
+#include "array_count.h"
+#include "controller.h"
+#include "gfx.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/textures/parameter_static/parameter_static.h"
#include "assets/textures/icon_item_static/icon_item_static.h"
+#define SONG_MAX_LENGTH 8
+
#if !PLATFORM_GC
-#define KALEIDO_COLOR_COLLECT_UNK_R 80
-#define KALEIDO_COLOR_COLLECT_UNK_G 150
-#define KALEIDO_COLOR_COLLECT_UNK_B 255
+#define QUEST_OCARINA_BTN_A_COLOR_R 80
+#define QUEST_OCARINA_BTN_A_COLOR_G 150
+#define QUEST_OCARINA_BTN_A_COLOR_B 255
#else
-#define KALEIDO_COLOR_COLLECT_UNK_R 80
-#define KALEIDO_COLOR_COLLECT_UNK_G 255
-#define KALEIDO_COLOR_COLLECT_UNK_B 150
+#define QUEST_OCARINA_BTN_A_COLOR_R 80
+#define QUEST_OCARINA_BTN_A_COLOR_G 255
+#define QUEST_OCARINA_BTN_A_COLOR_B 150
#endif
void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
- static s16 D_8082A070[][4] = {
+ static s16 sHpPrimColors[][4] = {
{ 255, 0, 0, 255 },
{ 255, 70, 0, 150 },
{ 255, 70, 0, 150 },
{ 255, 0, 0, 255 },
};
- static s16 D_8082A090[][3] = {
- { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
- { 0, 60, 0 }, { 90, 0, 0 }, { 0, 40, 110 }, { 80, 40, 0 }, { 70, 0, 90 }, { 90, 90, 0 },
+
+ // Shining medallions
+ static s16 sMedallionsEnvColors[6 + 6][3] = {
+ // Target env color when sMedallionsEnvShineState == 0
+ { 0, 0, 0 }, // QUEST_MEDALLION_FOREST
+ { 0, 0, 0 }, // QUEST_MEDALLION_FIRE
+ { 0, 0, 0 }, // QUEST_MEDALLION_WATER
+ { 0, 0, 0 }, // QUEST_MEDALLION_SPIRIT
+ { 0, 0, 0 }, // QUEST_MEDALLION_SHADOW
+ { 0, 0, 0 }, // QUEST_MEDALLION_LIGHT
+
+ // Target env color when sMedallionsEnvShineState == 2
+ { 0, 60, 0 }, // QUEST_MEDALLION_FOREST
+ { 90, 0, 0 }, // QUEST_MEDALLION_FIRE
+ { 0, 40, 110 }, // QUEST_MEDALLION_WATER
+ { 80, 40, 0 }, // QUEST_MEDALLION_SPIRIT
+ { 70, 0, 90 }, // QUEST_MEDALLION_SHADOW
+ { 90, 90, 0 }, // QUEST_MEDALLION_LIGHT
};
- static s16 D_8082A0D8[] = { 255, 255, 255, 255, 255, 255 };
- static s16 D_8082A0E4[] = { 255, 255, 255, 255, 255, 255 };
- static s16 D_8082A0F0[] = { 150, 150, 150, 150, 150, 150 };
- static s16 D_8082A0FC = 20;
- static s16 D_8082A100 = 0;
- static s16 D_8082A104 = 0;
- static s16 D_8082A108 = 0;
- static s16 D_8082A10C = 0;
- static s16 D_8082A110 = 0;
- static s16 D_8082A114 = 20;
- static s16 D_8082A118 = 0;
- static s16 D_8082A11C = 0;
- static s16 D_8082A120 = 0;
- static u8 D_8082A124[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- };
- static void* D_8082A130[] = {
+ // Current (animated) env color for each medallion
+ static s16 sMedallionsEnvRed[6] = { 255, 255, 255, 255, 255, 255 };
+ static s16 sMedallionsEnvGreen[6] = { 255, 255, 255, 255, 255, 255 };
+ static s16 sMedallionsEnvBlue[6] = { 150, 150, 150, 150, 150, 150 };
+ static s16 sMedallionsEnvTimer = 20;
+ static s16 sMedallionsEnvShineState = 0;
+
+ static s16 sHpPrimRed = 0;
+ static s16 sHpPrimGreen = 0;
+ static s16 sHpPrimBlue = 0;
+ static s16 sHpPrimAlpha = 0;
+ static s16 sHpPrimTimer = 20;
+ static s16 sHpPrimState = 0;
+
+ static s16 sPlayedSongBtnsNum = 0;
+ static s16 sPlaybackSongStartDelayTimer = 0;
+ static u8 sPlayedSongBtns[SONG_MAX_LENGTH + 1] = { 0 };
+ static void* sOcarinaBtnTextures[] = {
gOcarinaBtnIconATex, // OCARINA_BTN_A
gOcarinaBtnIconCDownTex, // OCARINA_BTN_C_DOWN
gOcarinaBtnIconCRightTex, // OCARINA_BTN_C_RIGHT
@@ -49,123 +78,200 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
static u16 D_8082A144[] = {
0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC,
};
- static s16 D_8082A150[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ static s16 sPlayedSongBtnsAlpha[SONG_MAX_LENGTH] = { 0 };
+ static s32 sUnused1 = 0;
+
+ static s16 sSongsPrimRed[] = {
+ 150, // QUEST_SONG_MINUET
+ 255, // QUEST_SONG_BOLERO
+ 100, // QUEST_SONG_SERENADE
+ 255, // QUEST_SONG_REQUIEM
+ 255, // QUEST_SONG_NOCTURNE
+ 255, // QUEST_SONG_PRELUDE
+ 255, // QUEST_SONG_LULLABY
+ 255, // QUEST_SONG_EPONA
+ 255, // QUEST_SONG_SARIA
+ 255, // QUEST_SONG_SUN
+ 255, // QUEST_SONG_TIME
+ 255, // QUEST_SONG_STORMS
};
- static s16 D_8082A164[] = {
- 150, 255, 100, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ static s16 sSongsPrimGreen[] = {
+ 255, // QUEST_SONG_MINUET
+ 80, // QUEST_SONG_BOLERO
+ 150, // QUEST_SONG_SERENADE
+ 160, // QUEST_SONG_REQUIEM
+ 100, // QUEST_SONG_NOCTURNE
+ 240, // QUEST_SONG_PRELUDE
+ 255, // QUEST_SONG_LULLABY
+ 255, // QUEST_SONG_EPONA
+ 255, // QUEST_SONG_SARIA
+ 255, // QUEST_SONG_SUN
+ 255, // QUEST_SONG_TIME
+ 255, // QUEST_SONG_STORMS
};
- static s16 D_8082A17C[] = {
- 255, 80, 150, 160, 100, 240, 255, 255, 255, 255, 255, 255,
+ static s16 sSongsPrimBlue[] = {
+ 100, // QUEST_SONG_MINUET
+ 40, // QUEST_SONG_BOLERO
+ 255, // QUEST_SONG_SERENADE
+ 0, // QUEST_SONG_REQUIEM
+ 255, // QUEST_SONG_NOCTURNE
+ 100, // QUEST_SONG_PRELUDE
+ 255, // QUEST_SONG_LULLABY
+ 255, // QUEST_SONG_EPONA
+ 255, // QUEST_SONG_SARIA
+ 255, // QUEST_SONG_SUN
+ 255, // QUEST_SONG_TIME
+ 255, // QUEST_SONG_STORMS
};
- static s16 D_8082A194[] = {
- 100, 40, 255, 0, 255, 100, 255, 255, 255, 255, 255, 255,
+
+ enum {
+ /* -3 */ CURSOR_TO_LEFT = -3, // Cursor on the "scroll to left page" position
+ /* -2 */ CURSOR_TO_RIGHT, // Cursor on the "scroll to right page" position
+ /* -1 */ CURSOR_NONE // No position in that direction, cursor stays where it is
};
- static s8 D_8082A1AC[][4] = {
- { 0x05, 0x01, 0x05, 0xFE }, { 0x00, 0x02, 0x02, 0xFE }, { 0xFF, 0x13, 0x03, 0x01 }, { 0x04, 0x02, 0x11, 0x02 },
- { 0x05, 0x03, 0x18, 0x05 }, { 0xFF, 0xFF, 0x04, 0x00 }, { 0x0C, 0xFF, 0xFD, 0x07 }, { 0x0D, 0xFF, 0x06, 0x08 },
- { 0x0E, 0xFF, 0x07, 0x09 }, { 0x0F, 0xFF, 0x08, 0x0A }, { 0x10, 0xFF, 0x09, 0x0B }, { 0x11, 0xFF, 0x0A, 0x12 },
- { 0x17, 0x06, 0xFD, 0x0D }, { 0x17, 0x07, 0x0C, 0x0E }, { 0x17, 0x08, 0x0D, 0x0F }, { 0x18, 0x09, 0x0E, 0x10 },
- { 0x18, 0x0A, 0x0F, 0x11 }, { 0x18, 0x0B, 0x10, 0x03 }, { 0x02, 0xFF, 0x0B, 0x13 }, { 0x02, 0xFF, 0x12, 0x14 },
- { 0x02, 0xFF, 0x13, 0xFE }, { 0xFF, 0x17, 0xFD, 0x16 }, { 0xFF, 0x17, 0x15, 0x18 }, { 0x15, 0x0C, 0xFD, 0x18 },
- { 0xFF, 0x10, 0x16, 0x04 }, { 0x00, 0x00, 0x00, 0x00 },
+ // Each {up, down, left, right} entry defines where the cursor can move next
+ static s8 sCursorPointLinks[][4] = {
+ /* QUEST_MEDALLION_FOREST */
+ { QUEST_MEDALLION_LIGHT, QUEST_MEDALLION_FIRE, QUEST_MEDALLION_LIGHT, CURSOR_TO_RIGHT },
+ /* QUEST_MEDALLION_FIRE */
+ { QUEST_MEDALLION_FOREST, QUEST_MEDALLION_WATER, QUEST_MEDALLION_WATER, CURSOR_TO_RIGHT },
+ /* QUEST_MEDALLION_WATER */ { CURSOR_NONE, QUEST_GORON_RUBY, QUEST_MEDALLION_SPIRIT, QUEST_MEDALLION_FIRE },
+ /* QUEST_MEDALLION_SPIRIT */
+ { QUEST_MEDALLION_SHADOW, QUEST_MEDALLION_WATER, QUEST_SONG_STORMS, QUEST_MEDALLION_WATER },
+ /* QUEST_MEDALLION_SHADOW */
+ { QUEST_MEDALLION_LIGHT, QUEST_MEDALLION_SPIRIT, QUEST_HEART_PIECE, QUEST_MEDALLION_LIGHT },
+ /* QUEST_MEDALLION_LIGHT */ { CURSOR_NONE, CURSOR_NONE, QUEST_MEDALLION_SHADOW, QUEST_MEDALLION_FOREST },
+ /* QUEST_SONG_MINUET */ { QUEST_SONG_LULLABY, CURSOR_NONE, CURSOR_TO_LEFT, QUEST_SONG_BOLERO },
+ /* QUEST_SONG_BOLERO */ { QUEST_SONG_EPONA, CURSOR_NONE, QUEST_SONG_MINUET, QUEST_SONG_SERENADE },
+ /* QUEST_SONG_SERENADE */ { QUEST_SONG_SARIA, CURSOR_NONE, QUEST_SONG_BOLERO, QUEST_SONG_REQUIEM },
+ /* QUEST_SONG_REQUIEM */ { QUEST_SONG_SUN, CURSOR_NONE, QUEST_SONG_SERENADE, QUEST_SONG_NOCTURNE },
+ /* QUEST_SONG_NOCTURNE */ { QUEST_SONG_TIME, CURSOR_NONE, QUEST_SONG_REQUIEM, QUEST_SONG_PRELUDE },
+ /* QUEST_SONG_PRELUDE */ { QUEST_SONG_STORMS, CURSOR_NONE, QUEST_SONG_NOCTURNE, QUEST_KOKIRI_EMERALD },
+ /* QUEST_SONG_LULLABY */ { QUEST_SKULL_TOKEN, QUEST_SONG_MINUET, CURSOR_TO_LEFT, QUEST_SONG_EPONA },
+ /* QUEST_SONG_EPONA */ { QUEST_SKULL_TOKEN, QUEST_SONG_BOLERO, QUEST_SONG_LULLABY, QUEST_SONG_SARIA },
+ /* QUEST_SONG_SARIA */ { QUEST_SKULL_TOKEN, QUEST_SONG_SERENADE, QUEST_SONG_EPONA, QUEST_SONG_SUN },
+ /* QUEST_SONG_SUN */ { QUEST_HEART_PIECE, QUEST_SONG_REQUIEM, QUEST_SONG_SARIA, QUEST_SONG_TIME },
+ /* QUEST_SONG_TIME */ { QUEST_HEART_PIECE, QUEST_SONG_NOCTURNE, QUEST_SONG_SUN, QUEST_SONG_STORMS },
+ /* QUEST_SONG_STORMS */ { QUEST_HEART_PIECE, QUEST_SONG_PRELUDE, QUEST_SONG_TIME, QUEST_MEDALLION_SPIRIT },
+ /* QUEST_KOKIRI_EMERALD */ { QUEST_MEDALLION_WATER, CURSOR_NONE, QUEST_SONG_PRELUDE, QUEST_GORON_RUBY },
+ /* QUEST_GORON_RUBY */ { QUEST_MEDALLION_WATER, CURSOR_NONE, QUEST_KOKIRI_EMERALD, QUEST_ZORA_SAPPHIRE },
+ /* QUEST_ZORA_SAPPHIRE */ { QUEST_MEDALLION_WATER, CURSOR_NONE, QUEST_GORON_RUBY, CURSOR_TO_RIGHT },
+ /* QUEST_STONE_OF_AGONY */ { CURSOR_NONE, QUEST_SKULL_TOKEN, CURSOR_TO_LEFT, QUEST_GERUDOS_CARD },
+ /* QUEST_GERUDOS_CARD */ { CURSOR_NONE, QUEST_SKULL_TOKEN, QUEST_STONE_OF_AGONY, QUEST_HEART_PIECE },
+ /* QUEST_SKULL_TOKEN */ { QUEST_STONE_OF_AGONY, QUEST_SONG_LULLABY, CURSOR_TO_LEFT, QUEST_HEART_PIECE },
+ /* QUEST_HEART_PIECE */ { CURSOR_NONE, QUEST_SONG_TIME, QUEST_GERUDOS_CARD, QUEST_MEDALLION_SHADOW },
};
+ static s32 sUnused2 = 0;
+
PauseContext* pauseCtx = &play->pauseCtx;
Input* input = &play->state.input[0];
- s16 sp226;
- s16 sp224;
- s16 sp222;
- s16 sp220;
- s16 phi_s0;
- s16 phi_s3;
- s16 sp21A;
- s16 sp218;
- s16 sp216;
- s16 phi_s7;
- s16 phi_v1;
+ s16 stepRed;
+ s16 stepGreen;
+ s16 stepBlue;
+ s16 stepAlpha;
+ s16 nextCursorPoint;
+ s16 prevCursorPoint;
+ s16 bufI;
+ s16 j;
+ s16 cursor;
+ s16 i;
+ s16 targetColorIndex;
s16 pad2;
s16 cursorItem;
- s16 sp208[3];
+ s16 gsTokenDigits[3];
OPEN_DISPS(gfxCtx, "../z_kaleido_collect.c", 248);
- if ((((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) || (pauseCtx->mainState == PAUSE_MAIN_STATE_5) ||
- (pauseCtx->mainState == PAUSE_MAIN_STATE_8)) &&
+ if ((((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) || (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PROMPT) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) &&
(pauseCtx->pageIndex == PAUSE_QUEST)) {
+
pauseCtx->cursorColorSet = 0;
if (pauseCtx->cursorSpecialPos == 0) {
pauseCtx->nameColorSet = 0;
if ((pauseCtx->state != PAUSE_STATE_MAIN) || ((pauseCtx->stickAdjX == 0) && (pauseCtx->stickAdjY == 0))) {
- sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
+ // No cursor movement
+ cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
} else {
- phi_s3 = pauseCtx->cursorPoint[PAUSE_QUEST];
+ // Move cursor based on stick input
+
+ prevCursorPoint = pauseCtx->cursorPoint[PAUSE_QUEST];
if (pauseCtx->stickAdjX < -30) {
- phi_s0 = D_8082A1AC[phi_s3][2];
- if (phi_s0 == -3) {
+ // Move cursor left
+ nextCursorPoint = sCursorPointLinks[prevCursorPoint][2];
+ if (nextCursorPoint == CURSOR_TO_LEFT) {
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
} else {
- while (phi_s0 >= 0) {
- if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
+ while (nextCursorPoint >= 0) {
+ if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, nextCursorPoint)) {
break;
}
- phi_s0 = D_8082A1AC[phi_s0][2];
+ nextCursorPoint = sCursorPointLinks[nextCursorPoint][2];
}
}
} else if (pauseCtx->stickAdjX > 30) {
- phi_s0 = D_8082A1AC[phi_s3][3];
- if (phi_s0 == -2) {
+ // Move cursor right
+ nextCursorPoint = sCursorPointLinks[prevCursorPoint][3];
+ if (nextCursorPoint == CURSOR_TO_RIGHT) {
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
} else {
- while (phi_s0 >= 0) {
- if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
+ while (nextCursorPoint >= 0) {
+ if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, nextCursorPoint)) {
break;
}
- phi_s0 = D_8082A1AC[phi_s0][3];
+ nextCursorPoint = sCursorPointLinks[nextCursorPoint][3];
}
}
}
if (pauseCtx->stickAdjY < -30) {
- phi_s0 = D_8082A1AC[phi_s3][1];
- while (phi_s0 >= 0) {
- if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
+ // Move cursor down
+ nextCursorPoint = sCursorPointLinks[prevCursorPoint][1];
+ while (nextCursorPoint >= 0) {
+ if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, nextCursorPoint)) {
break;
}
- phi_s0 = D_8082A1AC[phi_s0][1];
+ nextCursorPoint = sCursorPointLinks[nextCursorPoint][1];
}
} else if (pauseCtx->stickAdjY > 30) {
- phi_s0 = D_8082A1AC[phi_s3][0];
- while (phi_s0 >= 0) {
- if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
+ // Move cursor up
+ nextCursorPoint = sCursorPointLinks[prevCursorPoint][0];
+ while (nextCursorPoint >= 0) {
+ if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, nextCursorPoint)) {
break;
}
- phi_s0 = D_8082A1AC[phi_s0][0];
+ nextCursorPoint = sCursorPointLinks[nextCursorPoint][0];
}
}
- if (phi_s3 != pauseCtx->cursorPoint[PAUSE_QUEST]) {
+ // if the cursor point changed
+ if (pauseCtx->cursorPoint[PAUSE_QUEST] != prevCursorPoint) {
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
- if (pauseCtx->cursorPoint[PAUSE_QUEST] != 0x18) {
+ // Update cursor item and slot
+
+ if (pauseCtx->cursorPoint[PAUSE_QUEST] != QUEST_HEART_PIECE) {
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
- if (pauseCtx->cursorPoint[PAUSE_QUEST] < 6) {
- cursorItem = ITEM_MEDALLION_FOREST + pauseCtx->cursorPoint[PAUSE_QUEST];
+ if (pauseCtx->cursorPoint[PAUSE_QUEST] < QUEST_SONG_MINUET) {
+ cursorItem =
+ ITEM_MEDALLION_FOREST - QUEST_MEDALLION_FOREST + pauseCtx->cursorPoint[PAUSE_QUEST];
PRINTF("000 ccc=%d\n", cursorItem);
- } else if (pauseCtx->cursorPoint[PAUSE_QUEST] < 0x12) {
- cursorItem = ITEM_SCALE_GOLDEN + pauseCtx->cursorPoint[PAUSE_QUEST];
+ } else if (pauseCtx->cursorPoint[PAUSE_QUEST] < QUEST_KOKIRI_EMERALD) {
+ cursorItem = ITEM_SONG_MINUET - QUEST_SONG_MINUET + pauseCtx->cursorPoint[PAUSE_QUEST];
PRINTF("111 ccc=%d\n", cursorItem);
} else {
- cursorItem = ITEM_SONG_MINUET + pauseCtx->cursorPoint[PAUSE_QUEST];
- PRINTF("222 ccc=%d (%d, %d, %d)\n", cursorItem, pauseCtx->cursorPoint[PAUSE_QUEST], 0x12,
- 0x6C);
+ cursorItem =
+ ITEM_KOKIRI_EMERALD - QUEST_KOKIRI_EMERALD + pauseCtx->cursorPoint[PAUSE_QUEST];
+ PRINTF("222 ccc=%d (%d, %d, %d)\n", cursorItem, pauseCtx->cursorPoint[PAUSE_QUEST],
+ QUEST_KOKIRI_EMERALD, ITEM_KOKIRI_EMERALD);
}
} else {
cursorItem = PAUSE_ITEM_NONE;
@@ -181,272 +287,311 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
ITEM_HEART_CONTAINER, gSaveContext.save.info.inventory.questItems & 0xF0000000);
}
- sp216 = pauseCtx->cursorPoint[PAUSE_QUEST];
+ cursor = pauseCtx->cursorPoint[PAUSE_QUEST];
pauseCtx->cursorItem[pauseCtx->pageIndex] = cursorItem;
- pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
+ pauseCtx->cursorSlot[pauseCtx->pageIndex] = cursor;
}
- KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx);
+ KaleidoScope_SetCursorPos(pauseCtx, cursor * 4, pauseCtx->questVtx);
if ((pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) &&
(pauseCtx->cursorSpecialPos == 0)) {
- if ((sp216 >= QUEST_SONG_MINUET) && (sp216 < QUEST_KOKIRI_EMERALD)) {
+ if ((cursor >= QUEST_SONG_MINUET) && (cursor < QUEST_KOKIRI_EMERALD)) {
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
- sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
- pauseCtx->ocarinaSongIdx = gOcarinaSongItemMap[sp216 - QUEST_SONG_MINUET];
- D_8082A120 = 10;
+ cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
+ pauseCtx->ocarinaSongIdx = gOcarinaSongItemMap[cursor - QUEST_SONG_MINUET];
+ sPlaybackSongStartDelayTimer = 10;
- for (phi_s7 = 0; phi_s7 < 8; phi_s7++) {
- D_8082A124[phi_s7] = 0xFF;
- D_8082A150[phi_s7] = 0;
+ for (i = 0; i < SONG_MAX_LENGTH; i++) {
+ sPlayedSongBtns[i] = OCARINA_BTN_INVALID;
+ sPlayedSongBtnsAlpha[i] = 0;
}
+ sPlayedSongBtnsNum = 0;
- D_8082A11C = 0;
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
AudioOcarina_Start((1 << pauseCtx->ocarinaSongIdx) + 0x8000);
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
pauseCtx->ocarinaStaff->pos = 0;
pauseCtx->ocarinaStaff->state = 0xFF;
- VREG(21) = -62;
- VREG(22) = -56;
- VREG(23) = -49;
- VREG(24) = -46;
- VREG(25) = -41;
- pauseCtx->mainState = PAUSE_MAIN_STATE_8;
+
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_A) = -62;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_DOWN) = -56;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_RIGHT) = -49;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_LEFT) = -46;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_UP) = -41;
+
+ pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG;
+
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
}
- } else if (pauseCtx->mainState == PAUSE_MAIN_STATE_5) {
+ } else if (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PROMPT) {
+ // Abort having the player play the song if the stick is moved
if ((pauseCtx->stickAdjX != 0) || (pauseCtx->stickAdjY != 0)) {
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
+
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
- } else if (pauseCtx->mainState == PAUSE_MAIN_STATE_8) {
- if (CHECK_BTN_ALL(input->press.button, BTN_A) && (sp216 >= QUEST_SONG_MINUET) &&
- (sp216 < QUEST_KOKIRI_EMERALD)) {
- pauseCtx->mainState = PAUSE_MAIN_STATE_9;
- D_8082A120 = 10;
+ } else if (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG) {
+ if (CHECK_BTN_ALL(input->press.button, BTN_A) && (cursor >= QUEST_SONG_MINUET) &&
+ (cursor < QUEST_KOKIRI_EMERALD)) {
+
+ pauseCtx->mainState = PAUSE_MAIN_STATE_SONG_PLAYBACK_START;
+
+ sPlaybackSongStartDelayTimer = 10;
}
}
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
if (pauseCtx->stickAdjX > 30) {
- pauseCtx->cursorPoint[PAUSE_QUEST] = 0x15;
+ // Move cursor right from the "scroll to left page" position
+
+ pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_STONE_OF_AGONY;
pauseCtx->nameDisplayTimer = 0;
pauseCtx->cursorSpecialPos = 0;
- sp216 = pauseCtx->cursorPoint[PAUSE_QUEST];
- KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx);
+
+ cursor = pauseCtx->cursorPoint[PAUSE_QUEST];
+ KaleidoScope_SetCursorPos(pauseCtx, cursor * 4, pauseCtx->questVtx);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
- cursorItem = ITEM_SONG_MINUET + pauseCtx->cursorPoint[PAUSE_QUEST];
+ cursorItem = ITEM_STONE_OF_AGONY - QUEST_STONE_OF_AGONY + pauseCtx->cursorPoint[PAUSE_QUEST];
} else {
cursorItem = PAUSE_ITEM_NONE;
}
- sp216 = pauseCtx->cursorPoint[PAUSE_QUEST];
+ cursor = pauseCtx->cursorPoint[PAUSE_QUEST];
pauseCtx->cursorItem[pauseCtx->pageIndex] = cursorItem;
- pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
+ pauseCtx->cursorSlot[pauseCtx->pageIndex] = cursor;
}
- } else {
+ } else { // cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT
if (pauseCtx->stickAdjX < -30) {
- pauseCtx->cursorPoint[PAUSE_QUEST] = 0;
+ // Move cursor left from the "scroll to right page" position
+
+ pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_MEDALLION_FOREST;
pauseCtx->nameDisplayTimer = 0;
pauseCtx->cursorSpecialPos = 0;
- sp216 = pauseCtx->cursorPoint[PAUSE_QUEST];
- KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx);
+
+ cursor = pauseCtx->cursorPoint[PAUSE_QUEST];
+ KaleidoScope_SetCursorPos(pauseCtx, cursor * 4, pauseCtx->questVtx);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
+
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
- if (pauseCtx->cursorPoint[PAUSE_QUEST] < 6) {
- cursorItem = ITEM_MEDALLION_FOREST + pauseCtx->cursorPoint[PAUSE_QUEST];
- } else if (pauseCtx->cursorPoint[PAUSE_QUEST] < 0xC) {
- cursorItem = ITEM_BOMB_BAG_30 + pauseCtx->cursorPoint[PAUSE_QUEST];
+ // Only the first if may be reached, as QUEST_MEDALLION_FOREST is set above
+ if (pauseCtx->cursorPoint[PAUSE_QUEST] < QUEST_SONG_MINUET) {
+ cursorItem =
+ ITEM_MEDALLION_FOREST - QUEST_MEDALLION_FOREST + pauseCtx->cursorPoint[PAUSE_QUEST];
+ } else if (pauseCtx->cursorPoint[PAUSE_QUEST] < QUEST_SONG_LULLABY) {
+ // this would result in the wrong item
+ cursorItem = ITEM_SCALE_GOLDEN - QUEST_SONG_MINUET + pauseCtx->cursorPoint[PAUSE_QUEST];
} else {
- cursorItem = ITEM_MEDALLION_SPIRIT + pauseCtx->cursorPoint[PAUSE_QUEST];
+ // this would result in the wrong item
+ cursorItem = ITEM_DUNGEON_COMPASS - QUEST_SONG_LULLABY + pauseCtx->cursorPoint[PAUSE_QUEST];
}
} else {
cursorItem = PAUSE_ITEM_NONE;
}
- sp216 = pauseCtx->cursorPoint[PAUSE_QUEST];
+ cursor = pauseCtx->cursorPoint[PAUSE_QUEST];
pauseCtx->cursorItem[pauseCtx->pageIndex] = cursorItem;
- pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
+ pauseCtx->cursorSlot[pauseCtx->pageIndex] = cursor;
}
}
+ } else if (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PLAYBACK_START) {
+ // After a short delay, start playing the selected song back to the player
+
+ pauseCtx->cursorColorSet = 8;
+
+ if (--sPlaybackSongStartDelayTimer == 0) {
+ for (i = 0; i < SONG_MAX_LENGTH; i++) {
+ sPlayedSongBtns[i] = OCARINA_BTN_INVALID;
+ sPlayedSongBtnsAlpha[i] = 0;
+ }
+ sPlayedSongBtnsNum = 0;
+
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_A) = -62;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_DOWN) = -56;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_RIGHT) = -49;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_LEFT) = -46;
+ R_PAUSE_SONG_OCA_BTN_Y(OCARINA_BTN_C_UP) = -41;
+
+ cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
+ pauseCtx->ocarinaSongIdx = gOcarinaSongItemMap[cursor - QUEST_SONG_MINUET];
+ AudioOcarina_SetPlaybackSong(pauseCtx->ocarinaSongIdx + 1, 1);
+
+ pauseCtx->mainState = PAUSE_MAIN_STATE_SONG_PLAYBACK;
+
+ pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
+ pauseCtx->ocarinaStaff->pos = 0;
+
+ cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
+ KaleidoScope_SetCursorPos(pauseCtx, cursor * 4, pauseCtx->questVtx);
+ }
} else {
- if (pauseCtx->mainState == PAUSE_MAIN_STATE_9) {
- pauseCtx->cursorColorSet = 8;
-
- if (--D_8082A120 == 0) {
- for (phi_s7 = 0; phi_s7 < 8; phi_s7++) {
- D_8082A124[phi_s7] = 0xFF;
- D_8082A150[phi_s7] = 0;
- }
-
- D_8082A11C = 0;
- VREG(21) = -62;
- VREG(22) = -56;
- VREG(23) = -49;
- VREG(24) = -46;
- VREG(25) = -41;
- sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
- AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
- AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
- pauseCtx->ocarinaSongIdx = gOcarinaSongItemMap[sp216 - QUEST_SONG_MINUET];
- AudioOcarina_SetPlaybackSong(pauseCtx->ocarinaSongIdx + 1, 1);
- pauseCtx->mainState = PAUSE_MAIN_STATE_2;
- pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
- pauseCtx->ocarinaStaff->pos = 0;
- sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
- KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx);
- }
- } else {
- sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
- KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx);
- }
+ cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
+ KaleidoScope_SetCursorPos(pauseCtx, cursor * 4, pauseCtx->questVtx);
}
+ // Draw medallions
+ // QUEST_MEDALLION_FOREST to QUEST_MEDALLION_LIGHT
+
gDPPipeSync(POLY_OPA_DISP++);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE,
ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
- D_8082A0FC--;
+ sMedallionsEnvTimer--;
- for (sp218 = 0, sp21A = 0; sp218 < 6; sp218++, sp21A += 4) {
- if ((D_8082A100 != 1) && (D_8082A100 != 3)) {
- phi_v1 = (D_8082A100 != 0) ? sp218 + 6 : sp218;
+ for (j = 0, bufI = 0; j < QUEST_SONG_MINUET - QUEST_MEDALLION_FOREST; j++, bufI += 4) {
+ if ((sMedallionsEnvShineState != 1) && (sMedallionsEnvShineState != 3)) {
+ targetColorIndex = (sMedallionsEnvShineState != 0) ? j + 6 : j;
- if (D_8082A0FC != 0) {
- sp226 = ABS(D_8082A0D8[sp218] - D_8082A090[phi_v1][0]) / D_8082A0FC;
- sp224 = ABS(D_8082A0E4[sp218] - D_8082A090[phi_v1][1]) / D_8082A0FC;
- sp222 = ABS(D_8082A0F0[sp218] - D_8082A090[phi_v1][2]) / D_8082A0FC;
- if (D_8082A0D8[sp218] >= D_8082A090[phi_v1][0]) {
- D_8082A0D8[sp218] -= sp226;
+ if (sMedallionsEnvTimer != 0) {
+ stepRed = ABS(sMedallionsEnvRed[j] - sMedallionsEnvColors[targetColorIndex][0]) / sMedallionsEnvTimer;
+ stepGreen =
+ ABS(sMedallionsEnvGreen[j] - sMedallionsEnvColors[targetColorIndex][1]) / sMedallionsEnvTimer;
+ stepBlue = ABS(sMedallionsEnvBlue[j] - sMedallionsEnvColors[targetColorIndex][2]) / sMedallionsEnvTimer;
+ if (sMedallionsEnvRed[j] >= sMedallionsEnvColors[targetColorIndex][0]) {
+ sMedallionsEnvRed[j] -= stepRed;
} else {
- D_8082A0D8[sp218] += sp226;
+ sMedallionsEnvRed[j] += stepRed;
}
- if (D_8082A0E4[sp218] >= D_8082A090[phi_v1][1]) {
- D_8082A0E4[sp218] -= sp224;
+ if (sMedallionsEnvGreen[j] >= sMedallionsEnvColors[targetColorIndex][1]) {
+ sMedallionsEnvGreen[j] -= stepGreen;
} else {
- D_8082A0E4[sp218] += sp224;
+ sMedallionsEnvGreen[j] += stepGreen;
}
- if (D_8082A0F0[sp218] >= D_8082A090[phi_v1][2]) {
- D_8082A0F0[sp218] -= sp222;
+ if (sMedallionsEnvBlue[j] >= sMedallionsEnvColors[targetColorIndex][2]) {
+ sMedallionsEnvBlue[j] -= stepBlue;
} else {
- D_8082A0F0[sp218] += sp222;
+ sMedallionsEnvBlue[j] += stepBlue;
}
} else {
- D_8082A0D8[sp218] = D_8082A090[phi_v1][0];
- D_8082A0E4[sp218] = D_8082A090[phi_v1][1];
- D_8082A0F0[sp218] = D_8082A090[phi_v1][2];
+ sMedallionsEnvRed[j] = sMedallionsEnvColors[targetColorIndex][0];
+ sMedallionsEnvGreen[j] = sMedallionsEnvColors[targetColorIndex][1];
+ sMedallionsEnvBlue[j] = sMedallionsEnvColors[targetColorIndex][2];
}
}
- if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST + sp218)) {
+ if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST + j)) {
gDPPipeSync(POLY_OPA_DISP++);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
- gDPSetEnvColor(POLY_OPA_DISP++, D_8082A0D8[sp218], D_8082A0E4[sp218], D_8082A0F0[sp218], 0);
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
+ gDPSetEnvColor(POLY_OPA_DISP++, sMedallionsEnvRed[j], sMedallionsEnvGreen[j], sMedallionsEnvBlue[j], 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0);
- KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_MEDALLION_FOREST + sp218], QUEST_ICON_WIDTH,
+ KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_MEDALLION_FOREST + j], QUEST_ICON_WIDTH,
QUEST_ICON_HEIGHT, 0);
}
}
- if (D_8082A0FC == 0) {
- D_8082A0FC = ZREG(61 + D_8082A100);
- if (++D_8082A100 >= 4) {
- D_8082A100 = 0;
+ if (sMedallionsEnvTimer == 0) {
+ sMedallionsEnvTimer = R_PAUSE_QUEST_MEDALLION_SHINE_TIME(sMedallionsEnvShineState);
+ if (++sMedallionsEnvShineState >= 4) {
+ sMedallionsEnvShineState = 0;
}
}
+ // Draw songs
+ // QUEST_SONG_MINUET to QUEST_SONG_STORMS
+
gDPPipeSync(POLY_OPA_DISP++);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
- gDPLoadTextureBlock(POLY_OPA_DISP++, gSongNoteTex, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 24, 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);
+ gDPLoadTextureBlock(POLY_OPA_DISP++, gSongNoteTex, G_IM_FMT_IA, G_IM_SIZ_8b, gSongNoteTex_WIDTH,
+ gSongNoteTex_HEIGHT, 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);
- for (sp218 = 0; sp218 < QUEST_KOKIRI_EMERALD - QUEST_SONG_MINUET; sp218++, sp21A += 4) {
- if (CHECK_QUEST_ITEM(QUEST_SONG_MINUET + sp218)) {
- if ((QUEST_SONG_MINUET + sp218) == sp216) {
- pauseCtx->questVtx[sp21A + 0].v.ob[0] = pauseCtx->questVtx[sp21A + 2].v.ob[0] =
- pauseCtx->questVtx[sp21A + 0].v.ob[0] - 2;
+ for (j = 0; j < QUEST_KOKIRI_EMERALD - QUEST_SONG_MINUET; j++, bufI += 4) {
+ if (CHECK_QUEST_ITEM(QUEST_SONG_MINUET + j)) {
+ if ((QUEST_SONG_MINUET + j) == cursor) {
+ pauseCtx->questVtx[bufI + 0].v.ob[0] = pauseCtx->questVtx[bufI + 2].v.ob[0] =
+ pauseCtx->questVtx[bufI + 0].v.ob[0] - 2;
- pauseCtx->questVtx[sp21A + 1].v.ob[0] = pauseCtx->questVtx[sp21A + 3].v.ob[0] =
- pauseCtx->questVtx[sp21A + 1].v.ob[0] + 4;
+ pauseCtx->questVtx[bufI + 1].v.ob[0] = pauseCtx->questVtx[bufI + 3].v.ob[0] =
+ pauseCtx->questVtx[bufI + 1].v.ob[0] + 4;
- pauseCtx->questVtx[sp21A + 0].v.ob[1] = pauseCtx->questVtx[sp21A + 1].v.ob[1] =
- pauseCtx->questVtx[sp21A + 0].v.ob[1] + 2;
+ pauseCtx->questVtx[bufI + 0].v.ob[1] = pauseCtx->questVtx[bufI + 1].v.ob[1] =
+ pauseCtx->questVtx[bufI + 0].v.ob[1] + 2;
- pauseCtx->questVtx[sp21A + 2].v.ob[1] = pauseCtx->questVtx[sp21A + 3].v.ob[1] =
- pauseCtx->questVtx[sp21A + 2].v.ob[1] - 4;
+ pauseCtx->questVtx[bufI + 2].v.ob[1] = pauseCtx->questVtx[bufI + 3].v.ob[1] =
+ pauseCtx->questVtx[bufI + 2].v.ob[1] - 4;
}
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, D_8082A164[sp218], D_8082A17C[sp218], D_8082A194[sp218],
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sSongsPrimRed[j], sSongsPrimGreen[j], sSongsPrimBlue[j],
pauseCtx->alpha);
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0);
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
}
}
+ // Draw spiritual stones
+ // QUEST_KOKIRI_EMERALD, QUEST_GORON_RUBY, QUEST_ZORA_SAPPHIRE
+
gDPPipeSync(POLY_OPA_DISP++);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
- for (sp218 = 0; sp218 < 3; sp218++, sp21A += 4) {
- if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD + sp218)) {
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
- KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_KOKIRI_EMERALD + sp218], QUEST_ICON_WIDTH,
+ for (j = 0; j < QUEST_STONE_OF_AGONY - QUEST_KOKIRI_EMERALD; j++, bufI += 4) {
+ if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD + j)) {
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0);
+ KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_KOKIRI_EMERALD + j], QUEST_ICON_WIDTH,
QUEST_ICON_HEIGHT, 0);
}
}
+ // Draw QUEST_STONE_OF_AGONY, QUEST_GERUDOS_CARD, QUEST_SKULL_TOKEN
+
gDPPipeSync(POLY_OPA_DISP++);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
- for (sp218 = 0; sp218 < 3; sp218++, sp21A += 4) {
- if (CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY + sp218)) {
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
+ for (j = 0; j < QUEST_HEART_PIECE - QUEST_STONE_OF_AGONY; j++, bufI += 4) {
+ if (CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY + j)) {
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
- KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_STONE_OF_AGONY + sp218], QUEST_ICON_WIDTH,
+ KaleidoScope_DrawQuadTextureRGBA32(gfxCtx, gItemIcons[ITEM_STONE_OF_AGONY + j], QUEST_ICON_WIDTH,
QUEST_ICON_HEIGHT, 0);
}
}
- sp226 = ABS(D_8082A104 - D_8082A070[D_8082A118][0]) / D_8082A114;
- sp224 = ABS(D_8082A108 - D_8082A070[D_8082A118][1]) / D_8082A114;
- sp222 = ABS(D_8082A10C - D_8082A070[D_8082A118][2]) / D_8082A114;
- sp220 = ABS(D_8082A110 - D_8082A070[D_8082A118][3]) / D_8082A114;
- if (D_8082A104 >= D_8082A070[D_8082A118][0]) {
- D_8082A104 -= sp226;
+ // Draw heart pieces
+ // QUEST_HEART_PIECE
+
+ stepRed = ABS(sHpPrimRed - sHpPrimColors[sHpPrimState][0]) / sHpPrimTimer;
+ stepGreen = ABS(sHpPrimGreen - sHpPrimColors[sHpPrimState][1]) / sHpPrimTimer;
+ stepBlue = ABS(sHpPrimBlue - sHpPrimColors[sHpPrimState][2]) / sHpPrimTimer;
+ stepAlpha = ABS(sHpPrimAlpha - sHpPrimColors[sHpPrimState][3]) / sHpPrimTimer;
+ if (sHpPrimRed >= sHpPrimColors[sHpPrimState][0]) {
+ sHpPrimRed -= stepRed;
} else {
- D_8082A104 += sp226;
+ sHpPrimRed += stepRed;
}
- if (D_8082A108 >= D_8082A070[D_8082A118][1]) {
- D_8082A108 -= sp224;
+ if (sHpPrimGreen >= sHpPrimColors[sHpPrimState][1]) {
+ sHpPrimGreen -= stepGreen;
} else {
- D_8082A108 += sp224;
+ sHpPrimGreen += stepGreen;
}
- if (D_8082A10C >= D_8082A070[D_8082A118][2]) {
- D_8082A10C -= sp222;
+ if (sHpPrimBlue >= sHpPrimColors[sHpPrimState][2]) {
+ sHpPrimBlue -= stepBlue;
} else {
- D_8082A10C += sp222;
+ sHpPrimBlue += stepBlue;
}
- if (D_8082A110 >= D_8082A070[D_8082A118][3]) {
- D_8082A110 -= sp220;
+ if (sHpPrimAlpha >= sHpPrimColors[sHpPrimState][3]) {
+ sHpPrimAlpha -= stepAlpha;
} else {
- D_8082A110 += sp220;
+ sHpPrimAlpha += stepAlpha;
}
- if (--D_8082A114 == 0) {
- D_8082A104 = D_8082A070[D_8082A118][0];
- D_8082A108 = D_8082A070[D_8082A118][1];
- D_8082A10C = D_8082A070[D_8082A118][2];
- D_8082A110 = D_8082A070[D_8082A118][3];
- D_8082A114 = ZREG(24 + D_8082A118);
- if (++D_8082A118 >= 4) {
- D_8082A118 = 0;
+ if (--sHpPrimTimer == 0) {
+ sHpPrimRed = sHpPrimColors[sHpPrimState][0];
+ sHpPrimGreen = sHpPrimColors[sHpPrimState][1];
+ sHpPrimBlue = sHpPrimColors[sHpPrimState][2];
+ sHpPrimAlpha = sHpPrimColors[sHpPrimState][3];
+ sHpPrimTimer = ZREG(24 + sHpPrimState);
+ if (++sHpPrimState >= ARRAY_COUNT(sHpPrimColors)) {
+ sHpPrimState = 0;
}
}
@@ -456,14 +601,14 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
if ((pauseCtx->state == PAUSE_STATE_OPENING_1) || (pauseCtx->state == PAUSE_STATE_CLOSING)) {
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, D_8082A070[0][0], D_8082A070[0][1], D_8082A070[0][2],
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sHpPrimColors[0][0], sHpPrimColors[0][1], sHpPrimColors[0][2],
pauseCtx->alpha);
} else {
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, D_8082A104, D_8082A108, D_8082A10C, D_8082A110);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sHpPrimRed, sHpPrimGreen, sHpPrimBlue, sHpPrimAlpha);
}
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0);
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(
POLY_OPA_DISP,
@@ -473,217 +618,247 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
48, 48, 0);
}
+ //
+
if (pauseCtx->state == PAUSE_STATE_MAIN) {
- sp21A += 4;
+ bufI += (QUEST_QUAD_SONG_NOTE_A1 - QUEST_HEART_PIECE) * 4;
gDPPipeSync(POLY_OPA_DISP++);
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
- if ((pauseCtx->cursorSpecialPos == 0) && (sp216 >= 6) && (sp216 < 0x12)) {
- if ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) || (pauseCtx->mainState == PAUSE_MAIN_STATE_5) ||
- (pauseCtx->mainState == PAUSE_MAIN_STATE_8)) {
+ // Update cursor color
+ if ((pauseCtx->cursorSpecialPos == 0) && (cursor >= QUEST_SONG_MINUET) && (cursor < QUEST_KOKIRI_EMERALD)) {
+ if ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) || (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PROMPT) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) {
if (pauseCtx->cursorItem[pauseCtx->pageIndex] != PAUSE_ITEM_NONE) {
pauseCtx->cursorColorSet = 8;
- if ((pauseCtx->mainState >= PAUSE_MAIN_STATE_2) && (pauseCtx->mainState < PAUSE_MAIN_STATE_7)) {
+ if ((pauseCtx->mainState >= PAUSE_MAIN_STATE_SONG_PLAYBACK) &&
+ (pauseCtx->mainState <= PAUSE_MAIN_STATE_SONG_PROMPT_DONE)) {
pauseCtx->cursorColorSet = 0;
}
}
}
}
- if (pauseCtx->mainState == PAUSE_MAIN_STATE_2) {
+ if (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PLAYBACK) {
+ // Draw ocarina buttons as the song playback progresses
+ // QUEST_QUAD_SONG_NOTE_A1 to QUEST_QUAD_SONG_NOTE_A8
+
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (pauseCtx->ocarinaStaff->pos != 0) {
- if (D_8082A11C == (pauseCtx->ocarinaStaff->pos - 1)) {
- D_8082A11C++;
- D_8082A124[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->buttonIndex;
+ if (sPlayedSongBtnsNum == (pauseCtx->ocarinaStaff->pos - 1)) {
+ sPlayedSongBtnsNum++;
+ sPlayedSongBtns[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->buttonIndex;
}
- for (sp218 = 0, phi_s7 = 0; sp218 < 8; sp218++, phi_s7 += 4, sp21A += 4) {
- if (D_8082A124[sp218] == 0xFF) {
+ for (j = 0, i = 0; j < SONG_MAX_LENGTH; j++, i += 4, bufI += 4) {
+ if (sPlayedSongBtns[j] == OCARINA_BTN_INVALID) {
break;
}
- if (D_8082A150[sp218] != 255) {
- D_8082A150[sp218] += VREG(50);
- if (D_8082A150[sp218] >= 255) {
- D_8082A150[sp218] = 255;
+ if (sPlayedSongBtnsAlpha[j] != 255) {
+ sPlayedSongBtnsAlpha[j] += R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP;
+ if (sPlayedSongBtnsAlpha[j] >= 255) {
+ sPlayedSongBtnsAlpha[j] = 255;
}
}
- pauseCtx->questVtx[sp21A + 0].v.ob[1] = pauseCtx->questVtx[sp21A + 1].v.ob[1] =
- VREG(21 + D_8082A124[sp218]);
+ pauseCtx->questVtx[bufI + 0].v.ob[1] = pauseCtx->questVtx[bufI + 1].v.ob[1] =
+ R_PAUSE_SONG_OCA_BTN_Y(sPlayedSongBtns[j]);
- pauseCtx->questVtx[sp21A + 2].v.ob[1] = pauseCtx->questVtx[sp21A + 3].v.ob[1] =
- pauseCtx->questVtx[sp21A + 0].v.ob[1] - 12;
+ pauseCtx->questVtx[bufI + 2].v.ob[1] = pauseCtx->questVtx[bufI + 3].v.ob[1] =
+ pauseCtx->questVtx[bufI + 0].v.ob[1] - 12;
gDPPipeSync(POLY_OPA_DISP++);
- if (D_8082A124[sp218] == 0) {
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, KALEIDO_COLOR_COLLECT_UNK_R, KALEIDO_COLOR_COLLECT_UNK_G,
- KALEIDO_COLOR_COLLECT_UNK_B, D_8082A150[sp218]);
+ if (sPlayedSongBtns[j] == OCARINA_BTN_A) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, QUEST_OCARINA_BTN_A_COLOR_R, QUEST_OCARINA_BTN_A_COLOR_G,
+ QUEST_OCARINA_BTN_A_COLOR_B, sPlayedSongBtnsAlpha[j]);
} else {
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, D_8082A150[sp218]);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, sPlayedSongBtnsAlpha[j]);
}
gDPSetEnvColor(POLY_OPA_DISP++, 10, 10, 10, 0);
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0);
- gDPLoadTextureBlock(POLY_OPA_DISP++, D_8082A130[D_8082A124[sp218]], G_IM_FMT_IA, G_IM_SIZ_8b, 16,
- 16, 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);
+ gDPLoadTextureBlock(POLY_OPA_DISP++, sOcarinaBtnTextures[sPlayedSongBtns[j]], G_IM_FMT_IA,
+ G_IM_SIZ_8b, 16, 16, 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);
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
}
}
- } else if (((pauseCtx->mainState >= PAUSE_MAIN_STATE_4) && (pauseCtx->mainState <= PAUSE_MAIN_STATE_6)) ||
- (pauseCtx->mainState == PAUSE_MAIN_STATE_8)) {
- sp224 = pauseCtx->ocarinaSongIdx;
- sp226 = gOcarinaSongButtons[sp224].numButtons;
+ } else if (((pauseCtx->mainState >= PAUSE_MAIN_STATE_SONG_PROMPT_INIT) &&
+ (pauseCtx->mainState <= PAUSE_MAIN_STATE_SONG_PROMPT_DONE)) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) {
+ // Draw the buttons for playing a song
+ // QUEST_QUAD_SONG_NOTE_A1 to QUEST_QUAD_SONG_NOTE_A8
- for (sp218 = sp21A, phi_s7 = 0; phi_s7 < sp226; phi_s7++, sp21A += 4) {
- pauseCtx->questVtx[sp21A + 0].v.ob[1] = pauseCtx->questVtx[sp21A + 1].v.ob[1] =
- VREG(21 + gOcarinaSongButtons[sp224].buttonsIndex[phi_s7]);
+ // temps reused, fake?
+ stepGreen = pauseCtx->ocarinaSongIdx;
+ stepRed = gOcarinaSongButtons[stepGreen].numButtons;
- pauseCtx->questVtx[sp21A + 2].v.ob[1] = pauseCtx->questVtx[sp21A + 3].v.ob[1] =
- pauseCtx->questVtx[sp21A + 0].v.ob[1] - 12;
+ j = bufI;
+
+ for (i = 0; i < stepRed; i++, bufI += 4) {
+ pauseCtx->questVtx[bufI + 0].v.ob[1] = pauseCtx->questVtx[bufI + 1].v.ob[1] =
+ R_PAUSE_SONG_OCA_BTN_Y(gOcarinaSongButtons[stepGreen].buttonsIndex[i]);
+
+ pauseCtx->questVtx[bufI + 2].v.ob[1] = pauseCtx->questVtx[bufI + 3].v.ob[1] =
+ pauseCtx->questVtx[bufI + 0].v.ob[1] - 12;
gDPPipeSync(POLY_OPA_DISP++);
- if (pauseCtx->mainState == PAUSE_MAIN_STATE_8) {
- if (gOcarinaSongButtons[sp224].buttonsIndex[phi_s7] == OCARINA_BTN_A) {
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, KALEIDO_COLOR_COLLECT_UNK_R, KALEIDO_COLOR_COLLECT_UNK_G,
- KALEIDO_COLOR_COLLECT_UNK_B, 200);
+ if (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG) {
+ if (gOcarinaSongButtons[stepGreen].buttonsIndex[i] == OCARINA_BTN_A) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, QUEST_OCARINA_BTN_A_COLOR_R, QUEST_OCARINA_BTN_A_COLOR_G,
+ QUEST_OCARINA_BTN_A_COLOR_B, 200);
} else {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, 200);
}
} else {
+ // Gray out buttons during the player playing the song
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 150, 150, 150, 150);
}
gDPSetEnvColor(POLY_OPA_DISP++, 10, 10, 10, 0);
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0);
- gDPLoadTextureBlock(POLY_OPA_DISP++, D_8082A130[gOcarinaSongButtons[sp224].buttonsIndex[phi_s7]],
- G_IM_FMT_IA, G_IM_SIZ_8b, 16, 16, 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);
+ gDPLoadTextureBlock(POLY_OPA_DISP++,
+ sOcarinaBtnTextures[gOcarinaSongButtons[stepGreen].buttonsIndex[i]], G_IM_FMT_IA,
+ G_IM_SIZ_8b, 16, 16, 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);
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
}
- if (pauseCtx->mainState != PAUSE_MAIN_STATE_8) {
+ if (pauseCtx->mainState != PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG) {
+ // Draw the buttons colored as the player plays the song
+ // QUEST_QUAD_SONG_NOTE_B1 to QUEST_QUAD_SONG_NOTE_B8
+
pauseCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (pauseCtx->ocarinaStaff->pos != 0) {
- if (D_8082A11C == (pauseCtx->ocarinaStaff->pos - 1)) {
+ if (sPlayedSongBtnsNum == (pauseCtx->ocarinaStaff->pos - 1)) {
if ((pauseCtx->ocarinaStaff->buttonIndex >= OCARINA_BTN_A) &&
(pauseCtx->ocarinaStaff->buttonIndex <= OCARINA_BTN_C_UP)) {
- D_8082A124[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->buttonIndex;
- D_8082A124[pauseCtx->ocarinaStaff->pos] = 0xFF;
- D_8082A11C++;
+ sPlayedSongBtns[pauseCtx->ocarinaStaff->pos - 1] = pauseCtx->ocarinaStaff->buttonIndex;
+ sPlayedSongBtns[pauseCtx->ocarinaStaff->pos] = OCARINA_BTN_INVALID;
+ sPlayedSongBtnsNum++;
}
}
}
- sp21A = sp218 + 32;
- phi_s7 = 0;
- for (; phi_s7 < 8; phi_s7++, sp21A += 4) {
- if (D_8082A124[phi_s7] == 0xFF) {
+ bufI = j + ((QUEST_QUAD_SONG_NOTE_B1 - QUEST_QUAD_SONG_NOTE_A1) * 4);
+
+ for (i = 0; i < SONG_MAX_LENGTH; i++, bufI += 4) {
+ if (sPlayedSongBtns[i] == OCARINA_BTN_INVALID) {
continue;
}
- if (D_8082A150[phi_s7] != 255) {
- D_8082A150[phi_s7] += VREG(50);
- if (D_8082A150[phi_s7] >= 255) {
- D_8082A150[phi_s7] = 255;
+ if (sPlayedSongBtnsAlpha[i] != 255) {
+ sPlayedSongBtnsAlpha[i] += R_OCARINA_BUTTONS_APPEAR_ALPHA_STEP;
+ if (sPlayedSongBtnsAlpha[i] >= 255) {
+ sPlayedSongBtnsAlpha[i] = 255;
}
}
- pauseCtx->questVtx[sp21A + 0].v.ob[1] = pauseCtx->questVtx[sp21A + 1].v.ob[1] =
- VREG(21 + D_8082A124[phi_s7]);
- pauseCtx->questVtx[sp21A + 2].v.ob[1] = pauseCtx->questVtx[sp21A + 3].v.ob[1] =
- pauseCtx->questVtx[sp21A + 0].v.ob[1] - 12;
+ pauseCtx->questVtx[bufI + 0].v.ob[1] = pauseCtx->questVtx[bufI + 1].v.ob[1] =
+ R_PAUSE_SONG_OCA_BTN_Y(sPlayedSongBtns[i]);
+
+ pauseCtx->questVtx[bufI + 2].v.ob[1] = pauseCtx->questVtx[bufI + 3].v.ob[1] =
+ pauseCtx->questVtx[bufI + 0].v.ob[1] - 12;
gDPPipeSync(POLY_OPA_DISP++);
- if (D_8082A124[phi_s7] == 0) {
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, KALEIDO_COLOR_COLLECT_UNK_R, KALEIDO_COLOR_COLLECT_UNK_G,
- KALEIDO_COLOR_COLLECT_UNK_B, D_8082A150[phi_s7]);
+ if (sPlayedSongBtns[i] == OCARINA_BTN_A) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, QUEST_OCARINA_BTN_A_COLOR_R, QUEST_OCARINA_BTN_A_COLOR_G,
+ QUEST_OCARINA_BTN_A_COLOR_B, sPlayedSongBtnsAlpha[i]);
} else {
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, D_8082A150[phi_s7]);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, sPlayedSongBtnsAlpha[i]);
}
gDPSetEnvColor(POLY_OPA_DISP++, 10, 10, 10, 0);
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[sp21A], 4, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[bufI], 4, 0);
- gDPLoadTextureBlock(POLY_OPA_DISP++, D_8082A130[D_8082A124[phi_s7]], G_IM_FMT_IA, G_IM_SIZ_8b, 16,
- 16, 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);
+ gDPLoadTextureBlock(POLY_OPA_DISP++, sOcarinaBtnTextures[sPlayedSongBtns[i]], G_IM_FMT_IA,
+ G_IM_SIZ_8b, 16, 16, 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);
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
}
- if (pauseCtx->mainState == PAUSE_MAIN_STATE_4) {
- for (phi_s7 = 0; phi_s7 < 8; phi_s7++) {
- D_8082A124[phi_s7] = 0xFF;
- D_8082A150[phi_s7] = 0;
+ if (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PROMPT_INIT) {
+ for (i = 0; i < SONG_MAX_LENGTH; i++) {
+ sPlayedSongBtns[i] = OCARINA_BTN_INVALID;
+ sPlayedSongBtnsAlpha[i] = 0;
}
+ sPlayedSongBtnsNum = 0;
- D_8082A11C = 0;
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
AudioOcarina_Start((1 << pauseCtx->ocarinaSongIdx) + 0x8000);
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
pauseCtx->ocarinaStaff->pos = 0;
pauseCtx->ocarinaStaff->state = 0xFE;
- pauseCtx->mainState = PAUSE_MAIN_STATE_5;
+
+ pauseCtx->mainState = PAUSE_MAIN_STATE_SONG_PROMPT;
}
}
}
}
+ // Draw amount of gold skulltula tokens
+ // QUEST_QUAD_SKULL_TOKENS_DIGIT1_SHADOW to QUEST_QUAD_SKULL_TOKENS_DIGIT3
+
if (CHECK_QUEST_ITEM(QUEST_SKULL_TOKEN)) {
gDPPipeSync(POLY_OPA_DISP++);
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
- sp208[0] = sp208[1] = 0;
- sp208[2] = gSaveContext.save.info.inventory.gsTokens;
+ gsTokenDigits[0] = gsTokenDigits[1] = 0;
+ gsTokenDigits[2] = gSaveContext.save.info.inventory.gsTokens;
- while (sp208[2] >= 100) {
- sp208[0]++;
- sp208[2] -= 100;
+ while (gsTokenDigits[2] >= 100) {
+ gsTokenDigits[0]++;
+ gsTokenDigits[2] -= 100;
}
- while (sp208[2] >= 10) {
- sp208[1]++;
- sp208[2] -= 10;
+ while (gsTokenDigits[2] >= 10) {
+ gsTokenDigits[1]++;
+ gsTokenDigits[2] -= 10;
}
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[164], 24, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[QUEST_QUAD_SKULL_TOKENS_DIGIT1_SHADOW * 4], 6 * 4, 0);
- for (phi_s7 = 0, sp218 = 0, sp21A = 0; phi_s7 < 2; phi_s7++) {
- if (phi_s7 == 0) {
+ for (i = 0, j = 0; i < 2; i++) {
+ if (i == 0) {
+ // Text shadow
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, pauseCtx->alpha);
- } else if (gSaveContext.save.info.inventory.gsTokens == 100) {
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 200, 50, 50, pauseCtx->alpha);
} else {
- gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
+ // Text color
+ if (gSaveContext.save.info.inventory.gsTokens == 100) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 200, 50, 50, pauseCtx->alpha);
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
+ }
}
- cursorItem = 0;
- for (sp21A = 0; sp21A < 3; sp21A++, sp218 += 4) {
- if ((sp21A >= 2) || (sp208[sp21A] != 0) || (cursorItem != 0)) {
- gDPLoadTextureBlock(POLY_OPA_DISP++, ((u8*)gCounterDigit0Tex + (8 * 16 * sp208[sp21A])), G_IM_FMT_I,
- G_IM_SIZ_8b, 8, 16, 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);
+ // Variable reused as a flag indicating all digits onwards should be displayed
+ cursorItem = false;
- gSP1Quadrangle(POLY_OPA_DISP++, sp218, sp218 + 2, sp218 + 3, sp218 + 1, 0);
+ for (bufI = 0; bufI < 3; bufI++, j += 4) {
+ if ((bufI >= 2) || (gsTokenDigits[bufI] != 0) || cursorItem) {
+ gDPLoadTextureBlock(POLY_OPA_DISP++, ((u8*)gCounterDigit0Tex + (8 * 16 * gsTokenDigits[bufI])),
+ G_IM_FMT_I, G_IM_SIZ_8b, 8, 16, 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);
- cursorItem = 1;
+ gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
+
+ cursorItem = true;
}
}
}
@@ -695,5 +870,5 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s32 point) {
pauseCtx->cursorPoint[PAUSE_QUEST] = point;
- return 1;
+ return true;
}
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_debug.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_debug.c
index 6cf75817a5..a8433e9f2e 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_debug.c
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_debug.c
@@ -1,4 +1,14 @@
#include "z_kaleido_scope.h"
+
+#include "libu64/gfxprint.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "gfxalloc.h"
+#include "printf.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/textures/parameter_static/parameter_static.h"
// Positions of each input section in the editor
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c
index 33c98159c9..6b7da76bbd 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c
@@ -1,19 +1,72 @@
#include "z_kaleido_scope.h"
+
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/textures/icon_item_static/icon_item_static.h"
#include "assets/textures/parameter_static/parameter_static.h"
-static u8 sChildUpgrades[] = { UPG_BULLET_BAG, UPG_BOMB_BAG, UPG_STRENGTH, UPG_SCALE };
-static u8 sAdultUpgrades[] = { UPG_QUIVER, UPG_BOMB_BAG, UPG_STRENGTH, UPG_SCALE };
+static u8 sChildUpgrades[] = {
+ UPG_BULLET_BAG, // EQUIP_QUAD_UPG_BULLETBAG_QUIVER
+ UPG_BOMB_BAG, // EQUIP_QUAD_UPG_BOMB_BAG
+ UPG_STRENGTH, // EQUIP_QUAD_UPG_STRENGTH
+ UPG_SCALE, // EQUIP_QUAD_UPG_SCALE
+};
+static u8 sAdultUpgrades[] = {
+ UPG_QUIVER, // EQUIP_QUAD_UPG_BULLETBAG_QUIVER
+ UPG_BOMB_BAG, // EQUIP_QUAD_UPG_BOMB_BAG
+ UPG_STRENGTH, // EQUIP_QUAD_UPG_STRENGTH
+ UPG_SCALE, // EQUIP_QUAD_UPG_SCALE
+};
-static u8 sChildUpgradeItemBases[] = { ITEM_BULLET_BAG_30, ITEM_BOMB_BAG_20, ITEM_STRENGTH_GORONS_BRACELET,
- ITEM_SCALE_SILVER };
-static u8 sAdultUpgradeItemBases[] = { ITEM_QUIVER_30, ITEM_BOMB_BAG_20, ITEM_STRENGTH_GORONS_BRACELET,
- ITEM_SCALE_SILVER };
+static u8 sChildUpgradeItemBases[] = {
+ ITEM_BULLET_BAG_30, // EQUIP_QUAD_UPG_BULLETBAG_QUIVER
+ ITEM_BOMB_BAG_20, // EQUIP_QUAD_UPG_BOMB_BAG
+ ITEM_STRENGTH_GORONS_BRACELET, // EQUIP_QUAD_UPG_STRENGTH
+ ITEM_SCALE_SILVER, // EQUIP_QUAD_UPG_SCALE
+};
+static u8 sAdultUpgradeItemBases[] = {
+ ITEM_QUIVER_30, // EQUIP_QUAD_UPG_BULLETBAG_QUIVER
+ ITEM_BOMB_BAG_20, // EQUIP_QUAD_UPG_BOMB_BAG
+ ITEM_STRENGTH_GORONS_BRACELET, // EQUIP_QUAD_UPG_STRENGTH
+ ITEM_SCALE_SILVER, // EQUIP_QUAD_UPG_SCALE
+};
-static u8 sUpgradeItemOffsets[] = { 0x00, 0x03, 0x06, 0x09 };
+static u8 sUpgradeItemOffsets[] = {
+ 0, // unused
+ ITEM_BOMB_BAG_20 - ITEM_QUIVER_30, // UPG_BOMB_BAG
+ ITEM_STRENGTH_GORONS_BRACELET - ITEM_QUIVER_30, // UPG_STRENGTH
+ ITEM_SCALE_SILVER - ITEM_QUIVER_30, // UPG_SCALE
+};
static u8 sEquipmentItemOffsets[] = {
- 0x00, 0x00, 0x01, 0x02, 0x00, 0x03, 0x04, 0x05, 0x00, 0x06, 0x07, 0x08, 0x00, 0x09, 0x0A, 0x0B,
+ // EQUIP_TYPE_SWORD
+ 0, // unused
+ ITEM_SWORD_KOKIRI - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_SWORD_KOKIRI
+ ITEM_SWORD_MASTER - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_SWORD_MASTER
+ ITEM_SWORD_BIGGORON - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_SWORD_BIGGORON
+ // EQUIP_TYPE_SHIELD
+ 0, // unused
+ ITEM_SHIELD_DEKU - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_SHIELD_DEKU
+ ITEM_SHIELD_HYLIAN - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_SHIELD_HYLIAN
+ ITEM_SHIELD_MIRROR - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_SHIELD_MIRROR
+ // EQUIP_TYPE_TUNIC
+ 0, // unused
+ ITEM_TUNIC_KOKIRI - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_TUNIC_KOKIRI
+ ITEM_TUNIC_GORON - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_TUNIC_GORON
+ ITEM_TUNIC_ZORA - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_TUNIC_ZORA
+ // EQUIP_TYPE_BOOTS
+ 0, // unused
+ ITEM_BOOTS_KOKIRI - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_BOOTS_KOKIRI
+ ITEM_BOOTS_IRON - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_BOOTS_IRON
+ ITEM_BOOTS_HOVER - ITEM_SWORD_KOKIRI, // EQUIP_VALUE_BOOTS_HOVER
};
void KaleidoScope_DrawEquipmentImage(PlayState* play, void* source, u32 width, u32 height) {
@@ -35,15 +88,15 @@ void KaleidoScope_DrawEquipmentImage(PlayState* play, void* source, u32 width, u
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
curTexture = source;
- remainingSize = width * height * 2;
- textureHeight = 4096 / (width * 2);
- textureSize = width * textureHeight * 2;
+ remainingSize = width * height * G_IM_SIZ_16b_BYTES;
+ textureHeight = TMEM_SIZE / (width * G_IM_SIZ_16b_BYTES);
+ textureSize = width * textureHeight * G_IM_SIZ_16b_BYTES;
textureCount = remainingSize / textureSize;
if ((remainingSize % textureSize) != 0) {
textureCount += 1;
}
- vtxIndex = 80;
+ vtxIndex = EQUIP_QUAD_PLAYER_FIRST * 4;
gDPSetTileCustom(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, width - 1, textureHeight - 1, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
@@ -65,7 +118,7 @@ void KaleidoScope_DrawEquipmentImage(PlayState* play, void* source, u32 width, u
if ((remainingSize - textureSize) < 0) {
if (remainingSize > 0) {
- textureHeight = remainingSize / (s32)(width * 2);
+ textureHeight = remainingSize / (s32)(width * G_IM_SIZ_16b_BYTES);
remainingSize -= textureSize;
gDPSetTileCustom(POLY_OPA_DISP++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, width - 1, textureHeight - 1, 0,
@@ -114,8 +167,10 @@ void KaleidoScope_DrawPlayerWork(PlayState* play) {
BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS)));
}
+#ifndef AVOID_UB
// Wrong prototype; this function is called with `play` even though it has no arguments
void KaleidoScope_ProcessPlayerPreRender(PlayState* play);
+#endif
void KaleidoScope_DrawEquipment(PlayState* play) {
static s16 sEquipTimer = 0;
@@ -143,7 +198,9 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, ZREG(39), ZREG(40), ZREG(41), pauseCtx->alpha);
gDPSetEnvColor(POLY_OPA_DISP++, ZREG(43), ZREG(44), ZREG(45), 0);
- for (i = 0, j = 64; i < 4; i++, j += 4) {
+ // Draw EQUIP_QUAD_SELECTED_SWORD, EQUIP_QUAD_SELECTED_SHIELD, EQUIP_QUAD_SELECTED_TUNIC, EQUIP_QUAD_SELECTED_BOOTS
+
+ for (i = 0, j = EQUIP_QUAD_SELECTED_SWORD * 4; i < EQUIP_TYPE_MAX; i++, j += 4) {
if (CUR_EQUIP_VALUE(i) != 0) {
gDPPipeSync(POLY_OPA_DISP++);
gSPVertex(POLY_OPA_DISP++, &pauseCtx->equipVtx[j], 4, 0);
@@ -157,6 +214,8 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_EQUIP];
pauseCtx->cursorColorSet = 0;
+ // Handle moving the cursor with stick input
+
if (pauseCtx->cursorSpecialPos == 0) {
pauseCtx->nameColorSet = 0;
@@ -172,12 +231,13 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
cursorMoveResult = 0;
do {
if (pauseCtx->stickAdjX < -30) {
- if (pauseCtx->cursorX[PAUSE_EQUIP] != 0) {
+ if (pauseCtx->cursorX[PAUSE_EQUIP] != EQUIP_CURSOR_X_UPG) {
pauseCtx->cursorX[PAUSE_EQUIP]--;
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 1;
- if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
- if (pauseCtx->cursorY[PAUSE_EQUIP] == 0) {
+ if (pauseCtx->cursorX[PAUSE_EQUIP] == EQUIP_CURSOR_X_UPG) {
+ if (pauseCtx->cursorY[PAUSE_EQUIP] == EQUIP_CURSOR_Y_BULLETBAG_QUIVER) {
+ //! @bug Assumes adult always has bullet bag (as adult this should rely on `UPG_QUIVER`)
if (CUR_UPG_VALUE(UPG_BULLET_BAG) != 0) {
cursorMoveResult = 1;
}
@@ -219,7 +279,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
pauseCtx->cursorX[PAUSE_EQUIP]++;
pauseCtx->cursorPoint[PAUSE_EQUIP] += 1;
- if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
+ if (pauseCtx->cursorX[PAUSE_EQUIP] == EQUIP_CURSOR_X_UPG) {
if (CUR_UPG_VALUE(pauseCtx->cursorY[PAUSE_EQUIP]) != 0) {
cursorMoveResult = 1;
}
@@ -266,17 +326,21 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
pauseCtx->cursorY[PAUSE_EQUIP]--;
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 4;
- if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
- if (pauseCtx->cursorY[PAUSE_EQUIP] == 0) {
+ if (pauseCtx->cursorX[PAUSE_EQUIP] == EQUIP_CURSOR_X_UPG) {
+ if (pauseCtx->cursorY[PAUSE_EQUIP] == EQUIP_CURSOR_Y_BULLETBAG_QUIVER) {
if (CUR_UPG_VALUE(UPG_BULLET_BAG) != 0) {
cursorMoveResult = 1;
}
- } else if (CUR_UPG_VALUE(pauseCtx->cursorY[PAUSE_EQUIP]) != 0) {
- cursorMoveResult = 1;
+ } else {
+ if (CUR_UPG_VALUE(pauseCtx->cursorY[PAUSE_EQUIP]) != 0) {
+ cursorMoveResult = 1;
+ }
+ }
+ } else {
+ if (gBitFlags[pauseCtx->cursorPoint[PAUSE_EQUIP] - 1] &
+ gSaveContext.save.info.inventory.equipment) {
+ cursorMoveResult = 2;
}
- } else if (gBitFlags[pauseCtx->cursorPoint[PAUSE_EQUIP] - 1] &
- gSaveContext.save.info.inventory.equipment) {
- cursorMoveResult = 2;
}
} else {
pauseCtx->cursorY[PAUSE_EQUIP] = cursorY;
@@ -288,13 +352,15 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
pauseCtx->cursorY[PAUSE_EQUIP]++;
pauseCtx->cursorPoint[PAUSE_EQUIP] += 4;
- if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
+ if (pauseCtx->cursorX[PAUSE_EQUIP] == EQUIP_CURSOR_X_UPG) {
if (CUR_UPG_VALUE(pauseCtx->cursorY[PAUSE_EQUIP]) != 0) {
cursorMoveResult = 1;
}
- } else if (gBitFlags[pauseCtx->cursorPoint[PAUSE_EQUIP] - 1] &
- gSaveContext.save.info.inventory.equipment) {
- cursorMoveResult = 2;
+ } else {
+ if (gBitFlags[pauseCtx->cursorPoint[PAUSE_EQUIP] - 1] &
+ gSaveContext.save.info.inventory.equipment) {
+ cursorMoveResult = 2;
+ }
}
} else {
pauseCtx->cursorY[PAUSE_EQUIP] = cursorY;
@@ -315,25 +381,29 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
cursorPoint = cursorX = cursorY = 0;
while (true) {
- if (cursorX == 0) {
- if (cursorY == 0) {
+ if (cursorX == EQUIP_CURSOR_X_UPG) {
+ if (cursorY == EQUIP_CURSOR_Y_BULLETBAG_QUIVER) {
if (CUR_UPG_VALUE(UPG_BULLET_BAG) != 0) {
pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
pauseCtx->cursorY[PAUSE_EQUIP] = cursorY;
break;
}
- } else if (CUR_UPG_VALUE(cursorY) != 0) {
+ } else {
+ if (CUR_UPG_VALUE(cursorY) != 0) {
+ pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
+ pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
+ pauseCtx->cursorY[PAUSE_EQUIP] = cursorY;
+ break;
+ }
+ }
+ } else {
+ if (gBitFlags[cursorPoint - 1] & gSaveContext.save.info.inventory.equipment) {
pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
pauseCtx->cursorY[PAUSE_EQUIP] = cursorY;
break;
}
- } else if (gBitFlags[cursorPoint - 1] & gSaveContext.save.info.inventory.equipment) {
- pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
- pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
- pauseCtx->cursorY[PAUSE_EQUIP] = cursorY;
- break;
}
cursorY = cursorY + 1;
@@ -349,7 +419,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
}
}
- } else {
+ } else { // cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT
if (pauseCtx->stickAdjX < -30) {
pauseCtx->nameDisplayTimer = 0;
pauseCtx->cursorSpecialPos = 0;
@@ -359,18 +429,20 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
cursorPoint = cursorX = 3;
cursorY = 0;
while (true) {
- if (cursorX == 0) {
+ if (cursorX == EQUIP_CURSOR_X_UPG) {
if (CUR_UPG_VALUE(cursorY) != 0) {
pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
pauseCtx->cursorY[PAUSE_EQUIP] = cursorY;
break;
}
- } else if (gBitFlags[cursorPoint - 1] & gSaveContext.save.info.inventory.equipment) {
- pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
- pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
- pauseCtx->cursorY[PAUSE_EQUIP] = cursorY;
- break;
+ } else {
+ if (gBitFlags[cursorPoint - 1] & gSaveContext.save.info.inventory.equipment) {
+ pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
+ pauseCtx->cursorX[PAUSE_EQUIP] = cursorX;
+ pauseCtx->cursorY[PAUSE_EQUIP] = cursorY;
+ break;
+ }
}
cursorY = cursorY + 1;
@@ -388,11 +460,14 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
}
- if (pauseCtx->cursorX[PAUSE_EQUIP] == 0) {
+ // set cursorItem
+
+ if (pauseCtx->cursorX[PAUSE_EQUIP] == EQUIP_CURSOR_X_UPG) {
pauseCtx->cursorColorSet = 0;
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
- if ((pauseCtx->cursorY[PAUSE_EQUIP] == 0) && (CUR_UPG_VALUE(UPG_BULLET_BAG) != 0)) {
+ if ((pauseCtx->cursorY[PAUSE_EQUIP] == EQUIP_CURSOR_Y_BULLETBAG_QUIVER) &&
+ (CUR_UPG_VALUE(UPG_BULLET_BAG) != 0)) {
cursorItem = ITEM_BULLET_BAG_30 + CUR_UPG_VALUE(UPG_BULLET_BAG) - 1;
} else {
cursorItem = ITEM_QUIVER_30 + sUpgradeItemOffsets[pauseCtx->cursorY[PAUSE_EQUIP]] +
@@ -400,7 +475,8 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
PRINTF("H_arrowcase_1 + non_equip_item_table = %d\n", cursorItem);
}
} else {
- if ((pauseCtx->cursorY[PAUSE_EQUIP] == 0) && (CUR_UPG_VALUE(UPG_QUIVER) == 0)) {
+ if ((pauseCtx->cursorY[PAUSE_EQUIP] == EQUIP_CURSOR_Y_BULLETBAG_QUIVER) &&
+ (CUR_UPG_VALUE(UPG_QUIVER) == 0)) {
cursorItem = ITEM_BULLET_BAG_30 + CUR_UPG_VALUE(UPG_BULLET_BAG) - 1;
} else {
cursorItem = ITEM_QUIVER_30 + sUpgradeItemOffsets[pauseCtx->cursorY[PAUSE_EQUIP]] +
@@ -417,8 +493,9 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
}
- if ((pauseCtx->cursorY[PAUSE_EQUIP] == 0) && (pauseCtx->cursorX[PAUSE_EQUIP] == 3)) {
- if (gSaveContext.save.info.playerData.bgsFlag != 0) {
+ if ((pauseCtx->cursorY[PAUSE_EQUIP] == EQUIP_TYPE_SWORD) &&
+ (pauseCtx->cursorX[PAUSE_EQUIP] == EQUIP_VALUE_SWORD_BIGGORON)) {
+ if (gSaveContext.save.info.playerData.bgsFlag) {
cursorItem = ITEM_HEART_PIECE_2;
} else if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BROKENGIANTKNIFE)) {
cursorItem = ITEM_GIANTS_KNIFE;
@@ -432,6 +509,8 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
PRINTF("kscope->select_name[Display_Equipment] = %d\n", pauseCtx->cursorItem[PAUSE_EQUIP]);
+ // Handle age particularities
+
if (!CHECK_AGE_REQ_EQUIP(pauseCtx->cursorY[PAUSE_EQUIP], pauseCtx->cursorX[PAUSE_EQUIP])) {
pauseCtx->nameColorSet = 1;
}
@@ -444,7 +523,8 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
}
- if ((pauseCtx->cursorX[PAUSE_EQUIP] == 0) && (pauseCtx->cursorY[PAUSE_EQUIP] == 0)) {
+ if ((pauseCtx->cursorX[PAUSE_EQUIP] == EQUIP_CURSOR_X_UPG) &&
+ (pauseCtx->cursorY[PAUSE_EQUIP] == EQUIP_CURSOR_Y_BULLETBAG_QUIVER)) {
if (LINK_AGE_IN_YEARS != YEARS_CHILD) {
if ((cursorItem >= ITEM_BULLET_BAG_30) && (cursorItem <= ITEM_BULLET_BAG_50)) {
pauseCtx->nameColorSet = 1;
@@ -456,20 +536,25 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
}
+ // Set cursor position
+
KaleidoScope_SetCursorPos(pauseCtx, cursorSlot * 4, pauseCtx->equipVtx);
+ // Handle input for changing equipment
+
if ((pauseCtx->cursorSpecialPos == 0) && (cursorItem != PAUSE_ITEM_NONE) &&
(pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) &&
- CHECK_BTN_ALL(input->press.button, BTN_A) && (pauseCtx->cursorX[PAUSE_EQUIP] != 0)) {
+ CHECK_BTN_ALL(input->press.button, BTN_A) && (pauseCtx->cursorX[PAUSE_EQUIP] != EQUIP_CURSOR_X_UPG)) {
if (CHECK_AGE_REQ_EQUIP(pauseCtx->cursorY[PAUSE_EQUIP], pauseCtx->cursorX[PAUSE_EQUIP])) {
Inventory_ChangeEquipment(pauseCtx->cursorY[PAUSE_EQUIP], pauseCtx->cursorX[PAUSE_EQUIP]);
- if (pauseCtx->cursorY[PAUSE_EQUIP] == 0) {
- gSaveContext.save.info.infTable[INFTABLE_1DX_INDEX] = 0;
+ if (pauseCtx->cursorY[PAUSE_EQUIP] == EQUIP_TYPE_SWORD) {
+ gSaveContext.save.info.infTable[INFTABLE_INDEX_1DX] = 0;
gSaveContext.save.info.equips.buttonItems[0] = cursorItem;
- if ((pauseCtx->cursorX[PAUSE_EQUIP] == 3) && (gSaveContext.save.info.playerData.bgsFlag != 0)) {
+ if ((pauseCtx->cursorX[PAUSE_EQUIP] == EQUIP_VALUE_SWORD_BIGGORON) &&
+ gSaveContext.save.info.playerData.bgsFlag) {
gSaveContext.save.info.equips.buttonItems[0] = ITEM_SWORD_BIGGORON;
gSaveContext.save.info.playerData.swordHealth = 8;
} else {
@@ -477,8 +562,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
gSaveContext.save.info.equips.buttonItems[0] = ITEM_SWORD_BIGGORON;
}
if ((gSaveContext.save.info.equips.buttonItems[0] == ITEM_SWORD_BIGGORON) &&
-
- (gSaveContext.save.info.playerData.bgsFlag == 0) &&
+ !gSaveContext.save.info.playerData.bgsFlag &&
CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BROKENGIANTKNIFE)) {
gSaveContext.save.info.equips.buttonItems[0] = ITEM_GIANTS_KNIFE;
}
@@ -489,7 +573,9 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- pauseCtx->mainState = PAUSE_MAIN_STATE_7;
+
+ // Wait 10 frames before accepting input again
+ pauseCtx->mainState = PAUSE_MAIN_STATE_EQUIP_CHANGED;
sEquipTimer = 10;
} else {
Audio_PlaySfxGeneral(NA_SE_SY_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
@@ -501,7 +587,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
- } else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_7) && (pauseCtx->pageIndex == PAUSE_EQUIP)) {
+ } else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_EQUIP_CHANGED) && (pauseCtx->pageIndex == PAUSE_EQUIP)) {
KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_EQUIP] * 4, pauseCtx->equipVtx);
pauseCtx->cursorColorSet = 8;
@@ -511,13 +597,19 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
}
- for (rowStart = 0, i = 0, point = 4; i < 4; i++, rowStart += 4, point += 16) {
+ // Enlarge the equip item at the current cursor position, if it can be equipped
+ // for each row (one row per equip type)
+ for (rowStart = 0, i = 0, point = EQUIP_QUAD_SWORD_KOKIRI * 4; i < EQUIP_TYPE_MAX;
+ i++, rowStart += 4, point += 4 * 4) {
+
+ // for each equip column
for (k = 0, temp = rowStart + 1, bit = rowStart, j = point; k < 3; k++, bit++, j += 4, temp++) {
if ((gBitFlags[bit] & gSaveContext.save.info.inventory.equipment) && (pauseCtx->cursorSpecialPos == 0)) {
if (CHECK_AGE_REQ_EQUIP(i, k + 1)) {
if (temp == cursorSlot) {
+
pauseCtx->equipVtx[j].v.ob[0] = pauseCtx->equipVtx[j + 2].v.ob[0] =
pauseCtx->equipVtx[j].v.ob[0] - 2;
pauseCtx->equipVtx[j + 1].v.ob[0] = pauseCtx->equipVtx[j + 3].v.ob[0] =
@@ -532,13 +624,19 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
}
+ // Draw upgrades and equips
+
Gfx_SetupDL_42Opa(play->state.gfxCtx);
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
- for (rowStart = 0, j = 0, temp = 0, i = 0; i < 4; i++, rowStart += 4, j += 16) {
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->equipVtx[j], 16, 0);
+ // for each row
+ for (rowStart = 0, j = 0, temp = 0, i = 0; i < 4; i++, rowStart += 4, j += 4 * 4) {
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->equipVtx[j], 4 * 4, 0);
+
+ // Draw upgrade `i`
+ // EQUIP_QUAD_UPG_BULLETBAG_QUIVER, EQUIP_QUAD_UPG_BOMB_BAG, EQUIP_QUAD_UPG_STRENGTH, EQUIP_QUAD_UPG_SCALE
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
point = CUR_UPG_VALUE(sChildUpgrades[i]);
@@ -549,6 +647,8 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
} else {
if ((i == 0) && (CUR_UPG_VALUE(sAdultUpgrades[i]) == 0)) {
+ // Show bullet bag instead of quiver if player has no quiver
+ //! @bug This assumes adult always has bullet bag
KaleidoScope_DrawQuadTextureRGBA32(
play->state.gfxCtx, gItemIcons[sChildUpgradeItemBases[i] + CUR_UPG_VALUE(sChildUpgrades[i]) - 1],
ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0);
@@ -559,12 +659,20 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
}
+ // Draw owned equips of type `i`
+ // EQUIP_QUAD_SWORD_KOKIRI, EQUIP_QUAD_SWORD_MASTER, EQUIP_QUAD_SWORD_BIGGORON
+ // EQUIP_QUAD_SHIELD_DEKU, EQUIP_QUAD_SHIELD_HYLIAN, EQUIP_QUAD_SHIELD_MIRROR
+ // EQUIP_QUAD_TUNIC_KOKIRI, EQUIP_QUAD_TUNIC_GORON, EQUIP_QUAD_TUNIC_ZORA
+ // EQUIP_QUAD_BOOTS_KOKIRI, EQUIP_QUAD_BOOTS_IRON, EQUIP_QUAD_BOOTS_HOVER
+
for (k = 0, bit = rowStart, point = 4; k < 3; k++, point += 4, temp++, bit++) {
- if (((u32)i == 0) && (k == 2) && (gSaveContext.save.info.playerData.bgsFlag != 0)) {
+ if (((u32)i == EQUIP_TYPE_SWORD) && (k == EQUIP_INV_SWORD_BIGGORON) &&
+ gSaveContext.save.info.playerData.bgsFlag) {
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIconSwordBiggoronTex, ITEM_ICON_WIDTH,
ITEM_ICON_HEIGHT, point);
- } else if ((i == 0) && (k == 2) && (gBitFlags[bit + 1] & gSaveContext.save.info.inventory.equipment)) {
+ } else if ((i == EQUIP_TYPE_SWORD) && (k == EQUIP_INV_SWORD_BIGGORON) &&
+ (gBitFlags[bit + 1] & gSaveContext.save.info.inventory.equipment)) {
KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx, gItemIconBrokenGiantsKnifeTex, ITEM_ICON_WIDTH,
ITEM_ICON_HEIGHT, point);
} else if (gBitFlags[bit] & gSaveContext.save.info.inventory.equipment) {
@@ -574,15 +682,21 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
}
+ // Draw player to the player prerender buffer
+
KaleidoScope_DrawPlayerWork(play);
- if ((pauseCtx->mainState == PAUSE_MAIN_STATE_7) && (sEquipTimer == 10)) {
+ if ((pauseCtx->mainState == PAUSE_MAIN_STATE_EQUIP_CHANGED) && (sEquipTimer == 10)) {
KaleidoScope_SetupPlayerPreRender(play);
}
- if ((pauseCtx->mainState == PAUSE_MAIN_STATE_7) && (sEquipTimer == 9)) {
+ if ((pauseCtx->mainState == PAUSE_MAIN_STATE_EQUIP_CHANGED) && (sEquipTimer == 9)) {
+#ifndef AVOID_UB
//! @bug: This function shouldn't take any arguments
KaleidoScope_ProcessPlayerPreRender(play);
+#else
+ KaleidoScope_ProcessPlayerPreRender();
+#endif
}
gSPSegment(POLY_OPA_DISP++, 0x07, pauseCtx->playerSegment);
@@ -592,6 +706,8 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x0B, interfaceCtx->mapSegment);
gSPSegment(POLY_OPA_DISP++, 0x0C, pauseCtx->iconItemAltSegment);
+ // Draw player prerender onto the equip page
+
Gfx_SetupDL_42Opa(play->state.gfxCtx);
KaleidoScope_DrawEquipmentImage(play, pauseCtx->playerSegment, PAUSE_EQUIP_PLAYER_WIDTH, PAUSE_EQUIP_PLAYER_HEIGHT);
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c
index 9b62bf51db..97458d024f 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c
@@ -1,9 +1,34 @@
#include "z_kaleido_scope.h"
+
+#include "libu64/pad.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/textures/parameter_static/parameter_static.h"
u8 gAmmoItems[] = {
- ITEM_DEKU_STICK, ITEM_DEKU_NUT, ITEM_BOMB, ITEM_BOW, ITEM_NONE, ITEM_NONE, ITEM_SLINGSHOT, ITEM_NONE,
- ITEM_BOMBCHU, ITEM_NONE, ITEM_NONE, ITEM_NONE, ITEM_NONE, ITEM_NONE, ITEM_MAGIC_BEAN, ITEM_NONE,
+ ITEM_DEKU_STICK, // SLOT_DEKU_STICK
+ ITEM_DEKU_NUT, // SLOT_DEKU_NUT
+ ITEM_BOMB, // SLOT_BOMB
+ ITEM_BOW, // SLOT_BOW
+ ITEM_NONE, // SLOT_ARROW_FIRE
+ ITEM_NONE, // SLOT_DINS_FIRE
+ ITEM_SLINGSHOT, // SLOT_SLINGSHOT
+ ITEM_NONE, // SLOT_OCARINA
+ ITEM_BOMBCHU, // SLOT_BOMBCHU
+ ITEM_NONE, // SLOT_HOOKSHOT
+ ITEM_NONE, // SLOT_ARROW_ICE
+ ITEM_NONE, // SLOT_FARORES_WIND
+ ITEM_NONE, // SLOT_BOOMERANG
+ ITEM_NONE, // SLOT_LENS_OF_TRUTH
+ ITEM_MAGIC_BEAN, // SLOT_MAGIC_BEAN
+ ITEM_NONE,
};
static s16 sEquipState = 0;
@@ -11,12 +36,28 @@ static s16 sEquipAnimTimer = 0;
static s16 sEquipMoveTimer = 10;
static s16 sAmmoVtxOffset[] = {
- 0, 2, 4, 6, 99, 99, 8, 99, 99, 10, 99, 99, 99, 99, 99, 99, 12,
+ ITEM_QUAD_AMMO_STICK_TENS - ITEM_QUAD_AMMO_FIRST, // ITEM_DEKU_STICK
+ ITEM_QUAD_AMMO_NUT_TENS - ITEM_QUAD_AMMO_FIRST, // ITEM_DEKU_NUT
+ ITEM_QUAD_AMMO_BOMB_TENS - ITEM_QUAD_AMMO_FIRST, // ITEM_BOMB
+ ITEM_QUAD_AMMO_BOW_TENS - ITEM_QUAD_AMMO_FIRST, // ITEM_BOW
+ 99, // (ITEM_ARROW_FIRE)
+ 99, // (ITEM_DINS_FIRE)
+ ITEM_QUAD_AMMO_SLINGSHOT_TENS - ITEM_QUAD_AMMO_FIRST, // ITEM_SLINGSHOT
+ 99, // (ITEM_OCARINA_FAIRY)
+ 99, // (ITEM_OCARINA_OF_TIME)
+ ITEM_QUAD_AMMO_BOMBCHU_TENS - ITEM_QUAD_AMMO_FIRST, // ITEM_BOMBCHU
+ 99, // (ITEM_HOOKSHOT)
+ 99, // (ITEM_LONGSHOT)
+ 99, // (ITEM_ARROW_ICE)
+ 99, // (ITEM_FARORES_WIND)
+ 99, // (ITEM_BOOMERANG)
+ 99, // (ITEM_LENS)
+ ITEM_QUAD_AMMO_BEAN_TENS - ITEM_QUAD_AMMO_FIRST, // ITEM_MAGIC_BEAN
};
void KaleidoScope_DrawAmmoCount(PauseContext* pauseCtx, GraphicsContext* gfxCtx, s16 item) {
s16 ammo;
- s16 i;
+ s16 ammoTens;
OPEN_DISPS(gfxCtx, "../z_kaleido_item.c", 69);
@@ -41,23 +82,23 @@ void KaleidoScope_DrawAmmoCount(PauseContext* pauseCtx, GraphicsContext* gfxCtx,
}
}
- for (i = 0; ammo >= 10; i++) {
+ for (ammoTens = 0; ammo >= 10; ammoTens++) {
ammo -= 10;
}
gDPPipeSync(POLY_OPA_DISP++);
- if (i != 0) {
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->itemVtx[(sAmmoVtxOffset[item] + 27) * 4], 4, 0);
+ if (ammoTens != 0) {
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->itemVtx[(ITEM_QUAD_AMMO_FIRST + sAmmoVtxOffset[item] + 0) * 4], 4, 0);
- gDPLoadTextureBlock(POLY_OPA_DISP++, ((u8*)gAmmoDigit0Tex + (8 * 8 * i)), G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 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);
+ gDPLoadTextureBlock(POLY_OPA_DISP++, ((u8*)gAmmoDigit0Tex + (8 * 8 * ammoTens)), G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8,
+ 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);
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
}
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->itemVtx[(sAmmoVtxOffset[item] + 28) * 4], 4, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->itemVtx[(ITEM_QUAD_AMMO_FIRST + sAmmoVtxOffset[item] + 1) * 4], 4, 0);
gDPLoadTextureBlock(POLY_OPA_DISP++, ((u8*)gAmmoDigit0Tex + (8 * 8 * ammo)), G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
@@ -126,31 +167,38 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
PRINTF("now=%d ccc=%d\n", cursorPoint, cursorItem);
do {
- if (pauseCtx->stickAdjX < -30) {
+ if (pauseCtx->stickAdjX < -30) { // left
+ // if not on the left-most column
if (pauseCtx->cursorX[PAUSE_ITEM] != 0) {
+ // move left
pauseCtx->cursorX[PAUSE_ITEM]--;
pauseCtx->cursorPoint[PAUSE_ITEM] -= 1;
+ // if there's an item there, stop there
if (gSaveContext.save.info.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] !=
ITEM_NONE) {
cursorMoveResult = 1;
}
} else {
- pauseCtx->cursorX[PAUSE_ITEM] = cursorX;
- pauseCtx->cursorY[PAUSE_ITEM]++;
+ // move the cursor to its initial horizontal position and try find an item on the next line
- if (pauseCtx->cursorY[PAUSE_ITEM] >= 4) {
+ pauseCtx->cursorX[PAUSE_ITEM] = cursorX;
+
+ pauseCtx->cursorY[PAUSE_ITEM]++;
+ if (pauseCtx->cursorY[PAUSE_ITEM] >= ITEM_GRID_ROWS) {
pauseCtx->cursorY[PAUSE_ITEM] = 0;
}
pauseCtx->cursorPoint[PAUSE_ITEM] =
- pauseCtx->cursorX[PAUSE_ITEM] + (pauseCtx->cursorY[PAUSE_ITEM] * 6);
+ pauseCtx->cursorX[PAUSE_ITEM] + (pauseCtx->cursorY[PAUSE_ITEM] * ITEM_GRID_COLS);
- if (pauseCtx->cursorPoint[PAUSE_ITEM] >= 24) {
+ if (pauseCtx->cursorPoint[PAUSE_ITEM] >= (ITEM_GRID_ROWS * ITEM_GRID_COLS)) {
pauseCtx->cursorPoint[PAUSE_ITEM] = pauseCtx->cursorX[PAUSE_ITEM];
}
if (cursorY == pauseCtx->cursorY[PAUSE_ITEM]) {
+ // there is no item to the left of the initial position, on any line
+
pauseCtx->cursorX[PAUSE_ITEM] = cursorX;
pauseCtx->cursorPoint[PAUSE_ITEM] = cursorPoint;
@@ -160,7 +208,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
}
}
} else if (pauseCtx->stickAdjX > 30) {
- if (pauseCtx->cursorX[PAUSE_ITEM] < 5) {
+ if (pauseCtx->cursorX[PAUSE_ITEM] < (ITEM_GRID_COLS - 1)) {
pauseCtx->cursorX[PAUSE_ITEM]++;
pauseCtx->cursorPoint[PAUSE_ITEM] += 1;
@@ -172,14 +220,14 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
pauseCtx->cursorX[PAUSE_ITEM] = cursorX;
pauseCtx->cursorY[PAUSE_ITEM]++;
- if (pauseCtx->cursorY[PAUSE_ITEM] >= 4) {
+ if (pauseCtx->cursorY[PAUSE_ITEM] >= ITEM_GRID_ROWS) {
pauseCtx->cursorY[PAUSE_ITEM] = 0;
}
pauseCtx->cursorPoint[PAUSE_ITEM] =
- pauseCtx->cursorX[PAUSE_ITEM] + (pauseCtx->cursorY[PAUSE_ITEM] * 6);
+ pauseCtx->cursorX[PAUSE_ITEM] + (pauseCtx->cursorY[PAUSE_ITEM] * ITEM_GRID_COLS);
- if (pauseCtx->cursorPoint[PAUSE_ITEM] >= 24) {
+ if (pauseCtx->cursorPoint[PAUSE_ITEM] >= (ITEM_GRID_ROWS * ITEM_GRID_COLS)) {
pauseCtx->cursorPoint[PAUSE_ITEM] = pauseCtx->cursorX[PAUSE_ITEM];
}
@@ -221,20 +269,20 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
break;
}
- cursorY = cursorY + 1;
- cursorPoint = cursorPoint + 6;
- if (cursorY >= 4) {
+ cursorY += 1;
+ cursorPoint += ITEM_GRID_COLS;
+ if (cursorY >= ITEM_GRID_ROWS) {
cursorY = 0;
cursorPoint = cursorX + 1;
cursorX = cursorPoint;
- if (cursorX >= 6) {
+ if (cursorX >= ITEM_GRID_COLS) {
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
break;
}
}
}
}
- } else {
+ } else { // cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT
if (pauseCtx->stickAdjX < -30) {
pauseCtx->nameDisplayTimer = 0;
pauseCtx->cursorSpecialPos = 0;
@@ -242,7 +290,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- cursorPoint = cursorX = 5;
+ cursorPoint = cursorX = ITEM_GRID_COLS - 1;
cursorY = 0;
while (true) {
if (gSaveContext.save.info.inventory.items[cursorPoint] != ITEM_NONE) {
@@ -253,9 +301,9 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
break;
}
- cursorY = cursorY + 1;
- cursorPoint = cursorPoint + 6;
- if (cursorY >= 4) {
+ cursorY += 1;
+ cursorPoint += ITEM_GRID_COLS;
+ if (cursorY >= ITEM_GRID_ROWS) {
cursorY = 0;
cursorPoint = cursorX - 1;
cursorX = cursorPoint;
@@ -279,7 +327,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
if (pauseCtx->stickAdjY > 30) {
if (pauseCtx->cursorY[PAUSE_ITEM] != 0) {
pauseCtx->cursorY[PAUSE_ITEM]--;
- pauseCtx->cursorPoint[PAUSE_ITEM] -= 6;
+ pauseCtx->cursorPoint[PAUSE_ITEM] -= ITEM_GRID_COLS;
if (gSaveContext.save.info.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] !=
ITEM_NONE) {
@@ -292,9 +340,9 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
cursorMoveResult = 2;
}
} else if (pauseCtx->stickAdjY < -30) {
- if (pauseCtx->cursorY[PAUSE_ITEM] < 3) {
+ if (pauseCtx->cursorY[PAUSE_ITEM] < (ITEM_GRID_ROWS - 1)) {
pauseCtx->cursorY[PAUSE_ITEM]++;
- pauseCtx->cursorPoint[PAUSE_ITEM] += 6;
+ pauseCtx->cursorPoint[PAUSE_ITEM] += ITEM_GRID_COLS;
if (gSaveContext.save.info.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] !=
ITEM_NONE) {
@@ -410,7 +458,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
- for (i = 0, j = 24 * 4; i < 3; i++, j += 4) {
+ for (i = 0, j = ITEM_QUAD_GRID_SELECTED_C_LEFT * 4; i < 3; i++, j += 4) {
if (gSaveContext.save.info.equips.buttonItems[i + 1] != ITEM_NONE) {
gSPVertex(POLY_OPA_DISP++, &pauseCtx->itemVtx[j], 4, 0);
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, gEquippedItemOutlineTex, 32, 32, 0);
@@ -420,7 +468,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
gDPPipeSync(POLY_OPA_DISP++);
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
- for (i = j = 0; i < 24; i++, j += 4) {
+ for (i = j = 0; i < (ITEM_GRID_ROWS * ITEM_GRID_COLS); i++, j += 4) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
if (gSaveContext.save.info.inventory.items[i] != ITEM_NONE) {
@@ -433,28 +481,34 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
magicArrowEffectsB[pauseCtx->equipTargetItem - 0xBF], pauseCtx->alpha);
pauseCtx->itemVtx[j + 0].v.ob[0] = pauseCtx->itemVtx[j + 2].v.ob[0] =
- pauseCtx->itemVtx[j + 0].v.ob[0] - 2;
+ pauseCtx->itemVtx[j + 0].v.ob[0] - ITEM_GRID_QUAD_ENLARGE_OFFSET;
pauseCtx->itemVtx[j + 1].v.ob[0] = pauseCtx->itemVtx[j + 3].v.ob[0] =
- pauseCtx->itemVtx[j + 0].v.ob[0] + 32;
+ pauseCtx->itemVtx[j + 0].v.ob[0] +
+ (ITEM_GRID_QUAD_WIDTH + (ITEM_GRID_QUAD_ENLARGE_OFFSET * 2));
pauseCtx->itemVtx[j + 0].v.ob[1] = pauseCtx->itemVtx[j + 1].v.ob[1] =
- pauseCtx->itemVtx[j + 0].v.ob[1] + 2;
+ pauseCtx->itemVtx[j + 0].v.ob[1] + ITEM_GRID_QUAD_ENLARGE_OFFSET;
pauseCtx->itemVtx[j + 2].v.ob[1] = pauseCtx->itemVtx[j + 3].v.ob[1] =
- pauseCtx->itemVtx[j + 0].v.ob[1] - 32;
+ pauseCtx->itemVtx[j + 0].v.ob[1] -
+ (ITEM_GRID_QUAD_HEIGHT + (ITEM_GRID_QUAD_ENLARGE_OFFSET * 2));
} else if (i == cursorSlot) {
+ // enlarge item under the cursor
+
pauseCtx->itemVtx[j + 0].v.ob[0] = pauseCtx->itemVtx[j + 2].v.ob[0] =
- pauseCtx->itemVtx[j + 0].v.ob[0] - 2;
+ pauseCtx->itemVtx[j + 0].v.ob[0] - ITEM_GRID_QUAD_ENLARGE_OFFSET;
pauseCtx->itemVtx[j + 1].v.ob[0] = pauseCtx->itemVtx[j + 3].v.ob[0] =
- pauseCtx->itemVtx[j + 0].v.ob[0] + 32;
+ pauseCtx->itemVtx[j + 0].v.ob[0] +
+ (ITEM_GRID_QUAD_WIDTH + (ITEM_GRID_QUAD_ENLARGE_OFFSET * 2));
pauseCtx->itemVtx[j + 0].v.ob[1] = pauseCtx->itemVtx[j + 1].v.ob[1] =
- pauseCtx->itemVtx[j + 0].v.ob[1] + 2;
+ pauseCtx->itemVtx[j + 0].v.ob[1] + ITEM_GRID_QUAD_ENLARGE_OFFSET;
pauseCtx->itemVtx[j + 2].v.ob[1] = pauseCtx->itemVtx[j + 3].v.ob[1] =
- pauseCtx->itemVtx[j + 0].v.ob[1] - 32;
+ pauseCtx->itemVtx[j + 0].v.ob[1] -
+ (ITEM_GRID_QUAD_HEIGHT + (ITEM_GRID_QUAD_ENLARGE_OFFSET * 2));
}
}
}
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c
index f5ad9e16bc..c090b77fb9 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c
@@ -1,4 +1,17 @@
#include "z_kaleido_scope.h"
+
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "language_array.h"
+#include "map.h"
+#include "printf.h"
+#include "regs.h"
+#include "sfx.h"
+#include "sys_ucode.h"
+#include "versions.h"
+#include "z64play.h"
+#include "z64save.h"
+
#include "assets/textures/icon_item_24_static/icon_item_24_static.h"
#if OOT_NTSC
#include "assets/textures/icon_item_jpn_static/icon_item_jpn_static.h"
@@ -149,7 +162,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->cursorSpecialPos = 0;
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->dungeonMapSlot;
pauseCtx->cursorX[PAUSE_MAP] = 0;
- j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4);
+ j = (pauseCtx->cursorSlot[PAUSE_MAP] + 18) * 4;
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -180,7 +193,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
}
PRINTF("kscope->cursor_point====%d\n", pauseCtx->cursorPoint[PAUSE_MAP]);
- j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4);
+ j = (pauseCtx->cursorSlot[PAUSE_MAP] + 18) * 4;
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
@@ -202,7 +215,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP];
- j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4);
+ j = (pauseCtx->cursorSlot[PAUSE_MAP] + 18) * 4;
KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx);
if (pauseCtx->cursorX[PAUSE_MAP] == 0) {
@@ -283,7 +296,8 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
gDPPipeSync(POLY_OPA_DISP++);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
- pauseCtx->mapPageVtx[116].v.ob[1] = pauseCtx->mapPageVtx[117].v.ob[1] = pauseCtx->offsetY - (VREG(30) * 14) + 49;
+ pauseCtx->mapPageVtx[116].v.ob[1] = pauseCtx->mapPageVtx[117].v.ob[1] =
+ pauseCtx->pagesYOrigin1 + 50 - (VREG(30) * 14) - 1;
pauseCtx->mapPageVtx[118].v.ob[1] = pauseCtx->mapPageVtx[119].v.ob[1] = pauseCtx->mapPageVtx[116].v.ob[1] - 16;
gDPLoadTextureBlock(POLY_OPA_DISP++, gDungeonMapLinkHeadTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 16, 0,
@@ -295,7 +309,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
if (CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, gSaveContext.mapIndex) &&
(gMapData->skullFloorIconY[gSaveContext.mapIndex] != -99)) {
pauseCtx->mapPageVtx[120].v.ob[1] = pauseCtx->mapPageVtx[121].v.ob[1] =
- gMapData->skullFloorIconY[gSaveContext.mapIndex] + pauseCtx->offsetY;
+ gMapData->skullFloorIconY[gSaveContext.mapIndex] + pauseCtx->pagesYOrigin1;
pauseCtx->mapPageVtx[122].v.ob[1] = pauseCtx->mapPageVtx[123].v.ob[1] = pauseCtx->mapPageVtx[120].v.ob[1] - 16;
gDPLoadTextureBlock(POLY_OPA_DISP++, gDungeonMapSkullTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 16, 0,
@@ -548,9 +562,8 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
if (pauseCtx->cursorSpecialPos == 0) {
if (pauseCtx->stickAdjX > 30) {
- D_8082A6D4 = 0;
-
do {
+ D_8082A6D4 = 0;
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]++;
if (pauseCtx->cursorPoint[PAUSE_WORLD_MAP] >= WORLD_MAP_POINT_MAX) {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = WORLD_MAP_POINT_MAX - 1;
@@ -560,9 +573,8 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
} while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] ==
WORLD_MAP_POINT_STATE_HIDE);
} else if (pauseCtx->stickAdjX < -30) {
- D_8082A6D4 = 0;
-
do {
+ D_8082A6D4 = 0;
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]--;
if (pauseCtx->cursorPoint[PAUSE_WORLD_MAP] < 0) {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 0;
@@ -583,8 +595,8 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18;
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
if (pauseCtx->stickAdjX > 30) {
- pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 0;
pauseCtx->cursorSpecialPos = 0;
+ pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 0;
while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] ==
WORLD_MAP_POINT_STATE_HIDE) {
@@ -601,8 +613,8 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
}
} else {
if (pauseCtx->stickAdjX < -30) {
- pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = WORLD_MAP_POINT_MAX - 1;
pauseCtx->cursorSpecialPos = 0;
+ pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = WORLD_MAP_POINT_MAX - 1;
while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] ==
WORLD_MAP_POINT_STATE_HIDE) {
@@ -632,7 +644,13 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
gDPPipeSync(POLY_OPA_DISP++);
-#if OOT_DEBUG
+#if PLATFORM_N64 && OOT_VERSION != NTSC_1_2
+ if (0) {
+ s32 pad[3];
+ }
+#endif
+
+#if DEBUG_FEATURES
if (HREG(15) == 0) {
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_POINT);
@@ -640,7 +658,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
gDPSetTextureLUT(POLY_OPA_DISP++, G_TT_RGBA16);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[188], 32, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_IMAGE_FIRST) * 4], 32, 0);
for (j = t = i = 0; i < 8; i++, t++, j += 4) {
gDPLoadTextureBlock(
@@ -651,7 +669,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
}
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[220], 28, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_IMAGE_FIRST + 8) * 4], 28, 0);
for (j = i = 0; i < 6; i++, t++, j += 4) {
gDPLoadTextureBlock(
@@ -673,8 +691,9 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
gSPLoadUcodeL(gfx++, gspS2DEX2d_fifo);
- Room_DrawBackground2D(&gfx, gWorldMapImageTex, gWorldMapImageTLUT, 216, 128, G_IM_FMT_CI, G_IM_SIZ_8b,
- G_TT_RGBA16, 256, HREG(13) / 100.0f, HREG(14) / 100.0f);
+ Room_DrawBackground2D(&gfx, gWorldMapImageTex, gWorldMapImageTLUT, WORLD_MAP_IMAGE_WIDTH,
+ WORLD_MAP_IMAGE_HEIGHT, G_IM_FMT_CI, G_IM_SIZ_8b, G_TT_RGBA16, 256, HREG(13) / 100.0f,
+ HREG(14) / 100.0f);
gSPLoadUcode(gfx++, SysUcode_GetUCode(), SysUcode_GetUCodeData());
@@ -756,25 +775,33 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
// Quad PAGE_BG_QUADS + WORLD_MAP_QUAD_28
- pauseCtx->mapPageVtx[172].v.ob[0] = pauseCtx->mapPageVtx[174].v.ob[0] =
- areaBoxPosX[((void)0, gSaveContext.worldMapArea)];
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 0].v.ob[0] =
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 2].v.ob[0] =
+ areaBoxPosX[((void)0, gSaveContext.worldMapArea)];
- pauseCtx->mapPageVtx[173].v.ob[0] = pauseCtx->mapPageVtx[175].v.ob[0] =
- pauseCtx->mapPageVtx[172].v.ob[0] + areaBoxWidths[((void)0, gSaveContext.worldMapArea)];
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 1].v.ob[0] =
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 3].v.ob[0] =
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 0].v.ob[0] +
+ areaBoxWidths[((void)0, gSaveContext.worldMapArea)];
- pauseCtx->mapPageVtx[172].v.ob[1] = pauseCtx->mapPageVtx[173].v.ob[1] =
- areaBoxPosY[((void)0, gSaveContext.worldMapArea)] + pauseCtx->offsetY;
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 0].v.ob[1] =
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 1].v.ob[1] =
+ areaBoxPosY[((void)0, gSaveContext.worldMapArea)] + pauseCtx->pagesYOrigin1;
- pauseCtx->mapPageVtx[174].v.ob[1] = pauseCtx->mapPageVtx[175].v.ob[1] =
- pauseCtx->mapPageVtx[172].v.ob[1] - areaBoxHeights[((void)0, gSaveContext.worldMapArea)];
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 2].v.ob[1] =
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 3].v.ob[1] =
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 0].v.ob[1] -
+ areaBoxHeights[((void)0, gSaveContext.worldMapArea)];
- pauseCtx->mapPageVtx[173].v.tc[0] = pauseCtx->mapPageVtx[175].v.tc[0] =
- areaBoxWidths[((void)0, gSaveContext.worldMapArea)] << 5;
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 1].v.tc[0] =
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 3].v.tc[0] =
+ areaBoxWidths[((void)0, gSaveContext.worldMapArea)] << 5;
- pauseCtx->mapPageVtx[174].v.tc[1] = pauseCtx->mapPageVtx[175].v.tc[1] =
- areaBoxHeights[((void)0, gSaveContext.worldMapArea)] << 5;
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 2].v.tc[1] =
+ pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4 + 3].v.tc[1] =
+ areaBoxHeights[((void)0, gSaveContext.worldMapArea)] << 5;
- gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[172], 4, 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[(PAGE_BG_QUADS + WORLD_MAP_QUAD_28) * 4], 4, 0);
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 100, 255, 255, pauseCtx->alpha);
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.c
index 2ef5079a44..6264c4147c 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.c
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_prompt.c
@@ -1,5 +1,10 @@
#include "z_kaleido_scope.h"
+#include "libu64/pad.h"
+#include "regs.h"
+#include "sfx.h"
+#include "z64play.h"
+
static s16 sKaleidoPromptCursorAlphaVals[] = { 100, 255 };
void KaleidoScope_UpdatePrompt(PlayState* play) {
@@ -10,7 +15,8 @@ void KaleidoScope_UpdatePrompt(PlayState* play) {
if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) &&
(pauseCtx->savePromptState == PAUSE_SAVE_PROMPT_STATE_WAIT_CHOICE)) ||
- (pauseCtx->state == PAUSE_STATE_14) || (pauseCtx->state == PAUSE_STATE_16)) {
+ (pauseCtx->state == PAUSE_STATE_GAME_OVER_SAVE_PROMPT) ||
+ (pauseCtx->state == PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT)) {
if ((pauseCtx->promptChoice == 0) && (stickAdjX >= 30)) {
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c
index 6fa15a382f..79a5d05193 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c
@@ -1,7 +1,33 @@
+#include "z_kaleido_scope.h"
+
+#include "libc64/sleep.h"
+#include "array_count.h"
+#include "controller.h"
+#include "gfx.h"
+#include "gfx_setupdl.h"
+#include "gfxalloc.h"
+#include "language_array.h"
+#include "map.h"
#if PLATFORM_N64
#include "n64dd.h"
#endif
-#include "z_kaleido_scope.h"
+#include "printf.h"
+#include "regs.h"
+#include "segment_symbols.h"
+#include "segmented_address.h"
+#include "seqcmd.h"
+#include "sfx.h"
+#include "sys_matrix.h"
+#include "terminal.h"
+#include "title_setup_state.h"
+#include "translation.h"
+#include "versions.h"
+#include "z64audio.h"
+#include "z64ocarina.h"
+#include "z64play.h"
+#include "z64player.h"
+#include "z64save.h"
+
#include "assets/textures/icon_item_static/icon_item_static.h"
#include "assets/textures/icon_item_24_static/icon_item_24_static.h"
#if OOT_NTSC
@@ -13,9 +39,9 @@
#include "assets/textures/icon_item_fra_static/icon_item_fra_static.h"
#endif
#include "assets/textures/icon_item_gameover_static/icon_item_gameover_static.h"
-#include "terminal.h"
-#pragma increment_block_number "ntsc-1.2:128"
+#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
+ "ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
#if !PLATFORM_GC
#define KALEIDO_PROMPT_CURSOR_R 100
@@ -720,7 +746,7 @@ static u16 sPageSwitchNextPageIndex[] = {
PAUSE_QUEST, // PAUSE_EQUIP left
};
-u8 gSlotAgeReqs[] = {
+char gSlotAgeReqs[] = {
AGE_REQ_CHILD, // SLOT_DEKU_STICK
AGE_REQ_NONE, // SLOT_DEKU_NUT
AGE_REQ_NONE, // SLOT_BOMB
@@ -747,7 +773,7 @@ u8 gSlotAgeReqs[] = {
AGE_REQ_CHILD, // SLOT_TRADE_CHILD
};
-u8 gEquipAgeReqs[4][4] = {
+char gEquipAgeReqs[4][4] = {
{
AGE_REQ_ADULT, // 0 UPG_QUIVER
AGE_REQ_CHILD, // EQUIP_TYPE_SWORD EQUIP_VALUE_SWORD_KOKIRI
@@ -774,7 +800,7 @@ u8 gEquipAgeReqs[4][4] = {
},
};
-u8 gItemAgeReqs[] = {
+char gItemAgeReqs[] = {
AGE_REQ_CHILD, // ITEM_DEKU_STICK
AGE_REQ_NONE, // ITEM_DEKU_NUT
AGE_REQ_NONE, // ITEM_BOMB
@@ -901,9 +927,14 @@ static void* sPromptChoiceTexs[][2] = {
#endif
};
+//! @bug On the iQue version, kaleido bss is reported to be just 0x10 bytes large in the relocation section. This is
+//! likely due to not counting the size of COMMON symbols in the overlay. sPlayerPreRender was likely originally
+//! non-static, but we make it static here to match the bss order and patch the relocation section later in the build
+//! as our relocation generator does count COMMON symbols.
+
static u8 D_808321A8[5];
static PreRender sPlayerPreRender;
-static void* sPreRenderCvg;
+void* sPreRenderCvg;
void KaleidoScope_SetupPlayerPreRender(PlayState* play) {
Gfx* gfx;
@@ -953,7 +984,7 @@ Gfx* KaleidoScope_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height,
return gfx;
}
-void KaleidoScope_OverridePalIndexCI4(u8* texture, s32 size, s32 targetIndex, s32 newIndex) {
+void KaleidoScope_OverridePalIndexCI4(char* texture, s32 size, s32 targetIndex, s32 newIndex) {
s32 i;
s32 index1;
s32 index2;
@@ -1014,7 +1045,7 @@ void KaleidoScope_SetDefaultCursor(PlayState* play) {
s = pauseCtx->cursorSlot[PAUSE_ITEM];
if (gSaveContext.save.info.inventory.items[s] == ITEM_NONE) {
i = s + 1;
- while (true) {
+ for (;;) {
if (gSaveContext.save.info.inventory.items[i] != ITEM_NONE) {
break;
}
@@ -1057,7 +1088,7 @@ void KaleidoScope_SetupPageSwitch(PauseContext* pauseCtx, u8 pt) {
pauseCtx->cursorSpecialPos = PAUSE_CURSOR_PAGE_LEFT;
}
-#if OOT_NTSC
+#if PLATFORM_N64 || OOT_NTSC
gSaveContext.buttonStatus[0] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex + pt][0];
#endif
gSaveContext.buttonStatus[1] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex + pt][1];
@@ -1073,7 +1104,7 @@ void KaleidoScope_SetupPageSwitch(PauseContext* pauseCtx, u8 pt) {
void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
if ((pauseCtx->debugState == 0) && CHECK_BTN_ALL(input->press.button, BTN_L)) {
-#if OOT_DEBUG
+#if DEBUG_FEATURES
pauseCtx->debugState = 1;
#endif
return;
@@ -1116,11 +1147,12 @@ void KaleidoScope_DrawCursor(PlayState* play, u16 pageIndex) {
OPEN_DISPS(play->state.gfxCtx, "../z_kaleido_scope_PAL.c", 955);
- if (((((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) || (pauseCtx->mainState == PAUSE_MAIN_STATE_8)) &&
+ if (((((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) &&
(pauseCtx->state == PAUSE_STATE_MAIN)) ||
((pauseCtx->pageIndex == PAUSE_QUEST) &&
- ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) || (pauseCtx->mainState == PAUSE_MAIN_STATE_5) ||
- (pauseCtx->mainState == PAUSE_MAIN_STATE_8)))) {
+ ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) || (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PROMPT) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)))) {
s16 i;
s16 j;
@@ -1138,9 +1170,9 @@ void KaleidoScope_DrawCursor(PlayState* play, u16 pageIndex) {
gSPVertex(POLY_OPA_DISP++, pauseCtx->cursorVtx, 16, 0);
for (i = j = 0; i < 4; i++, j += 4) {
- gDPLoadTextureBlock_4b(POLY_OPA_DISP++, sCursorTexs[i], G_IM_FMT_IA, 16, 16, 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);
+ gDPLoadTextureBlock_4b(POLY_OPA_DISP++, sCursorTexs[i], G_IM_FMT_IA, PAUSE_MENU_CURSOR_CORNER_TEX_WIDTH,
+ PAUSE_MENU_CURSOR_CORNER_TEX_HEIGHT, 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);
gSP1Quadrangle(POLY_OPA_DISP++, j, j + 2, j + 3, j + 1, 0);
}
}
@@ -1266,11 +1298,12 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
} else if (pauseCtx->stickAdjX > 30) {
if (sStickXRepeatState == 1) {
sStickXRepeatTimer--;
- if (sStickXRepeatTimer < 0) {
+ // NOLINTBEGIN
+ if (sStickXRepeatTimer < 0)
sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
- } else {
+ else
pauseCtx->stickAdjX = 0;
- }
+ // NOLINTEND
} else {
sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
sStickXRepeatState = 1;
@@ -1294,11 +1327,12 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
} else if (pauseCtx->stickAdjY > 30) {
if (sStickYRepeatState == 1) {
sStickYRepeatTimer--;
- if (sStickYRepeatTimer < 0) {
+ // NOLINTBEGIN
+ if (sStickYRepeatTimer < 0)
sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
- } else {
+ else
pauseCtx->stickAdjY = 0;
- }
+ // NOLINTEND
} else {
sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
sStickYRepeatState = 1;
@@ -1308,13 +1342,16 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
}
}
+ // Draw non-active pages (not the one being looked at)
+
if (pauseCtx->pageIndex) { // pageIndex != PAUSE_ITEM
gDPPipeSync(POLY_OPA_DISP++);
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
- Matrix_Translate(0.0f, (f32)WREG(2) / 100.0f, -(f32)WREG(3) / 100.0f, MTXMODE_NEW);
+ Matrix_Translate(0.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, -(f32)R_PAUSE_DEPTH_OFFSET / 100.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateX(-pauseCtx->unk_1F4 / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateX(-pauseCtx->itemPagePitch / 100.0f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gfxCtx, "../z_kaleido_scope_PAL.c", 1173);
@@ -1328,9 +1365,10 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
gDPPipeSync(POLY_OPA_DISP++);
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
- Matrix_Translate(-(f32)WREG(3) / 100.0f, (f32)WREG(2) / 100.0f, 0.0f, MTXMODE_NEW);
+ Matrix_Translate(-(f32)R_PAUSE_DEPTH_OFFSET / 100.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, 0.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateZ(pauseCtx->unk_1F8 / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateZ(pauseCtx->equipPagePitch / 100.0f, MTXMODE_APPLY);
Matrix_RotateY(1.57f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gfxCtx, "../z_kaleido_scope_PAL.c", 1196);
@@ -1346,9 +1384,10 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_BILERP);
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
- Matrix_Translate(0.0f, (f32)WREG(2) / 100.0f, (f32)WREG(3) / 100.0f, MTXMODE_NEW);
+ Matrix_Translate(0.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, (f32)R_PAUSE_DEPTH_OFFSET / 100.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateX(pauseCtx->unk_200 / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateX(pauseCtx->questPagePitch / 100.0f, MTXMODE_APPLY);
Matrix_RotateY(3.14f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gfxCtx, "../z_kaleido_scope_PAL.c", 1220);
@@ -1364,9 +1403,10 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
- Matrix_Translate((f32)WREG(3) / 100.0f, (f32)WREG(2) / 100.0f, 0.0f, MTXMODE_NEW);
+ Matrix_Translate((f32)R_PAUSE_DEPTH_OFFSET / 100.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, 0.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateZ(-pauseCtx->unk_1FC / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateZ(-pauseCtx->mapPagePitch / 100.0f, MTXMODE_APPLY);
Matrix_RotateY(-1.57f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gfxCtx, "../z_kaleido_scope_PAL.c", 1243);
@@ -1388,14 +1428,17 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
}
}
+ // Update and draw the active page being looked at
+
gDPPipeSync(POLY_OPA_DISP++);
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
switch (pauseCtx->pageIndex) {
case PAUSE_ITEM:
- Matrix_Translate(0.0f, (f32)WREG(2) / 100.0f, -(f32)WREG(3) / 100.0f, MTXMODE_NEW);
+ Matrix_Translate(0.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, -(f32)R_PAUSE_DEPTH_OFFSET / 100.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateX(-pauseCtx->unk_1F4 / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateX(-pauseCtx->itemPagePitch / 100.0f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gfxCtx, "../z_kaleido_scope_PAL.c", 1281);
@@ -1406,9 +1449,10 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
break;
case PAUSE_MAP:
- Matrix_Translate((f32)WREG(3) / 100.0f, (f32)WREG(2) / 100.0f, 0.0f, MTXMODE_NEW);
+ Matrix_Translate((f32)R_PAUSE_DEPTH_OFFSET / 100.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, 0.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateZ(-pauseCtx->unk_1FC / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateZ(-pauseCtx->mapPagePitch / 100.0f, MTXMODE_APPLY);
Matrix_RotateY(-1.57f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gfxCtx, "../z_kaleido_scope_PAL.c", 1303);
@@ -1437,9 +1481,10 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
case PAUSE_QUEST:
gDPSetTextureFilter(POLY_OPA_DISP++, G_TF_BILERP);
- Matrix_Translate(0.0f, (f32)WREG(2) / 100.0f, (f32)WREG(3) / 100.0f, MTXMODE_NEW);
+ Matrix_Translate(0.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, (f32)R_PAUSE_DEPTH_OFFSET / 100.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateX(pauseCtx->unk_200 / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateX(pauseCtx->questPagePitch / 100.0f, MTXMODE_APPLY);
Matrix_RotateY(3.14f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gfxCtx, "../z_kaleido_scope_PAL.c", 1343);
@@ -1455,9 +1500,10 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
break;
case PAUSE_EQUIP:
- Matrix_Translate(-(f32)WREG(3) / 100.0f, (f32)WREG(2) / 100.0f, 0.0f, MTXMODE_NEW);
+ Matrix_Translate(-(f32)R_PAUSE_DEPTH_OFFSET / 100.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, 0.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateZ(pauseCtx->unk_1F8 / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateZ(pauseCtx->equipPagePitch / 100.0f, MTXMODE_APPLY);
Matrix_RotateY(1.57f, MTXMODE_APPLY);
MATRIX_FINALIZE_AND_LOAD(POLY_OPA_DISP++, gfxCtx, "../z_kaleido_scope_PAL.c", 1367);
@@ -1474,6 +1520,8 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
}
}
+ // Update and draw prompt (save or gameover)
+
Gfx_SetupDL_42Opa(gfxCtx);
if ((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) || IS_PAUSE_STATE_GAMEOVER(pauseCtx)) {
@@ -1482,31 +1530,35 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
if ((u32)pauseCtx->pageIndex == PAUSE_ITEM) {
- pauseCtx->unk_1F4 = pauseCtx->unk_204 + 314.0f;
+ pauseCtx->itemPagePitch = pauseCtx->promptPitch + 314.0f;
- Matrix_Translate(0.0f, (f32)WREG(2) / 100.0f, -pauseCtx->unk_1F0 / 10.0f, MTXMODE_NEW);
+ Matrix_Translate(0.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, -pauseCtx->promptDepthOffset / 10.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateX(-pauseCtx->unk_204 / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateX(-pauseCtx->promptPitch / 100.0f, MTXMODE_APPLY);
} else if (pauseCtx->pageIndex == PAUSE_MAP) {
- pauseCtx->unk_1FC = pauseCtx->unk_204 + 314.0f;
+ pauseCtx->mapPagePitch = pauseCtx->promptPitch + 314.0f;
- Matrix_Translate(pauseCtx->unk_1F0 / 10.0f, (f32)WREG(2) / 100.0f, 0.0f, MTXMODE_NEW);
+ Matrix_Translate(pauseCtx->promptDepthOffset / 10.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, 0.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateZ(-pauseCtx->unk_204 / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateZ(-pauseCtx->promptPitch / 100.0f, MTXMODE_APPLY);
Matrix_RotateY(-1.57f, MTXMODE_APPLY);
} else if (pauseCtx->pageIndex == PAUSE_QUEST) {
- pauseCtx->unk_200 = pauseCtx->unk_204 + 314.0f;
+ pauseCtx->questPagePitch = pauseCtx->promptPitch + 314.0f;
- Matrix_Translate(0.0f, (f32)WREG(2) / 100.0f, pauseCtx->unk_1F0 / 10.0f, MTXMODE_NEW);
+ Matrix_Translate(0.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, pauseCtx->promptDepthOffset / 10.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateX(pauseCtx->unk_204 / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateX(pauseCtx->promptPitch / 100.0f, MTXMODE_APPLY);
Matrix_RotateY(3.14f, MTXMODE_APPLY);
} else {
- pauseCtx->unk_1F8 = pauseCtx->unk_204 + 314.0f;
+ pauseCtx->equipPagePitch = pauseCtx->promptPitch + 314.0f;
- Matrix_Translate(-pauseCtx->unk_1F0 / 10.0f, (f32)WREG(2) / 100.0f, 0.0f, MTXMODE_NEW);
+ Matrix_Translate(-pauseCtx->promptDepthOffset / 10.0f, (f32)R_PAUSE_PAGES_Y_ORIGIN_2 / 100.0f, 0.0f,
+ MTXMODE_NEW);
Matrix_Scale(0.78f, 0.78f, 0.78f, MTXMODE_APPLY);
- Matrix_RotateZ(pauseCtx->unk_204 / 100.0f, MTXMODE_APPLY);
+ Matrix_RotateZ(pauseCtx->promptPitch / 100.0f, MTXMODE_APPLY);
Matrix_RotateY(1.57f, MTXMODE_APPLY);
}
@@ -1524,7 +1576,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) &&
(pauseCtx->savePromptState < PAUSE_SAVE_PROMPT_STATE_SAVED)) ||
- (pauseCtx->state == PAUSE_STATE_14)) {
+ (pauseCtx->state == PAUSE_STATE_GAME_OVER_SAVE_PROMPT)) {
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sSavePromptMessageTexs[gSaveContext.language],
152, 16, PROMPT_QUAD_MESSAGE * 4);
@@ -1552,12 +1604,13 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
16, PROMPT_QUAD_CHOICE_NO * 4);
} else if (((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) &&
(pauseCtx->savePromptState >= PAUSE_SAVE_PROMPT_STATE_SAVED)) ||
- pauseCtx->state == PAUSE_STATE_15) {
-#if PLATFORM_N64
+ pauseCtx->state == PAUSE_STATE_GAME_OVER_SAVED) {
+#if !PLATFORM_GC
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sSaveConfirmationTexs[gSaveContext.language],
152, 16, PROMPT_QUAD_MESSAGE * 4);
#endif
- } else if (((pauseCtx->state == PAUSE_STATE_16) || (pauseCtx->state == PAUSE_STATE_17))) {
+ } else if (((pauseCtx->state == PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT) ||
+ (pauseCtx->state == PAUSE_STATE_GAME_OVER_FINISH))) {
POLY_OPA_DISP = KaleidoScope_QuadTextureIA8(POLY_OPA_DISP, sContinuePromptTexs[gSaveContext.language], 152,
16, PROMPT_QUAD_MESSAGE * 4);
@@ -1589,7 +1642,8 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
- if ((pauseCtx->state != PAUSE_STATE_16) && (pauseCtx->state != PAUSE_STATE_17)) {
+ if ((pauseCtx->state != PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT) &&
+ (pauseCtx->state != PAUSE_STATE_GAME_OVER_FINISH)) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 0, pauseCtx->alpha);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
}
@@ -1801,7 +1855,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
gSPDisplayList(POLY_OPA_DISP++, gRButtonIconDL);
if (pauseCtx->cursorSpecialPos != 0) {
- j = (pauseCtx->cursorSpecialPos * 4) - 32;
+ j = (pauseCtx->cursorSpecialPos - 8) * 4;
pauseCtx->cursorVtx[0].v.ob[0] = pauseCtx->infoPanelVtx[j].v.ob[0];
pauseCtx->cursorVtx[0].v.ob[1] = pauseCtx->infoPanelVtx[j].v.ob[1];
KaleidoScope_DrawCursor(play, pauseCtx->pageIndex);
@@ -1821,13 +1875,17 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
if ((pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->namedItem != PAUSE_ITEM_NONE) &&
(pauseCtx->nameDisplayTimer < WREG(89)) &&
- (((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) || (pauseCtx->mainState == PAUSE_MAIN_STATE_2) ||
- ((pauseCtx->mainState >= PAUSE_MAIN_STATE_4) && (pauseCtx->mainState <= PAUSE_MAIN_STATE_7)) ||
- (pauseCtx->mainState == PAUSE_MAIN_STATE_8)) &&
+ (((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PLAYBACK) ||
+ ((pauseCtx->mainState >= PAUSE_MAIN_STATE_SONG_PROMPT_INIT) &&
+ (pauseCtx->mainState <= PAUSE_MAIN_STATE_EQUIP_CHANGED)) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) &&
(pauseCtx->cursorSpecialPos == 0)) {
- if (((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) || (pauseCtx->mainState == PAUSE_MAIN_STATE_2) ||
- ((pauseCtx->mainState >= PAUSE_MAIN_STATE_4) && (pauseCtx->mainState <= PAUSE_MAIN_STATE_7)) ||
- (pauseCtx->mainState == PAUSE_MAIN_STATE_8)) {
+ if (((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PLAYBACK) ||
+ ((pauseCtx->mainState >= PAUSE_MAIN_STATE_SONG_PROMPT_INIT) &&
+ (pauseCtx->mainState <= PAUSE_MAIN_STATE_EQUIP_CHANGED)) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) {
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] = -63;
pauseCtx->infoPanelVtx[17].v.ob[0] = pauseCtx->infoPanelVtx[19].v.ob[0] =
@@ -1849,13 +1907,14 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
ITEM_NAME_TEX_HEIGHT, 0);
}
-#if OOT_DEBUG
+#if DEBUG_FEATURES
if (pauseCtx->pageIndex == PAUSE_MAP) {
if (YREG(7) != 0) {
- PRINTF(VT_FGCOL(YELLOW));
- PRINTF("キンスタ数(%d) Get_KIN_STA=%x (%x) (%x)\n", YREG(6), GET_GS_FLAGS(YREG(6)),
- gAreaGsFlags[YREG(6)], gSaveContext.save.info.gsFlags[YREG(6) >> 2]);
- PRINTF(VT_RST);
+ PRINTF_COLOR_YELLOW();
+ PRINTF(T("キンスタ数(%d) Get_KIN_STA=%x (%x) (%x)\n", "Kinsta Count(%d) Get_KIN_STA=%x (%x) (%x)\n"),
+ YREG(6), GET_GS_FLAGS(YREG(6)), gAreaGsFlags[YREG(6)],
+ gSaveContext.save.info.gsFlags[YREG(6) >> 2]);
+ PRINTF_RST();
YREG(7) = 0;
SET_GS_FLAGS(D_8082AE30[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]],
@@ -1893,8 +1952,8 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
QUEST_ICON_HEIGHT, 0);
}
}
- } else if ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) || (pauseCtx->mainState == PAUSE_MAIN_STATE_7) ||
- (pauseCtx->mainState == PAUSE_MAIN_STATE_8)) {
+ } else if ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) || (pauseCtx->mainState == PAUSE_MAIN_STATE_EQUIP_CHANGED) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) {
pauseCtx->infoPanelVtx[20].v.ob[1] = pauseCtx->infoPanelVtx[21].v.ob[1] = temp;
pauseCtx->infoPanelVtx[22].v.ob[1] = pauseCtx->infoPanelVtx[23].v.ob[1] =
@@ -1977,8 +2036,8 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
D_8082ADD8[gSaveContext.language], 16, 4);
} else if ((pauseCtx->pageIndex == PAUSE_MAP) && sInDungeonScene) {
- } else if ((pauseCtx->pageIndex == PAUSE_QUEST) && (pauseCtx->cursorSlot[PAUSE_QUEST] >= 6) &&
- (pauseCtx->cursorSlot[PAUSE_QUEST] <= 0x11)) {
+ } else if ((pauseCtx->pageIndex == PAUSE_QUEST) &&
+ ((pauseCtx->cursorSlot[PAUSE_QUEST] >= 6) && (pauseCtx->cursorSlot[PAUSE_QUEST] <= 0x11))) {
if (pauseCtx->namedItem != PAUSE_ITEM_NONE) {
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] =
R_KALEIDO_UNK3(gSaveContext.language);
@@ -2096,10 +2155,11 @@ void KaleidoScope_UpdateNamePanel(PlayState* play) {
pauseCtx->nameDisplayTimer = 0;
}
} else if (pauseCtx->nameColorSet == 0) {
- if (((pauseCtx->pageIndex == PAUSE_QUEST) && (pauseCtx->cursorSlot[PAUSE_QUEST] >= 6) &&
- (pauseCtx->cursorSlot[PAUSE_QUEST] <= 0x11) && (pauseCtx->mainState == PAUSE_MAIN_STATE_8)) ||
+ if (((pauseCtx->pageIndex == PAUSE_QUEST) &&
+ ((pauseCtx->cursorSlot[PAUSE_QUEST] >= 6) && (pauseCtx->cursorSlot[PAUSE_QUEST] <= 0x11)) &&
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) ||
(pauseCtx->pageIndex == PAUSE_ITEM) ||
- ((pauseCtx->pageIndex == PAUSE_EQUIP) && (pauseCtx->cursorX[PAUSE_EQUIP] != 0))) {
+ ((pauseCtx->pageIndex == PAUSE_EQUIP) && (pauseCtx->cursorX[PAUSE_EQUIP] != EQUIP_CURSOR_X_UPG))) {
if (pauseCtx->namedItem != ITEM_SOLD_OUT) {
pauseCtx->nameDisplayTimer++;
if (pauseCtx->nameDisplayTimer > WREG(88)) {
@@ -2117,16 +2177,16 @@ void KaleidoScope_UpdateNamePanel(PlayState* play) {
void KaleidoScope_UpdatePageSwitch(PlayState* play, Input* input) {
PauseContext* pauseCtx = &play->pauseCtx;
s32 frameAdvanceFreeze = false;
- s32 nextPageMode;
if (R_PAUSE_PAGE_SWITCH_FRAME_ADVANCE_ON && !CHECK_BTN_ALL(input->press.button, BTN_L)) {
frameAdvanceFreeze = true;
}
if (!frameAdvanceFreeze) {
- nextPageMode = pauseCtx->nextPageMode;
- pauseCtx->eye.x += sPageSwitchEyeDx[nextPageMode];
- pauseCtx->eye.z += sPageSwitchEyeDz[nextPageMode];
+ pauseCtx->eye.x += sPageSwitchEyeDx[pauseCtx->nextPageMode];
+ pauseCtx->eye.z += sPageSwitchEyeDz[pauseCtx->nextPageMode];
+
+ if (pauseCtx->nextPageMode) {}
if (pauseCtx->pageSwitchTimer < ((4 * PAGE_SWITCH_NSTEPS) / 2)) {
WREG(16) -= WREG(25) / WREG(6);
@@ -2372,7 +2432,6 @@ static s16 sVtxMapWorldAreaX[] = {
20, // WORLD_MAP_AREA_GORON_CITY
-34, // WORLD_MAP_AREA_LON_LON_RANCH
-300, // WORLD_MAP_AREA_QUESTION_MARK
- 0, // WORLD_MAP_AREA_GANONS_CASTLE
};
static s16 sVtxMapWorldAreaWidth[] = {
@@ -2397,7 +2456,6 @@ static s16 sVtxMapWorldAreaWidth[] = {
16, // WORLD_MAP_AREA_GORON_CITY
20, // WORLD_MAP_AREA_LON_LON_RANCH
-1, // WORLD_MAP_AREA_QUESTION_MARK
- 0, // WORLD_MAP_AREA_GANONS_CASTLE
};
static s16 sVtxMapWorldAreaY[] = {
@@ -2422,7 +2480,6 @@ static s16 sVtxMapWorldAreaY[] = {
37, // WORLD_MAP_AREA_GORON_CITY
-13, // WORLD_MAP_AREA_LON_LON_RANCH
-300, // WORLD_MAP_AREA_QUESTION_MARK
- 0, // WORLD_MAP_AREA_GANONS_CASTLE
};
static s16 sVtxMapWorldAreaHeight[] = {
@@ -2447,7 +2504,6 @@ static s16 sVtxMapWorldAreaHeight[] = {
13, // WORLD_MAP_AREA_GORON_CITY
12, // WORLD_MAP_AREA_LON_LON_RANCH
1, // WORLD_MAP_AREA_QUESTION_MARK
- 0, // WORLD_MAP_AREA_GANONS_CASTLE
};
s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 numQuads) {
@@ -2455,40 +2511,39 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num
static s16 sTradeQuestMarkerBobTimer = 1;
static s16 sTradeQuestMarkerBobState = 0;
PauseContext* pauseCtx = &play->pauseCtx;
+ s16 i;
+ s16 j;
+ s16 bufI;
+ s16 bufIAfterPageSections;
+ s16 pageBgQuadX;
+ s16 pageBgQuadY;
s16* quadsX;
s16* quadsWidth;
s16* quadsY;
s16* quadsHeight;
- s16 bufIAfterPageSections;
- s16 pageBgQuadX;
- s16 pageBgQuadY;
- s16 i;
- s16 j;
- s16 bufI;
// Vertices for KaleidoScope_DrawPageSections
pageBgQuadX = 0 - (PAGE_BG_COLS * PAGE_BG_QUAD_WIDTH) / 2 - PAGE_BG_QUAD_WIDTH;
- for (bufI = 0, j = 0; j < 3; j++) {
+ // For each column
+ for (bufI = 0, j = 0; j < PAGE_BG_COLS; j++) {
pageBgQuadX += PAGE_BG_QUAD_WIDTH;
- for (pageBgQuadY = (PAGE_BG_ROWS * PAGE_BG_QUAD_HEIGHT) / 2, i = 0; i < 5;
- i++, bufI += 4, pageBgQuadY -= PAGE_BG_QUAD_HEIGHT) {
+ // For each row
+ for (pageBgQuadY = (PAGE_BG_ROWS * PAGE_BG_QUAD_HEIGHT) / 2, i = 0; i < PAGE_BG_ROWS;
+ bufI += 4, i++, pageBgQuadY -= PAGE_BG_QUAD_HEIGHT) {
vtx[bufI + 0].v.ob[0] = vtx[bufI + 2].v.ob[0] = pageBgQuadX;
vtx[bufI + 1].v.ob[0] = vtx[bufI + 3].v.ob[0] = vtx[bufI + 0].v.ob[0] + PAGE_BG_QUAD_WIDTH;
- vtx[bufI + 0].v.ob[1] = vtx[bufI + 1].v.ob[1] = pageBgQuadY + pauseCtx->offsetY;
+ vtx[bufI + 0].v.ob[1] = vtx[bufI + 1].v.ob[1] = pageBgQuadY + pauseCtx->pagesYOrigin1;
vtx[bufI + 2].v.ob[1] = vtx[bufI + 3].v.ob[1] = vtx[bufI + 0].v.ob[1] - PAGE_BG_QUAD_HEIGHT;
vtx[bufI + 0].v.ob[2] = vtx[bufI + 1].v.ob[2] = vtx[bufI + 2].v.ob[2] = vtx[bufI + 3].v.ob[2] = 0;
- vtx[bufI + 0].v.flag = 0;
- vtx[bufI + 1].v.flag = 0;
- vtx[bufI + 2].v.flag = 0;
- vtx[bufI + 3].v.flag = 0;
+ vtx[bufI + 0].v.flag = vtx[bufI + 1].v.flag = vtx[bufI + 2].v.flag = vtx[bufI + 3].v.flag = 0;
vtx[bufI + 0].v.tc[0] = vtx[bufI + 0].v.tc[1] = vtx[bufI + 1].v.tc[1] = vtx[bufI + 2].v.tc[0] = 0;
@@ -2524,14 +2579,14 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num
quadsHeight = sVtxPageQuadsHeight[vtxPage];
for (j = 0; j < numQuads; j++, bufI += 4) {
- vtx[bufI + 2].v.ob[0] = vtx[bufI + 0].v.ob[0] = quadsX[j];
+ vtx[bufI + 0].v.ob[0] = vtx[bufI + 2].v.ob[0] = quadsX[j];
vtx[bufI + 1].v.ob[0] = vtx[bufI + 3].v.ob[0] = vtx[bufI + 0].v.ob[0] + quadsWidth[j];
if (!IS_PAUSE_STATE_GAMEOVER(pauseCtx)) {
- vtx[bufI + 0].v.ob[1] = vtx[bufI + 1].v.ob[1] = quadsY[j] + pauseCtx->offsetY;
+ vtx[bufI + 0].v.ob[1] = vtx[bufI + 1].v.ob[1] = quadsY[j] + pauseCtx->pagesYOrigin1;
} else {
- vtx[bufI + 0].v.ob[1] = vtx[bufI + 1].v.ob[1] = YREG(60 + j) + pauseCtx->offsetY;
+ vtx[bufI + 0].v.ob[1] = vtx[bufI + 1].v.ob[1] = YREG(60 + j) + pauseCtx->pagesYOrigin1;
}
vtx[bufI + 2].v.ob[1] = vtx[bufI + 3].v.ob[1] = vtx[bufI + 0].v.ob[1] - quadsHeight[j];
@@ -2555,10 +2610,15 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num
}
if (vtxPage == VTX_PAGE_MAP_WORLD) {
- // For world map page, initialize vtx beyond VTX_PAGE_MAP_WORLD_QUADS
+ // WORLD_MAP_QUAD_TRADE_QUEST_MARKER
- bufI -= 12;
+ bufI -= ((VTX_PAGE_MAP_WORLD_QUADS - WORLD_MAP_QUAD_TRADE_QUEST_MARKER) * 4);
+ //! @bug If worldMapArea is WORLD_MAP_AREA_GANONS_CASTLE or WORLD_MAP_AREA_MAX, this will read past the end
+ //! of the sVtxMapWorldArea arrays and generate garbage vertex data. This is harmless though:
+ //! if pauseCtx->tradeQuestMarker != TRADE_QUEST_MARKER_NONE then the vertices are immediately overwritten,
+ //! and if pauseCtx->tradeQuestMarker == TRADE_QUEST_MARKER_NONE then KaleidoScope_DrawWorldMap will not
+ //! draw anything with these vertices.
j = gSaveContext.worldMapArea;
vtx[bufI + 0].v.ob[0] = vtx[bufI + 2].v.ob[0] = sVtxMapWorldAreaX[j];
@@ -2567,11 +2627,11 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num
vtx[bufI + 1].v.ob[0] = vtx[bufI + 3].v.ob[0] = vtx[bufI + 0].v.ob[0] + sVtxMapWorldAreaWidth[j];
- vtx[bufI + 0].v.ob[1] = vtx[bufI + 1].v.ob[1] = sVtxMapWorldAreaY[j] + pauseCtx->offsetY;
+ vtx[bufI + 0].v.ob[1] = vtx[bufI + 1].v.ob[1] = sVtxMapWorldAreaY[j] + pauseCtx->pagesYOrigin1;
vtx[bufI + 2].v.ob[1] = vtx[bufI + 3].v.ob[1] = vtx[bufI + 0].v.ob[1] - sVtxMapWorldAreaHeight[j];
- bufI += 12;
+ bufI += ((VTX_PAGE_MAP_WORLD_QUADS - WORLD_MAP_QUAD_TRADE_QUEST_MARKER) * 4);
if (pauseCtx->tradeQuestMarker != TRADE_QUEST_MARKER_NONE) {
if (sTradeQuestMarkerBobTimer == 0) {
@@ -2582,9 +2642,9 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num
sTradeQuestMarkerBobTimer = 8;
break;
case 2:
+ sTradeQuestMarkerBobState = 0;
sTradeQuestMarkerBobY = 0;
sTradeQuestMarkerBobTimer = 6;
- sTradeQuestMarkerBobState = 0;
break;
}
} else {
@@ -2598,12 +2658,12 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num
vtx[i + 1].v.ob[0] = vtx[i + 3].v.ob[0] = vtx[i + 0].v.ob[0] + 8;
- vtx[i + 0].v.ob[1] = vtx[i + 1].v.ob[1] = vtx[j + 0].v.ob[1] - sTradeQuestMarkerBobY + 10;
-
- vtx[i + 0].v.ob[2] = vtx[i + 1].v.ob[2] = vtx[i + 2].v.ob[2] = vtx[i + 3].v.ob[2] = 0;
+ vtx[i + 0].v.ob[1] = vtx[i + 1].v.ob[1] = vtx[j + 0].v.ob[1] + 10 - sTradeQuestMarkerBobY;
vtx[i + 2].v.ob[1] = vtx[i + 3].v.ob[1] = vtx[i + 0].v.ob[1] - 8;
+ vtx[i + 0].v.ob[2] = vtx[i + 1].v.ob[2] = vtx[i + 2].v.ob[2] = vtx[i + 3].v.ob[2] = 0;
+
vtx[i + 0].v.flag = vtx[i + 1].v.flag = vtx[i + 2].v.flag = vtx[i + 3].v.flag = 0;
vtx[bufI].v.tc[0] = vtx[bufI].v.tc[1] = vtx[i + 1].v.tc[1] = vtx[i + 2].v.tc[0] = 0;
@@ -2624,26 +2684,173 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num
return bufI;
}
-static s16 D_8082B11C[] = { 0, 4, 8, 12, 24, 32, 56 };
-
-static s16 D_8082B12C[] = { -114, 12, 44, 76 };
-
-static u8 D_8082B134[] = { 1, 5, 9, 13 };
-
-static s16 D_8082B138[] = {
- 74, 74, 46, 18, 18, 46, -108, -90, -72, -54, -36, -18, -108, -90, -72, -54,
- -36, -18, 20, 46, 72, -110, -86, -110, -54, -98, -86, -74, -62, -50, -38, -26,
- -14, -98, -86, -74, -62, -50, -38, -26, -14, -88, -81, -72, -90, -83, -74,
+static s16 sItemVtxQuadsWithAmmo[] = {
+ SLOT_DEKU_STICK * 4, // ITEM_QUAD_AMMO_STICK_
+ SLOT_DEKU_NUT * 4, // ITEM_QUAD_AMMO_NUT_
+ SLOT_BOMB * 4, // ITEM_QUAD_AMMO_BOMB_
+ SLOT_BOW * 4, // ITEM_QUAD_AMMO_BOW_
+ SLOT_SLINGSHOT * 4, // ITEM_QUAD_AMMO_SLINGSHOT_
+ SLOT_BOMBCHU * 4, // ITEM_QUAD_AMMO_BOMBCHU_
+ SLOT_MAGIC_BEAN * 4, // ITEM_QUAD_AMMO_BEAN_
};
-static s16 D_8082B198[] = {
- 38, 6, -12, 6, 38, 56, -20, -20, -20, -20, -20, -20, 2, 2, 2, 2, 2, 2, -46, -46, -46, 58, 58, 34,
- 58, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, 34, 34, 34, 36, 36, 36,
+static s16 sEquipColumnsX[] = { -114, 12, 44, 76 };
+
+static u8 sEquipQuadsFirstByEquipType[EQUIP_TYPE_MAX] = {
+ EQUIP_QUAD_SWORD_KOKIRI, // EQUIP_TYPE_SWORD
+ EQUIP_QUAD_SHIELD_DEKU, // EQUIP_TYPE_SHIELD
+ EQUIP_QUAD_TUNIC_KOKIRI, // EQUIP_TYPE_TUNIC
+ EQUIP_QUAD_BOOTS_KOKIRI, // EQUIP_TYPE_BOOTS
};
-static s16 D_8082B1F8[] = {
- 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
- 48, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+static s16 sQuestQuadsX[] = {
+ 74, // QUEST_MEDALLION_FOREST
+ 74, // QUEST_MEDALLION_FIRE
+ 46, // QUEST_MEDALLION_WATER
+ 18, // QUEST_MEDALLION_SPIRIT
+ 18, // QUEST_MEDALLION_SHADOW
+ 46, // QUEST_MEDALLION_LIGHT
+ -108, // QUEST_SONG_MINUET
+ -90, // QUEST_SONG_BOLERO
+ -72, // QUEST_SONG_SERENADE
+ -54, // QUEST_SONG_REQUIEM
+ -36, // QUEST_SONG_NOCTURNE
+ -18, // QUEST_SONG_PRELUDE
+ -108, // QUEST_SONG_LULLABY
+ -90, // QUEST_SONG_EPONA
+ -72, // QUEST_SONG_SARIA
+ -54, // QUEST_SONG_SUN
+ -36, // QUEST_SONG_TIME
+ -18, // QUEST_SONG_STORMS
+ 20, // QUEST_KOKIRI_EMERALD
+ 46, // QUEST_GORON_RUBY
+ 72, // QUEST_ZORA_SAPPHIRE
+ -110, // QUEST_STONE_OF_AGONY
+ -86, // QUEST_GERUDOS_CARD
+ -110, // QUEST_SKULL_TOKEN
+ -54, // QUEST_HEART_PIECE
+ -98, // QUEST_QUAD_SONG_NOTE_A1
+ -86, // QUEST_QUAD_SONG_NOTE_A2
+ -74, // QUEST_QUAD_SONG_NOTE_A3
+ -62, // QUEST_QUAD_SONG_NOTE_A4
+ -50, // QUEST_QUAD_SONG_NOTE_A5
+ -38, // QUEST_QUAD_SONG_NOTE_A6
+ -26, // QUEST_QUAD_SONG_NOTE_A7
+ -14, // QUEST_QUAD_SONG_NOTE_A8
+ -98, // QUEST_QUAD_SONG_NOTE_B1
+ -86, // QUEST_QUAD_SONG_NOTE_B2
+ -74, // QUEST_QUAD_SONG_NOTE_B3
+ -62, // QUEST_QUAD_SONG_NOTE_B4
+ -50, // QUEST_QUAD_SONG_NOTE_B5
+ -38, // QUEST_QUAD_SONG_NOTE_B6
+ -26, // QUEST_QUAD_SONG_NOTE_B7
+ -14, // QUEST_QUAD_SONG_NOTE_B8
+ -88, // QUEST_QUAD_SKULL_TOKENS_DIGIT1_SHADOW
+ -81, // QUEST_QUAD_SKULL_TOKENS_DIGIT2_SHADOW
+ -72, // QUEST_QUAD_SKULL_TOKENS_DIGIT3_SHADOW
+ -90, // QUEST_QUAD_SKULL_TOKENS_DIGIT1
+ -83, // QUEST_QUAD_SKULL_TOKENS_DIGIT2
+ -74, // QUEST_QUAD_SKULL_TOKENS_DIGIT3
+};
+
+static s16 sQuestQuadsY[] = {
+ 38, // QUEST_MEDALLION_FOREST
+ 6, // QUEST_MEDALLION_FIRE
+ -12, // QUEST_MEDALLION_WATER
+ 6, // QUEST_MEDALLION_SPIRIT
+ 38, // QUEST_MEDALLION_SHADOW
+ 56, // QUEST_MEDALLION_LIGHT
+ -20, // QUEST_SONG_MINUET
+ -20, // QUEST_SONG_BOLERO
+ -20, // QUEST_SONG_SERENADE
+ -20, // QUEST_SONG_REQUIEM
+ -20, // QUEST_SONG_NOCTURNE
+ -20, // QUEST_SONG_PRELUDE
+ 2, // QUEST_SONG_LULLABY
+ 2, // QUEST_SONG_EPONA
+ 2, // QUEST_SONG_SARIA
+ 2, // QUEST_SONG_SUN
+ 2, // QUEST_SONG_TIME
+ 2, // QUEST_SONG_STORMS
+ -46, // QUEST_KOKIRI_EMERALD
+ -46, // QUEST_GORON_RUBY
+ -46, // QUEST_ZORA_SAPPHIRE
+ 58, // QUEST_STONE_OF_AGONY
+ 58, // QUEST_GERUDOS_CARD
+ 34, // QUEST_SKULL_TOKEN
+ 58, // QUEST_HEART_PIECE
+ -52, // QUEST_QUAD_SONG_NOTE_A1
+ -52, // QUEST_QUAD_SONG_NOTE_A2
+ -52, // QUEST_QUAD_SONG_NOTE_A3
+ -52, // QUEST_QUAD_SONG_NOTE_A4
+ -52, // QUEST_QUAD_SONG_NOTE_A5
+ -52, // QUEST_QUAD_SONG_NOTE_A6
+ -52, // QUEST_QUAD_SONG_NOTE_A7
+ -52, // QUEST_QUAD_SONG_NOTE_A8
+ -52, // QUEST_QUAD_SONG_NOTE_B1
+ -52, // QUEST_QUAD_SONG_NOTE_B2
+ -52, // QUEST_QUAD_SONG_NOTE_B3
+ -52, // QUEST_QUAD_SONG_NOTE_B4
+ -52, // QUEST_QUAD_SONG_NOTE_B5
+ -52, // QUEST_QUAD_SONG_NOTE_B6
+ -52, // QUEST_QUAD_SONG_NOTE_B7
+ -52, // QUEST_QUAD_SONG_NOTE_B8
+ 34, // QUEST_QUAD_SKULL_TOKENS_DIGIT1_SHADOW
+ 34, // QUEST_QUAD_SKULL_TOKENS_DIGIT2_SHADOW
+ 34, // QUEST_QUAD_SKULL_TOKENS_DIGIT3_SHADOW
+ 36, // QUEST_QUAD_SKULL_TOKENS_DIGIT1
+ 36, // QUEST_QUAD_SKULL_TOKENS_DIGIT2
+ 36, // QUEST_QUAD_SKULL_TOKENS_DIGIT3
+};
+
+static s16 sQuestQuadsSize[] = {
+ 24, // QUEST_MEDALLION_FOREST
+ 24, // QUEST_MEDALLION_FIRE
+ 24, // QUEST_MEDALLION_WATER
+ 24, // QUEST_MEDALLION_SPIRIT
+ 24, // QUEST_MEDALLION_SHADOW
+ 24, // QUEST_MEDALLION_LIGHT
+ 24, // QUEST_SONG_MINUET
+ 24, // QUEST_SONG_BOLERO
+ 24, // QUEST_SONG_SERENADE
+ 24, // QUEST_SONG_REQUIEM
+ 24, // QUEST_SONG_NOCTURNE
+ 24, // QUEST_SONG_PRELUDE
+ 24, // QUEST_SONG_LULLABY
+ 24, // QUEST_SONG_EPONA
+ 24, // QUEST_SONG_SARIA
+ 24, // QUEST_SONG_SUN
+ 24, // QUEST_SONG_TIME
+ 24, // QUEST_SONG_STORMS
+ 24, // QUEST_KOKIRI_EMERALD
+ 24, // QUEST_GORON_RUBY
+ 24, // QUEST_ZORA_SAPPHIRE
+ 24, // QUEST_STONE_OF_AGONY
+ 24, // QUEST_GERUDOS_CARD
+ 24, // QUEST_SKULL_TOKEN
+ 48, // QUEST_HEART_PIECE
+ 16, // QUEST_QUAD_SONG_NOTE_A1
+ 16, // QUEST_QUAD_SONG_NOTE_A2
+ 16, // QUEST_QUAD_SONG_NOTE_A3
+ 16, // QUEST_QUAD_SONG_NOTE_A4
+ 16, // QUEST_QUAD_SONG_NOTE_A5
+ 16, // QUEST_QUAD_SONG_NOTE_A6
+ 16, // QUEST_QUAD_SONG_NOTE_A7
+ 16, // QUEST_QUAD_SONG_NOTE_A8
+ 16, // QUEST_QUAD_SONG_NOTE_B1
+ 16, // QUEST_QUAD_SONG_NOTE_B2
+ 16, // QUEST_QUAD_SONG_NOTE_B3
+ 16, // QUEST_QUAD_SONG_NOTE_B4
+ 16, // QUEST_QUAD_SONG_NOTE_B5
+ 16, // QUEST_QUAD_SONG_NOTE_B6
+ 16, // QUEST_QUAD_SONG_NOTE_B7
+ 16, // QUEST_QUAD_SONG_NOTE_B8
+ 16, // QUEST_QUAD_SKULL_TOKENS_DIGIT1_SHADOW
+ 16, // QUEST_QUAD_SKULL_TOKENS_DIGIT2_SHADOW
+ 16, // QUEST_QUAD_SKULL_TOKENS_DIGIT3_SHADOW
+ 16, // QUEST_QUAD_SKULL_TOKENS_DIGIT1
+ 16, // QUEST_QUAD_SKULL_TOKENS_DIGIT2
+ 16, // QUEST_QUAD_SKULL_TOKENS_DIGIT3
};
void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
@@ -2654,14 +2861,16 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
s16 j;
s16 k;
- pauseCtx->offsetY = 0;
+ pauseCtx->pagesYOrigin1 = 0;
if ((pauseCtx->state == PAUSE_STATE_OPENING_1) || (pauseCtx->state >= PAUSE_STATE_CLOSING) ||
((pauseCtx->state == PAUSE_STATE_SAVE_PROMPT) &&
((pauseCtx->savePromptState == PAUSE_SAVE_PROMPT_STATE_CLOSING) ||
(pauseCtx->savePromptState == PAUSE_SAVE_PROMPT_STATE_CLOSING_AFTER_SAVED))) ||
- ((pauseCtx->state >= PAUSE_STATE_8) && (pauseCtx->state <= PAUSE_STATE_13))) {
- pauseCtx->offsetY = 80;
+ ((pauseCtx->state >= PAUSE_STATE_GAME_OVER_START) && (pauseCtx->state <= PAUSE_STATE_GAME_OVER_SHOW_WINDOW))) {
+ // When opening/closing, translate the page vertices so that the pages rotate around their lower edge
+ // instead of the middle.
+ pauseCtx->pagesYOrigin1 = PAUSE_PAGES_Y_ORIGIN_1_LOWER;
}
pauseCtx->itemPageVtx = GRAPH_ALLOC(gfxCtx, ((PAGE_BG_QUADS + VTX_PAGE_ITEM_QUADS) * 4) * sizeof(Vtx));
@@ -2681,7 +2890,7 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->mapPageVtx[j + 1].v.ob[0] = pauseCtx->mapPageVtx[j + 3].v.ob[0] =
pauseCtx->mapPageVtx[j + 0].v.ob[0] + WORLD_MAP_IMAGE_WIDTH;
- pauseCtx->mapPageVtx[j + 0].v.ob[1] = pauseCtx->mapPageVtx[j + 1].v.ob[1] = y + pauseCtx->offsetY;
+ pauseCtx->mapPageVtx[j + 0].v.ob[1] = pauseCtx->mapPageVtx[j + 1].v.ob[1] = y + pauseCtx->pagesYOrigin1;
pauseCtx->mapPageVtx[j + 2].v.ob[1] = pauseCtx->mapPageVtx[j + 3].v.ob[1] =
pauseCtx->mapPageVtx[j + 0].v.ob[1] - WORLD_MAP_IMAGE_FRAG_HEIGHT;
@@ -2725,7 +2934,7 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->questPageVtx = GRAPH_ALLOC(gfxCtx, ((PAGE_BG_QUADS + VTX_PAGE_QUEST_QUADS) * 4) * sizeof(Vtx));
KaleidoScope_SetPageVertices(play, pauseCtx->questPageVtx, VTX_PAGE_QUEST, VTX_PAGE_QUEST_QUADS);
- pauseCtx->cursorVtx = GRAPH_ALLOC(gfxCtx, PAUSE_CURSOR_QUAD_MAX * 4 * sizeof(Vtx));
+ pauseCtx->cursorVtx = GRAPH_ALLOC(gfxCtx, (PAUSE_CURSOR_QUAD_MAX * 4) * sizeof(Vtx));
for (i = 0; i < (PAUSE_CURSOR_QUAD_MAX * 4); i++) {
pauseCtx->cursorVtx[i].v.ob[0] = pauseCtx->cursorVtx[i].v.ob[1] = pauseCtx->cursorVtx[i].v.ob[2] = 0;
@@ -2749,24 +2958,29 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->cursorVtx[11].v.tc[1]
// PAUSE_CURSOR_QUAD_BR
= pauseCtx->cursorVtx[13].v.tc[0] = pauseCtx->cursorVtx[14].v.tc[1] = pauseCtx->cursorVtx[15].v.tc[0] =
- pauseCtx->cursorVtx[15].v.tc[1] = 16 * (1 << 5);
+ pauseCtx->cursorVtx[15].v.tc[1] = PAUSE_MENU_CURSOR_CORNER_TEX_SIZE * (1 << 5);
// PAUSE_CURSOR_QUAD_4
pauseCtx->cursorVtx[17].v.tc[0] = pauseCtx->cursorVtx[18].v.tc[1] = pauseCtx->cursorVtx[19].v.tc[0] =
- pauseCtx->cursorVtx[19].v.tc[1] = 32 * (1 << 5);
+ pauseCtx->cursorVtx[19].v.tc[1] = gMagicArrowEquipEffectTex_SIZE * (1 << 5);
- pauseCtx->itemVtx = GRAPH_ALLOC(gfxCtx, 164 * sizeof(Vtx));
+ pauseCtx->itemVtx = GRAPH_ALLOC(gfxCtx, (ITEM_QUAD_MAX * 4) * sizeof(Vtx));
- for (k = 0, i = 0, y = 58; k < 4; k++, y -= 32) {
- for (x = -96, j = 0; j < 6; j++, i += 4, x += 32) {
- pauseCtx->itemVtx[i + 0].v.ob[0] = pauseCtx->itemVtx[i + 2].v.ob[0] = x + 2;
+ // ITEM_QUAD_GRID_FIRST to ITEM_QUAD_GRID_LAST
+
+ for (k = 0, i = 0, y = (ITEM_GRID_ROWS * ITEM_GRID_CELL_HEIGHT) / 2 - 6; k < ITEM_GRID_ROWS;
+ k++, y -= ITEM_GRID_CELL_HEIGHT) {
+ for (x = 0 - (ITEM_GRID_COLS * ITEM_GRID_CELL_WIDTH) / 2, j = 0; j < ITEM_GRID_COLS;
+ j++, i += 4, x += ITEM_GRID_CELL_WIDTH) {
+ pauseCtx->itemVtx[i + 0].v.ob[0] = pauseCtx->itemVtx[i + 2].v.ob[0] = x + ITEM_GRID_QUAD_MARGIN;
pauseCtx->itemVtx[i + 1].v.ob[0] = pauseCtx->itemVtx[i + 3].v.ob[0] =
- pauseCtx->itemVtx[i + 0].v.ob[0] + 0x1C;
+ pauseCtx->itemVtx[i + 0].v.ob[0] + ITEM_GRID_QUAD_WIDTH;
- pauseCtx->itemVtx[i + 0].v.ob[1] = pauseCtx->itemVtx[i + 1].v.ob[1] = y + pauseCtx->offsetY - 2;
+ pauseCtx->itemVtx[i + 0].v.ob[1] = pauseCtx->itemVtx[i + 1].v.ob[1] =
+ y + pauseCtx->pagesYOrigin1 - ITEM_GRID_QUAD_MARGIN;
pauseCtx->itemVtx[i + 2].v.ob[1] = pauseCtx->itemVtx[i + 3].v.ob[1] =
- pauseCtx->itemVtx[i + 0].v.ob[1] - 0x1C;
+ pauseCtx->itemVtx[i + 0].v.ob[1] - ITEM_GRID_QUAD_HEIGHT;
pauseCtx->itemVtx[i + 0].v.ob[2] = pauseCtx->itemVtx[i + 1].v.ob[2] = pauseCtx->itemVtx[i + 2].v.ob[2] =
pauseCtx->itemVtx[i + 3].v.ob[2] = 0;
@@ -2778,7 +2992,7 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->itemVtx[i + 2].v.tc[0] = 0;
pauseCtx->itemVtx[i + 1].v.tc[0] = pauseCtx->itemVtx[i + 2].v.tc[1] = pauseCtx->itemVtx[i + 3].v.tc[0] =
- pauseCtx->itemVtx[i + 3].v.tc[1] = 0x400;
+ pauseCtx->itemVtx[i + 3].v.tc[1] = ITEM_GRID_QUAD_TEX_SIZE * (1 << 5);
pauseCtx->itemVtx[i + 0].v.cn[0] = pauseCtx->itemVtx[i + 1].v.cn[0] = pauseCtx->itemVtx[i + 2].v.cn[0] =
pauseCtx->itemVtx[i + 3].v.cn[0] = pauseCtx->itemVtx[i + 0].v.cn[1] = pauseCtx->itemVtx[i + 1].v.cn[1] =
@@ -2791,17 +3005,23 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
}
}
- for (j = 1; j < 4; j++, i += 4) {
+ // ITEM_QUAD_GRID_SELECTED_C_LEFT, ITEM_QUAD_GRID_SELECTED_C_DOWN, ITEM_QUAD_GRID_SELECTED_C_RIGHT
+
+ for (j = 1; j < 4; i += 4, j++) {
if (gSaveContext.save.info.equips.cButtonSlots[j - 1] != ITEM_NONE) {
k = gSaveContext.save.info.equips.cButtonSlots[j - 1] * 4;
- pauseCtx->itemVtx[i + 0].v.ob[0] = pauseCtx->itemVtx[i + 2].v.ob[0] = pauseCtx->itemVtx[k].v.ob[0] - 2;
+ pauseCtx->itemVtx[i + 0].v.ob[0] = pauseCtx->itemVtx[i + 2].v.ob[0] =
+ pauseCtx->itemVtx[k].v.ob[0] + ITEM_GRID_SELECTED_QUAD_MARGIN;
- pauseCtx->itemVtx[i + 1].v.ob[0] = pauseCtx->itemVtx[i + 3].v.ob[0] = pauseCtx->itemVtx[i + 0].v.ob[0] + 32;
+ pauseCtx->itemVtx[i + 1].v.ob[0] = pauseCtx->itemVtx[i + 3].v.ob[0] =
+ pauseCtx->itemVtx[i + 0].v.ob[0] + ITEM_GRID_SELECTED_QUAD_WIDTH;
- pauseCtx->itemVtx[i + 0].v.ob[1] = pauseCtx->itemVtx[i + 1].v.ob[1] = pauseCtx->itemVtx[k].v.ob[1] + 2;
+ pauseCtx->itemVtx[i + 0].v.ob[1] = pauseCtx->itemVtx[i + 1].v.ob[1] =
+ pauseCtx->itemVtx[k].v.ob[1] - ITEM_GRID_SELECTED_QUAD_MARGIN;
- pauseCtx->itemVtx[i + 2].v.ob[1] = pauseCtx->itemVtx[i + 3].v.ob[1] = pauseCtx->itemVtx[i + 0].v.ob[1] - 32;
+ pauseCtx->itemVtx[i + 2].v.ob[1] = pauseCtx->itemVtx[i + 3].v.ob[1] =
+ pauseCtx->itemVtx[i + 0].v.ob[1] - ITEM_GRID_SELECTED_QUAD_HEIGHT;
pauseCtx->itemVtx[i + 0].v.ob[2] = pauseCtx->itemVtx[i + 1].v.ob[2] = pauseCtx->itemVtx[i + 2].v.ob[2] =
pauseCtx->itemVtx[i + 3].v.ob[2] = 0;
@@ -2813,7 +3033,7 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->itemVtx[i + 2].v.tc[0] = 0;
pauseCtx->itemVtx[i + 1].v.tc[0] = pauseCtx->itemVtx[i + 2].v.tc[1] = pauseCtx->itemVtx[i + 3].v.tc[0] =
- pauseCtx->itemVtx[i + 3].v.tc[1] = 0x400;
+ pauseCtx->itemVtx[i + 3].v.tc[1] = ITEM_GRID_SELECTED_QUAD_TEX_SIZE * (1 << 5);
pauseCtx->itemVtx[i + 0].v.cn[0] = pauseCtx->itemVtx[i + 1].v.cn[0] = pauseCtx->itemVtx[i + 2].v.cn[0] =
pauseCtx->itemVtx[i + 3].v.cn[0] = pauseCtx->itemVtx[i + 0].v.cn[1] = pauseCtx->itemVtx[i + 1].v.cn[1] =
@@ -2824,34 +3044,54 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->itemVtx[i + 0].v.cn[3] = pauseCtx->itemVtx[i + 1].v.cn[3] = pauseCtx->itemVtx[i + 2].v.cn[3] =
pauseCtx->itemVtx[i + 3].v.cn[3] = pauseCtx->alpha;
} else {
+ // No item equipped on the C button, put the quad out of view
+
pauseCtx->itemVtx[i + 0].v.ob[0] = pauseCtx->itemVtx[i + 2].v.ob[0] = -300;
- pauseCtx->itemVtx[i + 1].v.ob[0] = pauseCtx->itemVtx[i + 3].v.ob[0] = pauseCtx->itemVtx[i + 0].v.ob[0] + 32;
+ pauseCtx->itemVtx[i + 1].v.ob[0] = pauseCtx->itemVtx[i + 3].v.ob[0] =
+ pauseCtx->itemVtx[i + 0].v.ob[0] + ITEM_GRID_SELECTED_QUAD_WIDTH;
pauseCtx->itemVtx[i + 0].v.ob[1] = pauseCtx->itemVtx[i + 1].v.ob[1] = 300;
- pauseCtx->itemVtx[i + 2].v.ob[1] = pauseCtx->itemVtx[i + 3].v.ob[1] = pauseCtx->itemVtx[i + 0].v.ob[1] - 32;
+ pauseCtx->itemVtx[i + 2].v.ob[1] = pauseCtx->itemVtx[i + 3].v.ob[1] =
+ pauseCtx->itemVtx[i + 0].v.ob[1] - ITEM_GRID_SELECTED_QUAD_HEIGHT;
}
}
- for (i = 108, j = 0; j < 7; j++) {
- k = D_8082B11C[j];
+ // ITEM_QUAD_AMMO_*
- pauseCtx->itemVtx[i + 0].v.ob[0] = pauseCtx->itemVtx[i + 2].v.ob[0] = pauseCtx->itemVtx[k].v.ob[0];
+ for (i = ITEM_QUAD_AMMO_FIRST * 4, j = 0; j < 7; j++) {
+ k = sItemVtxQuadsWithAmmo[j];
- pauseCtx->itemVtx[i + 1].v.ob[0] = pauseCtx->itemVtx[i + 3].v.ob[0] = pauseCtx->itemVtx[i + 0].v.ob[0] + 8;
+ // tens
- pauseCtx->itemVtx[i + 0].v.ob[1] = pauseCtx->itemVtx[i + 1].v.ob[1] = pauseCtx->itemVtx[k].v.ob[1] - 22;
+ pauseCtx->itemVtx[i + 0].v.ob[0] = pauseCtx->itemVtx[i + 2].v.ob[0] =
+ pauseCtx->itemVtx[k].v.ob[0] + ITEM_AMMO_TENS_QUAD_OFFSET_X;
- pauseCtx->itemVtx[i + 2].v.ob[1] = pauseCtx->itemVtx[i + 3].v.ob[1] = pauseCtx->itemVtx[i + 0].v.ob[1] - 8;
+ pauseCtx->itemVtx[i + 1].v.ob[0] = pauseCtx->itemVtx[i + 3].v.ob[0] =
+ pauseCtx->itemVtx[i + 0].v.ob[0] + ITEM_AMMO_DIGIT_QUAD_WIDTH;
- pauseCtx->itemVtx[i + 4].v.ob[0] = pauseCtx->itemVtx[i + 6].v.ob[0] = pauseCtx->itemVtx[i + 0].v.ob[0] + 6;
+ pauseCtx->itemVtx[i + 0].v.ob[1] = pauseCtx->itemVtx[i + 1].v.ob[1] =
+ pauseCtx->itemVtx[k].v.ob[1] - ITEM_AMMO_TENS_QUAD_OFFSET_Y;
- pauseCtx->itemVtx[i + 5].v.ob[0] = pauseCtx->itemVtx[i + 7].v.ob[0] = pauseCtx->itemVtx[i + 4].v.ob[0] + 8;
+ pauseCtx->itemVtx[i + 2].v.ob[1] = pauseCtx->itemVtx[i + 3].v.ob[1] =
+ pauseCtx->itemVtx[i + 0].v.ob[1] - ITEM_AMMO_DIGIT_QUAD_HEIGHT;
- pauseCtx->itemVtx[i + 4].v.ob[1] = pauseCtx->itemVtx[i + 5].v.ob[1] = pauseCtx->itemVtx[i + 0].v.ob[1];
+ // ones
- pauseCtx->itemVtx[i + 6].v.ob[1] = pauseCtx->itemVtx[i + 7].v.ob[1] = pauseCtx->itemVtx[i + 4].v.ob[1] - 8;
+ pauseCtx->itemVtx[i + 4].v.ob[0] = pauseCtx->itemVtx[i + 6].v.ob[0] =
+ pauseCtx->itemVtx[i + 0].v.ob[0] + ITEM_AMMO_ONES_QUAD_OFFSET_X;
+
+ pauseCtx->itemVtx[i + 5].v.ob[0] = pauseCtx->itemVtx[i + 7].v.ob[0] =
+ pauseCtx->itemVtx[i + 4].v.ob[0] + ITEM_AMMO_DIGIT_QUAD_WIDTH;
+
+ pauseCtx->itemVtx[i + 4].v.ob[1] = pauseCtx->itemVtx[i + 5].v.ob[1] =
+ pauseCtx->itemVtx[i + 0].v.ob[1] - ITEM_AMMO_ONES_QUAD_OFFSET_Y;
+
+ pauseCtx->itemVtx[i + 6].v.ob[1] = pauseCtx->itemVtx[i + 7].v.ob[1] =
+ pauseCtx->itemVtx[i + 4].v.ob[1] - ITEM_AMMO_DIGIT_QUAD_HEIGHT;
+
+ // tens, ones
for (k = 0; k < 2; k++, i += 4) {
pauseCtx->itemVtx[i + 0].v.ob[2] = pauseCtx->itemVtx[i + 1].v.ob[2] = pauseCtx->itemVtx[i + 2].v.ob[2] =
@@ -2864,7 +3104,7 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->itemVtx[i + 2].v.tc[0] = 0;
pauseCtx->itemVtx[i + 1].v.tc[0] = pauseCtx->itemVtx[i + 2].v.tc[1] = pauseCtx->itemVtx[i + 3].v.tc[0] =
- pauseCtx->itemVtx[i + 3].v.tc[1] = 0x100;
+ pauseCtx->itemVtx[i + 3].v.tc[1] = ITEM_AMMO_DIGIT_QUAD_TEX_SIZE * (1 << 5);
pauseCtx->itemVtx[i + 0].v.cn[0] = pauseCtx->itemVtx[i + 1].v.cn[0] = pauseCtx->itemVtx[i + 2].v.cn[0] =
pauseCtx->itemVtx[i + 3].v.cn[0] = pauseCtx->itemVtx[i + 0].v.cn[1] = pauseCtx->itemVtx[i + 1].v.cn[1] =
@@ -2877,19 +3117,29 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
}
}
- pauseCtx->equipVtx = GRAPH_ALLOC(gfxCtx, 112 * sizeof(Vtx));
+ pauseCtx->equipVtx = GRAPH_ALLOC(gfxCtx, (EQUIP_QUAD_MAX * 4) * sizeof(Vtx));
- for (k = 0, i = 0, y = 58; i < 4; i++, y -= 32) {
+ // EQUIP_QUAD_UPG_BULLETBAG_QUIVER, EQUIP_QUAD_SWORD_KOKIRI, EQUIP_QUAD_SWORD_MASTER, EQUIP_QUAD_SWORD_BIGGORON,
+ // EQUIP_QUAD_UPG_BOMB_BAG, EQUIP_QUAD_SHIELD_DEKU, EQUIP_QUAD_SHIELD_HYLIAN, EQUIP_QUAD_SHIELD_MIRROR,
+ // EQUIP_QUAD_UPG_STRENGTH, EQUIP_QUAD_TUNIC_KOKIRI, EQUIP_QUAD_TUNIC_GORON, EQUIP_QUAD_TUNIC_ZORA,
+ // EQUIP_QUAD_UPG_SCALE, EQUIP_QUAD_BOOTS_KOKIRI, EQUIP_QUAD_BOOTS_IRON, EQUIP_QUAD_BOOTS_HOVER
+
+ // for each row
+ for (k = 0, i = 0, y = (EQUIP_TYPE_MAX * EQUIP_GRID_CELL_HEIGHT) / 2 - 6; i < EQUIP_TYPE_MAX;
+ i++, y -= EQUIP_GRID_CELL_HEIGHT) {
+ // for each column
for (j = 0; j < 4; j++, k += 4) {
- pauseCtx->equipVtx[k + 0].v.ob[0] = pauseCtx->equipVtx[k + 2].v.ob[0] = D_8082B12C[j] + 2;
+ pauseCtx->equipVtx[k + 0].v.ob[0] = pauseCtx->equipVtx[k + 2].v.ob[0] =
+ sEquipColumnsX[j] + EQUIP_GRID_QUAD_MARGIN;
pauseCtx->equipVtx[k + 1].v.ob[0] = pauseCtx->equipVtx[k + 3].v.ob[0] =
- pauseCtx->equipVtx[k + 0].v.ob[0] + 28;
+ pauseCtx->equipVtx[k + 0].v.ob[0] + EQUIP_GRID_QUAD_WIDTH;
- pauseCtx->equipVtx[k + 0].v.ob[1] = pauseCtx->equipVtx[k + 1].v.ob[1] = y + pauseCtx->offsetY - 2;
+ pauseCtx->equipVtx[k + 0].v.ob[1] = pauseCtx->equipVtx[k + 1].v.ob[1] =
+ y + pauseCtx->pagesYOrigin1 - EQUIP_GRID_QUAD_MARGIN;
pauseCtx->equipVtx[k + 2].v.ob[1] = pauseCtx->equipVtx[k + 3].v.ob[1] =
- pauseCtx->equipVtx[k + 0].v.ob[1] - 28;
+ pauseCtx->equipVtx[k + 0].v.ob[1] - EQUIP_GRID_QUAD_HEIGHT;
pauseCtx->equipVtx[k + 0].v.ob[2] = pauseCtx->equipVtx[k + 1].v.ob[2] = pauseCtx->equipVtx[k + 2].v.ob[2] =
pauseCtx->equipVtx[k + 3].v.ob[2] = 0;
@@ -2901,7 +3151,7 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->equipVtx[k + 2].v.tc[0] = 0;
pauseCtx->equipVtx[k + 1].v.tc[0] = pauseCtx->equipVtx[k + 2].v.tc[1] = pauseCtx->equipVtx[k + 3].v.tc[0] =
- pauseCtx->equipVtx[k + 3].v.tc[1] = 0x400;
+ pauseCtx->equipVtx[k + 3].v.tc[1] = EQUIP_GRID_QUAD_TEX_SIZE * (1 << 5);
pauseCtx->equipVtx[k + 0].v.cn[0] = pauseCtx->equipVtx[k + 1].v.cn[0] = pauseCtx->equipVtx[k + 2].v.cn[0] =
pauseCtx->equipVtx[k + 3].v.cn[0] = pauseCtx->equipVtx[k + 0].v.cn[1] =
@@ -2915,19 +3165,23 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
}
}
- for (j = 0; j < 4; j++, k += 4) {
+ // EQUIP_QUAD_SELECTED_SWORD, EQUIP_QUAD_SELECTED_SHIELD, EQUIP_QUAD_SELECTED_TUNIC, EQUIP_QUAD_SELECTED_BOOTS
+
+ for (j = 0; j < EQUIP_TYPE_MAX; k += 4, j++) {
if (CUR_EQUIP_VALUE(j) != 0) {
- i = (CUR_EQUIP_VALUE(j) + D_8082B134[j] - 1) * 4;
+ i = (CUR_EQUIP_VALUE(j) + sEquipQuadsFirstByEquipType[j] - 1) * 4;
- pauseCtx->equipVtx[k + 0].v.ob[0] = pauseCtx->equipVtx[k + 2].v.ob[0] = pauseCtx->equipVtx[i].v.ob[0] - 2;
+ pauseCtx->equipVtx[k + 0].v.ob[0] = pauseCtx->equipVtx[k + 2].v.ob[0] =
+ pauseCtx->equipVtx[i].v.ob[0] + EQUIP_GRID_SELECTED_QUAD_MARGIN;
pauseCtx->equipVtx[k + 1].v.ob[0] = pauseCtx->equipVtx[k + 3].v.ob[0] =
- pauseCtx->equipVtx[k + 0].v.ob[0] + 32;
+ pauseCtx->equipVtx[k + 0].v.ob[0] + EQUIP_GRID_SELECTED_QUAD_WIDTH;
- pauseCtx->equipVtx[k + 0].v.ob[1] = pauseCtx->equipVtx[k + 1].v.ob[1] = pauseCtx->equipVtx[i].v.ob[1] + 2;
+ pauseCtx->equipVtx[k + 0].v.ob[1] = pauseCtx->equipVtx[k + 1].v.ob[1] =
+ pauseCtx->equipVtx[i].v.ob[1] - EQUIP_GRID_SELECTED_QUAD_MARGIN;
pauseCtx->equipVtx[k + 2].v.ob[1] = pauseCtx->equipVtx[k + 3].v.ob[1] =
- pauseCtx->equipVtx[k + 0].v.ob[1] - 32;
+ pauseCtx->equipVtx[k + 0].v.ob[1] - EQUIP_GRID_SELECTED_QUAD_HEIGHT;
pauseCtx->equipVtx[k + 0].v.ob[2] = pauseCtx->equipVtx[k + 1].v.ob[2] = pauseCtx->equipVtx[k + 2].v.ob[2] =
pauseCtx->equipVtx[k + 3].v.ob[2] = 0;
@@ -2939,7 +3193,7 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->equipVtx[k + 2].v.tc[0] = 0;
pauseCtx->equipVtx[k + 1].v.tc[0] = pauseCtx->equipVtx[k + 2].v.tc[1] = pauseCtx->equipVtx[k + 3].v.tc[0] =
- pauseCtx->equipVtx[k + 3].v.tc[1] = 0x400;
+ pauseCtx->equipVtx[k + 3].v.tc[1] = EQUIP_GRID_SELECTED_QUAD_TEX_SIZE * (1 << 5);
pauseCtx->equipVtx[k + 0].v.cn[0] = pauseCtx->equipVtx[k + 1].v.cn[0] = pauseCtx->equipVtx[k + 2].v.cn[0] =
pauseCtx->equipVtx[k + 3].v.cn[0] = pauseCtx->equipVtx[k + 0].v.cn[1] =
@@ -2953,16 +3207,20 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
}
}
- x = 112;
+ // EQUIP_QUAD_PLAYER_FIRST..EQUIP_QUAD_PLAYER_LAST
+
+ x = PAUSE_EQUIP_PLAYER_HEIGHT;
y = 50;
- while (true) {
+ for (;;) {
pauseCtx->equipVtx[k + 0].v.ob[0] = pauseCtx->equipVtx[k + 2].v.ob[0] = -64;
- pauseCtx->equipVtx[k + 1].v.ob[0] = pauseCtx->equipVtx[k + 3].v.ob[0] = pauseCtx->equipVtx[k + 0].v.ob[0] + 64;
+ pauseCtx->equipVtx[k + 1].v.ob[0] = pauseCtx->equipVtx[k + 3].v.ob[0] =
+ pauseCtx->equipVtx[k + 0].v.ob[0] + PAUSE_EQUIP_PLAYER_WIDTH;
- pauseCtx->equipVtx[k + 0].v.ob[1] = pauseCtx->equipVtx[k + 1].v.ob[1] = y + pauseCtx->offsetY;
+ pauseCtx->equipVtx[k + 0].v.ob[1] = pauseCtx->equipVtx[k + 1].v.ob[1] = y + pauseCtx->pagesYOrigin1;
- pauseCtx->equipVtx[k + 2].v.ob[1] = pauseCtx->equipVtx[k + 3].v.ob[1] = pauseCtx->equipVtx[k + 0].v.ob[1] - 32;
+ pauseCtx->equipVtx[k + 2].v.ob[1] = pauseCtx->equipVtx[k + 3].v.ob[1] =
+ pauseCtx->equipVtx[k + 0].v.ob[1] - PAUSE_EQUIP_PLAYER_FRAG_HEIGHT;
pauseCtx->equipVtx[k + 0].v.ob[2] = pauseCtx->equipVtx[k + 1].v.ob[2] = pauseCtx->equipVtx[k + 2].v.ob[2] =
pauseCtx->equipVtx[k + 3].v.ob[2] = 0;
@@ -2973,9 +3231,10 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->equipVtx[k + 0].v.tc[0] = pauseCtx->equipVtx[k + 0].v.tc[1] = pauseCtx->equipVtx[k + 1].v.tc[1] =
pauseCtx->equipVtx[k + 2].v.tc[0] = 0;
- pauseCtx->equipVtx[k + 1].v.tc[0] = pauseCtx->equipVtx[k + 3].v.tc[0] = 0x800;
+ pauseCtx->equipVtx[k + 1].v.tc[0] = pauseCtx->equipVtx[k + 3].v.tc[0] = PAUSE_EQUIP_PLAYER_WIDTH * (1 << 5);
- pauseCtx->equipVtx[k + 2].v.tc[1] = pauseCtx->equipVtx[k + 3].v.tc[1] = 0x400;
+ pauseCtx->equipVtx[k + 2].v.tc[1] = pauseCtx->equipVtx[k + 3].v.tc[1] =
+ PAUSE_EQUIP_PLAYER_FRAG_HEIGHT * (1 << 5);
pauseCtx->equipVtx[k + 0].v.cn[0] = pauseCtx->equipVtx[k + 1].v.cn[0] = pauseCtx->equipVtx[k + 2].v.cn[0] =
pauseCtx->equipVtx[k + 3].v.cn[0] = pauseCtx->equipVtx[k + 0].v.cn[1] = pauseCtx->equipVtx[k + 1].v.cn[1] =
@@ -2986,62 +3245,65 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->equipVtx[k + 0].v.cn[3] = pauseCtx->equipVtx[k + 1].v.cn[3] = pauseCtx->equipVtx[k + 2].v.cn[3] =
pauseCtx->equipVtx[k + 3].v.cn[3] = pauseCtx->alpha;
- x -= 32;
- y -= 32;
+ x -= PAUSE_EQUIP_PLAYER_FRAG_HEIGHT;
if (x < 0) {
pauseCtx->equipVtx[k + 2].v.ob[1] = pauseCtx->equipVtx[k + 3].v.ob[1] =
- pauseCtx->equipVtx[k + 0].v.ob[1] - 0x10;
+ pauseCtx->equipVtx[k + 0].v.ob[1] - (PAUSE_EQUIP_PLAYER_HEIGHT % PAUSE_EQUIP_PLAYER_FRAG_HEIGHT);
+
+ pauseCtx->equipVtx[k + 2].v.tc[1] = pauseCtx->equipVtx[k + 3].v.tc[1] =
+ (PAUSE_EQUIP_PLAYER_HEIGHT % PAUSE_EQUIP_PLAYER_FRAG_HEIGHT) * (1 << 5);
- pauseCtx->equipVtx[k + 2].v.tc[1] = pauseCtx->equipVtx[k + 3].v.tc[1] = 0x200;
break;
}
+ y -= PAUSE_EQUIP_PLAYER_FRAG_HEIGHT;
k += 4;
}
- pauseCtx->questVtx = GRAPH_ALLOC(gfxCtx, 188 * sizeof(Vtx));
+ pauseCtx->questVtx = GRAPH_ALLOC(gfxCtx, QUEST_QUAD_MAX * 4 * sizeof(Vtx));
- for (k = 0, j = 0; j < 47; j++, k += 4) {
- s16 phi_t2_2 = D_8082B1F8[j];
+ for (k = 0, j = 0; j < QUEST_QUAD_MAX; j++, k += 4) {
+ s16 quadWidth = sQuestQuadsSize[j];
- if ((j < 6) || (j >= 41)) {
- pauseCtx->questVtx[k + 0].v.ob[0] = pauseCtx->questVtx[k + 2].v.ob[0] = D_8082B138[j];
+ if ((j < QUEST_SONG_MINUET) || (j >= QUEST_QUAD_SKULL_TOKENS_DIGIT1_SHADOW)) {
+ pauseCtx->questVtx[k + 0].v.ob[0] = pauseCtx->questVtx[k + 2].v.ob[0] = sQuestQuadsX[j];
pauseCtx->questVtx[k + 1].v.ob[0] = pauseCtx->questVtx[k + 3].v.ob[0] =
- pauseCtx->questVtx[k + 0].v.ob[0] + D_8082B1F8[j];
+ pauseCtx->questVtx[k + 0].v.ob[0] + sQuestQuadsSize[j];
- pauseCtx->questVtx[k + 0].v.ob[1] = pauseCtx->questVtx[k + 1].v.ob[1] = D_8082B198[j] + pauseCtx->offsetY;
+ pauseCtx->questVtx[k + 0].v.ob[1] = pauseCtx->questVtx[k + 1].v.ob[1] =
+ sQuestQuadsY[j] + pauseCtx->pagesYOrigin1;
pauseCtx->questVtx[k + 2].v.ob[1] = pauseCtx->questVtx[k + 3].v.ob[1] =
- pauseCtx->questVtx[k + 0].v.ob[1] - D_8082B1F8[j];
+ pauseCtx->questVtx[k + 0].v.ob[1] - sQuestQuadsSize[j];
- if (j >= 41) {
+ if (j >= QUEST_QUAD_SKULL_TOKENS_DIGIT1_SHADOW) {
pauseCtx->questVtx[k + 1].v.ob[0] = pauseCtx->questVtx[k + 3].v.ob[0] =
pauseCtx->questVtx[k + 0].v.ob[0] + 8;
pauseCtx->questVtx[k + 0].v.ob[1] = pauseCtx->questVtx[k + 1].v.ob[1] =
- D_8082B198[j] + pauseCtx->offsetY - 6;
+ sQuestQuadsY[j] + pauseCtx->pagesYOrigin1 - 6;
pauseCtx->questVtx[k + 2].v.ob[1] = pauseCtx->questVtx[k + 3].v.ob[1] =
pauseCtx->questVtx[k + 0].v.ob[1] - 16;
- phi_t2_2 = 8;
+ quadWidth = 8;
}
} else {
- if ((j >= 6) && (j <= 17)) {
- phi_t2_2 = 16;
+ if ((j >= QUEST_SONG_MINUET) && (j < QUEST_KOKIRI_EMERALD)) {
+ quadWidth = 16;
}
- pauseCtx->questVtx[k + 0].v.ob[0] = pauseCtx->questVtx[k + 2].v.ob[0] = D_8082B138[j] + 2;
+ pauseCtx->questVtx[k + 0].v.ob[0] = pauseCtx->questVtx[k + 2].v.ob[0] = sQuestQuadsX[j] + 2;
pauseCtx->questVtx[k + 1].v.ob[0] = pauseCtx->questVtx[k + 3].v.ob[0] =
- pauseCtx->questVtx[k + 0].v.ob[0] + phi_t2_2 - 4;
+ pauseCtx->questVtx[k + 0].v.ob[0] + (quadWidth - 4);
pauseCtx->questVtx[k + 0].v.ob[1] = pauseCtx->questVtx[k + 1].v.ob[1] =
- D_8082B198[j] + pauseCtx->offsetY - 2;
+ sQuestQuadsY[j] + pauseCtx->pagesYOrigin1 - 2;
pauseCtx->questVtx[k + 2].v.ob[1] = pauseCtx->questVtx[k + 3].v.ob[1] =
- pauseCtx->questVtx[k + 0].v.ob[1] - D_8082B1F8[j] + 4;
+ pauseCtx->questVtx[k + 0].v.ob[1] - (sQuestQuadsSize[j] - 4);
}
pauseCtx->questVtx[k + 0].v.ob[2] = pauseCtx->questVtx[k + 1].v.ob[2] = pauseCtx->questVtx[k + 2].v.ob[2] =
@@ -3053,8 +3315,8 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->questVtx[k + 0].v.tc[0] = pauseCtx->questVtx[k + 0].v.tc[1] = pauseCtx->questVtx[k + 1].v.tc[1] =
pauseCtx->questVtx[k + 2].v.tc[0] = 0;
- pauseCtx->questVtx[k + 1].v.tc[0] = pauseCtx->questVtx[k + 3].v.tc[0] = phi_t2_2 << 5;
- pauseCtx->questVtx[k + 2].v.tc[1] = pauseCtx->questVtx[k + 3].v.tc[1] = D_8082B1F8[j] << 5;
+ pauseCtx->questVtx[k + 1].v.tc[0] = pauseCtx->questVtx[k + 3].v.tc[0] = quadWidth << 5;
+ pauseCtx->questVtx[k + 2].v.tc[1] = pauseCtx->questVtx[k + 3].v.tc[1] = sQuestQuadsSize[j] << 5;
pauseCtx->questVtx[k + 0].v.cn[0] = pauseCtx->questVtx[k + 1].v.cn[0] = pauseCtx->questVtx[k + 2].v.cn[0] =
pauseCtx->questVtx[k + 3].v.cn[0] = pauseCtx->questVtx[k + 0].v.cn[1] = pauseCtx->questVtx[k + 1].v.cn[1] =
@@ -3153,7 +3415,7 @@ void KaleidoScope_Draw(PlayState* play) {
}
}
- if ((pauseCtx->state >= PAUSE_STATE_11) && (pauseCtx->state <= PAUSE_STATE_17)) {
+ if ((pauseCtx->state >= PAUSE_STATE_GAME_OVER_SHOW_MESSAGE) && (pauseCtx->state <= PAUSE_STATE_GAME_OVER_FINISH)) {
KaleidoScope_DrawGameOver(play);
}
@@ -3197,11 +3459,11 @@ void KaleidoScope_UpdateOpening(PlayState* play) {
func_80084BF4(play, 1);
- gSaveContext.buttonStatus[0] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex][0];
- gSaveContext.buttonStatus[1] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex][1];
- gSaveContext.buttonStatus[2] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex][2];
- gSaveContext.buttonStatus[3] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex][3];
- gSaveContext.buttonStatus[4] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex][4];
+ gSaveContext.buttonStatus[0] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex + PAGE_SWITCH_PT_LEFT][0];
+ gSaveContext.buttonStatus[1] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex + PAGE_SWITCH_PT_LEFT][1];
+ gSaveContext.buttonStatus[2] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex + PAGE_SWITCH_PT_LEFT][2];
+ gSaveContext.buttonStatus[3] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex + PAGE_SWITCH_PT_LEFT][3];
+ gSaveContext.buttonStatus[4] = gPageSwitchNextButtonStatus[pauseCtx->pageIndex + PAGE_SWITCH_PT_LEFT][4];
pauseCtx->pageIndex = sPageSwitchNextPageIndex[pauseCtx->nextPageMode];
@@ -3213,16 +3475,16 @@ void KaleidoScope_UpdateOpening(PlayState* play) {
} else if (pauseCtx->pageSwitchTimer == (4 * PAGE_SWITCH_NSTEPS * 1)) {
// `ZREG(47)` is always 1 so this normally never happens
pauseCtx->pageIndex = sPageSwitchNextPageIndex[pauseCtx->nextPageMode];
- pauseCtx->nextPageMode = (u16)(pauseCtx->pageIndex * 2) + 1;
+ pauseCtx->nextPageMode = (u16)(pauseCtx->pageIndex << 1) + 1;
}
}
void KaleidoScope_UpdateCursorVtx(PlayState* play) {
PauseContext* pauseCtx = &play->pauseCtx;
- s32 tlOffsetX;
- s32 tlOffsetY;
- s32 rightOffsetX;
- s32 bottomOffsetY;
+ s16 tlOffsetX;
+ s16 tlOffsetY;
+ s16 bottomOffsetY;
+ s16 rightOffsetX;
if (pauseCtx->cursorSpecialPos == 0) {
tlOffsetX = -1;
@@ -3251,23 +3513,23 @@ void KaleidoScope_UpdateCursorVtx(PlayState* play) {
tlOffsetY = 4;
rightOffsetX = 12;
bottomOffsetY = 12;
- if (pauseCtx->cursorSlot[pauseCtx->pageIndex] == 0x18) {
+ if (pauseCtx->cursorSlot[pauseCtx->pageIndex] == QUEST_HEART_PIECE) {
tlOffsetX = -2;
tlOffsetY = 2;
rightOffsetX = 32;
bottomOffsetY = 32;
- } else if (pauseCtx->cursorSlot[pauseCtx->pageIndex] == 0x17) {
+ } else if (pauseCtx->cursorSlot[pauseCtx->pageIndex] == QUEST_SKULL_TOKEN) {
tlOffsetX = -4;
tlOffsetY = 4;
bottomOffsetY = 13;
rightOffsetX = 34;
- } else if (pauseCtx->cursorSlot[pauseCtx->pageIndex] < 6) {
+ } else if (pauseCtx->cursorSlot[pauseCtx->pageIndex] < QUEST_SONG_MINUET) {
tlOffsetX = -1;
tlOffsetY = 1;
rightOffsetX = 10;
bottomOffsetY = 10;
- } else if ((pauseCtx->cursorSlot[pauseCtx->pageIndex] >= 6) &&
- (pauseCtx->cursorSlot[pauseCtx->pageIndex] < 0x12)) {
+ } else if ((pauseCtx->cursorSlot[pauseCtx->pageIndex] >= QUEST_SONG_MINUET) &&
+ (pauseCtx->cursorSlot[pauseCtx->pageIndex] < QUEST_KOKIRI_EMERALD)) {
tlOffsetX = -5;
tlOffsetY = 3;
rightOffsetX = 8;
@@ -3326,8 +3588,8 @@ void KaleidoScope_LoadDungeonMap(PlayState* play) {
}
void KaleidoScope_UpdateDungeonMap(PlayState* play) {
- PauseContext* pauseCtx = &play->pauseCtx;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
+ PauseContext* pauseCtx = &play->pauseCtx;
PRINTF("MAP DMA = %d\n", play->interfaceCtx.mapPaletteIndex);
@@ -3344,23 +3606,23 @@ void KaleidoScope_UpdateDungeonMap(PlayState* play) {
Map_SetFloorPalettesData(play, pauseCtx->dungeonMapSlot - 3);
if ((play->sceneId >= SCENE_DEKU_TREE) && (play->sceneId <= SCENE_TREASURE_BOX_SHOP)) {
- if ((VREG(30) + 3) == pauseCtx->cursorPoint[PAUSE_MAP]) {
- KaleidoScope_OverridePalIndexCI4(interfaceCtx->mapSegment, MAP_48x85_TEX_SIZE,
+ if (VREG(30) == pauseCtx->cursorPoint[PAUSE_MAP] - 3) {
+ KaleidoScope_OverridePalIndexCI4((char*)interfaceCtx->mapSegment, MAP_48x85_TEX_SIZE,
interfaceCtx->mapPaletteIndex, 14);
}
}
if ((play->sceneId >= SCENE_DEKU_TREE) && (play->sceneId <= SCENE_TREASURE_BOX_SHOP)) {
- if ((VREG(30) + 3) == pauseCtx->cursorPoint[PAUSE_MAP]) {
- KaleidoScope_OverridePalIndexCI4(interfaceCtx->mapSegment + ALIGN16(MAP_48x85_TEX_SIZE), MAP_48x85_TEX_SIZE,
- interfaceCtx->mapPaletteIndex, 14);
+ if (VREG(30) == pauseCtx->cursorPoint[PAUSE_MAP] - 3) {
+ KaleidoScope_OverridePalIndexCI4((char*)interfaceCtx->mapSegment + ALIGN16(MAP_48x85_TEX_SIZE),
+ MAP_48x85_TEX_SIZE, interfaceCtx->mapPaletteIndex, 14);
}
}
}
void KaleidoScope_Update(PlayState* play) {
- static s16 D_8082B258 = PAUSE_MAIN_STATE_IDLE;
- static s16 D_8082B25C = 10;
+ static s16 sMainStateAfterSongPlayerPlayingDone = PAUSE_MAIN_STATE_IDLE;
+ static s16 sDelayTimer = 10;
static s16 D_8082B260 = 0;
PauseContext* pauseCtx = &play->pauseCtx;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
@@ -3379,16 +3641,19 @@ void KaleidoScope_Update(PlayState* play) {
if ((R_PAUSE_BG_PRERENDER_STATE >= PAUSE_BG_PRERENDER_READY) &&
(((pauseCtx->state >= PAUSE_STATE_OPENING_1) && (pauseCtx->state <= PAUSE_STATE_SAVE_PROMPT)) ||
- ((pauseCtx->state >= PAUSE_STATE_10) && (pauseCtx->state <= PAUSE_STATE_CLOSING)))) {
+ ((pauseCtx->state >= PAUSE_STATE_GAME_OVER_INIT) && (pauseCtx->state <= PAUSE_STATE_CLOSING)))) {
- if ((((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) || (pauseCtx->mainState == PAUSE_MAIN_STATE_8)) &&
+ if ((((u32)pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) &&
(pauseCtx->state == PAUSE_STATE_MAIN)) {
+
pauseCtx->stickAdjX = input->rel.stick_x;
pauseCtx->stickAdjY = input->rel.stick_y;
+
KaleidoScope_UpdateCursorVtx(play);
KaleidoScope_HandlePageToggles(pauseCtx, input);
- } else if ((pauseCtx->pageIndex == PAUSE_QUEST) &&
- ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) || (pauseCtx->mainState == PAUSE_MAIN_STATE_5))) {
+ } else if ((pauseCtx->pageIndex == PAUSE_QUEST) && ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) ||
+ (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PROMPT))) {
KaleidoScope_UpdateCursorVtx(play);
}
@@ -3412,22 +3677,22 @@ void KaleidoScope_Update(PlayState* play) {
WREG(16) = -175;
WREG(17) = 155;
- pauseCtx->unk_204 = -314.0f;
+ pauseCtx->promptPitch = -314.0f;
//! @bug messed up alignment, should match `ALIGN64`
pauseCtx->playerSegment = (void*)(((uintptr_t)play->objectCtx.spaceStart + 0x30) & ~0x3F);
size1 = Player_InitPauseDrawData(play, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime);
- PRINTF("プレイヤー size1=%x\n", size1);
-
- pauseCtx->iconItemSegment = (void*)ALIGN16((uintptr_t)pauseCtx->playerSegment + size1);
+ PRINTF(T("プレイヤー size1=%x\n", "Player size1=%x\n"), size1);
size0 = (uintptr_t)_icon_item_staticSegmentRomEnd - (uintptr_t)_icon_item_staticSegmentRomStart;
+ pauseCtx->iconItemSegment = (void*)ALIGN16((uintptr_t)pauseCtx->playerSegment + size1);
+
PRINTF("icon_item size0=%x\n", size0);
DMA_REQUEST_SYNC(pauseCtx->iconItemSegment, (uintptr_t)_icon_item_staticSegmentRomStart, size0,
"../z_kaleido_scope_PAL.c", 3662);
- gSegments[8] = VIRTUAL_TO_PHYSICAL(pauseCtx->iconItemSegment);
+ gSegments[8] = OS_K0_TO_PHYSICAL(pauseCtx->iconItemSegment);
for (i = 0; i < ARRAY_COUNTU(gItemAgeReqs); i++) {
if (!CHECK_AGE_REQ_ITEM(i)) {
@@ -3491,12 +3756,14 @@ void KaleidoScope_Update(PlayState* play) {
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
size = (uintptr_t)_icon_item_jpn_staticSegmentRomEnd - (uintptr_t)_icon_item_jpn_staticSegmentRomStart;
- DmaMgr_RequestSync(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_jpn_staticSegmentRomStart,
- size);
+ PRINTF("icon_item_jpn dungeon-size=%x\n", size);
+ DMA_REQUEST_SYNC(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_jpn_staticSegmentRomStart, size,
+ "../z_kaleido_scope_PAL.c", UNK_LINE);
} else {
size = (uintptr_t)_icon_item_nes_staticSegmentRomEnd - (uintptr_t)_icon_item_nes_staticSegmentRomStart;
- DmaMgr_RequestSync(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_nes_staticSegmentRomStart,
- size);
+ PRINTF("icon_item_dungeon dungeon-size=%x\n", size);
+ DMA_REQUEST_SYNC(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_nes_staticSegmentRomStart, size,
+ "../z_kaleido_scope_PAL.c", UNK_LINE);
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {
@@ -3519,45 +3786,50 @@ void KaleidoScope_Update(PlayState* play) {
pauseCtx->nameSegment = (void*)ALIGN16((uintptr_t)pauseCtx->iconItemLangSegment + size);
- PRINTF("サイズ=%x\n", size2 + size1 + size0 + size);
+ PRINTF(T("サイズ=%x\n", "size=%x\n"), size2 + size1 + size0 + size);
PRINTF("item_name I_N_PT=%x\n", 0x800);
Interface_SetDoAction(play, DO_ACTION_DECIDE);
- PRINTF("サイズ=%x\n", size2 + size1 + size0 + size + 0x800);
+ PRINTF(T("サイズ=%x\n", "size=%x\n"), size2 + size1 + size0 + size + 0x800);
if (((void)0, gSaveContext.worldMapArea) < WORLD_MAP_AREA_MAX) {
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
- DmaMgr_RequestSync(pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
- (uintptr_t)_map_name_staticSegmentRomStart +
- (((void)0, gSaveContext.worldMapArea) * MAP_NAME_TEX2_SIZE) +
- 24 * MAP_NAME_TEX1_SIZE + 22 * LANGUAGE_JPN * MAP_NAME_TEX2_SIZE,
- MAP_NAME_TEX2_SIZE);
+ DMA_REQUEST_SYNC(
+ pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
+ (uintptr_t)_map_name_staticSegmentRomStart +
+ ((((void)0, gSaveContext.worldMapArea) + 22 * LANGUAGE_JPN) * MAP_NAME_TEX2_SIZE) +
+ 24 * MAP_NAME_TEX1_SIZE,
+ MAP_NAME_TEX2_SIZE, "../z_kaleido_scope_PAL.c", UNK_LINE);
} else {
- DmaMgr_RequestSync(pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
- (uintptr_t)_map_name_staticSegmentRomStart +
- (((void)0, gSaveContext.worldMapArea) * MAP_NAME_TEX2_SIZE) +
- 24 * MAP_NAME_TEX1_SIZE + 22 * LANGUAGE_ENG * MAP_NAME_TEX2_SIZE,
- MAP_NAME_TEX2_SIZE);
+ DMA_REQUEST_SYNC(
+ pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
+ (uintptr_t)_map_name_staticSegmentRomStart +
+ ((((void)0, gSaveContext.worldMapArea) + 22 * LANGUAGE_ENG) * MAP_NAME_TEX2_SIZE) +
+ 24 * MAP_NAME_TEX1_SIZE,
+ MAP_NAME_TEX2_SIZE, "../z_kaleido_scope_PAL.c", UNK_LINE);
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {
- DMA_REQUEST_SYNC(pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
- (uintptr_t)_map_name_staticSegmentRomStart +
- (((void)0, gSaveContext.worldMapArea) * MAP_NAME_TEX2_SIZE) +
- 36 * MAP_NAME_TEX1_SIZE + 22 * LANGUAGE_ENG * MAP_NAME_TEX2_SIZE,
- MAP_NAME_TEX2_SIZE, "../z_kaleido_scope_PAL.c", 3776);
+ DMA_REQUEST_SYNC(
+ pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
+ (uintptr_t)_map_name_staticSegmentRomStart +
+ ((((void)0, gSaveContext.worldMapArea) + 22 * LANGUAGE_ENG) * MAP_NAME_TEX2_SIZE) +
+ 36 * MAP_NAME_TEX1_SIZE,
+ MAP_NAME_TEX2_SIZE, "../z_kaleido_scope_PAL.c", 3776);
} else if (gSaveContext.language == LANGUAGE_GER) {
- DMA_REQUEST_SYNC(pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
- (uintptr_t)_map_name_staticSegmentRomStart +
- (((void)0, gSaveContext.worldMapArea) * MAP_NAME_TEX2_SIZE) +
- 36 * MAP_NAME_TEX1_SIZE + 22 * LANGUAGE_GER * MAP_NAME_TEX2_SIZE,
- MAP_NAME_TEX2_SIZE, "../z_kaleido_scope_PAL.c", 3780);
+ DMA_REQUEST_SYNC(
+ pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
+ (uintptr_t)_map_name_staticSegmentRomStart +
+ ((((void)0, gSaveContext.worldMapArea) + 22 * LANGUAGE_GER) * MAP_NAME_TEX2_SIZE) +
+ 36 * MAP_NAME_TEX1_SIZE,
+ MAP_NAME_TEX2_SIZE, "../z_kaleido_scope_PAL.c", 3780);
} else {
- DMA_REQUEST_SYNC(pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
- (uintptr_t)_map_name_staticSegmentRomStart +
- (((void)0, gSaveContext.worldMapArea) * MAP_NAME_TEX2_SIZE) +
- 36 * MAP_NAME_TEX1_SIZE + 22 * LANGUAGE_FRA * MAP_NAME_TEX2_SIZE,
- MAP_NAME_TEX2_SIZE, "../z_kaleido_scope_PAL.c", 3784);
+ DMA_REQUEST_SYNC(
+ pauseCtx->nameSegment + MAX(MAP_NAME_TEX1_SIZE, ITEM_NAME_TEX_SIZE),
+ (uintptr_t)_map_name_staticSegmentRomStart +
+ ((((void)0, gSaveContext.worldMapArea) + 22 * LANGUAGE_FRA) * MAP_NAME_TEX2_SIZE) +
+ 36 * MAP_NAME_TEX1_SIZE,
+ MAP_NAME_TEX2_SIZE, "../z_kaleido_scope_PAL.c", 3784);
}
#endif
}
@@ -3661,7 +3933,7 @@ void KaleidoScope_Update(PlayState* play) {
pauseCtx->worldMapPoints[WORLD_MAP_POINT_DEATH_MOUNTAIN] = WORLD_MAP_POINT_STATE_SHOW;
}
- if (gBitFlags[WORLD_MAP_AREA_KAKARIKO_VILLAGE] & gSaveContext.save.info.worldMapAreaData) {
+ if (gSaveContext.save.info.worldMapAreaData & gBitFlags[WORLD_MAP_AREA_KAKARIKO_VILLAGE]) {
pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_SHOW;
}
if (CHECK_QUEST_ITEM(QUEST_SONG_LULLABY)) {
@@ -3679,7 +3951,7 @@ void KaleidoScope_Update(PlayState* play) {
if (CHECK_QUEST_ITEM(QUEST_SONG_STORMS)) {
pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_HIGHLIGHT;
}
- if (GET_EVENTCHKINF(EVENTCHKINF_67)) {
+ if (GET_EVENTCHKINF(EVENTCHKINF_DRAINED_WELL)) {
pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_SHOW;
}
if (GET_EVENTCHKINF(EVENTCHKINF_AA)) {
@@ -3689,7 +3961,7 @@ void KaleidoScope_Update(PlayState* play) {
pauseCtx->worldMapPoints[WORLD_MAP_POINT_KAKARIKO_VILLAGE] = WORLD_MAP_POINT_STATE_SHOW;
}
- if (gBitFlags[WORLD_MAP_AREA_LOST_WOODS] & gSaveContext.save.info.worldMapAreaData) {
+ if (gSaveContext.save.info.worldMapAreaData & gBitFlags[WORLD_MAP_AREA_LOST_WOODS]) {
pauseCtx->worldMapPoints[WORLD_MAP_POINT_LOST_WOODS] = WORLD_MAP_POINT_STATE_SHOW;
}
if (GET_EVENTCHKINF(EVENTCHKINF_0F)) {
@@ -3767,14 +4039,15 @@ void KaleidoScope_Update(PlayState* play) {
break;
case PAUSE_STATE_OPENING_1:
- if (pauseCtx->unk_1F4 == 160.0f) {
+ if (pauseCtx->itemPagePitch == 160.0f) {
// First frame in this state
KaleidoScope_SetDefaultCursor(play);
KaleidoScope_ProcessPlayerPreRender();
}
- pauseCtx->unk_1F4 = pauseCtx->unk_1F8 = pauseCtx->unk_1FC = pauseCtx->unk_200 -= 160.0f / WREG(6);
+ pauseCtx->itemPagePitch = pauseCtx->equipPagePitch = pauseCtx->mapPagePitch = pauseCtx->questPagePitch -=
+ 160.0f / WREG(6);
pauseCtx->infoPanelOffsetY += 40 / WREG(6);
interfaceCtx->startAlpha += 255 / WREG(6);
WREG(16) += WREG(25) / WREG(6);
@@ -3782,9 +4055,9 @@ void KaleidoScope_Update(PlayState* play) {
XREG(5) += 150 / WREG(6);
pauseCtx->alpha += (u16)(255 / (WREG(6) + WREG(4)));
- if (pauseCtx->unk_1F4 == 0) {
+ if (pauseCtx->itemPagePitch == 0) {
interfaceCtx->startAlpha = 255;
- WREG(2) = 0;
+ R_PAUSE_PAGES_Y_ORIGIN_2 = 0;
pauseCtx->state = PAUSE_STATE_OPENING_2;
}
@@ -3806,9 +4079,9 @@ void KaleidoScope_Update(PlayState* play) {
if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
Interface_SetDoAction(play, DO_ACTION_NONE);
pauseCtx->state = PAUSE_STATE_CLOSING;
- WREG(2) = -6240;
+ R_PAUSE_PAGES_Y_ORIGIN_2 = PAUSE_PAGES_Y_ORIGIN_2_LOWER;
func_800F64E0(0);
-#if !PLATFORM_N64 && OOT_NTSC
+#if PLATFORM_GC && OOT_NTSC
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
#endif
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
@@ -3827,13 +4100,14 @@ void KaleidoScope_Update(PlayState* play) {
break;
case PAUSE_MAIN_STATE_SWITCHING_PAGE:
- KaleidoScope_UpdatePageSwitch(play, play->state.input);
+ KaleidoScope_UpdatePageSwitch(play, &play->state.input[0]);
break;
- case PAUSE_MAIN_STATE_2:
+ case PAUSE_MAIN_STATE_SONG_PLAYBACK:
pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
if (pauseCtx->ocarinaStaff->state == 0) {
- pauseCtx->mainState = PAUSE_MAIN_STATE_4;
+ // Song playback is finished
+ pauseCtx->mainState = PAUSE_MAIN_STATE_SONG_PROMPT_INIT;
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
break;
@@ -3842,17 +4116,17 @@ void KaleidoScope_Update(PlayState* play) {
KaleidoScope_UpdateItemEquip(play);
break;
- case PAUSE_MAIN_STATE_4:
+ case PAUSE_MAIN_STATE_SONG_PROMPT_INIT:
break;
- case PAUSE_MAIN_STATE_5:
+ case PAUSE_MAIN_STATE_SONG_PROMPT:
pauseCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Interface_SetDoAction(play, DO_ACTION_NONE);
pauseCtx->state = PAUSE_STATE_CLOSING;
- WREG(2) = -6240;
+ R_PAUSE_PAGES_Y_ORIGIN_2 = PAUSE_PAGES_Y_ORIGIN_2_LOWER;
func_800F64E0(0);
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
break;
@@ -3871,39 +4145,43 @@ void KaleidoScope_Update(PlayState* play) {
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
pauseCtx->state = PAUSE_STATE_SAVE_PROMPT;
} else if (pauseCtx->ocarinaStaff->state == pauseCtx->ocarinaSongIdx) {
+ // The player successfully played the song
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- D_8082B258 = PAUSE_MAIN_STATE_IDLE;
- D_8082B25C = 30;
- pauseCtx->mainState = PAUSE_MAIN_STATE_6;
+
+ sMainStateAfterSongPlayerPlayingDone = PAUSE_MAIN_STATE_IDLE;
+ sDelayTimer = 30;
+ pauseCtx->mainState = PAUSE_MAIN_STATE_SONG_PROMPT_DONE;
} else if (pauseCtx->ocarinaStaff->state == 0xFF) {
+ // The player failed to play the song
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- D_8082B258 = PAUSE_MAIN_STATE_4;
- D_8082B25C = 20;
- pauseCtx->mainState = PAUSE_MAIN_STATE_6;
+
+ sMainStateAfterSongPlayerPlayingDone = PAUSE_MAIN_STATE_SONG_PROMPT_INIT;
+ sDelayTimer = 20;
+ pauseCtx->mainState = PAUSE_MAIN_STATE_SONG_PROMPT_DONE;
}
break;
- case PAUSE_MAIN_STATE_6:
- D_8082B25C--;
- if (D_8082B25C == 0) {
- pauseCtx->mainState = D_8082B258;
+ case PAUSE_MAIN_STATE_SONG_PROMPT_DONE:
+ sDelayTimer--;
+ if (sDelayTimer == 0) {
+ pauseCtx->mainState = sMainStateAfterSongPlayerPlayingDone;
if (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
}
break;
- case PAUSE_MAIN_STATE_7:
+ case PAUSE_MAIN_STATE_EQUIP_CHANGED:
break;
- case PAUSE_MAIN_STATE_8:
+ case PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG:
if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
Interface_SetDoAction(play, DO_ACTION_NONE);
pauseCtx->state = PAUSE_STATE_CLOSING;
- WREG(2) = -6240;
+ R_PAUSE_PAGES_Y_ORIGIN_2 = PAUSE_PAGES_Y_ORIGIN_2_LOWER;
func_800F64E0(0);
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
@@ -3923,7 +4201,7 @@ void KaleidoScope_Update(PlayState* play) {
}
break;
- case PAUSE_MAIN_STATE_9:
+ case PAUSE_MAIN_STATE_SONG_PLAYBACK_START:
break;
default:
@@ -3935,11 +4213,11 @@ void KaleidoScope_Update(PlayState* play) {
case PAUSE_STATE_SAVE_PROMPT:
switch (pauseCtx->savePromptState) {
case PAUSE_SAVE_PROMPT_STATE_APPEARING:
- pauseCtx->unk_204 -= 314.0f / WREG(6);
+ pauseCtx->promptPitch -= 314.0f / WREG(6);
WREG(16) -= WREG(25) / WREG(6);
WREG(17) -= WREG(26) / WREG(6);
- if (pauseCtx->unk_204 <= -628.0f) {
- pauseCtx->unk_204 = -628.0f;
+ if (pauseCtx->promptPitch <= -628.0f) {
+ pauseCtx->promptPitch = -628.0f;
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_WAIT_CHOICE;
}
break;
@@ -3953,10 +4231,10 @@ void KaleidoScope_Update(PlayState* play) {
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_CLOSING;
- WREG(2) = -6240;
- YREG(8) = pauseCtx->unk_204;
+ R_PAUSE_PAGES_Y_ORIGIN_2 = PAUSE_PAGES_Y_ORIGIN_2_LOWER;
+ YREG(8) = pauseCtx->promptPitch;
func_800F64E0(0);
-#if !PLATFORM_N64 && OOT_NTSC
+#if PLATFORM_GC && OOT_NTSC
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
#endif
} else {
@@ -3967,24 +4245,24 @@ void KaleidoScope_Update(PlayState* play) {
gSaveContext.save.info.playerData.savedSceneId = play->sceneId;
Sram_WriteSave(&play->sramCtx);
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_SAVED;
-#if PLATFORM_N64
- D_8082B25C = 90;
+#if !PLATFORM_GC
+ sDelayTimer = 90;
#else
- D_8082B25C = 3;
+ sDelayTimer = 3;
#endif
}
} else if (CHECK_BTN_ALL(input->press.button, BTN_START) ||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
Interface_SetDoAction(play, DO_ACTION_NONE);
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_CLOSING;
- WREG(2) = -6240;
- YREG(8) = pauseCtx->unk_204;
+ R_PAUSE_PAGES_Y_ORIGIN_2 = PAUSE_PAGES_Y_ORIGIN_2_LOWER;
+ YREG(8) = pauseCtx->promptPitch;
func_800F64E0(0);
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
gSaveContext.buttonStatus[3] = BTN_ENABLED;
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
-#if !PLATFORM_N64 && OOT_NTSC
+#if PLATFORM_GC && OOT_NTSC
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
#endif
}
@@ -3992,53 +4270,55 @@ void KaleidoScope_Update(PlayState* play) {
case PAUSE_SAVE_PROMPT_STATE_SAVED:
if (CHECK_BTN_ALL(input->press.button, BTN_B) || CHECK_BTN_ALL(input->press.button, BTN_A) ||
- CHECK_BTN_ALL(input->press.button, BTN_START) || (--D_8082B25C == 0)) {
+ CHECK_BTN_ALL(input->press.button, BTN_START) || (--sDelayTimer == 0)) {
Interface_SetDoAction(play, DO_ACTION_NONE);
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
gSaveContext.buttonStatus[3] = BTN_ENABLED;
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_CLOSING_AFTER_SAVED;
- WREG(2) = -6240;
- YREG(8) = pauseCtx->unk_204;
+ R_PAUSE_PAGES_Y_ORIGIN_2 = PAUSE_PAGES_Y_ORIGIN_2_LOWER;
+ YREG(8) = pauseCtx->promptPitch;
func_800F64E0(0);
}
break;
case PAUSE_SAVE_PROMPT_STATE_RETURN_TO_MENU:
case PAUSE_SAVE_PROMPT_STATE_RETURN_TO_MENU_2:
- pauseCtx->unk_204 += 314.0f / WREG(6);
+ pauseCtx->promptPitch += 314.0f / WREG(6);
WREG(16) += WREG(25) / WREG(6);
WREG(17) += WREG(26) / WREG(6);
- if (pauseCtx->unk_204 >= -314.0f) {
+ if (pauseCtx->promptPitch >= -314.0f) {
pauseCtx->state = PAUSE_STATE_MAIN;
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
- pauseCtx->unk_1F4 = pauseCtx->unk_1F8 = pauseCtx->unk_1FC = pauseCtx->unk_200 = 0.0f;
- pauseCtx->unk_204 = -314.0f;
+ pauseCtx->itemPagePitch = pauseCtx->equipPagePitch = pauseCtx->mapPagePitch =
+ pauseCtx->questPagePitch = 0.0f;
+ pauseCtx->promptPitch = -314.0f;
}
break;
case PAUSE_SAVE_PROMPT_STATE_CLOSING:
case PAUSE_SAVE_PROMPT_STATE_CLOSING_AFTER_SAVED:
- if (pauseCtx->unk_204 != (YREG(8) + 160.0f)) {
- pauseCtx->unk_1F4 = pauseCtx->unk_1F8 = pauseCtx->unk_1FC = pauseCtx->unk_200 +=
- 160.0f / WREG(6);
- pauseCtx->unk_204 += 160.0f / WREG(6);
+ if (pauseCtx->promptPitch != (YREG(8) + 160.0f)) {
+ pauseCtx->itemPagePitch = pauseCtx->equipPagePitch = pauseCtx->mapPagePitch =
+ pauseCtx->questPagePitch += 160.0f / WREG(6);
+ pauseCtx->promptPitch += 160.0f / WREG(6);
pauseCtx->infoPanelOffsetY -= 40 / WREG(6);
WREG(16) -= WREG(25) / WREG(6);
WREG(17) -= WREG(26) / WREG(6);
XREG(5) -= 150 / WREG(6);
pauseCtx->alpha -= (u16)(255 / WREG(6));
- if (pauseCtx->unk_204 == (YREG(8) + 160.0f)) {
+ if (pauseCtx->promptPitch == (YREG(8) + 160.0f)) {
pauseCtx->alpha = 0;
}
} else {
pauseCtx->debugState = 0;
pauseCtx->state = PAUSE_STATE_RESUME_GAMEPLAY;
- pauseCtx->unk_1F4 = pauseCtx->unk_1F8 = pauseCtx->unk_1FC = pauseCtx->unk_200 = 160.0f;
+ pauseCtx->itemPagePitch = pauseCtx->equipPagePitch = pauseCtx->mapPagePitch =
+ pauseCtx->questPagePitch = 160.0f;
pauseCtx->namedItem = PAUSE_ITEM_NONE;
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
- pauseCtx->unk_204 = -434.0f;
+ pauseCtx->promptPitch = -434.0f;
}
break;
@@ -4047,12 +4327,12 @@ void KaleidoScope_Update(PlayState* play) {
}
break;
- case PAUSE_STATE_10:
+ case PAUSE_STATE_GAME_OVER_INIT:
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->dungeonMapSlot =
VREG(30) + 3;
WREG(16) = -175;
WREG(17) = 155;
- pauseCtx->unk_204 = -434.0f;
+ pauseCtx->promptPitch = -434.0f;
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
//! @bug messed up alignment, should match `ALIGN64`
@@ -4080,12 +4360,14 @@ void KaleidoScope_Update(PlayState* play) {
#if OOT_NTSC
if (gSaveContext.language == LANGUAGE_JPN) {
size = (uintptr_t)_icon_item_jpn_staticSegmentRomEnd - (uintptr_t)_icon_item_jpn_staticSegmentRomStart;
- DmaMgr_RequestSync(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_jpn_staticSegmentRomStart,
- size);
+ PRINTF("icon_item_jpn dungeon-size=%x\n", size);
+ DMA_REQUEST_SYNC(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_jpn_staticSegmentRomStart, size,
+ "../z_kaleido_scope_PAL.c", UNK_LINE);
} else {
size = (uintptr_t)_icon_item_nes_staticSegmentRomEnd - (uintptr_t)_icon_item_nes_staticSegmentRomStart;
- DmaMgr_RequestSync(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_nes_staticSegmentRomStart,
- size);
+ PRINTF("icon_item_dungeon dungeon-size=%x\n", size);
+ DMA_REQUEST_SYNC(pauseCtx->iconItemLangSegment, (uintptr_t)_icon_item_nes_staticSegmentRomStart, size,
+ "../z_kaleido_scope_PAL.c", UNK_LINE);
}
#else
if (gSaveContext.language == LANGUAGE_ENG) {
@@ -4116,10 +4398,10 @@ void KaleidoScope_Update(PlayState* play) {
D_8082B260 = 30;
VREG(88) = 98;
pauseCtx->promptChoice = 0;
- pauseCtx->state++; // PAUSE_STATE_11
+ pauseCtx->state++; // PAUSE_STATE_GAME_OVER_SHOW_MESSAGE
break;
- case PAUSE_STATE_11:
+ case PAUSE_STATE_GAME_OVER_SHOW_MESSAGE:
stepR = ABS(D_8082AB8C - 30) / D_8082B260;
stepG = ABS(D_8082AB90) / D_8082B260;
stepB = ABS(D_8082AB94) / D_8082B260;
@@ -4174,22 +4456,22 @@ void KaleidoScope_Update(PlayState* play) {
D_8082AB9C = 255;
D_8082ABA0 = 130;
D_8082ABA4 = 0;
-
- pauseCtx->state++; // PAUSE_STATE_12
D_8082B260 = 40;
+
+ pauseCtx->state++; // PAUSE_STATE_GAME_OVER_WINDOW_DELAY
}
break;
- case PAUSE_STATE_12:
+ case PAUSE_STATE_GAME_OVER_WINDOW_DELAY:
D_8082B260--;
if (D_8082B260 == 0) {
- pauseCtx->state = PAUSE_STATE_13;
+ pauseCtx->state = PAUSE_STATE_GAME_OVER_SHOW_WINDOW;
}
break;
- case PAUSE_STATE_13:
- pauseCtx->unk_1F4 = pauseCtx->unk_1F8 = pauseCtx->unk_1FC = pauseCtx->unk_200 = pauseCtx->unk_204 -=
- 160.0f / WREG(6);
+ case PAUSE_STATE_GAME_OVER_SHOW_WINDOW:
+ pauseCtx->itemPagePitch = pauseCtx->equipPagePitch = pauseCtx->mapPagePitch = pauseCtx->questPagePitch =
+ pauseCtx->promptPitch -= 160.0f / WREG(6);
pauseCtx->infoPanelOffsetY += 40 / WREG(6);
interfaceCtx->startAlpha += 255 / WREG(6);
VREG(88) -= 3;
@@ -4197,28 +4479,28 @@ void KaleidoScope_Update(PlayState* play) {
WREG(17) += WREG(26) / WREG(6);
XREG(5) += 150 / WREG(6);
pauseCtx->alpha += (u16)(255 / (WREG(6) + WREG(4)));
- if (pauseCtx->unk_204 < -628.0f) {
- pauseCtx->unk_204 = -628.0f;
+ if (pauseCtx->promptPitch < -628.0f) {
+ pauseCtx->promptPitch = -628.0f;
interfaceCtx->startAlpha = 255;
VREG(88) = 66;
- WREG(2) = 0;
+ R_PAUSE_PAGES_Y_ORIGIN_2 = 0;
pauseCtx->alpha = 255;
- pauseCtx->state = PAUSE_STATE_14;
+ pauseCtx->state = PAUSE_STATE_GAME_OVER_SAVE_PROMPT;
gSaveContext.save.info.playerData.deaths++;
if (gSaveContext.save.info.playerData.deaths > 999) {
gSaveContext.save.info.playerData.deaths = 999;
}
}
- PRINTF("kscope->angle_s = %f\n", pauseCtx->unk_204);
+ PRINTF("kscope->angle_s = %f\n", pauseCtx->promptPitch);
break;
- case PAUSE_STATE_14:
+ case PAUSE_STATE_GAME_OVER_SAVE_PROMPT:
if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
if (pauseCtx->promptChoice != 0) {
pauseCtx->promptChoice = 0;
Audio_PlaySfxGeneral(NA_SE_SY_DECIDE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- pauseCtx->state = PAUSE_STATE_16;
+ pauseCtx->state = PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT;
gameOverCtx->state++;
} else {
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
@@ -4227,30 +4509,30 @@ void KaleidoScope_Update(PlayState* play) {
Play_SaveSceneFlags(play);
gSaveContext.save.info.playerData.savedSceneId = play->sceneId;
Sram_WriteSave(&play->sramCtx);
- pauseCtx->state = PAUSE_STATE_15;
-#if PLATFORM_N64
- D_8082B25C = 90;
+ pauseCtx->state = PAUSE_STATE_GAME_OVER_SAVED;
+#if !PLATFORM_GC
+ sDelayTimer = 90;
#else
- D_8082B25C = 3;
+ sDelayTimer = 3;
#endif
}
}
break;
- case PAUSE_STATE_15:
- D_8082B25C--;
- if (D_8082B25C == 0) {
- pauseCtx->state = PAUSE_STATE_16;
+ case PAUSE_STATE_GAME_OVER_SAVED:
+ sDelayTimer--;
+ if (sDelayTimer == 0) {
+ pauseCtx->state = PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT;
gameOverCtx->state++;
- } else if ((D_8082B25C <= 80) &&
+ } else if ((sDelayTimer <= 80) &&
(CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START))) {
- pauseCtx->state = PAUSE_STATE_16;
+ pauseCtx->state = PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT;
gameOverCtx->state++;
func_800F64E0(0);
}
break;
- case PAUSE_STATE_16:
+ case PAUSE_STATE_GAME_OVER_CONTINUE_PROMPT:
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START)) {
if (pauseCtx->promptChoice == 0) {
Audio_PlaySfxGeneral(NA_SE_SY_PIECE_OF_HEART, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
@@ -4316,11 +4598,11 @@ void KaleidoScope_Update(PlayState* play) {
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
- pauseCtx->state = PAUSE_STATE_17;
+ pauseCtx->state = PAUSE_STATE_GAME_OVER_FINISH;
}
break;
- case PAUSE_STATE_17:
+ case PAUSE_STATE_GAME_OVER_FINISH:
if (interfaceCtx->unk_244 != 255) {
interfaceCtx->unk_244 += 10;
if (interfaceCtx->unk_244 >= 255) {
@@ -4339,7 +4621,7 @@ void KaleidoScope_Update(PlayState* play) {
gSaveContext.healthAccumulator = 0;
gSaveContext.magicState = MAGIC_STATE_IDLE;
gSaveContext.prevMagicState = MAGIC_STATE_IDLE;
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("MAGIC_NOW=%d ", gSaveContext.save.info.playerData.magic);
PRINTF("Z_MAGIC_NOW_NOW=%d → ", gSaveContext.magicFillTarget);
gSaveContext.magicCapacity = 0;
@@ -4350,7 +4632,7 @@ void KaleidoScope_Update(PlayState* play) {
gSaveContext.save.info.playerData.magicLevel = gSaveContext.save.info.playerData.magic = 0;
PRINTF("MAGIC_NOW=%d ", gSaveContext.save.info.playerData.magic);
PRINTF("Z_MAGIC_NOW_NOW=%d\n", gSaveContext.magicFillTarget);
- PRINTF(VT_RST);
+ PRINTF_RST();
} else {
play->state.running = false;
SET_NEXT_GAMESTATE(&play->state, TitleSetup_Init, TitleSetupState);
@@ -4360,26 +4642,27 @@ void KaleidoScope_Update(PlayState* play) {
break;
case PAUSE_STATE_CLOSING:
- if (pauseCtx->unk_1F4 != 160.0f) {
- pauseCtx->unk_1F4 = pauseCtx->unk_1F8 = pauseCtx->unk_1FC = pauseCtx->unk_200 += 160.0f / WREG(6);
+ if (pauseCtx->itemPagePitch != 160.0f) {
+ pauseCtx->itemPagePitch = pauseCtx->equipPagePitch = pauseCtx->mapPagePitch =
+ pauseCtx->questPagePitch += 160.0f / WREG(6);
pauseCtx->infoPanelOffsetY -= 40 / WREG(6);
interfaceCtx->startAlpha -= 255 / WREG(6);
WREG(16) -= WREG(25) / WREG(6);
WREG(17) -= WREG(26) / WREG(6);
XREG(5) -= 150 / WREG(6);
pauseCtx->alpha -= (u16)(255 / WREG(6));
- if (pauseCtx->unk_1F4 == 160.0f) {
+ if (pauseCtx->itemPagePitch == 160.0f) {
pauseCtx->alpha = 0;
}
} else {
pauseCtx->debugState = 0;
pauseCtx->state = PAUSE_STATE_RESUME_GAMEPLAY;
- pauseCtx->unk_200 = 160.0f;
- pauseCtx->unk_1FC = 160.0f;
- pauseCtx->unk_1F8 = 160.0f;
- pauseCtx->unk_1F4 = 160.0f;
+ pauseCtx->questPagePitch = 160.0f;
+ pauseCtx->mapPagePitch = 160.0f;
+ pauseCtx->equipPagePitch = 160.0f;
+ pauseCtx->itemPagePitch = 160.0f;
pauseCtx->namedItem = PAUSE_ITEM_NONE;
- play->interfaceCtx.startAlpha = 0;
+ interfaceCtx->startAlpha = 0;
}
break;
@@ -4410,7 +4693,7 @@ void KaleidoScope_Update(PlayState* play) {
case SCENE_WATER_TEMPLE_BOSS:
case SCENE_SPIRIT_TEMPLE_BOSS:
case SCENE_SHADOW_TEMPLE_BOSS:
- Map_InitData(play, play->interfaceCtx.mapRoomNum);
+ Map_InitData(play, interfaceCtx->mapRoomNum);
break;
}
@@ -4420,13 +4703,13 @@ void KaleidoScope_Update(PlayState* play) {
gSaveContext.buttonStatus[3] = D_808321A8[3];
gSaveContext.buttonStatus[4] = D_808321A8[4];
interfaceCtx->unk_1FA = interfaceCtx->unk_1FC = 0;
- PRINTF(VT_FGCOL(YELLOW));
+ PRINTF_COLOR_YELLOW();
PRINTF("i=%d LAST_TIME_TYPE=%d\n", i, gSaveContext.prevHudVisibilityMode);
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
Interface_ChangeHudVisibilityMode(gSaveContext.prevHudVisibilityMode);
player->talkActor = NULL;
Player_SetEquipmentData(play, player);
- PRINTF(VT_RST);
+ PRINTF_RST();
break;
}
}
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h
index aca4271853..fcc84c5395 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h
+++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h
@@ -2,14 +2,18 @@
#define Z_KALEIDO_SCOPE_H
#include "ultra64.h"
-#include "global.h"
+#include "gfx.h"
+#include "z64inventory.h"
+#include "z64pause.h"
+
+struct PlayState;
extern u8 gAmmoItems[];
extern s16 gVtxPageMapWorldQuadsWidth[];
extern s16 gVtxPageMapWorldQuadsHeight[];
-extern u8 gSlotAgeReqs[];
-extern u8 gEquipAgeReqs[EQUIP_TYPE_MAX][4];
-extern u8 gItemAgeReqs[];
+extern char gSlotAgeReqs[];
+extern char gEquipAgeReqs[EQUIP_TYPE_MAX][4];
+extern char gItemAgeReqs[];
extern u8 gAreaGsFlags[];
#define AGE_REQ_ADULT LINK_AGE_ADULT
@@ -34,6 +38,86 @@ extern u8 gAreaGsFlags[];
#define PAGE_BG_QUAD_TEX_WIDTH 80
#define PAGE_BG_QUAD_TEX_HEIGHT 32
+typedef enum QuestQuad {
+ // 0 to 24 matches the `QuestItem` enum
+ // Notes showing the correct song
+ /* 25 */ QUEST_QUAD_SONG_NOTE_A1 = QUEST_HEART_PIECE + 1,
+ /* 26 */ QUEST_QUAD_SONG_NOTE_A2,
+ /* 27 */ QUEST_QUAD_SONG_NOTE_A3,
+ /* 28 */ QUEST_QUAD_SONG_NOTE_A4,
+ /* 29 */ QUEST_QUAD_SONG_NOTE_A5,
+ /* 30 */ QUEST_QUAD_SONG_NOTE_A6,
+ /* 31 */ QUEST_QUAD_SONG_NOTE_A7,
+ /* 32 */ QUEST_QUAD_SONG_NOTE_A8,
+ // Notes appearing when playing
+ /* 33 */ QUEST_QUAD_SONG_NOTE_B1,
+ /* 34 */ QUEST_QUAD_SONG_NOTE_B2,
+ /* 35 */ QUEST_QUAD_SONG_NOTE_B3,
+ /* 36 */ QUEST_QUAD_SONG_NOTE_B4,
+ /* 37 */ QUEST_QUAD_SONG_NOTE_B5,
+ /* 38 */ QUEST_QUAD_SONG_NOTE_B6,
+ /* 39 */ QUEST_QUAD_SONG_NOTE_B7,
+ /* 40 */ QUEST_QUAD_SONG_NOTE_B8,
+ // Shadow for the amount of skulltula tokens
+ /* 41 */ QUEST_QUAD_SKULL_TOKENS_DIGIT1_SHADOW,
+ /* 42 */ QUEST_QUAD_SKULL_TOKENS_DIGIT2_SHADOW,
+ /* 43 */ QUEST_QUAD_SKULL_TOKENS_DIGIT3_SHADOW,
+ // Amount of skulltula tokens
+ /* 44 */ QUEST_QUAD_SKULL_TOKENS_DIGIT1,
+ /* 45 */ QUEST_QUAD_SKULL_TOKENS_DIGIT2,
+ /* 46 */ QUEST_QUAD_SKULL_TOKENS_DIGIT3,
+ /* 47 */ QUEST_QUAD_MAX
+} QuestQuad;
+
+#define EQUIP_CURSOR_X_UPG 0
+#define EQUIP_CURSOR_Y_BULLETBAG_QUIVER 0
+
+#define EQUIP_GRID_CELL_WIDTH 32
+#define EQUIP_GRID_CELL_HEIGHT 32
+#define EQUIP_GRID_QUAD_MARGIN 2
+#define EQUIP_GRID_QUAD_WIDTH (EQUIP_GRID_CELL_WIDTH - (2 * EQUIP_GRID_QUAD_MARGIN))
+#define EQUIP_GRID_QUAD_HEIGHT (EQUIP_GRID_CELL_HEIGHT - (2 * EQUIP_GRID_QUAD_MARGIN))
+#define EQUIP_GRID_QUAD_TEX_SIZE 32 // both width and height
+
+#define EQUIP_GRID_SELECTED_QUAD_MARGIN (-2)
+#define EQUIP_GRID_SELECTED_QUAD_WIDTH (EQUIP_GRID_QUAD_WIDTH - (2 * EQUIP_GRID_SELECTED_QUAD_MARGIN))
+#define EQUIP_GRID_SELECTED_QUAD_HEIGHT (EQUIP_GRID_QUAD_HEIGHT - (2 * EQUIP_GRID_SELECTED_QUAD_MARGIN))
+#define EQUIP_GRID_SELECTED_QUAD_TEX_SIZE 32 // both width and height
+
+typedef enum EquipQuad {
+ // Grid of upgrades and equips, left column is upgrades, others are equips, with one row per equip type
+ // Row 0
+ /* 0 */ EQUIP_QUAD_UPG_BULLETBAG_QUIVER,
+ /* 1 */ EQUIP_QUAD_SWORD_KOKIRI,
+ /* 2 */ EQUIP_QUAD_SWORD_MASTER,
+ /* 3 */ EQUIP_QUAD_SWORD_BIGGORON,
+ // Row 1
+ /* 4 */ EQUIP_QUAD_UPG_BOMB_BAG,
+ /* 5 */ EQUIP_QUAD_SHIELD_DEKU,
+ /* 6 */ EQUIP_QUAD_SHIELD_HYLIAN,
+ /* 7 */ EQUIP_QUAD_SHIELD_MIRROR,
+ // Row 2
+ /* 8 */ EQUIP_QUAD_UPG_STRENGTH,
+ /* 9 */ EQUIP_QUAD_TUNIC_KOKIRI,
+ /* 10 */ EQUIP_QUAD_TUNIC_GORON,
+ /* 11 */ EQUIP_QUAD_TUNIC_ZORA,
+ // Row 3
+ /* 12 */ EQUIP_QUAD_UPG_SCALE,
+ /* 13 */ EQUIP_QUAD_BOOTS_KOKIRI,
+ /* 14 */ EQUIP_QUAD_BOOTS_IRON,
+ /* 15 */ EQUIP_QUAD_BOOTS_HOVER,
+ // Markers indicating the currently selected equip
+ /* 16 */ EQUIP_QUAD_SELECTED_SWORD,
+ /* 17 */ EQUIP_QUAD_SELECTED_SHIELD,
+ /* 18 */ EQUIP_QUAD_SELECTED_TUNIC,
+ /* 19 */ EQUIP_QUAD_SELECTED_BOOTS,
+ // Player prerender
+ /* 20 */ EQUIP_QUAD_PLAYER_FIRST,
+ /* 23 */ EQUIP_QUAD_PLAYER_LAST = EQUIP_QUAD_PLAYER_FIRST + PAUSE_EQUIP_PLAYER_FRAG_NUM - 1,
+ // 24..27 are unused, probably meant for player prerender
+ /* 28 */ EQUIP_QUAD_MAX = EQUIP_QUAD_PLAYER_LAST + 4 + 1
+} EquipQuad;
+
// The world map image is split into a number of quad fragments for drawing
#define WORLD_MAP_IMAGE_WIDTH 216
#define WORLD_MAP_IMAGE_HEIGHT 128
@@ -79,26 +163,83 @@ typedef enum PromptQuad {
/* 5 */ PROMPT_QUAD_MAX
} PromptQuad;
-void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx);
+#define ITEM_GRID_ROWS 4
+#define ITEM_GRID_COLS 6
+#define ITEM_GRID_CELL_WIDTH 32
+#define ITEM_GRID_CELL_HEIGHT 32
+#define ITEM_GRID_QUAD_MARGIN 2
+#define ITEM_GRID_QUAD_WIDTH (ITEM_GRID_CELL_WIDTH - (2 * ITEM_GRID_QUAD_MARGIN))
+#define ITEM_GRID_QUAD_HEIGHT (ITEM_GRID_CELL_HEIGHT - (2 * ITEM_GRID_QUAD_MARGIN))
+#define ITEM_GRID_QUAD_TEX_SIZE 32 // both width and height
+#define ITEM_GRID_QUAD_ENLARGE_OFFSET 2
+
+#define ITEM_GRID_SELECTED_QUAD_MARGIN (-2)
+#define ITEM_GRID_SELECTED_QUAD_WIDTH (ITEM_GRID_QUAD_WIDTH - (2 * ITEM_GRID_SELECTED_QUAD_MARGIN))
+#define ITEM_GRID_SELECTED_QUAD_HEIGHT (ITEM_GRID_QUAD_HEIGHT - (2 * ITEM_GRID_SELECTED_QUAD_MARGIN))
+#define ITEM_GRID_SELECTED_QUAD_TEX_SIZE 32 // both width and height
+
+#define ITEM_AMMO_DIGIT_QUAD_WIDTH 8
+#define ITEM_AMMO_DIGIT_QUAD_HEIGHT 8
+#define ITEM_AMMO_DIGIT_QUAD_TEX_SIZE 8
+
+// Relative to the corresponding ITEM_QUAD_GRID_ quad
+#define ITEM_AMMO_TENS_QUAD_OFFSET_X 0
+#define ITEM_AMMO_TENS_QUAD_OFFSET_Y 22
+
+// Relative to the ammo tens digit
+#define ITEM_AMMO_ONES_QUAD_OFFSET_X 6
+#define ITEM_AMMO_ONES_QUAD_OFFSET_Y 0
+
+typedef enum ItemQuad {
+ // 0 to 23 are the ITEM_GRID_ROWS*ITEM_GRID_COLS item grid
+ // The values follow the `InventorySlot` enum
+ /* 0 */ ITEM_QUAD_GRID_FIRST,
+ /* 23 */ ITEM_QUAD_GRID_LAST = ITEM_GRID_ROWS * ITEM_GRID_COLS - 1,
+ // Markers indicating the currently equipped items
+ /* 24 */ ITEM_QUAD_GRID_SELECTED_C_LEFT,
+ /* 25 */ ITEM_QUAD_GRID_SELECTED_C_DOWN,
+ /* 26 */ ITEM_QUAD_GRID_SELECTED_C_RIGHT,
+ // Digits for showing ammo count
+ /* 27 */ ITEM_QUAD_AMMO_FIRST,
+ /* 27 */ ITEM_QUAD_AMMO_STICK_TENS = ITEM_QUAD_AMMO_FIRST,
+ /* 28 */ ITEM_QUAD_AMMO_STICK_ONES,
+ /* 29 */ ITEM_QUAD_AMMO_NUT_TENS,
+ /* 30 */ ITEM_QUAD_AMMO_NUT_ONES,
+ /* 31 */ ITEM_QUAD_AMMO_BOMB_TENS,
+ /* 32 */ ITEM_QUAD_AMMO_BOMB_ONES,
+ /* 33 */ ITEM_QUAD_AMMO_BOW_TENS,
+ /* 34 */ ITEM_QUAD_AMMO_BOW_ONES,
+ /* 35 */ ITEM_QUAD_AMMO_SLINGSHOT_TENS,
+ /* 36 */ ITEM_QUAD_AMMO_SLINGSHOT_ONES,
+ /* 37 */ ITEM_QUAD_AMMO_BOMBCHU_TENS,
+ /* 38 */ ITEM_QUAD_AMMO_BOMBCHU_ONES,
+ /* 39 */ ITEM_QUAD_AMMO_BEAN_TENS,
+ /* 40 */ ITEM_QUAD_AMMO_BEAN_ONES,
+ /* 41 */ ITEM_QUAD_MAX
+} ItemQuad;
+
+void KaleidoScope_DrawQuestStatus(struct PlayState* play, GraphicsContext* gfxCtx);
s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s32 point);
-void KaleidoScope_DrawDebugEditor(PlayState* play);
-void KaleidoScope_DrawPlayerWork(PlayState* play);
-void KaleidoScope_DrawEquipment(PlayState* play);
+void KaleidoScope_DrawDebugEditor(struct PlayState* play);
+void KaleidoScope_DrawPlayerWork(struct PlayState* play);
+void KaleidoScope_DrawEquipment(struct PlayState* play);
void KaleidoScope_SetCursorPos(PauseContext* pauseCtx, u16 index, Vtx* vtx);
-void KaleidoScope_DrawItemSelect(PlayState* play);
-void KaleidoScope_UpdateItemEquip(PlayState* play);
-void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx);
-void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx);
-void KaleidoScope_UpdatePrompt(PlayState* play);
+void KaleidoScope_DrawItemSelect(struct PlayState* play);
+void KaleidoScope_UpdateItemEquip(struct PlayState* play);
+void KaleidoScope_DrawDungeonMap(struct PlayState* play, GraphicsContext* gfxCtx);
+void KaleidoScope_DrawWorldMap(struct PlayState* play, GraphicsContext* gfxCtx);
+void KaleidoScope_UpdatePrompt(struct PlayState* play);
Gfx* KaleidoScope_QuadTextureIA4(Gfx* gfx, void* texture, s16 width, s16 height, u16 point);
Gfx* KaleidoScope_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, u16 point);
-void KaleidoScope_MoveCursorToSpecialPos(PlayState* play, u16 specialPos);
+void KaleidoScope_MoveCursorToSpecialPos(struct PlayState* play, u16 specialPos);
void KaleidoScope_DrawQuadTextureRGBA32(GraphicsContext* gfxCtx, void* texture, u16 width, u16 height, u16 point);
-void KaleidoScope_ProcessPlayerPreRender();
-void KaleidoScope_SetupPlayerPreRender(PlayState* play);
-void KaleidoScope_DrawCursor(PlayState* play, u16 pageIndex);
-void KaleidoScope_UpdateDungeonMap(PlayState* play);
+#ifdef AVOID_UB
+void KaleidoScope_ProcessPlayerPreRender(void);
+#endif
+void KaleidoScope_SetupPlayerPreRender(struct PlayState* play);
+void KaleidoScope_DrawCursor(struct PlayState* play, u16 pageIndex);
+void KaleidoScope_UpdateDungeonMap(struct PlayState* play);
-void PauseMapMark_Draw(PlayState* play);
+void PauseMapMark_Draw(struct PlayState* play);
#endif
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.c b/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.c
index 3f079430f8..ec2c566ece 100644
--- a/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.c
+++ b/src/overlays/misc/ovl_kaleido_scope/z_lmap_mark.c
@@ -1,7 +1,12 @@
#if PLATFORM_N64
#include "n64dd.h"
#endif
+#include "regs.h"
+#include "sys_matrix.h"
#include "z_kaleido_scope.h"
+#include "z_lib.h"
+#include "z64play.h"
+
#include "assets/textures/parameter_static/parameter_static.h"
typedef struct PauseMapMarkInfo {
@@ -131,7 +136,7 @@ void PauseMapMark_DrawForDungeon(PlayState* play) {
Matrix_Push();
-#if OOT_DEBUG
+#if DEBUG_FEATURES
Matrix_Translate(markPoint->x + GREG(92), markPoint->y + GREG(93), 0.0f, MTXMODE_APPLY);
#else
Matrix_Translate(markPoint->x, markPoint->y, 0.0f, MTXMODE_APPLY);
diff --git a/src/overlays/misc/ovl_map_mark_data/z_map_mark_data.c b/src/overlays/misc/ovl_map_mark_data/z_map_mark_data.c
index 013b8b7b31..48a18fff9d 100644
--- a/src/overlays/misc/ovl_map_mark_data/z_map_mark_data.c
+++ b/src/overlays/misc/ovl_map_mark_data/z_map_mark_data.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "z64map_mark.h"
static MapMarkData sMapMarkDekuTree[] = {
// Deku Tree minimap 0
diff --git a/src/overlays/misc/ovl_map_mark_data/z_map_mark_data_mq.c b/src/overlays/misc/ovl_map_mark_data/z_map_mark_data_mq.c
index 1fa95837a7..ba7517034c 100644
--- a/src/overlays/misc/ovl_map_mark_data/z_map_mark_data_mq.c
+++ b/src/overlays/misc/ovl_map_mark_data/z_map_mark_data_mq.c
@@ -1,4 +1,4 @@
-#include "global.h"
+#include "z64map_mark.h"
static MapMarkData sMapMarkDekuTree[] = {
// Deku Tree minimap 0
diff --git a/sym_info.py b/sym_info.py
index feeb95da73..55404ad7ee 100755
--- a/sym_info.py
+++ b/sym_info.py
@@ -1,26 +1,404 @@
#!/usr/bin/env python3
-import argparse
-from pathlib import Path
+# SPDX-FileCopyrightText: © 2025 ZeldaRET
+# SPDX-License-Identifier: CC0-1.0
+import argparse
+import bisect
+from dataclasses import dataclass
+import os
+from pathlib import Path
+from typing import Optional
+import struct
+import sys
+
+import colorama
+import elftools.elf.elffile
import mapfile_parser
-def symInfoMain():
- parser = argparse.ArgumentParser(description="Display various information about a symbol or address.")
- parser.add_argument("symname", help="symbol name or VROM/VRAM address to lookup")
- parser.add_argument("-v", "--version", dest="oot_version", help="Which version should be processed", default="gc-eu-mq-dbg")
- parser.add_argument("-e", "--expected", dest="use_expected", action="store_true", help="use the map file in expected/build/ instead of build/")
+@dataclass
+class MdebugSymbolicHeader:
+ magic: int
+ vstamp: int
+ ilineMax: int
+ cbLine: int
+ cbLineOffset: int
+ idnMax: int
+ cbDnOffset: int
+ ipdMax: int
+ cbPdOffset: int
+ isymMax: int
+ cbSymOffset: int
+ ioptMax: int
+ cbOptOffset: int
+ iauxMax: int
+ cbAuxOffset: int
+ issMax: int
+ cbSsOffset: int
+ issExtMax: int
+ cbSsExtOffset: int
+ ifdMax: int
+ cbFdOffset: int
+ crfd: int
+ cbRfdOffset: int
+ iextMax: int
+ cbExtOffset: int
+
+
+@dataclass
+class MdebugFileDescriptor:
+ adr: int
+ rss: int
+ issBase: int
+ cbSs: int
+ isymBase: int
+ csym: int
+ ilineBase: int
+ cline: int
+ ioptBase: int
+ copt: int
+ ipdFirst: int
+ cpd: int
+ iauxBase: int
+ caux: int
+ rfdBase: int
+ crfd: int
+ bitfield: int
+ cbLineOffset: int
+ cbLine: int
+
+
+@dataclass
+class MdebugSymbol:
+ iss: int
+ value: int
+ st: int
+ sc: int
+ index: int
+
+
+@dataclass
+class LocalSymbol:
+ name: str
+ address: int
+
+
+def read_mdebug_symbolic_header(f, offset: int) -> MdebugSymbolicHeader:
+ f.seek(offset)
+ data = f.read(96)
+ return MdebugSymbolicHeader(*struct.unpack(">2H23I", data))
+
+
+def read_mdebug_file_descriptor(f, offset: int) -> MdebugFileDescriptor:
+ f.seek(offset)
+ data = f.read(72)
+ return MdebugFileDescriptor(*struct.unpack(">I2iI6iHh4iI2I", data))
+
+
+def read_mdebug_symbol(f, offset: int) -> MdebugSymbol:
+ f.seek(offset)
+ data = f.read(12)
+ word0, word1, word2 = struct.unpack(">III", data)
+ return MdebugSymbol(
+ word0, word1, (word2 >> 26) & 0x3F, (word2 >> 21) & 0x1F, word2 & 0xFFFFF
+ )
+
+
+def read_mdebug_string(f, offset: int) -> str:
+ f.seek(offset)
+ data = bytearray()
+ while True:
+ char = f.read(1)[0]
+ if char == 0:
+ break
+ data.append(char)
+ return data.decode("ascii")
+
+
+def read_local_symbols_from_mdebug(elf_path: Path) -> list[LocalSymbol]:
+ local_symbols = []
+
+ with open(elf_path, "r+b") as f:
+ elf = elftools.elf.elffile.ELFFile(f)
+
+ mdebug_offset = 0
+ for section in elf.iter_sections():
+ if section.name == ".mdebug":
+ mdebug_offset = section["sh_offset"]
+ break
+
+ if mdebug_offset == 0:
+ print(f"No .mdebug section found in '{elf_path}'")
+ return []
+
+ symbolic_header = read_mdebug_symbolic_header(f, mdebug_offset)
+
+ for fd_num in range(symbolic_header.ifdMax):
+ fd = read_mdebug_file_descriptor(
+ f, symbolic_header.cbFdOffset + fd_num * 72
+ )
+
+ for sym_num in range(fd.isymBase, fd.isymBase + fd.csym):
+ sym = read_mdebug_symbol(f, symbolic_header.cbSymOffset + sym_num * 12)
+ if sym.st == 2: # stStatic
+ if not (
+ sym.sc == 2 or sym.sc == 3 or sym.sc == 15
+ ): # scData, scBss, scRData
+ continue
+
+ sym_name = read_mdebug_string(
+ f, symbolic_header.cbSsOffset + fd.issBase + sym.iss
+ )
+
+ # EGCS mangles names of internal variables, and seemingly ":V" is for in-function static variables
+ if "." in sym_name:
+ continue
+ if ":" in sym_name:
+ sym_name, rest = sym_name.split(":", 1)
+ if not rest.startswith("V"):
+ continue
+
+ local_symbols.append(LocalSymbol(sym_name, sym.value))
+ elif sym.st == 14: # stStaticProc
+ sym_name = read_mdebug_string(
+ f, symbolic_header.cbSsOffset + fd.issBase + sym.iss
+ )
+ local_symbols.append(LocalSymbol(sym_name, sym.value))
+
+ return local_symbols
+
+
+def merge_local_symbols(
+ map_file: mapfile_parser.mapfile.MapFile, local_symbols: list[LocalSymbol]
+):
+ local_symbols.sort(key=lambda s: s.address)
+
+ for segment in map_file:
+ for file in segment:
+ # TODO: handle segmented addresses?
+ if file.vram < 0x80000000:
+ continue
+
+ start_address = file.vram
+ end_address = file.vram + file.size
+
+ start_index = bisect.bisect_left(
+ local_symbols, start_address, key=lambda s: s.address
+ )
+ end_index = bisect.bisect_left(
+ local_symbols, end_address, key=lambda s: s.address
+ )
+ if start_index == end_index:
+ continue
+
+ symbols = file.copySymbolList()
+ for sym in local_symbols[start_index:end_index]:
+ if file.vrom is None:
+ vrom = None
+ else:
+ vrom = sym.address - start_address + file.vrom
+ symbols.append(
+ mapfile_parser.mapfile.Symbol(
+ sym.name, sym.address, None, vrom, None
+ )
+ )
+
+ symbols.sort(key=lambda s: s.vram)
+
+ # Recompute symbol sizes
+ for i in range(len(symbols)):
+ if i == len(symbols) - 1:
+ symbols[i].size = end_address - symbols[i].vram
+ else:
+ symbols[i].size = symbols[i + 1].vram - symbols[i].vram
+
+ file.setSymbolList(symbols)
+
+
+def find_symbols_by_name(
+ map_file: mapfile_parser.mapfile.MapFile, sym_name: str
+) -> list[mapfile_parser.mapfile.FoundSymbolInfo]:
+ infos = []
+
+ for segment in map_file:
+ for file in segment:
+ for sym in file:
+ if sym.name == sym_name:
+ infos.append(mapfile_parser.mapfile.FoundSymbolInfo(file, sym))
+
+ return infos
+
+
+def print_map_file(map_file: mapfile_parser.mapfile.MapFile, *, colors: bool):
+ for segment in map_file:
+ print(
+ f"{colorama.Fore.GREEN if colors else ""}"
+ f"{segment.name}"
+ f"{colorama.Fore.RESET if colors else ""}"
+ )
+ for file in segment:
+ # Ignore debug sections
+ if (
+ file.sectionType in (".pdr", ".line", ".gnu.attributes")
+ or file.sectionType.startswith(".debug")
+ or file.sectionType.startswith(".mdebug")
+ ):
+ continue
+ print(
+ f"{colorama.Fore.CYAN if colors else ""}"
+ f" {file.asStr()}"
+ f"{colorama.Fore.RESET if colors else ""}"
+ )
+ for sym in file:
+ vram_str = f"{sym.vram:08X}"
+ if sym.vrom is None:
+ vrom_str = " "
+ else:
+ vrom_str = f"{sym.vrom:06X}"
+ print(f" {vram_str} {vrom_str} {sym.name}")
+
+
+def sym_info_main():
+ parser = argparse.ArgumentParser(
+ description="Display various information about symbol or addresses."
+ )
+ parser.add_argument(
+ "symname",
+ nargs="?",
+ help="symbol name or VROM/VRAM address to lookup. If not given, all symbols will be printed.",
+ )
+ parser.add_argument(
+ "-e",
+ "--expected",
+ dest="use_expected",
+ action="store_true",
+ help="use the map file and elf in expected/build/ instead of build/",
+ )
+ parser.add_argument(
+ "--color",
+ help="Whether to print using colors or not",
+ choices=("never", "always", "auto"),
+ default="auto",
+ )
+ parser.add_argument(
+ "-v",
+ "--version",
+ dest="oot_version",
+ help="which version should be processed (default: gc-eu-mq-dbg)",
+ default="gc-eu-mq-dbg",
+ )
+ parser.add_argument(
+ "--build-dir",
+ dest="build_dir",
+ help="the build folder in which to read the map and elf (default: `build/VERSION/`)",
+ type=Path,
+ default=None,
+ )
args = parser.parse_args()
- BUILTMAP = Path("build") / args.oot_version / f"oot-{args.oot_version}.map"
+ if args.color == "never":
+ colors = False
+ elif args.color == "always":
+ colors = True
+ else:
+ # auto
+ if os.getenv("NO_COLOR"):
+ colors = False
+ else:
+ colors = sys.stdout.isatty()
+
+ build_dir: Path = args.build_dir
+ if build_dir is None:
+ build_dir = Path("build") / args.oot_version
+ map_path = build_dir / f"oot-{args.oot_version}.map"
+ elf_path = build_dir / f"oot-{args.oot_version}.elf"
+ else:
+ map_paths = list(build_dir.glob("*.map"))
+ elf_paths = list(build_dir.glob("*.elf"))
+
+ if len(map_paths) > 1:
+ print(f"Found several .map files instead of just one:")
+ print("\n".join(map(str, map_paths)))
+ sys.exit(1)
+ if not map_paths:
+ print("Could not find map file")
+ sys.exit(1)
+
+ if len(elf_paths) > 1:
+ print(f"Found several .elf files instead of just one:")
+ print("\n".join(map(str, elf_paths)))
+ sys.exit(1)
+
+ map_path = map_paths[0]
+ elf_path = elf_paths[0] if elf_paths else None
- mapPath = BUILTMAP
if args.use_expected:
- mapPath = "expected" / BUILTMAP
+ map_path = (
+ Path("expected")
+ / "build"
+ / args.oot_version
+ / f"oot-{args.oot_version}.map"
+ )
+ elf_path = (
+ Path("expected")
+ / "build"
+ / args.oot_version
+ / f"oot-{args.oot_version}.elf"
+ )
+
+ if not map_path.exists():
+ print(f"Could not find map_file at '{map_path}'")
+ sys.exit(1)
+
+ map_file = mapfile_parser.mapfile.MapFile()
+ map_file.readMapFile(map_path)
+
+ if elf_path and elf_path.exists():
+ local_symbols = read_local_symbols_from_mdebug(elf_path)
+ merge_local_symbols(map_file, local_symbols)
+ else:
+ print(
+ "Could not find ELF file"
+ + (f" at '{elf_path}'" if elf_path else "")
+ + ", local symbols will not be available"
+ )
+
+ sym_name = args.symname
+ if sym_name is None:
+ print_map_file(map_file, colors=colors)
+ sys.exit(0)
+
+ infos: list[mapfile_parser.mapfile.FoundSymbolInfo] = []
+ all_possible_files: list[mapfile_parser.mapfile.File] = []
+ try:
+ address = int(sym_name, 0)
+
+ if address >= 0x0100_0000:
+ info, possible_files = map_file.findSymbolByVram(address)
+ if info is not None:
+ infos += [info]
+ all_possible_files += possible_files
+
+ info, possible_files = map_file.findSymbolByVrom(address)
+ if info is not None:
+ infos += [info]
+ all_possible_files += possible_files
+ except ValueError:
+ infos = find_symbols_by_name(map_file, sym_name)
+
+ if not infos:
+ print(f"'{sym_name}' not found in map file '{map_path}'")
+ if all_possible_files:
+ print("But it may be a local symbol of either of the following files:")
+ for f in all_possible_files:
+ print(f" {f.asStr()})")
+ sys.exit(1)
+
+ for info in infos:
+ print(info.getAsStrPlusOffset(sym_name))
- mapfile_parser.frontends.sym_info.doSymInfo(mapPath, args.symname)
if __name__ == "__main__":
- symInfoMain()
+ sym_info_main()
diff --git a/tools/.gitignore b/tools/.gitignore
index 9583c693b9..5345868178 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -1,5 +1,6 @@
# Output files
*.exe
+bin2c
elf2rom
makeromfs
mkdmadata
@@ -9,4 +10,5 @@ reloc_prereq
vtxdis
yaz0
-graphovl/
+ido_recomp/
+egcs/
diff --git a/tools/Makefile b/tools/Makefile
index 3cde87ebc2..7f6eef55a1 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,5 +1,22 @@
-CFLAGS := -Wall -Wextra -pedantic -std=c99 -g -O2
-PROGRAMS := elf2rom makeromfs mkdmadata mkldscript preprocess_pragmas reloc_prereq vtxdis
+CFLAGS := -Wall -Wextra -pedantic -std=gnu99 -g -O2
+PROGRAMS := bin2c elf2rom makeromfs mkdmadata mkldscript preprocess_pragmas reloc_prereq vtxdis
+
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),Linux)
+ DETECTED_OS=linux
+else ifeq ($(UNAME_S),Darwin)
+ DETECTED_OS=macos
+else
+ $(error Unsupported OS: $(UNAME_S))
+endif
+
+IDO_RECOMP_VERSION := v1.2
+IDO_RECOMP_5_3_DIR := ido_recomp/$(DETECTED_OS)/5.3
+IDO_RECOMP_7_1_DIR := ido_recomp/$(DETECTED_OS)/7.1
+
+EGCS_BINUTILS_VERSION := 0.6
+EGCS_GCC_VERSION := 0.7
+EGCS_DIR := egcs/$(DETECTED_OS)
ifeq ($(shell command -v clang >/dev/null 2>&1; echo $$?),0)
CC := clang
@@ -17,23 +34,28 @@ ifneq ($(LLD),0)
CFLAGS += -fuse-ld=lld
endif
-all: $(PROGRAMS)
- $(MAKE) -C ZAPD
+all: $(PROGRAMS) $(IDO_RECOMP_5_3_DIR) $(IDO_RECOMP_7_1_DIR) $(EGCS_DIR)
$(MAKE) -C fado
$(MAKE) -C audio
+ $(MAKE) -C com-plugin
+ $(MAKE) -C assets
clean:
$(RM) $(PROGRAMS) $(addsuffix .exe,$(PROGRAMS))
- $(MAKE) -C ZAPD clean
+ $(RM) -r ido_recomp egcs
$(MAKE) -C fado clean
$(MAKE) -C audio clean
+ $(MAKE) -C com-plugin clean
+ $(MAKE) -C assets clean
distclean: clean
$(MAKE) -C audio distclean
+ $(MAKE) -C assets distclean
.PHONY: all clean distclean
elf2rom_SOURCES := elf2rom.c elf32.c n64chksum.c util.c
+bin2c_SOURCES := bin2c.c
makeromfs_SOURCES := makeromfs.c n64chksum.c util.c
mkdmadata_SOURCES := mkdmadata.c spec.c util.c
mkldscript_SOURCES := mkldscript.c spec.c util.c
@@ -48,3 +70,16 @@ $(1): $($1_SOURCES)
endef
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))
+
+$(IDO_RECOMP_5_3_DIR):
+ mkdir -p $@
+ curl -sL https://github.com/decompals/ido-static-recomp/releases/download/$(IDO_RECOMP_VERSION)/ido-5.3-recomp-$(DETECTED_OS).tar.gz | tar xz -C $@
+
+$(IDO_RECOMP_7_1_DIR):
+ mkdir -p $@
+ curl -sL https://github.com/decompals/ido-static-recomp/releases/download/$(IDO_RECOMP_VERSION)/ido-7.1-recomp-$(DETECTED_OS).tar.gz | tar xz -C $@
+
+$(EGCS_DIR):
+ mkdir -p $@
+ curl -sL https://github.com/decompals/mips-binutils-egcs-2.9.5/releases/download/$(EGCS_BINUTILS_VERSION)/mips-binutils-egcs-2.9.5-$(DETECTED_OS).tar.gz | tar xz -C $@
+ curl -sL https://github.com/decompals/mips-gcc-egcs-2.91.66/releases/download/$(EGCS_GCC_VERSION)/mips-gcc-egcs-2.91.66-$(DETECTED_OS).tar.gz | tar xz -C $@
diff --git a/tools/ZAPD/.clang-format b/tools/ZAPD/.clang-format
deleted file mode 100644
index 5ba1c4a955..0000000000
--- a/tools/ZAPD/.clang-format
+++ /dev/null
@@ -1,84 +0,0 @@
----
-AccessModifierOffset: -4
-AlignAfterOpenBracket: Align
-AlignConsecutiveAssignments: false
-AlignConsecutiveDeclarations: false
-AlignEscapedNewlinesLeft: false
-AlignOperands: true
-AlignTrailingComments: true
-AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortBlocksOnASingleLine: false
-AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: InlineOnly
-AllowShortIfStatementsOnASingleLine: false
-AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterDefinitionReturnType: None
-AlwaysBreakAfterReturnType: None
-AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: true
-BinPackArguments: true
-BinPackParameters: true
-BraceWrapping:
- AfterCaseLabel: true
- AfterClass: true
- AfterControlStatement: true
- AfterEnum: true
- AfterFunction: true
- AfterNamespace: true
- AfterStruct: true
- AfterUnion: true
- BeforeCatch: true
- BeforeElse: true
- IndentBraces: false
-BreakBeforeBinaryOperators: None
-BreakBeforeBraces: Custom
-BreakBeforeTernaryOperators: false
-BreakConstructorInitializersBeforeComma: false
-ColumnLimit: 100
-CommentPragmas: '^ (IWYU pragma:|NOLINT)'
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
-ConstructorInitializerIndentWidth: 4
-ContinuationIndentWidth: 4
-Cpp11BracedListStyle: true
-DerivePointerAlignment: false
-DisableFormat: false
-ForEachMacros: [ ]
-IncludeCategories:
- - Regex: '^<[Ww]indows\.h>$'
- Priority: 1
- - Regex: '^<'
- Priority: 2
- - Regex: '^"'
- Priority: 3
-IndentCaseLabels: false
-IndentWidth: 4
-IndentWrappedFunctionNames: false
-KeepEmptyLinesAtTheStartOfBlocks: false
-MacroBlockBegin: ''
-MacroBlockEnd: ''
-MaxEmptyLinesToKeep: 1
-NamespaceIndentation: None
-PenaltyBreakBeforeFirstCallParameter: 19
-PenaltyBreakComment: 300
-PenaltyBreakFirstLessLess: 120
-PenaltyBreakString: 1000
-PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 60
-PointerAlignment: Left
-ReflowComments: true
-SortIncludes: false
-SpaceAfterCStyleCast: false
-SpaceBeforeAssignmentOperators: true
-SpaceBeforeParens: ControlStatements
-SpaceInEmptyParentheses: false
-SpacesBeforeTrailingComments: 2
-SpacesInAngles: false
-SpacesInContainerLiterals: true
-SpacesInCStyleCastParentheses: false
-SpacesInParentheses: false
-SpacesInSquareBrackets: false
-Standard: Latest
-TabWidth: 4
-UseTab: AlignWithSpaces
-...
-
diff --git a/tools/ZAPD/.github/workflows/main.yml b/tools/ZAPD/.github/workflows/main.yml
deleted file mode 100644
index 604c18c961..0000000000
--- a/tools/ZAPD/.github/workflows/main.yml
+++ /dev/null
@@ -1,98 +0,0 @@
-name: Build ZAPD
-
-on:
- push:
- pull_request:
- branches:
- - master
-
-jobs:
- build:
- runs-on: self-hosted-runner
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
-
- - name: Build ZAPD
- run: make -j WERROR=1
-
- - name: Checkout Repos
- run: echo "Checkout Repos"
-
- - name: Checkout oot
- run: |
- cd ../
- rm -rf oot/
- git clone https://github.com/zeldaret/oot.git
- cd oot
- echo $(pwd)
- git submodule update --init --recursive
-
- - name: Checkout mm
- run: |
- cd ../
- rm -rf mm/
- git clone https://github.com/zeldaret/mm.git
- cd mm
- echo $(pwd)
-
- - name: Set up repos
- run: echo "Set up repos"
-
- - name: Setup OOT
- run: |
- cd ../
- cd oot
- echo $(pwd)
- mkdir -p baseroms/gc-eu-mq-dbg/segments
- cp ~/baserom_original.z64 ./baseroms/gc-eu-mq-dbg/baserom.z64
- cd tools
- rm -rf ZAPD/
- ln -s ../../ZAPD
- cd ../
- make -j $(nproc) setup
-
- - name: Setup MM
- run: |
- cd ../
- cd mm
- echo $(pwd)
- python3 -m venv .mm-env
- source .mm-env/bin/activate
- python3 -m pip install -r requirements.txt
- cp ~/baserom.mm.us.rev1.z64 ./baserom.mm.us.rev1.z64
- cd tools
- rm -rf ZAPD/
- ln -s ../../ZAPD
- cd ../
- make -C tools -j
- python3 tools/fixbaserom.py
- python3 tools/extract_baserom.py
- python3 tools/decompress_yars.py
- python3 extract_assets.py -j $(nproc)
-
- - name: Build Repos
- run: echo "Build Repos"
-
- - name: Build oot
- run: |
- cd ../
- cd oot
- echo $(pwd)
- make venv
- make -j
-
- - name: Build mm
- run: |
- cd ../
- cd mm
- echo $(pwd)
- python3 -m venv .mm-env
- source .mm-env/bin/activate
- python3 -m pip install -r requirements.txt
- make -j disasm
- make -j
-
- - name: Clean workspace
- run: git clean -fdX
diff --git a/tools/ZAPD/.gitignore b/tools/ZAPD/.gitignore
deleted file mode 100644
index 68c502e36a..0000000000
--- a/tools/ZAPD/.gitignore
+++ /dev/null
@@ -1,341 +0,0 @@
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-##
-## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
-
-# User-specific files
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-x64/
-x86/
-bld/
-[Bb]in/
-[Oo]bj/
-[Ll]og/
-
-# Visual Studio 2015/2017 cache/options directory
-.vs/
-# Uncomment if you have tasks that create the project's static files in wwwroot
-#wwwroot/
-
-# Visual Studio 2017 auto generated files
-Generated\ Files/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUNIT
-*.VisualState.xml
-TestResult.xml
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-# Benchmark Results
-BenchmarkDotNet.Artifacts/
-
-# .NET Core
-project.lock.json
-project.fragment.lock.json
-artifacts/
-**/Properties/launchSettings.json
-
-# StyleCop
-StyleCopReport.xml
-
-# Files built by Visual Studio
-*_i.c
-*_p.c
-*_i.h
-*.ilk
-*.meta
-*.obj
-*.iobj
-*.pch
-*.pdb
-*.ipdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*.log
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opendb
-*.opensdf
-*.sdf
-*.cachefile
-*.VC.db
-*.VC.VC.opendb
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-*.sap
-
-# Visual Studio Trace Files
-*.e2e
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# JustCode is a .NET coding add-in
-.JustCode
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# AxoCover is a Code Coverage Tool
-.axoCover/*
-!.axoCover/settings.json
-
-# Visual Studio code coverage results
-*.coverage
-*.coveragexml
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-nCrunchTemp_*
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# Note: Comment the next line if you want to checkin your web deploy settings,
-# but database connection strings (with potential passwords) will be unencrypted
-*.pubxml
-*.publishproj
-
-# Microsoft Azure Web App publish settings. Comment the next line if you want to
-# checkin your Azure Web App publish settings, but sensitive information contained
-# in these scripts will be unencrypted
-PublishScripts/
-
-# NuGet Packages
-*.nupkg
-# The packages folder can be ignored because of Package Restore
-**/[Pp]ackages/*
-# except build/, which is used as an MSBuild target.
-!**/[Pp]ackages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/[Pp]ackages/repositories.config
-# NuGet v3's project.json files produces more ignorable files
-*.nuget.props
-*.nuget.targets
-
-# Microsoft Azure Build Output
-csx/
-*.build.csdef
-
-# Microsoft Azure Emulator
-ecf/
-rcf/
-
-# Windows Store app package directories and files
-AppPackages/
-BundleArtifacts/
-Package.StoreAssociation.xml
-_pkginfo.txt
-*.appx
-
-# Visual Studio cache files
-# files ending in .cache can be ignored
-*.[Cc]ache
-# but keep track of directories ending in .cache
-!*.[Cc]ache/
-
-# Others
-ClientBin/
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.jfm
-*.pfx
-*.publishsettings
-orleans.codegen.cs
-
-# Including strong name files can present a security risk
-# (https://github.com/github/gitignore/pull/2483#issue-259490424)
-#*.snk
-
-# Since there are multiple workflows, uncomment next line to ignore bower_components
-# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
-#bower_components/
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-ServiceFabricBackup/
-*.rptproj.bak
-
-# SQL Server files
-*.mdf
-*.ldf
-*.ndf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-*.rptproj.rsuser
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# GhostDoc plugin setting file
-*.GhostDoc.xml
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-node_modules/
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
-
-# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
-*.vbw
-
-# Visual Studio LightSwitch build output
-**/*.HTMLClient/GeneratedArtifacts
-**/*.DesktopClient/GeneratedArtifacts
-**/*.DesktopClient/ModelManifest.xml
-**/*.Server/GeneratedArtifacts
-**/*.Server/ModelManifest.xml
-_Pvt_Extensions
-
-# Paket dependency manager
-.paket/paket.exe
-paket-files/
-
-# FAKE - F# Make
-.fake/
-
-# JetBrains Rider
-.idea/
-*.sln.iml
-
-# CodeRush
-.cr/
-
-# Python Tools for Visual Studio (PTVS)
-__pycache__/
-*.pyc
-
-# Cake - Uncomment if you are using it
-# tools/**
-# !tools/packages.config
-
-# Tabs Studio
-*.tss
-
-# Telerik's JustMock configuration file
-*.jmconfig
-
-# BizTalk build output
-*.btp.cs
-*.btm.cs
-*.odx.cs
-*.xsd.cs
-
-# OpenCover UI analysis results
-OpenCover/
-
-# Azure Stream Analytics local run output
-ASALocalRun/
-
-# MSBuild Binary and Structured Log
-*.binlog
-
-# NVidia Nsight GPU debugger configuration file
-*.nvuser
-
-# MFractors (Xamarin productivity tool) working folder
-.mfractor/
-
-*.out
-*.o
-*.d
-lib/libgfxd/libgfxd.a
-ExporterTest/ExporterTest.a
-ZAPDUtils/ZAPDUtils.a
-.vscode/
-build/
-ZAPDUtils/build/
-ZAPD/BuildInfo.h
diff --git a/tools/ZAPD/.gitrepo b/tools/ZAPD/.gitrepo
deleted file mode 100644
index 35d0134910..0000000000
--- a/tools/ZAPD/.gitrepo
+++ /dev/null
@@ -1,12 +0,0 @@
-; DO NOT EDIT (unless you know what you are doing)
-;
-; This subdirectory is a git "subrepo", and this file is maintained by the
-; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
-;
-[subrepo]
- remote = https://github.com/zeldaret/ZAPD.git
- branch = master
- commit = 0285e11f0a5937f60db023bfe5db273f2223fcf4
- parent = afd82230e1bd6e043eabe613f5b31f6e96f0f88c
- method = merge
- cmdver = 0.4.6
diff --git a/tools/ZAPD/ExporterTest/CollisionExporter.cpp b/tools/ZAPD/ExporterTest/CollisionExporter.cpp
deleted file mode 100644
index 6431a4593c..0000000000
--- a/tools/ZAPD/ExporterTest/CollisionExporter.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "CollisionExporter.h"
-
-void ExporterExample_Collision::Save(ZResource* res, [[maybe_unused]] fs::path outPath,
- BinaryWriter* writer)
-{
- ZCollisionHeader* col = (ZCollisionHeader*)res;
-
- writer->Write(col->absMinX);
- writer->Write(col->absMinY);
- writer->Write(col->absMinZ);
-
- writer->Write(col->absMaxX);
- writer->Write(col->absMaxY);
- writer->Write(col->absMaxZ);
-
- writer->Write(col->numVerts);
- writer->Write(col->vtxAddress);
-
- writer->Write(col->numPolygons);
- writer->Write(col->polyAddress);
- writer->Write(col->polyTypeDefAddress);
- writer->Write(col->camDataAddress);
-
- writer->Write(col->numWaterBoxes);
- writer->Write(col->waterBoxAddress);
-
- writer->Write(col->vtxSegmentOffset);
- writer->Write(col->polySegmentOffset);
- writer->Write(col->polyTypeDefSegmentOffset);
- writer->Write(col->camDataSegmentOffset);
- writer->Write(col->waterBoxSegmentOffset);
-
- uint32_t oldOffset = writer->GetBaseAddress();
-
- writer->Seek(col->vtxSegmentOffset, SeekOffsetType::Start);
-
- for (uint16_t i = 0; i < col->vertices.size(); i++)
- {
- for (uint32_t j = 0; j < col->vertices[i].dimensions; j++)
- {
- writer->Write(col->vertices[i].scalars[j].scalarData.s16);
- }
- }
-
- writer->Seek(col->polySegmentOffset, SeekOffsetType::Start);
-
- for (uint16_t i = 0; i < col->polygons.size(); i++)
- {
- writer->Write(col->polygons[i].type);
- writer->Write(col->polygons[i].vtxA);
- writer->Write(col->polygons[i].vtxB);
- writer->Write(col->polygons[i].vtxC);
- writer->Write(col->polygons[i].normX);
- writer->Write(col->polygons[i].normY);
- writer->Write(col->polygons[i].normZ);
- writer->Write(col->polygons[i].dist);
- }
-
- writer->Seek(col->polyTypeDefSegmentOffset, SeekOffsetType::Start);
-
- for (const auto& poly : col->polygonTypes)
- {
- writer->Write(poly.data[0]);
- writer->Write(poly.data[1]);
- }
- writer->Seek(col->camDataSegmentOffset, SeekOffsetType::Start);
-
- for (auto entry : col->camData->entries)
- {
- writer->Write(entry.cameraSType);
- writer->Write(entry.numData);
- writer->Write(entry.cameraPosDataSeg);
- }
-
- writer->Seek(oldOffset, SeekOffsetType::Start);
-}
diff --git a/tools/ZAPD/ExporterTest/CollisionExporter.h b/tools/ZAPD/ExporterTest/CollisionExporter.h
deleted file mode 100644
index 5f48e6557e..0000000000
--- a/tools/ZAPD/ExporterTest/CollisionExporter.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include "ZCollision.h"
-#include "ZResource.h"
-
-class ExporterExample_Collision : public ZResourceExporter
-{
-public:
- void Save(ZResource* res, fs::path outPath, BinaryWriter* writer) override;
-};
\ No newline at end of file
diff --git a/tools/ZAPD/ExporterTest/ExporterTest.vcxproj b/tools/ZAPD/ExporterTest/ExporterTest.vcxproj
deleted file mode 100644
index 341f72ceb1..0000000000
--- a/tools/ZAPD/ExporterTest/ExporterTest.vcxproj
+++ /dev/null
@@ -1,160 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
- Debug
- x64
-
-
- Release
- x64
-
-
-
- 16.0
- Win32Proj
- {65608eb0-1a47-45ad-ab66-192fb64c762c}
- ExporterTest
- 10.0
- ExporterExample
-
-
-
- Application
- true
- v142
- Unicode
-
-
- Application
- false
- v143
- true
- Unicode
-
-
- StaticLibrary
- true
- v142
- Unicode
-
-
- Application
- false
- v143
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
- false
-
-
- true
- $(ProjectDir)..\ZAPD\;$(ProjectDir)..\ZAPDUtils;$(ProjectDir)..\lib\tinyxml2;$(ProjectDir)..\lib\libgfxd;$(ProjectDir)..\lib\elfio;$(ProjectDir)..\lib\stb;$(ProjectDir);$(IncludePath)
-
-
- false
-
-
-
- Level3
- true
- WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
-
-
-
-
- Level3
- true
- true
- true
- WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
- true
- true
-
-
-
-
- Level3
- true
- _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- true
- stdcpp17
- stdc11
- MultiThreadedDebug
-
-
- Console
- true
-
-
-
-
- Level3
- true
- true
- true
- NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
- true
-
-
- Console
- true
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tools/ZAPD/ExporterTest/ExporterTest.vcxproj.filters b/tools/ZAPD/ExporterTest/ExporterTest.vcxproj.filters
deleted file mode 100644
index 166f563a17..0000000000
--- a/tools/ZAPD/ExporterTest/ExporterTest.vcxproj.filters
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
-
-
- {93995380-89BD-4b04-88EB-625FBE52EBFB}
- h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
-
-
- {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
- rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
-
-
-
-
- Header Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
\ No newline at end of file
diff --git a/tools/ZAPD/ExporterTest/Main.cpp b/tools/ZAPD/ExporterTest/Main.cpp
deleted file mode 100644
index 07fdbeeced..0000000000
--- a/tools/ZAPD/ExporterTest/Main.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-#include "CollisionExporter.h"
-#include "Globals.h"
-#include "RoomExporter.h"
-#include "TextureExporter.h"
-
-enum class ExporterFileMode
-{
- ModeExample1 = (int)ZFileMode::Custom + 1,
- ModeExample2 = (int)ZFileMode::Custom + 2,
- ModeExample3 = (int)ZFileMode::Custom + 3,
-};
-
-static void ExporterParseFileMode(const std::string& buildMode, ZFileMode& fileMode)
-{
- if (buildMode == "me1")
- fileMode = (ZFileMode)ExporterFileMode::ModeExample1;
- else if (buildMode == "me2")
- fileMode = (ZFileMode)ExporterFileMode::ModeExample2;
- else if (buildMode == "me3")
- fileMode = (ZFileMode)ExporterFileMode::ModeExample3;
-}
-
-static void ExporterParseArgs([[maybe_unused]] int argc, char* argv[], int& i)
-{
- std::string arg = argv[i];
-
- if (arg == "--do-x")
- {
- }
- else if (arg == "--do-y")
- {
- }
-}
-
-static bool ExporterProcessFileMode(ZFileMode fileMode)
-{
- // Do whatever work is associated with these custom file modes...
- // Return true to indicate one of our own file modes is being processed
- if (fileMode == (ZFileMode)ExporterFileMode::ModeExample1)
- return true;
- else if (fileMode == (ZFileMode)ExporterFileMode::ModeExample2)
- return true;
- else if (fileMode == (ZFileMode)ExporterFileMode::ModeExample3)
- return true;
-
- return false;
-}
-
-static void ExporterFileBegin(ZFile* file)
-{
- printf("ExporterFileBegin() called on ZFile %s.\n", file->GetName().c_str());
-}
-
-static void ExporterFileEnd(ZFile* file)
-{
- printf("ExporterFileEnd() called on ZFile %s.\n", file->GetName().c_str());
-}
-
-static void ImportExporters()
-{
- // In this example we set up a new exporter called "EXAMPLE".
- // By running ZAPD with the argument -se EXAMPLE, we tell it that we want to use this exporter
- // for our resources.
- ExporterSet* exporterSet = new ExporterSet();
- exporterSet->processFileModeFunc = ExporterProcessFileMode;
- exporterSet->parseFileModeFunc = ExporterParseFileMode;
- exporterSet->parseArgsFunc = ExporterParseArgs;
- exporterSet->beginFileFunc = ExporterFileBegin;
- exporterSet->endFileFunc = ExporterFileEnd;
- exporterSet->exporters[ZResourceType::Texture] = new ExporterExample_Texture();
- exporterSet->exporters[ZResourceType::Room] = new ExporterExample_Room();
- exporterSet->exporters[ZResourceType::CollisionHeader] = new ExporterExample_Collision();
-
- Globals::AddExporter("EXAMPLE", exporterSet);
-}
-
-// When ZAPD starts up, it will automatically call the below function, which in turn sets up our
-// exporters.
-REGISTER_EXPORTER(ImportExporters);
diff --git a/tools/ZAPD/ExporterTest/Makefile b/tools/ZAPD/ExporterTest/Makefile
deleted file mode 100644
index 98e0475254..0000000000
--- a/tools/ZAPD/ExporterTest/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-# Only used for standalone compilation, usually inherits these from the main makefile
-CXXFLAGS ?= -Wall -Wextra -O2 -g -std=c++17
-
-SRC_DIRS := $(shell find . -type d -not -path "*build*")
-CPP_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp))
-H_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.h))
-
-O_FILES := $(foreach f,$(CPP_FILES:.cpp=.o),build/$f)
-LIB := ExporterTest.a
-
-# create build directories
-$(shell mkdir -p $(foreach dir,$(SRC_DIRS),build/$(dir)))
-
-all: $(LIB)
-
-clean:
- rm -rf build $(LIB)
-
-format:
- clang-format-14 -i $(CPP_FILES) $(H_FILES)
-
-.PHONY: all clean format
-
-build/%.o: %.cpp
- $(CXX) $(CXXFLAGS) $(OPTFLAGS) -I ./ -I ../ZAPD -I ../ZAPDUtils -I ../lib/tinyxml2 -c $(OUTPUT_OPTION) $<
-
-$(LIB): $(O_FILES)
- $(AR) rcs $@ $^
diff --git a/tools/ZAPD/ExporterTest/RoomExporter.cpp b/tools/ZAPD/ExporterTest/RoomExporter.cpp
deleted file mode 100644
index 4cc06b76f5..0000000000
--- a/tools/ZAPD/ExporterTest/RoomExporter.cpp
+++ /dev/null
@@ -1,372 +0,0 @@
-#include "RoomExporter.h"
-#include "CollisionExporter.h"
-#include "Utils/BinaryWriter.h"
-#include "Utils/File.h"
-#include "Utils/MemoryStream.h"
-#include "ZRoom/Commands/SetCameraSettings.h"
-#include "ZRoom/Commands/SetCollisionHeader.h"
-#include "ZRoom/Commands/SetCsCamera.h"
-#include "ZRoom/Commands/SetEchoSettings.h"
-#include "ZRoom/Commands/SetEntranceList.h"
-#include "ZRoom/Commands/SetLightingSettings.h"
-#include "ZRoom/Commands/SetMesh.h"
-#include "ZRoom/Commands/SetRoomBehavior.h"
-#include "ZRoom/Commands/SetRoomList.h"
-#include "ZRoom/Commands/SetSkyboxModifier.h"
-#include "ZRoom/Commands/SetSkyboxSettings.h"
-#include "ZRoom/Commands/SetSoundSettings.h"
-#include "ZRoom/Commands/SetSpecialObjects.h"
-#include "ZRoom/Commands/SetStartPositionList.h"
-#include "ZRoom/Commands/SetTimeSettings.h"
-#include "ZRoom/Commands/SetWind.h"
-
-void ExporterExample_Room::Save(ZResource* res, fs::path outPath, BinaryWriter* writer)
-{
- ZRoom* room = dynamic_cast(res);
-
- // MemoryStream* memStream = new MemoryStream();
- // BinaryWriter* writer = new BinaryWriter(memStream);
-
- for (size_t i = 0; i < room->commands.size() * 8; i++)
- writer->Write((uint8_t)0);
-
- for (size_t i = 0; i < room->commands.size(); i++)
- {
- ZRoomCommand* cmd = room->commands[i];
-
- writer->Seek(i * 8, SeekOffsetType::Start);
-
- writer->Write((uint8_t)cmd->cmdID);
-
- switch (cmd->cmdID)
- {
- case RoomCommand::SetWind:
- {
- SetWind* cmdSetWind = (SetWind*)cmd;
-
- writer->Write((uint8_t)0); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
-
- writer->Write(cmdSetWind->windWest); // 0x04
- writer->Write(cmdSetWind->windVertical); // 0x05
- writer->Write(cmdSetWind->windSouth); // 0x06
- writer->Write(cmdSetWind->clothFlappingStrength); // 0x07
- }
- break;
- case RoomCommand::SetTimeSettings:
- {
- SetTimeSettings* cmdTime = (SetTimeSettings*)cmd;
-
- writer->Write((uint8_t)0); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
-
- writer->Write(cmdTime->hour); // 0x04
- writer->Write(cmdTime->min); // 0x05
- writer->Write(cmdTime->unk); // 0x06
- writer->Write((uint8_t)0); // 0x07
- }
- break;
- case RoomCommand::SetSkyboxModifier:
- {
- SetSkyboxModifier* cmdSkybox = (SetSkyboxModifier*)cmd;
-
- writer->Write((uint8_t)0); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
-
- writer->Write(cmdSkybox->disableSky); // 0x04
- writer->Write(cmdSkybox->disableSunMoon); // 0x05
- writer->Write((uint8_t)0); // 0x06
- writer->Write((uint8_t)0); // 0x07
- }
- break;
- case RoomCommand::SetEchoSettings:
- {
- SetEchoSettings* cmdEcho = (SetEchoSettings*)cmd;
-
- writer->Write((uint8_t)0); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write((uint8_t)0); // 0x04
- writer->Write((uint8_t)0); // 0x05
- writer->Write((uint8_t)0); // 0x06
- writer->Write((uint8_t)cmdEcho->echo); // 0x07
- }
- break;
- case RoomCommand::SetSoundSettings:
- {
- SetSoundSettings* cmdSound = (SetSoundSettings*)cmd;
-
- writer->Write((uint8_t)cmdSound->reverb); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write((uint8_t)0); // 0x04
- writer->Write((uint8_t)0); // 0x05
-
- writer->Write(cmdSound->nightTimeSFX); // 0x06
- writer->Write(cmdSound->musicSequence); // 0x07
- }
- break;
- case RoomCommand::SetSkyboxSettings:
- {
- SetSkyboxSettings* cmdSkybox = (SetSkyboxSettings*)cmd;
-
- writer->Write((uint8_t)cmdSkybox->unk1); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write((uint8_t)cmdSkybox->skyboxNumber); // 0x04
- writer->Write((uint8_t)cmdSkybox->cloudsType); // 0x05
- writer->Write((uint8_t)cmdSkybox->isIndoors); // 0x06
- }
- break;
- case RoomCommand::SetRoomBehavior:
- {
- SetRoomBehavior* cmdRoom = (SetRoomBehavior*)cmd;
-
- writer->Write((uint8_t)cmdRoom->gameplayFlags); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write(cmdRoom->gameplayFlags2); // 0x04
- }
- break;
- case RoomCommand::SetCsCamera:
- {
- SetCsCamera* cmdCsCam = (SetCsCamera*)cmd;
-
- writer->Write((uint8_t)cmdCsCam->cameras.size()); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
-
- writer->Write(cmdCsCam->segmentOffset); // 0x04
- }
- break;
- case RoomCommand::SetMesh:
- {
- SetMesh* cmdMesh = (SetMesh*)cmd;
-
- int baseStreamEnd = writer->GetStream().get()->GetLength();
-
- writer->Write((uint8_t)cmdMesh->data); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
-
- writer->Write(baseStreamEnd); // 0x04
-
- uint32_t oldOffset = writer->GetBaseAddress();
- writer->Seek(baseStreamEnd, SeekOffsetType::Start);
-
- // TODO: NOT DONE
-
- writer->Write(cmdMesh->meshHeaderType);
-
- if (cmdMesh->meshHeaderType == 0)
- {
- // writer->Write(cmdMesh->)
- }
- else if (cmdMesh->meshHeaderType == 1)
- {
- }
- else if (cmdMesh->meshHeaderType == 2)
- {
- }
-
- writer->Seek(oldOffset, SeekOffsetType::Start);
- }
- break;
- case RoomCommand::SetCameraSettings:
- {
- SetCameraSettings* cmdCam = (SetCameraSettings*)cmd;
-
- writer->Write((uint8_t)cmdCam->cameraMovement); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write(cmdCam->mapHighlight); // 0x04
- }
- break;
- case RoomCommand::SetLightingSettings:
- {
- SetLightingSettings* cmdLight = (SetLightingSettings*)cmd;
-
- writer->Write((uint8_t)cmdLight->settings.size()); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write(cmdLight->segmentOffset); // 0x04
-
- uint32_t oldOffset = writer->GetBaseAddress();
- writer->Seek(cmdLight->segmentOffset, SeekOffsetType::Start);
-
- for (LightingSettings setting : cmdLight->settings)
- {
- writer->Write(setting.ambientClrR);
- writer->Write(setting.ambientClrG);
- writer->Write(setting.ambientClrB);
-
- writer->Write(setting.diffuseClrA_R);
- writer->Write(setting.diffuseClrA_G);
- writer->Write(setting.diffuseClrA_B);
-
- writer->Write(setting.diffuseDirA_X);
- writer->Write(setting.diffuseDirA_Y);
- writer->Write(setting.diffuseDirA_Z);
-
- writer->Write(setting.diffuseClrB_R);
- writer->Write(setting.diffuseClrB_G);
- writer->Write(setting.diffuseClrB_B);
-
- writer->Write(setting.diffuseDirB_X);
- writer->Write(setting.diffuseDirB_Y);
- writer->Write(setting.diffuseDirB_Z);
-
- writer->Write(setting.fogClrR);
- writer->Write(setting.fogClrG);
- writer->Write(setting.fogClrB);
-
- writer->Write(setting.unk);
- writer->Write(setting.drawDistance);
- }
-
- writer->Seek(oldOffset, SeekOffsetType::Start);
- }
- break;
- case RoomCommand::SetRoomList:
- {
- SetRoomList* cmdRoom = (SetRoomList*)cmd;
-
- writer->Write((uint8_t)cmdRoom->romfile->rooms.size()); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
-
- auto baseStreamEnd = writer->GetLength();
- writer->Write(baseStreamEnd); // 0x04
-
- uint32_t oldOffset = writer->GetBaseAddress();
- writer->Seek(baseStreamEnd, SeekOffsetType::Start);
-
- for (const auto& entry : cmdRoom->romfile->rooms)
- {
- writer->Write(entry.virtualAddressStart);
- writer->Write(entry.virtualAddressEnd);
- }
-
- writer->Seek(oldOffset, SeekOffsetType::Start);
- }
- break;
- case RoomCommand::SetCollisionHeader:
- {
- SetCollisionHeader* cmdCollHeader = (SetCollisionHeader*)cmd;
-
- int streamEnd = writer->GetStream().get()->GetLength();
-
- writer->Write((uint8_t)0); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write(streamEnd); // 0x04
-
- // TODO: NOT DONE
-
- uint32_t oldOffset = writer->GetBaseAddress();
- writer->Seek(streamEnd, SeekOffsetType::Start);
-
- ExporterExample_Collision colExp = ExporterExample_Collision();
-
- colExp.Save(cmdCollHeader->collisionHeader, outPath, writer);
-
- writer->Seek(oldOffset, SeekOffsetType::Start);
- }
- break;
- case RoomCommand::SetEntranceList:
- {
- SetEntranceList* cmdEntrance = (SetEntranceList*)cmd;
-
- uint32_t baseStreamEnd = writer->GetStream().get()->GetLength();
-
- writer->Write((uint8_t)0); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write(baseStreamEnd); // 0x04
-
- uint32_t oldOffset = writer->GetBaseAddress();
- writer->Seek(baseStreamEnd, SeekOffsetType::Start);
-
- for (Spawn entry : cmdEntrance->entrances)
- {
- writer->Write((uint8_t)entry.startPositionIndex);
- writer->Write((uint8_t)entry.roomToLoad);
- }
-
- writer->Seek(oldOffset, SeekOffsetType::Start);
- }
- break;
- case RoomCommand::SetSpecialObjects:
- {
- SetSpecialObjects* cmdSpecObj = (SetSpecialObjects*)cmd;
-
- writer->Write((uint8_t)cmdSpecObj->elfMessage); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write((uint8_t)0); // 0x04
- writer->Write((uint8_t)0); // 0x05
- writer->Write((uint16_t)cmdSpecObj->globalObject); // 0x06
- }
- break;
- case RoomCommand::SetStartPositionList:
- {
- SetStartPositionList* cmdStartPos = (SetStartPositionList*)cmd;
-
- uint32_t baseStreamEnd = writer->GetStream().get()->GetLength();
-
- writer->Write((uint8_t)cmdStartPos->actors.size()); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write(baseStreamEnd); // 0x04
-
- uint32_t oldOffset = writer->GetBaseAddress();
- writer->Seek(baseStreamEnd, SeekOffsetType::Start);
-
- for (ActorSpawnEntry entry : cmdStartPos->actors)
- {
- writer->Write(entry.actorNum);
- writer->Write(entry.posX);
- writer->Write(entry.posY);
- writer->Write(entry.posZ);
- writer->Write(entry.rotX);
- writer->Write(entry.rotY);
- writer->Write(entry.rotZ);
- writer->Write(entry.params);
- }
-
- writer->Seek(oldOffset, SeekOffsetType::Start);
- }
- break;
- case RoomCommand::EndMarker:
- {
- writer->Write((uint8_t)0); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write((uint8_t)0); // 0x04
- writer->Write((uint8_t)0); // 0x05
- writer->Write((uint8_t)0); // 0x06
- writer->Write((uint8_t)0); // 0x07
- }
- break;
- default:
- printf("UNIMPLEMENTED COMMAND: %i\n", (int)cmd->cmdID);
-
- writer->Write((uint8_t)0); // 0x01
- writer->Write((uint8_t)0); // 0x02
- writer->Write((uint8_t)0); // 0x03
- writer->Write((uint8_t)0); // 0x04
- writer->Write((uint8_t)0); // 0x05
- writer->Write((uint8_t)0); // 0x06
- writer->Write((uint8_t)0); // 0x07
-
- break;
- }
- }
-
- // writer->Close();
- // File::WriteAllBytes(StringHelper::Sprintf("%s", res->GetName().c_str()),
- // memStream->ToVector());
-}
diff --git a/tools/ZAPD/ExporterTest/RoomExporter.h b/tools/ZAPD/ExporterTest/RoomExporter.h
deleted file mode 100644
index ee531dc87b..0000000000
--- a/tools/ZAPD/ExporterTest/RoomExporter.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include "ZResource.h"
-#include "ZRoom/ZRoom.h"
-
-class ExporterExample_Room : public ZResourceExporter
-{
-public:
- void Save(ZResource* res, fs::path outPath, BinaryWriter* writer) override;
-};
\ No newline at end of file
diff --git a/tools/ZAPD/ExporterTest/TextureExporter.cpp b/tools/ZAPD/ExporterTest/TextureExporter.cpp
deleted file mode 100644
index 6488bed3a2..0000000000
--- a/tools/ZAPD/ExporterTest/TextureExporter.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "TextureExporter.h"
-#include "../ZAPD/ZFile.h"
-
-void ExporterExample_Texture::Save(ZResource* res, [[maybe_unused]] fs::path outPath,
- BinaryWriter* writer)
-{
- ZTexture* tex = (ZTexture*)res;
-
- auto data = tex->parent->GetRawData();
-
- for (offset_t i = tex->GetRawDataIndex(); i < tex->GetRawDataIndex() + tex->GetRawDataSize();
- i++)
- writer->Write(data[i]);
-}
diff --git a/tools/ZAPD/ExporterTest/TextureExporter.h b/tools/ZAPD/ExporterTest/TextureExporter.h
deleted file mode 100644
index 41c4e79be2..0000000000
--- a/tools/ZAPD/ExporterTest/TextureExporter.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#pragma once
-
-#include "Utils/BinaryWriter.h"
-#include "ZResource.h"
-#include "ZTexture.h"
-
-class ExporterExample_Texture : public ZResourceExporter
-{
-public:
- void Save(ZResource* res, fs::path outPath, BinaryWriter* writer) override;
-};
\ No newline at end of file
diff --git a/tools/ZAPD/Jenkinsfile b/tools/ZAPD/Jenkinsfile
deleted file mode 100644
index 48535a51cf..0000000000
--- a/tools/ZAPD/Jenkinsfile
+++ /dev/null
@@ -1,106 +0,0 @@
-pipeline {
- agent {
- label 'ZAPD'
- }
-
- stages {
- // Non-parallel ZAPD stage
- stage('Build ZAPD') {
- steps {
- sh 'make -j WERROR=1'
- }
- }
-
- // CHECKOUT THE REPOS
- stage('Checkout Repos') {
- parallel {
- stage('Checkout oot') {
- steps {
- dir('oot') {
- git url: 'https://github.com/zeldaret/oot.git'
- }
- }
- }
-
- stage('Checkout mm') {
- steps{
- dir('mm') {
- git url: 'https://github.com/zeldaret/mm.git'
- }
- }
- }
- }
- }
-
- // SETUP THE REPOS
- stage('Set up repos') {
- parallel {
- stage('Setup OOT') {
- steps {
- dir('oot') {
- sh 'cp /usr/local/etc/roms/baserom_oot.z64 baserom_original.z64'
-
- // Identical to `make setup` except for copying our newer ZAPD.out into oot
- sh 'git submodule update --init --recursive'
- sh 'make -C tools'
- sh 'cp ../ZAPD.out tools/ZAPD/'
- sh 'python3 fixbaserom.py'
- sh 'python3 extract_baserom.py'
- sh 'python3 extract_assets.py'
- }
- }
- }
-
- stage('Setup MM') {
- steps {
- dir('mm') {
- sh 'cp /usr/local/etc/roms/mm.us.rev1.z64 baserom.mm.us.rev1.z64'
-
- // Identical to `make setup` except for copying our newer ZAPD.out into mm
- sh 'make -C tools'
- sh 'cp ../ZAPD.out tools/ZAPD/'
- sh 'python3 tools/fixbaserom.py'
- sh 'python3 tools/extract_baserom.py'
- sh 'python3 extract_assets.py -j $(nproc)'
- }
- }
- }
- }
- }
-
- // INSTALL PYTHON DEPENDENCIES, currently MM only
- stage('Install Python dependencies') {
- steps {
- dir('mm') {
- sh 'python3 -m pip install -r requirements.txt'
- }
- }
- }
-
- // BUILD THE REPOS
- stage('Build repos') {
- parallel {
- stage('Build oot') {
- steps {
- dir('oot') {
- sh 'make -j'
- }
- }
- }
- stage('Build mm') {
- steps {
- dir('mm') {
- sh 'make -j disasm'
- sh 'make -j'
- }
- }
- }
- }
- }
- }
- post {
- always {
- cleanWs()
- }
- }
-}
diff --git a/tools/ZAPD/Makefile b/tools/ZAPD/Makefile
deleted file mode 100644
index 36331937a7..0000000000
--- a/tools/ZAPD/Makefile
+++ /dev/null
@@ -1,151 +0,0 @@
-# use variables in submakes
-export
-OPTIMIZATION_ON ?= 1
-ASAN ?= 0
-DEPRECATION_ON ?= 1
-DEBUG ?= 0
-COPYCHECK_ARGS ?=
-LLD ?= 0
-WERROR ?= 0
-
-# On MacOS 10.14, use boost::filesystem, because
-# the system doesn't supply std::filesystem.
-ifneq ($(OS),Windows_NT)
- ifeq ($(shell uname -s),Darwin)
- MACOS_VERSION := $(shell sw_vers -productVersion | cut -d . -f 1,2)
- ifeq ($(MACOS_VERSION),10.14)
- USE_BOOST_FS ?= 1
- endif
- endif
-endif
-USE_BOOST_FS ?= 0
-
-# Use clang++ if available, else use g++
-ifeq ($(shell command -v clang++ >/dev/null 2>&1; echo $$?),0)
- CXX := clang++
-else
- CXX := g++
-endif
-
-INC := -I ZAPD -I lib/libgfxd -I lib/tinyxml2 -I ZAPDUtils
-CXXFLAGS := -fpic -std=c++17 -Wall -Wextra -fno-omit-frame-pointer
-OPTFLAGS :=
-
-ifneq ($(DEBUG),0)
- OPTIMIZATION_ON = 0
- CXXFLAGS += -g3 -DDEVELOPMENT -D_DEBUG
- COPYCHECK_ARGS += --devel
- DEPRECATION_ON = 0
-endif
-
-ifneq ($(WERROR),0)
- CXXFLAGS += -Werror
-endif
-
-ifeq ($(OPTIMIZATION_ON),0)
- OPTFLAGS := -O0
-else
- OPTFLAGS := -O2
-endif
-
-ifneq ($(ASAN),0)
- CXXFLAGS += -fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=undefined
-endif
-ifneq ($(DEPRECATION_ON),0)
- CXXFLAGS += -DDEPRECATION_ON
-endif
-# CXXFLAGS += -DTEXTURE_DEBUG
-
-LDFLAGS := -lm -ldl -lpng
-
-ifneq ($(USE_BOOST_FS),0)
- CXXFLAGS += -DUSE_BOOST_FS
- LDFLAGS += -lboost_filesystem
-endif
-
-# Use LLD if available. Set LLD=0 to not use it
-ifeq ($(shell command -v ld.lld >/dev/null 2>&1; echo $$?),0)
- LLD := 1
-endif
-
-ifneq ($(LLD),0)
- LDFLAGS += -fuse-ld=lld
-endif
-
-UNAME := $(shell uname)
-UNAMEM := $(shell uname -m)
-ifneq ($(UNAME), Darwin)
- LDFLAGS += -Wl,-export-dynamic -lstdc++fs
- EXPORTERS := -Wl,--whole-archive ExporterTest/ExporterTest.a -Wl,--no-whole-archive
-else
- EXPORTERS := -Wl,-force_load ExporterTest/ExporterTest.a
- ifeq ($(UNAMEM),arm64)
- ifeq ($(shell brew list libpng > /dev/null 2>&1; echo $$?),0)
- LDFLAGS += -L $(shell brew --prefix)/lib
- INC += -I $(shell brew --prefix)/include
- else
- $(error Please install libpng via Homebrew)
- endif
- endif
-endif
-
-
-ZAPD_SRC_DIRS := $(shell find ZAPD -type d)
-SRC_DIRS = $(ZAPD_SRC_DIRS) lib/tinyxml2
-
-ZAPD_CPP_FILES := $(foreach dir,$(ZAPD_SRC_DIRS),$(wildcard $(dir)/*.cpp))
-ZAPD_H_FILES := $(foreach dir,$(ZAPD_SRC_DIRS),$(wildcard $(dir)/*.h))
-
-CPP_FILES += $(ZAPD_CPP_FILES) lib/tinyxml2/tinyxml2.cpp
-O_FILES := $(foreach f,$(CPP_FILES:.cpp=.o),build/$f)
-O_FILES += build/ZAPD/BuildInfo.o
-
-# create build directories
-$(shell mkdir -p $(foreach dir,$(SRC_DIRS),build/$(dir)))
-
-
-# Main targets
-all: ZAPD.out copycheck
-
-build/ZAPD/BuildInfo.o:
- python3 ZAPD/genbuildinfo.py $(COPYCHECK_ARGS)
- $(CXX) $(CXXFLAGS) $(OPTFLAGS) $(INC) -c $(OUTPUT_OPTION) build/ZAPD/BuildInfo.cpp
-
-copycheck: ZAPD.out
- python3 copycheck.py
-
-clean:
- rm -rf build ZAPD.out
- $(MAKE) -C lib/libgfxd clean
- $(MAKE) -C ZAPDUtils clean
- $(MAKE) -C ExporterTest clean
-
-rebuild: clean all
-
-format:
- clang-format-14 -i $(ZAPD_CPP_FILES) $(ZAPD_H_FILES)
- $(MAKE) -C ZAPDUtils format
- $(MAKE) -C ExporterTest format
-
-.PHONY: all build/ZAPD/BuildInfo.o copycheck clean rebuild format
-
-build/%.o: %.cpp
- $(CXX) $(CXXFLAGS) $(OPTFLAGS) $(INC) -c $(OUTPUT_OPTION) $<
-
-
-# Submakes
-lib/libgfxd/libgfxd.a:
- $(MAKE) -C lib/libgfxd
-
-.PHONY: ExporterTest
-ExporterTest:
- $(MAKE) -C ExporterTest
-
-.PHONY: ZAPDUtils
-ZAPDUtils:
- $(MAKE) -C ZAPDUtils
-
-
-# Linking
-ZAPD.out: $(O_FILES) lib/libgfxd/libgfxd.a ExporterTest ZAPDUtils
- $(CXX) $(CXXFLAGS) $(O_FILES) lib/libgfxd/libgfxd.a ZAPDUtils/ZAPDUtils.a $(EXPORTERS) $(LDFLAGS) $(OUTPUT_OPTION)
diff --git a/tools/ZAPD/README.md b/tools/ZAPD/README.md
deleted file mode 100644
index 5006f8d4b5..0000000000
--- a/tools/ZAPD/README.md
+++ /dev/null
@@ -1,174 +0,0 @@
-# ZAPD: Zelda Asset Processor for Decomp
-
-## Compiling
-
-### Dependencies
-
-ZAPD needs a compiler with C++17 support.
-
-ZAPD has the following library dependencies:
-
-- `libpng`
-
-In a Debian/Ubuntu based environment, those could be installed with the following command:
-
-```bash
-sudo apt install libpng-dev
-```
-
-On a Mac, you will need to install libpng with Homebrew or MacPorts; we currently only support Homebrew. You can run
-
-```bash
-brew install libpng
-```
-
-to install it via Homebrew.
-
-### Building
-
-#### Linux / *nix
-
-ZAPD uses the classic `Makefile` approach. To build just run `make` (or even better `make -j` for faster compilations).
-
-You can configure a bit your ZAPD build with the following options:
-
-- `OPTIMIZATION_ON`: If set to `0` optimizations will be disabled (compile with `-O0`). Any other value compiles with `-O2`. Defaults to `1`.
-- `ASAN`: If it is set to a non-zero then ZAPD will be compiled with Address Sanitizer enabled (`-fsanitize=address`). Defaults to `0`.
-- `DEPRECATION_ON`: If it is set to a zero then deprecation warnings will be disabled. Defaults to `1`.
-- `DEBUG`: If non-zero, ZAPD will be compiled in _development mode_. This implies the following:
- - Debugging symbols enabled (`-g3`). They are disabled by default.
- - `OPTIMIZATION_ON=0`: Disables optimizations (`-O0`).
- - `DEPRECATION_ON=0`: Disables deprecation warnings.
-- `LLD=1`: builds with the LLVM linker `ld.lld` instead of the system default.
-
-As an example, if you want to build ZAPD with optimizations disabled and use the address sanitizer, you could use the following command:
-
-```bash
-make -j OPTIMIZATION_ON=0 ASAN=1
-```
-
-#### Windows
-
-This repository contains `vcxproj` files for compiling under Visual Studio environments. See `ZAPD/ZAPD.vcxproj`.
-
-## Invoking ZAPD
-
-ZAPD needs a _File parsing mode_ to be passed as first parameter. The options are:
-
-- `e`: "Extraction" mode.
- - In this mode, ZAPD expects a XML file as input, a folder as ouput and a path to the baserom files.
- - ZAPD will read the XML and use it as a guide to extract the contents of the specified asset file from the baserom folder.
- - For more info of the format of those XMLs, see the [ZAPD extraction XML reference](docs/zapd_extraction_xml_reference.md).
-- `bsf`: "Build source file" mode.
- - This is an experimental mode.
- - It was going to be used to let you have XMLs that aren't just for extraction. Might get used, might not. Still need to experiment on that.
-- `btex`: "Build texture" mode.
- - In this mode, ZAPD expects a PNG file as input, a filename as ouput and a texture type parameter (`-tt`).
- - ZAPD will try to convert the given PNG into the contents of a `uint64_t` C array.
-- `bren`: "Build (render) background" mode.
- - In this mode, ZAPD expects a JPG file as input and a filename as ouput.
- - ZAPD will try to convert the given JPG into the contents of a `uint64_t` C array.
-- `blb`: "Build blob" mode.
- - In this mode, ZAPD expects a BIN file as input and a filename as ouput.
- - ZAPD will try to convert the given BIN into the contents of a `uint8_t` C array.
-
-ZAPD also accepts the following list of extra parameters:
-
-- `-i PATH` / `--inputpath PATH`: Set input path.
-- `-o PATH` / `--outputpath PATH`: Set output path.
-- `-b PATH` / `--baserompath`: Set baserom path.
- - Can be used only in `e` or `bsf` modes.
-- `-osf PATH`: Set source output path. This is the path where the `.c` and `.h` files will be extracted to. If omitted, it will use the value passed to `--outputpath` parameter.
-- `-gsf MODE`: Generate source file during extraction. If `MODE` is `1`, C source files will be generated.
- - Can be used only in `e` mode.
-- `-crc` / `--output-crc`: Outputs a CRC file for each extracted texture.
- - Can be used only in `e` or `bsf` modes.
-- `-ulzdl MODE`: Use "Legacy ZDisplayList" instead of `libgfxd`. Set `MODE` to `1` to enable it.
- - Can be used only in `e` or `bsf` modes.
-- `-profile MODE`: Enable profiling. Set `MODE` to `1` to enable it.
-- `-uer MODE`: Split resources into their individual components (enabled by default). Set `MODE` to non-`1` to disable it.
-- `-tt TYPE`: Set texture type.
- - Can be used only in mode `btex`.
- - Valid values:
- - `rgba32`
- - `rgb5a1`
- - `i4`
- - `i8`
- - `ia4`
- - `ia8`
- - `ia16`
- - `ci4`
- - `ci8`
-- `-rconf PATH` Read Config File.
-- `-eh`: Enable error handler.
- - Only available in non-Windows environments.
-- `-v MODE`: Enable verbosity. Currently there are 3 possible values:
- - `0`: Default. Completely silent (except for warnings and errors).
- - `1`: Information.
- - `2` (and higher): Debug.
-- `-wu` / `--warn-unaccounted`: Enable warnings for each unaccounted block of data found.
- - Can be used only in `e` or `bsf` modes.
-- `-vu` / `--verbose-unaccounted`: Changes how unaccounteds are outputted. Max 4 bytes per line (a word) and add a comment with the offset of each of those lines.
- - Could be useful for looking at raw data or testing.
- - Can be used only in `e` or `bsf` modes.
-- `-tm MODE`: Test Mode (enables certain experimental features). To enable it, set `MODE` to `1`.
-- `-se` / `--set-exporter` : Sets which exporter to use.
-- `--gcc-compat` : Enables GCC compatibly mode. Slower.
-- `-us` / `--unaccounted-static` : Mark unaccounted data as `static`
-- `-s` / `--static` : Mark every asset as `static`.
- - This behaviour can be overridden per asset using `Static=` in the respective XML node.
-- `--cs-float` : How cutscene floats should be extracted.
-- Valid values:
- - `hex`: `0x42280000`
- - `float`: `42.0f`
- - `both`: `CS_FLOAT(0x42280000, 42.0f)`
- - `hex-commented-left`: `/* 42.0f */ 0x42280000`
- - `hex-commented-right`: `0x42280000 /* 42.0f */`
-- `--base-address ADDRESS`: Override base virtual address for input files.
-- `--start-offset OFFSET`: Override start offset for input files.
-- `--end-offset OFFSET`: Override end offset for input files.
-- `-W...`: warning flags, see below
-
-Additionally, you can pass the flag `--version` to see the current ZAPD version. If that flag is passed, ZAPD will ignore any other parameter passed.
-
-### Warning flags
-
-ZAPD contains a variety of warning types, with similar syntax to GCC or Clang's compiler warnings. Warnings can have three levels:
-
-- Off (does not display anything)
-- Warn (print a warning but continue processing)
-- Err (behave like an error, i.e. print and throw an exception to crash ZAPD when occurs)
-
-Each warning type uses one of these by default, but can be modified with flags, similarly to GCC or Clang:
-
-- `-Wfoo` enables warnings of type `foo`
-- `-Wno-foo` disables warnings of type `foo`
-- `-Werror=foo` escalates `foo` to behave like an error
-- `-Weverything` enables all warnings (they may be turned off using `-Wno-` flags afterwards)
-- `-Werror` escalates all enabled warnings to errors
-
-All warning types currently implemented, with their default levels:
-
-| Warning type | Default level | Description |
-| ----------------------------- | ------------- | ------------------------------------------------------------------------ |
-| `-Wdeprecated` | Warn | Deprecated features |
-| `-Whardcoded-generic-pointer` | Off | A generic segmented pointer must be produced |
-| `-Whardcoded-pointer` | Warn | ZAPD lacks the info to make a symbol, so must output a hardcoded pointer |
-| `-Wintersection` | Warn | Two assets intersect |
-| `-Winvalid-attribute-value` | Err | Attribute declared in XML is wrong |
-| `-Winvalid-extracted-data` | Err | Extracted data does not have correct form |
-| `-Winvalid-jpeg` | Err | JPEG file does not conform to the game's format requirements |
-| `-Winvalid-png` | Err | Issues arising when processing PNG data |
-| `-Winvalid-xml` | Err | XML has syntax errors |
-| `-Wmissing-attribute` | Warn | Required attribute missing in XML tag |
-| `-Wmissing-offsets` | Warn | Offset attribute missing in XML tag |
-| `-Wmissing-segment` | Warn | Segment not given in File tag in XML |
-| `-Wnot-implemented` | Warn | ZAPD does not currently support this feature |
-| `-Wunaccounted` | Off | Large blocks of unaccounted |
-| `-Wunknown-attribute` | Warn | Unknown attribute in XML entry tag |
-
-There are also errors that do not have a type, and cannot be disabled.
-
-For example, here we have invoked ZAPD in the usual way to extract using a (rather badly-written) XML, but escalating `-Wintersection` to an error:
-
-
diff --git a/tools/ZAPD/ZAPD.sln b/tools/ZAPD/ZAPD.sln
deleted file mode 100644
index 82538dd9f4..0000000000
--- a/tools/ZAPD/ZAPD.sln
+++ /dev/null
@@ -1,82 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30320.27
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZAPD", "ZAPD\ZAPD.vcxproj", "{B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExporterExample", "ExporterTest\ExporterTest.vcxproj", "{65608EB0-1A47-45AD-AB66-192FB64C762C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZAPDUtils", "ZAPDUtils\ZAPDUtils.vcxproj", "{A2E01C3E-D647-45D1-9788-043DEBC1A908}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- MinSizeRel|x64 = MinSizeRel|x64
- MinSizeRel|x86 = MinSizeRel|x86
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- RelWithDebInfo|x64 = RelWithDebInfo|x64
- RelWithDebInfo|x86 = RelWithDebInfo|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x64.ActiveCfg = Debug|x64
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x64.Build.0 = Debug|x64
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x86.ActiveCfg = Debug|Win32
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Debug|x86.Build.0 = Debug|Win32
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.MinSizeRel|x64.ActiveCfg = Release|x64
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.MinSizeRel|x64.Build.0 = Release|x64
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.MinSizeRel|x86.ActiveCfg = Release|Win32
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.MinSizeRel|x86.Build.0 = Release|Win32
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x64.ActiveCfg = Release|x64
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x64.Build.0 = Release|x64
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x86.ActiveCfg = Release|Win32
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.Release|x86.Build.0 = Release|Win32
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.RelWithDebInfo|x64.ActiveCfg = Release|x64
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.RelWithDebInfo|x64.Build.0 = Release|x64
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
- {B53F9E5B-0A58-4BAE-9AFE-856C8CBB8D36}.RelWithDebInfo|x86.Build.0 = Release|Win32
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.Debug|x64.ActiveCfg = Debug|x64
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.Debug|x64.Build.0 = Debug|x64
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.Debug|x86.ActiveCfg = Debug|Win32
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.Debug|x86.Build.0 = Debug|Win32
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.MinSizeRel|x64.ActiveCfg = Debug|x64
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.MinSizeRel|x64.Build.0 = Debug|x64
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.MinSizeRel|x86.ActiveCfg = Debug|Win32
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.MinSizeRel|x86.Build.0 = Debug|Win32
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.Release|x64.ActiveCfg = Release|x64
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.Release|x64.Build.0 = Release|x64
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.Release|x86.ActiveCfg = Release|Win32
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.Release|x86.Build.0 = Release|Win32
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.RelWithDebInfo|x64.ActiveCfg = Release|x64
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.RelWithDebInfo|x64.Build.0 = Release|x64
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
- {65608EB0-1A47-45AD-AB66-192FB64C762C}.RelWithDebInfo|x86.Build.0 = Release|Win32
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x64.ActiveCfg = Debug|x64
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x64.Build.0 = Debug|x64
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x86.ActiveCfg = Debug|Win32
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Debug|x86.Build.0 = Debug|Win32
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.MinSizeRel|x64.ActiveCfg = Debug|x64
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.MinSizeRel|x64.Build.0 = Debug|x64
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.MinSizeRel|x86.ActiveCfg = Debug|Win32
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.MinSizeRel|x86.Build.0 = Debug|Win32
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x64.ActiveCfg = Release|x64
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x64.Build.0 = Release|x64
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x86.ActiveCfg = Release|Win32
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.Release|x86.Build.0 = Release|Win32
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.RelWithDebInfo|x64.ActiveCfg = Release|x64
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.RelWithDebInfo|x64.Build.0 = Release|x64
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
- {A2E01C3E-D647-45D1-9788-043DEBC1A908}.RelWithDebInfo|x86.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {C2E1CC72-7A50-3249-AFD5-DFF6FE25CDCA}
- EndGlobalSection
- GlobalSection(Performance) = preSolution
- HasPerformanceSessions = true
- EndGlobalSection
-EndGlobal
diff --git a/tools/ZAPD/ZAPD/CRC32.h b/tools/ZAPD/ZAPD/CRC32.h
deleted file mode 100644
index 1f82c75c58..0000000000
--- a/tools/ZAPD/ZAPD/CRC32.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#pragma once
-
-static uint32_t CRC32B(const unsigned char* message, int32_t size)
-{
- int32_t byte, crc;
- int32_t mask;
-
- crc = 0xFFFFFFFF;
-
- for (int32_t i = 0; i < size; i++)
- {
- byte = message[i];
- crc = crc ^ byte;
-
- for (int32_t j = 7; j >= 0; j--)
- {
- mask = -(crc & 1);
- crc = (crc >> 1) ^ (0xEDB88320 & mask);
- }
- }
-
- return ~(uint32_t)(crc);
-}
\ No newline at end of file
diff --git a/tools/ZAPD/ZAPD/CrashHandler.cpp b/tools/ZAPD/ZAPD/CrashHandler.cpp
deleted file mode 100644
index 7ddec5a7e8..0000000000
--- a/tools/ZAPD/ZAPD/CrashHandler.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-#include "CrashHandler.h"
-#include "Utils/StringHelper.h"
-
-#if __has_include()
-#define HAS_POSIX 1
-#else
-#define HAS_POSIX 0
-#endif
-
-#include
-#include
-#include
-#include
-#include
-
-#if HAS_POSIX == 1
-#include
-#include // for __cxa_demangle
-#include // for dladdr
-#include
-#include
-#elif defined(_MSC_VER)
-#include
-#include
-
-#include
-
-#pragma comment(lib, "Dbghelp.lib")
-#endif
-
-// Feel free to add more crash messages.
-static std::array crashEasterEgg = {
- "\tYou've met with a terrible fate, haven't you?",
- "\tSEA BEARS FOAM. SLEEP BEARS DREAMS. \n\tBOTH END IN THE SAME WAY: CRASSSH!",
- "\tZAPD has fallen and cannot get up.",
- "\tIT'S A SECRET TO EVERYBODY. \n\tBut it shouldn't be, you'd better ask about it!",
- "\tI AM ERROR.",
- "\tGRUMBLE,GRUMBLE...",
- "\tDODONGO DISLIKES SMOKE \n\tAnd ZAPD dislikes whatever you fed it.",
- "\tMay the way of the Hero lead \n\tto the debugger.",
- "\tTHE WIND FISH SLUMBERS LONG... \n\tTHE HERO'S LIFE GONE... ",
- "\tSEA BEARS FOAM, SLEEP BEARS DREAMS. \n\tBOTH END IN THE SAME WAY CRASSSH!",
- "\tYou've met with a terrible fate, haven't you?",
- "\tMaster, I calculate a 100% probability that ZAPD has crashed. \n\tAdditionally, the "
- "batteries in your Wii Remote are nearly depleted.",
- "\t CONGRATURATIONS! \n"
- "\tAll Pages are displayed.\n"
- "\t THANK YOU! \n"
- "\t You are great debugger!",
- "\tRCP is HUNG UP!!\n"
- "\tOh! MY GOD!!",
-};
-
-#if HAS_POSIX == 1
-void ErrorHandler(int sig)
-{
- std::array arr;
- constexpr size_t nMaxFrames = arr.size();
- size_t size = backtrace(arr.data(), nMaxFrames);
- char** symbols = backtrace_symbols(arr.data(), nMaxFrames);
-
- fprintf(stderr, "\nZAPD crashed. (Signal: %i)\n", sig);
-
- srand(time(nullptr));
- auto easterIndex = rand() % crashEasterEgg.size();
-
- fprintf(stderr, "\n%s\n\n", crashEasterEgg[easterIndex]);
-
- fprintf(stderr, "Traceback:\n");
- for (size_t i = 1; i < size; i++)
- {
- Dl_info info;
- uint32_t gotAddress = dladdr(arr[i], &info);
- std::string functionName(symbols[i]);
-
- if (gotAddress != 0 && info.dli_sname != nullptr)
- {
- int32_t status;
- char* demangled = abi::__cxa_demangle(info.dli_sname, nullptr, nullptr, &status);
- const char* nameFound = info.dli_sname;
-
- if (status == 0)
- {
- nameFound = demangled;
- }
-
- functionName = StringHelper::Sprintf("%s (+0x%X)", nameFound,
- (char*)arr[i] - (char*)info.dli_saddr);
- free(demangled);
- }
-
- fprintf(stderr, "%-3zd %s\n", i, functionName.c_str());
- }
-
- fprintf(stderr, "\n");
-
- free(symbols);
- exit(1);
-}
-#elif defined(_MSC_VER)
-
-void printStack(CONTEXT* ctx)
-{
- BOOL result;
- HANDLE process;
- HANDLE thread;
- HMODULE hModule;
- ULONG frame;
- DWORD64 displacement;
- DWORD disp;
-
- srand(time(nullptr));
- auto easterIndex = rand() % crashEasterEgg.size();
-
- fprintf(stderr, "\n%s\n\n", crashEasterEgg[easterIndex]);
-
-#if defined(_M_AMD64)
- STACKFRAME64 stack;
- memset(&stack, 0, sizeof(STACKFRAME64));
-#else
- STACKFRAME stack;
- memset(&stack, 0, sizeof(STACKFRAME));
-#endif
-
- char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME + sizeof(TCHAR)];
- char module[512];
-
- PSYMBOL_INFO symbol = (PSYMBOL_INFO)buffer;
-
- CONTEXT ctx2;
- memcpy(&ctx2, ctx, sizeof(CONTEXT));
-
- process = GetCurrentProcess();
- thread = GetCurrentThread();
- SymInitialize(process, nullptr, TRUE);
-
- constexpr DWORD machineType =
-#if defined(_M_AMD64)
- IMAGE_FILE_MACHINE_AMD64;
-#else
- IMAGE_FILE_MACHINE_I386;
-#endif
-
- displacement = 0;
-
- for (frame = 0;; frame++)
- {
- result = StackWalk(machineType, process, thread, &stack, &ctx2, nullptr,
- SymFunctionTableAccess, SymGetModuleBase, nullptr);
- if (!result)
- {
- break;
- }
- symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
- symbol->MaxNameLen = MAX_SYM_NAME;
- SymFromAddr(process, (ULONG64)stack.AddrPC.Offset, &displacement, symbol);
-#if defined(_M_AMD64)
- IMAGEHLP_LINE64 line;
- line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
-#else
- IMAGEHLP_LINE line;
- line.SizeOfStruct = sizeof(IMAGEHLP_LINE);
-#endif
- if (SymGetLineFromAddr(process, stack.AddrPC.Offset, &disp, &line))
- {
- fprintf(stderr, "%u\t %s in %s: line: %lu: \n", frame, symbol->Name, line.FileName,
- line.LineNumber);
- }
-
- else
- {
- fprintf(stderr, "%u\tat % s\n", frame, symbol->Name);
- hModule = nullptr;
- GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
- GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
- (LPCTSTR)(stack.AddrPC.Offset), &hModule);
-
- if (hModule != nullptr)
- {
- GetModuleFileNameA(hModule, module, 512 - 1);
- }
- fprintf(stderr, "%u\tIn %s\n", frame, module);
- }
- }
-}
-
-LONG seh_filter(_EXCEPTION_POINTERS* ex)
-{
- fprintf(stderr, "EXCEPTION 0x%x occured\n", ex->ExceptionRecord->ExceptionCode);
- printStack(ex->ContextRecord);
- return EXCEPTION_EXECUTE_HANDLER;
-}
-#endif
-
-void CrashHandler_Init()
-{
-#if HAS_POSIX == 1
- signal(SIGSEGV, ErrorHandler);
- signal(SIGABRT, ErrorHandler);
-#elif defined(_MSC_VER)
- SetUnhandledExceptionFilter(seh_filter);
-#else
- HANDLE_WARNING(WarningType::Always,
- "tried to set error handler, but this ZAPD build lacks support for one", "");
-#endif
-}
diff --git a/tools/ZAPD/ZAPD/CrashHandler.h b/tools/ZAPD/ZAPD/CrashHandler.h
deleted file mode 100644
index 102778bec1..0000000000
--- a/tools/ZAPD/ZAPD/CrashHandler.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef CRASH_HANDLER_H
-#define CRASH_HANDLER_H
-
-void CrashHandler_Init();
-
-#endif
diff --git a/tools/ZAPD/ZAPD/Declaration.cpp b/tools/ZAPD/ZAPD/Declaration.cpp
deleted file mode 100644
index 30863803a2..0000000000
--- a/tools/ZAPD/ZAPD/Declaration.cpp
+++ /dev/null
@@ -1,236 +0,0 @@
-#include "Declaration.h"
-
-#include "Globals.h"
-#include "Utils/StringHelper.h"
-
-Declaration::Declaration(offset_t nAddress, DeclarationAlignment nAlignment, size_t nSize,
- const std::string& nBody)
-{
- address = nAddress;
- alignment = nAlignment;
- size = nSize;
- declBody = nBody;
-}
-
-Declaration* Declaration::Create(offset_t declAddr, DeclarationAlignment declAlign, size_t declSize,
- const std::string& declType, const std::string& declName,
- const std::string& declBody)
-{
- Declaration* decl = new Declaration(declAddr, declAlign, declSize, declBody);
-
- decl->declType = declType;
- decl->declName = declName;
- decl->declBody = declBody;
-
- return decl;
-}
-
-Declaration* Declaration::CreateArray(offset_t declAddr, DeclarationAlignment declAlign,
- size_t declSize, const std::string& declType,
- const std::string& declName, const std::string& declBody,
- size_t declArrayItemCnt, bool isDeclExternal)
-{
- Declaration* decl = new Declaration(declAddr, declAlign, declSize, declBody);
-
- decl->declName = declName;
- decl->declType = declType;
- decl->arrayItemCnt = declArrayItemCnt;
- decl->isExternal = isDeclExternal;
- decl->isArray = true;
-
- return decl;
-}
-
-Declaration* Declaration::CreateArray(offset_t declAddr, DeclarationAlignment declAlign,
- size_t declSize, const std::string& declType,
- const std::string& declName, const std::string& declBody,
- const std::string& declArrayItemCntStr, bool isDeclExternal)
-{
- Declaration* decl = new Declaration(declAddr, declAlign, declSize, declBody);
-
- decl->declName = declName;
- decl->declType = declType;
- decl->arrayItemCntStr = declArrayItemCntStr;
- decl->isExternal = isDeclExternal;
- decl->isArray = true;
-
- return decl;
-}
-
-Declaration* Declaration::CreateInclude(offset_t declAddr, const std::string& includePath,
- size_t declSize, const std::string& declType,
- const std::string& declName, const std::string& defines)
-{
- Declaration* decl = new Declaration(declAddr, DeclarationAlignment::Align4, declSize, "");
- decl->includePath = includePath;
- decl->declType = declType;
- decl->declName = declName;
- decl->defines = defines;
-
- return decl;
-}
-
-Declaration* Declaration::CreatePlaceholder(offset_t declAddr, const std::string& declName)
-{
- Declaration* decl = new Declaration(declAddr, DeclarationAlignment::Align4, 0, "");
- decl->declName = declName;
- decl->isPlaceholder = true;
-
- return decl;
-}
-
-bool Declaration::IsStatic() const
-{
- switch (staticConf)
- {
- case StaticConfig::Off:
- return false;
-
- case StaticConfig::Global:
- return Globals::Instance->forceStatic;
-
- case StaticConfig::On:
- return true;
- }
-
- return false;
-}
-
-std::string Declaration::GetNormalDeclarationStr() const
-{
- std::string output;
-
- if (IsStatic())
- {
- output += "static ";
- }
-
- if (isArray)
- {
- bool includeArraySize = (IsStatic() || forceArrayCnt);
-
- if (includeArraySize)
- {
- if (arrayItemCntStr != "")
- output += StringHelper::Sprintf("%s %s[%s];\n", declType.c_str(), declName.c_str(),
- arrayItemCntStr.c_str());
- else
- output += StringHelper::Sprintf("%s %s[%i] = {\n", declType.c_str(),
- declName.c_str(), arrayItemCnt);
- }
- else
- {
- output += StringHelper::Sprintf("%s %s[] = {\n", declType.c_str(), declName.c_str());
- }
-
- output += declBody + "\n";
- }
- else
- {
- output += StringHelper::Sprintf("%s %s = { ", declType.c_str(), declName.c_str());
- output += declBody;
- }
-
- if (output.back() == '\n')
- output += "};";
- else
- output += " };";
-
- output += "\n";
-
- output += "\n";
-
- return output;
-}
-
-std::string Declaration::GetExternalDeclarationStr() const
-{
- std::string output;
-
- if (IsStatic())
- output += "static ";
-
- bool includeArraySize = (IsStatic() || forceArrayCnt);
-
- if (includeArraySize)
- {
- if (arrayItemCntStr != "")
- output += StringHelper::Sprintf("%s %s[%s] = ", declType.c_str(), declName.c_str(),
- arrayItemCntStr.c_str());
- else
- output += StringHelper::Sprintf("%s %s[%i] = ", declType.c_str(), declName.c_str(),
- arrayItemCnt);
- }
- else
- {
- output += StringHelper::Sprintf("%s %s[] = ", declType.c_str(), declName.c_str());
- }
-
- output += StringHelper::Sprintf("{\n#include \"%s\"\n};", includePath.c_str());
- output += "\n\n";
-
- return output;
-}
-
-std::string Declaration::GetExternStr() const
-{
- if (IsStatic() || declType == "" || isUnaccounted)
- {
- return "";
- }
-
- if (isArray)
- {
- if (arrayItemCntStr != "" && (IsStatic() || forceArrayCnt))
- {
- return StringHelper::Sprintf("extern %s %s[%s];\n", declType.c_str(), declName.c_str(),
- arrayItemCntStr.c_str());
- }
- else if (arrayItemCnt != 0 && (IsStatic() || forceArrayCnt))
- {
- return StringHelper::Sprintf("extern %s %s[%i];\n", declType.c_str(), declName.c_str(),
- arrayItemCnt);
- }
- else
- return StringHelper::Sprintf("extern %s %s[];\n", declType.c_str(), declName.c_str());
- }
-
- return StringHelper::Sprintf("extern %s %s;\n", declType.c_str(), declName.c_str());
-}
-
-std::string Declaration::GetDefinesStr() const
-{
- if (IsStatic() || (declType == ""))
- {
- return "";
- }
- return StringHelper::Sprintf("%s", defines.c_str());
-}
-
-std::string Declaration::GetStaticForwardDeclarationStr() const
-{
- if (!IsStatic() || isUnaccounted)
- return "";
-
- if (isArray)
- {
- if (arrayItemCntStr == "" && arrayItemCnt == 0)
- {
- // Forward declaring static arrays without specifying the size is not allowed.
- return "";
- }
-
- if (arrayItemCntStr != "")
- {
- return StringHelper::Sprintf("static %s %s[%s];\n", declType.c_str(), declName.c_str(),
- arrayItemCntStr.c_str());
- }
- else
- {
- return StringHelper::Sprintf("static %s %s[%i];\n", declType.c_str(), declName.c_str(),
- arrayItemCnt);
- }
- }
-
- return StringHelper::Sprintf("static %s %s;\n", declType.c_str(), declName.c_str());
-}
diff --git a/tools/ZAPD/ZAPD/Declaration.h b/tools/ZAPD/ZAPD/Declaration.h
deleted file mode 100644
index d079cb8dce..0000000000
--- a/tools/ZAPD/ZAPD/Declaration.h
+++ /dev/null
@@ -1,182 +0,0 @@
-#pragma once
-
-#include
-#include
-#include
-
-// TODO: should we drop the `_t` suffix because of UNIX compliance?
-typedef uint32_t segptr_t;
-typedef uint32_t offset_t;
-
-#define SEGMENTED_NULL ((segptr_t)0)
-
-enum class DeclarationAlignment
-{
- Align4,
- Align8
-};
-
-enum class StaticConfig
-{
- Off,
- Global,
- On
-};
-
-///