diff --git a/Makefile b/Makefile
index e08d983c8..df9ceaa04 100644
--- a/Makefile
+++ b/Makefile
@@ -173,14 +173,12 @@ SRC_DIRS := $(shell find src -type d)
ASM_DIRS := $(shell find asm -type d -not -path "asm/non_matchings*") $(shell find data -type d)
## Assets binaries (PNGs, JPGs, etc)
-ASSET_BIN_DIRS := $(shell find assets/* -type d -not -path "assets/xml*")
+ASSET_BIN_DIRS := $(shell find assets/* -type d -not -path "assets/xml*" -not -path "assets/c/*" -not -name "c")
# Prevents building C files that will be #include'd
ASSET_BIN_DIRS_C_FILES := $(shell find assets/* -type d -not -path "assets/xml*" -not -path "assets/code*" -not -path "assets/overlays*")
-ASSET_FILES_XML := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.xml))
ASSET_FILES_BIN := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.bin))
-ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_XML:.xml=.c),$f) \
- $(foreach f,$(ASSET_FILES_BIN:.bin=.bin.inc.c),build/$f)
+ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_BIN:.bin=.bin.inc.c),build/$f)
TEXTURE_FILES_PNG := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.png))
TEXTURE_FILES_JPG := $(foreach dir,$(ASSET_BIN_DIRS),$(wildcard $(dir)/*.jpg))
@@ -204,7 +202,7 @@ OVL_RELOC_FILES := $(shell $(CPP) $(CPPFLAGS) $(SPEC) | grep -o '[^"]*_reloc.o'
DEP_FILES := $(O_FILES:.o=.asmproc.d) $(OVL_RELOC_FILES:.o=.d)
# create build directories
-$(shell mkdir -p build/baserom $(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(ASSET_BIN_DIRS),build/$(dir)))
+$(shell mkdir -p build/baserom $(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(ASSET_BIN_DIRS) $(ASSET_BIN_DIRS_C_FILES),build/$(dir)))
# directory flags
build/src/boot/O2/%.o: OPTFLAGS := -O2
@@ -353,7 +351,7 @@ build/assets/%.o: assets/%.c
$(OBJCOPY_BIN)
$(RM_MDEBUG)
-build/assets/archives/%.yar.o: build/assets/archives/%.o
+build/%.yar.o: build/%.o
$(MAKEYAR) $< $(@:.yar.o=.yar.bin) $(@:.yar.o=.symbols.o)
$(OBJCOPY) -I binary -O elf32-big $(@:.yar.o=.yar.bin) $@
diff --git a/assets/c/.gitignore b/assets/c/.gitignore
new file mode 100644
index 000000000..66dbd2b82
--- /dev/null
+++ b/assets/c/.gitignore
@@ -0,0 +1,2 @@
+!*.c
+!*.h
diff --git a/assets/c/archives/map_grand_static/map_grand_static.c b/assets/c/archives/map_grand_static/map_grand_static.c
new file mode 100644
index 000000000..582d37e68
--- /dev/null
+++ b/assets/c/archives/map_grand_static/map_grand_static.c
@@ -0,0 +1,394 @@
+#include "map_grand_static.h"
+
+u64 gMapGrandStatic100Tex[] = {
+#include "assets/archives/map_grand_static/map_100.i4.inc.c"
+};
+
+u64 gMapGrandStatic101Tex[] = {
+#include "assets/archives/map_grand_static/map_101.i4.inc.c"
+};
+
+u64 gMapGrandStatic102Tex[] = {
+#include "assets/archives/map_grand_static/map_102.i4.inc.c"
+};
+
+u64 gMapGrandStatic103Tex[] = {
+#include "assets/archives/map_grand_static/map_103.i4.inc.c"
+};
+
+u64 gMapGrandStatic104Tex[] = {
+#include "assets/archives/map_grand_static/map_104.i4.inc.c"
+};
+
+u64 gMapGrandStatic105Tex[] = {
+#include "assets/archives/map_grand_static/map_105.i4.inc.c"
+};
+
+u64 gMapGrandStatic106Tex[] = {
+#include "assets/archives/map_grand_static/map_106.i4.inc.c"
+};
+
+u64 gMapGrandStatic107Tex[] = {
+#include "assets/archives/map_grand_static/map_107.i4.inc.c"
+};
+
+u64 gMapGrandStatic108Tex[] = {
+#include "assets/archives/map_grand_static/map_108.i4.inc.c"
+};
+
+u64 gMapGrandStatic109Tex[] = {
+#include "assets/archives/map_grand_static/map_109.i4.inc.c"
+};
+
+u64 gMapGrandStatic10ATex[] = {
+#include "assets/archives/map_grand_static/map_10A.i4.inc.c"
+};
+
+u64 gMapGrandStatic10BTex[] = {
+#include "assets/archives/map_grand_static/map_10B.i4.inc.c"
+};
+
+u64 gMapGrandStatic10CTex[] = {
+#include "assets/archives/map_grand_static/map_10C.i4.inc.c"
+};
+
+u64 gMapGrandStatic10DTex[] = {
+#include "assets/archives/map_grand_static/map_10D.i4.inc.c"
+};
+
+u64 gMapGrandStatic10ETex[] = {
+#include "assets/archives/map_grand_static/map_10E.i4.inc.c"
+};
+
+u64 gMapGrandStatic10FTex[] = {
+#include "assets/archives/map_grand_static/map_10F.i4.inc.c"
+};
+
+u64 gMapGrandStatic110Tex[] = {
+#include "assets/archives/map_grand_static/map_110.i4.inc.c"
+};
+
+u64 gMapGrandStatic111Tex[] = {
+#include "assets/archives/map_grand_static/map_111.i4.inc.c"
+};
+
+u64 gMapGrandStatic112Tex[] = {
+#include "assets/archives/map_grand_static/map_112.i4.inc.c"
+};
+
+u64 gMapGrandStatic113Tex[] = {
+#include "assets/archives/map_grand_static/map_113.i4.inc.c"
+};
+
+u64 gMapGrandStatic114Tex[] = {
+#include "assets/archives/map_grand_static/map_114.i4.inc.c"
+};
+
+u64 gMapGrandStatic115Tex[] = {
+#include "assets/archives/map_grand_static/map_115.i4.inc.c"
+};
+
+u64 gMapGrandStatic116Tex[] = {
+#include "assets/archives/map_grand_static/map_116.i4.inc.c"
+};
+
+u64 gMapGrandStatic117Tex[] = {
+#include "assets/archives/map_grand_static/map_117.i4.inc.c"
+};
+
+u64 gMapGrandStatic118Tex[] = {
+#include "assets/archives/map_grand_static/map_118.i4.inc.c"
+};
+
+u64 gMapGrandStatic119Tex[] = {
+#include "assets/archives/map_grand_static/map_119.i4.inc.c"
+};
+
+u64 gMapGrandStatic11ATex[] = {
+#include "assets/archives/map_grand_static/map_11A.i4.inc.c"
+};
+
+u64 gMapGrandStatic11BTex[] = {
+#include "assets/archives/map_grand_static/map_11B.i4.inc.c"
+};
+
+u64 gMapGrandStatic11CTex[] = {
+#include "assets/archives/map_grand_static/map_11C.i4.inc.c"
+};
+
+u64 gMapGrandStatic11DTex[] = {
+#include "assets/archives/map_grand_static/map_11D.i4.inc.c"
+};
+
+u64 gMapGrandStatic11ETex[] = {
+#include "assets/archives/map_grand_static/map_11E.i4.inc.c"
+};
+
+u64 gMapGrandStatic11FTex[] = {
+#include "assets/archives/map_grand_static/map_11F.i4.inc.c"
+};
+
+u64 gMapGrandStatic120Tex[] = {
+#include "assets/archives/map_grand_static/map_120.i4.inc.c"
+};
+
+u64 gMapGrandStatic121Tex[] = {
+#include "assets/archives/map_grand_static/map_121.i4.inc.c"
+};
+
+u64 gMapGrandStatic122Tex[] = {
+#include "assets/archives/map_grand_static/map_122.i4.inc.c"
+};
+
+u64 gMapGrandStatic123Tex[] = {
+#include "assets/archives/map_grand_static/map_123.i4.inc.c"
+};
+
+u64 gMapGrandStatic124Tex[] = {
+#include "assets/archives/map_grand_static/map_124.i4.inc.c"
+};
+
+u64 gMapGrandStatic125Tex[] = {
+#include "assets/archives/map_grand_static/map_125.i4.inc.c"
+};
+
+u64 gMapGrandStatic126Tex[] = {
+#include "assets/archives/map_grand_static/map_126.i4.inc.c"
+};
+
+u64 gMapGrandStatic127Tex[] = {
+#include "assets/archives/map_grand_static/map_127.i4.inc.c"
+};
+
+u64 gMapGrandStatic128Tex[] = {
+#include "assets/archives/map_grand_static/map_128.i4.inc.c"
+};
+
+u64 gMapGrandStatic129Tex[] = {
+#include "assets/archives/map_grand_static/map_129.i4.inc.c"
+};
+
+u64 gMapGrandStatic12ATex[] = {
+#include "assets/archives/map_grand_static/map_12A.i4.inc.c"
+};
+
+u64 gMapGrandStatic12BTex[] = {
+#include "assets/archives/map_grand_static/map_12B.i4.inc.c"
+};
+
+u64 gMapGrandStatic12CTex[] = {
+#include "assets/archives/map_grand_static/map_12C.i4.inc.c"
+};
+
+u64 gMapGrandStatic12DTex[] = {
+#include "assets/archives/map_grand_static/map_12D.i4.inc.c"
+};
+
+u64 gMapGrandStatic12ETex[] = {
+#include "assets/archives/map_grand_static/map_12E.i4.inc.c"
+};
+
+u64 gMapGrandStatic12FTex[] = {
+#include "assets/archives/map_grand_static/map_12F.i4.inc.c"
+};
+
+u64 gMapGrandStatic130Tex[] = {
+#include "assets/archives/map_grand_static/map_130.i4.inc.c"
+};
+
+u64 gMapGrandStatic131Tex[] = {
+#include "assets/archives/map_grand_static/map_131.i4.inc.c"
+};
+
+u64 gMapGrandStatic132Tex[] = {
+#include "assets/archives/map_grand_static/map_132.i4.inc.c"
+};
+
+u64 gMapGrandStatic133Tex[] = {
+#include "assets/archives/map_grand_static/map_133.i4.inc.c"
+};
+
+u64 gMapGrandStatic134Tex[] = {
+#include "assets/archives/map_grand_static/map_134.i4.inc.c"
+};
+
+u64 gMapGrandStatic135Tex[] = {
+#include "assets/archives/map_grand_static/map_135.i4.inc.c"
+};
+
+u64 gMapGrandStatic136Tex[] = {
+#include "assets/archives/map_grand_static/map_136.i4.inc.c"
+};
+
+u64 gMapGrandStatic137Tex[] = {
+#include "assets/archives/map_grand_static/map_137.i4.inc.c"
+};
+
+u64 gMapGrandStatic138Tex[] = {
+#include "assets/archives/map_grand_static/map_138.i4.inc.c"
+};
+
+u64 gMapGrandStatic139Tex[] = {
+#include "assets/archives/map_grand_static/map_139.i4.inc.c"
+};
+
+u64 gMapGrandStatic13ATex[] = {
+#include "assets/archives/map_grand_static/map_13A.i4.inc.c"
+};
+
+u64 gMapGrandStatic13BTex[] = {
+#include "assets/archives/map_grand_static/map_13B.i4.inc.c"
+};
+
+u64 gMapGrandStatic13CTex[] = {
+#include "assets/archives/map_grand_static/map_13C.i4.inc.c"
+};
+
+u64 gMapGrandStatic13DTex[] = {
+#include "assets/archives/map_grand_static/map_13D.i4.inc.c"
+};
+
+u64 gMapGrandStatic13ETex[] = {
+#include "assets/archives/map_grand_static/map_13E.i4.inc.c"
+};
+
+u64 gMapGrandStatic13FTex[] = {
+#include "assets/archives/map_grand_static/map_13F.i4.inc.c"
+};
+
+u64 gMapGrandStatic140Tex[] = {
+#include "assets/archives/map_grand_static/map_140.i4.inc.c"
+};
+
+u64 gMapGrandStatic141Tex[] = {
+#include "assets/archives/map_grand_static/map_141.i4.inc.c"
+};
+
+u64 gMapGrandStatic142Tex[] = {
+#include "assets/archives/map_grand_static/map_142.i4.inc.c"
+};
+
+u64 gMapGrandStatic143Tex[] = {
+#include "assets/archives/map_grand_static/map_143.i4.inc.c"
+};
+
+u64 gMapGrandStatic144Tex[] = {
+#include "assets/archives/map_grand_static/map_144.i4.inc.c"
+};
+
+u64 gMapGrandStatic145Tex[] = {
+#include "assets/archives/map_grand_static/map_145.i4.inc.c"
+};
+
+u64 gMapGrandStatic146Tex[] = {
+#include "assets/archives/map_grand_static/map_146.i4.inc.c"
+};
+
+u64 gMapGrandStatic147Tex[] = {
+#include "assets/archives/map_grand_static/map_147.i4.inc.c"
+};
+
+u64 gMapGrandStatic148Tex[] = {
+#include "assets/archives/map_grand_static/map_148.i4.inc.c"
+};
+
+u64 gMapGrandStatic149Tex[] = {
+#include "assets/archives/map_grand_static/map_149.i4.inc.c"
+};
+
+u64 gMapGrandStatic14ATex[] = {
+#include "assets/archives/map_grand_static/map_14A.i4.inc.c"
+};
+
+u64 gMapGrandStatic14BTex[] = {
+#include "assets/archives/map_grand_static/map_14B.i4.inc.c"
+};
+
+u64 gMapGrandStatic14CTex[] = {
+#include "assets/archives/map_grand_static/map_14C.i4.inc.c"
+};
+
+u64 gMapGrandStatic14DTex[] = {
+#include "assets/archives/map_grand_static/map_14D.i4.inc.c"
+};
+
+u64 gMapGrandStatic14ETex[] = {
+#include "assets/archives/map_grand_static/map_14E.i4.inc.c"
+};
+
+u64 gMapGrandStatic14FTex[] = {
+#include "assets/archives/map_grand_static/map_14F.i4.inc.c"
+};
+
+u64 gMapGrandStatic150Tex[] = {
+#include "assets/archives/map_grand_static/map_150.i4.inc.c"
+};
+
+u64 gMapGrandStatic151Tex[] = {
+#include "assets/archives/map_grand_static/map_151.i4.inc.c"
+};
+
+u64 gMapGrandStatic152Tex[] = {
+#include "assets/archives/map_grand_static/map_152.i4.inc.c"
+};
+
+u64 gMapGrandStatic153Tex[] = {
+#include "assets/archives/map_grand_static/map_153.i4.inc.c"
+};
+
+u64 gMapGrandStatic154Tex[] = {
+#include "assets/archives/map_grand_static/map_154.i4.inc.c"
+};
+
+u64 gMapGrandStatic155Tex[] = {
+#include "assets/archives/map_grand_static/map_155.i4.inc.c"
+};
+
+u64 gMapGrandStatic156Tex[] = {
+#include "assets/archives/map_grand_static/map_156.i4.inc.c"
+};
+
+u64 gMapGrandStatic157Tex[] = {
+#include "assets/archives/map_grand_static/map_157.i4.inc.c"
+};
+
+u64 gMapGrandStatic158Tex[] = {
+#include "assets/archives/map_grand_static/map_158.i4.inc.c"
+};
+
+u64 gMapGrandStatic159Tex[] = {
+#include "assets/archives/map_grand_static/map_159.i4.inc.c"
+};
+
+u64 gMapGrandStatic15ATex[] = {
+#include "assets/archives/map_grand_static/map_15A.i4.inc.c"
+};
+
+u64 gMapGrandStatic15BTex[] = {
+#include "assets/archives/map_grand_static/map_15B.i4.inc.c"
+};
+
+u64 gMapGrandStatic15CTex[] = {
+#include "assets/archives/map_grand_static/map_15C.i4.inc.c"
+};
+
+u64 gMapGrandStatic15DTex[] = {
+#include "assets/archives/map_grand_static/map_15D.i4.inc.c"
+};
+
+u64 gMapGrandStatic15ETex[] = {
+#include "assets/archives/map_grand_static/map_15E.i4.inc.c"
+};
+
+u64 gMapGrandStatic15FTex[] = {
+#include "assets/archives/map_grand_static/map_15F.i4.inc.c"
+};
+
+u64 gMapGrandStatic160Tex[] = {
+#include "assets/archives/map_grand_static/map_160.i4.inc.c"
+};
+
+u64 gMapGrandStatic161Tex[] = {
+#include "assets/archives/map_grand_static/map_161.i4.inc.c"
+};
+
diff --git a/assets/c/archives/map_grand_static/map_grand_static.h b/assets/c/archives/map_grand_static/map_grand_static.h
new file mode 100644
index 000000000..a940d4d42
--- /dev/null
+++ b/assets/c/archives/map_grand_static/map_grand_static.h
@@ -0,0 +1,105 @@
+#ifndef MAP_GRAND_STATIC_H
+#define MAP_GRAND_STATIC_H 1
+
+#include "ultra64.h"
+
+extern u64 gMapGrandStatic100Tex[];
+extern u64 gMapGrandStatic101Tex[];
+extern u64 gMapGrandStatic102Tex[];
+extern u64 gMapGrandStatic103Tex[];
+extern u64 gMapGrandStatic104Tex[];
+extern u64 gMapGrandStatic105Tex[];
+extern u64 gMapGrandStatic106Tex[];
+extern u64 gMapGrandStatic107Tex[];
+extern u64 gMapGrandStatic108Tex[];
+extern u64 gMapGrandStatic109Tex[];
+extern u64 gMapGrandStatic10ATex[];
+extern u64 gMapGrandStatic10BTex[];
+extern u64 gMapGrandStatic10CTex[];
+extern u64 gMapGrandStatic10DTex[];
+extern u64 gMapGrandStatic10ETex[];
+extern u64 gMapGrandStatic10FTex[];
+extern u64 gMapGrandStatic110Tex[];
+extern u64 gMapGrandStatic111Tex[];
+extern u64 gMapGrandStatic112Tex[];
+extern u64 gMapGrandStatic113Tex[];
+extern u64 gMapGrandStatic114Tex[];
+extern u64 gMapGrandStatic115Tex[];
+extern u64 gMapGrandStatic116Tex[];
+extern u64 gMapGrandStatic117Tex[];
+extern u64 gMapGrandStatic118Tex[];
+extern u64 gMapGrandStatic119Tex[];
+extern u64 gMapGrandStatic11ATex[];
+extern u64 gMapGrandStatic11BTex[];
+extern u64 gMapGrandStatic11CTex[];
+extern u64 gMapGrandStatic11DTex[];
+extern u64 gMapGrandStatic11ETex[];
+extern u64 gMapGrandStatic11FTex[];
+extern u64 gMapGrandStatic120Tex[];
+extern u64 gMapGrandStatic121Tex[];
+extern u64 gMapGrandStatic122Tex[];
+extern u64 gMapGrandStatic123Tex[];
+extern u64 gMapGrandStatic124Tex[];
+extern u64 gMapGrandStatic125Tex[];
+extern u64 gMapGrandStatic126Tex[];
+extern u64 gMapGrandStatic127Tex[];
+extern u64 gMapGrandStatic128Tex[];
+extern u64 gMapGrandStatic129Tex[];
+extern u64 gMapGrandStatic12ATex[];
+extern u64 gMapGrandStatic12BTex[];
+extern u64 gMapGrandStatic12CTex[];
+extern u64 gMapGrandStatic12DTex[];
+extern u64 gMapGrandStatic12ETex[];
+extern u64 gMapGrandStatic12FTex[];
+extern u64 gMapGrandStatic130Tex[];
+extern u64 gMapGrandStatic131Tex[];
+extern u64 gMapGrandStatic132Tex[];
+extern u64 gMapGrandStatic133Tex[];
+extern u64 gMapGrandStatic134Tex[];
+extern u64 gMapGrandStatic135Tex[];
+extern u64 gMapGrandStatic136Tex[];
+extern u64 gMapGrandStatic137Tex[];
+extern u64 gMapGrandStatic138Tex[];
+extern u64 gMapGrandStatic139Tex[];
+extern u64 gMapGrandStatic13ATex[];
+extern u64 gMapGrandStatic13BTex[];
+extern u64 gMapGrandStatic13CTex[];
+extern u64 gMapGrandStatic13DTex[];
+extern u64 gMapGrandStatic13ETex[];
+extern u64 gMapGrandStatic13FTex[];
+extern u64 gMapGrandStatic140Tex[];
+extern u64 gMapGrandStatic141Tex[];
+extern u64 gMapGrandStatic142Tex[];
+extern u64 gMapGrandStatic143Tex[];
+extern u64 gMapGrandStatic144Tex[];
+extern u64 gMapGrandStatic145Tex[];
+extern u64 gMapGrandStatic146Tex[];
+extern u64 gMapGrandStatic147Tex[];
+extern u64 gMapGrandStatic148Tex[];
+extern u64 gMapGrandStatic149Tex[];
+extern u64 gMapGrandStatic14ATex[];
+extern u64 gMapGrandStatic14BTex[];
+extern u64 gMapGrandStatic14CTex[];
+extern u64 gMapGrandStatic14DTex[];
+extern u64 gMapGrandStatic14ETex[];
+extern u64 gMapGrandStatic14FTex[];
+extern u64 gMapGrandStatic150Tex[];
+extern u64 gMapGrandStatic151Tex[];
+extern u64 gMapGrandStatic152Tex[];
+extern u64 gMapGrandStatic153Tex[];
+extern u64 gMapGrandStatic154Tex[];
+extern u64 gMapGrandStatic155Tex[];
+extern u64 gMapGrandStatic156Tex[];
+extern u64 gMapGrandStatic157Tex[];
+extern u64 gMapGrandStatic158Tex[];
+extern u64 gMapGrandStatic159Tex[];
+extern u64 gMapGrandStatic15ATex[];
+extern u64 gMapGrandStatic15BTex[];
+extern u64 gMapGrandStatic15CTex[];
+extern u64 gMapGrandStatic15DTex[];
+extern u64 gMapGrandStatic15ETex[];
+extern u64 gMapGrandStatic15FTex[];
+extern u64 gMapGrandStatic160Tex[];
+extern u64 gMapGrandStatic161Tex[];
+
+#endif
diff --git a/assets/c/archives/map_i_static/map_i_static.c b/assets/c/archives/map_i_static/map_i_static.c
new file mode 100644
index 000000000..7b9432786
--- /dev/null
+++ b/assets/c/archives/map_i_static/map_i_static.c
@@ -0,0 +1,233 @@
+#include "map_i_static.h"
+
+u64 gMapIStatic00Tex[] = {
+#include "assets/archives/map_i_static/map_00.i4.inc.c"
+};
+
+u64 gMapIStatic01Tex[] = {
+#include "assets/archives/map_i_static/map_01.i4.inc.c"
+};
+
+u64 gMapIStatic02Tex[] = {
+#include "assets/archives/map_i_static/map_02.i4.inc.c"
+};
+
+u64 gMapIStatic03Tex[] = {
+#include "assets/archives/map_i_static/map_03.i4.inc.c"
+};
+
+u64 gMapIStatic04Tex[] = {
+#include "assets/archives/map_i_static/map_04.i4.inc.c"
+};
+
+u64 gMapIStatic05Tex[] = {
+#include "assets/archives/map_i_static/map_05.i4.inc.c"
+};
+
+u64 gMapIStatic06Tex[] = {
+#include "assets/archives/map_i_static/map_06.i4.inc.c"
+};
+
+u64 gMapIStatic07Tex[] = {
+#include "assets/archives/map_i_static/map_07.i4.inc.c"
+};
+
+u64 gMapIStatic08Tex[] = {
+#include "assets/archives/map_i_static/map_08.i4.inc.c"
+};
+
+u64 gMapIStatic09Tex[] = {
+#include "assets/archives/map_i_static/map_09.i4.inc.c"
+};
+
+u64 gMapIStatic0ATex[] = {
+#include "assets/archives/map_i_static/map_0A.i4.inc.c"
+};
+
+u64 gMapIStatic0BTex[] = {
+#include "assets/archives/map_i_static/map_0B.i4.inc.c"
+};
+
+u64 gMapIStatic0CTex[] = {
+#include "assets/archives/map_i_static/map_0C.i4.inc.c"
+};
+
+u64 gMapIStatic0DTex[] = {
+#include "assets/archives/map_i_static/map_0D.i4.inc.c"
+};
+
+u64 gMapIStatic0ETex[] = {
+#include "assets/archives/map_i_static/map_0E.i4.inc.c"
+};
+
+u64 gMapIStatic0FTex[] = {
+#include "assets/archives/map_i_static/map_0F.i4.inc.c"
+};
+
+u64 gMapIStatic10Tex[] = {
+#include "assets/archives/map_i_static/map_10.i4.inc.c"
+};
+
+u64 gMapIStatic11Tex[] = {
+#include "assets/archives/map_i_static/map_11.i4.inc.c"
+};
+
+u64 gMapIStatic12Tex[] = {
+#include "assets/archives/map_i_static/map_12.i4.inc.c"
+};
+
+u64 gMapIStatic13Tex[] = {
+#include "assets/archives/map_i_static/map_13.i4.inc.c"
+};
+
+u64 gMapIStatic14Tex[] = {
+#include "assets/archives/map_i_static/map_14.i4.inc.c"
+};
+
+u64 gMapIStatic15Tex[] = {
+#include "assets/archives/map_i_static/map_15.i4.inc.c"
+};
+
+u64 gMapIStatic16Tex[] = {
+#include "assets/archives/map_i_static/map_16.i4.inc.c"
+};
+
+u64 gMapIStatic17Tex[] = {
+#include "assets/archives/map_i_static/map_17.i4.inc.c"
+};
+
+u64 gMapIStatic18Tex[] = {
+#include "assets/archives/map_i_static/map_18.i4.inc.c"
+};
+
+u64 gMapIStatic19Tex[] = {
+#include "assets/archives/map_i_static/map_19.i4.inc.c"
+};
+
+u64 gMapIStatic1ATex[] = {
+#include "assets/archives/map_i_static/map_1A.i4.inc.c"
+};
+
+u64 gMapIStatic1BTex[] = {
+#include "assets/archives/map_i_static/map_1B.i4.inc.c"
+};
+
+u64 gMapIStatic1CTex[] = {
+#include "assets/archives/map_i_static/map_1C.i4.inc.c"
+};
+
+u64 gMapIStatic1DTex[] = {
+#include "assets/archives/map_i_static/map_1D.i4.inc.c"
+};
+
+u64 gMapIStatic1ETex[] = {
+#include "assets/archives/map_i_static/map_1E.i4.inc.c"
+};
+
+u64 gMapIStatic1FTex[] = {
+#include "assets/archives/map_i_static/map_1F.i4.inc.c"
+};
+
+u64 gMapIStatic20Tex[] = {
+#include "assets/archives/map_i_static/map_20.i4.inc.c"
+};
+
+u64 gMapIStatic21Tex[] = {
+#include "assets/archives/map_i_static/map_21.i4.inc.c"
+};
+
+u64 gMapIStatic22Tex[] = {
+#include "assets/archives/map_i_static/map_22.i4.inc.c"
+};
+
+u64 gMapIStatic23Tex[] = {
+#include "assets/archives/map_i_static/map_23.i4.inc.c"
+};
+
+u64 gMapIStatic24Tex[] = {
+#include "assets/archives/map_i_static/map_24.i4.inc.c"
+};
+
+u64 gMapIStatic25Tex[] = {
+#include "assets/archives/map_i_static/map_25.i4.inc.c"
+};
+
+u64 gMapIStatic26Tex[] = {
+#include "assets/archives/map_i_static/map_26.i4.inc.c"
+};
+
+u64 gMapIStatic27Tex[] = {
+#include "assets/archives/map_i_static/map_27.i4.inc.c"
+};
+
+u64 gMapIStatic28Tex[] = {
+#include "assets/archives/map_i_static/map_28.i4.inc.c"
+};
+
+u64 gMapIStatic29Tex[] = {
+#include "assets/archives/map_i_static/map_29.i4.inc.c"
+};
+
+u64 gMapIStatic2ATex[] = {
+#include "assets/archives/map_i_static/map_2A.i4.inc.c"
+};
+
+u64 gMapIStatic2BTex[] = {
+#include "assets/archives/map_i_static/map_2B.i4.inc.c"
+};
+
+u64 gMapIStatic2CTex[] = {
+#include "assets/archives/map_i_static/map_2C.i4.inc.c"
+};
+
+u64 gMapIStatic2DTex[] = {
+#include "assets/archives/map_i_static/map_2D.i4.inc.c"
+};
+
+u64 gMapIStatic2ETex[] = {
+#include "assets/archives/map_i_static/map_2E.i4.inc.c"
+};
+
+u64 gMapIStatic2FTex[] = {
+#include "assets/archives/map_i_static/map_2F.i4.inc.c"
+};
+
+u64 gMapIStatic30Tex[] = {
+#include "assets/archives/map_i_static/map_30.i4.inc.c"
+};
+
+u64 gMapIStatic31Tex[] = {
+#include "assets/archives/map_i_static/map_31.i4.inc.c"
+};
+
+u64 gMapIStatic32Tex[] = {
+#include "assets/archives/map_i_static/map_32.i4.inc.c"
+};
+
+u64 gMapIStatic33Tex[] = {
+#include "assets/archives/map_i_static/map_33.i4.inc.c"
+};
+
+u64 gMapIStatic34Tex[] = {
+#include "assets/archives/map_i_static/map_34.i4.inc.c"
+};
+
+u64 gMapIStatic35Tex[] = {
+#include "assets/archives/map_i_static/map_35.i4.inc.c"
+};
+
+u64 gMapIStatic36Tex[] = {
+#include "assets/archives/map_i_static/map_36.i4.inc.c"
+};
+
+u64 gMapIStatic37Tex[] = {
+#include "assets/archives/map_i_static/map_37.i4.inc.c"
+};
+
+u64 gMapIStatic38Tex[] = {
+#include "assets/archives/map_i_static/map_38.i4.inc.c"
+};
+
+u64 gMapIStatic39Tex[] = {
+#include "assets/archives/map_i_static/map_39.i4.inc.c"
+};
diff --git a/assets/c/archives/map_i_static/map_i_static.h b/assets/c/archives/map_i_static/map_i_static.h
new file mode 100644
index 000000000..c614bb6f8
--- /dev/null
+++ b/assets/c/archives/map_i_static/map_i_static.h
@@ -0,0 +1,65 @@
+#ifndef MAP_I_STATIC_H
+#define MAP_I_STATIC_H 1
+
+#include "ultra64.h"
+
+extern u64 gMapIStatic00Tex[];
+extern u64 gMapIStatic01Tex[];
+extern u64 gMapIStatic02Tex[];
+extern u64 gMapIStatic03Tex[];
+extern u64 gMapIStatic04Tex[];
+extern u64 gMapIStatic05Tex[];
+extern u64 gMapIStatic06Tex[];
+extern u64 gMapIStatic07Tex[];
+extern u64 gMapIStatic08Tex[];
+extern u64 gMapIStatic09Tex[];
+extern u64 gMapIStatic0ATex[];
+extern u64 gMapIStatic0BTex[];
+extern u64 gMapIStatic0CTex[];
+extern u64 gMapIStatic0DTex[];
+extern u64 gMapIStatic0ETex[];
+extern u64 gMapIStatic0FTex[];
+extern u64 gMapIStatic10Tex[];
+extern u64 gMapIStatic11Tex[];
+extern u64 gMapIStatic12Tex[];
+extern u64 gMapIStatic13Tex[];
+extern u64 gMapIStatic14Tex[];
+extern u64 gMapIStatic15Tex[];
+extern u64 gMapIStatic16Tex[];
+extern u64 gMapIStatic17Tex[];
+extern u64 gMapIStatic18Tex[];
+extern u64 gMapIStatic19Tex[];
+extern u64 gMapIStatic1ATex[];
+extern u64 gMapIStatic1BTex[];
+extern u64 gMapIStatic1CTex[];
+extern u64 gMapIStatic1DTex[];
+extern u64 gMapIStatic1ETex[];
+extern u64 gMapIStatic1FTex[];
+extern u64 gMapIStatic20Tex[];
+extern u64 gMapIStatic21Tex[];
+extern u64 gMapIStatic22Tex[];
+extern u64 gMapIStatic23Tex[];
+extern u64 gMapIStatic24Tex[];
+extern u64 gMapIStatic25Tex[];
+extern u64 gMapIStatic26Tex[];
+extern u64 gMapIStatic27Tex[];
+extern u64 gMapIStatic28Tex[];
+extern u64 gMapIStatic29Tex[];
+extern u64 gMapIStatic2ATex[];
+extern u64 gMapIStatic2BTex[];
+extern u64 gMapIStatic2CTex[];
+extern u64 gMapIStatic2DTex[];
+extern u64 gMapIStatic2ETex[];
+extern u64 gMapIStatic2FTex[];
+extern u64 gMapIStatic30Tex[];
+extern u64 gMapIStatic31Tex[];
+extern u64 gMapIStatic32Tex[];
+extern u64 gMapIStatic33Tex[];
+extern u64 gMapIStatic34Tex[];
+extern u64 gMapIStatic35Tex[];
+extern u64 gMapIStatic36Tex[];
+extern u64 gMapIStatic37Tex[];
+extern u64 gMapIStatic38Tex[];
+extern u64 gMapIStatic39Tex[];
+
+#endif
diff --git a/assets/xml/archives/map_grand_static.xml b/assets/xml/archives/map_grand_static.xml
index d5d80bdd6..05e5893c1 100644
--- a/assets/xml/archives/map_grand_static.xml
+++ b/assets/xml/archives/map_grand_static.xml
@@ -1,102 +1,102 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/archives/map_i_static.xml b/assets/xml/archives/map_i_static.xml
index dbb64185d..fce2cc437 100644
--- a/assets/xml/archives/map_i_static.xml
+++ b/assets/xml/archives/map_i_static.xml
@@ -1,62 +1,62 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/extract_assets.py b/extract_assets.py
index dda5efaec..4d64d7d13 100755
--- a/extract_assets.py
+++ b/extract_assets.py
@@ -6,6 +6,11 @@ colorama.init()
EXTRACTED_ASSETS_NAMEFILE = ".extracted-assets.json"
+dontGenerateCFilesList = [
+ "map_grand_static",
+ "map_i_static",
+]
+
def SignalHandler(sig, frame):
print(f'Signal {sig} received. Aborting...')
mainAbort.set()
@@ -16,7 +21,13 @@ def ExtractFile(xmlPath, outputPath, outputSourcePath):
# Don't extract if another file wasn't extracted properly.
return
- execStr = f"tools/ZAPD/ZAPD.out e -eh -i {xmlPath} -b baserom/ -o {outputPath} -osf {outputSourcePath} -gsf 1 -rconf tools/ZAPDConfigs/MM/Config.xml {ZAPDArgs}"
+ generateSourceFile = "1"
+ for name in dontGenerateCFilesList:
+ if name in xmlPath:
+ generateSourceFile = "0"
+ break
+
+ execStr = f"tools/ZAPD/ZAPD.out e -eh -i {xmlPath} -b baserom/ -o {outputPath} -osf {outputSourcePath} -gsf {generateSourceFile} -rconf tools/ZAPDConfigs/MM/Config.xml {ZAPDArgs}"
if globalUnaccounted:
execStr += " -Wunaccounted"
diff --git a/include/functions.h b/include/functions.h
index 3f45030a9..cfdba9d65 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -312,8 +312,8 @@ s32 func_800B7128(Player* player);
s32 func_800B715C(PlayState* play);
void Actor_SetCameraHorseSetting(PlayState* play, Player* player);
void Actor_MountHorse(PlayState* play, Player* player, Actor* horse);
-s32 func_800B724C(PlayState* play, Actor* actor, u8 csMode);
-s32 func_800B7298(PlayState* play, Actor* actor, u8 csMode);
+s32 func_800B724C(PlayState* play, Actor* actor, u8 csAction);
+s32 func_800B7298(PlayState* play, Actor* actor, u8 csAction);
void func_800B72F8(DynaPolyActor* dyna, f32 extraPushForce, s16 yRotation);
s32 Player_IsFacingActor(Actor* actor, s16 maxAngleDiff, PlayState* play);
@@ -897,17 +897,6 @@ void SkinMatrix_SetYRotation(MtxF* mf, s16 a);
void SkinMatrix_MulYRotation(MtxF* mf, s16 a);
void SkinMatrix_SetZRotation(MtxF* mf, s16 a);
-void func_80140E80(Struct_80140E80* arg0);
-void func_80140EA0(Struct_80140E80* arg0);
-// void func_80140EAC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
-// void func_80141008(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
-void func_8014116C(Gfx** gfxP, u16* arg1, u16* workBuffer, s32 width, s32 height, s32 arg5);
-// void func_801411B4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
-// void func_80141200(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
-// void func_8014151C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
-// void func_80141678(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
-void func_80141778(Struct_80140E80* arg0, Gfx** gfxp, void* unk_18E60, GraphicsContext* gfxCtx);
-
uintptr_t KaleidoManager_FaultAddrConv(uintptr_t address, void* param);
void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl);
void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl);
diff --git a/include/gfx.h b/include/gfx.h
index 63b3eadfc..bc309001e 100644
--- a/include/gfx.h
+++ b/include/gfx.h
@@ -272,4 +272,13 @@ extern Gfx gEmptyDL[];
} \
(void)0
+// used only by code_80140E80
+#define gDPSetLODColor(pkt, c, m, l, d) \
+ _DW({ \
+ Gfx* _g = (Gfx*)(pkt); \
+ \
+ _g->words.w0 = (_SHIFTL(c, 24, 8) | _SHIFTL(m, 8, 8) | _SHIFTL(l, 0, 8)); \
+ _g->words.w1 = (unsigned int)(d); \
+ })
+
#endif
diff --git a/include/macros.h b/include/macros.h
index 9513893bb..1e7920a11 100644
--- a/include/macros.h
+++ b/include/macros.h
@@ -89,7 +89,10 @@
#define DECR(x) ((x) == 0 ? 0 : --(x))
+//! checks min first
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
+//! checks max first
+#define CLAMP_ALT(x, min, max) ((x) > (max) ? (max) : (x) < (min) ? (min) : (x))
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
diff --git a/include/z64.h b/include/z64.h
index 57c25047e..072a1296a 100644
--- a/include/z64.h
+++ b/include/z64.h
@@ -208,7 +208,7 @@ typedef struct PlayState {
/* 0x18770 */ void (*unk_18770)(struct PlayState* play, Player* player);
/* 0x18774 */ s32 (*startPlayerFishing)(struct PlayState* play);
/* 0x18778 */ s32 (*grabPlayer)(struct PlayState* play, Player* player);
- /* 0x1877C */ s32 (*startPlayerCutscene)(struct PlayState* play, Player* player, PlayerCsMode csMode);
+ /* 0x1877C */ s32 (*startPlayerCutscene)(struct PlayState* play, Player* player, PlayerCsAction csAction);
/* 0x18780 */ void (*func_18780)(Player* player, struct PlayState* play);
/* 0x18784 */ s32 (*damagePlayer)(struct PlayState* play, s32 damage);
/* 0x18788 */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor);
@@ -271,12 +271,4 @@ typedef enum {
/* 3 */ PICTO_PHOTO_STATE_READY
} PictoPhotoState;
-typedef struct {
- /* 0x00 */ u8 mode;
- /* 0x04 */ f32 scale;
- /* 0x08 */ f32 lodProportion; // expected to be between 0.0f and 1.0f
- /* 0x0C */ Color_RGBA8_u32 primColor;
- /* 0x10 */ Color_RGBA8_u32 envColor;
-} Struct_80140E80; // size = 0x14
-
#endif
diff --git a/include/z64camera.h b/include/z64camera.h
index 18ebe639a..c2d7ebcdc 100644
--- a/include/z64camera.h
+++ b/include/z64camera.h
@@ -3,7 +3,11 @@
#include "ultra64.h"
#include "z64math.h"
+#include "z64actor.h"
#include "z64save.h"
+#include "unk.h"
+
+struct CollisionPoly;
// these two angle conversion macros are slightly inaccurate
#define CAM_DEG_TO_BINANG(degrees) (s16)((degrees) * ((f32)0xFFFF / 360) + .5f)
@@ -374,7 +378,7 @@ typedef enum {
typedef struct {
/* 0x00 */ Vec3f pos;
/* 0x0C */ Vec3f norm;
- /* 0x18 */ CollisionPoly* poly;
+ /* 0x18 */ struct CollisionPoly* poly;
/* 0x1C */ VecGeo geoNorm;
/* 0x24 */ s32 bgId;
} CameraCollision; // size = 0x28
diff --git a/include/z64cutscene.h b/include/z64cutscene.h
index 69cc5ce50..8cdd01a66 100644
--- a/include/z64cutscene.h
+++ b/include/z64cutscene.h
@@ -560,8 +560,8 @@ typedef enum {
/* 0x1B */ CS_MISC_DEST_MOON_CRASH_FIRE_WALL,
/* 0x1C */ CS_MISC_MOON_CRASH_SKYBOX,
/* 0x1D */ CS_MISC_PLAYER_FORM_RESTORED,
- /* 0x1E */ CS_MISC_DISABLE_PLAYER_CSMODE_START_POS,
- /* 0x1F */ CS_MISC_ENABLE_PLAYER_CSMODE_START_POS,
+ /* 0x1E */ CS_MISC_DISABLE_PLAYER_CSACTION_START_POS,
+ /* 0x1F */ CS_MISC_ENABLE_PLAYER_CSACTION_START_POS,
/* 0x20 */ CS_MISC_UNIMPLEMENTED_20,
/* 0x21 */ CS_MISC_SAVE_ENTER_CLOCK_TOWN,
/* 0x22 */ CS_MISC_RESET_SAVE_FROM_MOON_CRASH,
@@ -859,7 +859,7 @@ s32 CutsceneFlags_Get(struct PlayState* play, s16 flag);
extern u8 gOpeningEntranceIndex;
extern u8 D_801F4DDC;
-extern u8 gDisablePlayerCsModeStartPos;
+extern u8 gDisablePlayerCsActionStartPos;
extern s16 gDungeonBossWarpSceneId;
#endif
diff --git a/include/z64player.h b/include/z64player.h
index 3f0af150a..a5f268627 100644
--- a/include/z64player.h
+++ b/include/z64player.h
@@ -606,149 +606,149 @@ typedef struct struct_80122744_arg1 {
/* 0x4 */ Vec3s* unk_04;
} struct_80122744_arg1; // size = 0x8
-typedef enum PlayerCsMode {
- /* 0x00 */ PLAYER_CSMODE_NONE,
- /* 0x01 */ PLAYER_CSMODE_1,
- /* 0x02 */ PLAYER_CSMODE_2,
- /* 0x03 */ PLAYER_CSMODE_3,
- /* 0x04 */ PLAYER_CSMODE_4,
- /* 0x05 */ PLAYER_CSMODE_5,
- /* 0x06 */ PLAYER_CSMODE_END,
- /* 0x07 */ PLAYER_CSMODE_WAIT,
- /* 0x08 */ PLAYER_CSMODE_8,
- /* 0x09 */ PLAYER_CSMODE_9,
- /* 0x0A */ PLAYER_CSMODE_10,
- /* 0x0B */ PLAYER_CSMODE_11,
- /* 0x0C */ PLAYER_CSMODE_12,
- /* 0x0D */ PLAYER_CSMODE_13,
- /* 0x0E */ PLAYER_CSMODE_14,
- /* 0x0F */ PLAYER_CSMODE_15,
- /* 0x10 */ PLAYER_CSMODE_16,
- /* 0x11 */ PLAYER_CSMODE_17,
- /* 0x12 */ PLAYER_CSMODE_18, // Strangled by Wallmaster
- /* 0x13 */ PLAYER_CSMODE_19,
- /* 0x14 */ PLAYER_CSMODE_20,
- /* 0x15 */ PLAYER_CSMODE_21,
- /* 0x16 */ PLAYER_CSMODE_22,
- /* 0x17 */ PLAYER_CSMODE_23,
- /* 0x18 */ PLAYER_CSMODE_24,
- /* 0x19 */ PLAYER_CSMODE_25,
- /* 0x1A */ PLAYER_CSMODE_26, // Halt!
- /* 0x1B */ PLAYER_CSMODE_27,
- /* 0x1C */ PLAYER_CSMODE_28,
- /* 0x1D */ PLAYER_CSMODE_29,
- /* 0x1E */ PLAYER_CSMODE_30,
- /* 0x1F */ PLAYER_CSMODE_31,
- /* 0x20 */ PLAYER_CSMODE_32,
- /* 0x21 */ PLAYER_CSMODE_33,
- /* 0x22 */ PLAYER_CSMODE_34,
- /* 0x23 */ PLAYER_CSMODE_35,
- /* 0x24 */ PLAYER_CSMODE_36,
- /* 0x25 */ PLAYER_CSMODE_37,
- /* 0x26 */ PLAYER_CSMODE_38,
- /* 0x27 */ PLAYER_CSMODE_39,
- /* 0x28 */ PLAYER_CSMODE_40,
- /* 0x29 */ PLAYER_CSMODE_41,
- /* 0x2A */ PLAYER_CSMODE_42,
- /* 0x2B */ PLAYER_CSMODE_43,
- /* 0x2C */ PLAYER_CSMODE_44,
- /* 0x2D */ PLAYER_CSMODE_45,
- /* 0x2E */ PLAYER_CSMODE_46,
- /* 0x2F */ PLAYER_CSMODE_47,
- /* 0x30 */ PLAYER_CSMODE_48,
- /* 0x31 */ PLAYER_CSMODE_49,
- /* 0x32 */ PLAYER_CSMODE_50,
- /* 0x33 */ PLAYER_CSMODE_51,
- /* 0x34 */ PLAYER_CSMODE_52,
- /* 0x35 */ PLAYER_CSMODE_53,
- /* 0x36 */ PLAYER_CSMODE_54,
- /* 0x37 */ PLAYER_CSMODE_55,
- /* 0x38 */ PLAYER_CSMODE_56,
- /* 0x39 */ PLAYER_CSMODE_57,
- /* 0x3A */ PLAYER_CSMODE_58,
- /* 0x3B */ PLAYER_CSMODE_59,
- /* 0x3C */ PLAYER_CSMODE_60,
- /* 0x3D */ PLAYER_CSMODE_61,
- /* 0x3E */ PLAYER_CSMODE_62,
- /* 0x3F */ PLAYER_CSMODE_63,
- /* 0x40 */ PLAYER_CSMODE_64,
- /* 0x41 */ PLAYER_CSMODE_65,
- /* 0x42 */ PLAYER_CSMODE_66, // Look side-to-side with chin down
- /* 0x43 */ PLAYER_CSMODE_67,
- /* 0x44 */ PLAYER_CSMODE_68,
- /* 0x45 */ PLAYER_CSMODE_69,
- /* 0x46 */ PLAYER_CSMODE_70,
- /* 0x47 */ PLAYER_CSMODE_71,
- /* 0x48 */ PLAYER_CSMODE_72,
- /* 0x49 */ PLAYER_CSMODE_73,
- /* 0x4A */ PLAYER_CSMODE_74, // Give a big nod of approval
- /* 0x4B */ PLAYER_CSMODE_75,
- /* 0x4C */ PLAYER_CSMODE_76,
- /* 0x4D */ PLAYER_CSMODE_77,
- /* 0x4E */ PLAYER_CSMODE_78,
- /* 0x4F */ PLAYER_CSMODE_79,
- /* 0x50 */ PLAYER_CSMODE_80,
- /* 0x51 */ PLAYER_CSMODE_81, // Look side-to-side with chin up
- /* 0x52 */ PLAYER_CSMODE_82, // Close eyes and sway body in circles
- /* 0x53 */ PLAYER_CSMODE_83,
- /* 0x54 */ PLAYER_CSMODE_84, // Sucked by the moon
- /* 0x55 */ PLAYER_CSMODE_85,
- /* 0x56 */ PLAYER_CSMODE_86,
- /* 0x57 */ PLAYER_CSMODE_87,
- /* 0x58 */ PLAYER_CSMODE_88,
- /* 0x59 */ PLAYER_CSMODE_89,
- /* 0x5A */ PLAYER_CSMODE_90,
- /* 0x5B */ PLAYER_CSMODE_91,
- /* 0x5C */ PLAYER_CSMODE_92,
- /* 0x5D */ PLAYER_CSMODE_93,
- /* 0x5E */ PLAYER_CSMODE_94,
- /* 0x5F */ PLAYER_CSMODE_95,
- /* 0x60 */ PLAYER_CSMODE_96,
- /* 0x61 */ PLAYER_CSMODE_97,
- /* 0x62 */ PLAYER_CSMODE_98,
- /* 0x63 */ PLAYER_CSMODE_99,
- /* 0x64 */ PLAYER_CSMODE_100,
- /* 0x65 */ PLAYER_CSMODE_101,
- /* 0x66 */ PLAYER_CSMODE_102,
- /* 0x67 */ PLAYER_CSMODE_103,
- /* 0x68 */ PLAYER_CSMODE_104,
- /* 0x69 */ PLAYER_CSMODE_105,
- /* 0x6A */ PLAYER_CSMODE_106,
- /* 0x6B */ PLAYER_CSMODE_107,
- /* 0x6C */ PLAYER_CSMODE_108,
- /* 0x6D */ PLAYER_CSMODE_109,
- /* 0x6E */ PLAYER_CSMODE_110,
- /* 0x6F */ PLAYER_CSMODE_111,
- /* 0x70 */ PLAYER_CSMODE_112,
- /* 0x71 */ PLAYER_CSMODE_113,
- /* 0x72 */ PLAYER_CSMODE_114,
- /* 0x73 */ PLAYER_CSMODE_115,
- /* 0x74 */ PLAYER_CSMODE_116,
- /* 0x75 */ PLAYER_CSMODE_117,
- /* 0x76 */ PLAYER_CSMODE_118,
- /* 0x77 */ PLAYER_CSMODE_119,
- /* 0x78 */ PLAYER_CSMODE_120,
- /* 0x79 */ PLAYER_CSMODE_121,
- /* 0x7A */ PLAYER_CSMODE_122,
- /* 0x7B */ PLAYER_CSMODE_123,
- /* 0x7C */ PLAYER_CSMODE_124,
- /* 0x7D */ PLAYER_CSMODE_125,
- /* 0x7E */ PLAYER_CSMODE_126,
- /* 0x7F */ PLAYER_CSMODE_127,
- /* 0x80 */ PLAYER_CSMODE_128,
- /* 0x81 */ PLAYER_CSMODE_129,
- /* 0x82 */ PLAYER_CSMODE_130,
- /* 0x83 */ PLAYER_CSMODE_131,
- /* 0x84 */ PLAYER_CSMODE_132,
- /* 0x85 */ PLAYER_CSMODE_133,
- /* 0x86 */ PLAYER_CSMODE_134,
- /* 0x87 */ PLAYER_CSMODE_135,
- /* 0x88 */ PLAYER_CSMODE_136,
- /* 0x89 */ PLAYER_CSMODE_137,
- /* 0x8A */ PLAYER_CSMODE_138,
- /* 0x8B */ PLAYER_CSMODE_139,
- /* 0x8C */ PLAYER_CSMODE_MAX
-} PlayerCsMode;
+typedef enum PlayerCsAction {
+ /* 0x00 */ PLAYER_CSACTION_NONE,
+ /* 0x01 */ PLAYER_CSACTION_1,
+ /* 0x02 */ PLAYER_CSACTION_2,
+ /* 0x03 */ PLAYER_CSACTION_3,
+ /* 0x04 */ PLAYER_CSACTION_4,
+ /* 0x05 */ PLAYER_CSACTION_5,
+ /* 0x06 */ PLAYER_CSACTION_END,
+ /* 0x07 */ PLAYER_CSACTION_WAIT,
+ /* 0x08 */ PLAYER_CSACTION_8,
+ /* 0x09 */ PLAYER_CSACTION_9,
+ /* 0x0A */ PLAYER_CSACTION_10,
+ /* 0x0B */ PLAYER_CSACTION_11,
+ /* 0x0C */ PLAYER_CSACTION_12,
+ /* 0x0D */ PLAYER_CSACTION_13,
+ /* 0x0E */ PLAYER_CSACTION_14,
+ /* 0x0F */ PLAYER_CSACTION_15,
+ /* 0x10 */ PLAYER_CSACTION_16,
+ /* 0x11 */ PLAYER_CSACTION_17,
+ /* 0x12 */ PLAYER_CSACTION_18, // Strangled by Wallmaster
+ /* 0x13 */ PLAYER_CSACTION_19,
+ /* 0x14 */ PLAYER_CSACTION_20,
+ /* 0x15 */ PLAYER_CSACTION_21,
+ /* 0x16 */ PLAYER_CSACTION_22,
+ /* 0x17 */ PLAYER_CSACTION_23,
+ /* 0x18 */ PLAYER_CSACTION_24,
+ /* 0x19 */ PLAYER_CSACTION_25,
+ /* 0x1A */ PLAYER_CSACTION_26, // Halt!
+ /* 0x1B */ PLAYER_CSACTION_27,
+ /* 0x1C */ PLAYER_CSACTION_28,
+ /* 0x1D */ PLAYER_CSACTION_29,
+ /* 0x1E */ PLAYER_CSACTION_30,
+ /* 0x1F */ PLAYER_CSACTION_31,
+ /* 0x20 */ PLAYER_CSACTION_32,
+ /* 0x21 */ PLAYER_CSACTION_33,
+ /* 0x22 */ PLAYER_CSACTION_34,
+ /* 0x23 */ PLAYER_CSACTION_35,
+ /* 0x24 */ PLAYER_CSACTION_36,
+ /* 0x25 */ PLAYER_CSACTION_37,
+ /* 0x26 */ PLAYER_CSACTION_38,
+ /* 0x27 */ PLAYER_CSACTION_39,
+ /* 0x28 */ PLAYER_CSACTION_40,
+ /* 0x29 */ PLAYER_CSACTION_41,
+ /* 0x2A */ PLAYER_CSACTION_42,
+ /* 0x2B */ PLAYER_CSACTION_43,
+ /* 0x2C */ PLAYER_CSACTION_44,
+ /* 0x2D */ PLAYER_CSACTION_45,
+ /* 0x2E */ PLAYER_CSACTION_46,
+ /* 0x2F */ PLAYER_CSACTION_47,
+ /* 0x30 */ PLAYER_CSACTION_48,
+ /* 0x31 */ PLAYER_CSACTION_49,
+ /* 0x32 */ PLAYER_CSACTION_50,
+ /* 0x33 */ PLAYER_CSACTION_51,
+ /* 0x34 */ PLAYER_CSACTION_52,
+ /* 0x35 */ PLAYER_CSACTION_53,
+ /* 0x36 */ PLAYER_CSACTION_54,
+ /* 0x37 */ PLAYER_CSACTION_55,
+ /* 0x38 */ PLAYER_CSACTION_56,
+ /* 0x39 */ PLAYER_CSACTION_57,
+ /* 0x3A */ PLAYER_CSACTION_58,
+ /* 0x3B */ PLAYER_CSACTION_59,
+ /* 0x3C */ PLAYER_CSACTION_60,
+ /* 0x3D */ PLAYER_CSACTION_61,
+ /* 0x3E */ PLAYER_CSACTION_62,
+ /* 0x3F */ PLAYER_CSACTION_63,
+ /* 0x40 */ PLAYER_CSACTION_64,
+ /* 0x41 */ PLAYER_CSACTION_65,
+ /* 0x42 */ PLAYER_CSACTION_66, // Look side-to-side with chin down
+ /* 0x43 */ PLAYER_CSACTION_67,
+ /* 0x44 */ PLAYER_CSACTION_68,
+ /* 0x45 */ PLAYER_CSACTION_69,
+ /* 0x46 */ PLAYER_CSACTION_70,
+ /* 0x47 */ PLAYER_CSACTION_71,
+ /* 0x48 */ PLAYER_CSACTION_72,
+ /* 0x49 */ PLAYER_CSACTION_73,
+ /* 0x4A */ PLAYER_CSACTION_74, // Give a big nod of approval
+ /* 0x4B */ PLAYER_CSACTION_75,
+ /* 0x4C */ PLAYER_CSACTION_76,
+ /* 0x4D */ PLAYER_CSACTION_77,
+ /* 0x4E */ PLAYER_CSACTION_78,
+ /* 0x4F */ PLAYER_CSACTION_79,
+ /* 0x50 */ PLAYER_CSACTION_80,
+ /* 0x51 */ PLAYER_CSACTION_81, // Look side-to-side with chin up
+ /* 0x52 */ PLAYER_CSACTION_82, // Close eyes and sway body in circles
+ /* 0x53 */ PLAYER_CSACTION_83,
+ /* 0x54 */ PLAYER_CSACTION_84, // Sucked by the moon
+ /* 0x55 */ PLAYER_CSACTION_85,
+ /* 0x56 */ PLAYER_CSACTION_86,
+ /* 0x57 */ PLAYER_CSACTION_87,
+ /* 0x58 */ PLAYER_CSACTION_88,
+ /* 0x59 */ PLAYER_CSACTION_89,
+ /* 0x5A */ PLAYER_CSACTION_90,
+ /* 0x5B */ PLAYER_CSACTION_91,
+ /* 0x5C */ PLAYER_CSACTION_92,
+ /* 0x5D */ PLAYER_CSACTION_93,
+ /* 0x5E */ PLAYER_CSACTION_94,
+ /* 0x5F */ PLAYER_CSACTION_95,
+ /* 0x60 */ PLAYER_CSACTION_96,
+ /* 0x61 */ PLAYER_CSACTION_97,
+ /* 0x62 */ PLAYER_CSACTION_98,
+ /* 0x63 */ PLAYER_CSACTION_99,
+ /* 0x64 */ PLAYER_CSACTION_100,
+ /* 0x65 */ PLAYER_CSACTION_101,
+ /* 0x66 */ PLAYER_CSACTION_102,
+ /* 0x67 */ PLAYER_CSACTION_103,
+ /* 0x68 */ PLAYER_CSACTION_104,
+ /* 0x69 */ PLAYER_CSACTION_105,
+ /* 0x6A */ PLAYER_CSACTION_106,
+ /* 0x6B */ PLAYER_CSACTION_107,
+ /* 0x6C */ PLAYER_CSACTION_108,
+ /* 0x6D */ PLAYER_CSACTION_109,
+ /* 0x6E */ PLAYER_CSACTION_110,
+ /* 0x6F */ PLAYER_CSACTION_111,
+ /* 0x70 */ PLAYER_CSACTION_112,
+ /* 0x71 */ PLAYER_CSACTION_113,
+ /* 0x72 */ PLAYER_CSACTION_114,
+ /* 0x73 */ PLAYER_CSACTION_115,
+ /* 0x74 */ PLAYER_CSACTION_116,
+ /* 0x75 */ PLAYER_CSACTION_117,
+ /* 0x76 */ PLAYER_CSACTION_118,
+ /* 0x77 */ PLAYER_CSACTION_119,
+ /* 0x78 */ PLAYER_CSACTION_120,
+ /* 0x79 */ PLAYER_CSACTION_121,
+ /* 0x7A */ PLAYER_CSACTION_122,
+ /* 0x7B */ PLAYER_CSACTION_123,
+ /* 0x7C */ PLAYER_CSACTION_124,
+ /* 0x7D */ PLAYER_CSACTION_125,
+ /* 0x7E */ PLAYER_CSACTION_126,
+ /* 0x7F */ PLAYER_CSACTION_127,
+ /* 0x80 */ PLAYER_CSACTION_128,
+ /* 0x81 */ PLAYER_CSACTION_129,
+ /* 0x82 */ PLAYER_CSACTION_130,
+ /* 0x83 */ PLAYER_CSACTION_131,
+ /* 0x84 */ PLAYER_CSACTION_132,
+ /* 0x85 */ PLAYER_CSACTION_133,
+ /* 0x86 */ PLAYER_CSACTION_134,
+ /* 0x87 */ PLAYER_CSACTION_135,
+ /* 0x88 */ PLAYER_CSACTION_136,
+ /* 0x89 */ PLAYER_CSACTION_137,
+ /* 0x8A */ PLAYER_CSACTION_138,
+ /* 0x8B */ PLAYER_CSACTION_139,
+ /* 0x8C */ PLAYER_CSACTION_MAX
+} PlayerCsAction;
typedef enum PlayerCueId {
/* 0x00 */ PLAYER_CUEID_NONE,
@@ -1141,8 +1141,8 @@ typedef struct Player {
/* 0x388 */ Actor* interactRangeActor;
/* 0x38C */ s8 mountSide;
/* 0x390 */ Actor* rideActor;
- /* 0x394 */ u8 csMode; // PlayerCsMode enum
- /* 0x395 */ u8 prevCsMode; // PlayerCsMode enum
+ /* 0x394 */ u8 csAction; // PlayerCsAction enum
+ /* 0x395 */ u8 prevCsAction; // PlayerCsAction enum
/* 0x396 */ u8 cueId; // PlayerCueId enum
/* 0x397 */ u8 unk_397; // PlayerDoorType enum
/* 0x398 */ Actor* csActor;
diff --git a/include/z64quake.h b/include/z64quake.h
index 0150b5404..e98bfbbac 100644
--- a/include/z64quake.h
+++ b/include/z64quake.h
@@ -59,7 +59,7 @@ s16 Distortion_GetTimeLeft(void);
s16 Distortion_GetType(void);
void Distortion_RemoveRequest(s32 type);
-void Distortion_Init(PlayState* play);
+void Distortion_Init(struct PlayState* play);
void Distortion_Update(void);
#endif
diff --git a/include/z64save.h b/include/z64save.h
index 0b6821038..25ce107f8 100644
--- a/include/z64save.h
+++ b/include/z64save.h
@@ -5,6 +5,7 @@
#include "PR/os.h"
#include "z64item.h"
#include "z64math.h"
+#include "unk.h"
struct GameState;
struct PlayState;
diff --git a/include/z64transition.h b/include/z64transition.h
index fe6027a9f..267098997 100644
--- a/include/z64transition.h
+++ b/include/z64transition.h
@@ -81,7 +81,7 @@ typedef struct {
/* 0x8 */ u16 timer;
} TransitionFade; // size = 0xC
-#define FBDEMO_CIRCLE_GET_MASK_TYPE(type) (type & 1)
+#define FBDEMO_CIRCLE_GET_MASK_TYPE(type) ((type) & 1)
typedef struct {
/* 0x00 */ Color_RGBA8_u32 color;
diff --git a/include/z64visfbuf.h b/include/z64visfbuf.h
new file mode 100644
index 000000000..00961b7da
--- /dev/null
+++ b/include/z64visfbuf.h
@@ -0,0 +1,38 @@
+#ifndef Z64_VISFBUF_H
+#define Z64_VISFBUF_H
+
+#include "ultra64.h"
+#include "color.h"
+#include "PR/gs2dex.h"
+
+typedef enum VisFbufBgMode {
+ /* 0 */ VIS_FBUF_BG_CYC_1CYC, //!< Enable rescaling
+ /* 1 */ VIS_FBUF_BG_CYC_COPY //!< Direct copy, no scaling
+} VisFbufBgMode;
+
+typedef enum VisFbufMode {
+ /* 0 */ VIS_FBUF_MODE_NONE, //!< Do nothing but waste time loading microcode
+ /* 1 */ VIS_FBUF_MODE_GENERAL, //!< Interpolation, filling and scaling
+ /* 2 */ VIS_FBUF_MODE_INTERPOLATE
+} VisFbufMode;
+
+typedef struct VisFbuf {
+ /* 0x00 */ u8 mode;
+ /* 0x04 */ f32 scale;
+ /* 0x08 */ f32 lodProportion; // expected to be between 0.0f and 1.0f
+ /* 0x0C */ Color_RGBA8_u32 primColor;
+ /* 0x10 */ Color_RGBA8_u32 envColor;
+} VisFbuf; // size = 0x14
+
+void VisFbuf_Init(VisFbuf* this);
+void VisFbuf_Destroy(VisFbuf* this);
+void VisFbuf_DrawBgToColorImage(Gfx** gfxP, uObjBg* bg, void* img, s32 width, s32 height, VisFbufBgMode cycleMode);
+void VisFbuf_SetBg(Gfx** gfxP, void* source, void* img, s32 width, s32 height, f32 x, f32 y, f32 scaleX, f32 scaleY, VisFbufBgMode cycleMode);
+void VisFbuf_SetBgSimple(Gfx** gfxP, void* source, void* img, s32 width, s32 height, VisFbufBgMode cycleMode);
+void VisFbuf_SetBgGeneral(Gfx** gfxP, void* source, void* img, s32 width, s32 height, f32 x, f32 y, f32 scaleX, f32 scaleY, VisFbufBgMode cycleMode);
+void VisFbuf_ApplyEffects(VisFbuf* this, Gfx** gfxP, void* source, void* img, s32 width, s32 height);
+void VisFbuf_DrawGeneral(VisFbuf* this, Gfx** gfxP, void* source, void* img, s32 width, s32 height);
+void VisFbuf_DrawInterpolate(VisFbuf* this, Gfx** gfxP, void* img, s32 width, s32 height);
+void VisFbuf_Draw(VisFbuf* this, Gfx** gfxP, void* img);
+
+#endif
diff --git a/spec b/spec
index 2bfb82c36..2dded2033 100644
--- a/spec
+++ b/spec
@@ -329,12 +329,12 @@ endseg
beginseg
name "map_i_static"
- include "build/assets/archives/map_i_static/map_i_static.yar.o"
+ include "build/assets/c/archives/map_i_static/map_i_static.yar.o"
endseg
beginseg
name "map_grand_static"
- include "build/assets/archives/map_grand_static/map_grand_static.yar.o"
+ include "build/assets/c/archives/map_grand_static/map_grand_static.yar.o"
endseg
beginseg
@@ -519,7 +519,7 @@ beginseg
include "build/src/code/z_view.o"
include "build/src/code/z_vimode.o"
include "build/src/code/z_viscvg.o"
- include "build/src/code/code_80140E80.o"
+ include "build/src/code/z_visfbuf.o"
include "build/src/code/z_vismono.o"
include "build/src/code/z_viszbuf.o"
include "build/src/code/z_vr_box.o"
@@ -3157,8 +3157,7 @@ beginseg
name "ovl_fbdemo_wipe4"
compress
include "build/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.o"
- include "build/data/ovl_fbdemo_wipe4/ovl_fbdemo_wipe4.data.o"
- include "build/data/ovl_fbdemo_wipe4/ovl_fbdemo_wipe4.reloc.o"
+ include "build/src/overlays/fbdemos/ovl_fbdemo_wipe4/ovl_fbdemo_wipe4_reloc.o"
endseg
beginseg
diff --git a/src/code/code_80140E80.c b/src/code/code_80140E80.c
deleted file mode 100644
index 56fcb663c..000000000
--- a/src/code/code_80140E80.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "global.h"
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80140E80/func_80140E80.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80140E80/func_80140EA0.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80140E80/func_80140EAC.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80140E80/func_80141008.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80140E80/func_8014116C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80140E80/func_801411B4.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80140E80/func_80141200.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80140E80/func_8014151C.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80140E80/func_80141678.s")
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/code_80140E80/func_80141778.s")
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 01a778227..70945722f 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -4,12 +4,14 @@
*/
#include "z64actor.h"
+#include "prevent_bss_reordering.h"
#include "fault.h"
#include "sys_cfb.h"
#include "loadfragment.h"
#include "z64horse.h"
#include "z64quake.h"
#include "z64rumble.h"
+
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
#include "overlays/actors/ovl_En_Part/z_en_part.h"
#include "overlays/actors/ovl_En_Box/z_en_box.h"
@@ -1393,31 +1395,31 @@ void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) {
s32 func_800B7200(Player* player) {
return (player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_20000000)) ||
- (player->csMode != PLAYER_CSMODE_NONE);
+ (player->csAction != PLAYER_CSACTION_NONE);
}
void Actor_SpawnHorse(PlayState* play, Player* player) {
Horse_Spawn(play, player);
}
-s32 func_800B724C(PlayState* play, Actor* actor, u8 csMode) {
+s32 func_800B724C(PlayState* play, Actor* actor, u8 csAction) {
Player* player = GET_PLAYER(play);
- if ((player->csMode == PLAYER_CSMODE_5) ||
- ((csMode == PLAYER_CSMODE_END) && (player->csMode == PLAYER_CSMODE_NONE))) {
+ if ((player->csAction == PLAYER_CSACTION_5) ||
+ ((csAction == PLAYER_CSACTION_END) && (player->csAction == PLAYER_CSACTION_NONE))) {
return false;
}
- player->csMode = csMode;
+ player->csAction = csAction;
player->csActor = actor;
player->unk_3BA = false;
return true;
}
-s32 func_800B7298(PlayState* play, Actor* actor, u8 csMode) {
+s32 func_800B7298(PlayState* play, Actor* actor, u8 csAction) {
Player* player = GET_PLAYER(play);
- if (func_800B724C(play, actor, csMode)) {
+ if (func_800B724C(play, actor, csAction)) {
player->unk_3BA = true;
return true;
}
@@ -1939,8 +1941,8 @@ s32 Actor_ProcessTalkRequest(Actor* actor, GameState* gameState) {
* - Positive values (`PLAYER_IA_NONE < exchangeItemAction < PLAYER_IA_MAX`):
* Offers the ability to initiate the conversation with an item from the player.
* Not all positive values are implemented properly for this to work.
- * Working ones are PLAYER_IA_PICTO_BOX and PLAYER_IA_BOTTLE_MIN <= exchangeItemAction < PLAYER_IA_MASK_MIN
- * Note: While PLAYER_IA_BEANS works, it is special cased to just plant the bean with no talking.
+ * Working ones are PLAYER_IA_PICTOGRAPH_BOX and PLAYER_IA_BOTTLE_MIN <= exchangeItemAction < PLAYER_IA_MASK_MIN
+ * Note: While PLAYER_IA_MAGIC_BEANS works, it is special cased to just plant the bean with no talking.
* - `PLAYER_IA_NONE`:
* Allows the player to speak to or check the actor (by pressing A).
* - `PLAYER_IA_MINUS1`:
diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c
index ef2b7ea6a..baa16a60d 100644
--- a/src/code/z_bgcheck.c
+++ b/src/code/z_bgcheck.c
@@ -1,3 +1,4 @@
+#include "prevent_bss_reordering.h"
#include "global.h"
#include "fault.h"
#include "fixed_point.h"
diff --git a/src/code/z_camera.c b/src/code/z_camera.c
index cc5ad58ea..49c31864b 100644
--- a/src/code/z_camera.c
+++ b/src/code/z_camera.c
@@ -43,7 +43,6 @@
*
*/
-#include "prevent_bss_reordering.h"
#include "global.h"
#include "libc/string.h"
#include "z64quake.h"
diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c
index e8a3a9017..753f24bb5 100644
--- a/src/code/z_collision_check.c
+++ b/src/code/z_collision_check.c
@@ -1,3 +1,4 @@
+#include "prevent_bss_reordering.h"
#include "global.h"
#include "z64collision_check.h"
diff --git a/src/code/z_demo.c b/src/code/z_demo.c
index 1123d3dc1..fa0419de4 100644
--- a/src/code/z_demo.c
+++ b/src/code/z_demo.c
@@ -1,3 +1,6 @@
+#include "prevent_bss_reordering.h"
+#include "prevent_bss_reordering2.h"
+
#include "PR/ultratypes.h"
// Variables are put before most headers as a hacky way to bypass bss reordering
@@ -8,37 +11,9 @@ struct CutsceneCamera sCutsceneCameraInfo;
u16 sCueTypeList[10];
u8 D_801F4DDC;
static s16 sBssPad;
-u8 gDisablePlayerCsModeStartPos;
+u8 gDisablePlayerCsActionStartPos;
s16 gDungeonBossWarpSceneId;
-#include "prevent_bss_reordering.h"
-#include "prevent_bss_reordering2.h"
-// clang-format off
-// Partial structs taken from "prevent_bss_reordering.h"
-struct Dummy200 { int x; };
-struct Dummy201 { int x; };
-struct Dummy202 { int x; };
-struct Dummy203 { int x; };
-struct Dummy204 { int x; };
-struct Dummy205 { int x; };
-struct Dummy206 { int x; };
-struct Dummy207 { int x; };
-struct Dummy208 { int x; };
-struct Dummy209 { int x; };
-struct Dummy210 { int x; };
-struct Dummy211 { int x; };
-struct Dummy212 { int x; };
-struct Dummy213 { int x; };
-struct Dummy214 { int x; };
-struct Dummy215 { int x; };
-struct Dummy216 { int x; };
-struct Dummy217 { int x; };
-struct Dummy218 { int x; };
-struct Dummy219 { int x; };
-struct Dummy220 { int x; };
-// clang-format on
-
-#include "global.h"
#include "z64quake.h"
#include "z64rumble.h"
#include "z64shrink_window.h"
@@ -72,7 +47,7 @@ void Cutscene_InitContext(PlayState* play, CutsceneContext* csCtx) {
sCueTypeList[i] = 0;
}
- gDisablePlayerCsModeStartPos = false;
+ gDisablePlayerCsActionStartPos = false;
Audio_SetCutsceneFlag(false);
}
@@ -364,12 +339,12 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
gSaveContext.save.playerForm = sCutsceneStoredPlayerForm;
break;
- case CS_MISC_DISABLE_PLAYER_CSMODE_START_POS:
- gDisablePlayerCsModeStartPos = true;
+ case CS_MISC_DISABLE_PLAYER_CSACTION_START_POS:
+ gDisablePlayerCsActionStartPos = true;
break;
- case CS_MISC_ENABLE_PLAYER_CSMODE_START_POS:
- gDisablePlayerCsModeStartPos = false;
+ case CS_MISC_ENABLE_PLAYER_CSACTION_START_POS:
+ gDisablePlayerCsActionStartPos = false;
break;
case CS_MISC_SAVE_ENTER_CLOCK_TOWN:
diff --git a/src/code/z_eventmgr.c b/src/code/z_eventmgr.c
index fed5ec48c..9f08806f9 100644
--- a/src/code/z_eventmgr.c
+++ b/src/code/z_eventmgr.c
@@ -213,7 +213,7 @@ void CutsceneManager_End(void) {
sCutsceneMgr.targetActor->flags &= ~ACTOR_FLAG_100000;
// fallthrough
case CS_START_1:
- func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSMODE_END);
+ func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSACTION_END);
sCutsceneMgr.startMethod = CS_START_0;
break;
@@ -338,13 +338,13 @@ s16 CutsceneManager_IsNext(s16 csId) {
}
/**
- * Start an actor cutscene, activate Player Cutscene Mode "Wait"
+ * Start an actor cutscene, activate Player Cutscene Action "Wait"
*/
s16 CutsceneManager_StartWithPlayerCs(s16 csId, Actor* actor) {
s16 startCsId = CutsceneManager_Start(csId, actor);
if (startCsId >= 0) {
- func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSMODE_WAIT);
+ func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSACTION_WAIT);
if (sCutsceneMgr.length == 0) {
CutsceneManager_Stop(sCutsceneMgr.csId);
}
@@ -354,13 +354,13 @@ s16 CutsceneManager_StartWithPlayerCs(s16 csId, Actor* actor) {
}
/**
- * Start an actor cutscene, activate Player Cutscene Mode "Wait", turn on ACTOR_FLAG_100000
+ * Start an actor cutscene, activate Player Cutscene Action "Wait", turn on ACTOR_FLAG_100000
*/
s16 CutsceneManager_StartWithPlayerCsAndSetFlag(s16 csId, Actor* actor) {
s16 startCsId = CutsceneManager_Start(csId, actor);
if (startCsId >= 0) {
- func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSMODE_WAIT);
+ func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSACTION_WAIT);
if (sCutsceneMgr.length == 0) {
CutsceneManager_Stop(sCutsceneMgr.csId);
}
diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c
index 5d1299bbf..d9abe151d 100644
--- a/src/code/z_lifemeter.c
+++ b/src/code/z_lifemeter.c
@@ -1,3 +1,4 @@
+#include "prevent_bss_reordering.h"
#include "global.h"
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
#include "interface/parameter_static/parameter_static.h"
diff --git a/src/code/z_message.c b/src/code/z_message.c
index 3fb8f5bac..4d717d8df 100644
--- a/src/code/z_message.c
+++ b/src/code/z_message.c
@@ -5107,6 +5107,7 @@ void Message_Draw(PlayState* play) {
GraphicsContext* gfxCtx = play->state.gfxCtx;
OPEN_DISPS(gfxCtx);
+
polyOpa = POLY_OPA_DISP;
nextDisplayList = Graph_GfxPlusOne(polyOpa);
gSPDisplayList(OVERLAY_DISP++, nextDisplayList);
@@ -5118,6 +5119,7 @@ void Message_Draw(PlayState* play) {
gSPEndDisplayList(nextDisplayList++);
Graph_BranchDlist(polyOpa, nextDisplayList);
POLY_OPA_DISP = nextDisplayList;
+
CLOSE_DISPS(gfxCtx);
}
diff --git a/src/code/z_play.c b/src/code/z_play.c
index 174dedd1c..89e3f34c9 100644
--- a/src/code/z_play.c
+++ b/src/code/z_play.c
@@ -3,6 +3,7 @@
#include "regs.h"
#include "functions.h"
#include "z64vismono.h"
+#include "z64visfbuf.h"
// Variables are put before most headers as a hacky way to bypass bss reordering
s16 sTransitionFillTimer;
@@ -11,8 +12,8 @@ TransitionTile sTransitionTile;
s32 gTransitionTileState;
VisMono sPlayVisMono;
Color_RGBA8_u32 gVisMonoColor;
-Struct_80140E80 D_801F6D38;
-Struct_80140E80* D_801F6D4C;
+VisFbuf sPlayVisFbuf;
+VisFbuf* sPlayVisFbufInstance;
BombersNotebook sBombersNotebook;
u8 sBombersNotebookOpen;
u8 sMotionBlurStatus;
@@ -417,8 +418,8 @@ void Play_Destroy(GameState* thisx) {
ShrinkWindow_Destroy();
TransitionFade_Destroy(&this->unk_18E48);
VisMono_Destroy(&sPlayVisMono);
- func_80140EA0(D_801F6D4C);
- D_801F6D4C = NULL;
+ VisFbuf_Destroy(sPlayVisFbufInstance);
+ sPlayVisFbufInstance = NULL;
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_92_80)) {
Actor_CleanupContext(&this->actorCtx, this);
@@ -1110,7 +1111,7 @@ void Play_PostWorldDraw(PlayState* this) {
Gfx* opa;
GraphicsContext* gfxCtx = this->state.gfxCtx;
- D_801F6D4C->scale = gSaveContext.screenScale / 1000.0f;
+ sPlayVisFbufInstance->scale = gSaveContext.screenScale / 1000.0f;
OPEN_DISPS(gfxCtx);
@@ -1118,7 +1119,7 @@ void Play_PostWorldDraw(PlayState* this) {
nextOpa = Graph_GfxPlusOne(opa);
gSPDisplayList(OVERLAY_DISP++, nextOpa);
- func_80141778(D_801F6D4C, &nextOpa, this->unk_18E60, gfxCtx);
+ VisFbuf_Draw(sPlayVisFbufInstance, &nextOpa, this->unk_18E60);
gSPEndDisplayList(nextOpa++);
Graph_BranchDlist(opa, nextOpa);
@@ -2311,18 +2312,18 @@ void Play_Init(GameState* thisx) {
VisMono_Init(&sPlayVisMono);
gVisMonoColor.a = 0;
- D_801F6D4C = &D_801F6D38;
- func_80140E80(D_801F6D4C);
- D_801F6D4C->lodProportion = 0.0f;
- D_801F6D4C->mode = 1;
- D_801F6D4C->primColor.r = 0;
- D_801F6D4C->primColor.g = 0;
- D_801F6D4C->primColor.b = 0;
- D_801F6D4C->primColor.a = 0;
- D_801F6D4C->envColor.r = 0;
- D_801F6D4C->envColor.g = 0;
- D_801F6D4C->envColor.b = 0;
- D_801F6D4C->envColor.a = 0;
+ sPlayVisFbufInstance = &sPlayVisFbuf;
+ VisFbuf_Init(sPlayVisFbufInstance);
+ sPlayVisFbufInstance->lodProportion = 0.0f;
+ sPlayVisFbufInstance->mode = VIS_FBUF_MODE_GENERAL;
+ sPlayVisFbufInstance->primColor.r = 0;
+ sPlayVisFbufInstance->primColor.g = 0;
+ sPlayVisFbufInstance->primColor.b = 0;
+ sPlayVisFbufInstance->primColor.a = 0;
+ sPlayVisFbufInstance->envColor.r = 0;
+ sPlayVisFbufInstance->envColor.g = 0;
+ sPlayVisFbufInstance->envColor.b = 0;
+ sPlayVisFbufInstance->envColor.a = 0;
CutsceneFlags_UnsetAll(this);
THA_GetRemaining(&this->state.tha);
zAllocSize = THA_GetRemaining(&this->state.tha);
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index 6c33a5565..486abcbda 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -495,7 +495,7 @@ void func_80123140(PlayState* play, Player* player) {
s32 Player_InBlockingCsMode(PlayState* play, Player* player) {
return (player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_20000000)) ||
- (player->csMode != PLAYER_CSMODE_NONE) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
+ (player->csAction != PLAYER_CSACTION_NONE) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
(play->transitionMode != TRANS_MODE_OFF) || (player->stateFlags1 & PLAYER_STATE1_1) ||
(player->stateFlags3 & PLAYER_STATE3_80) || (play->actorCtx.unk268 != 0);
}
@@ -1297,9 +1297,9 @@ void func_80123C58(Player* player) {
}
void Player_SetEquipmentData(PlayState* play, Player* player) {
- if (player->csMode != PLAYER_CSMODE_134) {
+ if (player->csAction != PLAYER_CSACTION_134) {
player->currentShield = GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD);
- if ((player->transformation != PLAYER_FORM_ZORA) || (((player->currentBoots != PLAYER_BOOTS_ZORA_LAND)) &&
+ if ((player->transformation != PLAYER_FORM_ZORA) || ((player->currentBoots != PLAYER_BOOTS_ZORA_LAND) &&
(player->currentBoots != PLAYER_BOOTS_ZORA_UNDERWATER))) {
player->currentBoots = D_801BFF90[player->transformation];
}
diff --git a/src/code/z_visfbuf.c b/src/code/z_visfbuf.c
new file mode 100644
index 000000000..62242bcec
--- /dev/null
+++ b/src/code/z_visfbuf.c
@@ -0,0 +1,329 @@
+/**
+ * @file z_visfbuf.c
+ * @brief Copies images between color images (generally framebuffers), possibly with filling, scaling, and colour
+ * interpolation.
+ *
+ * Used for several transition effects, and in z_play to shrink the screen at the end of the First and Second Days.
+ *
+ * @note to use the functions in this file, with the exception of VisFbuf_Draw(), it is necessary to load the S2DEX2
+ * microcode first, and then re-load the 3D microcode afterwards for the rest of the drawing in the frame; see
+ * VisFbuf_Draw() for how to do this.
+ */
+
+#include "global.h"
+#include "z64visfbuf.h"
+#include "sys_cfb.h"
+
+#define SCALE_MIN 0.032f
+#define SCALE_MAX 1.0f //!< also unchanged scale
+
+void VisFbuf_Init(VisFbuf* this) {
+ bzero(this, sizeof(VisFbuf));
+}
+
+void VisFbuf_Destroy(VisFbuf* this) {
+}
+
+// internal, only used in VisFbuf_SetBg
+/**
+ * Draw a bg to the specified color image.
+ *
+ * @param[in,out] gfxP Pointer to current displaylist
+ * @param[in] bg BG object to draw
+ * @param[out] img Pointer to beginning of destination color image
+ * @param[in] width Output width in pixels
+ * @param[in] height Output height in pixels
+ * @param[in] cycleMode Which BG mode to use
+ */
+void VisFbuf_DrawBgToColorImage(Gfx** gfxP, uObjBg* bg, void* img, s32 width, s32 height, VisFbufBgMode cycleMode) {
+ Gfx* gfx = *gfxP;
+
+ gDPPipeSync(gfx++);
+ // Set up color image to draw bg to
+ gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, img);
+ gDPSetScissor(gfx++, 0, 0, 0, width, height);
+
+ // Draw bg in appropriate type
+ gSPObjRenderMode(gfx++, G_OBJRM_ANTIALIAS | G_OBJRM_BILERP);
+ if (!!(cycleMode & VIS_FBUF_BG_CYC_COPY) != 0) { //! FAKE: may possibly be a better way
+ gSPBgRectCopy(gfx++, bg);
+ } else {
+ gSPBgRect1Cyc(gfx++, bg);
+ }
+
+ gDPPipeSync(gfx++);
+ // Reset the color image and scissor to frame's defaults
+ gDPSetColorImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, gCfbWidth, D_0F000000);
+ gSPDisplayList(gfx++, D_0E000000.setScissor);
+
+ *gfxP = gfx;
+}
+
+// internal
+/**
+ * Set up a BG from a specified source image and draw it to the specified color image with
+ * VisFbuf_DrawBgToColorImage(), using the BG's settings. Use VisFbuf_SetBgSimple() or
+ * VisFbuf_SetBgGeneral()
+ *
+ * @param[out] gfxP Pointer to current displaylist
+ * @param[in] source Pointer to beginning of source color image
+ * @param[out] img Pointer to beginning of destination color image
+ * @param[in] width Output width in pixels
+ * @param[in] height Output height in pixels
+ * @param[in] x Left of drawn output
+ * @param[in] y Top of drawn output
+ * @param[in] scaleX Amount to rescale the image, (dsdx). No effect if `cycleMode` is `VIS_FBUF_BG_CYC_COPY`.
+ * @param[in] scaleY Amount to rescale the image, (dtdy). No effect if `cycleMode` is `VIS_FBUF_BG_CYC_COPY`.
+ * @param[in] cycleMode Which BG mode to use
+ */
+void VisFbuf_SetBg(Gfx** gfxP, void* source, void* img, s32 width, s32 height, f32 x, f32 y, f32 scaleX, f32 scaleY,
+ VisFbufBgMode cycleMode) {
+ Gfx* gfx = *gfxP;
+ Gfx* gfxTemp;
+ uObjBg* bg;
+
+ // Allocate for BG
+ gfxTemp = gfx;
+ bg = Graph_DlistAlloc(&gfxTemp, sizeof(uObjBg));
+ gfx = gfxTemp;
+
+ // Set up BG
+ bg->b.imageX = 0;
+ bg->b.imageW = width << 2;
+ bg->b.frameX = x * 4;
+ bg->b.frameW = width << 2;
+ bg->b.imageY = 0;
+ bg->b.imageH = height << 2;
+ bg->b.frameY = y * 4;
+ bg->b.frameH = height << 2;
+ bg->b.imageLoad = G_BGLT_LOADTILE;
+ bg->b.imageFmt = G_IM_FMT_RGBA;
+ bg->b.imageSiz = G_IM_SIZ_16b;
+ bg->b.imagePal = 0;
+ bg->b.imageFlip = 0;
+ bg->b.imagePtr = source;
+
+ if (!!(cycleMode & VIS_FBUF_BG_CYC_COPY) != 0) { //! FAKE: may possibly be a better way
+ guS2DInitBg(bg);
+ } else {
+ bg->s.scaleW = (s32)((1 << 10) / scaleX);
+ bg->s.scaleH = (s32)((1 << 10) / scaleY);
+ bg->s.imageYorig = bg->b.imageY;
+ }
+
+ // draw BG to `img`
+ VisFbuf_DrawBgToColorImage(&gfx, bg, img, width, height, cycleMode);
+
+ *gfxP = gfx;
+}
+
+// used in FbdemoWipe5 and internally
+// "default settings" wrapper for VisFbuf_SetBg
+/**
+ * Set up a BG from a specified source image and draw it to the specified color image with
+ * VisFbuf_DrawBgToColorImage(), using the BG's settings. Position uses the default (0,0), and no rescaling is done
+ * even if 1-cycle mode is enabled.
+ *
+ * @see VisFbuf_SetBg() for arguments.
+ */
+void VisFbuf_SetBgSimple(Gfx** gfxP, void* source, void* img, s32 width, s32 height, VisFbufBgMode cycleMode) {
+ VisFbuf_SetBg(gfxP, source, img, width, height, 0.0f, 0.0f, SCALE_MAX, SCALE_MAX, cycleMode);
+}
+
+// wrapper for VisFbuf_SetBg with general arguments, used in VisFbuf_ApplyEffects
+/**
+ * Set up a BG from a specified source image and draw it to the specified color image with
+ * VisFbuf_DrawBgToColorImage(). Fully general settings are available.
+ *
+ * @see VisFbuf_SetBg() for arguments.
+ */
+void VisFbuf_SetBgGeneral(Gfx** gfxP, void* source, void* img, s32 width, s32 height, f32 x, f32 y, f32 scaleX,
+ f32 scaleY, VisFbufBgMode cycleMode) {
+ VisFbuf_SetBg(gfxP, source, img, width, height, x, y, scaleX, scaleY, cycleMode);
+}
+
+// internal, used in VisFbuf_DrawGeneral
+/**
+ * Most general redrawing function.
+ *
+ * - Copies `source` to `img`,
+ * - fills the current framebuffer with `this->primColor`,
+ * - applies colour interpolation to `img`,
+ * - copies `img` back to `source`, with rescaling.
+ *
+ * @param[in] this
+ * @param[in,out] gfxP Pointer to current displaylist
+ * @param[in,out] source Pointer to beginning of in/out color image
+ * @param[out] img Pointer to beginning of destination color image
+ * @param[in] width Output width in pixels
+ * @param[in] height Output height in pixels
+ */
+void VisFbuf_ApplyEffects(VisFbuf* this, Gfx** gfxP, void* source, void* img, s32 width, s32 height) {
+ Gfx* gfx = *gfxP;
+ s32 pad[3];
+
+ gDPPipeSync(gfx++);
+ // copy source to img
+ gDPSetOtherMode(gfx++,
+ G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE,
+ G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2);
+ VisFbuf_SetBgSimple(&gfx, source, img, width, height, VIS_FBUF_BG_CYC_COPY);
+
+ gDPPipeSync(gfx++);
+ // fill framebuffer with primColor
+ gDPSetOtherMode(gfx++,
+ G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_FILL | G_PM_NPRIMITIVE,
+ G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2);
+ {
+ s32 color = GPACK_RGBA5551(this->primColor.r, this->primColor.g, (u32)this->primColor.b, 1);
+
+ gDPSetFillColor(gfx++, (color << 0x10) | color);
+ }
+ //! @bug VisFbuf_SetBgSimple() sets the current color image back to the frame's default framebuffer at the end,
+ //! so this will always fill in the default framebuffer, whatever are used as `source` and `img`. This does not
+ //! arise in-game since this function is always used with `source = D_0F000000`.
+ gDPFillRectangle(gfx++, 0, 0, width - 1, height - 1);
+
+ gDPPipeSync(gfx++);
+ // Set lod and primColor from struct, perform interpolation, draw image with scaling (this is the most general
+ // alteration this system can carry out).
+ {
+ s32 lodFrac = this->lodProportion * 255;
+
+ gDPSetLODColor(gfx++, G_SETPRIMCOLOR, 0, lodFrac, this->primColor.rgba);
+ }
+ if (this->envColor.a == 0) {
+ // Interpolate between primColor and texel color using lod (but with max alpha)
+ gDPSetOtherMode(gfx++,
+ G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
+ G_AC_THRESHOLD | G_ZS_PIXEL | AA_EN | CVG_DST_CLAMP | ZMODE_OPA | CVG_X_ALPHA | ALPHA_CVG_SEL |
+ GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_BL, G_BL_1MA) |
+ GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_BL, G_BL_1MA));
+ gDPSetCombineLERP(gfx++, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC, TEXEL0, 0, 0, 0, 1, PRIMITIVE, TEXEL0, PRIM_LOD_FRAC,
+ TEXEL0, 0, 0, 0, 1);
+ } else {
+ // Interpolate between envColor (the new black) and primColor (the new white)
+ gDPSetOtherMode(gfx++,
+ G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
+ G_AC_NONE | G_ZS_PIXEL | G_RM_CLD_SURF | G_RM_NOOP2);
+ gDPSetColor(gfx++, G_SETENVCOLOR, this->envColor.rgba);
+ gDPSetCombineLERP(gfx++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, ENVIRONMENT, TEXEL0,
+ ENVIRONMENT, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, ENVIRONMENT, TEXEL0,
+ ENVIRONMENT);
+ }
+
+ // Draw scaled image in centre of `width * height` rectangle in `source`
+ {
+ f32 scale = CLAMP_ALT(this->scale, SCALE_MIN, SCALE_MAX);
+
+ VisFbuf_SetBgGeneral(&gfx, img, source, width, height, width * 0.5f * (1.0f - scale),
+ height * 0.5f * (1.0f - scale), scale, scale, VIS_FBUF_BG_CYC_1CYC);
+ }
+
+ gDPPipeSync(gfx++);
+
+ *gfxP = gfx;
+}
+
+// internal, used in VisFbuf_Draw, VIS_FBUF_MODE_GENERAL
+/**
+ * If scale is within `(SCALE_MIN, SCALE_MAX)`, apply VisFbuf_ApplyEffects().
+ * If it is smaller than `SCALE_MIN`, fill the framebuffer with `this->primColor`
+ *
+ * @param[in] this
+ * @param[in,out] gfxP Pointer to current displaylist
+ * @param[in,out] source Pointer to beginning of source color image
+ * @param[in,out] img Pointer to beginning of destination color image
+ * @param[in] width Output width in pixels
+ * @param[in] height Output height in pixels
+ */
+void VisFbuf_DrawGeneral(VisFbuf* this, Gfx** gfxP, void* source, void* img, s32 width, s32 height) {
+ if (this->scale < SCALE_MAX) {
+ Gfx* gfx = *gfxP;
+ u32 color;
+
+ if (this->scale > SCALE_MIN) {
+ VisFbuf_ApplyEffects(this, &gfx, source, img, width, height);
+ } else {
+ gDPPipeSync(gfx++);
+ // fill the framebuffer with this->primColor
+ gDPSetOtherMode(gfx++,
+ G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_FILL | G_PM_NPRIMITIVE,
+ G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2);
+ color = GPACK_RGBA5551(this->primColor.r, this->primColor.g, (u32)this->primColor.b, 1);
+ gDPSetFillColor(gfx++, (color << 0x10) | color);
+ //! @bug See corresponding note in VisFbuf_ApplyEffects()
+ gDPFillRectangle(gfx++, 0, 0, width - 1, height - 1);
+
+ gDPPipeSync(gfx++);
+ }
+
+ *gfxP = gfx;
+ }
+}
+
+/**
+ * Redraw `img` in-place, using texel color to interpolate between envColor (the new black) and primColor (the new
+ * white)
+ *
+ * @param[in] this
+ * @param[in,out] gfxP Pointer to current displaylist
+ * @param[in,out] img Pointer to beginning of color image to modify in-place
+ * @param[in] width width of img
+ * @param[in] height height of img
+ */
+void VisFbuf_DrawInterpolate(VisFbuf* this, Gfx** gfxP, void* img, s32 width, s32 height) {
+ Gfx* gfx = *gfxP;
+
+ gDPPipeSync(gfx++);
+
+ gDPSetOtherMode(gfx++,
+ G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
+ G_AC_NONE | G_ZS_PIXEL | G_RM_CLD_SURF | G_RM_NOOP2);
+ gDPSetColor(gfx++, G_SETPRIMCOLOR, this->primColor.rgba);
+ gDPSetColor(gfx++, G_SETENVCOLOR, this->envColor.rgba);
+ gDPSetCombineLERP(gfx++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT,
+ PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT);
+ VisFbuf_SetBgSimple(&gfx, img, img, width, height, VIS_FBUF_BG_CYC_1CYC);
+
+ gDPPipeSync(gfx++);
+
+ *gfxP = gfx;
+}
+
+// used in Play and FbdemoWipe4
+/**
+ * main drawing function in this file, draws depending on settings specified in `this`.
+ *
+ * @param[in] this
+ * @param[in,out] gfxP Pointer to current displaylist
+ * @param[in,out] img Pointer to beginning of destination color image
+ */
+void VisFbuf_Draw(VisFbuf* this, Gfx** gfxP, void* img) {
+ Gfx* gfx = *gfxP;
+
+ gSPLoadUcodeL(gfx++, gspS2DEX2_fifo);
+
+ switch (this->mode) {
+ case VIS_FBUF_MODE_GENERAL:
+ VisFbuf_DrawGeneral(this, &gfx, D_0F000000, img, gScreenWidth, gScreenHeight);
+ break;
+
+ case VIS_FBUF_MODE_INTERPOLATE:
+ VisFbuf_DrawInterpolate(this, &gfx, D_0F000000, gScreenWidth, gScreenHeight);
+ break;
+
+ default:
+ break;
+ }
+
+ gSPLoadUcode(gfx++, SysUcode_GetUCode(), SysUcode_GetUCodeData());
+
+ *gfxP = gfx;
+}
diff --git a/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c b/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c
index 8850d8852..f0b2e66ff 100644
--- a/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c
+++ b/src/overlays/actors/ovl_Bg_Ikana_Rotaryroom/z_bg_ikana_rotaryroom.c
@@ -794,7 +794,7 @@ void func_80B819F0(Actor* thisx, PlayState* play) {
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
if (this->dyna.actor.csId >= 0) {
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_WAIT);
}
func_80B81A64(this);
} else {
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 ebdaeff51..0ab213d0a 100644
--- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c
+++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c
@@ -126,7 +126,7 @@ s32 func_80953DA8(BgIngate* this, PlayState* play) {
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
if (CHECK_EVENTINF(EVENTINF_35)) {
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_WAIT);
} else {
SET_EVENTINF(EVENTINF_41);
}
@@ -149,7 +149,7 @@ void func_80953E38(PlayState* play) {
void func_80953EA4(BgIngate* this, PlayState* play) {
Player* player = GET_PLAYER(play);
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_58);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_58);
player->unk_3A0.x = this->dyna.actor.world.pos.x;
player->unk_3A0.z = this->dyna.actor.world.pos.z;
this->unk160 &= ~0x4;
@@ -192,7 +192,7 @@ void func_80953F9C(BgIngate* this, PlayState* play) {
if (this->timePath->additionalPathIndex != ADDITIONAL_PATH_INDEX_NONE) {
func_80953E38(play);
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_WAIT);
this->dyna.actor.textId = 0x9E4;
Message_StartTextbox(play, this->dyna.actor.textId, NULL);
this->unk16C += 1;
@@ -231,7 +231,7 @@ void func_809541B8(BgIngate* this, PlayState* play) {
if ((player->transformation == PLAYER_FORM_HUMAN) && (player->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
(this->dyna.actor.xzDistToPlayer < 40.0f)) {
if (this->dyna.actor.playerHeightRel > 15.0f) {
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_WAIT);
this->dyna.actor.textId = 0x9E6;
Message_StartTextbox(play, this->dyna.actor.textId, NULL);
this->actionFunc = func_809543D4;
@@ -261,7 +261,7 @@ void func_809542A0(BgIngate* this, PlayState* play) {
void func_80954340(BgIngate* this, PlayState* play) {
if (DECR(this->unk16A) == 0) {
if (this->timePath != NULL) {
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_END);
this->timePath = &play->setupPathList[this->timePath->additionalPathIndex];
func_80953F14(this, play);
Environment_StopTime();
@@ -280,7 +280,7 @@ void func_809543D4(BgIngate* this, PlayState* play) {
break;
case 0x9E5:
if (play->msgCtx.choiceIndex == 0) {
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_END);
this->unk160 &= ~0x4;
this->actionFunc = func_809541B8;
Environment_StartTime();
@@ -301,7 +301,7 @@ void func_809543D4(BgIngate* this, PlayState* play) {
CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_40);
Audio_PlaySfx_MessageDecide();
} else {
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_END);
this->unk160 &= ~0x4;
this->actionFunc = func_809541B8;
Environment_StartTime();
diff --git a/src/overlays/actors/ovl_Boss_02/z_boss_02.c b/src/overlays/actors/ovl_Boss_02/z_boss_02.c
index f96c2864f..d5f85443e 100644
--- a/src/overlays/actors/ovl_Boss_02/z_boss_02.c
+++ b/src/overlays/actors/ovl_Boss_02/z_boss_02.c
@@ -2172,7 +2172,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
}
if (this->unk_1D1C == 45) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_21);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_21);
sMusicStartTimer = KREG(91) + 43;
}
@@ -2186,7 +2186,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
}
if (this->unk_1D1C == 100) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_115);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_115);
}
if (this->unk_1D1C == 112) {
@@ -2225,7 +2225,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_StopManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
this->unk_1D20 = 0;
sRedTwinmold->unk_0144 = sBlueTwinmold->unk_0144 = 3;
@@ -2286,7 +2286,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_StopManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
this->unk_1D20 = 0;
this->actor.flags |= ACTOR_FLAG_TARGETABLE;
sp68->unk_0144 = 10;
diff --git a/src/overlays/actors/ovl_Boss_03/z_boss_03.c b/src/overlays/actors/ovl_Boss_03/z_boss_03.c
index 9e1111a6b..0ff34cad4 100644
--- a/src/overlays/actors/ovl_Boss_03/z_boss_03.c
+++ b/src/overlays/actors/ovl_Boss_03/z_boss_03.c
@@ -687,7 +687,7 @@ void Boss03_ChasePlayer(Boss03* this, PlayState* play) {
if (&this->actor == player->actor.parent) {
player->actionVar2 = 101;
player->actor.parent = NULL;
- player->csMode = PLAYER_CSMODE_NONE;
+ player->csAction = PLAYER_CSACTION_NONE;
}
func_809E344C(this, play);
@@ -783,7 +783,7 @@ void Boss03_CatchPlayer(Boss03* this, PlayState* play) {
if (&this->actor == player->actor.parent) {
player->actionVar2 = 101;
player->actor.parent = NULL;
- player->csMode = PLAYER_CSMODE_NONE;
+ player->csAction = PLAYER_CSACTION_NONE;
Play_DisableMotionBlur();
}
@@ -911,7 +911,7 @@ void Boss03_ChewPlayer(Boss03* this, PlayState* play) {
if (&this->actor == player->actor.parent) {
player->actionVar2 = 101;
player->actor.parent = NULL;
- player->csMode = PLAYER_CSMODE_NONE;
+ player->csAction = PLAYER_CSACTION_NONE;
Play_DisableMotionBlur();
func_800B8D50(play, NULL, 10.0f, this->actor.shape.rot.y, 0.0f, 0x20);
}
@@ -1149,7 +1149,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
case 0:
if (player->actor.world.pos.y < 1350.0f) {
Cutscene_StartManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
this->subCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
@@ -1260,7 +1260,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
if (this->csTimer == 5) {
// Rotates Player towards Gyorg
- func_800B7298(play, &this->actor, PLAYER_CSMODE_8);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_8);
}
this->subCamEye.x = player->actor.world.pos.x + 30.0f;
@@ -1371,7 +1371,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
func_80169AFC(play, this->subCamId, 0);
Cutscene_StopManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
this->subCamId = SUB_CAM_ID_DONE;
func_809E344C(this, play);
@@ -1449,7 +1449,7 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
case 0:
if (CutsceneManager_GetCurrentCsId() == CS_ID_NONE) {
Cutscene_StartManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_1);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_1);
this->subCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
@@ -1628,7 +1628,7 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_StopManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
this->csState = 3;
Play_DisableMotionBlur();
Boss03_PlayUnderwaterSfx(&this->actor.projectedPos, NA_SE_EN_KONB_INIT_OLD);
@@ -1662,7 +1662,7 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
case 0:
if (CutsceneManager_GetCurrentCsId() == CS_ID_NONE) {
Cutscene_StartManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_1);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_1);
this->subCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
@@ -1723,7 +1723,7 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_StopManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
func_809E344C(this, play);
this->workTimer[WORK_TIMER_UNK1_A] = 50;
@@ -1753,7 +1753,7 @@ void Boss03_SetupStunned(Boss03* this, PlayState* play) {
if (&this->actor == player->actor.parent) {
player->actionVar2 = 101;
player->actor.parent = NULL;
- player->csMode = PLAYER_CSMODE_NONE;
+ player->csAction = PLAYER_CSACTION_NONE;
Play_DisableMotionBlur();
}
@@ -1905,7 +1905,7 @@ void Boss03_UpdateCollision(Boss03* this, PlayState* play) {
if (&this->actor == player->actor.parent) {
player->actionVar2 = 101;
player->actor.parent = NULL;
- player->csMode = PLAYER_CSMODE_NONE;
+ player->csAction = PLAYER_CSACTION_NONE;
Play_DisableMotionBlur();
}
diff --git a/src/overlays/actors/ovl_Boss_04/z_boss_04.c b/src/overlays/actors/ovl_Boss_04/z_boss_04.c
index c35e6e9b1..73a0271ed 100644
--- a/src/overlays/actors/ovl_Boss_04/z_boss_04.c
+++ b/src/overlays/actors/ovl_Boss_04/z_boss_04.c
@@ -264,7 +264,7 @@ void func_809EC568(Boss04* this, PlayState* play) {
this->subCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
player->actor.world.pos.x = this->unk_6E8;
player->actor.world.pos.z = this->unk_6F0 + 410.0f;
player->actor.shape.rot.y = 0x7FFF;
@@ -314,7 +314,7 @@ void func_809EC568(Boss04* this, PlayState* play) {
if (this->unk_704 == 45) {
this->unk_708 = 1;
this->unk_704 = 0;
- func_800B7298(play, &this->actor, PLAYER_CSMODE_21);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_21);
this->actor.gravity = 0.0f;
break;
}
@@ -391,7 +391,7 @@ void func_809EC568(Boss04* this, PlayState* play) {
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_StopManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
Play_DisableMotionBlur();
SET_EVENTINF(EVENTINF_60);
}
diff --git a/src/overlays/actors/ovl_Boss_06/z_boss_06.c b/src/overlays/actors/ovl_Boss_06/z_boss_06.c
index 6dc94e0e3..d8f1571ce 100644
--- a/src/overlays/actors/ovl_Boss_06/z_boss_06.c
+++ b/src/overlays/actors/ovl_Boss_06/z_boss_06.c
@@ -200,7 +200,7 @@ void func_809F24C8(Boss06* this, PlayState* play) {
}
Cutscene_StartManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
this->subCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
@@ -240,7 +240,7 @@ void func_809F24C8(Boss06* this, PlayState* play) {
this->unk_1D8 = 0.0f;
if (this->unk_1CA == 60) {
D_809F4970->unk_154++;
- func_800B7298(play, &this->actor, PLAYER_CSMODE_132);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_132);
player->actor.shape.rot.y = 0;
player->actor.world.rot.y = player->actor.shape.rot.y;
}
@@ -333,7 +333,7 @@ void func_809F24C8(Boss06* this, PlayState* play) {
func_80169AFC(play, this->subCamId, 0);
this->subCamId = SUB_CAM_ID_DONE;
Cutscene_StopManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
D_809F4970->unk_151 = 0;
}
break;
diff --git a/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c b/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c
index 4abce0d2f..4531f235a 100644
--- a/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c
+++ b/src/overlays/actors/ovl_Dm_Tag/z_dm_tag.c
@@ -154,7 +154,7 @@ s32 func_80C224D8(DmTag* this, PlayState* play) {
break;
case 6:
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
play->nextEntrance = ENTRANCE(STOCK_POT_INN, 5);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
@@ -171,7 +171,7 @@ s32 func_80C224D8(DmTag* this, PlayState* play) {
s32 func_80C227E8(DmTag* this, PlayState* play) {
if (this->unk_1A4 == 0) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
play->nextEntrance = ENTRANCE(STOCK_POT_INN, 4);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
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 b0805ef59..10c2f050a 100644
--- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c
+++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c
@@ -462,7 +462,7 @@ s32 func_808A1478(DoorShutter* this, PlayState* play, f32 arg2) {
}
if ((this->csId != CS_ID_NONE) && (CutsceneManager_GetCurrentCsId() == this->csId)) {
- func_800B724C(play, &this->slidingDoor.dyna.actor, PLAYER_CSMODE_1);
+ func_800B724C(play, &this->slidingDoor.dyna.actor, PLAYER_CSACTION_1);
}
}
@@ -582,7 +582,7 @@ void func_808A1884(DoorShutter* this, PlayState* play) {
if (CutsceneManager_GetCurrentCsId() == CS_ID_GLOBAL_DOOR) {
func_801226E0(play, ((void)0, gSaveContext.respawn[RESPAWN_MODE_DOWN].data));
player->csId = CS_ID_NONE;
- func_800B7298(play, NULL, PLAYER_CSMODE_115);
+ func_800B7298(play, NULL, PLAYER_CSACTION_115);
}
}
}
@@ -636,8 +636,8 @@ void func_808A1B48(DoorShutter* this, PlayState* play) {
void func_808A1C50(DoorShutter* this, PlayState* play) {
if (this->unk_167++ > 30) {
- if (GET_PLAYER(play)->csMode == PLAYER_CSMODE_115) {
- func_800B7298(play, NULL, PLAYER_CSMODE_END);
+ if (GET_PLAYER(play)->csAction == PLAYER_CSACTION_115) {
+ func_800B7298(play, NULL, PLAYER_CSACTION_END);
}
DoorShutter_SetupDoor(this, play);
}
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 ec1480a67..4d44941b3 100644
--- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
+++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
@@ -344,7 +344,7 @@ void func_808B921C(DoorWarp1* this, PlayState* play) {
}
if (func_808B866C(this, play) && !Play_InCsMode(play)) {
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_WAIT);
Message_StartTextbox(play, 0xF2, &this->dyna.actor);
DoorWarp1_SetupAction(this, func_808B93A0);
}
@@ -360,14 +360,14 @@ void func_808B93A0(DoorWarp1* this, PlayState* play) {
Message_CloseTextbox(play);
if (play->msgCtx.choiceIndex == 0) {
Audio_PlaySfx_MessageDecide();
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_9);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_9);
player->unk_3A0.x = this->dyna.actor.world.pos.x;
player->unk_3A0.z = this->dyna.actor.world.pos.z;
this->unk_1CA = 1;
DoorWarp1_SetupAction(this, func_808B9524);
} else {
Audio_PlaySfx_MessageCancel();
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_END);
DoorWarp1_SetupAction(this, func_808B94A4);
}
}
@@ -448,7 +448,7 @@ void func_808B977C(DoorWarp1* this, PlayState* play) {
AudioSfx_PlaySfx(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_9);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_9);
player->unk_3A0.x = this->dyna.actor.world.pos.x;
player->unk_3A0.z = this->dyna.actor.world.pos.z;
this->unk_1CA = 1;
@@ -602,7 +602,7 @@ void func_808B9F10(DoorWarp1* this, PlayState* play) {
Player* player = GET_PLAYER(play);
Interface_SetHudVisibility(HUD_VISIBILITY_NONE);
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_9);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_9);
player->unk_3A0.x = this->dyna.actor.world.pos.x;
player->unk_3A0.z = this->dyna.actor.world.pos.z;
this->unk_1CA = 20;
diff --git a/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c b/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c
index 783f157b1..58b2589c9 100644
--- a/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c
+++ b/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c
@@ -448,7 +448,7 @@ void EnAob01_BeforeRace_HandleConversation(EnAob01* this, PlayState* play) {
if (this->stateFlags & ENAOB01_FLAG_PLAYER_CONFIRMED_CHOICE) {
this->stateFlags &= ~ENAOB01_FLAG_PLAYER_CONFIRMED_CHOICE;
Rupees_ChangeBy(-this->rupeesBet);
- func_800B7298(play, NULL, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, NULL, PLAYER_CSACTION_WAIT);
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
this->actionFunc = EnAob01_BeforeRace_StartRace;
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 0f505820d..12a14af77 100644
--- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c
+++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c
@@ -378,7 +378,7 @@ void EnBigokuta_PlayDeathCutscene(EnBigokuta* this, PlayState* play) {
CutsceneManager_Start(this->csId, &this->picto.actor);
if (!CHECK_EVENTINF(EVENTINF_41) && !CHECK_EVENTINF(EVENTINF_35)) {
- func_800B724C(play, &this->picto.actor, PLAYER_CSMODE_WAIT);
+ func_800B724C(play, &this->picto.actor, PLAYER_CSACTION_WAIT);
} else {
player = GET_PLAYER(play);
player->stateFlags1 |= PLAYER_STATE1_20;
@@ -454,7 +454,7 @@ void EnBigokuta_PlayDeathEffects(EnBigokuta* this, PlayState* play) {
Actor_Kill(&this->picto.actor);
if (!CHECK_EVENTINF(EVENTINF_41) && !CHECK_EVENTINF(EVENTINF_35)) {
- func_800B724C(play, &this->picto.actor, PLAYER_CSMODE_END);
+ func_800B724C(play, &this->picto.actor, PLAYER_CSACTION_END);
} else {
Player* player = GET_PLAYER(play);
diff --git a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c
index 4fa521de3..c4e1433e7 100644
--- a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c
+++ b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c
@@ -308,7 +308,7 @@ void EnBigpo_SetupSpawnCutscene(EnBigpo* this) {
void EnBigpo_WaitCutsceneQueue(EnBigpo* this, PlayState* play) {
if (CutsceneManager_IsNext(this->actor.csId)) {
CutsceneManager_Start(this->actor.csId, &this->actor);
- func_800B724C(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B724C(play, &this->actor, PLAYER_CSACTION_WAIT);
this->subCamId = CutsceneManager_GetCurrentSubCamId(this->actor.csId);
if (this->actor.params == BIG_POE_TYPE_REGULAR) { // and SUMMONED, got switched earlier
EnBigpo_SpawnCutsceneStage1(this, play);
@@ -478,7 +478,7 @@ void EnBigpo_SpawnCutsceneStage8(EnBigpo* this, PlayState* play) {
} else { // BIG_POE_TYPE_REGULAR
CutsceneManager_Stop(this->actor.csId);
}
- func_800B724C(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B724C(play, &this->actor, PLAYER_CSACTION_END);
EnBigpo_SetupIdleFlying(this); // setup idle flying
}
}
@@ -1164,7 +1164,7 @@ void EnBigpo_Update(Actor* thisx, PlayState* play) {
}
if (EnBigpo_ApplyDamage(this, play) == 0) {
- if ((this->actor.isLockedOn) && (this->actionFunc != EnBigpo_WarpingOut) &&
+ if (this->actor.isLockedOn && (this->actionFunc != EnBigpo_WarpingOut) &&
!(this->collider.base.acFlags & AC_HARD) && (this->actor.category == ACTORCAT_ENEMY)) {
this->unk20C++;
} else {
diff --git a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c
index 77110430e..13368f5cc 100644
--- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c
+++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c
@@ -850,7 +850,7 @@ void EnBigslime_EndCutscene(EnBigslime* this, PlayState* play) {
this->subCamId = SUB_CAM_ID_DONE;
CutsceneManager_Stop(this->csId);
this->csId = CutsceneManager_GetAdditionalCsId(this->actor.csId);
- func_800B724C(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B724C(play, &this->actor, PLAYER_CSACTION_END);
}
}
@@ -939,7 +939,7 @@ void EnBigslime_SetupCutsceneStartBattle(EnBigslime* this, PlayState* play) {
this->bigslimeCollider[0].base.acFlags &= ~AC_ON;
Math_Vec3f_Copy(&subCam->at, &this->actor.focus.pos);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_4);
player->actor.shape.rot.y = this->actor.yawTowardsPlayer + 0x8000;
player->actor.world.pos.x = Math_SinS(this->actor.yawTowardsPlayer) * 347.0f + this->actor.world.pos.x;
@@ -987,7 +987,7 @@ void EnBigslime_SetupCallMinislime(EnBigslime* this, PlayState* play) {
Animation_MorphToPlayOnce(&this->skelAnime, &gGekkoCallAnim, 5.0f);
EnBigslime_GekkoSfxOutsideBigslime(this, NA_SE_EN_FROG_GREET);
this->callTimer = 0;
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
this->actionFunc = EnBigslime_CallMinislime;
}
@@ -1011,7 +1011,7 @@ void EnBigslime_CallMinislime(EnBigslime* this, PlayState* play) {
EnBigslime_InitFallMinislime(this);
play->envCtx.lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
this->callTimer = 35;
- func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_4);
}
}
@@ -2546,7 +2546,7 @@ void EnBigslime_PlayCutscene(EnBigslime* this, PlayState* play) {
} else if (CutsceneManager_IsNext(this->csId)) {
CutsceneManager_Start(this->csId, &this->actor);
if (this->actionFuncStored != EnBigslime_SquishFlat) {
- func_800B724C(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B724C(play, &this->actor, PLAYER_CSACTION_WAIT);
}
this->subCamId = CutsceneManager_GetCurrentSubCamId(this->csId);
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 061081bc1..948ee526f 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
@@ -427,7 +427,7 @@ void func_809C5310(EnBomBowlMan* this, PlayState* play) {
if (player->actor.world.pos.x < 1510.0f) {
if (player->transformation != PLAYER_FORM_DEKU) {
if (this->actor.xzDistToPlayer < this->unk_2C8) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
func_809C53A4(this);
}
} else {
@@ -485,7 +485,7 @@ void func_809C5598(EnBomBowlMan* this, PlayState* play) {
} else if (this->actor.textId == 0x734) {
this->actor.textId = 0x715;
} else if (this->actor.textId == 0x715) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_17, 1.0f);
func_809C59A4(this, play);
return;
@@ -497,7 +497,7 @@ void func_809C5598(EnBomBowlMan* this, PlayState* play) {
Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_LEARNED_SECRET_CODE);
Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_RECEIVED_BOMBERS_NOTEBOOK);
Message_BombersNotebookQueueEvent(play, BOMBERS_NOTEBOOK_EVENT_MET_BOMBERS);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
this->actionFunc = func_809C5738;
return;
}
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 8157d09c6..447c8ddb6 100644
--- a/src/overlays/actors/ovl_En_Box/z_en_box.c
+++ b/src/overlays/actors/ovl_En_Box/z_en_box.c
@@ -425,9 +425,9 @@ void func_80868B74(EnBox* this, PlayState* play) {
this->unk_1A0++;
if ((this->csId1 != CS_ID_NONE) && (CutsceneManager_GetCurrentCsId() == this->csId1)) {
if (this->unk_1A0 == 2) {
- func_800B724C(play, &this->dyna.actor, PLAYER_CSMODE_4);
+ func_800B724C(play, &this->dyna.actor, PLAYER_CSACTION_4);
} else if (this->unk_1A0 == 22) {
- func_800B724C(play, &this->dyna.actor, PLAYER_CSMODE_1);
+ func_800B724C(play, &this->dyna.actor, PLAYER_CSACTION_1);
}
}
} else if (this->unk_1A0 < 60) {
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 89e73c9a6..edae8b849 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
@@ -560,7 +560,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) {
this->subCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_4);
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
this->subCamEye.x = mainCam->eye.x;
this->subCamEye.y = mainCam->eye.y;
@@ -586,7 +586,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) {
mainCam->at = this->subCamAt;
func_80169AFC(play, this->subCamId, 0);
Cutscene_StopManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
this->cameraState = 0;
this->subCamId = SUB_CAM_ID_DONE;
this->activeTimer = 20;
diff --git a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c
index 22c247c1f..c7bb3c44c 100644
--- a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c
+++ b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c
@@ -369,7 +369,7 @@ void func_8089ABF4(EnDinofos* this, PlayState* play) {
this->subCamId = SUB_CAM_ID_DONE;
CutsceneManager_Stop(this->actor.csId);
if (this->actor.colChkInfo.health == 0) {
- func_800B724C(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B724C(play, &this->actor, PLAYER_CSACTION_END);
}
}
}
@@ -1209,7 +1209,7 @@ void func_8089D318(EnDinofos* this, PlayState* play) {
if (CutsceneManager_IsNext(this->actor.csId)) {
if (this->actor.colChkInfo.health == 0) {
CutsceneManager_Start(this->actor.csId, &this->actor);
- func_800B724C(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B724C(play, &this->actor, PLAYER_CSACTION_WAIT);
} else {
CutsceneManager_StartWithPlayerCs(this->actor.csId, &this->actor);
}
diff --git a/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c b/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c
index e30ee26ab..c2b6f508f 100644
--- a/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c
+++ b/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c
@@ -71,7 +71,7 @@ static TexturePtr sEyeTextures[] = {
};
s32 func_80A50D40(Actor* actor, PlayState* play) {
- func_800B7298(play, actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, actor, PLAYER_CSACTION_WAIT);
if (CHECK_EVENTINF(EVENTINF_35)) {
play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_CLEARED, 6);
} else {
diff --git a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c
index 59d504705..d87ac9f9e 100644
--- a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c
+++ b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c
@@ -542,7 +542,7 @@ void EnDragon_Grab(EnDragon* this, PlayState* play) {
if (this->grabTimer > sMaxGrabTimerPerPython[this->pythonIndex]) {
if (this->state == DEEP_PYTHON_GRAB_STATE_START) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
this->state = DEEP_PYTHON_GRAB_STATE_GRABBED;
}
diff --git a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c
index 9e442b637..4d2fc4db8 100644
--- a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c
+++ b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c
@@ -4,7 +4,6 @@
* Description: Fishing Pond Elements (Owner, Fish, Props, Effects...)
*/
-#include "prevent_bss_reordering.h"
#include "z_en_fishing.h"
#include "z64rumble.h"
#include "z64shrink_window.h"
@@ -5325,7 +5324,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
sSubCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, sSubCamId, CAM_STATUS_ACTIVE);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_4);
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
sSubCamEye.x = mainCam->eye.x;
@@ -5352,7 +5351,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
func_80169AFC(play, sSubCamId, 0);
Cutscene_StopManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
D_8090CD4C = 0;
sSubCamId = SUB_CAM_ID_DONE;
D_8090CD50 = 30;
@@ -5366,7 +5365,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
sSubCamId = Play_CreateSubCamera(play);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
Play_ChangeCameraStatus(play, sSubCamId, CAM_STATUS_ACTIVE);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_4);
mainCam = Play_GetCamera(play, CAM_ID_MAIN);
sSubCamEye.x = mainCam->eye.x;
@@ -5453,7 +5452,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) {
mainCam->at = sSubCamAt;
func_80169AFC(play, sSubCamId, 0);
Cutscene_StopManual(play, &play->csCtx);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
D_8090CD4C = 0;
sSubCamId = SUB_CAM_ID_DONE;
player->unk_B28 = -5;
diff --git a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c
index e7d8e9032..5e459fcbc 100644
--- a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c
+++ b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c
@@ -445,7 +445,7 @@ void func_80B0FFA8(EnGb2* this, PlayState* play) {
Rupees_ChangeBy(-this->unk_288);
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
- func_800B7298(play, NULL, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, NULL, PLAYER_CSACTION_WAIT);
this->actionFunc = func_80B11344;
break;
@@ -600,7 +600,7 @@ void func_80B10634(EnGb2* this, PlayState* play) {
Rupees_ChangeBy(-this->unk_288);
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
- func_800B7298(play, NULL, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, NULL, PLAYER_CSACTION_WAIT);
this->actionFunc = func_80B11344;
}
break;
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 45d304aaf..f2f341a17 100644
--- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
+++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
@@ -479,7 +479,7 @@ void EnGe2_PatrolDuties(EnGe2* this, PlayState* play) {
Player* player = GET_PLAYER(play);
f32 visionRange = gSaveContext.save.isNight ? 200.0f : 280.0f;
- if (player->csMode == PLAYER_CSMODE_26) {
+ if (player->csAction == PLAYER_CSACTION_26) {
this->picto.actor.speed = 0.0f;
this->actionFunc = EnGe2_SetupCharge;
Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f,
@@ -494,7 +494,7 @@ void EnGe2_PatrolDuties(EnGe2* this, PlayState* play) {
this->picto.actor.shape.rot.y, 0x1800, visionRange, this->verticalDetectRange)) {
if ((GERUDO_PURPLE_GET_EXIT(&this->picto.actor) != GERUDO_PURPLE_EXIT_NONE) && !Play_InCsMode(play)) {
this->picto.actor.speed = 0.0f;
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_26);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_26);
Lib_PlaySfx(NA_SE_SY_FOUND);
Message_StartTextbox(play, 0x1194, &this->picto.actor);
this->actionFunc = EnGe2_SetupCharge;
@@ -682,7 +682,7 @@ void EnGe2_GuardStationary(EnGe2* this, PlayState* play) {
if (EnGe2_LookForPlayer(play, &this->picto.actor, &this->picto.actor.focus.pos, this->picto.actor.shape.rot.y,
0x4000, 720.0f, this->verticalDetectRange)) {
if ((GERUDO_PURPLE_GET_EXIT(&this->picto.actor) != GERUDO_PURPLE_EXIT_NONE) && !Play_InCsMode(play)) {
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_26);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_26);
Lib_PlaySfx(NA_SE_SY_FOUND);
Message_StartTextbox(play, 0x1194, &this->picto.actor);
this->timer = 50;
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 21f207e7c..71ac20e76 100644
--- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
+++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
@@ -273,7 +273,7 @@ void EnGe3_AveilsChamberIdle(EnGe3* this, PlayState* play) {
}
} else if ((this->picto.actor.xzDistToPlayer < 700.0f) && (fabsf(this->picto.actor.playerHeightRel) < 100.0f) &&
!Play_InCsMode(play)) {
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_26);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_26);
Lib_PlaySfx(NA_SE_SY_FOUND);
if (Player_GetMask(play) == PLAYER_MASK_STONE) { // Not fooled by Stone Mask
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 17f8cbb1d..4c815dc1e 100644
--- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c
+++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c
@@ -389,7 +389,7 @@ void func_809984F4(EnGs* this, PlayState* play) {
}
} while (gossipStone != NULL);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
this->actionFunc = func_809985B8;
}
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 d1abeb3e4..58f1598d9 100644
--- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c
+++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c
@@ -692,7 +692,7 @@ s32 EnHorse_PlayerCanMove(EnHorse* this, PlayState* play) {
(((this->stateFlags & ENHORSE_FLAG_19) || (this->stateFlags & ENHORSE_FLAG_29)) && !this->inRace) ||
(this->action == ENHORSE_ACTION_HBA) || (player->actor.flags & ACTOR_FLAG_TALK_REQUESTED) ||
(play->csCtx.state != CS_STATE_IDLE) || (CutsceneManager_GetCurrentCsId() != CS_ID_NONE) ||
- (player->stateFlags1 & PLAYER_STATE1_20) || (player->csMode != PLAYER_CSMODE_NONE)) {
+ (player->stateFlags1 & PLAYER_STATE1_20) || (player->csAction != PLAYER_CSACTION_NONE)) {
return false;
}
return true;
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 ef991495a..983cf2bdf 100644
--- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c
+++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c
@@ -225,7 +225,7 @@ void EnHs_SceneTransitToBunnyHoodDialogue(EnHs* this, PlayState* play) {
void func_80953354(EnHs* this, PlayState* play) {
if (!Play_InCsMode(play)) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
this->actionFunc = EnHs_SceneTransitToBunnyHoodDialogue;
}
}
diff --git a/src/overlays/actors/ovl_En_Jg/z_en_jg.c b/src/overlays/actors/ovl_En_Jg/z_en_jg.c
index 7297415f6..c6a564d27 100644
--- a/src/overlays/actors/ovl_En_Jg/z_en_jg.c
+++ b/src/overlays/actors/ovl_En_Jg/z_en_jg.c
@@ -355,7 +355,7 @@ void EnJg_GoronShrineIdle(EnJg* this, PlayState* play) {
this->flags |= FLAG_LOOKING_AT_PLAYER;
Message_StartTextbox(play, this->textId, &this->actor);
this->actionFunc = EnJg_GoronShrineTalk;
- } else if ((this->actor.xzDistToPlayer < 100.0f) || (this->actor.isLockedOn)) {
+ } else if ((this->actor.xzDistToPlayer < 100.0f) || this->actor.isLockedOn) {
Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play);
this->textId = EnJg_GetStartingConversationTextId(this, play);
}
@@ -919,7 +919,7 @@ void EnJg_CheckIfTalkingToPlayerAndHandleFreezeTimer(EnJg* this, PlayState* play
Message_StartTextbox(play, this->textId, &this->actor);
this->actionFunc = EnJg_SetupTalk;
} else {
- if ((this->actor.xzDistToPlayer < 100.0f) || (this->actor.isLockedOn)) {
+ if ((this->actor.xzDistToPlayer < 100.0f) || this->actor.isLockedOn) {
Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play);
if (this->action == EN_JG_ACTION_FIRST_THAW) {
this->textId = EnJg_GetStartingConversationTextId(this, play);
diff --git a/src/overlays/actors/ovl_En_Jso/z_en_jso.c b/src/overlays/actors/ovl_En_Jso/z_en_jso.c
index 5d083246a..1354a0a1c 100644
--- a/src/overlays/actors/ovl_En_Jso/z_en_jso.c
+++ b/src/overlays/actors/ovl_En_Jso/z_en_jso.c
@@ -367,7 +367,7 @@ void EnJso_HandleIntroCutscene(EnJso* this, PlayState* play) {
}
CutsceneManager_StartWithPlayerCs(this->csId, &this->actor);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_21);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_21);
this->subCamId = CutsceneManager_GetCurrentSubCamId(this->actor.csId);
player->actor.world.pos.x = this->actor.home.pos.x + 30.0f;
player->actor.world.pos.z = this->actor.home.pos.z + 30.0f;
@@ -472,7 +472,7 @@ void EnJso_HandleIntroCutscene(EnJso* this, PlayState* play) {
}
if (showTextbox) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_4);
Message_StartTextbox(play, sTextIds[this->textIndex], &this->actor);
this->textIndex++;
this->actor.shape.yOffset = 970.0f;
@@ -573,7 +573,7 @@ void EnJso_HandleIntroCutscene(EnJso* this, PlayState* play) {
this->introCsTimer++;
if (this->introCsTimer >= 10) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
CutsceneManager_Stop(this->csId);
this->rightArmRot.x = this->rightArmRot.y = this->rightArmRot.z = this->robeRightRot.x =
this->robeRightRot.y = this->robeRightRot.z = 0;
diff --git a/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c b/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c
index 59ba5feb4..46b37d2ee 100644
--- a/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c
+++ b/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c
@@ -481,7 +481,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
}
CutsceneManager_StartWithPlayerCs(this->csId, &this->picto.actor);
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_21);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_21);
this->subCamId = CutsceneManager_GetCurrentSubCamId(this->picto.actor.csId);
this->picto.actor.shape.rot.y = this->picto.actor.world.rot.y = this->picto.actor.yawTowardsPlayer;
@@ -538,7 +538,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
this->unk_2D8 = 0;
this->picto.actor.world.pos.y = this->picto.actor.floorHeight;
this->picto.actor.velocity.y = 0.0f;
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_4);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_4);
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0);
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_PIRATE_ONGND);
@@ -609,7 +609,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) {
case 7:
if (this->unk_598 == 0) {
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_END);
CutsceneManager_Stop(this->csId);
this->unk_59C = 0;
this->subCamId = SUB_CAM_ID_DONE;
@@ -674,7 +674,7 @@ void func_80B86804(EnKaizoku* this, PlayState* play) {
CutsceneManager_StartWithPlayerCs(this->csId, &this->picto.actor);
}
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_96);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_96);
this->subCamId = CutsceneManager_GetCurrentSubCamId(this->picto.actor.csId);
this->unk_2B2 = 30;
this->picto.actor.flags &= ~ACTOR_FLAG_TARGETABLE;
@@ -724,7 +724,7 @@ void func_80B868B8(EnKaizoku* this, PlayState* play) {
case 2:
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_END);
CutsceneManager_Stop(this->csId);
this->subCamId = SUB_CAM_ID_DONE;
play->nextEntrance = play->setupExitList[this->exitIndex];
@@ -799,7 +799,7 @@ void func_80B86B74(EnKaizoku* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_18);
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_133);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_133);
this->unk_5A0 = 0;
this->unk_598 = 0;
this->unk_59C++;
@@ -865,7 +865,7 @@ void func_80B86B74(EnKaizoku* this, PlayState* play) {
play->envCtx.fillScreen = false;
this->unk_59C = 0;
this->subCamId = SUB_CAM_ID_DONE;
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_END);
CutsceneManager_Stop(this->csId);
if (this->switchFlag > SWITCH_FLAG_NONE) {
Flags_SetSwitch(play, this->switchFlag);
@@ -1681,7 +1681,7 @@ void func_80B8960C(EnKaizoku* this, PlayState* play) {
}
this->picto.actor.speed = 0.0f;
this->unk_2D8 = 1;
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_123);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_123);
Enemy_StartFinishingBlow(play, &this->picto.actor);
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_PIRATE_DEAD);
this->picto.actor.flags |= ACTOR_FLAG_CANT_LOCK_ON;
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 a3d0e4608..8f4fe160b 100644
--- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
+++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
@@ -425,7 +425,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
}
if ((this->unkState1A8 == 2) && (this->unkState196 == 2)) {
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_73);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_73);
this->unkState1A8 = 0;
}
@@ -434,7 +434,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
if (this->talkState == TEXT_STATE_5) {
// bad song input
if ((this->unkState196 == 2) && (this->picto.actor.textId == 0x1647)) {
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_END);
}
// after timeskip
@@ -461,7 +461,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) {
} else if ((this->picto.actor.textId == 0x165D) || (this->picto.actor.textId == 0x165F) ||
(this->picto.actor.textId == 0x1660) || (this->picto.actor.textId == 0x1652)) {
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_4);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_4);
if (CutsceneManager_GetCurrentCsId() == CS_ID_GLOBAL_TALK) {
CutsceneManager_Stop(CS_ID_GLOBAL_TALK);
CutsceneManager_Queue(this->csIdList[0]);
@@ -690,7 +690,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
if (this->unk190 == 0) {
Message_CloseTextbox(play);
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_86);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_86);
this->picto.actor.textId = 0x1648;
Message_StartTextbox(play, (this->picto.actor.textId), &this->picto.actor);
this->unkState1A8 = 0;
@@ -726,7 +726,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
Math_Vec3f_Copy(&this->unk22C, &this->picto.actor.home.pos);
CutsceneManager_StartWithPlayerCs(this->csIdList[0], &this->picto.actor);
this->subCamId = CutsceneManager_GetCurrentSubCamId(this->picto.actor.csId);
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_86);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_86);
this->unkState1A8 = 1;
}
@@ -759,7 +759,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) {
}
if (this->picto.actor.textId == 0x1648) {
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_WAIT);
this->picto.actor.textId = 0x1649;
if (this->animIndex != ENKAKASI_ANIM_ARMS_CROSSED_ROCKING) {
EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING);
@@ -936,7 +936,7 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) {
this->unk190++;
this->unk204 = 0xA;
if (this->unk190 == 0xE) {
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_73);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_73);
Play_DisableMotionBlur();
this->unk204 = 0x14;
}
@@ -1036,7 +1036,7 @@ void EnKakasi_DiggingAway(EnKakasi* this, PlayState* play) {
Math_ApproachF(&this->picto.actor.shape.yOffset, -6000.0f, 0.5f, 200.0f);
if (fabsf(this->picto.actor.shape.yOffset + 6000.0f) < 10.0f) {
SET_WEEKEVENTREG(WEEKEVENTREG_79_08);
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_END);
CutsceneManager_Stop(this->csIdList[0]);
this->aboveGroundStatus = ENKAKASI_ABOVE_GROUND_TYPE;
this->songSummonDist = 80.0f;
diff --git a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c
index 09358e034..30f705aa7 100644
--- a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c
+++ b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c
@@ -359,7 +359,7 @@ void EnLookNuts_Update(Actor* thisx, PlayState* play) {
Math_Vec3f_Copy(&this->headRotTarget, &gZeroVec3f);
this->state = PALACE_GUARD_RUNNING_TO_PLAYER;
Audio_PlaySfx(NA_SE_SY_FOUND);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_26);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_26);
D_80A6862C = 1;
this->actor.flags |= (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_10);
this->actor.gravity = 0.0f;
diff --git a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c
index 72fcc61d6..5e73bc43a 100644
--- a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c
+++ b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c
@@ -1081,7 +1081,7 @@ void EnMaYto_SetupPostMilkRunWaitDialogueEnd(EnMaYto* this) {
void EnMaYto_PostMilkRunWaitDialogueEnd(EnMaYto* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) || (Message_GetState(&play->msgCtx) == TEXT_STATE_5)) {
if (Message_ShouldAdvance(play) && (Message_GetState(&play->msgCtx) == TEXT_STATE_5)) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
Message_CloseTextbox(play);
}
}
diff --git a/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c b/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c
index a6d8eb8bb..e83911b46 100644
--- a/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c
+++ b/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c
@@ -266,9 +266,9 @@ void func_80A4E2E8(EnMkk* this, PlayState* play) {
} else {
sp20 = Math_StepToF(&this->actor.speed, 0.0f, 0.7f);
}
- if ((player->stateFlags3 & 0x100) || (Player_GetMask(play) == PLAYER_MASK_STONE)) {
+ if ((player->stateFlags3 & PLAYER_STATE3_100) || (Player_GetMask(play) == PLAYER_MASK_STONE)) {
Math_ScaledStepToS(&this->unk_150, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos), 0x400);
- } else if ((player->stateFlags2 & 0x80) || (player->actor.freezeTimer > 0)) {
+ } else if ((player->stateFlags2 & PLAYER_STATE2_80) || (player->actor.freezeTimer > 0)) {
Math_ScaledStepToS(&this->unk_150, this->actor.yawTowardsPlayer + 0x8000, 0x400);
} else {
Math_ScaledStepToS(&this->unk_150, this->actor.yawTowardsPlayer, 0x400);
@@ -279,7 +279,7 @@ void func_80A4E2E8(EnMkk* this, PlayState* play) {
if (sp20) {
this->unk_14B &= ~2;
func_80A4E190(this);
- } else if ((this->unk_149 == 0) && (!(player->stateFlags3 & 0x100)) &&
+ } else if ((this->unk_149 == 0) && (!(player->stateFlags3 & PLAYER_STATE3_100)) &&
(Player_GetMask(play) != PLAYER_MASK_STONE) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
(Actor_IsFacingPlayer(&this->actor, 0x1800)) && (this->actor.xzDistToPlayer < 120.0f) &&
(fabsf(this->actor.playerHeightRel) < 100.0f)) {
diff --git a/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c b/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c
index 1a2925f65..cc75d7503 100644
--- a/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c
+++ b/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c
@@ -1620,7 +1620,7 @@ void EnMnk_MonkeyHanging_WaitForTextboxAfterDunk(EnMnk* this, PlayState* play) {
}
Message_CloseTextbox(play);
this->actionFunc = EnMnk_MonkeyHanging_WaitAfterDunk;
- func_800B7298(play, NULL, PLAYER_CSMODE_END);
+ func_800B7298(play, NULL, PLAYER_CSACTION_END);
CLEAR_WEEKEVENTREG(WEEKEVENTREG_83_08);
}
}
@@ -1693,7 +1693,7 @@ void EnMnk_MonkeyHanging_Plead(EnMnk* this, PlayState* play) {
case 0x8E9:
this->actionFunc = EnMnk_MonkeyHanging_Dunk2;
Message_CloseTextbox(play);
- func_800B7298(play, &this->picto.actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->picto.actor, PLAYER_CSACTION_WAIT);
this->unk_3C8 = 60;
break;
diff --git a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c
index 28d9f818e..16f2cb312 100644
--- a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c
+++ b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c
@@ -256,7 +256,7 @@ s32 EnMttag_ExitRace(PlayState* play, s32 transitionType, s32 nextTransitionType
void EnMttag_ShowFalseStartMessage(EnMttag* this, PlayState* play) {
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_OFF;
Message_StartTextbox(play, 0xE95, NULL); // An entrant made a false start
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 20);
this->actionFunc = EnMttag_PotentiallyRestartRace;
}
@@ -267,7 +267,7 @@ void EnMttag_ShowFalseStartMessage(EnMttag* this, PlayState* play) {
*/
void EnMttag_ShowCantWinMessage(EnMttag* this, PlayState* play) {
Message_StartTextbox(play, 0xE97, NULL); // You can't win now...
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
this->actionFunc = EnMttag_HandleCantWinChoice;
}
@@ -433,7 +433,7 @@ void EnMttag_PotentiallyRestartRace(EnMttag* this, PlayState* play) {
play->transitionType = TRANS_TYPE_FADE_BLACK;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
Message_CloseTextbox(play);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
Magic_Add(play, MAGIC_FILL_TO_CAPACITY);
CLEAR_EVENTINF(EVENTINF_10);
@@ -468,7 +468,7 @@ void EnMttag_HandleCantWinChoice(EnMttag* this, PlayState* play) {
// Keep racing
Audio_PlaySfx_MessageDecide();
Message_CloseTextbox(play);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_END);
CLEAR_EVENTINF(EVENTINF_13);
this->timer = 100;
this->actionFunc = EnMttag_Race;
diff --git a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c
index c4b2460e3..9cf98284b 100644
--- a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c
+++ b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c
@@ -343,7 +343,7 @@ void EnPametfrog_StopCutscene(EnPametfrog* this, PlayState* play) {
Play_SetCameraAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye);
this->subCamId = SUB_CAM_ID_DONE;
CutsceneManager_Stop(this->csId);
- func_800B724C(play, &this->actor, PLAYER_CSMODE_END);
+ func_800B724C(play, &this->actor, PLAYER_CSACTION_END);
}
}
@@ -1007,7 +1007,7 @@ void EnPametfrog_PlayCutscene(EnPametfrog* this, PlayState* play) {
if (CutsceneManager_IsNext(this->csId)) {
CutsceneManager_Start(this->csId, &this->actor);
this->subCamId = CutsceneManager_GetCurrentSubCamId(this->csId);
- func_800B724C(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B724C(play, &this->actor, PLAYER_CSACTION_WAIT);
if (this->actor.colChkInfo.health == 0) {
if (this->actor.params == GEKKO_PRE_SNAPPER) {
EnPametfrog_SetupCallSnapper(this, play);
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 276ff8db7..e1c41ab1b 100644
--- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c
+++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c
@@ -736,9 +736,10 @@ void EnRd_WalkToHome(EnRd* this, PlayState* play) {
this->actor.world.rot.y = this->actor.shape.rot.y;
SkelAnime_Update(&this->skelAnime);
- if (!(player->stateFlags1 & (0x200000 | 0x80000 | 0x40000 | 0x4000 | 0x2000 | 0x80)) &&
- !(player->stateFlags2 & (0x4000 | 0x80)) && (player->transformation != PLAYER_FORM_GORON) &&
- (player->transformation != PLAYER_FORM_DEKU) &&
+ if (!(player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_40000 |
+ PLAYER_STATE1_80000 | PLAYER_STATE1_200000)) &&
+ !(player->stateFlags2 & (PLAYER_STATE2_80 | PLAYER_STATE2_4000)) &&
+ (player->transformation != PLAYER_FORM_GORON) && (player->transformation != PLAYER_FORM_DEKU) &&
(Actor_WorldDistXYZToPoint(&player->actor, &this->actor.home.pos) < 150.0f)) {
this->actor.targetMode = TARGET_MODE_0;
EnRd_SetupWalkToPlayer(this, play);
diff --git a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c
index cd2b36634..0eb895e8c 100644
--- a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c
+++ b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c
@@ -1144,7 +1144,7 @@ void EnSGoro_SpringShrineGoron_Idle(EnSGoro* this, PlayState* play) {
this->textId = EnSGoro_ShrineGoron_NextTextId(this, play);
Message_StartTextbox(play, this->textId, &this->actor);
this->actionFunc = EnSGoro_SpringShrineGoron_Talk;
- } else if ((this->actor.xzDistToPlayer < 250.0f) || (this->actor.isLockedOn)) {
+ } else if ((this->actor.xzDistToPlayer < 250.0f) || this->actor.isLockedOn) {
Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play);
}
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 5, 0x1000, 0x100);
diff --git a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c
index ce5b3f17e..f13100485 100644
--- a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c
+++ b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c
@@ -473,7 +473,7 @@ void func_80ADBAB8(EnSellnuts* this, PlayState* play) {
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
play->msgCtx.stateTimer = 4;
this->actionFunc = func_80ADBBEC;
- func_800B7298(play, NULL, PLAYER_CSMODE_19);
+ func_800B7298(play, NULL, PLAYER_CSACTION_19);
}
}
diff --git a/src/overlays/actors/ovl_En_Shn/z_en_shn.c b/src/overlays/actors/ovl_En_Shn/z_en_shn.c
index 158c80087..1bdc7026a 100644
--- a/src/overlays/actors/ovl_En_Shn/z_en_shn.c
+++ b/src/overlays/actors/ovl_En_Shn/z_en_shn.c
@@ -259,7 +259,7 @@ s32 func_80AE6704(Actor* thisx, PlayState* play) {
case 6:
CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_40);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_POISONED, 6);
gSaveContext.nextCutsceneIndex = 0;
play->transitionTrigger = TRANS_TRIGGER_START;
diff --git a/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c b/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c
index 692651860..04eda15cb 100644
--- a/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c
+++ b/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.c
@@ -322,7 +322,7 @@ void func_80ADF520(EnTakaraya* this, PlayState* play) {
}
void func_80ADF608(EnTakaraya* this, PlayState* play) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
this->unk2AD = true;
this->actionFunc = func_80ADF654;
}
diff --git a/src/overlays/actors/ovl_En_Test3/z_en_test3.c b/src/overlays/actors/ovl_En_Test3/z_en_test3.c
index 6226084fc..1ee840b11 100644
--- a/src/overlays/actors/ovl_En_Test3/z_en_test3.c
+++ b/src/overlays/actors/ovl_En_Test3/z_en_test3.c
@@ -527,8 +527,8 @@ void func_80A3F0B0(EnTest3* this, PlayState* play) {
}
void func_80A3F114(EnTest3* this, PlayState* play) {
- if (this->player.csMode != PLAYER_CSMODE_NONE) {
- play->startPlayerCutscene(play, &this->player, PLAYER_CSMODE_END);
+ if (this->player.csAction != PLAYER_CSACTION_NONE) {
+ play->startPlayerCutscene(play, &this->player, PLAYER_CSACTION_END);
}
}
@@ -668,7 +668,7 @@ s32 func_80A3F73C(EnTest3* this, PlayState* play) {
func_800BC154(play, &play->actorCtx, &this->unk_D90->actor, 4);
func_800BC154(play, &play->actorCtx, &this->player.actor, 2);
CutsceneManager_SetReturnCamera(this->subCamId);
- play->startPlayerCutscene(play, &this->player, PLAYER_CSMODE_WAIT);
+ play->startPlayerCutscene(play, &this->player, PLAYER_CSACTION_WAIT);
}
Actor_OfferTalkNearColChkInfoCylinder(&this->player.actor, play);
if (this->unk_D88 == 3) {
@@ -690,7 +690,7 @@ s32 func_80A3F8D4(EnTest3* this, PlayState* play, struct_80A41828* arg2, Schedul
((postActor = func_80A3F2BC(play, this, ACTOR_EN_PM, ACTORCAT_NPC, 100.0f, 20.0f)) != NULL)) {
this->player.actor.home.rot.y = Actor_WorldYawTowardActor(&this->player.actor, postActor);
}
- play->startPlayerCutscene(play, &this->player, PLAYER_CSMODE_97);
+ play->startPlayerCutscene(play, &this->player, PLAYER_CSACTION_97);
return true;
}
@@ -737,7 +737,7 @@ s32 func_80A3FA58(EnTest3* this, PlayState* play) {
return false;
}
if (this->unk_D8A == 90) {
- play->startPlayerCutscene(play, &this->player, PLAYER_CSMODE_21);
+ play->startPlayerCutscene(play, &this->player, PLAYER_CSACTION_21);
}
} else {
this->unk_D8A++;
@@ -857,7 +857,7 @@ s32 func_80A3FFD0(EnTest3* this, PlayState* play2) {
}
} else {
SET_WEEKEVENTREG(WEEKEVENTREG_COUPLES_MASK_CUTSCENE_FINISHED);
- play->startPlayerCutscene(play, &this->player, PLAYER_CSMODE_110);
+ play->startPlayerCutscene(play, &this->player, PLAYER_CSACTION_110);
}
return false;
}
@@ -1059,13 +1059,13 @@ void EnTest3_Update(Actor* thisx, PlayState* play2) {
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_506) &&
!((this->player.actor.category == ACTORCAT_PLAYER) &&
((play->actorCtx.flags & ACTORCTX_FLAG_5) || (play->actorCtx.flags & ACTORCTX_FLAG_4)))) {
- if (this->player.csMode != PLAYER_CSMODE_5) {
- play->startPlayerCutscene(play, &this->player, PLAYER_CSMODE_5);
+ if (this->player.csAction != PLAYER_CSACTION_5) {
+ play->startPlayerCutscene(play, &this->player, PLAYER_CSACTION_5);
}
play->actorCtx.flags &= ~ACTORCTX_FLAG_4;
} else if (this->player.actor.category == ACTORCAT_PLAYER) {
func_80A409D4(this, play);
- } else if (play->startPlayerCutscene(play, &this->player, PLAYER_CSMODE_NONE)) {
+ } else if (play->startPlayerCutscene(play, &this->player, PLAYER_CSACTION_NONE)) {
if (this->unk_D88 >= 7) {
Vec3f worldPos;
diff --git a/src/overlays/actors/ovl_En_Test6/z_en_test6.c b/src/overlays/actors/ovl_En_Test6/z_en_test6.c
index 9657f1b1e..52a0153c7 100644
--- a/src/overlays/actors/ovl_En_Test6/z_en_test6.c
+++ b/src/overlays/actors/ovl_En_Test6/z_en_test6.c
@@ -451,7 +451,7 @@ void EnTest6_StopInvertedSoTCutscene(EnTest6* this, PlayState* play) {
player->actor.freezeTimer = 0;
play->unk_18844 = false;
CutsceneManager_Stop(play->playerCsIds[PLAYER_CS_ID_SONG_WARP]);
- func_800B7298(play, NULL, PLAYER_CSMODE_END);
+ func_800B7298(play, NULL, PLAYER_CSACTION_END);
EnTest6_DisableMotionBlur();
Distortion_RemoveRequest(DISTORTION_TYPE_SONG_OF_TIME);
Actor_Kill(&this->actor);
@@ -615,30 +615,30 @@ void EnTest6_InvertedSoTCutscene(EnTest6* this, PlayState* play) {
// Update Player Cutscene Animation
if (this->screenFillAlpha != 0) {
- func_800B7298(play, NULL, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, NULL, PLAYER_CSACTION_WAIT);
} else {
if (this->timer == 90) {
// Look side-to-side but downwards, with chin down
// gPlayerAnim_al_elf_tobidasi
- func_800B7298(play, NULL, PLAYER_CSMODE_66);
+ func_800B7298(play, NULL, PLAYER_CSACTION_66);
}
if (this->timer == 70) {
// close eyes and sway body in circles
// gPlayerAnim_alink_yurayura
- func_800B7298(play, NULL, PLAYER_CSMODE_82);
+ func_800B7298(play, NULL, PLAYER_CSACTION_82);
}
if (this->timer == 30) {
// Look side-to-side but upwards, with chin up
// gPlayerAnim_alink_kyoro
- func_800B7298(play, NULL, PLAYER_CSMODE_81);
+ func_800B7298(play, NULL, PLAYER_CSACTION_81);
}
if (this->timer == 5) {
// Give a big nod of approval
// gPlayerAnim_al_yes
- func_800B7298(play, NULL, PLAYER_CSMODE_74);
+ func_800B7298(play, NULL, PLAYER_CSACTION_74);
}
}
@@ -705,7 +705,7 @@ void EnTest6_StopDoubleSoTCutscene(EnTest6* this, PlayState* play) {
player->actor.freezeTimer = 0;
play->unk_18844 = false;
CutsceneManager_Stop(play->playerCsIds[PLAYER_CS_ID_SONG_WARP]);
- func_800B7298(play, NULL, PLAYER_CSMODE_END);
+ func_800B7298(play, NULL, PLAYER_CSACTION_END);
EnTest6_DisableMotionBlur();
Distortion_RemoveRequest(DISTORTION_TYPE_SONG_OF_TIME);
Actor_Kill(&this->actor);
@@ -864,23 +864,23 @@ void EnTest6_DoubleSoTCutscene(EnTest6* this, PlayState* play) {
break;
case 98:
- func_800B7298(play, NULL, PLAYER_CSMODE_64);
+ func_800B7298(play, NULL, PLAYER_CSACTION_64);
break;
case 68:
- func_800B7298(play, NULL, PLAYER_CSMODE_65);
+ func_800B7298(play, NULL, PLAYER_CSACTION_65);
break;
case 52:
- func_800B7298(play, NULL, PLAYER_CSMODE_88);
+ func_800B7298(play, NULL, PLAYER_CSACTION_88);
break;
case 43:
- func_800B7298(play, NULL, PLAYER_CSMODE_114);
+ func_800B7298(play, NULL, PLAYER_CSACTION_114);
break;
case 38:
- func_800B7298(play, NULL, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, NULL, PLAYER_CSACTION_WAIT);
break;
case 14:
diff --git a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c
index d99ee0bce..7d277a61f 100644
--- a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c
+++ b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c
@@ -301,7 +301,7 @@ void EnTimeTag_KickOut_Transition(EnTimeTag* this, PlayState* play) {
*/
void EnTimeTag_KickOut_WaitForTrigger(EnTimeTag* this, PlayState* play) {
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED)) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
Message_StartTextbox(play, 0x1883 + TIMETAG_KICKOUT_GET_TEXT(&this->actor), NULL);
this->actionFunc = EnTimeTag_KickOut_Transition;
}
@@ -334,7 +334,7 @@ void EnTimeTag_KickOut_WaitForTime(EnTimeTag* this, PlayState* play) {
}
} else if ((hour == TIMETAG_KICKOUT_HOUR(&this->actor)) && (minute == TIMETAG_KICKOUT_MINUTE(&this->actor)) &&
!Play_InCsMode(play)) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_WAIT);
Message_StartTextbox(play, 0x1883 + TIMETAG_KICKOUT_GET_TEXT(&this->actor), NULL);
this->actionFunc = EnTimeTag_KickOut_Transition;
}
diff --git a/src/overlays/actors/ovl_En_Toto/z_en_toto.c b/src/overlays/actors/ovl_En_Toto/z_en_toto.c
index 12aaa808f..c62a46006 100644
--- a/src/overlays/actors/ovl_En_Toto/z_en_toto.c
+++ b/src/overlays/actors/ovl_En_Toto/z_en_toto.c
@@ -361,7 +361,7 @@ s32 func_80BA3ED4(EnToto* this, PlayState* play) {
s32 func_80BA3EE8(EnToto* this, PlayState* play) {
if (this->text->unk1 == 2) {
- func_800B7298(play, NULL, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, NULL, PLAYER_CSACTION_WAIT);
}
return 0;
}
@@ -456,7 +456,7 @@ s32 func_80BA42BC(EnToto* this, PlayState* play) {
Vec3s* end = &D_80BA510C[3];
func_80BA3FB0(this, play);
- func_800B7298(play, NULL, PLAYER_CSMODE_END);
+ func_800B7298(play, NULL, PLAYER_CSACTION_END);
if (player->actor.world.pos.z > -310.0f) {
if ((player->actor.world.pos.x > -150.0f) || (player->actor.world.pos.z > -172.0f)) {
phi_s0 = 3;
@@ -476,7 +476,7 @@ s32 func_80BA42BC(EnToto* this, PlayState* play) {
s32 func_80BA43F4(EnToto* this, PlayState* play) {
func_80BA3C88(this);
if (func_80122760(play, &this->unk_2BC, 60.0f)) {
- func_800B7298(play, NULL, PLAYER_CSMODE_19);
+ func_800B7298(play, NULL, PLAYER_CSACTION_19);
return func_80BA4204(this, play);
}
return 0;
@@ -484,7 +484,7 @@ s32 func_80BA43F4(EnToto* this, PlayState* play) {
s32 func_80BA445C(EnToto* this, PlayState* play) {
if (func_80BA4128(this, play)) {
- func_800B7298(play, NULL, PLAYER_CSMODE_END);
+ func_800B7298(play, NULL, PLAYER_CSACTION_END);
return 1;
}
return 0;
@@ -546,7 +546,7 @@ s32 func_80BA4530(EnToto* this, PlayState* play) {
}
s32 func_80BA46D8(EnToto* this, PlayState* play) {
- func_800B7298(play, NULL, PLAYER_CSMODE_68);
+ func_800B7298(play, NULL, PLAYER_CSACTION_68);
Message_DisplayOcarinaStaff(play, sOcarinaActionWindFishPrompts[CUR_FORM]);
return 0;
}
@@ -603,7 +603,7 @@ s32 func_80BA47E0(EnToto* this, PlayState* play) {
}
s32 func_80BA49A4(EnToto* this, PlayState* play) {
- func_800B7298(play, NULL, PLAYER_CSMODE_68);
+ func_800B7298(play, NULL, PLAYER_CSACTION_68);
func_801A31EC(NA_BGM_BALLAD_OF_THE_WIND_FISH, 4, this->unk2B3 ^ 0xF);
this->unk2B1 = 4;
return 0;
@@ -623,7 +623,7 @@ s32 func_80BA4A00(EnToto* this, PlayState* play) {
if (this->spotlights != NULL) {
Actor_Kill(this->spotlights);
}
- func_800B7298(play, NULL, PLAYER_CSMODE_69);
+ func_800B7298(play, NULL, PLAYER_CSACTION_69);
if (this->unk2B3 == 0xF) {
if (CURRENT_DAY == 1) {
SET_WEEKEVENTREG(WEEKEVENTREG_50_01);
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 ca614643f..16fdd5cf2 100644
--- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c
+++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c
@@ -457,7 +457,7 @@ void EnWallmas_SetupTakePlayer(EnWallmas* this, PlayState* play) {
this->actor.speed = 0.0f;
this->actor.velocity.y = 0.0f;
this->yTarget = this->actor.playerHeightRel;
- func_800B724C(play, &this->actor, PLAYER_CSMODE_18);
+ func_800B724C(play, &this->actor, PLAYER_CSACTION_18);
}
void EnWallmas_TakePlayer(EnWallmas* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c b/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c
index fcac1e837..0bce7ae70 100644
--- a/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c
+++ b/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c
@@ -97,10 +97,10 @@ void EnWarpTag_WaitForPlayer(EnWarptag* this, PlayState* play) {
if (!Player_InCsMode(play) && (this->dyna.actor.xzDistToPlayer <= 30.0f) &&
(this->dyna.actor.playerHeightRel <= 10.0f)) {
if (WARPTAG_GET_INVISIBLE(&this->dyna.actor)) {
- func_800B7298(play, NULL, PLAYER_CSMODE_81);
+ func_800B7298(play, NULL, PLAYER_CSACTION_81);
this->actionFunc = EnWarpTag_GrottoReturn;
} else {
- func_800B7298(play, NULL, PLAYER_CSMODE_15);
+ func_800B7298(play, NULL, PLAYER_CSACTION_15);
this->actionFunc = EnWarpTag_RespawnPlayer;
}
}
@@ -129,7 +129,7 @@ void EnWarpTag_Unused809C09A0(EnWarptag* this, PlayState* play) {
*/
void EnWarpTag_Unused809C0A20(EnWarptag* this, PlayState* play) {
if (play->msgCtx.ocarinaMode == OCARINA_MODE_PLAYED_STORMS) {
- func_800B7298(play, NULL, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, NULL, PLAYER_CSACTION_WAIT);
this->actionFunc = EnWarpTag_RespawnPlayer;
CutsceneManager_Stop(CutsceneManager_GetCurrentCsId());
diff --git a/src/overlays/actors/ovl_En_Zod/z_en_zod.c b/src/overlays/actors/ovl_En_Zod/z_en_zod.c
index f30aa51b8..c706e850d 100644
--- a/src/overlays/actors/ovl_En_Zod/z_en_zod.c
+++ b/src/overlays/actors/ovl_En_Zod/z_en_zod.c
@@ -480,7 +480,7 @@ void func_80BAFDB4(EnZod* this, PlayState* play) {
EnZod_UpdateAnimation(this);
if (CutsceneManager_IsNext(this->actor.csId)) {
CutsceneManager_Start(this->actor.csId, &this->actor);
- func_800B7298(play, NULL, PLAYER_CSMODE_68);
+ func_800B7298(play, NULL, PLAYER_CSACTION_68);
Message_StartTextbox(play, 0x103A, &this->actor);
this->actionFunc = EnZod_SetupRehearse;
} else {
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 d5ec2917a..7a8272c83 100644
--- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c
+++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c
@@ -593,7 +593,7 @@ void func_809381C4(ObjBean* this, PlayState* play) {
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
if (this->dyna.actor.csId >= 0) {
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_1);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_1);
}
this->unk_1E4 = 2;
func_80938284(this);
@@ -750,7 +750,7 @@ void func_80938780(ObjBean* this, PlayState* play) {
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
if (this->dyna.actor.csId >= 0) {
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_1);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_1);
}
this->unk_1B4 = 36;
func_80937130(this);
diff --git a/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c b/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c
index cf2ef3ded..a4640c476 100644
--- a/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c
+++ b/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c
@@ -134,7 +134,7 @@ void ObjBoat_Update(Actor* thisx, PlayState* play) {
}
}
- if (player->csMode != PLAYER_CSMODE_26) {
+ if (player->csAction != PLAYER_CSACTION_26) {
Math_ScaledStepToS(&this->dyna.actor.shape.rot.y, yawTarget, (s32)(fabsf(this->dyna.actor.speed) * 40.0f));
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y;
Math_StepToF(&this->dyna.actor.speed, speedTarget, 0.05f);
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 4227178e2..8f9f21ddf 100644
--- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c
+++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c
@@ -495,7 +495,7 @@ void func_8098E0B8(ObjComb* this, PlayState* play) {
if ((this->unk_1B4 == 10) && (this->unk_1B6 != 0) && (this->unk_1B5 == 2) && (this->actor.csId >= 0)) {
if (CutsceneManager_GetCurrentCsId() == this->actor.csId) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_4);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_4);
}
}
}
@@ -529,7 +529,7 @@ void ObjComb_Update(Actor* thisx, PlayState* play) {
if (CutsceneManager_IsNext(this->actor.csId)) {
CutsceneManager_StartWithPlayerCs(this->actor.csId, &this->actor);
if (this->actor.csId >= 0) {
- func_800B7298(play, &this->actor, PLAYER_CSMODE_1);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_1);
}
if (((OBJCOMB_GET_8000(&this->actor) | OBJCOMB_GET_80(&this->actor)) == 1) &&
diff --git a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c
index ad3f02a62..28fbc6546 100644
--- a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c
+++ b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c
@@ -1209,7 +1209,7 @@ void func_80A25FD4(ObjIceblock* this, PlayState* play) {
func_80A23370(this, sp2C);
func_80A260E8(this);
sp30 = false;
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_WAIT);
this->unk_1B0 |= 1;
}
@@ -1255,7 +1255,7 @@ void func_80A26144(ObjIceblock* this, PlayState* play) {
if ((this->unk_1B0 & 1) && (isBool || sp28 || (this->dyna.actor.xzDistToPlayer > 400.0f))) {
this->unk_1B0 &= ~1;
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_END);
}
if (isBool) {
@@ -1454,7 +1454,7 @@ void ObjIceblock_Update(Actor* thisx, PlayState* play) {
this->unk_1B0 &= ~0x100;
if (this->unk_1B0 & 1) {
this->unk_1B0 &= ~1;
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_END);
}
func_80A266C4(this);
}
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 c7605c825..56b23e839 100644
--- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c
+++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c
@@ -130,7 +130,7 @@ void func_8099FD7C(Actor* thisx, PlayState* play) {
if (CutsceneManager_IsNext(thisx->csId)) {
CutsceneManager_StartWithPlayerCs(thisx->csId, thisx);
if (thisx->csId >= 0) {
- func_800B7298(play, thisx, PLAYER_CSMODE_4);
+ func_800B7298(play, thisx, PLAYER_CSACTION_4);
}
func_8099FB64(thisx, play);
thisx->update = Actor_Noop;
diff --git a/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c b/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c
index 543aacbcb..f09b00cd2 100644
--- a/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c
+++ b/src/overlays/actors/ovl_Obj_Skateblock/z_obj_skateblock.c
@@ -535,7 +535,7 @@ void func_80A22334(ObjSkateblock* this, PlayState* play) {
func_80A21C88(this, sp2C);
func_80A2244C(this);
sp30 = false;
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_WAIT);
this->unk_1C1 |= 1;
}
@@ -591,7 +591,7 @@ void func_80A224A4(ObjSkateblock* this, PlayState* play) {
if ((this->unk_1C1 & 1) && (sp24 || sp28 || (this->dyna.actor.xzDistToPlayer > 400.0f))) {
this->unk_1C1 &= ~1;
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_END);
}
func_80A21F74(this, play);
diff --git a/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c b/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c
index e9dc30389..cf784daff 100644
--- a/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c
+++ b/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c
@@ -679,7 +679,7 @@ void func_80B30A4C(ObjSpidertent* this, PlayState* play) {
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
if (this->dyna.actor.csId >= 0) {
- func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_1);
+ func_800B7298(play, &this->dyna.actor, PLAYER_CSACTION_1);
}
Flags_SetSwitch(play, OBJSPIDERTENT_GET_SWITCH_FLAG(&this->dyna.actor));
func_80B30AD4(this);
diff --git a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c
index a44f2cbb1..f4b5ca225 100644
--- a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c
+++ b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c
@@ -73,7 +73,7 @@ void func_808A7AAC(ObjWturn* this, PlayState* play) {
CutsceneManager_StartWithPlayerCs(this->actor.csId, &this->actor);
Play_EnableMotionBlur(140);
this->subCamId = CutsceneManager_GetCurrentSubCamId(this->actor.csId);
- func_800B7298(play, &this->actor, PLAYER_CSMODE_21);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_21);
subCamAt.x = player->actor.focus.pos.x;
subCamAt.z = player->actor.focus.pos.z;
subCamAt.y = player->actor.focus.pos.y;
@@ -97,7 +97,7 @@ void func_808A7C04(ObjWturn* this, PlayState* play) {
this->actor.world.pos.y += this->actor.playerHeightRel;
player->actor.shape.shadowAlpha = 0;
- func_800B7298(play, &this->actor, PLAYER_CSMODE_84);
+ func_800B7298(play, &this->actor, PLAYER_CSACTION_84);
Player_PlaySfx(player, NA_SE_VO_NAVY_ENEMY);
this->unk_14A = 0;
Play_DisableMotionBlur();
diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c
index 43021a023..0fc16b824 100644
--- a/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/src/overlays/actors/ovl_player_actor/z_player.c
@@ -52,7 +52,7 @@ void Player_Update(Actor* thisx, PlayState* play);
void Player_Draw(Actor* thisx, PlayState* play);
s32 Player_GrabPlayer(PlayState* play, Player* this);
-s32 func_8085B28C(PlayState* play, Player* this, PlayerCsMode csMode);
+s32 func_8085B28C(PlayState* play, Player* this, PlayerCsAction csAction);
void func_8085B384(Player* this, PlayState* play);
s32 Player_InflictDamage(PlayState* play, s32 damage);
void Player_TalkWithPlayer(PlayState* play, Actor* actor);
@@ -353,7 +353,7 @@ typedef struct BlureColors {
} BlureColors; // size = 0x10
typedef void (*PlayerCsAnim)(PlayState*, Player*, void*);
-typedef void (*PlayerCsAction)(PlayState*, Player*, CsCmdActorCue*);
+typedef void (*PlayerCsActionFunc)(PlayState*, Player*, CsCmdActorCue*);
typedef enum {
/* -1 */ PLAYER_CSTYPE_ACTION = -1,
@@ -379,17 +379,17 @@ typedef enum {
/* 0x13 */ PLAYER_CSTYPE_ANIM_19
} PlayerCsType;
-typedef struct PlayerCsModeEntry {
+typedef struct PlayerCsActionEntry {
/* 0x0 */ s8 type; // PlayerCsType enum
/* 0x4 */ union {
void* ptr; // Do not use, required in the absence of designated initialisors
- PlayerCsAction csActionFunc;
+ PlayerCsActionFunc csActionFunc;
void* csAnimArg2; // Can point to any of the below in the union
PlayerAnimationHeader* anim;
AnimSfxEntry* entry;
CsCmdActorCue* cue;
};
-} PlayerCsModeEntry; // size = 0x8
+} PlayerCsActionEntry; // size = 0x8
typedef struct struct_8085E368 {
/* 0x0 */ Vec3s base;
@@ -3797,7 +3797,7 @@ void Player_UpdateItems(Player* this, PlayState* play) {
if ((this->actor.id == ACTOR_PLAYER) && !(this->stateFlags3 & PLAYER_STATE3_START_CHANGING_HELD_ITEM)) {
if ((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_400000)) {
if ((gSaveContext.save.saveInfo.playerData.health != 0) && (play->csCtx.state == CS_STATE_IDLE)) {
- if ((this->csMode == PLAYER_CSMODE_NONE) && (play->unk_1887C == 0) &&
+ if ((this->csAction == PLAYER_CSACTION_NONE) && (play->unk_1887C == 0) &&
(play->activeCamId == CAM_ID_MAIN)) {
if (!func_8082DA90(play) && (gSaveContext.timerStates[TIMER_ID_MINIGAME_2] != TIMER_STATE_STOP)) {
Player_ProcessItemButtons(this, play);
@@ -4698,7 +4698,7 @@ void func_80832888(Player* this, PlayState* play) {
this->stateFlags1 &= ~PLAYER_STATE1_40000000;
}
- if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != PLAYER_CSMODE_NONE) ||
+ if ((play->csCtx.state != CS_STATE_IDLE) || (this->csAction != PLAYER_CSACTION_NONE) ||
(this->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_20000000)) || (this->stateFlags3 & PLAYER_STATE3_80)) {
this->unk_738 = 0;
} else if (heldZ || (this->stateFlags2 & PLAYER_STATE2_2000) || (this->unk_A78 != NULL)) {
@@ -5791,7 +5791,7 @@ s32 func_80834600(Player* this, PlayState* play) {
return false;
} else if ((this->unk_D6B != 0) || (this->invincibilityTimer > 0) || (this->stateFlags1 & PLAYER_STATE1_4000000) ||
- (this->csMode != PLAYER_CSMODE_NONE) || (this->meleeWeaponQuads[0].base.atFlags & AT_HIT) ||
+ (this->csAction != PLAYER_CSACTION_NONE) || (this->meleeWeaponQuads[0].base.atFlags & AT_HIT) ||
(this->meleeWeaponQuads[1].base.atFlags & AT_HIT) || (this->cylinder.base.atFlags & AT_HIT) ||
(this->shieldCylinder.base.atFlags & AT_HIT)) {
return false;
@@ -6094,7 +6094,7 @@ s32 Player_HandleExitsAndVoids(PlayState* play, Player* this, CollisionPoly* pol
s32 sp30;
if ((this == GET_PLAYER(play)) && !(this->stateFlags1 & PLAYER_STATE1_80) && !func_8082DA90(play) &&
- (this->csMode == PLAYER_CSMODE_NONE) && !(this->stateFlags1 & PLAYER_STATE1_1)) {
+ (this->csAction == PLAYER_CSACTION_NONE) && !(this->stateFlags1 & PLAYER_STATE1_1)) {
exitIndexPlusOne = 0;
if (((poly != NULL) &&
@@ -6694,7 +6694,7 @@ s32 func_80836F10(PlayState* play, Player* this) {
s32 fallDistance;
if ((sPlayerFloorType == FLOOR_TYPE_6) || (sPlayerFloorType == FLOOR_TYPE_9) ||
- (this->csMode != PLAYER_CSMODE_NONE)) {
+ (this->csAction != PLAYER_CSACTION_NONE)) {
fallDistance = 0;
} else {
fallDistance = this->fallDistance;
@@ -9085,7 +9085,7 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) {
func_8083D168(play, this, giEntry);
this->getItemId = GI_NONE;
}
- } else if (this->csMode == PLAYER_CSMODE_NONE) {
+ } else if (this->csAction == PLAYER_CSACTION_NONE) {
if (!(this->stateFlags1 & PLAYER_STATE1_800)) {
if (this->getItemId != GI_NONE) {
if (CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_A)) {
@@ -10740,7 +10740,7 @@ void Player_Init(Actor* thisx, PlayState* play) {
tireMark->color = D_8085D33C;
}
- if ((this->csMode == PLAYER_CSMODE_9) || (this->csMode == PLAYER_CSMODE_93)) {
+ if ((this->csAction == PLAYER_CSACTION_9) || (this->csAction == PLAYER_CSACTION_93)) {
Player_SetAction(play, this, Player_Action_97, 0);
this->stateFlags1 |= PLAYER_STATE1_20000000;
} else {
@@ -10778,7 +10778,7 @@ void Player_Init(Actor* thisx, PlayState* play) {
if (this->actor.shape.rot.x != 0) {
this->actor.shape.rot.x = 0;
- this->csMode = PLAYER_CSMODE_68;
+ this->csAction = PLAYER_CSACTION_68;
Player_SetAction(play, this, Player_Action_97, 0);
this->stateFlags1 |= PLAYER_STATE1_20000000;
return;
@@ -11475,7 +11475,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) {
seqMode = SEQ_MODE_DEFAULT;
if (this->stateFlags1 & PLAYER_STATE1_100000) {
seqMode = SEQ_MODE_STILL;
- } else if (this->csMode != PLAYER_CSMODE_NONE) {
+ } else if (this->csAction != PLAYER_CSACTION_NONE) {
Camera_ChangeMode(Play_GetCamera(play, CAM_ID_MAIN), CAM_MODE_NORMAL);
} else {
camera = (this->actor.id == ACTOR_PLAYER) ? Play_GetCamera(play, CAM_ID_MAIN)
@@ -11654,103 +11654,101 @@ void Player_DetectSecrets(PlayState* play, Player* this) {
}
}
-// Making a player csMode negative will behave as its positive counterpart
+// Making a player csAction negative will behave as its positive counterpart
// except will disable setting the start position
-#define DISABLE_PLAYER_CSMODE_START_POS(csMode) -(csMode)
-
-s8 sPlayerCsModes[PLAYER_CUEID_MAX] = {
- /* PLAYER_CUEID_NONE */ PLAYER_CSMODE_NONE,
- /* PLAYER_CUEID_1 */ PLAYER_CSMODE_2,
- /* PLAYER_CUEID_2 */ PLAYER_CSMODE_2,
- /* PLAYER_CUEID_3 */ PLAYER_CSMODE_4,
- /* PLAYER_CUEID_4 */ PLAYER_CSMODE_3,
- /* PLAYER_CUEID_5 */ PLAYER_CSMODE_56,
- /* PLAYER_CUEID_6 */ PLAYER_CSMODE_8,
- /* PLAYER_CUEID_7 */ PLAYER_CSMODE_NONE,
- /* PLAYER_CUEID_8 */ PLAYER_CSMODE_NONE,
- /* PLAYER_CUEID_9 */ PLAYER_CSMODE_135,
- /* PLAYER_CUEID_10 */ PLAYER_CSMODE_21,
- /* PLAYER_CUEID_11 */ PLAYER_CSMODE_61,
- /* PLAYER_CUEID_12 */ PLAYER_CSMODE_62,
- /* PLAYER_CUEID_13 */ PLAYER_CSMODE_60,
- /* PLAYER_CUEID_14 */ PLAYER_CSMODE_63,
- /* PLAYER_CUEID_15 */ PLAYER_CSMODE_64,
- /* PLAYER_CUEID_16 */ PLAYER_CSMODE_65,
- /* PLAYER_CUEID_17 */ PLAYER_CSMODE_66,
- /* PLAYER_CUEID_18 */ PLAYER_CSMODE_70,
- /* PLAYER_CUEID_19 */ PLAYER_CSMODE_19,
- /* PLAYER_CUEID_20 */ PLAYER_CSMODE_71,
- /* PLAYER_CUEID_21 */ PLAYER_CSMODE_72,
- /* PLAYER_CUEID_22 */ PLAYER_CSMODE_67,
- /* PLAYER_CUEID_23 */ PLAYER_CSMODE_73,
- /* PLAYER_CUEID_24 */ PLAYER_CSMODE_74,
- /* PLAYER_CUEID_25 */ PLAYER_CSMODE_75,
- /* PLAYER_CUEID_26 */ PLAYER_CSMODE_68,
- /* PLAYER_CUEID_27 */ PLAYER_CSMODE_69,
- /* PLAYER_CUEID_28 */ PLAYER_CSMODE_76,
- /* PLAYER_CUEID_29 */ PLAYER_CSMODE_116,
- /* PLAYER_CUEID_30 */ PLAYER_CSMODE_NONE,
- /* PLAYER_CUEID_31 */ PLAYER_CSMODE_40,
- /* PLAYER_CUEID_32 */ PLAYER_CSMODE_NONE,
- /* PLAYER_CUEID_33 */ DISABLE_PLAYER_CSMODE_START_POS(PLAYER_CSMODE_52),
- /* PLAYER_CUEID_34 */ PLAYER_CSMODE_42,
- /* PLAYER_CUEID_35 */ PLAYER_CSMODE_43,
- /* PLAYER_CUEID_36 */ PLAYER_CSMODE_57,
- /* PLAYER_CUEID_37 */ PLAYER_CSMODE_81,
- /* PLAYER_CUEID_38 */ PLAYER_CSMODE_41,
- /* PLAYER_CUEID_39 */ PLAYER_CSMODE_53,
- /* PLAYER_CUEID_40 */ PLAYER_CSMODE_54,
- /* PLAYER_CUEID_41 */ PLAYER_CSMODE_44,
- /* PLAYER_CUEID_42 */ PLAYER_CSMODE_55,
- /* PLAYER_CUEID_43 */ PLAYER_CSMODE_45,
- /* PLAYER_CUEID_44 */ PLAYER_CSMODE_46,
- /* PLAYER_CUEID_45 */ PLAYER_CSMODE_47,
- /* PLAYER_CUEID_46 */ PLAYER_CSMODE_48,
- /* PLAYER_CUEID_47 */ PLAYER_CSMODE_49,
- /* PLAYER_CUEID_48 */ PLAYER_CSMODE_50,
- /* PLAYER_CUEID_49 */ PLAYER_CSMODE_51,
- /* PLAYER_CUEID_50 */ PLAYER_CSMODE_77,
- /* PLAYER_CUEID_51 */ PLAYER_CSMODE_78,
- /* PLAYER_CUEID_52 */ PLAYER_CSMODE_79,
- /* PLAYER_CUEID_53 */ PLAYER_CSMODE_80,
- /* PLAYER_CUEID_54 */ PLAYER_CSMODE_81,
- /* PLAYER_CUEID_55 */ PLAYER_CSMODE_82,
- /* PLAYER_CUEID_56 */ PLAYER_CSMODE_83,
- /* PLAYER_CUEID_57 */ PLAYER_CSMODE_84,
- /* PLAYER_CUEID_58 */ PLAYER_CSMODE_85,
- /* PLAYER_CUEID_59 */ PLAYER_CSMODE_86,
- /* PLAYER_CUEID_60 */ PLAYER_CSMODE_87,
- /* PLAYER_CUEID_61 */ PLAYER_CSMODE_88,
- /* PLAYER_CUEID_62 */ PLAYER_CSMODE_89,
- /* PLAYER_CUEID_63 */ PLAYER_CSMODE_90,
- /* PLAYER_CUEID_64 */ PLAYER_CSMODE_91,
- /* PLAYER_CUEID_65 */ PLAYER_CSMODE_92,
- /* PLAYER_CUEID_66 */ PLAYER_CSMODE_94,
- /* PLAYER_CUEID_67 */ PLAYER_CSMODE_95,
- /* PLAYER_CUEID_68 */ PLAYER_CSMODE_100,
- /* PLAYER_CUEID_69 */ PLAYER_CSMODE_101,
- /* PLAYER_CUEID_70 */ PLAYER_CSMODE_98,
- /* PLAYER_CUEID_71 */ PLAYER_CSMODE_99,
- /* PLAYER_CUEID_72 */ PLAYER_CSMODE_102,
- /* PLAYER_CUEID_73 */ PLAYER_CSMODE_103,
- /* PLAYER_CUEID_74 */ PLAYER_CSMODE_104,
- /* PLAYER_CUEID_75 */ PLAYER_CSMODE_112,
- /* PLAYER_CUEID_76 */ PLAYER_CSMODE_113,
- /* PLAYER_CUEID_77 */ PLAYER_CSMODE_117,
- /* PLAYER_CUEID_78 */ PLAYER_CSMODE_104,
- /* PLAYER_CUEID_79 */ PLAYER_CSMODE_104,
- /* PLAYER_CUEID_80 */ PLAYER_CSMODE_105,
- /* PLAYER_CUEID_81 */ PLAYER_CSMODE_106,
- /* PLAYER_CUEID_82 */ PLAYER_CSMODE_107,
- /* PLAYER_CUEID_83 */ PLAYER_CSMODE_108,
- /* PLAYER_CUEID_84 */ PLAYER_CSMODE_109,
- /* PLAYER_CUEID_85 */ PLAYER_CSMODE_110,
- /* PLAYER_CUEID_86 */ PLAYER_CSMODE_118,
- /* PLAYER_CUEID_87 */ PLAYER_CSMODE_119,
- /* PLAYER_CUEID_88 */ PLAYER_CSMODE_120,
- /* PLAYER_CUEID_89 */ PLAYER_CSMODE_114,
- /* PLAYER_CUEID_90 */ PLAYER_CSMODE_111,
- /* PLAYER_CUEID_91 */ PLAYER_CSMODE_122,
+s8 sPlayerCueToCsActionMap[PLAYER_CUEID_MAX] = {
+ PLAYER_CSACTION_NONE, // PLAYER_CUEID_NONE
+ PLAYER_CSACTION_2, // PLAYER_CUEID_1
+ PLAYER_CSACTION_2, // PLAYER_CUEID_2
+ PLAYER_CSACTION_4, // PLAYER_CUEID_3
+ PLAYER_CSACTION_3, // PLAYER_CUEID_4
+ PLAYER_CSACTION_56, // PLAYER_CUEID_5
+ PLAYER_CSACTION_8, // PLAYER_CUEID_6
+ PLAYER_CSACTION_NONE, // PLAYER_CUEID_7
+ PLAYER_CSACTION_NONE, // PLAYER_CUEID_8
+ PLAYER_CSACTION_135, // PLAYER_CUEID_9
+ PLAYER_CSACTION_21, // PLAYER_CUEID_10
+ PLAYER_CSACTION_61, // PLAYER_CUEID_11
+ PLAYER_CSACTION_62, // PLAYER_CUEID_12
+ PLAYER_CSACTION_60, // PLAYER_CUEID_13
+ PLAYER_CSACTION_63, // PLAYER_CUEID_14
+ PLAYER_CSACTION_64, // PLAYER_CUEID_15
+ PLAYER_CSACTION_65, // PLAYER_CUEID_16
+ PLAYER_CSACTION_66, // PLAYER_CUEID_17
+ PLAYER_CSACTION_70, // PLAYER_CUEID_18
+ PLAYER_CSACTION_19, // PLAYER_CUEID_19
+ PLAYER_CSACTION_71, // PLAYER_CUEID_20
+ PLAYER_CSACTION_72, // PLAYER_CUEID_21
+ PLAYER_CSACTION_67, // PLAYER_CUEID_22
+ PLAYER_CSACTION_73, // PLAYER_CUEID_23
+ PLAYER_CSACTION_74, // PLAYER_CUEID_24
+ PLAYER_CSACTION_75, // PLAYER_CUEID_25
+ PLAYER_CSACTION_68, // PLAYER_CUEID_26
+ PLAYER_CSACTION_69, // PLAYER_CUEID_27
+ PLAYER_CSACTION_76, // PLAYER_CUEID_28
+ PLAYER_CSACTION_116, // PLAYER_CUEID_29
+ PLAYER_CSACTION_NONE, // PLAYER_CUEID_30
+ PLAYER_CSACTION_40, // PLAYER_CUEID_31
+ PLAYER_CSACTION_NONE, // PLAYER_CUEID_32
+ -PLAYER_CSACTION_52, // PLAYER_CUEID_33
+ PLAYER_CSACTION_42, // PLAYER_CUEID_34
+ PLAYER_CSACTION_43, // PLAYER_CUEID_35
+ PLAYER_CSACTION_57, // PLAYER_CUEID_36
+ PLAYER_CSACTION_81, // PLAYER_CUEID_37
+ PLAYER_CSACTION_41, // PLAYER_CUEID_38
+ PLAYER_CSACTION_53, // PLAYER_CUEID_39
+ PLAYER_CSACTION_54, // PLAYER_CUEID_40
+ PLAYER_CSACTION_44, // PLAYER_CUEID_41
+ PLAYER_CSACTION_55, // PLAYER_CUEID_42
+ PLAYER_CSACTION_45, // PLAYER_CUEID_43
+ PLAYER_CSACTION_46, // PLAYER_CUEID_44
+ PLAYER_CSACTION_47, // PLAYER_CUEID_45
+ PLAYER_CSACTION_48, // PLAYER_CUEID_46
+ PLAYER_CSACTION_49, // PLAYER_CUEID_47
+ PLAYER_CSACTION_50, // PLAYER_CUEID_48
+ PLAYER_CSACTION_51, // PLAYER_CUEID_49
+ PLAYER_CSACTION_77, // PLAYER_CUEID_50
+ PLAYER_CSACTION_78, // PLAYER_CUEID_51
+ PLAYER_CSACTION_79, // PLAYER_CUEID_52
+ PLAYER_CSACTION_80, // PLAYER_CUEID_53
+ PLAYER_CSACTION_81, // PLAYER_CUEID_54
+ PLAYER_CSACTION_82, // PLAYER_CUEID_55
+ PLAYER_CSACTION_83, // PLAYER_CUEID_56
+ PLAYER_CSACTION_84, // PLAYER_CUEID_57
+ PLAYER_CSACTION_85, // PLAYER_CUEID_58
+ PLAYER_CSACTION_86, // PLAYER_CUEID_59
+ PLAYER_CSACTION_87, // PLAYER_CUEID_60
+ PLAYER_CSACTION_88, // PLAYER_CUEID_61
+ PLAYER_CSACTION_89, // PLAYER_CUEID_62
+ PLAYER_CSACTION_90, // PLAYER_CUEID_63
+ PLAYER_CSACTION_91, // PLAYER_CUEID_64
+ PLAYER_CSACTION_92, // PLAYER_CUEID_65
+ PLAYER_CSACTION_94, // PLAYER_CUEID_66
+ PLAYER_CSACTION_95, // PLAYER_CUEID_67
+ PLAYER_CSACTION_100, // PLAYER_CUEID_68
+ PLAYER_CSACTION_101, // PLAYER_CUEID_69
+ PLAYER_CSACTION_98, // PLAYER_CUEID_70
+ PLAYER_CSACTION_99, // PLAYER_CUEID_71
+ PLAYER_CSACTION_102, // PLAYER_CUEID_72
+ PLAYER_CSACTION_103, // PLAYER_CUEID_73
+ PLAYER_CSACTION_104, // PLAYER_CUEID_74
+ PLAYER_CSACTION_112, // PLAYER_CUEID_75
+ PLAYER_CSACTION_113, // PLAYER_CUEID_76
+ PLAYER_CSACTION_117, // PLAYER_CUEID_77
+ PLAYER_CSACTION_104, // PLAYER_CUEID_78
+ PLAYER_CSACTION_104, // PLAYER_CUEID_79
+ PLAYER_CSACTION_105, // PLAYER_CUEID_80
+ PLAYER_CSACTION_106, // PLAYER_CUEID_81
+ PLAYER_CSACTION_107, // PLAYER_CUEID_82
+ PLAYER_CSACTION_108, // PLAYER_CUEID_83
+ PLAYER_CSACTION_109, // PLAYER_CUEID_84
+ PLAYER_CSACTION_110, // PLAYER_CUEID_85
+ PLAYER_CSACTION_118, // PLAYER_CUEID_86
+ PLAYER_CSACTION_119, // PLAYER_CUEID_87
+ PLAYER_CSACTION_120, // PLAYER_CUEID_88
+ PLAYER_CSACTION_114, // PLAYER_CUEID_89
+ PLAYER_CSACTION_111, // PLAYER_CUEID_90
+ PLAYER_CSACTION_122, // PLAYER_CUEID_91
};
f32 D_8085D3E0[PLAYER_FORM_MAX] = {
@@ -12141,29 +12139,29 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
}
if (play->csCtx.state != CS_STATE_IDLE) {
- if ((this->csMode != PLAYER_CSMODE_5) && !(this->stateFlags1 & PLAYER_STATE1_800000)) {
+ if ((this->csAction != PLAYER_CSACTION_5) && !(this->stateFlags1 & PLAYER_STATE1_800000)) {
if (!(this->stateFlags2 & PLAYER_STATE2_80) && (this->actor.id == ACTOR_PLAYER)) {
if ((play->csCtx.playerCue != NULL) &&
- (sPlayerCsModes[play->csCtx.playerCue->id] != PLAYER_CSMODE_NONE)) {
- func_800B7298(play, NULL, PLAYER_CSMODE_5);
+ (sPlayerCueToCsActionMap[play->csCtx.playerCue->id] != PLAYER_CSACTION_NONE)) {
+ func_800B7298(play, NULL, PLAYER_CSACTION_5);
Player_StopHorizontalMovement(this);
- } else if (((u32)this->csMode == PLAYER_CSMODE_NONE) &&
+ } else if (((u32)this->csAction == PLAYER_CSACTION_NONE) &&
!(this->stateFlags2 & (PLAYER_STATE2_400 | PLAYER_STATE2_8000000)) &&
(play->csCtx.state != CS_STATE_STOP)) {
- func_800B7298(play, NULL, PLAYER_CSMODE_20);
+ func_800B7298(play, NULL, PLAYER_CSACTION_20);
Player_StopHorizontalMovement(this);
}
}
}
}
- if ((u32)this->csMode != PLAYER_CSMODE_NONE) {
- if ((this->csMode != PLAYER_CSMODE_END) ||
+ if ((u32)this->csAction != PLAYER_CSACTION_NONE) {
+ if ((this->csAction != PLAYER_CSACTION_END) ||
!(this->stateFlags1 & (PLAYER_STATE1_4 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 |
PLAYER_STATE1_200000 | PLAYER_STATE1_4000000))) {
if (Player_Action_97 != this->actionFunc) {
this->unk_AA5 = PLAYER_UNKAA5_4;
- if (this->csMode == PLAYER_CSMODE_5) {
+ if (this->csAction == PLAYER_CSACTION_5) {
func_808387A0(play, this);
func_8082DAD4(this);
}
@@ -12172,7 +12170,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
Player_CsAction_End(play, this, NULL);
}
} else {
- this->prevCsMode = PLAYER_CSMODE_NONE;
+ this->prevCsAction = PLAYER_CSACTION_NONE;
}
func_8083BF54(play, this);
@@ -12323,7 +12321,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
!(this->stateFlags3 & PLAYER_STATE3_10000000)) {
if ((Player_Action_93 != this->actionFunc) && (Player_Action_73 != this->actionFunc) &&
(this->actor.draw != NULL)) {
- if ((this->actor.id != ACTOR_PLAYER) && (this->csMode == PLAYER_CSMODE_110)) {
+ if ((this->actor.id != ACTOR_PLAYER) && (this->csAction == PLAYER_CSACTION_110)) {
this->cylinder.dim.radius = 8;
}
CollisionCheck_SetOC(play, &play->colChkCtx, &this->cylinder.base);
@@ -12410,9 +12408,9 @@ void Player_Update(Actor* thisx, PlayState* play) {
if ((play->actorCtx.unk268 != 0) && (this == GET_PLAYER(play))) {
input = play->actorCtx.unk_26C;
- } else if ((this->csMode == PLAYER_CSMODE_5) || (this->stateFlags1 & (PLAYER_STATE1_20 | PLAYER_STATE1_20000000)) ||
- (this != GET_PLAYER(play)) || func_8082DA90(play) ||
- (gSaveContext.save.saveInfo.playerData.health == 0)) {
+ } else if ((this->csAction == PLAYER_CSACTION_5) ||
+ (this->stateFlags1 & (PLAYER_STATE1_20 | PLAYER_STATE1_20000000)) || (this != GET_PLAYER(play)) ||
+ func_8082DA90(play) || (gSaveContext.save.saveInfo.playerData.health == 0)) {
bzero(&input, sizeof(Input));
this->fallStartHeight = this->actor.world.pos.y;
} else {
@@ -12676,7 +12674,7 @@ void Player_Draw(Actor* thisx, PlayState* play) {
NULL, NULL, NULL);
} else {
OverrideLimbDrawFlex sp84 = Player_OverrideLimbDrawGameplayDefault;
- s32 lod = ((this->csMode != PLAYER_CSMODE_NONE) || (this->actor.projectedPos.z < 320.0f)) ? 0 : 1;
+ s32 lod = ((this->csAction != PLAYER_CSACTION_NONE) || (this->actor.projectedPos.z < 320.0f)) ? 0 : 1;
Vec3f sp74;
//! FAKE
@@ -12892,7 +12890,7 @@ s32 func_80847880(PlayState* play, Player* this) {
if (play->sceneId == SCENE_20SICHITAI) {
Player_SetAction(play, this, Player_Action_80, 0);
play->unk_1887C = 0;
- this->csMode = PLAYER_CSMODE_NONE;
+ this->csAction = PLAYER_CSACTION_NONE;
return true;
}
@@ -12902,7 +12900,7 @@ s32 func_80847880(PlayState* play, Player* this) {
Player_UseItem(play, this, ITEM_BOW);
}
Player_AnimationPlayOnce(play, this, func_8082ED20(this));
- this->csMode = PLAYER_CSMODE_NONE;
+ this->csAction = PLAYER_CSACTION_NONE;
this->stateFlags1 |= PLAYER_STATE1_100000;
Player_StopHorizontalMovement(this);
func_80836D8C(this);
@@ -13192,7 +13190,7 @@ s32 func_808482E0(PlayState* play, Player* this) {
play->transitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
this->stateFlags1 &= ~PLAYER_STATE1_20000000;
- func_8085B28C(play, NULL, PLAYER_CSMODE_WAIT);
+ func_8085B28C(play, NULL, PLAYER_CSACTION_WAIT);
}
this->getItemId = GI_NONE;
}
@@ -15455,7 +15453,7 @@ void Player_Action_43(Player* this, PlayState* play) {
if (((this->unk_AA5 == PLAYER_UNKAA5_2) && !(play->actorCtx.flags & ACTORCTX_FLAG_PICTO_BOX_ON)) ||
((this->unk_AA5 != PLAYER_UNKAA5_2) &&
- ((((this->csMode != PLAYER_CSMODE_NONE) || ((u32)this->unk_AA5 == PLAYER_UNKAA5_0) ||
+ ((((this->csAction != PLAYER_CSACTION_NONE) || ((u32)this->unk_AA5 == PLAYER_UNKAA5_0) ||
(this->unk_AA5 >= PLAYER_UNKAA5_5) || func_8082FB68(this) || (this->lockOnActor != NULL) ||
(func_8083868C(play, this) == CAM_MODE_NORMAL) ||
((this->unk_AA5 == PLAYER_UNKAA5_3) &&
@@ -16087,7 +16085,7 @@ void Player_Action_52(Player* this, PlayState* play) {
AnimationContext_SetCopyAll(play, this->skelAnime.limbCount, this->skelAnime.morphTable,
this->skelAnime.jointTable);
- if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != PLAYER_CSMODE_NONE)) {
+ if ((play->csCtx.state != CS_STATE_IDLE) || (this->csAction != PLAYER_CSACTION_NONE)) {
this->unk_AA5 = PLAYER_UNKAA5_0;
this->actionVar1 = 0;
} else if ((this->actionVar2 < 2) || (this->actionVar2 >= 4)) {
@@ -16152,7 +16150,7 @@ void Player_Action_52(Player* this, PlayState* play) {
} else {
func_8084FD7C(play, this, &rideActor->actor);
}
- } else if ((this->csMode != PLAYER_CSMODE_NONE) ||
+ } else if ((this->csAction != PLAYER_CSACTION_NONE) ||
(!func_8082DAFC(play) && ((rideActor->actor.speed != 0.0f) || !Player_ActionChange_4(this, play)) &&
!func_80847BF0(this, play) && !Player_ActionChange_13(this, play))) {
if (this->lockOnActor != NULL) {
@@ -16179,8 +16177,8 @@ void Player_Action_52(Player* this, PlayState* play) {
}
}
- if (this->csMode == PLAYER_CSMODE_END) {
- this->csMode = PLAYER_CSMODE_NONE;
+ if (this->csAction == PLAYER_CSACTION_END) {
+ this->csAction = PLAYER_CSACTION_NONE;
}
}
@@ -16631,12 +16629,12 @@ void Player_Action_62(Player* this, PlayState* play) {
s32 func_80851C40(PlayState* play, Player* this) {
return ((play->sceneId == SCENE_MILK_BAR) && Audio_IsSequencePlaying(NA_BGM_BALLAD_OF_THE_WIND_FISH)) ||
- (((play->sceneId != SCENE_MILK_BAR) && (this->csMode == PLAYER_CSMODE_68)) ||
+ (((play->sceneId != SCENE_MILK_BAR) && (this->csAction == PLAYER_CSACTION_68)) ||
((play->msgCtx.msgMode == MSGMODE_SONG_PLAYED) ||
(play->msgCtx.msgMode == MSGMODE_SETUP_DISPLAY_SONG_PLAYED) ||
(play->msgCtx.msgMode == MSGMODE_DISPLAY_SONG_PLAYED) ||
((play->msgCtx.ocarinaMode != OCARINA_MODE_ACTIVE) &&
- ((this->csMode == PLAYER_CSMODE_5) || (play->msgCtx.ocarinaMode == OCARINA_MODE_EVENT) ||
+ ((this->csAction == PLAYER_CSACTION_5) || (play->msgCtx.ocarinaMode == OCARINA_MODE_EVENT) ||
play->msgCtx.ocarinaAction == OCARINA_ACTION_FREE_PLAY_DONE))));
}
@@ -16896,8 +16894,8 @@ void Player_Action_63(Player* this, PlayState* play) {
0, play->msgCtx.ocarinaMode);
if (actor != NULL) {
this->stateFlags1 &= ~PLAYER_STATE1_20000000;
- this->csMode = PLAYER_CSMODE_NONE;
- func_8085B28C(play, NULL, PLAYER_CSMODE_19);
+ this->csAction = PLAYER_CSACTION_NONE;
+ func_8085B28C(play, NULL, PLAYER_CSACTION_19);
this->stateFlags1 |= PLAYER_STATE1_10000000 | PLAYER_STATE1_20000000;
} else {
func_80836A5C(this, play);
@@ -16983,7 +16981,7 @@ void Player_Action_65(Player* this, PlayState* play) {
Player_StopCutscene(this);
func_80848250(play, this);
this->stateFlags1 &= ~PLAYER_STATE1_20000000;
- func_8085B28C(play, NULL, PLAYER_CSMODE_93);
+ func_8085B28C(play, NULL, PLAYER_CSACTION_93);
} else {
s32 var_a2 = ((this->talkActor != NULL) && (this->exchangeItemAction <= PLAYER_IA_MINUS1)) ||
(this->stateFlags3 & PLAYER_STATE3_20);
@@ -19205,7 +19203,7 @@ void func_80858D48(PlayState* play, Player* this, PlayerAnimationHeader* anim) {
Player_StopHorizontalMovement(this);
}
-PlayerCsAnim sPlayerCsModeAnimFuncs[] = {
+PlayerCsAnim sPlayerCsActionAnimFuncs[] = {
NULL, // PLAYER_CSTYPE_NONE
Player_CsAnim_1, // PLAYER_CSTYPE_ANIM_1
Player_CsAnim_2, // PLAYER_CSTYPE_ANIM_2
@@ -19473,290 +19471,290 @@ void func_80859300(PlayState* play, Player* this, UNK_TYPE arg2) {
}
}
-PlayerCsModeEntry sPlayerCsModeInitFuncs[PLAYER_CSMODE_MAX] = {
- /* PLAYER_CSMODE_NONE */ { PLAYER_CSTYPE_NONE, { NULL } },
- /* PLAYER_CSMODE_1 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_1 } },
- /* PLAYER_CSMODE_2 */ { PLAYER_CSTYPE_NONE, { NULL } },
- /* PLAYER_CSMODE_3 */ { PLAYER_CSTYPE_NONE, { NULL } },
- /* PLAYER_CSMODE_4 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_bikkuri } },
- /* PLAYER_CSMODE_5 */ { PLAYER_CSTYPE_NONE, { NULL } },
- /* PLAYER_CSMODE_END */ { PLAYER_CSTYPE_NONE, { NULL } },
- /* PLAYER_CSMODE_WAIT */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_1 } },
- /* PLAYER_CSMODE_8 */ { PLAYER_CSTYPE_ANIM_2, { &gPlayerAnim_link_demo_furimuki } },
- /* PLAYER_CSMODE_9 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_5 } },
- /* PLAYER_CSMODE_10 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_warp } },
- /* PLAYER_CSMODE_11 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_clink_demo_standup } },
- /* PLAYER_CSMODE_12 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_clink_demo_standup_wait } },
- /* PLAYER_CSMODE_13 */ { PLAYER_CSTYPE_ANIM_2, { &gPlayerAnim_link_demo_baru_op3 } },
- /* PLAYER_CSMODE_14 */ { PLAYER_CSTYPE_NONE, { NULL } },
- /* PLAYER_CSMODE_15 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_jibunmiru } },
- /* PLAYER_CSMODE_16 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_14 } },
- /* PLAYER_CSMODE_17 */ { PLAYER_CSTYPE_ANIM_2, { &gPlayerAnim_link_normal_okarina_end } },
- /* PLAYER_CSMODE_18 */ { PLAYER_CSTYPE_ANIM_16, { &gPlayerAnim_link_normal_hang_up_down } },
- /* PLAYER_CSMODE_19 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_16 } },
- /* PLAYER_CSMODE_20 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_1 } },
- /* PLAYER_CSMODE_21 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_clink_demo_mimawasi } },
- /* PLAYER_CSMODE_22 */ { PLAYER_CSTYPE_ANIM_6, { &gPlayerAnim_om_get_mae } },
- /* PLAYER_CSMODE_23 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_look_hand } },
- /* PLAYER_CSMODE_24 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_normal_wait_typeB_20f } },
- /* PLAYER_CSMODE_25 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_17 } },
- /* PLAYER_CSMODE_26 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_37 } },
- /* PLAYER_CSMODE_27 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_zeldamiru } },
- /* PLAYER_CSMODE_28 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_kenmiru1 } },
- /* PLAYER_CSMODE_29 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_kenmiru2 } },
- /* PLAYER_CSMODE_30 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_kenmiru2_modori } },
- /* PLAYER_CSMODE_31 */ { PLAYER_CSTYPE_ANIM_6, { &gameplay_keep_Linkanim_00D310 } },
- /* PLAYER_CSMODE_32 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_22 } },
- /* PLAYER_CSMODE_33 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_demo_rakka } },
- /* PLAYER_CSMODE_34 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_demo_pikupiku } },
- /* PLAYER_CSMODE_35 */ { PLAYER_CSTYPE_ANIM_3, { &gameplay_keep_Linkanim_00D2B8 } },
- /* PLAYER_CSMODE_36 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_25 } },
- /* PLAYER_CSMODE_37 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_27 } },
- /* PLAYER_CSMODE_38 */ { PLAYER_CSTYPE_ANIM_6, { &gameplay_keep_Linkanim_00D278 } },
- /* PLAYER_CSMODE_39 */ { PLAYER_CSTYPE_ANIM_6, { &gameplay_keep_Linkanim_00D288 } },
- /* PLAYER_CSMODE_40 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_rakuba } },
- /* PLAYER_CSMODE_41 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_bajyo_furikaeru } },
- /* PLAYER_CSMODE_42 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_okiagaru } },
- /* PLAYER_CSMODE_43 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_okiagaru_tatu } },
- /* PLAYER_CSMODE_44 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_bajyo_walk } },
- /* PLAYER_CSMODE_45 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_rakka } },
- /* PLAYER_CSMODE_46 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_sirimochi } },
- /* PLAYER_CSMODE_47 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_spotlight } },
- /* PLAYER_CSMODE_48 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_hensin } },
- /* PLAYER_CSMODE_49 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_dl_jibunmiru } },
- /* PLAYER_CSMODE_50 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_vs_yousei } },
- /* PLAYER_CSMODE_51 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_urusai } },
- /* PLAYER_CSMODE_52 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_okarinatori } },
- /* PLAYER_CSMODE_53 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_lost_horse } },
- /* PLAYER_CSMODE_54 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_lost_horse_wait } },
- /* PLAYER_CSMODE_55 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_lost_horse2 } },
- /* PLAYER_CSMODE_56 */ { PLAYER_CSTYPE_ANIM_14, { &gPlayerAnim_okarinatori } },
- /* PLAYER_CSMODE_57 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_tobikakaru } },
- /* PLAYER_CSMODE_58 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_5 } },
- /* PLAYER_CSMODE_59 */ { PLAYER_CSTYPE_ANIM_5, { &gameplay_keep_Linkanim_00D0A0 } },
- /* PLAYER_CSMODE_60 */ { PLAYER_CSTYPE_ANIM_2, { &gPlayerAnim_cl_furafura } },
- /* PLAYER_CSMODE_61 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_cl_nigeru } },
- /* PLAYER_CSMODE_62 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_ononoki } },
- /* PLAYER_CSMODE_63 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_gaku } },
- /* PLAYER_CSMODE_64 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_fuwafuwa } },
- /* PLAYER_CSMODE_65 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_fuwafuwa_modori } },
- /* PLAYER_CSMODE_66 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_elf_tobidasi } },
- /* PLAYER_CSMODE_67 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_3 } },
- /* PLAYER_CSMODE_68 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_29 } },
- /* PLAYER_CSMODE_69 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_31 } },
- /* PLAYER_CSMODE_70 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_cl_tewofuru } },
- /* PLAYER_CSMODE_71 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_jibun_miru } },
- /* PLAYER_CSMODE_72 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_hoo } },
- /* PLAYER_CSMODE_73 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_yareyare } },
- /* PLAYER_CSMODE_74 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_yes } },
- /* PLAYER_CSMODE_75 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_no } },
- /* PLAYER_CSMODE_76 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_unun } },
- /* PLAYER_CSMODE_77 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_dl_yusaburu } },
- /* PLAYER_CSMODE_78 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_dl_kokeru } },
- /* PLAYER_CSMODE_79 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_powerup } },
- /* PLAYER_CSMODE_80 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_alink_rakkatyu } },
- /* PLAYER_CSMODE_81 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_kyoro } },
- /* PLAYER_CSMODE_82 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_alink_yurayura } },
- /* PLAYER_CSMODE_83 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_somukeru } },
- /* PLAYER_CSMODE_84 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_alink_fukitobu } },
- /* PLAYER_CSMODE_85 */ { PLAYER_CSTYPE_ANIM_3, { &gameplay_keep_Linkanim_00CFC8 } },
- /* PLAYER_CSMODE_86 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_alink_tereru } },
- /* PLAYER_CSMODE_87 */ { PLAYER_CSTYPE_ANIM_5, { &gameplay_keep_Linkanim_00D1D0 } },
- /* PLAYER_CSMODE_88 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_kaitenmiss } },
- /* PLAYER_CSMODE_89 */ { PLAYER_CSTYPE_ANIM_4, { &gameplay_keep_Linkanim_00CFC0 } },
- /* PLAYER_CSMODE_90 */ { PLAYER_CSTYPE_ANIM_4, { &gameplay_keep_Linkanim_00CFB8 } },
- /* PLAYER_CSMODE_91 */ { PLAYER_CSTYPE_ANIM_4, { &gameplay_keep_Linkanim_00D050 } },
- /* PLAYER_CSMODE_92 */ { PLAYER_CSTYPE_ANIM_4, { &gameplay_keep_Linkanim_00D048 } },
- /* PLAYER_CSMODE_93 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_42 } },
- /* PLAYER_CSMODE_94 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_ozigi } },
- /* PLAYER_CSMODE_95 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_ozigi_modori } },
- /* PLAYER_CSMODE_96 */ { PLAYER_CSTYPE_ANIM_9, { &gPlayerAnim_link_normal_back_downA } },
- /* PLAYER_CSMODE_97 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_35 } },
- /* PLAYER_CSMODE_98 */ { PLAYER_CSTYPE_ANIM_15, { &gPlayerAnim_cl_maskoff } },
- /* PLAYER_CSMODE_99 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_cl_kubisime } },
- /* PLAYER_CSMODE_100 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_ee } },
- /* PLAYER_CSMODE_101 */ { PLAYER_CSTYPE_ANIM_3, { &gameplay_keep_Linkanim_00CFF0 } },
- /* PLAYER_CSMODE_102 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_40 } },
- /* PLAYER_CSMODE_103 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_45 } },
- /* PLAYER_CSMODE_104 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_dakisime } },
- /* PLAYER_CSMODE_105 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_kf_omen } },
- /* PLAYER_CSMODE_106 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_kf_dakiau } },
- /* PLAYER_CSMODE_107 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_kf_hanare } },
- /* PLAYER_CSMODE_108 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_kf_miseau } },
- /* PLAYER_CSMODE_109 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_kf_awase } },
- /* PLAYER_CSMODE_110 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_kf_tetunagu_loop } },
- /* PLAYER_CSMODE_111 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_keirei } },
- /* PLAYER_CSMODE_112 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_umanoru } },
- /* PLAYER_CSMODE_113 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_wakare } },
- /* PLAYER_CSMODE_114 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_alink_dance_loop } },
- /* PLAYER_CSMODE_115 */ { PLAYER_CSTYPE_ANIM_2, { &gPlayerAnim_link_demo_goma_furimuki } },
- /* PLAYER_CSMODE_116 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_link_uma_anim_fastrun } },
- /* PLAYER_CSMODE_117 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_umamiage } },
- /* PLAYER_CSMODE_118 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_demo_suwari1 } },
- /* PLAYER_CSMODE_119 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_demo_suwari2 } },
- /* PLAYER_CSMODE_120 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_demo_suwari3 } },
- /* PLAYER_CSMODE_121 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_7 } },
- /* PLAYER_CSMODE_122 */ { PLAYER_CSTYPE_NONE, { NULL } },
- /* PLAYER_CSMODE_123 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_9 } },
- /* PLAYER_CSMODE_124 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_clink_demo_get1 } },
- /* PLAYER_CSMODE_125 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_clink_demo_get2 } },
- /* PLAYER_CSMODE_126 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_clink_demo_get3 } },
- /* PLAYER_CSMODE_127 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_gurad } },
- /* PLAYER_CSMODE_128 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_link_demo_sita_wait } },
- /* PLAYER_CSMODE_129 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_1kyoro } },
- /* PLAYER_CSMODE_130 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_2kyoro } },
- /* PLAYER_CSMODE_131 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_sagaru } },
- /* PLAYER_CSMODE_132 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_bouzen } },
- /* PLAYER_CSMODE_133 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_kamaeru } },
- /* PLAYER_CSMODE_134 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_hajikareru } },
- /* PLAYER_CSMODE_135 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_ken_miru } },
- /* PLAYER_CSMODE_136 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_mukinaoru } },
- /* PLAYER_CSMODE_137 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_return_to_past } },
- /* PLAYER_CSMODE_138 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_last_hit_motion1 } },
- /* PLAYER_CSMODE_139 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_last_hit_motion2 } },
+PlayerCsActionEntry sPlayerCsActionInitFuncs[PLAYER_CSACTION_MAX] = {
+ /* PLAYER_CSACTION_NONE */ { PLAYER_CSTYPE_NONE, { NULL } },
+ /* PLAYER_CSACTION_1 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_1 } },
+ /* PLAYER_CSACTION_2 */ { PLAYER_CSTYPE_NONE, { NULL } },
+ /* PLAYER_CSACTION_3 */ { PLAYER_CSTYPE_NONE, { NULL } },
+ /* PLAYER_CSACTION_4 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_bikkuri } },
+ /* PLAYER_CSACTION_5 */ { PLAYER_CSTYPE_NONE, { NULL } },
+ /* PLAYER_CSACTION_END */ { PLAYER_CSTYPE_NONE, { NULL } },
+ /* PLAYER_CSACTION_WAIT */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_1 } },
+ /* PLAYER_CSACTION_8 */ { PLAYER_CSTYPE_ANIM_2, { &gPlayerAnim_link_demo_furimuki } },
+ /* PLAYER_CSACTION_9 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_5 } },
+ /* PLAYER_CSACTION_10 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_warp } },
+ /* PLAYER_CSACTION_11 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_clink_demo_standup } },
+ /* PLAYER_CSACTION_12 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_clink_demo_standup_wait } },
+ /* PLAYER_CSACTION_13 */ { PLAYER_CSTYPE_ANIM_2, { &gPlayerAnim_link_demo_baru_op3 } },
+ /* PLAYER_CSACTION_14 */ { PLAYER_CSTYPE_NONE, { NULL } },
+ /* PLAYER_CSACTION_15 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_jibunmiru } },
+ /* PLAYER_CSACTION_16 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_14 } },
+ /* PLAYER_CSACTION_17 */ { PLAYER_CSTYPE_ANIM_2, { &gPlayerAnim_link_normal_okarina_end } },
+ /* PLAYER_CSACTION_18 */ { PLAYER_CSTYPE_ANIM_16, { &gPlayerAnim_link_normal_hang_up_down } },
+ /* PLAYER_CSACTION_19 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_16 } },
+ /* PLAYER_CSACTION_20 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_1 } },
+ /* PLAYER_CSACTION_21 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_clink_demo_mimawasi } },
+ /* PLAYER_CSACTION_22 */ { PLAYER_CSTYPE_ANIM_6, { &gPlayerAnim_om_get_mae } },
+ /* PLAYER_CSACTION_23 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_look_hand } },
+ /* PLAYER_CSACTION_24 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_normal_wait_typeB_20f } },
+ /* PLAYER_CSACTION_25 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_17 } },
+ /* PLAYER_CSACTION_26 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_37 } },
+ /* PLAYER_CSACTION_27 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_zeldamiru } },
+ /* PLAYER_CSACTION_28 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_kenmiru1 } },
+ /* PLAYER_CSACTION_29 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_kenmiru2 } },
+ /* PLAYER_CSACTION_30 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_kenmiru2_modori } },
+ /* PLAYER_CSACTION_31 */ { PLAYER_CSTYPE_ANIM_6, { &gameplay_keep_Linkanim_00D310 } },
+ /* PLAYER_CSACTION_32 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_22 } },
+ /* PLAYER_CSACTION_33 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_demo_rakka } },
+ /* PLAYER_CSACTION_34 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_demo_pikupiku } },
+ /* PLAYER_CSACTION_35 */ { PLAYER_CSTYPE_ANIM_3, { &gameplay_keep_Linkanim_00D2B8 } },
+ /* PLAYER_CSACTION_36 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_25 } },
+ /* PLAYER_CSACTION_37 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_27 } },
+ /* PLAYER_CSACTION_38 */ { PLAYER_CSTYPE_ANIM_6, { &gameplay_keep_Linkanim_00D278 } },
+ /* PLAYER_CSACTION_39 */ { PLAYER_CSTYPE_ANIM_6, { &gameplay_keep_Linkanim_00D288 } },
+ /* PLAYER_CSACTION_40 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_rakuba } },
+ /* PLAYER_CSACTION_41 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_bajyo_furikaeru } },
+ /* PLAYER_CSACTION_42 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_okiagaru } },
+ /* PLAYER_CSACTION_43 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_okiagaru_tatu } },
+ /* PLAYER_CSACTION_44 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_bajyo_walk } },
+ /* PLAYER_CSACTION_45 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_rakka } },
+ /* PLAYER_CSACTION_46 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_sirimochi } },
+ /* PLAYER_CSACTION_47 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_spotlight } },
+ /* PLAYER_CSACTION_48 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_hensin } },
+ /* PLAYER_CSACTION_49 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_dl_jibunmiru } },
+ /* PLAYER_CSACTION_50 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_vs_yousei } },
+ /* PLAYER_CSACTION_51 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_urusai } },
+ /* PLAYER_CSACTION_52 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_okarinatori } },
+ /* PLAYER_CSACTION_53 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_lost_horse } },
+ /* PLAYER_CSACTION_54 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_lost_horse_wait } },
+ /* PLAYER_CSACTION_55 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_lost_horse2 } },
+ /* PLAYER_CSACTION_56 */ { PLAYER_CSTYPE_ANIM_14, { &gPlayerAnim_okarinatori } },
+ /* PLAYER_CSACTION_57 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_tobikakaru } },
+ /* PLAYER_CSACTION_58 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_5 } },
+ /* PLAYER_CSACTION_59 */ { PLAYER_CSTYPE_ANIM_5, { &gameplay_keep_Linkanim_00D0A0 } },
+ /* PLAYER_CSACTION_60 */ { PLAYER_CSTYPE_ANIM_2, { &gPlayerAnim_cl_furafura } },
+ /* PLAYER_CSACTION_61 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_cl_nigeru } },
+ /* PLAYER_CSACTION_62 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_ononoki } },
+ /* PLAYER_CSACTION_63 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_gaku } },
+ /* PLAYER_CSACTION_64 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_fuwafuwa } },
+ /* PLAYER_CSACTION_65 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_fuwafuwa_modori } },
+ /* PLAYER_CSACTION_66 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_elf_tobidasi } },
+ /* PLAYER_CSACTION_67 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_3 } },
+ /* PLAYER_CSACTION_68 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_29 } },
+ /* PLAYER_CSACTION_69 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_31 } },
+ /* PLAYER_CSACTION_70 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_cl_tewofuru } },
+ /* PLAYER_CSACTION_71 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_jibun_miru } },
+ /* PLAYER_CSACTION_72 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_hoo } },
+ /* PLAYER_CSACTION_73 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_yareyare } },
+ /* PLAYER_CSACTION_74 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_yes } },
+ /* PLAYER_CSACTION_75 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_no } },
+ /* PLAYER_CSACTION_76 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_al_unun } },
+ /* PLAYER_CSACTION_77 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_dl_yusaburu } },
+ /* PLAYER_CSACTION_78 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_dl_kokeru } },
+ /* PLAYER_CSACTION_79 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_powerup } },
+ /* PLAYER_CSACTION_80 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_alink_rakkatyu } },
+ /* PLAYER_CSACTION_81 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_kyoro } },
+ /* PLAYER_CSACTION_82 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_alink_yurayura } },
+ /* PLAYER_CSACTION_83 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_somukeru } },
+ /* PLAYER_CSACTION_84 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_alink_fukitobu } },
+ /* PLAYER_CSACTION_85 */ { PLAYER_CSTYPE_ANIM_3, { &gameplay_keep_Linkanim_00CFC8 } },
+ /* PLAYER_CSACTION_86 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_alink_tereru } },
+ /* PLAYER_CSACTION_87 */ { PLAYER_CSTYPE_ANIM_5, { &gameplay_keep_Linkanim_00D1D0 } },
+ /* PLAYER_CSACTION_88 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_kaitenmiss } },
+ /* PLAYER_CSACTION_89 */ { PLAYER_CSTYPE_ANIM_4, { &gameplay_keep_Linkanim_00CFC0 } },
+ /* PLAYER_CSACTION_90 */ { PLAYER_CSTYPE_ANIM_4, { &gameplay_keep_Linkanim_00CFB8 } },
+ /* PLAYER_CSACTION_91 */ { PLAYER_CSTYPE_ANIM_4, { &gameplay_keep_Linkanim_00D050 } },
+ /* PLAYER_CSACTION_92 */ { PLAYER_CSTYPE_ANIM_4, { &gameplay_keep_Linkanim_00D048 } },
+ /* PLAYER_CSACTION_93 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_42 } },
+ /* PLAYER_CSACTION_94 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_ozigi } },
+ /* PLAYER_CSACTION_95 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_ozigi_modori } },
+ /* PLAYER_CSACTION_96 */ { PLAYER_CSTYPE_ANIM_9, { &gPlayerAnim_link_normal_back_downA } },
+ /* PLAYER_CSACTION_97 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_35 } },
+ /* PLAYER_CSACTION_98 */ { PLAYER_CSTYPE_ANIM_15, { &gPlayerAnim_cl_maskoff } },
+ /* PLAYER_CSACTION_99 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_cl_kubisime } },
+ /* PLAYER_CSACTION_100 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_alink_ee } },
+ /* PLAYER_CSACTION_101 */ { PLAYER_CSTYPE_ANIM_3, { &gameplay_keep_Linkanim_00CFF0 } },
+ /* PLAYER_CSACTION_102 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_40 } },
+ /* PLAYER_CSACTION_103 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_45 } },
+ /* PLAYER_CSACTION_104 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_dakisime } },
+ /* PLAYER_CSACTION_105 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_kf_omen } },
+ /* PLAYER_CSACTION_106 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_kf_dakiau } },
+ /* PLAYER_CSACTION_107 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_kf_hanare } },
+ /* PLAYER_CSACTION_108 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_kf_miseau } },
+ /* PLAYER_CSACTION_109 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_kf_awase } },
+ /* PLAYER_CSACTION_110 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_kf_tetunagu_loop } },
+ /* PLAYER_CSACTION_111 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_keirei } },
+ /* PLAYER_CSACTION_112 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_umanoru } },
+ /* PLAYER_CSACTION_113 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_wakare } },
+ /* PLAYER_CSACTION_114 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_alink_dance_loop } },
+ /* PLAYER_CSACTION_115 */ { PLAYER_CSTYPE_ANIM_2, { &gPlayerAnim_link_demo_goma_furimuki } },
+ /* PLAYER_CSACTION_116 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_link_uma_anim_fastrun } },
+ /* PLAYER_CSACTION_117 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_cl_umamiage } },
+ /* PLAYER_CSACTION_118 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_demo_suwari1 } },
+ /* PLAYER_CSACTION_119 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_demo_suwari2 } },
+ /* PLAYER_CSACTION_120 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_demo_suwari3 } },
+ /* PLAYER_CSACTION_121 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_7 } },
+ /* PLAYER_CSACTION_122 */ { PLAYER_CSTYPE_NONE, { NULL } },
+ /* PLAYER_CSACTION_123 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_9 } },
+ /* PLAYER_CSACTION_124 */ { PLAYER_CSTYPE_ANIM_7, { &gPlayerAnim_clink_demo_get1 } },
+ /* PLAYER_CSACTION_125 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_clink_demo_get2 } },
+ /* PLAYER_CSACTION_126 */ { PLAYER_CSTYPE_ANIM_5, { &gPlayerAnim_clink_demo_get3 } },
+ /* PLAYER_CSACTION_127 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_gurad } },
+ /* PLAYER_CSACTION_128 */ { PLAYER_CSTYPE_ANIM_4, { &gPlayerAnim_link_demo_sita_wait } },
+ /* PLAYER_CSACTION_129 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_1kyoro } },
+ /* PLAYER_CSACTION_130 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_2kyoro } },
+ /* PLAYER_CSACTION_131 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_sagaru } },
+ /* PLAYER_CSACTION_132 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_bouzen } },
+ /* PLAYER_CSACTION_133 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_kamaeru } },
+ /* PLAYER_CSACTION_134 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_hajikareru } },
+ /* PLAYER_CSACTION_135 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_ken_miru } },
+ /* PLAYER_CSACTION_136 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_L_mukinaoru } },
+ /* PLAYER_CSACTION_137 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_demo_return_to_past } },
+ /* PLAYER_CSACTION_138 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_last_hit_motion1 } },
+ /* PLAYER_CSACTION_139 */ { PLAYER_CSTYPE_ANIM_3, { &gPlayerAnim_link_last_hit_motion2 } },
};
-PlayerCsModeEntry sPlayerCsModeUpdateFuncs[PLAYER_CSMODE_MAX] = {
- /* PLAYER_CSMODE_NONE */ { PLAYER_CSTYPE_NONE, { NULL } },
- /* PLAYER_CSMODE_1 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_0 } },
- /* PLAYER_CSMODE_2 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_11 } },
- /* PLAYER_CSMODE_3 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_13 } },
- /* PLAYER_CSMODE_4 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_5 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_48 } },
- /* PLAYER_CSMODE_END */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_End } },
- /* PLAYER_CSMODE_WAIT */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_2 } },
- /* PLAYER_CSMODE_8 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA70 } },
- /* PLAYER_CSMODE_9 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_6 } },
- /* PLAYER_CSMODE_10 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_15 } },
- /* PLAYER_CSMODE_11 */ { PLAYER_CSTYPE_ANIM_18, { D_8085D9E0 } },
- /* PLAYER_CSMODE_12 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_13 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_14 */ { PLAYER_CSTYPE_NONE, { NULL } },
- /* PLAYER_CSMODE_15 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_16 */ { PLAYER_CSTYPE_ANIM_17, { &gPlayerAnim_link_normal_okarina_swing } },
- /* PLAYER_CSMODE_17 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_18 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_19 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_39 } },
- /* PLAYER_CSMODE_20 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_2 } },
- /* PLAYER_CSMODE_21 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_clink_demo_mimawasi_wait } },
- /* PLAYER_CSMODE_22 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_19 } },
- /* PLAYER_CSMODE_23 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_demo_look_hand_wait } },
- /* PLAYER_CSMODE_24 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_25 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_26 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_38 } },
- /* PLAYER_CSMODE_27 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_demo_zeldamiru_wait } },
- /* PLAYER_CSMODE_28 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_demo_kenmiru1_wait } },
- /* PLAYER_CSMODE_29 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_demo_kenmiru2_wait } },
- /* PLAYER_CSMODE_30 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_demo_link_nwait } },
- /* PLAYER_CSMODE_31 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00D318 } },
- /* PLAYER_CSMODE_32 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_23 } },
- /* PLAYER_CSMODE_33 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_TranslateReverse } },
- /* PLAYER_CSMODE_34 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_35 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00D2C0 } },
- /* PLAYER_CSMODE_36 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_26 } },
- /* PLAYER_CSMODE_37 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_28 } },
- /* PLAYER_CSMODE_38 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00D280 } },
- /* PLAYER_CSMODE_39 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00D290 } },
- /* PLAYER_CSMODE_40 */ { PLAYER_CSTYPE_ANIM_18, { D_8085D9F0 } },
- /* PLAYER_CSMODE_41 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_42 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA00 } },
- /* PLAYER_CSMODE_43 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_okiagaru_wait } },
- /* PLAYER_CSMODE_44 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_32 } },
- /* PLAYER_CSMODE_45 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA2C } },
- /* PLAYER_CSMODE_46 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_sirimochi_wait } },
- /* PLAYER_CSMODE_47 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_spotlight_wait } },
- /* PLAYER_CSMODE_48 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_al_hensin_loop } },
- /* PLAYER_CSMODE_49 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_dl_jibunmiru_wait } },
- /* PLAYER_CSMODE_50 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA50 } },
- /* PLAYER_CSMODE_51 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_52 */ { PLAYER_CSTYPE_ANIM_18, { D_8085D9FC } },
- /* PLAYER_CSMODE_53 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_lost_horse_wait } },
- /* PLAYER_CSMODE_54 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_32 } },
- /* PLAYER_CSMODE_55 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA1C } },
- /* PLAYER_CSMODE_56 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_57 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA0C } },
- /* PLAYER_CSMODE_58 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_8 } },
- /* PLAYER_CSMODE_59 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_60 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA28 } },
- /* PLAYER_CSMODE_61 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_32 } },
- /* PLAYER_CSMODE_62 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_63 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_64 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_al_fuwafuwa_loop } },
- /* PLAYER_CSMODE_65 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_33 } },
- /* PLAYER_CSMODE_66 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_67 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_4 } },
- /* PLAYER_CSMODE_68 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_30 } },
- /* PLAYER_CSMODE_69 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_70 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_71 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_33 } },
- /* PLAYER_CSMODE_72 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_73 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_74 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_75 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_76 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_77 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_78 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA78 } },
- /* PLAYER_CSMODE_79 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_alink_powerup_loop } },
- /* PLAYER_CSMODE_80 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_32 } },
- /* PLAYER_CSMODE_81 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_alink_kyoro_loop } },
- /* PLAYER_CSMODE_82 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_83 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_alink_somukeru_loop } },
- /* PLAYER_CSMODE_84 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA80 } },
- /* PLAYER_CSMODE_85 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00CFD0 } },
- /* PLAYER_CSMODE_86 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_87 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_88 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_89 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_90 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_91 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_92 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_93 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_43 } },
- /* PLAYER_CSMODE_94 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_alink_ozigi_loop } },
- /* PLAYER_CSMODE_95 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_96 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_34 } },
- /* PLAYER_CSMODE_97 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_36 } },
- /* PLAYER_CSMODE_98 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_46 } },
- /* PLAYER_CSMODE_99 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_100 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_alink_ee_loop } },
- /* PLAYER_CSMODE_101 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00CFF8 } },
- /* PLAYER_CSMODE_102 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_41 } },
- /* PLAYER_CSMODE_103 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_104 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_cl_dakisime_loop } },
- /* PLAYER_CSMODE_105 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_kf_omen_loop } },
- /* PLAYER_CSMODE_106 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_kf_dakiau_loop } },
- /* PLAYER_CSMODE_107 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_kf_hanare_loop } },
- /* PLAYER_CSMODE_108 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_109 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_110 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_111 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_kei_wait } },
- /* PLAYER_CSMODE_112 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_cl_umanoru_loop } },
- /* PLAYER_CSMODE_113 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_cl_wakare_loop } },
- /* PLAYER_CSMODE_114 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_115 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_44 } },
- /* PLAYER_CSMODE_116 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_117 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_32 } },
- /* PLAYER_CSMODE_118 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_119 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_120 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_121 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_8 } },
- /* PLAYER_CSMODE_122 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_12 } },
- /* PLAYER_CSMODE_123 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_10 } },
- /* PLAYER_CSMODE_125 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_124 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_126 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_127 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_demo_gurad_wait } },
- /* PLAYER_CSMODE_128 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_129 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_L_kw } },
- /* PLAYER_CSMODE_130 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_131 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_132 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_133 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_134 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_18 } },
- /* PLAYER_CSMODE_135 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
- /* PLAYER_CSMODE_136 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_L_kennasi_w } },
- /* PLAYER_CSMODE_137 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_20 } },
- /* PLAYER_CSMODE_138 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_21 } },
- /* PLAYER_CSMODE_139 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_21 } },
+PlayerCsActionEntry sPlayerCsActionUpdateFuncs[PLAYER_CSACTION_MAX] = {
+ /* PLAYER_CSACTION_NONE */ { PLAYER_CSTYPE_NONE, { NULL } },
+ /* PLAYER_CSACTION_1 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_0 } },
+ /* PLAYER_CSACTION_2 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_11 } },
+ /* PLAYER_CSACTION_3 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_13 } },
+ /* PLAYER_CSACTION_4 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_5 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_48 } },
+ /* PLAYER_CSACTION_END */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_End } },
+ /* PLAYER_CSACTION_WAIT */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_2 } },
+ /* PLAYER_CSACTION_8 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA70 } },
+ /* PLAYER_CSACTION_9 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_6 } },
+ /* PLAYER_CSACTION_10 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_15 } },
+ /* PLAYER_CSACTION_11 */ { PLAYER_CSTYPE_ANIM_18, { D_8085D9E0 } },
+ /* PLAYER_CSACTION_12 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_13 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_14 */ { PLAYER_CSTYPE_NONE, { NULL } },
+ /* PLAYER_CSACTION_15 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_16 */ { PLAYER_CSTYPE_ANIM_17, { &gPlayerAnim_link_normal_okarina_swing } },
+ /* PLAYER_CSACTION_17 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_18 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_19 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_39 } },
+ /* PLAYER_CSACTION_20 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_2 } },
+ /* PLAYER_CSACTION_21 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_clink_demo_mimawasi_wait } },
+ /* PLAYER_CSACTION_22 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_19 } },
+ /* PLAYER_CSACTION_23 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_demo_look_hand_wait } },
+ /* PLAYER_CSACTION_24 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_25 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_26 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_38 } },
+ /* PLAYER_CSACTION_27 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_demo_zeldamiru_wait } },
+ /* PLAYER_CSACTION_28 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_demo_kenmiru1_wait } },
+ /* PLAYER_CSACTION_29 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_demo_kenmiru2_wait } },
+ /* PLAYER_CSACTION_30 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_demo_link_nwait } },
+ /* PLAYER_CSACTION_31 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00D318 } },
+ /* PLAYER_CSACTION_32 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_23 } },
+ /* PLAYER_CSACTION_33 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_TranslateReverse } },
+ /* PLAYER_CSACTION_34 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_35 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00D2C0 } },
+ /* PLAYER_CSACTION_36 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_26 } },
+ /* PLAYER_CSACTION_37 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_28 } },
+ /* PLAYER_CSACTION_38 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00D280 } },
+ /* PLAYER_CSACTION_39 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00D290 } },
+ /* PLAYER_CSACTION_40 */ { PLAYER_CSTYPE_ANIM_18, { D_8085D9F0 } },
+ /* PLAYER_CSACTION_41 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_42 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA00 } },
+ /* PLAYER_CSACTION_43 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_okiagaru_wait } },
+ /* PLAYER_CSACTION_44 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_32 } },
+ /* PLAYER_CSACTION_45 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA2C } },
+ /* PLAYER_CSACTION_46 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_sirimochi_wait } },
+ /* PLAYER_CSACTION_47 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_spotlight_wait } },
+ /* PLAYER_CSACTION_48 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_al_hensin_loop } },
+ /* PLAYER_CSACTION_49 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_dl_jibunmiru_wait } },
+ /* PLAYER_CSACTION_50 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA50 } },
+ /* PLAYER_CSACTION_51 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_52 */ { PLAYER_CSTYPE_ANIM_18, { D_8085D9FC } },
+ /* PLAYER_CSACTION_53 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_lost_horse_wait } },
+ /* PLAYER_CSACTION_54 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_32 } },
+ /* PLAYER_CSACTION_55 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA1C } },
+ /* PLAYER_CSACTION_56 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_57 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA0C } },
+ /* PLAYER_CSACTION_58 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_8 } },
+ /* PLAYER_CSACTION_59 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_60 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA28 } },
+ /* PLAYER_CSACTION_61 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_32 } },
+ /* PLAYER_CSACTION_62 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_63 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_64 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_al_fuwafuwa_loop } },
+ /* PLAYER_CSACTION_65 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_33 } },
+ /* PLAYER_CSACTION_66 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_67 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_4 } },
+ /* PLAYER_CSACTION_68 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_30 } },
+ /* PLAYER_CSACTION_69 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_70 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_71 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_33 } },
+ /* PLAYER_CSACTION_72 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_73 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_74 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_75 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_76 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_77 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_78 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA78 } },
+ /* PLAYER_CSACTION_79 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_alink_powerup_loop } },
+ /* PLAYER_CSACTION_80 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_32 } },
+ /* PLAYER_CSACTION_81 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_alink_kyoro_loop } },
+ /* PLAYER_CSACTION_82 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_83 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_alink_somukeru_loop } },
+ /* PLAYER_CSACTION_84 */ { PLAYER_CSTYPE_ANIM_18, { D_8085DA80 } },
+ /* PLAYER_CSACTION_85 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00CFD0 } },
+ /* PLAYER_CSACTION_86 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_87 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_88 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_89 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_90 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_91 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_92 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_93 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_43 } },
+ /* PLAYER_CSACTION_94 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_alink_ozigi_loop } },
+ /* PLAYER_CSACTION_95 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_96 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_34 } },
+ /* PLAYER_CSACTION_97 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_36 } },
+ /* PLAYER_CSACTION_98 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_46 } },
+ /* PLAYER_CSACTION_99 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_100 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_alink_ee_loop } },
+ /* PLAYER_CSACTION_101 */ { PLAYER_CSTYPE_ANIM_12, { &gameplay_keep_Linkanim_00CFF8 } },
+ /* PLAYER_CSACTION_102 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_41 } },
+ /* PLAYER_CSACTION_103 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_104 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_cl_dakisime_loop } },
+ /* PLAYER_CSACTION_105 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_kf_omen_loop } },
+ /* PLAYER_CSACTION_106 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_kf_dakiau_loop } },
+ /* PLAYER_CSACTION_107 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_kf_hanare_loop } },
+ /* PLAYER_CSACTION_108 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_109 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_110 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_111 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_kei_wait } },
+ /* PLAYER_CSACTION_112 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_cl_umanoru_loop } },
+ /* PLAYER_CSACTION_113 */ { PLAYER_CSTYPE_ANIM_13, { &gPlayerAnim_cl_wakare_loop } },
+ /* PLAYER_CSACTION_114 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_115 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_44 } },
+ /* PLAYER_CSACTION_116 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_117 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_32 } },
+ /* PLAYER_CSACTION_118 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_119 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_120 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_121 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_8 } },
+ /* PLAYER_CSACTION_122 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_12 } },
+ /* PLAYER_CSACTION_123 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_10 } },
+ /* PLAYER_CSACTION_125 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_124 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_126 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_127 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_link_demo_gurad_wait } },
+ /* PLAYER_CSACTION_128 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_129 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_L_kw } },
+ /* PLAYER_CSACTION_130 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_131 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_132 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_133 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_134 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_18 } },
+ /* PLAYER_CSACTION_135 */ { PLAYER_CSTYPE_ANIM_11, { NULL } },
+ /* PLAYER_CSACTION_136 */ { PLAYER_CSTYPE_ANIM_12, { &gPlayerAnim_L_kennasi_w } },
+ /* PLAYER_CSACTION_137 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_20 } },
+ /* PLAYER_CSACTION_138 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_21 } },
+ /* PLAYER_CSACTION_139 */ { PLAYER_CSTYPE_ACTION, { Player_CsAction_21 } },
};
void Player_CsAction_0(PlayState* play, Player* this, CsCmdActorCue* cue) {
@@ -19796,8 +19794,8 @@ void Player_CsAction_2(PlayState* play, Player* this, CsCmdActorCue* cue) {
return;
}
- if ((this->csMode == PLAYER_CSMODE_20) && (play->csCtx.state == CS_STATE_IDLE)) {
- func_800B7298(play, NULL, PLAYER_CSMODE_END);
+ if ((this->csAction == PLAYER_CSACTION_20) && (play->csCtx.state == CS_STATE_IDLE)) {
+ func_800B7298(play, NULL, PLAYER_CSACTION_END);
} else if (this->stateFlags1 & PLAYER_STATE1_8000000) {
func_80859300(play, this, 0);
this->actor.velocity.y = 0.0f;
@@ -19879,7 +19877,7 @@ void Player_CsAction_6(PlayState* play, Player* this, CsCmdActorCue* cue) {
func_808411D4(play, this, &sp24, 0xA);
this->actionVar2++;
if (this->actionVar2 >= 0x15) {
- this->csMode = PLAYER_CSMODE_10;
+ this->csAction = PLAYER_CSACTION_10;
}
}
}
@@ -20282,7 +20280,7 @@ void Player_CsAction_End(PlayState* play, Player* this, CsCmdActorCue* cue) {
}
}
- this->csMode = PLAYER_CSMODE_NONE;
+ this->csAction = PLAYER_CSACTION_NONE;
this->unk_AA5 = PLAYER_UNKAA5_0;
}
@@ -20313,9 +20311,9 @@ void Player_Cutscene_8085ABA8(Player* this, CsCmdActorCue* cue) {
func_8082E784(this);
}
-void func_8085AC9C(PlayState* play, Player* this, CsCmdActorCue* cue, PlayerCsModeEntry* csEntry) {
+void func_8085AC9C(PlayState* play, Player* this, CsCmdActorCue* cue, PlayerCsActionEntry* csEntry) {
if (csEntry->type > PLAYER_CSTYPE_NONE) {
- sPlayerCsModeAnimFuncs[csEntry->type](play, this, csEntry->csAnimArg2);
+ sPlayerCsActionAnimFuncs[csEntry->type](play, this, csEntry->csAnimArg2);
} else if (csEntry->type <= PLAYER_CSTYPE_ACTION) {
csEntry->csActionFunc(play, this, cue);
}
@@ -20326,9 +20324,9 @@ void func_8085AC9C(PlayState* play, Player* this, CsCmdActorCue* cue, PlayerCsMo
}
}
-void func_8085AD5C(PlayState* play, Player* this, PlayerCsMode csMode) {
- if ((csMode != PLAYER_CSMODE_1) && (csMode != PLAYER_CSMODE_WAIT) && (csMode != PLAYER_CSMODE_20) &&
- (csMode != PLAYER_CSMODE_END)) {
+void func_8085AD5C(PlayState* play, Player* this, PlayerCsAction csAction) {
+ if ((csAction != PLAYER_CSACTION_1) && (csAction != PLAYER_CSACTION_WAIT) && (csAction != PLAYER_CSACTION_20) &&
+ (csAction != PLAYER_CSACTION_END)) {
Player_DetachHeldActor(play, this);
}
}
@@ -20339,24 +20337,24 @@ void Player_CsAction_48(PlayState* play, Player* this, CsCmdActorCue* cue) {
: play->csCtx.playerCue;
s32 var_a0 = false;
s32 pad;
- s32 csMode;
+ s32 csAction;
if ((play->csCtx.state == CS_STATE_IDLE) || (play->csCtx.state == CS_STATE_STOP) ||
(play->csCtx.state == CS_STATE_RUN_UNSTOPPABLE)) {
- if ((sPlayerCsModes[this->cueId] == PLAYER_CSMODE_68) && (play->sceneId == SCENE_OKUJOU)) {
+ if ((sPlayerCueToCsActionMap[this->cueId] == PLAYER_CSACTION_68) && (play->sceneId == SCENE_OKUJOU)) {
this->unk_AA5 = PLAYER_UNKAA5_5;
if (Player_ActionChange_13(this, play)) {
- this->csMode = PLAYER_CSMODE_NONE;
+ this->csAction = PLAYER_CSACTION_NONE;
}
return;
}
var_a0 = true;
- if (sPlayerCsModes[this->cueId] != PLAYER_CSMODE_16) {
- this->csMode = PLAYER_CSMODE_END;
- func_800B7298(play, NULL, PLAYER_CSMODE_END);
+ if (sPlayerCueToCsActionMap[this->cueId] != PLAYER_CSACTION_16) {
+ this->csAction = PLAYER_CSACTION_END;
+ func_800B7298(play, NULL, PLAYER_CSACTION_END);
this->cueId = PLAYER_CUEID_NONE;
Player_StopHorizontalMovement(this);
return;
@@ -20369,36 +20367,36 @@ void Player_CsAction_48(PlayState* play, Player* this, CsCmdActorCue* cue) {
}
if (!var_a0 && (this->cueId != playerCue->id)) {
- csMode = sPlayerCsModes[playerCue->id];
+ csAction = sPlayerCueToCsActionMap[playerCue->id];
- // Negative csModes will skip this block
- if ((csMode >= PLAYER_CSMODE_NONE) && !gDisablePlayerCsModeStartPos) {
- if ((csMode == PLAYER_CSMODE_2) || (csMode == PLAYER_CSMODE_3)) {
+ // Negative csActions will skip this block
+ if ((csAction >= PLAYER_CSACTION_NONE) && !gDisablePlayerCsActionStartPos) {
+ if ((csAction == PLAYER_CSACTION_2) || (csAction == PLAYER_CSACTION_3)) {
Player_Cutscene_8085ABA8(this, playerCue);
} else {
Player_Cutscene_SetPosAndYawToStart(this, playerCue);
}
}
- if (csMode == PLAYER_CSMODE_108) {
+ if (csAction == PLAYER_CSACTION_108) {
this->stateFlags3 |= PLAYER_STATE3_20000000;
- } else if (csMode == PLAYER_CSMODE_110) {
+ } else if (csAction == PLAYER_CSACTION_110) {
this->stateFlags3 &= ~PLAYER_STATE3_20000000;
}
D_80862B6C = this->skelAnime.moveFlags;
func_8082E794(this);
- func_8085AD5C(play, this, ABS_ALT(csMode));
- func_8085AC9C(play, this, playerCue, &sPlayerCsModeInitFuncs[ABS_ALT(csMode)]);
+ func_8085AD5C(play, this, ABS_ALT(csAction));
+ func_8085AC9C(play, this, playerCue, &sPlayerCsActionInitFuncs[ABS_ALT(csAction)]);
this->actionVar2 = 0;
this->actionVar1 = 0;
this->cueId = playerCue->id;
}
- csMode = sPlayerCsModes[this->cueId];
- func_8085AC9C(play, this, playerCue, &sPlayerCsModeUpdateFuncs[ABS_ALT(csMode)]);
+ csAction = sPlayerCueToCsActionMap[this->cueId];
+ func_8085AC9C(play, this, playerCue, &sPlayerCsActionUpdateFuncs[ABS_ALT(csAction)]);
if ((u16)playerCue->rot.x != 0) {
Math_SmoothStepToS(&this->actor.focus.rot.x, (u16)playerCue->rot.x, 4, 0x2710, 0);
@@ -20407,16 +20405,16 @@ void Player_CsAction_48(PlayState* play, Player* this, CsCmdActorCue* cue) {
}
void Player_Action_97(Player* this, PlayState* play) {
- if (this->csMode != this->prevCsMode) {
+ if (this->csAction != this->prevCsAction) {
D_80862B6C = this->skelAnime.moveFlags;
func_8082E794(this);
- this->prevCsMode = this->csMode;
- func_8085AD5C(play, this, this->csMode);
- func_8085AC9C(play, this, NULL, &sPlayerCsModeInitFuncs[this->csMode]);
+ this->prevCsAction = this->csAction;
+ func_8085AD5C(play, this, this->csAction);
+ func_8085AC9C(play, this, NULL, &sPlayerCsActionInitFuncs[this->csAction]);
}
- func_8085AC9C(play, this, NULL, &sPlayerCsModeUpdateFuncs[this->csMode]);
+ func_8085AC9C(play, this, NULL, &sPlayerCsActionUpdateFuncs[this->csAction]);
}
s32 Player_StartFishing(PlayState* play) {
@@ -20451,15 +20449,15 @@ s32 Player_GrabPlayer(PlayState* play, Player* this) {
return false;
}
-s32 func_8085B28C(PlayState* play, Player* this, PlayerCsMode csMode) {
+s32 func_8085B28C(PlayState* play, Player* this, PlayerCsAction csAction) {
Player* player = GET_PLAYER(play);
if (this != NULL) {
- if (csMode == PLAYER_CSMODE_NONE) {
+ if (csAction == PLAYER_CSACTION_NONE) {
return Player_Action_36 == this->actionFunc;
}
- if ((this->actor.id == ACTOR_EN_TEST3) && (csMode < 0)) {
+ if ((this->actor.id == ACTOR_EN_TEST3) && (csAction < 0)) {
func_8083B0E4(play, this, this->actor.home.rot.y);
return false;
}
@@ -20472,7 +20470,7 @@ s32 func_8085B28C(PlayState* play, Player* this, PlayerCsMode csMode) {
if ((player->actor.id == ACTOR_EN_TEST3) || !Player_InBlockingCsMode(play, player)) {
func_8082DE50(play, player);
Player_SetAction(play, player, Player_Action_97, 0);
- player->csMode = csMode;
+ player->csAction = csAction;
player->csActor = &this->actor;
func_8082DAD4(player);
@@ -20520,7 +20518,7 @@ void Player_TalkWithPlayer(PlayState* play, Actor* actor) {
player->lockOnActor = actor;
if (actor->textId == 0xFFFF) {
- func_800B7298(play, actor, PLAYER_CSMODE_1);
+ func_800B7298(play, actor, PLAYER_CSACTION_1);
actor->flags |= ACTOR_FLAG_TALK_REQUESTED;
func_8082DE14(play, player);
} else {
diff --git a/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c b/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c
index b12a9cb76..543fc6e08 100644
--- a/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c
+++ b/src/overlays/fbdemos/ovl_fbdemo_wipe3/z_fbdemo_wipe3.c
@@ -32,9 +32,9 @@ TransitionInit TransitionWipe3_InitVars = {
TransitionWipe3_SetColor, TransitionWipe3_SetEnvColor, TransitionWipe3_IsDone,
};
-#define TRANS3_GET_SPEED(type) (type & 1)
-#define TRANS3_GET_TEX_INDEX(type) ((type >> 1) & 7)
-#define TRANS3_GET_COLOR(type) ((type >> 4) & 3)
+#define TRANS3_GET_SPEED(type) ((type)&1)
+#define TRANS3_GET_TEX_INDEX(type) (((type) >> 1) & 7)
+#define TRANS3_GET_COLOR(type) (((type) >> 4) & 3)
typedef enum {
/* 0 */ TRANS_WIPE3_DIR_IN,
diff --git a/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.c b/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.c
index 1acb8c07a..562e1920b 100644
--- a/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.c
+++ b/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.c
@@ -1,11 +1,25 @@
-/*
- * File: z_fbdemo_wipe4.c
+/**
+ * @file z_fbdemo_wipe4.c
* Overlay: ovl_fbdemo_wipe4
* Description:
+ *
+ * @note The bug in TransitionWipe4_Draw() makes this transition do nothing apart from increase its timer until it is
+ * finished.
*/
#include "global.h"
#include "z_fbdemo_wipe4.h"
+#include "sys_cfb.h"
+
+#define THIS ((TransitionWipe4*)thisx)
+
+#define TRANS4_GET_COLORTYPE(type) (((type) >> 1) & 3)
+#define TRANS4_GET_SPEEDTYPE(type) ((type)&1)
+
+typedef enum TransitionWipe4Direction {
+ /* 0 */ TRANS_WIPE4_DIR_IN,
+ /* 1 */ TRANS_WIPE4_DIR_OUT
+} TransitionWipe4Direction;
void* TransitionWipe4_Init(void* thisx);
void TransitionWipe4_Destroy(void* thisx);
@@ -17,35 +31,115 @@ void TransitionWipe4_SetColor(void* thisx, u32 color);
void TransitionWipe4_SetEnvColor(void* thisx, u32 color);
s32 TransitionWipe4_IsDone(void* thisx);
-#if 0
TransitionInit TransitionWipe4_InitVars = {
- TransitionWipe4_Init,
- TransitionWipe4_Destroy,
- TransitionWipe4_Update,
- TransitionWipe4_Draw,
- TransitionWipe4_Start,
- TransitionWipe4_SetType,
- TransitionWipe4_SetColor,
- TransitionWipe4_SetEnvColor,
- TransitionWipe4_IsDone,
+ TransitionWipe4_Init, TransitionWipe4_Destroy, TransitionWipe4_Update,
+ TransitionWipe4_Draw, TransitionWipe4_Start, TransitionWipe4_SetType,
+ TransitionWipe4_SetColor, TransitionWipe4_SetEnvColor, TransitionWipe4_IsDone,
};
-#endif
+void TransitionWipe4_Start(void* thisx) {
+ TransitionWipe4* this = (TransitionWipe4*)thisx;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_fbdemo_wipe4/TransitionWipe4_Start.s")
+ this->isDone = false;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_fbdemo_wipe4/TransitionWipe4_Init.s")
+ switch (this->speedType) {
+ default:
+ this->baseSpeed = 0.2f;
+ break;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_fbdemo_wipe4/TransitionWipe4_Destroy.s")
+ case 0:
+ this->baseSpeed = 0.1f;
+ break;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_fbdemo_wipe4/TransitionWipe4_Update.s")
+ case 1:
+ this->baseSpeed = 0.05f;
+ break;
+ }
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_fbdemo_wipe4/TransitionWipe4_Draw.s")
+ switch (this->colorType) {
+ default:
+ this->primColor.rgba = RGBA8(160, 160, 160, 255);
+ break;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_fbdemo_wipe4/TransitionWipe4_IsDone.s")
+ case 0:
+ this->primColor.rgba = RGBA8(0, 0, 0, 255);
+ break;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_fbdemo_wipe4/TransitionWipe4_SetType.s")
+ case 1:
+ this->primColor.rgba = RGBA8(160, 160, 160, 255);
+ break;
+ }
+}
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_fbdemo_wipe4/TransitionWipe4_SetColor.s")
+void* TransitionWipe4_Init(void* thisx) {
+ TransitionWipe4* this = (TransitionWipe4*)thisx;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_fbdemo_wipe4/TransitionWipe4_SetEnvColor.s")
+ bzero(this, sizeof(TransitionWipe4));
+
+ return this;
+}
+
+void TransitionWipe4_Destroy(void* thisx) {
+}
+
+void TransitionWipe4_Update(void* thisx, s32 updateRate) {
+ TransitionWipe4* this = (TransitionWipe4*)thisx;
+
+ this->progress += (this->baseSpeed * 3.0f) / updateRate;
+ if (this->progress >= 1.0f) {
+ this->progress = 1.0f;
+ this->isDone = true;
+ }
+}
+
+// Use of THIS in this function is required to match
+void TransitionWipe4_Draw(void* thisx, Gfx** gfxP) {
+ Gfx* gfx = *gfxP;
+ VisFbuf* copyFx = &THIS->copyFx;
+
+ copyFx->primColor.rgba = THIS->primColor.rgba;
+
+ if (THIS->direction != 0) {
+ copyFx->scale = THIS->progress;
+ copyFx->lodProportion = 1.0f - THIS->progress;
+ } else {
+ copyFx->scale = 1.0f - THIS->progress;
+ copyFx->lodProportion = THIS->progress;
+ }
+
+ //! @bug (Possibly) Since copyFx->mode is never set after being initialised to 0, the switch in VisFbuf_Draw()
+ //! does nothing, so this function call does nothing but change to the sprite microcode, then back to 3D microcode.
+ VisFbuf_Draw(copyFx, &gfx, SysCfb_GetZBuffer());
+ *gfxP = gfx;
+}
+
+s32 TransitionWipe4_IsDone(void* thisx) {
+ TransitionWipe4* this = (TransitionWipe4*)thisx;
+
+ return this->isDone;
+}
+
+void TransitionWipe4_SetType(void* thisx, s32 type) {
+ TransitionWipe4* this = (TransitionWipe4*)thisx;
+
+ if (type & TRANS_TYPE_SET_PARAMS) {
+ this->colorType = TRANS4_GET_COLORTYPE(type);
+ this->speedType = TRANS4_GET_SPEEDTYPE(type);
+ } else if (type == TRANS_INSTANCE_TYPE_FILL_OUT) {
+ this->direction = TRANS_WIPE4_DIR_OUT;
+ } else {
+ this->direction = TRANS_WIPE4_DIR_IN;
+ }
+}
+
+void TransitionWipe4_SetColor(void* thisx, u32 color) {
+ TransitionWipe4* this = (TransitionWipe4*)thisx;
+
+ this->primColor.rgba = color;
+}
+
+void TransitionWipe4_SetEnvColor(void* thisx, u32 color) {
+ TransitionWipe4* this = (TransitionWipe4*)thisx;
+
+ this->envColor.rgba = color;
+}
diff --git a/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.h b/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.h
index b0aec44be..11357855a 100644
--- a/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.h
+++ b/src/overlays/fbdemos/ovl_fbdemo_wipe4/z_fbdemo_wipe4.h
@@ -3,9 +3,18 @@
#include "ultra64.h"
#include "color.h"
+#include "z64visfbuf.h"
-typedef struct {
- /* 0x00 */ char unk_0[0x28];
+typedef struct TransitionWipe4 {
+ /* 0x00 */ Color_RGBA8_u32 primColor;
+ /* 0x04 */ Color_RGBA8_u32 envColor;
+ /* 0x08 */ f32 baseSpeed;
+ /* 0x0C */ f32 progress;
+ /* 0x10 */ u8 direction;
+ /* 0x11 */ u8 colorType;
+ /* 0x12 */ u8 speedType;
+ /* 0x13 */ u8 isDone;
+ /* 0x14 */ VisFbuf copyFx;
} TransitionWipe4; // size = 0x28
#endif
diff --git a/src/overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.c b/src/overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.c
index ee8aa689f..8e307efd4 100644
--- a/src/overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.c
+++ b/src/overlays/fbdemos/ovl_fbdemo_wipe5/z_fbdemo_wipe5.c
@@ -94,7 +94,7 @@ void TransitionWipe5_Draw(void* thisx, Gfx** gfxP) {
G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE,
G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2);
- func_8014116C(&gfx, D_0F000000, workBuffer, width, height, 1);
+ VisFbuf_SetBgSimple(&gfx, D_0F000000, workBuffer, width, height, VIS_FBUF_BG_CYC_COPY);
} else {
if (alpha == 255) {
gDPSetOtherMode(gfx++,
@@ -110,7 +110,7 @@ void TransitionWipe5_Draw(void* thisx, Gfx** gfxP) {
gDPSetEnvColor(gfx++, 255, 255, 255, alpha);
gDPSetCombineLERP(gfx++, TEXEL0, 0, ENVIRONMENT, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, ENVIRONMENT, 0, 0, 0, 0,
ENVIRONMENT);
- func_8014116C(&gfx, workBuffer, D_0F000000, width, height, 0);
+ VisFbuf_SetBgSimple(&gfx, workBuffer, D_0F000000, width, height, VIS_FBUF_BG_CYC_1CYC);
}
gDPPipeSync(gfx++);
gSPLoadUcode(gfx++, SysUcode_GetUCode(), SysUcode_GetUCodeData());
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c
index c99e6d718..fee889b6b 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c
@@ -4,7 +4,6 @@
* Description: Pause Menu
*/
-#include "prevent_bss_reordering.h"
#include "z_kaleido_scope.h"
#include "z64view.h"
#include "overlays/gamestates/ovl_opening/z_opening.h"
diff --git a/tools/buildtools/makeyar.c b/tools/buildtools/makeyar.c
index 6a241f6f5..e94ce3f0c 100644
--- a/tools/buildtools/makeyar.c
+++ b/tools/buildtools/makeyar.c
@@ -188,20 +188,27 @@ void createArchive(Bytearray *archive, const DataSection *dataSect) {
offset = firstEntryOffset;
for (i = 0; i < dataSect->symbols.len; i++) {
const struct Elf32_Symbol *sym = &dataSect->symbols.symbols[i];
- size_t uncompressedSize = sym->size;
- uint8_t *output = malloc(uncompressedSize * sizeof(uint8_t)); // assume compressed shouldn't be bigger than uncompressed
+ size_t realUncompressedSize = sym->size;
+ size_t alignedUncompressedSize = ALIGN16(realUncompressedSize);
+ uint8_t *inputBuf = malloc(alignedUncompressedSize* sizeof(uint8_t));
+ uint8_t *output = malloc(alignedUncompressedSize * sizeof(uint8_t)); // assume compressed shouldn't be bigger than uncompressed
size_t compressedSize;
+ // Make sure to pad each entry to a 0x10 boundary
+ memcpy(inputBuf, &dataSect->data.bytes[sym->value], realUncompressedSize);
+ if (realUncompressedSize < alignedUncompressedSize) {
+ memset(&inputBuf[realUncompressedSize], 0, alignedUncompressedSize - realUncompressedSize);
+ }
+
output[0] = 'Y';
output[1] = 'a';
output[2] = 'z';
output[3] = '0';
- util_write_uint32_be(&output[4], uncompressedSize);
+ util_write_uint32_be(&output[4], alignedUncompressedSize);
memset(&output[8], 0, 8);
compressedSize = 0x10;
- assert(sym->value + uncompressedSize <= dataSect->data.size);
- compressedSize += yaz0_encode(&dataSect->data.bytes[sym->value], &output[0x10], uncompressedSize);
+ compressedSize += yaz0_encode(inputBuf, &output[0x10], alignedUncompressedSize);
// Pad to 0x10
while (compressedSize % 0x10 != 0) {
diff --git a/tools/disasm/files.txt b/tools/disasm/files.txt
index 56d6477ca..3afbc0bbe 100644
--- a/tools/disasm/files.txt
+++ b/tools/disasm/files.txt
@@ -429,7 +429,7 @@
0x8013EE60 : "z_view",
0x80140260 : "z_vimode",
0x80140CE0 : "z_viscvg",
- 0x80140E80 : "code_80140E80",
+ 0x80140E80 : "z_visfbuf",
0x801418B0 : "z_vismono",
0x801420C0 : "z_viszbuf",
0x80142440 : "z_vr_box",
@@ -648,7 +648,7 @@
0x801DF090 : "z_rumble",
0x801DF0A0 : "z_view",
0x801DF0B0 : "z_vimode",
- 0x801DF120 : "code_80140E80",
+ 0x801DF120 : "z_visfbuf",
0x801DF130 : "z_vr_box",
0x801DF150 : "z_message",
0x801DF730 : "z_message_nes",
diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt
index a368006ad..474c069dd 100644
--- a/tools/disasm/functions.txt
+++ b/tools/disasm/functions.txt
@@ -2759,16 +2759,16 @@
0x80140CE0:("VisCvg_Init",),
0x80140D04:("VisCvg_Destroy",),
0x80140D10:("VisCvg_Draw",),
- 0x80140E80:("func_80140E80",),
- 0x80140EA0:("func_80140EA0",),
- 0x80140EAC:("func_80140EAC",),
- 0x80141008:("func_80141008",),
- 0x8014116C:("func_8014116C",),
- 0x801411B4:("func_801411B4",),
- 0x80141200:("func_80141200",),
- 0x8014151C:("func_8014151C",),
- 0x80141678:("func_80141678",),
- 0x80141778:("func_80141778",),
+ 0x80140E80:("VisFbuf_Init",),
+ 0x80140EA0:("VisFbuf_Destroy",),
+ 0x80140EAC:("VisFbuf_DrawBgToColorImage",),
+ 0x80141008:("VisFbuf_SetBg",),
+ 0x8014116C:("VisFbuf_SetBgSimple",),
+ 0x801411B4:("VisFbuf_SetBgGeneral",),
+ 0x80141200:("VisFbuf_ApplyEffects",),
+ 0x8014151C:("VisFbuf_DrawGeneral",),
+ 0x80141678:("VisFbuf_DrawInterpolate",),
+ 0x80141778:("VisFbuf_Draw",),
0x801418B0:("VisMono_Init",),
0x80141900:("VisMono_Destroy",),
0x80141924:("VisMono_DesaturateTLUT",),
diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt
index 85cdc21ff..40f8326b4 100644
--- a/tools/disasm/variables.txt
+++ b/tools/disasm/variables.txt
@@ -3857,7 +3857,7 @@
0x801F4D48:("sCutsceneCameraInfo","UNK_TYPE","",0x80),
0x801F4DC8:("sCueTypeList","u16","[10]",0x14),
0x801F4DDC:("D_801F4DDC","UNK_TYPE1","",0x1),
- 0x801F4DE0:("gDisablePlayerCsModeStartPos","UNK_TYPE1","",0x1),
+ 0x801F4DE0:("gDisablePlayerCsActionStartPos","UNK_TYPE1","",0x1),
0x801F4DE2:("gDungeonBossWarpSceneId","UNK_TYPE2","",0x2),
0x801F4DF0:("sSceneCutsceneList","ActorCutscene*","",0x4),
0x801F4DF4:("sSceneCutsceneCount","s16","",0x2),
@@ -3981,8 +3981,8 @@
0x801F6D10:("gTransitionTileState","UNK_TYPE4","",0x4),
0x801F6D18:("sPlayVisMono","VisMono","",0x18),
0x801F6D30:("gVisMonoColor","Color_RGBA8","",0x4),
- 0x801F6D38:("D_801F6D38","UNK_TYPE1","",0x1),
- 0x801F6D4C:("D_801F6D4C","UNK_TYPE4","",0x4),
+ 0x801F6D38:("sPlayVisFbuf","UNK_TYPE1","",0x1),
+ 0x801F6D4C:("sPlayVisFbufInstance","UNK_TYPE4","",0x4),
0x801F6D50:("sBombersNotebook","UNK_TYPE1","",0x1),
0x801F6DFC:("sBombersNotebookOpen","u8","",0x1),
0x801F6DFD:("sMotionBlurStatus","UNK_TYPE1","",0x1),
@@ -4954,7 +4954,7 @@
0x8085D370:("D_8085D370","UNK_TYPE1","",0x1),
0x8085D37C:("D_8085D37C","UNK_TYPE1","",0x1),
0x8085D380:("D_8085D380","UNK_TYPE1","",0x1),
- 0x8085D384:("sPlayerCsModes","UNK_TYPE1","",0x1),
+ 0x8085D384:("sPlayerCueToCsActionMap","UNK_TYPE1","",0x1),
0x8085D3E0:("D_8085D3E0","UNK_TYPE1","",0x1),
0x8085D3F4:("D_8085D3F4","UNK_TYPE1","",0x1),
0x8085D3F8:("D_8085D3F8","UNK_TYPE1","",0x1),
@@ -5042,7 +5042,7 @@
0x8085D96C:("D_8085D96C","UNK_TYPE1","",0x1),
0x8085D978:("D_8085D978","UNK_TYPE1","",0x1),
0x8085D984:("D_8085D984","UNK_TYPE1","",0x1),
- 0x8085D990:("sPlayerCsModeAnimFuncs","UNK_TYPE1","",0x1),
+ 0x8085D990:("sPlayerCsActionAnimFuncs","UNK_TYPE1","",0x1),
0x8085D9E0:("D_8085D9E0","UNK_TYPE1","",0x1),
0x8085D9F0:("D_8085D9F0","UNK_TYPE1","",0x1),
0x8085D9FC:("D_8085D9FC","UNK_TYPE1","",0x1),
@@ -5064,8 +5064,8 @@
0x8085DA88:("D_8085DA88","UNK_TYPE1","",0x1),
0x8085DA8C:("D_8085DA8C","UNK_TYPE1","",0x1),
0x8085DA90:("D_8085DA90","UNK_TYPE1","",0x1),
- 0x8085DA94:("sPlayerCsModeInitFuncs","UNK_TYPE1","",0x1),
- 0x8085DEF4:("sPlayerCsModeUpdateFuncs","UNK_TYPE1","",0x1),
+ 0x8085DA94:("sPlayerCsActionInitFuncs","UNK_TYPE1","",0x1),
+ 0x8085DEF4:("sPlayerCsActionUpdateFuncs","UNK_TYPE1","",0x1),
0x8085E354:("D_8085E354","UNK_TYPE1","",0x1),
0x8085E368:("D_8085E368","UNK_TYPE2","",0x2),
0x8085E3A4:("D_8085E3A4","UNK_TYPE1","",0x1),
diff --git a/tools/namefixer.py b/tools/namefixer.py
index 6ea350f7f..b79613ac2 100755
--- a/tools/namefixer.py
+++ b/tools/namefixer.py
@@ -6,6 +6,7 @@ import argparse
# all occurrences of keys will be replaced by associated value
simpleReplace = {
"PLAYER_AP_": "PLAYER_IA_",
+ "PLAYER_CSMODE_": "PLAYER_CSACTION_",
}
# all occurrences of keys will be replaced by associated value,
@@ -1154,7 +1155,8 @@ wordReplace = {
"player->unk_386": "player->getItemDirection",
"player->unk_388": "player->interactRangeActor",
"player->unk_38C": "player->mountSide",
- "player->unk_394": "player->csMode",
+ "player->csMode": "player->csAction",
+ "player->unk_394": "player->csAction",
"player->swordQuads": "player->meleeWeaponQuads",
"player->blureEffectIndex": "player->meleeWeaponEffectIndex",
"player->unk_AD8": "player->underwaterTimer",
@@ -1405,8 +1407,6 @@ wordReplace = {
"TRANS_TYPE_20": "TRANS_TYPE_FADE_DYNAMIC",
"TRANS_TYPE_21": "TRANS_TYPE_CIRCLE",
"TRANS_TYPE_22": "TRANS_TYPE_WIPE5",
- "PLAYER_CSMODE_6": "PLAYER_CSMODE_END",
- "PLAYER_CSMODE_7": "PLAYER_CSMODE_WAIT",
"SUBS_CUTSCENE_SET_UNK_LINK_FIELDS": "SUBS_CUTSCENE_WITH_PLAYER",
"SUBS_CUTSCENE_SET_FLAG": "SUBS_CUTSCENE_WITH_PLAYER_SET_FLAG",
diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv
index a42eacd66..b676ff9f9 100644
--- a/tools/sizes/code_functions.csv
+++ b/tools/sizes/code_functions.csv
@@ -2273,16 +2273,16 @@ asm/non_matchings/code/z_vimode/func_80140970.s,func_80140970,0x80140970,0xDC
asm/non_matchings/code/z_vimode/VisCvg_Init.s,VisCvg_Init,0x80140CE0,0x9
asm/non_matchings/code/z_vimode/VisCvg_Destroy.s,VisCvg_Destroy,0x80140D04,0x3
asm/non_matchings/code/z_vimode/VisCvg_Draw.s,VisCvg_Draw,0x80140D10,0x5C
-asm/non_matchings/code/code_80140E80/func_80140E80.s,func_80140E80,0x80140E80,0x8
-asm/non_matchings/code/code_80140E80/func_80140EA0.s,func_80140EA0,0x80140EA0,0x3
+asm/non_matchings/code/code_80140E80/VisFbuf_Init.s,VisFbuf_Init,0x80140E80,0x8
+asm/non_matchings/code/code_80140E80/VisFbuf_Destroy.s,VisFbuf_Destroy,0x80140EA0,0x3
asm/non_matchings/code/code_80140E80/func_80140EAC.s,func_80140EAC,0x80140EAC,0x57
asm/non_matchings/code/code_80140E80/func_80141008.s,func_80141008,0x80141008,0x59
-asm/non_matchings/code/code_80140E80/func_8014116C.s,func_8014116C,0x8014116C,0x12
+asm/non_matchings/code/code_80140E80/VisFbuf_SetBgSimple.s,VisFbuf_SetBgSimple,0x8014116C,0x12
asm/non_matchings/code/code_80140E80/func_801411B4.s,func_801411B4,0x801411B4,0x13
asm/non_matchings/code/code_80140E80/func_80141200.s,func_80141200,0x80141200,0xC7
asm/non_matchings/code/code_80140E80/func_8014151C.s,func_8014151C,0x8014151C,0x57
asm/non_matchings/code/code_80140E80/func_80141678.s,func_80141678,0x80141678,0x40
-asm/non_matchings/code/code_80140E80/func_80141778.s,func_80141778,0x80141778,0x4E
+asm/non_matchings/code/code_80140E80/VisFbuf_Draw.s,VisFbuf_Draw,0x80141778,0x4E
asm/non_matchings/code/z_vismono/VisMono_Init.s,VisMono_Init,0x801418B0,0x14
asm/non_matchings/code/z_vismono/VisMono_Destroy.s,VisMono_Destroy,0x80141900,0x9
asm/non_matchings/code/z_vismono/VisMono_DesaturateTLUT.s,VisMono_DesaturateTLUT,0x80141924,0xC4